PageSourceSearch

https://ashmitjsg.vercel.app/assets/index-CxZRPfP1.js

js ashmitjsg.vercel.app collected 2026-10-03 06:07:38 UTC 1,452,122 bytes, 4,498 lines download raw bytes

vendor: 6,398 bytes, lines 1-9
1var dU=Object.defineProperty;var hU=(t,e,n)=>e in t?dU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Cc=(t,e,n)=>hU(t,typeof e!="symbol"?e+"":e,n);function fU(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var $C=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pU(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}),n}var qI={exports:{}},Lv={},QI={exports:{}},Lt={};/**
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 Xf=Symbol.for("react.element"),mU=Symbol.for("react.portal"),gU=Symbol.for("react.fragment"),vU=Symbol.for("react.strict_mode"),yU=Symbol.for("react.profiler"),xU=Symbol.for("react.provider"),_U=Symbol.for("react.context"),AU=Symbol.for("react.forward_ref"),SU=Symbol.for("react.suspense"),wU=Symbol.for("react.memo"),MU=Symbol.for("react.lazy"),eT=Symbol.iterator;function EU(t){return t===null||typeof t!="object"?null:(t=eT&&t[eT]||t["@@iterator"],typeof t=="function"?t:null)}var YI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ZI=Object.assign,$I={};function nd(t,e,n){this.props=t,this.context=e,this.refs=$I,this.updater=n||YI}nd.prototype.isReactComponent={};nd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};nd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function e3(){}e3.prototype=nd.prototype;function VS(t,e,n){this.props=t,this.context=e,this.refs=$I,this.updater=n||YI}var jS=VS.prototype=new e3;jS.constructor=VS;ZI(jS,nd.prototype);jS.isPureReactComponent=!0;var tT=Array.isArray,t3=Object.prototype.hasOwnProperty,WS={current:null},n3={key:!0,ref:!0,__self:!0,__source:!0};function i3(t,e,n){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)t3.call(e,i)&&!n3.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(t&&t.defaultProps)for(i in a=t.defaultProps,a)r[i]===void 0&&(r[i]=a[i]);return{$$typeof:Xf,type:t,key:s,ref:o,props:r,_owner:WS.current}}function CU(t,e){return{$$typeof:Xf,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function XS(t){return typeof t=="object"&&t!==null&&t.$$typeof===Xf}function TU(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var nT=/\/+/g;function Zx(t,e){return typeof t=="object"&&t!==null&&t.key!=null?TU(""+t.key):e.toString(36)}function Gg(t,e,n,i,r){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Xf:case mU:o=!0}}if(o)return o=t,r=r(o),t=i===""?"."+Zx(o,0):i,tT(r)?(n="",t!=null&&(n=t.replace(nT,"$&/")+"/"),Gg(r,e,n,"",function(c){return c})):r!=null&&(XS(r)&&(r=CU(r,n+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(nT,"$&/")+"/")+t)),e.push(r)),1;if(o=0,i=i===""?".":i+":",tT(t))for(var a=0;a<t.length;a++){s=t[a];var l=i+Zx(s,a);o+=Gg(s,e,n,l,r)}else if(l=EU(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=i+Zx(s,a++),o+=Gg(s,e,n,l,r);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function xm(t,e,n){if(t==null)return t;var i=[],r=0;return Gg(t,i,"","",function(s){return e.call(n,s,r++)}),i}function bU(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var zi={current:null},Vg={transition:null},RU={ReactCurrentDispatcher:zi,ReactCurrentBatchConfig:Vg,ReactCurrentOwner:WS};function r3(){throw Error("act(...) is not supported in production builds of React.")}Lt.Children={map:xm,forEach:function(t,e,n){xm(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return xm(t,function(){e++}),e},toArray:function(t){return xm(t,function(e){return e})||[]},only:function(t){if(!XS(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Lt.Component=nd;Lt.Fragment=gU;Lt.Profiler=yU;Lt.PureComponent=VS;Lt.StrictMode=vU;Lt.Suspense=SU;
vendor: 5,138 bytes, lines 9-25
9Lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RU;Lt.act=r3;Lt.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=ZI({},t.props),r=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=WS.current),e.key!==void 0&&(r=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)t3.call(e,l)&&!n3.hasOwnProperty(l)&&(i[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];i.children=a}return{$$typeof:Xf,type:t.type,key:r,ref:s,props:i,_owner:o}};Lt.createContext=function(t){return t={$$typeof:_U,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:xU,_context:t},t.Consumer=t};Lt.createElement=i3;Lt.createFactory=function(t){var e=i3.bind(null,t);return e.type=t,e};Lt.createRef=function(){return{current:null}};Lt.forwardRef=function(t){return{$$typeof:AU,render:t}};Lt.isValidElement=XS;Lt.lazy=function(t){return{$$typeof:MU,_payload:{_status:-1,_result:t},_init:bU}};Lt.memo=function(t,e){return{$$typeof:wU,type:t,compare:e===void 0?null:e}};Lt.startTransition=function(t){var e=Vg.transition;Vg.transition={};try{t()}finally{Vg.transition=e}};Lt.unstable_act=r3;Lt.useCallback=function(t,e){return zi.current.useCallback(t,e)};Lt.useContext=function(t){return zi.current.useContext(t)};Lt.useDebugValue=function(){};Lt.useDeferredValue=function(t){return zi.current.useDeferredValue(t)};Lt.useEffect=function(t,e){return zi.current.useEffect(t,e)};Lt.useId=function(){return zi.current.useId()};Lt.useImperativeHandle=function(t,e,n){return zi.current.useImperativeHandle(t,e,n)};Lt.useInsertionEffect=function(t,e){return zi.current.useInsertionEffect(t,e)};Lt.useLayoutEffect=function(t,e){return zi.current.useLayoutEffect(t,e)};Lt.useMemo=function(t,e){return zi.current.useMemo(t,e)};Lt.useReducer=function(t,e,n){return zi.current.useReducer(t,e,n)};Lt.useRef=function(t){return zi.current.useRef(t)};Lt.useState=function(t){return zi.current.useState(t)};Lt.useSyncExternalStore=function(t,e,n){return zi.current.useSyncExternalStore(t,e,n)};Lt.useTransition=function(){return zi.current.useTransition()};Lt.version="18.3.1";QI.exports=Lt;var z=QI.exports;const Ft=Wf(z),PU=fU({__proto__:null,default:Ft},[z]);/**
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 IU=z,BU=Symbol.for("react.element"),LU=Symbol.for("react.fragment"),DU=Object.prototype.hasOwnProperty,NU=IU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FU={key:!0,ref:!0,__self:!0,__source:!0};function s3(t,e,n){var i,r={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(i in e)DU.call(e,i)&&!FU.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:BU,type:t,key:s,ref:o,props:r,_owner:NU.current}}Lv.Fragment=LU;Lv.jsx=s3;Lv.jsxs=s3;qI.exports=Lv;var F=qI.exports,X1={},o3={exports:{}},xr={},a3={exports:{}},l3={};/**
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(t){function e(D,X){var J=D.length;D.push(X);e:for(;0<J;){var $=J-1>>>1,ue=D[$];if(0<r(ue,X))D[$]=X,D[J]=ue,J=$;else break e}}function n(D){return D.length===0?null:D[0]}function i(D){if(D.length===0)return null;var X=D[0],J=D.pop();if(J!==X){D[0]=J;e:for(var $=0,ue=D.length,Ae=ue>>>1;$<Ae;){var te=2*($+1)-1,ce=D[te],xe=te+1,_e=D[xe];if(0>r(ce,J))xe<ue&&0>r(_e,ce)?(D[$]=_e,D[xe]=J,$=xe):(D[$]=ce,D[te]=J,$=te);else if(xe<ue&&0>r(_e,J))D[$]=_e,D[xe]=J,$=xe;else break e}}return X}function r(D,X){var J=D.sortIndex-X.sortIndex;return J!==0?J:D.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],h=1,f=null,p=3,m=!1,v=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(D){for(var X=n(c);X!==null;){if(X.callback===null)i(c);else if(X.startTime<=D)i(c),X.sortIndex=X.expirationTime,e(l,X);else break;X=n(c)}}function M(D){if(S=!1,_(D),!v)if(n(l)!==null)v=!0,Z(b);else{var X=n(c);X!==null&&H(M,X.startTime-D)}}function b(D,X){v=!1,S&&(S=!1,g(B),B=-1),m=!0;var J=p;try{for(_(X),f=n(l);f!==null&&(!(f.expirationTime>X)||D&&!L());){var $=f.callback;if(typeof $=="function"){f.callback=null,p=f.priorityLevel;
vendor: 9,112 bytes, lines 25-34
25var ue=$(f.expirationTime<=X);X=t.unstable_now(),typeof ue=="function"?f.callback=ue:f===n(l)&&i(l),_(X)}else i(l);f=n(l)}if(f!==null)var Ae=!0;else{var te=n(c);te!==null&&H(M,te.startTime-X),Ae=!1}return Ae}finally{f=null,p=J,m=!1}}var C=!1,P=null,B=-1,R=5,T=-1;function L(){return!(t.unstable_now()-T<R)}function W(){if(P!==null){var D=t.unstable_now();T=D;var X=!0;try{X=P(!0,D)}finally{X?Y():(C=!1,P=null)}}else C=!1}var Y;if(typeof x=="function")Y=function(){x(W)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,j=q.port2;q.port1.onmessage=W,Y=function(){j.postMessage(null)}}else Y=function(){A(W,0)};function Z(D){P=D,C||(C=!0,Y())}function H(D,X){B=A(function(){D(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(D){D.callback=null},t.unstable_continueExecution=function(){v||m||(v=!0,Z(b))},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(D){switch(p){case 1:case 2:case 3:var X=3;break;default:X=p}var J=p;p=X;try{return D()}finally{p=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(D,X){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var J=p;p=D;try{return X()}finally{p=J}},t.unstable_scheduleCallback=function(D,X,J){var $=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?$+J:$):J=$,D){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=J+ue,D={id:h++,callback:X,priorityLevel:D,startTime:J,expirationTime:ue,sortIndex:-1},J>$?(D.sortIndex=J,e(c,D),n(l)===null&&D===n(c)&&(S?(g(B),B=-1):S=!0,H(M,J-$))):(D.sortIndex=ue,e(l,D),v||m||(v=!0,Z(b))),D},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(D){var X=p;return function(){var J=p;p=X;try{return D.apply(this,arguments)}finally{p=J}}}})(l3);a3.exports=l3;var kU=a3.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 OU=z,gr=kU;function be(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c3=new Set,ef={};function ec(t,e){Ou(t,e),Ou(t+"Capture",e)}function Ou(t,e){for(ef[t]=e,t=0;t<e.length;t++)c3.add(e[t])}var yo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),J1=Object.prototype.hasOwnProperty,UU=/^[: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]*$/,iT={},rT={};function zU(t){return J1.call(rT,t)?!0:J1.call(iT,t)?!1:UU.test(t)?rT[t]=!0:(iT[t]=!0,!1)}function HU(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function GU(t,e,n,i){if(e===null||typeof e>"u"||HU(t,e,n,i))return!0;if(i)return!1;if(n!==null)switch(n.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 Hi(t,e,n,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var hi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){hi[t]=new Hi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];hi[e]=new Hi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){hi[t]=new Hi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){hi[t]=new Hi(t,2,!1,t,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(t){hi[t]=new Hi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){hi[t]=new Hi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){hi[t]=new Hi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){hi[t]=new Hi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){hi[t]=new Hi(t,5,!1,t.toLowerCase(),null,!1,!1)});var JS=/[\-:]([a-z])/g;function KS(t){return t[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(t){var e=t.replace(JS,KS);hi[e]=new Hi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(JS,KS);hi[e]=new Hi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(JS,KS);hi[e]=new Hi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){hi[t]=new Hi(t,1,!1,t.toLowerCase(),null,!1,!1)});hi.xlinkHref=new Hi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){hi[t]=new Hi(t,1,!1,t.toLowerCase(),null,!0,!0)});function qS(t,e,n,i){var r=hi.hasOwnProperty(e)?hi[e]:null;(r!==null?r.type!==0:i||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(GU(e,n,r,i)&&(n=null),i||r===null?zU(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):r.mustUseProperty?t[r.propertyName]=n===null?r.type===3?!1:"":n:(e=r.attributeName,i=r.attributeNamespace,n===null?t.removeAttribute(e):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}var To=OU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_m=Symbol.for("react.element"),nu=Symbol.for("react.portal"),iu=Symbol.for("react.fragment"),QS=Symbol.for("react.strict_mode"),K1=Symbol.for("react.profiler"),u3=Symbol.for("react.provider"),d3=Symbol.for("react.context"),YS=Symbol.for("react.forward_ref"),q1=Symbol.for("react.suspense"),Q1=Symbol.for("react.suspense_list"),ZS=Symbol.for("react.memo"),Qo=Symbol.for("react.lazy"),h3=Symbol.for("react.offscreen"),sT=Symbol.iterator;function zd(t){return t===null||typeof t!="object"?null:(t=sT&&t[sT]||t["@@iterator"],typeof t=="function"?t:null)}var _n=Object.assign,$x;function xh(t){if($x===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);$x=e&&e[1]||""}return`
34`+$x+t}var e_=!1;function t_(t,e){if(!t||e_)return"";e_=!0;var n=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 i=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){i=c}t.call(e.prototype)}else{try{throw Error()}catch(c){i=c}t()}}
vendor: 16,599 bytes, lines 34-37
34catch(c){if(c&&i&&typeof c.stack=="string"){for(var r=c.stack.split(`
35`),s=i.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 t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{e_=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?xh(t):""}function VU(t){switch(t.tag){case 5:return xh(t.type);case 16:return xh("Lazy");case 13:return xh("Suspense");case 19:return xh("SuspenseList");case 0:case 2:case 15:return t=t_(t.type,!1),t;case 11:return t=t_(t.type.render,!1),t;case 1:return t=t_(t.type,!0),t;default:return""}}function Y1(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case iu:return"Fragment";case nu:return"Portal";case K1:return"Profiler";case QS:return"StrictMode";case q1:return"Suspense";case Q1:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case d3:return(t.displayName||"Context")+".Consumer";case u3:return(t._context.displayName||"Context")+".Provider";case YS:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ZS:return e=t.displayName||null,e!==null?e:Y1(t.type)||"Memo";case Qo:e=t._payload,t=t._init;try{return Y1(t(e))}catch{}}return null}function jU(t){var e=t.type;switch(t.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 t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y1(e);case 8:return e===QS?"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 ga(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function f3(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function WU(t){var e=f3(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Am(t){t._valueTracker||(t._valueTracker=WU(t))}function p3(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=f3(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function u0(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Z1(t,e){var n=e.checked;return _n({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function oT(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=ga(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function m3(t,e){e=e.checked,e!=null&&qS(t,"checked",e,!1)}function $1(t,e){m3(t,e);var n=ga(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?eA(t,e.type,n):e.hasOwnProperty("defaultValue")&&eA(t,e.type,ga(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function aT(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function eA(t,e,n){(e!=="number"||u0(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var _h=Array.isArray;function Eu(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&i&&(t[n].defaultSelected=!0)}else{for(n=""+ga(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,i&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function tA(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(be(91));return _n({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function lT(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(be(92));if(_h(n)){if(1<n.length)throw Error(be(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:ga(n)}}function g3(t,e){var n=ga(e.value),i=ga(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),i!=null&&(t.defaultValue=""+i)}function cT(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function v3(t){switch(t){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 nA(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?v3(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Sm,y3=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,i,r){MSApp.execUnsafeLocalFunction(function(){return t(e,n,i,r)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Sm=Sm||document.createElement("div"),Sm.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Sm.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function tf(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var bh={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},XU=["Webkit","ms","Moz","O"];Object.keys(bh).forEach(function(t){XU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),bh[e]=bh[t]})});function x3(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||bh.hasOwnProperty(t)&&bh[t]?(""+e).trim():e+"px"}function _3(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=x3(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var JU=_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 iA(t,e){if(e){if(JU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(be(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(be(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(be(61))}if(e.style!=null&&typeof e.style!="object")throw Error(be(62))}}function rA(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 sA=null;function $S(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var oA=null,Cu=null,Tu=null;function uT(t){if(t=qf(t)){if(typeof oA!="function")throw Error(be(280));var e=t.stateNode;e&&(e=Ov(e),oA(t.stateNode,t.type,e))}}function A3(t){Cu?Tu?Tu.push(t):Tu=[t]:Cu=t}function S3(){if(Cu){var t=Cu,e=Tu;if(Tu=Cu=null,uT(t),e)for(t=0;t<e.length;t++)uT(e[t])}}function w3(t,e){return t(e)}function M3(){}var n_=!1;function E3(t,e,n){if(n_)return t(e,n);n_=!0;try{return w3(t,e,n)}finally{n_=!1,(Cu!==null||Tu!==null)&&(M3(),S3())}}function nf(t,e){var n=t.stateNode;if(n===null)return null;var i=Ov(n);if(i===null)return null;n=i[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":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(be(231,e,typeof n));return n}var aA=!1;if(yo)try{var Hd={};Object.defineProperty(Hd,"passive",{get:function(){aA=!0}}),window.addEventListener("test",Hd,Hd),window.removeEventListener("test",Hd,Hd)}catch{aA=!1}function KU(t,e,n,i,r,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(h){this.onError(h)}}var Rh=!1,d0=null,h0=!1,lA=null,qU={onError:function(t){Rh=!0,d0=t}};function QU(t,e,n,i,r,s,o,a,l){Rh=!1,d0=null,KU.apply(qU,arguments)}function YU(t,e,n,i,r,s,o,a,l){if(QU.apply(this,arguments),Rh){if(Rh){var c=d0;Rh=!1,d0=null}else throw Error(be(198));h0||(h0=!0,lA=c)}}function tc(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function C3(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function dT(t){if(tc(t)!==t)throw Error(be(188))}function ZU(t){var e=t.alternate;if(!e){if(e=tc(t),e===null)throw Error(be(188));return e!==t?null:t}for(var n=t,i=e;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(i=r.return,i!==null){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return dT(r),t;if(s===i)return dT(r),e;s=s.sibling}throw Error(be(188))}if(n.return!==i.return)n=r,i=s;else{for(var o=!1,a=r.child;a;){if(a===n){o=!0,n=r,i=s;break}if(a===i){o=!0,i=r,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,i=r;break}if(a===i){o=!0,i=s,n=r;break}a=a.sibling}if(!o)throw Error(be(189))}}if(n.alternate!==i)throw Error(be(190))}if(n.tag!==3)throw Error(be(188));return n.stateNode.current===n?t:e}function T3(t){return t=ZU(t),t!==null?b3(t):null}function b3(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=b3(t);if(e!==null)return e;t=t.sibling}return null}var R3=gr.unstable_scheduleCallback,hT=gr.unstable_cancelCallback,$U=gr.unstable_shouldYield,e4=gr.unstable_requestPaint,Bn=gr.unstable_now,t4=gr.unstable_getCurrentPriorityLevel,ew=gr.unstable_ImmediatePriority,P3=gr.unstable_UserBlockingPriority,f0=gr.unstable_NormalPriority,n4=gr.unstable_LowPriority,I3=gr.unstable_IdlePriority,Dv=null,Is=null;function i4(t){if(Is&&typeof Is.onCommitFiberRoot=="function")try{Is.onCommitFiberRoot(Dv,t,void 0,(t.current.flags&128)===128)}catch{}}var cs=Math.clz32?Math.clz32:o4,r4=Math.log,s4=Math.LN2;function o4(t){return t>>>=0,t===0?32:31-(r4(t)/s4|0)|0}var wm=64,Mm=4194304;function Ah(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function p0(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~r;a!==0?i=Ah(a):(s&=o,s!==0&&(i=Ah(s)))}else o=n&~r,o!==0?i=Ah(o):s!==0&&(i=Ah(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0<e;)n=31-cs(e),r=1<<n,i|=t[n],e&=~r;return i}function a4(t,e){switch(t){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 l4(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-cs(s),a=1<<o,l=r[o];l===-1?(!(a&n)||a&i)&&(r[o]=a4(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function cA(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function B3(){var t=wm;return wm<<=1,!(wm&4194240)&&(wm=64),t}function i_(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Jf(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-cs(e),t[e]=n}function c4(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0<n;){var r=31-cs(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}function tw(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-cs(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var qt=0;function L3(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var D3,nw,N3,F3,k3,uA=!1,Em=[],sa=null,oa=null,aa=null,rf=new Map,sf=new Map,Zo=[],u4="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 fT(t,e){switch(t){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":oa=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":rf.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":sf.delete(e.pointerId)}}function Gd(t,e,n,i,r,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},e!==null&&(e=qf(e),e!==null&&nw(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function d4(t,e,n,i,r){switch(e){case"focusin":return sa=Gd(sa,t,e,n,i,r),!0;case"dragenter":return oa=Gd(oa,t,e,n,i,r),!0;case"mouseover":return aa=Gd(aa,t,e,n,i,r),!0;case"pointerover":var s=r.pointerId;return rf.set(s,Gd(rf.get(s)||null,t,e,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,sf.set(s,Gd(sf.get(s)||null,t,e,n,i,r)),!0}return!1}function O3(t){var e=ml(t.target);if(e!==null){var n=tc(e);if(n!==null){if(e=n.tag,e===13){if(e=C3(n),e!==null){t.blockedOn=e,k3(t.priority,function(){N3(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function jg(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=dA(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);sA=i,n.target.dispatchEvent(i),sA=null}else return e=qf(n),e!==null&&nw(e),t.blockedOn=n,!1;e.shift()}return!0}
vendor: 11,995 bytes, line 37
37function pT(t,e,n){jg(t)&&n.delete(e)}function h4(){uA=!1,sa!==null&&jg(sa)&&(sa=null),oa!==null&&jg(oa)&&(oa=null),aa!==null&&jg(aa)&&(aa=null),rf.forEach(pT),sf.forEach(pT)}function Vd(t,e){t.blockedOn===e&&(t.blockedOn=null,uA||(uA=!0,gr.unstable_scheduleCallback(gr.unstable_NormalPriority,h4)))}function of(t){function e(r){return Vd(r,t)}if(0<Em.length){Vd(Em[0],t);for(var n=1;n<Em.length;n++){var i=Em[n];i.blockedOn===t&&(i.blockedOn=null)}}for(sa!==null&&Vd(sa,t),oa!==null&&Vd(oa,t),aa!==null&&Vd(aa,t),rf.forEach(e),sf.forEach(e),n=0;n<Zo.length;n++)i=Zo[n],i.blockedOn===t&&(i.blockedOn=null);for(;0<Zo.length&&(n=Zo[0],n.blockedOn===null);)O3(n),n.blockedOn===null&&Zo.shift()}var bu=To.ReactCurrentBatchConfig,m0=!0;function f4(t,e,n,i){var r=qt,s=bu.transition;bu.transition=null;try{qt=1,iw(t,e,n,i)}finally{qt=r,bu.transition=s}}function p4(t,e,n,i){var r=qt,s=bu.transition;bu.transition=null;try{qt=4,iw(t,e,n,i)}finally{qt=r,bu.transition=s}}function iw(t,e,n,i){if(m0){var r=dA(t,e,n,i);if(r===null)f_(t,e,i,g0,n),fT(t,i);else if(d4(r,t,e,n,i))i.stopPropagation();else if(fT(t,i),e&4&&-1<u4.indexOf(t)){for(;r!==null;){var s=qf(r);if(s!==null&&D3(s),s=dA(t,e,n,i),s===null&&f_(t,e,i,g0,n),s===r)break;r=s}r!==null&&i.stopPropagation()}else f_(t,e,i,null,n)}}var g0=null;function dA(t,e,n,i){if(g0=null,t=$S(i),t=ml(t),t!==null)if(e=tc(t),e===null)t=null;else if(n=e.tag,n===13){if(t=C3(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return g0=t,null}function U3(t){switch(t){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(t4()){case ew:return 1;case P3:return 4;case f0:case n4:return 16;case I3:return 536870912;default:return 16}default:return 16}}var ta=null,rw=null,Wg=null;function z3(){if(Wg)return Wg;var t,e=rw,n=e.length,i,r="value"in ta?ta.value:ta.textContent,s=r.length;for(t=0;t<n&&e[t]===r[t];t++);var o=n-t;for(i=1;i<=o&&e[n-i]===r[s-i];i++);return Wg=r.slice(t,1<i?1-i:void 0)}function Xg(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Cm(){return!0}function mT(){return!1}function _r(t){function e(n,i,r,s,o){this._reactName=n,this._targetInst=r,this.type=i,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Cm:mT,this.isPropagationStopped=mT,this}return _n(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Cm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cm)},persist:function(){},isPersistent:Cm}),e}var id={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sw=_r(id),Kf=_n({},id,{view:0,detail:0}),m4=_r(Kf),r_,s_,jd,Nv=_n({},Kf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ow,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==jd&&(jd&&t.type==="mousemove"?(r_=t.screenX-jd.screenX,s_=t.screenY-jd.screenY):s_=r_=0,jd=t),r_)},movementY:function(t){return"movementY"in t?t.movementY:s_}}),gT=_r(Nv),g4=_n({},Nv,{dataTransfer:0}),v4=_r(g4),y4=_n({},Kf,{relatedTarget:0}),o_=_r(y4),x4=_n({},id,{animationName:0,elapsedTime:0,pseudoElement:0}),_4=_r(x4),A4=_n({},id,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),S4=_r(A4),w4=_n({},id,{data:0}),vT=_r(w4),M4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E4={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"},C4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function T4(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=C4[t])?!!e[t]:!1}function ow(){return T4}var b4=_n({},Kf,{key:function(t){if(t.key){var e=M4[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Xg(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?E4[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ow,charCode:function(t){return t.type==="keypress"?Xg(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Xg(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),R4=_r(b4),P4=_n({},Nv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yT=_r(P4),I4=_n({},Kf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ow}),B4=_r(I4),L4=_n({},id,{propertyName:0,elapsedTime:0,pseudoElement:0}),D4=_r(L4),N4=_n({},Nv,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),F4=_r(N4),k4=[9,13,27,32],aw=yo&&"CompositionEvent"in window,Ph=null;yo&&"documentMode"in document&&(Ph=document.documentMode);var O4=yo&&"TextEvent"in window&&!Ph,H3=yo&&(!aw||Ph&&8<Ph&&11>=Ph),xT=" ",_T=!1;function G3(t,e){switch(t){case"keyup":return k4.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ru=!1;function U4(t,e){switch(t){case"compositionend":return V3(e);case"keypress":return e.which!==32?null:(_T=!0,xT);case"textInput":return t=e.data,t===xT&&_T?null:t;default:return null}}function z4(t,e){if(ru)return t==="compositionend"||!aw&&G3(t,e)?(t=z3(),Wg=rw=ta=null,ru=!1,t):null;switch(t){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 H3&&e.locale!=="ko"?null:e.data;default:return null}}var H4={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 AT(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!H4[t.type]:e==="textarea"}function j3(t,e,n,i){A3(i),e=v0(e,"onChange"),0<e.length&&(n=new sw("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var Ih=null,af=null;function G4(t){tB(t,0)}function Fv(t){var e=au(t);if(p3(e))return t}function V4(t,e){if(t==="change")return e}var W3=!1;if(yo){var a_;if(yo){var l_="oninput"in document;if(!l_){var ST=document.createElement("div");ST.setAttribute("oninput","return;"),l_=typeof ST.oninput=="function"}a_=l_}else a_=!1;W3=a_&&(!document.documentMode||9<document.documentMode)}function wT(){Ih&&(Ih.detachEvent("onpropertychange",X3),af=Ih=null)}function X3(t){if(t.propertyName==="value"&&Fv(af)){var e=[];j3(e,af,t,$S(t)),E3(G4,e)}}function j4(t,e,n){t==="focusin"?(wT(),Ih=e,af=n,Ih.attachEvent("onpropertychange",X3)):t==="focusout"&&wT()}function W4(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Fv(af)}function X4(t,e){if(t==="click")return Fv(e)}function J4(t,e){if(t==="input"||t==="change")return Fv(e)}function K4(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var hs=typeof Object.is=="function"?Object.is:K4;function lf(t,e){if(hs(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!J1.call(e,r)||!hs(t[r],e[r]))return!1}return!0}function MT(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ET(t,e){var n=MT(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=MT(n)}}function J3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?J3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function K3(){for(var t=window,e=u0();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=u0(t.document)}return e}function lw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function q4(t){var e=K3(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&J3(n.ownerDocument.documentElement,n)){if(i!==null&&lw(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=ET(n,s);var o=ET(n,i);r&&o&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Q4=yo&&"documentMode"in document&&11>=document.documentMode,su=null,hA=null,Bh=null,fA=!1;function CT(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fA||su==null||su!==u0(i)||(i=su,"selectionStart"in i&&lw(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:i.focusNode,focusOffset:i.focusOffset}),Bh&&lf(Bh,i)||(Bh=i,i=v0(hA,"onSelect"),0<i.length&&(e=new sw("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=su)))}function Tm(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ou={animationend:Tm("Animation","AnimationEnd"),animationiteration:Tm("Animation","AnimationIteration"),animationstart:Tm("Animation","AnimationStart"),transitionend:Tm("Transition","TransitionEnd")},c_={},q3={};yo&&(q3=document.createElement("div").style,"AnimationEvent"in window||(delete ou.animationend.animation,delete ou.animationiteration.animation,delete ou.animationstart.animation),"TransitionEvent"in window||delete ou.transitionend.transition);function kv(t){if(c_[t])return c_[t];if(!ou[t])return t;var e=ou[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in q3)return c_[t]=e[n];return t}var Q3=kv("animationend"),Y3=kv("animationiteration"),Z3=kv("animationstart"),$3=kv("transitionend"),eB=new Map,TT="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 wa(t,e){eB.set(t,e),ec(e,[t])}for(var u_=0;u_<TT.length;u_++){var d_=TT[u_],Y4=d_.toLowerCase(),Z4=d_[0].toUpperCase()+d_.slice(1);wa(Y4,"on"+Z4)}wa(Q3,"onAnimationEnd");wa(Y3,"onAnimationIteration");wa(Z3,"onAnimationStart");wa("dblclick","onDoubleClick");wa("focusin","onFocus");wa("focusout","onBlur");wa($3,"onTransitionEnd");Ou("onMouseEnter",["mouseout","mouseover"]);Ou("onMouseLeave",["mouseout","mouseover"]);Ou("onPointerEnter",["pointerout","pointerover"]);Ou("onPointerLeave",["pointerout","pointerover"]);ec("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ec("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ec("onBeforeInput",["compositionend","keypress","textInput","paste"]);ec("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ec("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ec("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sh="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(" "),$4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sh));function bT(t,e,n){var i=t.type||"unknown-event";t.currentTarget=n,YU(i,e,void 0,t),t.currentTarget=null}function tB(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],r=i.event;i=i.listeners;e:{var s=void 0;if(e)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break e;bT(r,a,c),s=l}else for(o=0;o<i.length;o++){if(a=i[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break e;bT(r,a,c),s=l}}}if(h0)throw t=lA,h0=!1,lA=null,t}function cn(t,e){var n=e[yA];n===void 0&&(n=e[yA]=new Set);var i=t+"__bubble";n.has(i)||(nB(e,t,2,!1),n.add(i))}function h_(t,e,n){var i=0;e&&(i|=4),nB(n,t,i,e)}var bm="_reactListening"+Math.random().toString(36).slice(2);function cf(t){if(!t[bm]){t[bm]=!0,c3.forEach(function(n){n!=="selectionchange"&&($4.has(n)||h_(n,!1,t),h_(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[bm]||(e[bm]=!0,h_("selectionchange",!1,e))}}function nB(t,e,n,i){switch(U3(e)){case 1:var r=f4;break;case 4:r=p4;break;default:r=iw}n=r.bind(null,e,n,t),r=void 0,!aA||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),i?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function f_(t,e,n,i,r){var s=i;if(!(e&1)&&!(e&2)&&i!==null)e:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var a=i.stateNode.containerInfo;
vendor: 5,317 bytes, lines 37-38
37if(a===r||a.nodeType===8&&a.parentNode===r)break;if(o===4)for(o=i.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=ml(a),o===null)return;if(l=o.tag,l===5||l===6){i=s=o;continue e}a=a.parentNode}}i=i.return}E3(function(){var c=s,h=$S(n),f=[];e:{var p=eB.get(t);if(p!==void 0){var m=sw,v=t;switch(t){case"keypress":if(Xg(n)===0)break e;case"keydown":case"keyup":m=R4;break;case"focusin":v="focus",m=o_;break;case"focusout":v="blur",m=o_;break;case"beforeblur":case"afterblur":m=o_;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=gT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=v4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=B4;break;case Q3:case Y3:case Z3:m=_4;break;case $3:m=D4;break;case"scroll":m=m4;break;case"wheel":m=F4;break;case"copy":case"cut":case"paste":m=S4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=yT}var S=(e&4)!==0,A=!S&&t==="scroll",g=S?p!==null?p+"Capture":null:p;S=[];for(var x=c,_;x!==null;){_=x;var M=_.stateNode;if(_.tag===5&&M!==null&&(_=M,g!==null&&(M=nf(x,g),M!=null&&S.push(uf(x,M,_)))),A)break;x=x.return}0<S.length&&(p=new m(p,v,null,n,h),f.push({event:p,listeners:S}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",m=t==="mouseout"||t==="pointerout",p&&n!==sA&&(v=n.relatedTarget||n.fromElement)&&(ml(v)||v[xo]))break e;if((m||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=c,v=v?ml(v):null,v!==null&&(A=tc(v),v!==A||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=c),m!==v)){if(S=gT,M="onMouseLeave",g="onMouseEnter",x="mouse",(t==="pointerout"||t==="pointerover")&&(S=yT,M="onPointerLeave",g="onPointerEnter",x="pointer"),A=m==null?p:au(m),_=v==null?p:au(v),p=new S(M,x+"leave",m,n,h),p.target=A,p.relatedTarget=_,M=null,ml(h)===c&&(S=new S(g,x+"enter",v,n,h),S.target=_,S.relatedTarget=A,M=S),A=M,m&&v)t:{for(S=m,g=v,x=0,_=S;_;_=Tc(_))x++;for(_=0,M=g;M;M=Tc(M))_++;for(;0<x-_;)S=Tc(S),x--;for(;0<_-x;)g=Tc(g),_--;for(;x--;){if(S===g||g!==null&&S===g.alternate)break t;S=Tc(S),g=Tc(g)}S=null}else S=null;m!==null&&RT(f,p,m,S,!1),v!==null&&A!==null&&RT(f,A,v,S,!0)}}e:{if(p=c?au(c):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var b=V4;else if(AT(p))if(W3)b=J4;else{b=W4;var C=j4}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(b=X4);if(b&&(b=b(t,c))){j3(f,b,n,h);break e}C&&C(t,p,c),t==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&eA(p,"number",p.value)}switch(C=c?au(c):window,t){case"focusin":(AT(C)||C.contentEditable==="true")&&(su=C,hA=c,Bh=null);break;case"focusout":Bh=hA=su=null;break;case"mousedown":fA=!0;break;case"contextmenu":case"mouseup":case"dragend":fA=!1,CT(f,n,h);break;case"selectionchange":if(Q4)break;case"keydown":case"keyup":CT(f,n,h)}var P;if(aw)e:{switch(t){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else ru?G3(t,n)&&(B="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(B="onCompositionStart");B&&(H3&&n.locale!=="ko"&&(ru||B!=="onCompositionStart"?B==="onCompositionEnd"&&ru&&(P=z3()):(ta=h,rw="value"in ta?ta.value:ta.textContent,ru=!0)),C=v0(c,B),0<C.length&&(B=new vT(B,t,null,n,h),f.push({event:B,listeners:C}),P?B.data=P:(P=V3(n),P!==null&&(B.data=P)))),(P=O4?U4(t,n):z4(t,n))&&(c=v0(c,"onBeforeInput"),0<c.length&&(h=new vT("onBeforeInput","beforeinput",null,n,h),f.push({event:h,listeners:c}),h.data=P))}tB(f,e)})}function uf(t,e,n){return{instance:t,listener:e,currentTarget:n}}function v0(t,e){for(var n=e+"Capture",i=[];t!==null;){var r=t,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=nf(t,n),s!=null&&i.unshift(uf(t,s,r)),s=nf(t,e),s!=null&&i.push(uf(t,s,r))),t=t.return}return i}function Tc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function RT(t,e,n,i,r){for(var s=e._reactName,o=[];n!==null&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===i)break;a.tag===5&&c!==null&&(a=c,r?(l=nf(n,s),l!=null&&o.unshift(uf(n,l,a))):r||(l=nf(n,s),l!=null&&o.push(uf(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var e5=/\r\n?/g,t5=/\u0000|\uFFFD/g;function PT(t){return(typeof t=="string"?t:""+t).replace(e5,`
38`).replace(t5,"")}function Rm(t,e,n){if(e=PT(e),PT(t)!==e&&n)throw Error(be(425))}function y0(){}var pA=null,mA=null;function gA(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var vA=typeof setTimeout=="function"?setTimeout:void 0,n5=typeof clearTimeout=="function"?clearTimeout:void 0,IT=typeof Promise=="function"?Promise:void 0,i5=typeof queueMicrotask=="function"?queueMicrotask:typeof IT<"u"?function(t){return IT.resolve(null).then(t).cat
vendor: 4,832 bytes, line 38
38ch(r5)}:vA;function r5(t){setTimeout(function(){throw t})}function p_(t,e){var n=e,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(i===0){t.removeChild(r),of(e);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);of(e)}function la(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function BT(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var rd=Math.random().toString(36).slice(2),Rs="__reactFiber$"+rd,df="__reactProps$"+rd,xo="__reactContainer$"+rd,yA="__reactEvents$"+rd,s5="__reactListeners$"+rd,o5="__reactHandles$"+rd;function ml(t){var e=t[Rs];if(e)return e;for(var n=t.parentNode;n;){if(e=n[xo]||n[Rs]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=BT(t);t!==null;){if(n=t[Rs])return n;t=BT(t)}return e}t=n,n=t.parentNode}return null}function qf(t){return t=t[Rs]||t[xo],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function au(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(be(33))}function Ov(t){return t[df]||null}var xA=[],lu=-1;function Ma(t){return{current:t}}function dn(t){0>lu||(t.current=xA[lu],xA[lu]=null,lu--)}function on(t,e){lu++,xA[lu]=t.current,t.current=e}var va={},bi=Ma(va),Yi=Ma(!1),Ul=va;function Uu(t,e){var n=t.type.contextTypes;if(!n)return va;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=e[s];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function Zi(t){return t=t.childContextTypes,t!=null}function x0(){dn(Yi),dn(bi)}function LT(t,e,n){if(bi.current!==va)throw Error(be(168));on(bi,e),on(Yi,n)}function iB(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(be(108,jU(t)||"Unknown",r));return _n({},n,i)}function _0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||va,Ul=bi.current,on(bi,t),on(Yi,Yi.current),!0}function DT(t,e,n){var i=t.stateNode;if(!i)throw Error(be(169));n?(t=iB(t,e,Ul),i.__reactInternalMemoizedMergedChildContext=t,dn(Yi),dn(bi),on(bi,t)):dn(Yi),on(Yi,n)}var to=null,Uv=!1,m_=!1;function rB(t){to===null?to=[t]:to.push(t)}function a5(t){Uv=!0,rB(t)}function Ea(){if(!m_&&to!==null){m_=!0;var t=0,e=qt;try{var n=to;for(qt=1;t<n.length;t++){var i=n[t];do i=i(!0);while(i!==null)}to=null,Uv=!1}catch(r){throw to!==null&&(to=to.slice(t+1)),R3(ew,Ea),r}finally{qt=e,m_=!1}}return null}var cu=[],uu=0,A0=null,S0=0,Fr=[],kr=0,zl=null,so=1,oo="";function rl(t,e){cu[uu++]=S0,cu[uu++]=A0,A0=t,S0=e}function sB(t,e,n){Fr[kr++]=so,Fr[kr++]=oo,Fr[kr++]=zl,zl=t;var i=so;t=oo;var r=32-cs(i)-1;i&=~(1<<r),n+=1;var s=32-cs(e)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,so=1<<32-cs(e)+r|n<<r|i,oo=s+t}else so=1<<s|n<<r|i,oo=t}function cw(t){t.return!==null&&(rl(t,1),sB(t,1,0))}function uw(t){for(;t===A0;)A0=cu[--uu],cu[uu]=null,S0=cu[--uu],cu[uu]=null;for(;t===zl;)zl=Fr[--kr],Fr[kr]=null,oo=Fr[--kr],Fr[kr]=null,so=Fr[--kr],Fr[kr]=null}var pr=null,ur=null,fn=!1,os=null;function oB(t,e){var n=Ur(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function NT(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,pr=t,ur=la(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,pr=t,ur=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=zl!==null?{id:so,overflow:oo}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Ur(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,pr=t,ur=null,!0):!1;default:return!1}}function _A(t){return(t.mode&1)!==0&&(t.flags&128)===0}function AA(t){if(fn){var e=ur;if(e){var n=e;if(!NT(t,e)){if(_A(t))throw Error(be(418));e=la(n.nextSibling);var i=pr;e&&NT(t,e)?oB(i,n):(t.flags=t.flags&-4097|2,fn=!1,pr=t)}}else{if(_A(t))throw Error(be(418));t.flags=t.flags&-4097|2,fn=!1,pr=t}}}function FT(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;pr=t}function Pm(t){if(t!==pr)return!1;if(!fn)return FT(t),fn=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!gA(t.type,t.memoizedProps)),e&&(e=ur)){if(_A(t))throw aB(),Error(be(418));for(;e;)oB(t,e),e=la(e.nextSibling)}if(FT(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(be(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 10,289 bytes, line 38
38){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){ur=la(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}ur=null}}else ur=pr?la(t.stateNode.nextSibling):null;return!0}function aB(){for(var t=ur;t;)t=la(t.nextSibling)}function zu(){ur=pr=null,fn=!1}function dw(t){os===null?os=[t]:os.push(t)}var l5=To.ReactCurrentBatchConfig;function Wd(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(be(309));var i=n.stateNode}if(!i)throw Error(be(147,t));var r=i,s=""+t;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)}if(typeof t!="string")throw Error(be(284));if(!n._owner)throw Error(be(290,t))}return t}function Im(t,e){throw t=Object.prototype.toString.call(e),Error(be(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function kT(t){var e=t._init;return e(t._payload)}function lB(t){function e(g,x){if(t){var _=g.deletions;_===null?(g.deletions=[x],g.flags|=16):_.push(x)}}function n(g,x){if(!t)return null;for(;x!==null;)e(g,x),x=x.sibling;return null}function i(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function r(g,x){return g=ha(g,x),g.index=0,g.sibling=null,g}function s(g,x,_){return g.index=_,t?(_=g.alternate,_!==null?(_=_.index,_<x?(g.flags|=2,x):_):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,x,_,M){return x===null||x.tag!==6?(x=S_(_,g.mode,M),x.return=g,x):(x=r(x,_),x.return=g,x)}function l(g,x,_,M){var b=_.type;return b===iu?h(g,x,_.props.children,M,_.key):x!==null&&(x.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Qo&&kT(b)===x.type)?(M=r(x,_.props),M.ref=Wd(g,x,_),M.return=g,M):(M=$g(_.type,_.key,_.props,null,g.mode,M),M.ref=Wd(g,x,_),M.return=g,M)}function c(g,x,_,M){return x===null||x.tag!==4||x.stateNode.containerInfo!==_.containerInfo||x.stateNode.implementation!==_.implementation?(x=w_(_,g.mode,M),x.return=g,x):(x=r(x,_.children||[]),x.return=g,x)}function h(g,x,_,M,b){return x===null||x.tag!==7?(x=bl(_,g.mode,M,b),x.return=g,x):(x=r(x,_),x.return=g,x)}function f(g,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return x=S_(""+x,g.mode,_),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _m:return _=$g(x.type,x.key,x.props,null,g.mode,_),_.ref=Wd(g,null,x),_.return=g,_;case nu:return x=w_(x,g.mode,_),x.return=g,x;case Qo:var M=x._init;return f(g,M(x._payload),_)}if(_h(x)||zd(x))return x=bl(x,g.mode,_,null),x.return=g,x;Im(g,x)}return null}function p(g,x,_,M){var b=x!==null?x.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return b!==null?null:a(g,x,""+_,M);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case _m:return _.key===b?l(g,x,_,M):null;case nu:return _.key===b?c(g,x,_,M):null;case Qo:return b=_._init,p(g,x,b(_._payload),M)}if(_h(_)||zd(_))return b!==null?null:h(g,x,_,M,null);Im(g,_)}return null}function m(g,x,_,M,b){if(typeof M=="string"&&M!==""||typeof M=="number")return g=g.get(_)||null,a(x,g,""+M,b);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case _m:return g=g.get(M.key===null?_:M.key)||null,l(x,g,M,b);case nu:return g=g.get(M.key===null?_:M.key)||null,c(x,g,M,b);case Qo:var C=M._init;return m(g,x,_,C(M._payload),b)}if(_h(M)||zd(M))return g=g.get(_)||null,h(x,g,M,b,null);Im(x,M)}return null}function v(g,x,_,M){for(var b=null,C=null,P=x,B=x=0,R=null;P!==null&&B<_.length;B++){P.index>B?(R=P,P=null):R=P.sibling;var T=p(g,P,_[B],M);if(T===null){P===null&&(P=R);break}t&&P&&T.alternate===null&&e(g,P),x=s(T,x,B),C===null?b=T:C.sibling=T,C=T,P=R}if(B===_.length)return n(g,P),fn&&rl(g,B),b;if(P===null){for(;B<_.length;B++)P=f(g,_[B],M),P!==null&&(x=s(P,x,B),C===null?b=P:C.sibling=P,C=P);return fn&&rl(g,B),b}for(P=i(g,P);B<_.length;B++)R=m(P,g,B,_[B],M),R!==null&&(t&&R.alternate!==null&&P.delete(R.key===null?B:R.key),x=s(R,x,B),C===null?b=R:C.sibling=R,C=R);return t&&P.forEach(function(L){return e(g,L)}),fn&&rl(g,B),b}function S(g,x,_,M){var b=zd(_);if(typeof b!="function")throw Error(be(150));if(_=b.call(_),_==null)throw Error(be(151));for(var C=b=null,P=x,B=x=0,R=null,T=_.next();P!==null&&!T.done;B++,T=_.next()){P.index>B?(R=P,P=null):R=P.sibling;var L=p(g,P,T.value,M);if(L===null){P===null&&(P=R);break}t&&P&&L.alternate===null&&e(g,P),x=s(L,x,B),C===null?b=L:C.sibling=L,C=L,P=R}if(T.done)return n(g,P),fn&&rl(g,B),b;if(P===null){for(;!T.done;B++,T=_.next())T=f(g,T.value,M),T!==null&&(x=s(T,x,B),C===null?b=T:C.sibling=T,C=T);return fn&&rl(g,B),b}for(P=i(g,P);!T.done;B++,T=_.next())T=m(P,g,B,T.value,M),T!==null&&(t&&T.alternate!==null&&P.delete(T.key===null?B:T.key),x=s(T,x,B),C===null?b=T:C.sibling=T,C=T);return t&&P.forEach(function(W){return e(g,W)}),fn&&rl(g,B),b}function A(g,x,_,M){if(typeof _=="object"&&_!==null&&_.type===iu&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case _m:e:{for(var b=_.key,C=x;C!==null;){if(C.key===b){if(b=_.type,b===iu){if(C.tag===7){n(g,C.sibling),x=r(C,_.props.children),x.return=g,g=x;break e}}else if(C.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Qo&&kT(b)===C.type){n(g,C.sibling),x=r(C,_.props),x.ref=Wd(g,C,_),x.return=g,g=x;break e}n(g,C);break}else e(g,C);C=C.sibling}_.type===iu?(x=bl(_.props.children,g.mode,M,_.key),x.return=g,g=x):(M=$g(_.type,_.key,_.props,null,g.mode,M),M.ref=Wd(g,x,_),M.return=g,g=M)}return o(g);case nu:e:{for(C=_.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===_.containerInfo&&x.stateNode.implementation===_.implementation){n(g,x.sibling),x=r(x,_.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else e(g,x);x=x.sibling}x=w_(_,g.mode,M),x.return=g,g=x}return o(g);case Qo:return C=_._init,A(g,x,C(_._payload),M)}if(_h(_))return v(g,x,_,M);if(zd(_))return S(g,x,_,M);Im(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,x!==null&&x.tag===6?(n(g,x.sibling),x=r(x,_),x.return=g,g=x):(n(g,x),x=S_(_,g.mode,M),x.return=g,g=x),o(g)):n(g,x)}return A}var Hu=lB(!0),cB=lB(!1),w0=Ma(null),M0=null,du=null,hw=null;function fw(){hw=du=M0=null}function pw(t){var e=w0.current;dn(w0),t._currentValue=e}function SA(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Ru(t,e){M0=t,hw=du=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(qi=!0),t.firstContext=null)}function Vr(t){var e=t._currentValue;if(hw!==t)if(t={context:t,memoizedValue:e,next:null},du===null){if(M0===null)throw Error(be(308));du=t,M0.dependencies={lanes:0,firstContext:t}}else du=du.next=t;return e}var gl=null;function mw(t){gl===null?gl=[t]:gl.push(t)}function uB(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,mw(e)):(n.next=r.next,r.next=n),e.interleaved=n,_o(t,i)}function _o(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Yo=!1;function gw(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dB(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function uo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ca(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,Ht&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,_o(t,n)}return r=i.interleaved,r===null?(e.next=e,mw(i)):(e.next=r.next,r.next=e),i.interleaved=e,_o(t,n)}function Jg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,tw(t,n)}}function OT(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?r=s=e:s=s.next=e}else r=s=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function E0(t,e,n,i){var r=t.updateQueue;Yo=!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 h=t.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(s!==null){var f=r.baseState;o=0,h=c=l=null,a=s;do{var p=a.lane,m=a.eventTime;if((i&p)===p){h!==null&&(h=h.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,S=a;switch(p=e,m=n,S.tag){case 1:if(v=S.payload,typeof v=="function"){f=v.call(m,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=S.payload,p=typeof v=="function"?v.call(m,f,p):v,p==null)break e;f=_n({},f,p);break e;case 2:Yo=!0}}a.callback!==null&&a.lane!==0&&(t.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},h===null?(c=h=m,l=f):h=h.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(h===null&&(l=f),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=h,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);Gl|=o,t.lanes=o,t.memoizedState=f}}function UT(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var i=t[e],r=i.callback;if(r!==null){if(i.callback=null,i=n,typeof r!="function")throw Error(be(191,r));r.call(i)}}}var Qf={},Bs=Ma(Qf),hf=Ma(Qf),ff=Ma(Qf);function vl(t){if(t===Qf)throw Error(be(174));return t}function vw(t,e){switch(on(ff,e),on(hf,t),on(Bs,Qf),t=e.nodeType,t){case 9:case 11:e=(e
vendor: 5,015 bytes, line 38
38=e.documentElement)?e.namespaceURI:nA(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=nA(e,t)}dn(Bs),on(Bs,e)}function Gu(){dn(Bs),dn(hf),dn(ff)}function hB(t){vl(ff.current);var e=vl(Bs.current),n=nA(e,t.type);e!==n&&(on(hf,t),on(Bs,n))}function yw(t){hf.current===t&&(dn(Bs),dn(hf))}var mn=Ma(0);function C0(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var g_=[];function xw(){for(var t=0;t<g_.length;t++)g_[t]._workInProgressVersionPrimary=null;g_.length=0}var Kg=To.ReactCurrentDispatcher,v_=To.ReactCurrentBatchConfig,Hl=0,yn=null,Gn=null,ti=null,T0=!1,Lh=!1,pf=0,c5=0;function vi(){throw Error(be(321))}function _w(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!hs(t[n],e[n]))return!1;return!0}function Aw(t,e,n,i,r,s){if(Hl=s,yn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Kg.current=t===null||t.memoizedState===null?f5:p5,t=n(i,r),Lh){s=0;do{if(Lh=!1,pf=0,25<=s)throw Error(be(301));s+=1,ti=Gn=null,e.updateQueue=null,Kg.current=m5,t=n(i,r)}while(Lh)}if(Kg.current=b0,e=Gn!==null&&Gn.next!==null,Hl=0,ti=Gn=yn=null,T0=!1,e)throw Error(be(300));return t}function Sw(){var t=pf!==0;return pf=0,t}function bs(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ti===null?yn.memoizedState=ti=t:ti=ti.next=t,ti}function jr(){if(Gn===null){var t=yn.alternate;t=t!==null?t.memoizedState:null}else t=Gn.next;var e=ti===null?yn.memoizedState:ti.next;if(e!==null)ti=e,Gn=t;else{if(t===null)throw Error(be(310));Gn=t,t={memoizedState:Gn.memoizedState,baseState:Gn.baseState,baseQueue:Gn.baseQueue,queue:Gn.queue,next:null},ti===null?yn.memoizedState=ti=t:ti=ti.next=t}return ti}function mf(t,e){return typeof e=="function"?e(t):e}function y_(t){var e=jr(),n=e.queue;if(n===null)throw Error(be(311));n.lastRenderedReducer=t;var i=Gn,r=i.baseQueue,s=n.pending;if(s!==null){if(r!==null){var o=r.next;r.next=s.next,s.next=o}i.baseQueue=r=s,n.pending=null}if(r!==null){s=r.next,i=i.baseState;var a=o=null,l=null,c=s;do{var h=c.lane;if((Hl&h)===h)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:t(i,c.action);else{var f={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=i):l=l.next=f,yn.lanes|=h,Gl|=h}c=c.next}while(c!==null&&c!==s);l===null?o=i:l.next=a,hs(i,e.memoizedState)||(qi=!0),e.memoizedState=i,e.baseState=o,e.baseQueue=l,n.lastRenderedState=i}if(t=n.interleaved,t!==null){r=t;do s=r.lane,yn.lanes|=s,Gl|=s,r=r.next;while(r!==t)}else r===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function x_(t){var e=jr(),n=e.queue;if(n===null)throw Error(be(311));n.lastRenderedReducer=t;var i=n.dispatch,r=n.pending,s=e.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do s=t(s,o.action),o=o.next;while(o!==r);hs(s,e.memoizedState)||(qi=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,i]}function fB(){}function pB(t,e){var n=yn,i=jr(),r=e(),s=!hs(i.memoizedState,r);if(s&&(i.memoizedState=r,qi=!0),i=i.queue,ww(vB.bind(null,n,i,t),[t]),i.getSnapshot!==e||s||ti!==null&&ti.memoizedState.tag&1){if(n.flags|=2048,gf(9,gB.bind(null,n,i,r,e),void 0,null),ii===null)throw Error(be(349));Hl&30||mB(n,e,r)}return r}function mB(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=yn.updateQueue,e===null?(e={lastEffect:null,stores:null},yn.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function gB(t,e,n,i){e.value=n,e.getSnapshot=i,yB(e)&&xB(t)}function vB(t,e,n){return n(function(){yB(e)&&xB(t)})}function yB(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!hs(t,n)}catch{return!0}}function xB(t){var e=_o(t,1);e!==null&&us(e,t,1,-1)}function zT(t){var e=bs();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mf,lastRenderedState:t},e.queue=t,t=t.dispatch=h5.bind(null,yn,t),[e.memoizedState,t]}function gf(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},e=yn.updateQueue,e===null?(e={lastEffect:null,stores:null},yn.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t)),t}function _B(){return jr().memoizedState}function qg(t,e,n,i){var r=bs();yn.flags|=t,r.memoizedState=gf(1|e,n,void 0,i===void 0?null:i)}function zv(t,e,n,i){var r=jr();i=i===void 0?null:i;var s=void 0;if(Gn!==null){var o=Gn.memoizedState;if(s=o.destroy,i!==null&&_w(i,o.deps)){r.memoizedState=gf(e,n,s,i);return}}yn.flags|=t,r.memoizedState=gf(1|e,n,s,i)}
vendor: 7,933 bytes, lines 38-40
38function HT(t,e){return qg(8390656,8,t,e)}function ww(t,e){return zv(2048,8,t,e)}function AB(t,e){return zv(4,2,t,e)}function SB(t,e){return zv(4,4,t,e)}function wB(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function MB(t,e,n){return n=n!=null?n.concat([t]):null,zv(4,4,wB.bind(null,e,t),n)}function Mw(){}function EB(t,e){var n=jr();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&_w(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function CB(t,e){var n=jr();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&_w(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function TB(t,e,n){return Hl&21?(hs(n,e)||(n=B3(),yn.lanes|=n,Gl|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,qi=!0),t.memoizedState=n)}function u5(t,e){var n=qt;qt=n!==0&&4>n?n:4,t(!0);var i=v_.transition;v_.transition={};try{t(!1),e()}finally{qt=n,v_.transition=i}}function bB(){return jr().memoizedState}function d5(t,e,n){var i=da(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},RB(t))PB(e,n);else if(n=uB(t,e,n,i),n!==null){var r=Oi();us(n,t,i,r),IB(n,e,i)}}function h5(t,e,n){var i=da(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(RB(t))PB(e,r);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,hs(a,o)){var l=e.interleaved;l===null?(r.next=r,mw(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=uB(t,e,r,i),n!==null&&(r=Oi(),us(n,t,i,r),IB(n,e,i))}}function RB(t){var e=t.alternate;return t===yn||e!==null&&e===yn}function PB(t,e){Lh=T0=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function IB(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,tw(t,n)}}var b0={readContext:Vr,useCallback:vi,useContext:vi,useEffect:vi,useImperativeHandle:vi,useInsertionEffect:vi,useLayoutEffect:vi,useMemo:vi,useReducer:vi,useRef:vi,useState:vi,useDebugValue:vi,useDeferredValue:vi,useTransition:vi,useMutableSource:vi,useSyncExternalStore:vi,useId:vi,unstable_isNewReconciler:!1},f5={readContext:Vr,useCallback:function(t,e){return bs().memoizedState=[t,e===void 0?null:e],t},useContext:Vr,useEffect:HT,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,qg(4194308,4,wB.bind(null,e,t),n)},useLayoutEffect:function(t,e){return qg(4194308,4,t,e)},useInsertionEffect:function(t,e){return qg(4,2,t,e)},useMemo:function(t,e){var n=bs();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=bs();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=d5.bind(null,yn,t),[i.memoizedState,t]},useRef:function(t){var e=bs();return t={current:t},e.memoizedState=t},useState:zT,useDebugValue:Mw,useDeferredValue:function(t){return bs().memoizedState=t},useTransition:function(){var t=zT(!1),e=t[0];return t=u5.bind(null,t[1]),bs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=yn,r=bs();if(fn){if(n===void 0)throw Error(be(407));n=n()}else{if(n=e(),ii===null)throw Error(be(349));Hl&30||mB(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,HT(vB.bind(null,i,s,t),[t]),i.flags|=2048,gf(9,gB.bind(null,i,s,n,e),void 0,null),n},useId:function(){var t=bs(),e=ii.identifierPrefix;if(fn){var n=oo,i=so;n=(i&~(1<<32-cs(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=pf++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=c5++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},p5={readContext:Vr,useCallback:EB,useContext:Vr,useEffect:ww,useImperativeHandle:MB,useInsertionEffect:AB,useLayoutEffect:SB,useMemo:CB,useReducer:y_,useRef:_B,useState:function(){return y_(mf)},useDebugValue:Mw,useDeferredValue:function(t){var e=jr();return TB(e,Gn.memoizedState,t)},useTransition:function(){var t=y_(mf)[0],e=jr().memoizedState;return[t,e]},useMutableSource:fB,useSyncExternalStore:pB,useId:bB,unstable_isNewReconciler:!1},m5={readContext:Vr,useCallback:EB,useContext:Vr,useEffect:ww,useImperativeHandle:MB,useInsertionEffect:AB,useLayoutEffect:SB,useMemo:CB,useReducer:x_,useRef:_B,useState:function(){return x_(mf)},useDebugValue:Mw,useDeferredValue:function(t){var e=jr();return Gn===null?e.memoizedState=t:TB(e,Gn.memoizedState,t)},useTransition:function(){var t=x_(mf)[0],e=jr().memoizedState;return[t,e]},useMutableSource:fB,useSyncExternalStore:pB,useId:bB,unstable_isNewReconciler:!1};function ns(t,e){if(t&&t.defaultProps){e=_n({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function wA(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:_n({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Hv={isMounted:function(t){return(t=t._reactInternals)?tc(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=Oi(),r=da(t),s=uo(i,r);s.payload=e,n!=null&&(s.callback=n),e=ca(t,s,r),e!==null&&(us(e,t,r,i),Jg(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=Oi(),r=da(t),s=uo(i,r);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=ca(t,s,r),e!==null&&(us(e,t,r,i),Jg(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Oi(),i=da(t),r=uo(n,i);r.tag=2,e!=null&&(r.callback=e),e=ca(t,r,i),e!==null&&(us(e,t,i,n),Jg(e,t,i))}};function GT(t,e,n,i,r,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,s,o):e.prototype&&e.prototype.isPureReactComponent?!lf(n,i)||!lf(r,s):!0}function BB(t,e,n){var i=!1,r=va,s=e.contextType;return typeof s=="object"&&s!==null?s=Vr(s):(r=Zi(e)?Ul:bi.current,i=e.contextTypes,s=(i=i!=null)?Uu(t,r):va),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Hv,t.stateNode=e,e._reactInternals=t,i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function VT(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&Hv.enqueueReplaceState(e,e.state,null)}function MA(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},gw(t);var s=e.contextType;typeof s=="object"&&s!==null?r.context=Vr(s):(s=Zi(e)?Ul:bi.current,r.context=Uu(t,s)),r.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(wA(t,e,s,n),r.state=t.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&&Hv.enqueueReplaceState(r,r.state,null),E0(t,n,r,i),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308)}function Vu(t,e){try{var n="",i=e;do n+=VU(i),i=i.return;while(i);var r=n}catch(s){r=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:t,source:e,stack:r,digest:null}}function __(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function EA(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var g5=typeof WeakMap=="function"?WeakMap:Map;function LB(t,e,n){n=uo(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){P0||(P0=!0,NA=i),EA(t,e)},n}function DB(t,e,n){n=uo(-1,n),n.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){EA(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){EA(t,e),t
vendor: 10,402 bytes, line 40
40ypeof i!="function"&&(ua===null?ua=new Set([this]):ua.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function jT(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new g5;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=P5.bind(null,t,e,n),e.then(t,t))}function WT(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function XT(t,e,n,i,r){return t.mode&1?(t.flags|=65536,t.lanes=r,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=uo(-1,1),e.tag=2,ca(n,e,1))),n.lanes|=1),t)}var v5=To.ReactCurrentOwner,qi=!1;function Ni(t,e,n,i){e.child=t===null?cB(e,null,n,i):Hu(e,t.child,n,i)}function JT(t,e,n,i,r){n=n.render;var s=e.ref;return Ru(e,r),i=Aw(t,e,n,i,s,r),n=Sw(),t!==null&&!qi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Ao(t,e,r)):(fn&&n&&cw(e),e.flags|=1,Ni(t,e,i,r),e.child)}function KT(t,e,n,i,r){if(t===null){var s=n.type;return typeof s=="function"&&!Bw(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,NB(t,e,s,i,r)):(t=$g(n.type,null,i,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&r)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:lf,n(o,i)&&t.ref===e.ref)return Ao(t,e,r)}return e.flags|=1,t=ha(s,i),t.ref=e.ref,t.return=e,e.child=t}function NB(t,e,n,i,r){if(t!==null){var s=t.memoizedProps;if(lf(s,i)&&t.ref===e.ref)if(qi=!1,e.pendingProps=i=s,(t.lanes&r)!==0)t.flags&131072&&(qi=!0);else return e.lanes=t.lanes,Ao(t,e,r)}return CA(t,e,n,i,r)}function FB(t,e,n){var i=e.pendingProps,r=i.children,s=t!==null?t.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},on(fu,lr),lr|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,on(fu,lr),lr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:n,on(fu,lr),lr|=i}else s!==null?(i=s.baseLanes|n,e.memoizedState=null):i=n,on(fu,lr),lr|=i;return Ni(t,e,r,n),e.child}function kB(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function CA(t,e,n,i,r){var s=Zi(n)?Ul:bi.current;return s=Uu(e,s),Ru(e,r),n=Aw(t,e,n,i,s,r),i=Sw(),t!==null&&!qi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Ao(t,e,r)):(fn&&i&&cw(e),e.flags|=1,Ni(t,e,n,r),e.child)}function qT(t,e,n,i,r){if(Zi(n)){var s=!0;_0(e)}else s=!1;if(Ru(e,r),e.stateNode===null)Qg(t,e),BB(e,n,i),MA(e,n,i,r),i=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Vr(c):(c=Zi(n)?Ul:bi.current,c=Uu(e,c));var h=n.getDerivedStateFromProps,f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==c)&&VT(e,o,i,c),Yo=!1;var p=e.memoizedState;o.state=p,E0(e,i,o,r),l=e.memoizedState,a!==i||p!==l||Yi.current||Yo?(typeof h=="function"&&(wA(e,n,h,i),l=e.memoizedState),(a=Yo||GT(e,n,a,i,p,l,c))?(f||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=i,e.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,dB(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:ns(e.type,a),o.props=c,f=e.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Vr(l):(l=Zi(n)?Ul:bi.current,l=Uu(e,l));var m=n.getDerivedStateFromProps;(h=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||p!==l)&&VT(e,o,i,l),Yo=!1,p=e.memoizedState,o.state=p,E0(e,i,o,r);var v=e.memoizedState;a!==f||p!==v||Yi.current||Yo?(typeof m=="function"&&(wA(e,n,m,i),v=e.memoizedState),(c=Yo||GT(e,n,c,i,p,v,l)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=v),o.props=i,o.state=v,o.context=l,i=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),i=!1)}return TA(t,e,n,i,s,r)}function TA(t,e,n,i,r,s){kB(t,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&DT(e,n,!1),Ao(t,e,s);i=e.stateNode,v5.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&o?(e.child=Hu(e,t.child,null,s),e.child=Hu(e,null,a,s)):Ni(t,e,a,s),e.memoizedState=i.state,r&&DT(e,n,!0),e.child}function OB(t){var e=t.stateNode;e.pendingContext?LT(t,e.pendingContext,e.pendingContext!==e.context):e.context&&LT(t,e.context,!1),vw(t,e.containerInfo)}function QT(t,e,n,i,r){return zu(),dw(r),e.flags|=256,Ni(t,e,n,i),e.child}var bA={dehydrated:null,treeContext:null,retryLane:0};function RA(t){return{baseLanes:t,cachePool:null,transitions:null}}function UB(t,e,n){var i=e.pendingProps,r=mn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(r|=1),on(mn,r&1),t===null)return AA(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,t=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=jv(o,i,0,null),t=bl(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=RA(n),e.memoizedState=bA,t):Ew(e,o));if(r=t.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return y5(t,e,o,i,a,r,n);if(s){s=i.fallback,o=e.mode,r=t.child,a=r.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=l,e.deletions=null):(i=ha(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=ha(a,s):(s=bl(s,o,n,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=t.child.memoizedState,o=o===null?RA(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=bA,i}return s=t.child,t=s.sibling,i=ha(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=n),i.return=e,i.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function Ew(t,e){return e=jv({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Bm(t,e,n,i){return i!==null&&dw(i),Hu(e,t.child,null,n),t=Ew(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function y5(t,e,n,i,r,s,o){if(n)return e.flags&256?(e.flags&=-257,i=__(Error(be(422))),Bm(t,e,o,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=jv({mode:"visible",children:i.children},r,0,null),s=bl(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Hu(e,t.child,null,o),e.child.memoizedState=RA(o),e.memoizedState=bA,s);if(!(e.mode&1))return Bm(t,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(be(419)),i=__(s,i,void 0),Bm(t,e,o,i)}if(a=(o&t.childLanes)!==0,qi||a){if(i=ii,i!==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&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,_o(t,r),us(i,t,r,-1))}return Iw(),i=__(Error(be(421))),Bm(t,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=I5.bind(null,t),r._reactRetry=e,null):(t=s.treeContext,ur=la(r.nextSibling),pr=e,fn=!0,os=null,t!==null&&(Fr[kr++]=so,Fr[kr++]=oo,Fr[kr++]=zl,so=t.id,oo=t.overflow,zl=e),e=Ew(e,i.children),e.flags|=4096,e)}function YT(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),SA(t.return,e,n)}function A_(t,e,n,i,r){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function zB(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(Ni(t,e,i.children,n),i=mn.current,i&2)i=i&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&YT(t,n,e);else if(t.tag===19)YT(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(on(mn,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&C0(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),A_(e,!1,r,n,s);break;case"backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&C0(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}A_(e,!0,n,null,s);break;case"together":A_(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Qg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 4,840 bytes, line 40
40function Ao(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Gl|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(be(153));if(e.child!==null){for(t=e.child,n=ha(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ha(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function x5(t,e,n){switch(e.tag){case 3:OB(e),zu();break;case 5:hB(e);break;case 1:Zi(e.type)&&_0(e);break;case 4:vw(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;on(w0,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(on(mn,mn.current&1),e.flags|=128,null):n&e.child.childLanes?UB(t,e,n):(on(mn,mn.current&1),t=Ao(t,e,n),t!==null?t.sibling:null);on(mn,mn.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return zB(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),on(mn,mn.current),i)break;return null;case 22:case 23:return e.lanes=0,FB(t,e,n)}return Ao(t,e,n)}var HB,PA,GB,VB;HB=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};PA=function(){};GB=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,vl(Bs.current);var s=null;switch(n){case"input":r=Z1(t,r),i=Z1(t,i),s=[];break;case"select":r=_n({},r,{value:void 0}),i=_n({},i,{value:void 0}),s=[];break;case"textarea":r=tA(t,r),i=tA(t,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=y0)}iA(n,i);var o;n=null;for(c in r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var a=r[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ef.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in i){var l=i[c];if(a=r!=null?r[c]:void 0,i.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=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"&&(ef.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&cn("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};VB=function(t,e,n,i){n!==i&&(e.flags|=4)};function Xd(t,e){if(!fn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function yi(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function _5(t,e,n){var i=e.pendingProps;switch(uw(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yi(e),null;case 1:return Zi(e.type)&&x0(),yi(e),null;case 3:return i=e.stateNode,Gu(),dn(Yi),dn(bi),xw(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Pm(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,os!==null&&(OA(os),os=null))),PA(t,e),yi(e),null;case 5:yw(e);var r=vl(ff.current);if(n=e.type,t!==null&&e.stateNode!=null)GB(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(be(166));return yi(e),null}if(t=vl(Bs.current),Pm(e)){i=e.stateNode,n=e.type;var s=e.memoizedProps;switch(i[Rs]=e,i[df]=s,t=(e.mode&1)!==0,n){case"dialog":cn("cancel",i),cn("close",i);break;case"iframe":case"object":case"embed":cn("load",i);break;case"video":case"audio":for(r=0;r<Sh.length;r++)cn(Sh[r],i);break;case"source":cn("error",i);break;case"img":case"image":case"link":cn("error",i),cn("load",i);break;case"details":cn("toggle",i);break;case"input":oT(i,s),cn("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},cn("invalid",i);break;case"textarea":lT(i,s),cn("invalid",i)}
vendor: 6,163 bytes, line 40
40iA(n,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?i.textContent!==a&&(s.suppressHydrationWarning!==!0&&Rm(i.textContent,a,t),r=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Rm(i.textContent,a,t),r=["children",""+a]):ef.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&cn("scroll",i)}switch(n){case"input":Am(i),aT(i,s,!0);break;case"textarea":Am(i),cT(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=y0)}i=r,e.updateQueue=i,i!==null&&(e.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=v3(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=o.createElement(n,{is:i.is}):(t=o.createElement(n),n==="select"&&(o=t,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):t=o.createElementNS(t,n),t[Rs]=e,t[df]=i,HB(t,e,!1,!1),e.stateNode=t;e:{switch(o=rA(n,i),n){case"dialog":cn("cancel",t),cn("close",t),r=i;break;case"iframe":case"object":case"embed":cn("load",t),r=i;break;case"video":case"audio":for(r=0;r<Sh.length;r++)cn(Sh[r],t);r=i;break;case"source":cn("error",t),r=i;break;case"img":case"image":case"link":cn("error",t),cn("load",t),r=i;break;case"details":cn("toggle",t),r=i;break;case"input":oT(t,i),r=Z1(t,i),cn("invalid",t);break;case"option":r=i;break;case"select":t._wrapperState={wasMultiple:!!i.multiple},r=_n({},i,{value:void 0}),cn("invalid",t);break;case"textarea":lT(t,i),r=tA(t,i),cn("invalid",t);break;default:r=i}iA(n,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?_3(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&y3(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&tf(t,l):typeof l=="number"&&tf(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ef.hasOwnProperty(s)?l!=null&&s==="onScroll"&&cn("scroll",t):l!=null&&qS(t,s,l,o))}switch(n){case"input":Am(t),aT(t,i,!1);break;case"textarea":Am(t),cT(t);break;case"option":i.value!=null&&t.setAttribute("value",""+ga(i.value));break;case"select":t.multiple=!!i.multiple,s=i.value,s!=null?Eu(t,!!i.multiple,s,!1):i.defaultValue!=null&&Eu(t,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(t.onclick=y0)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return yi(e),null;case 6:if(t&&e.stateNode!=null)VB(t,e,t.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(be(166));if(n=vl(ff.current),vl(Bs.current),Pm(e)){if(i=e.stateNode,n=e.memoizedProps,i[Rs]=e,(s=i.nodeValue!==n)&&(t=pr,t!==null))switch(t.tag){case 3:Rm(i.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Rm(i.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Rs]=e,e.stateNode=i}return yi(e),null;case 13:if(dn(mn),i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(fn&&ur!==null&&e.mode&1&&!(e.flags&128))aB(),zu(),e.flags|=98560,s=!1;else if(s=Pm(e),i!==null&&i.dehydrated!==null){if(t===null){if(!s)throw Error(be(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(be(317));s[Rs]=e}else zu(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;yi(e),s=!1}else os!==null&&(OA(os),os=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(i=i!==null,i!==(t!==null&&t.memoizedState!==null)&&i&&(e.child.flags|=8192,e.mode&1&&(t===null||mn.current&1?Vn===0&&(Vn=3):Iw())),e.updateQueue!==null&&(e.flags|=4),yi(e),null);case 4:return Gu(),PA(t,e),t===null&&cf(e.stateNode.containerInfo),yi(e),null;case 10:return pw(e.type._context),yi(e),null;case 17:return Zi(e.type)&&x0(),yi(e),null;case 19:if(dn(mn),s=e.memoizedState,s===null)return yi(e),null;if(i=(e.flags&128)!==0,o=s.rendering,o===null)if(i)Xd(s,!1);else{if(Vn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=C0(t),o!==null){for(e.flags|=128,Xd(s,!1),i=o.updateQueue,i!==null&&(e.updateQueue=i,e.flags|=4),e.subtreeFlags=0,i=n,n=e.child;n!==null;)s=n,t=i,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,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,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return on(mn,mn.current&1|2),e.child}t=t.sibling}s.tail!==null&&Bn()>ju&&(e.flags|=128,i=!0,Xd(s,!1),e.lanes=4194304)}else{if(!i)if(t=C0(o),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Xd(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!fn)return yi(e),null}else 2*Bn()-s.renderingStartTime>ju&&n!==1073741824&&(e.flags|=128,i=!0,Xd(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Bn(),e.sibling=null,n=mn.current,on(mn,i?n&1|2:n&1),e):(yi(e),null);case 22:case 23:return Pw(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?lr&1073741824&&(yi(e),e.subtreeFlags&6&&(e.flags|=8192)):yi(e),null;case 24:return null;case 25:return null}throw Error(be(156,e.tag))}function A5(t,e){switch(uw(e),e.tag){case 1:return Zi(e.type)&&x0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Gu(),dn(Yi),dn(bi),xw(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return yw(e),null;case 13:if(dn(mn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(be(340));zu()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return dn(mn),null;case 4:return Gu(),null;
vendor: 4,433 bytes, line 40
40case 10:return pw(e.type._context),null;case 22:case 23:return Pw(),null;case 24:return null;default:return null}}var Lm=!1,Mi=!1,S5=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function hu(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){En(t,e,i)}else n.current=null}function IA(t,e,n){try{n()}catch(i){En(t,e,i)}}var ZT=!1;function w5(t,e){if(pA=m0,t=K3(),lw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,h=0,f=t,p=null;t:for(;;){for(var m;f!==n||r!==0&&f.nodeType!==3||(a=o+r),f!==s||i!==0&&f.nodeType!==3||(l=o+i),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===t)break t;if(p===n&&++c===r&&(a=o),p===s&&++h===i&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(mA={focusedElem:t,selectionRange:n},m0=!1,Qe=e;Qe!==null;)if(e=Qe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Qe=t;else for(;Qe!==null;){e=Qe;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var S=v.memoizedProps,A=v.memoizedState,g=e.stateNode,x=g.getSnapshotBeforeUpdate(e.elementType===e.type?S:ns(e.type,S),A);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(be(163))}}catch(M){En(e,e.return,M)}if(t=e.sibling,t!==null){t.return=e.return,Qe=t;break}Qe=e.return}return v=ZT,ZT=!1,v}function Dh(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,s!==void 0&&IA(e,n,s)}r=r.next}while(r!==i)}}function Gv(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function BA(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function jB(t){var e=t.alternate;e!==null&&(t.alternate=null,jB(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Rs],delete e[df],delete e[yA],delete e[s5],delete e[o5])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function WB(t){return t.tag===5||t.tag===3||t.tag===4}function $T(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||WB(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function LA(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=y0));else if(i!==4&&(t=t.child,t!==null))for(LA(t,e,n),t=t.sibling;t!==null;)LA(t,e,n),t=t.sibling}function DA(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(DA(t,e,n),t=t.sibling;t!==null;)DA(t,e,n),t=t.sibling}var oi=null,ss=!1;function Oo(t,e,n){for(n=n.child;n!==null;)XB(t,e,n),n=n.sibling}function XB(t,e,n){if(Is&&typeof Is.onCommitFiberUnmount=="function")try{Is.onCommitFiberUnmount(Dv,n)}catch{}switch(n.tag){case 5:Mi||hu(n,e);case 6:var i=oi,r=ss;oi=null,Oo(t,e,n),oi=i,ss=r,oi!==null&&(ss?(t=oi,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):oi.removeChild(n.stateNode));break;case 18:oi!==null&&(ss?(t=oi,n=n.stateNode,t.nodeType===8?p_(t.parentNode,n):t.nodeType===1&&p_(t,n),of(t)):p_(oi,n.stateNode));break;case 4:i=oi,r=ss,oi=n.stateNode.containerInfo,ss=!0,Oo(t,e,n),oi=i,ss=r;break;case 0:case 11:case 14:case 15:if(!Mi&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&IA(n,e,o),r=r.next}
vendor: 20,842 bytes, line 40
40while(r!==i)}Oo(t,e,n);break;case 1:if(!Mi&&(hu(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){En(n,e,a)}Oo(t,e,n);break;case 21:Oo(t,e,n);break;case 22:n.mode&1?(Mi=(i=Mi)||n.memoizedState!==null,Oo(t,e,n),Mi=i):Oo(t,e,n);break;default:Oo(t,e,n)}}function e2(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new S5),e.forEach(function(i){var r=B5.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function Qr(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:oi=a.stateNode,ss=!1;break e;case 3:oi=a.stateNode.containerInfo,ss=!0;break e;case 4:oi=a.stateNode.containerInfo,ss=!0;break e}a=a.return}if(oi===null)throw Error(be(160));XB(s,o,r),oi=null,ss=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(c){En(r,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)JB(e,t),e=e.sibling}function JB(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Qr(e,t),Ts(t),i&4){try{Dh(3,t,t.return),Gv(3,t)}catch(S){En(t,t.return,S)}try{Dh(5,t,t.return)}catch(S){En(t,t.return,S)}}break;case 1:Qr(e,t),Ts(t),i&512&&n!==null&&hu(n,n.return);break;case 5:if(Qr(e,t),Ts(t),i&512&&n!==null&&hu(n,n.return),t.flags&32){var r=t.stateNode;try{tf(r,"")}catch(S){En(t,t.return,S)}}if(i&4&&(r=t.stateNode,r!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&m3(r,s),rA(a,o);var c=rA(a,s);for(o=0;o<l.length;o+=2){var h=l[o],f=l[o+1];h==="style"?_3(r,f):h==="dangerouslySetInnerHTML"?y3(r,f):h==="children"?tf(r,f):qS(r,h,f,c)}switch(a){case"input":$1(r,s);break;case"textarea":g3(r,s);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?Eu(r,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?Eu(r,!!s.multiple,s.defaultValue,!0):Eu(r,!!s.multiple,s.multiple?[]:"",!1))}r[df]=s}catch(S){En(t,t.return,S)}}break;case 6:if(Qr(e,t),Ts(t),i&4){if(t.stateNode===null)throw Error(be(162));r=t.stateNode,s=t.memoizedProps;try{r.nodeValue=s}catch(S){En(t,t.return,S)}}break;case 3:if(Qr(e,t),Ts(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{of(e.containerInfo)}catch(S){En(t,t.return,S)}break;case 4:Qr(e,t),Ts(t);break;case 13:Qr(e,t),Ts(t),r=t.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(bw=Bn())),i&4&&e2(t);break;case 22:if(h=n!==null&&n.memoizedState!==null,t.mode&1?(Mi=(c=Mi)||h,Qr(e,t),Mi=c):Qr(e,t),Ts(t),i&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!h&&t.mode&1)for(Qe=t,h=t.child;h!==null;){for(f=Qe=h;Qe!==null;){switch(p=Qe,m=p.child,p.tag){case 0:case 11:case 14:case 15:Dh(4,p,p.return);break;case 1:hu(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){i=p,n=p.return;try{e=i,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(S){En(i,n,S)}}break;case 5:hu(p,p.return);break;case 22:if(p.memoizedState!==null){n2(f);continue}}m!==null?(m.return=p,Qe=m):n2(f)}h=h.sibling}e:for(h=null,f=t;;){if(f.tag===5){if(h===null){h=f;try{r=f.stateNode,c?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=x3("display",o))}catch(S){En(t,t.return,S)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(S){En(t,t.return,S)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Qr(e,t),Ts(t),i&4&&e2(t);break;case 21:break;default:Qr(e,t),Ts(t)}}function Ts(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(WB(n)){var i=n;break e}n=n.return}throw Error(be(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(tf(r,""),i.flags&=-33);var s=$T(t);DA(t,s,r);break;case 3:case 4:var o=i.stateNode.containerInfo,a=$T(t);LA(t,a,o);break;default:throw Error(be(161))}}catch(l){En(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function M5(t,e,n){Qe=t,KB(t)}function KB(t,e,n){for(var i=(t.mode&1)!==0;Qe!==null;){var r=Qe,s=r.child;if(r.tag===22&&i){var o=r.memoizedState!==null||Lm;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||Mi;a=Lm;var c=Mi;if(Lm=o,(Mi=l)&&!c)for(Qe=r;Qe!==null;)o=Qe,l=o.child,o.tag===22&&o.memoizedState!==null?i2(r):l!==null?(l.return=o,Qe=l):i2(r);for(;s!==null;)Qe=s,KB(s),s=s.sibling;Qe=r,Lm=a,Mi=c}t2(t)}else r.subtreeFlags&8772&&s!==null?(s.return=r,Qe=s):t2(t)}}function t2(t){for(;Qe!==null;){var e=Qe;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Mi||Gv(5,e);break;case 1:var i=e.stateNode;if(e.flags&4&&!Mi)if(n===null)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:ns(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&UT(e,s,i);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}UT(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.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 h=c.memoizedState;if(h!==null){var f=h.dehydrated;f!==null&&of(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(be(163))}Mi||e.flags&512&&BA(e)}catch(p){En(e,e.return,p)}}if(e===t){Qe=null;break}if(n=e.sibling,n!==null){n.return=e.return,Qe=n;break}Qe=e.return}}function n2(t){for(;Qe!==null;){var e=Qe;if(e===t){Qe=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Qe=n;break}Qe=e.return}}function i2(t){for(;Qe!==null;){var e=Qe;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Gv(4,e)}catch(l){En(e,n,l)}break;case 1:var i=e.stateNode;if(typeof i.componentDidMount=="function"){var r=e.return;try{i.componentDidMount()}catch(l){En(e,r,l)}}var s=e.return;try{BA(e)}catch(l){En(e,s,l)}break;case 5:var o=e.return;try{BA(e)}catch(l){En(e,o,l)}}}catch(l){En(e,e.return,l)}if(e===t){Qe=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Qe=a;break}Qe=e.return}}var E5=Math.ceil,R0=To.ReactCurrentDispatcher,Cw=To.ReactCurrentOwner,Gr=To.ReactCurrentBatchConfig,Ht=0,ii=null,On=null,ci=0,lr=0,fu=Ma(0),Vn=0,vf=null,Gl=0,Vv=0,Tw=0,Nh=null,Ji=null,bw=0,ju=1/0,$s=null,P0=!1,NA=null,ua=null,Dm=!1,na=null,I0=0,Fh=0,FA=null,Yg=-1,Zg=0;function Oi(){return Ht&6?Bn():Yg!==-1?Yg:Yg=Bn()}function da(t){return t.mode&1?Ht&2&&ci!==0?ci&-ci:l5.transition!==null?(Zg===0&&(Zg=B3()),Zg):(t=qt,t!==0||(t=window.event,t=t===void 0?16:U3(t.type)),t):1}function us(t,e,n,i){if(50<Fh)throw Fh=0,FA=null,Error(be(185));Jf(t,n,i),(!(Ht&2)||t!==ii)&&(t===ii&&(!(Ht&2)&&(Vv|=n),Vn===4&&$o(t,ci)),$i(t,i),n===1&&Ht===0&&!(e.mode&1)&&(ju=Bn()+500,Uv&&Ea()))}function $i(t,e){var n=t.callbackNode;l4(t,e);var i=p0(t,t===ii?ci:0);if(i===0)n!==null&&hT(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(n!=null&&hT(n),e===1)t.tag===0?a5(r2.bind(null,t)):rB(r2.bind(null,t)),i5(function(){!(Ht&6)&&Ea()}),n=null;else{switch(L3(i)){case 1:n=ew;break;case 4:n=P3;break;case 16:n=f0;break;case 536870912:n=I3;break;default:n=f0}n=nL(n,qB.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function qB(t,e){if(Yg=-1,Zg=0,Ht&6)throw Error(be(327));var n=t.callbackNode;if(Pu()&&t.callbackNode!==n)return null;var i=p0(t,t===ii?ci:0);if(i===0)return null;if(i&30||i&t.expiredLanes||e)e=B0(t,i);else{e=i;var r=Ht;Ht|=2;var s=YB();(ii!==t||ci!==e)&&($s=null,ju=Bn()+500,Tl(t,e));do try{b5();break}catch(a){QB(t,a)}while(!0);fw(),R0.current=s,Ht=r,On!==null?e=0:(ii=null,ci=0,e=Vn)}if(e!==0){if(e===2&&(r=cA(t),r!==0&&(i=r,e=kA(t,r))),e===1)throw n=vf,Tl(t,0),$o(t,i),$i(t,Bn()),n;if(e===6)$o(t,i);else{if(r=t.current.alternate,!(i&30)&&!C5(r)&&(e=B0(t,i),e===2&&(s=cA(t),s!==0&&(i=s,e=kA(t,s))),e===1))throw n=vf,Tl(t,0),$o(t,i),$i(t,Bn()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(be(345));case 2:sl(t,Ji,$s);break;case 3:if($o(t,i),(i&130023424)===i&&(e=bw+500-Bn(),10<e)){if(p0(t,0)!==0)break;if(r=t.suspendedLanes,(r&i)!==i){Oi(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=vA(sl.bind(null,t,Ji,$s),e);break}sl(t,Ji,$s);break;case 4:if($o(t,i),(i&4194240)===i)break;for(e=t.eventTimes,r=-1;0<i;){var o=31-cs(i);s=1<<o,o=e[o],o>r&&(r=o),i&=~s}if(i=r,i=Bn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*E5(i/1960))-i,10<i){t.timeoutHandle=vA(sl.bind(null,t,Ji,$s),i);break}sl(t,Ji,$s);break;case 5:sl(t,Ji,$s);break;default:throw Error(be(329))}}}return $i(t,Bn()),t.callbackNode===n?qB.bind(null,t):null}function kA(t,e){var n=Nh;return t.current.memoizedState.isDehydrated&&(Tl(t,e).flags|=256),t=B0(t,e),t!==2&&(e=Ji,Ji=n,e!==null&&OA(e)),t}function OA(t){Ji===null?Ji=t:Ji.push.apply(Ji,t)}function C5(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!hs(s(),r))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function $o(t,e){for(e&=~Tw,e&=~Vv,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-cs(e),i=1<<n;t[n]=-1,e&=~i}}function r2(t){if(Ht&6)throw Error(be(327));Pu();var e=p0(t,0);if(!(e&1))return $i(t,Bn()),null;var n=B0(t,e);if(t.tag!==0&&n===2){var i=cA(t);i!==0&&(e=i,n=kA(t,i))}if(n===1)throw n=vf,Tl(t,0),$o(t,e),$i(t,Bn()),n;if(n===6)throw Error(be(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,sl(t,Ji,$s),$i(t,Bn()),null}function Rw(t,e){var n=Ht;Ht|=1;try{return t(e)}finally{Ht=n,Ht===0&&(ju=Bn()+500,Uv&&Ea())}}function Vl(t){na!==null&&na.tag===0&&!(Ht&6)&&Pu();var e=Ht;Ht|=1;var n=Gr.transition,i=qt;try{if(Gr.transition=null,qt=1,t)return t()}finally{qt=i,Gr.transition=n,Ht=e,!(Ht&6)&&Ea()}}function Pw(){lr=fu.current,dn(fu)}function Tl(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,n5(n)),On!==null)for(n=On.return;n!==null;){var i=n;switch(uw(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&x0();break;case 3:Gu(),dn(Yi),dn(bi),xw();break;case 5:yw(i);break;case 4:Gu();break;case 13:dn(mn);break;case 19:dn(mn);break;case 10:pw(i.type._context);break;case 22:case 23:Pw()}n=n.return}if(ii=t,On=t=ha(t.current,null),ci=lr=e,Vn=0,vf=null,Tw=Vv=Gl=0,Ji=Nh=null,gl!==null){for(e=0;e<gl.length;e++)if(n=gl[e],i=n.interleaved,i!==null){n.interleaved=null;var r=i.next,s=n.pending;if(s!==null){var o=s.next;s.next=r,i.next=o}n.pending=i}gl=null}return t}function QB(t,e){do{var n=On;try{if(fw(),Kg.current=b0,T0){for(var i=yn.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}T0=!1}if(Hl=0,ti=Gn=yn=null,Lh=!1,pf=0,Cw.current=null,n===null||n.return===null){Vn=1,vf=e,On=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=ci,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,h=a,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=WT(o);if(m!==null){m.flags&=-257,XT(m,o,a,s,e),m.mode&1&&jT(s,c,e),e=m,l=c;var v=e.updateQueue;if(v===null){var S=new Set;S.add(l),e.updateQueue=S}else v.add(l);break e}else{if(!(e&1)){jT(s,c,e),Iw();break e}l=Error(be(426))}}else if(fn&&a.mode&1){var A=WT(o);if(A!==null){!(A.flags&65536)&&(A.flags|=256),XT(A,o,a,s,e),dw(Vu(l,a));break e}}s=l=Vu(l,a),Vn!==4&&(Vn=2),Nh===null?Nh=[s]:Nh.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var g=LB(s,l,e);OT(s,g);break e;case 1:a=l;var x=s.type,_=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ua===null||!ua.has(_)))){s.flags|=65536,e&=-e,s.lanes|=e;var M=DB(s,a,e);OT(s,M);break e}}s=s.return}while(s!==null)}$B(n)}catch(b){e=b,On===n&&n!==null&&(On=n=n.return);continue}break}while(!0)}function YB(){var t=R0.current;return R0.current=b0,t===null?b0:t}function Iw(){(Vn===0||Vn===3||Vn===2)&&(Vn=4),ii===null||!(Gl&268435455)&&!(Vv&268435455)||$o(ii,ci)}function B0(t,e){var n=Ht;Ht|=2;var i=YB();(ii!==t||ci!==e)&&($s=null,Tl(t,e));do try{T5();break}catch(r){QB(t,r)}while(!0);if(fw(),Ht=n,R0.current=i,On!==null)throw Error(be(261));return ii=null,ci=0,Vn}function T5(){for(;On!==null;)ZB(On)}function b5(){for(;On!==null&&!$U();)ZB(On)}function ZB(t){var e=tL(t.alternate,t,lr);t.memoizedProps=t.pendingProps,e===null?$B(t):On=e,Cw.current=null}function $B(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=A5(n,e),n!==null){n.flags&=32767,On=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Vn=6,On=null;return}}else if(n=_5(n,e,lr),n!==null){On=n;return}if(e=e.sibling,e!==null){On=e;return}On=e=t}while(e!==null);Vn===0&&(Vn=5)}function sl(t,e,n){var i=qt,r=Gr.transition;try{Gr.transition=null,qt=1,R5(t,e,n,i)}finally{Gr.transition=r,qt=i}return null}function R5(t,e,n,i){do Pu();while(na!==null);if(Ht&6)throw Error(be(327));n=t.finishedWork;var r=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(be(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(c4(t,s),t===ii&&(On=ii=null,ci=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Dm||(Dm=!0,nL(f0,function(){return Pu(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Gr.transition,Gr.transition=null;var o=qt;qt=1;var a=Ht;Ht|=4,Cw.current=null,w5(t,n),JB(n,t),q4(mA),m0=!!pA,mA=pA=null,t.current=n,M5(n),e4(),Ht=a,qt=o,Gr.transition=s}else t.current=n;if(Dm&&(Dm=!1,na=t,I0=r),s=t.pendingLanes,s===0&&(ua=null),i4(n.stateNode),$i(t,Bn()),e!==null)for(i=t.onRecoverableError,n=0;n<e.length;n++)r=e[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(P0)throw P0=!1,t=NA,NA=null,t;return I0&1&&t.tag!==0&&Pu(),s=t.pendingLanes,s&1?t===FA?Fh++:(Fh=0,FA=t):Fh=0,Ea(),null}function Pu(){if(na!==null){var t=L3(I0),e=Gr.transition,n=qt;try{if(Gr.transition=null,qt=16>t?16:t,na===null)var i=!1;else{if(t=na,na=null,I0=0,Ht&6)throw Error(be(331));var r=Ht;for(Ht|=4,Qe=t.current;Qe!==null;){var s=Qe,o=s.child;if(Qe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Qe=c;Qe!==null;){var h=Qe;switch(h.tag){case 0:case 11:case 15:Dh(8,h,s)}var f=h.child;if(f!==null)f.return=h,Qe=f;else for(;Qe!==null;){h=Qe;var p=h.sibling,m=h.return;if(jB(h),h===c){Qe=null;break}if(p!==null){p.return=m,Qe=p;break}Qe=m}}}var v=s.alternate;if(v!==null){var S=v.child;if(S!==null){v.child=null;do{var A=S.sibling;S.sibling=null,S=A}while(S!==null)}}Qe=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Qe=o;else e:for(;Qe!==null;){if(s=Qe,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Dh(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,Qe=g;break e}Qe=s.return}}var x=t.current;for(Qe=x;Qe!==null;){o=Qe;var _=o.child;if(o.subtreeFlags&2064&&_!==null)_.return=o,Qe=_;else e:for(o=x;Qe!==null;){if(a=Qe,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Gv(9,a)}}catch(b){En(a,a.return,b)}if(a===o){Qe=null;break e}var M=a.sibling;if(M!==null){M.return=a.return,Qe=M;break e}Qe=a.return}}if(Ht=r,Ea(),Is&&typeof Is.onPostCommitFiberRoot=="function")try{Is.onPostCommitFiberRoot(Dv,t)}catch{}i=!0}return i}finally{qt=n,Gr.transition=e}}return!1}function s2(t,e,n){e=Vu(n,e),e=LB(t,e,1),t=ca(t,e,1),e=Oi(),t!==null&&(Jf(t,1,e),$i(t,e))}function En(t,e,n){if(t.tag===3)s2(t,t,n);else for(;e!==null;){if(e.tag===3){s2(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ua===null||!ua.has(i))){t=Vu(n,t),t=DB(e,t,1),e=ca(e,t,1),t=Oi(),e!==null&&(Jf(e,1,t),$i(e,t));break}}e=e.return}}function P5(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),e=Oi(),t.pingedLanes|=t.suspendedLanes&n,ii===t&&(ci&n)===n&&(Vn===4||Vn===3&&(ci&130023424)===ci&&500>Bn()-bw?Tl(t,0):Tw|=n),$i(t,e)}function eL(t,e){e===0&&(t.mode&1?(e=Mm,Mm<<=1,!(Mm&130023424)&&(Mm=4194304)):e=1);var n=Oi();t=_o(t,e),t!==null&&(Jf(t,e,n),$i(t,n))}function I5(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),eL(t,n)}function B5(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(be(314))}i!==null&&i.delete(e),eL(t,n)}var tL;tL=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Yi.current)qi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return qi=!1,x5(t,e,n);qi=!!(t.flags&131072)}else qi=!1,fn&&e.flags&1048576&&sB(e,S0,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Qg(t,e),t=e.pendingProps;var r=Uu(e,bi.current);Ru(e,n),r=Aw(null,e,i,t,r,n);var s=Sw();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,Zi(i)?(s=!0,_0(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,gw(e),r.updater=Hv,e.stateNode=r,r._reactInternals=e,MA(e,i,t,n),e=TA(null,e,i,!0,s,n)):(e.tag=0,fn&&s&&cw(e),Ni(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Qg(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=D5(i),t=ns(i,t),r){case 0:e=CA(null,e,i,t,n);break e;case 1:e=qT(null,e,i,t,n);break e;case 11:e=JT(null,e,i,t,n);break e;case 14:e=KT(null,e,i,ns(i.type,t),n);break e}throw Error(be(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ns(i,r),CA(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ns(i,r),qT(t,e,i,r,n);case 3:e:{if(OB(e),t===null)throw Error(be(387));i=e.pendingProps,s=e.memoizedState,r=s.element,dB(t,e),E0(e,i,null,n);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Vu(Error(be(423)),e),e=QT(t,e,i,n,r);break e}else if(i!==r){r=Vu(Error(be(424)),e),e=QT(t,e,i,n,r);break e}else for(ur=la(e.stateNode.containerInfo.firstChild),pr=e,fn=!0,os=null,n=cB(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zu(),i===r){e=Ao(t,e,n);break e}Ni(t,e,i,n)}e=e.child}return e;case 5:return hB(e),t===null&&AA(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,o=r.children,gA(i,r)?o=null:s!==null&&gA(i,s)&&(e.flags|=32),kB(t,e),Ni(t,e,o,n),e.child;case 6:return t===null&&AA(e),null;case 13:return UB(t,e,n);case 4:return vw(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Hu(e,null,i,n):Ni(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ns(i,r),JT(t,e,i,r,n);case 7:return Ni(t,e,e.pendingProps,n),e.child;case 8:return Ni(t,e,e.pendingProps.children,n),e.child;case 12:return Ni(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,on(w0,i._currentValue),i._currentValue=o,s!==null)if(hs(s.value,o)){if(s.children===r.children&&!Yi.current){e=Ao(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=uo(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),SA(s.return,n,e),a.lanes|=n;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(be(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),SA(o,n,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}Ni(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Ru(e,n),r=Vr(r),i=i(r),e.flags|=1,Ni(t,e,i,n),e.child;case 14:return i=e.type,r=ns(i,e.pendingProps),r=ns(i.type,r),KT(t,e,i,r,n);
vendor: 7,989 bytes, line 40
40case 15:return NB(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ns(i,r),Qg(t,e),e.tag=1,Zi(i)?(t=!0,_0(e)):t=!1,Ru(e,n),BB(e,i,r),MA(e,i,r,n),TA(null,e,i,!0,t,n);case 19:return zB(t,e,n);case 22:return FB(t,e,n)}throw Error(be(156,e.tag))};function nL(t,e){return R3(t,e)}function L5(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(t,e,n,i){return new L5(t,e,n,i)}function Bw(t){return t=t.prototype,!(!t||!t.isReactComponent)}function D5(t){if(typeof t=="function")return Bw(t)?1:0;if(t!=null){if(t=t.$$typeof,t===YS)return 11;if(t===ZS)return 14}return 2}function ha(t,e){var n=t.alternate;return n===null?(n=Ur(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function $g(t,e,n,i,r,s){var o=2;if(i=t,typeof t=="function")Bw(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case iu:return bl(n.children,r,s,e);case QS:o=8,r|=8;break;case K1:return t=Ur(12,n,e,r|2),t.elementType=K1,t.lanes=s,t;case q1:return t=Ur(13,n,e,r),t.elementType=q1,t.lanes=s,t;case Q1:return t=Ur(19,n,e,r),t.elementType=Q1,t.lanes=s,t;case h3:return jv(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case u3:o=10;break e;case d3:o=9;break e;case YS:o=11;break e;case ZS:o=14;break e;case Qo:o=16,i=null;break e}throw Error(be(130,t==null?t:typeof t,""))}return e=Ur(o,n,e,r),e.elementType=t,e.type=i,e.lanes=s,e}function bl(t,e,n,i){return t=Ur(7,t,i,e),t.lanes=n,t}function jv(t,e,n,i){return t=Ur(22,t,i,e),t.elementType=h3,t.lanes=n,t.stateNode={isHidden:!1},t}function S_(t,e,n){return t=Ur(6,t,null,e),t.lanes=n,t}function w_(t,e,n){return e=Ur(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function N5(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=i_(0),this.expirationTimes=i_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=i_(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Lw(t,e,n,i,r,s,o,a,l){return t=new N5(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ur(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gw(s),t}function F5(t,e,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:nu,key:i==null?null:""+i,children:t,containerInfo:e,implementation:n}}function iL(t){if(!t)return va;t=t._reactInternals;e:{if(tc(t)!==t||t.tag!==1)throw Error(be(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Zi(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(be(171))}if(t.tag===1){var n=t.type;if(Zi(n))return iB(t,n,e)}return e}function rL(t,e,n,i,r,s,o,a,l){return t=Lw(n,i,!0,t,r,s,o,a,l),t.context=iL(null),n=t.current,i=Oi(),r=da(n),s=uo(i,r),s.callback=e??null,ca(n,s,r),t.current.lanes=r,Jf(t,r,i),$i(t,i),t}function Wv(t,e,n,i){var r=e.current,s=Oi(),o=da(r);return n=iL(n),e.context===null?e.context=n:e.pendingContext=n,e=uo(s,o),e.payload={element:t},i=i===void 0?null:i,i!==null&&(e.callback=i),t=ca(r,e,o),t!==null&&(us(t,r,o,s),Jg(t,r,o)),o}function L0(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function o2(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Dw(t,e){o2(t,e),(t=t.alternate)&&o2(t,e)}function k5(){return null}var sL=typeof reportError=="function"?reportError:function(t){console.error(t)};function Nw(t){this._internalRoot=t}Xv.prototype.render=Nw.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(be(409));Wv(t,e,null,null)};Xv.prototype.unmount=Nw.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Vl(function(){Wv(null,t,null,null)}),e[xo]=null}};function Xv(t){this._internalRoot=t}Xv.prototype.unstable_scheduleHydration=function(t){if(t){var e=F3();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Zo.length&&e!==0&&e<Zo[n].priority;n++);Zo.splice(n,0,t),n===0&&O3(t)}};function Fw(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Jv(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function a2(){}function O5(t,e,n,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var c=L0(o);s.call(c)}}var o=rL(e,i,t,0,null,!1,!1,"",a2);return t._reactRootContainer=o,t[xo]=o.current,cf(t.nodeType===8?t.parentNode:t),Vl(),o}for(;r=t.lastChild;)t.removeChild(r);if(typeof i=="function"){var a=i;i=function(){var c=L0(l);a.call(c)}}var l=Lw(t,0,!1,null,null,!1,!1,"",a2);return t._reactRootContainer=l,t[xo]=l.current,cf(t.nodeType===8?t.parentNode:t),Vl(function(){Wv(e,l,n,i)}),l}function Kv(t,e,n,i,r){var s=n._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var a=r;r=function(){var l=L0(o);a.call(l)}}Wv(e,o,t,r)}else o=O5(n,e,t,r,i);return L0(o)}D3=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Ah(e.pendingLanes);n!==0&&(tw(e,n|1),$i(e,Bn()),!(Ht&6)&&(ju=Bn()+500,Ea()))}break;case 13:Vl(function(){var i=_o(t,1);if(i!==null){var r=Oi();us(i,t,1,r)}}),Dw(t,1)}};nw=function(t){if(t.tag===13){var e=_o(t,134217728);if(e!==null){var n=Oi();us(e,t,134217728,n)}Dw(t,134217728)}};N3=function(t){if(t.tag===13){var e=da(t),n=_o(t,e);if(n!==null){var i=Oi();us(n,t,e,i)}Dw(t,e)}};F3=function(){return qt};k3=function(t,e){var n=qt;try{return qt=t,e()}finally{qt=n}};oA=function(t,e,n){switch(e){case"input":if($1(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var r=Ov(i);if(!r)throw Error(be(90));p3(i),$1(i,r)}}}break;case"textarea":g3(t,n);break;case"select":e=n.value,e!=null&&Eu(t,!!n.multiple,e,!1)}};w3=Rw;M3=Vl;var U5={usingClientEntryPoint:!1,Events:[qf,au,Ov,A3,S3,Rw]},Jd={findFiberByHostInstance:ml,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},z5={bundleType:Jd.bundleType,version:Jd.version,rendererPackageName:Jd.rendererPackageName,rendererConfig:Jd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:To.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=T3(t),t===null?null:t.stateNode},findFiberByHostInstance:Jd.findFiberByHostInstance||k5,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 Nm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nm.isDisabled&&Nm.supportsFiber)try{Dv=Nm.inject(z5),Is=Nm}catch{}}xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U5;xr.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fw(e))throw Error(be(200));return F5(t,e,null,n)};xr.createRoot=function(t,e){if(!Fw(t))throw Error(be(299));var n=!1,i="",r=sL;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=Lw(t,1,!1,null,null,n,!1,i,r),t[xo]=e.current,cf(t.nodeType===8?t.parentNode:t),new Nw(e)};xr.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(be(188)):(t=Object.keys(t).join(","),Error(be(268,t)));return t=T3(e),t=t===null?null:t.stateNode,t};xr.flushSync=function(t){return Vl(t)};xr.hydrate=function(t,e,n){if(!Jv(e))throw Error(be(200));return Kv(null,t,e,!0,n)};xr.hydrateRoot=function(t,e,n){if(!Fw(t))throw Error(be(405));var i=n!=null&&n.hydratedSources||null,r=!1,s="",o=sL;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=rL(e,null,t,1,n??null,r,!1,s,o),t[xo]=e.current,cf(t),i)for(t=0;t<i.length;t++)n=i[t],r=n._getVersion,r=r(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,r]:e.mutableSourceEagerHydrationData.push(n,r);return new Xv(e)};xr.render=function(t,e,n){if(!Jv(e))throw Error(be(200));return Kv(null,t,e,!1,n)};xr.unmountComponentAtNode=function(t){if(!Jv(t))throw Error(be(40));return t._reactRootContainer?(Vl(function(){Kv(null,null,t,!1,function(){t._reactRootContainer=null,t[xo]=null})}),!0):!1};xr.unstable_batchedUpdates=Rw;xr.unstable_renderSubtreeIntoContainer=function(t,e,n,i){if(!Jv(n))throw Error(be(200));if(t==null||t._reactInternals===void 0)throw Error(be(38));return Kv(t,e,n,!1,i)};xr.version="18.3.1-next-f1338f8080-20240426";function oL(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oL)}catch(t){console.error(t)}}oL(),o3.exports=xr;var aL=o3.exports,lL,l2=aL;lL=X1.createRoot=l2.createRoot,X1.hydrateRoot=l2.hydrateRoot;var H5="@vercel/analytics",G5="1.3.1",V5=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function cL(){return typeof window<"u"}function uL(){try{const t="production"}catch{}return"production"}function j5(t="auto"){if(t==="auto"){window.vam=uL();return}window.vam=t}function W5(){return(cL()?window.vam:uL())||"production"}function M_(){return W5()==="development"}var X5="https://va.vercel-scripts.com/v1/script.debug.js",J5="/_vercel/insights/script.js";function K5(t={debug:!0}){var e;if(!cL())return;j5(t.mode),V5(),t.beforeSend&&((e=window.va)==null||e.call(window,"beforeSend",t.beforeSend));const n=t.scriptSrc||(M_()?X5:J5);if(document.head.querySelector(`script[src*="${n}"]`))return;const i=document.createElement("script");i.src=n,i.defer=!0,i.dataset.sdkn=H5+(t.framework?`/${t.framework}`:""),i.dataset.sdkv=G5,t.disableAutoTrack&&(i.dataset.disableAutoTrack="1"),t.endpoint&&(i.dataset.endpoint=t.endpoint),t.dsn&&(i.dataset.dsn=t.dsn),i.onerror=()=>{const r=M_()?"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 ${n}. ${r}`)},M_()&&t.debug===!1&&(i.dataset.debug="false"),document.head.appendChild(i)}function q5({route:t,path:e}){var n;(n=window.va)==null||n.call(window,"pageview",{route:t,path:e})}function Q5(t){return z.useEffect(()=>{K5({framework:t.framework||"react",...t.route!==void 0&&{disableAutoTrack:!0},...t})},[]),z.useEffect(()=>{t.route&&t.path&&q5({route:t.route,path:t.path})},[t.route,t.path]),null}/**
41 * @remix-run/router v1.19.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function yf(){return yf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},yf.apply(this,arguments)}var ia;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(ia||(ia={}));const c2="popstate";function Y5(t){t===void 0&&(t={});function e(i,r){let{pathname:s,search:o,hash:a}=i.location;return UA("",{pathname:s,search:o,hash:a},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:D0(r)}return $5(e,n,null,t)}function Un(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function dL(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Z5(){return Math.random().toString(36).substr(2,8)}function u2(t,e){return{usr:t.state,key:t.key,idx:e}}function UA(t,e,n,i){return n===void 0&&(n=null),yf({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?sd(e):e,{state:n,key:e&&e.key||i||Z5()})}function D0(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function sd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function $5(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=ia.Pop,l=null,c=h();c==null&&(c=0,o.replaceState(yf({},o.state,{idx:c}),""));function h(){return(o.state||{idx:null}).idx}function f(){a=ia.Pop;let A=h(),g=A==null?null:A-c;c=A,l&&l({action:a,location:S.location,delta:g})}function p(A,g){a=ia.Push;let x=UA(S.location,A,g);c=h()+1;let _=u2(x,c),M=S.createHref(x);try{o.pushState(_,"",M)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;r.location.assign(M)}s&&l&&l({action:a,location:S.location,delta:1})}function m(A,g){a=ia.Replace;let x=UA(S.location,A,g);c=h();let _=u2(x,c),M=S.createHref(x);o.replaceState(_,"",M),s&&l&&l({action:a,location:S.location,delta:0})}function v(A){let g=r.location.origin!=="null"?r.location.origin:r.location.href,x=typeof A=="string"?A:D0(A);return x=x.replace(/ $/,"%20"),Un(g,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,g)}let S={get action(){return a},get location(){return t(r,o)},listen(A){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(c2,f),l=A,()=>{r.removeEventListener(c2,f),l=null}},createHref(A){return e(r,A)},createURL:v,encodeLocation(A){let g=v(A);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:m,go(A){return o.go(A)}};return S}var d2;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(d2||(d2={}));function ez(t,e,n){return n===void 0&&(n="/"),tz(t,e,n,!1)}function tz(t,e,n,i){let r=typeof e=="string"?sd(e):e,s=kw(r.pathname||"/",n);if(s==null)return null;let o=hL(t);
vendor: 15,877 bytes, lines 49-67
49nz(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=fz(s);a=dz(o[l],c,i)}return a}function hL(t,e,n,i){e===void 0&&(e=[]),n===void 0&&(n=[]),i===void 0&&(i="");let r=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Un(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let c=fa([i,l.relativePath]),h=n.concat(l);s.children&&s.children.length>0&&(Un(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),hL(s.children,e,h,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:cz(c,s.index),routesMeta:h})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of fL(s.path))r(s,o,l)}),e}function fL(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=fL(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function nz(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:uz(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const iz=/^:[\w-]+$/,rz=3,sz=2,oz=1,az=10,lz=-2,h2=t=>t==="*";function cz(t,e){let n=t.split("/"),i=n.length;return n.some(h2)&&(i+=lz),e&&(i+=sz),n.filter(r=>!h2(r)).reduce((r,s)=>r+(iz.test(s)?rz:s===""?oz:az),i)}function uz(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function dz(t,e,n){let{routesMeta:i}=t,r={},s="/",o=[];for(let a=0;a<i.length;++a){let l=i[a],c=a===i.length-1,h=s==="/"?e:e.slice(s.length)||"/",f=f2({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},h),p=l.route;if(!f&&c&&n&&!i[i.length-1].route.index&&(f=f2({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},h)),!f)return null;Object.assign(r,f.params),o.push({params:r,pathname:fa([s,f.pathname]),pathnameBase:vz(fa([s,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(s=fa([s,f.pathnameBase]))}return o}function f2(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=hz(t.path,t.caseSensitive,t.end),r=e.match(n);if(!r)return null;let s=r[0],o=s.replace(/(.)\/+$/,"$1"),a=r.slice(1);return{params:i.reduce((c,h,f)=>{let{paramName:p,isOptional:m}=h;if(p==="*"){let S=a[f]||"";o=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const v=a[f];return m&&!v?c[p]=void 0:c[p]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function hz(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),dL(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function fz(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return dL(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function kw(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function pz(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?sd(t):t;return{pathname:n?n.startsWith("/")?n:mz(n,e):e,search:yz(i),hash:xz(r)}}function mz(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function E_(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function gz(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function pL(t,e){let n=gz(t);return e?n.map((i,r)=>r===n.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function mL(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=sd(t):(r=yf({},t),Un(!r.pathname||!r.pathname.includes("?"),E_("?","pathname","search",r)),Un(!r.pathname||!r.pathname.includes("#"),E_("#","pathname","hash",r)),Un(!r.search||!r.search.includes("#"),E_("#","search","hash",r)));let s=t===""||r.pathname==="",o=s?"/":r.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!i&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;r.pathname=p.join("/")}a=f>=0?e[f]:"/"}let l=pz(r,a),c=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||h)&&(l.pathname+="/"),l}const fa=t=>t.join("/").replace(/\/\/+/g,"/"),vz=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),yz=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,xz=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function _z(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const gL=["post","put","patch","delete"];new Set(gL);const Az=["get",...gL];new Set(Az);/**
50 * React Router v6.26.0
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function xf(){return xf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xf.apply(this,arguments)}const Ow=z.createContext(null),Sz=z.createContext(null),nc=z.createContext(null),qv=z.createContext(null),ic=z.createContext({outlet:null,matches:[],isDataRoute:!1}),vL=z.createContext(null);function wz(t,e){let{relative:n}=e===void 0?{}:e;Yf()||Un(!1);let{basename:i,navigator:r}=z.useContext(nc),{hash:s,pathname:o,search:a}=xL(t,{relative:n}),l=o;return i!=="/"&&(l=o==="/"?i:fa([i,o])),r.createHref({pathname:l,search:a,hash:s})}function Yf(){return z.useContext(qv)!=null}function Zf(){return Yf()||Un(!1),z.useContext(qv).location}function yL(t){z.useContext(nc).static||z.useLayoutEffect(t)}function Mz(){let{isDataRoute:t}=z.useContext(ic);return t?kz():Ez()}function Ez(){Yf()||Un(!1);let t=z.useContext(Ow),{basename:e,future:n,navigator:i}=z.useContext(nc),{matches:r}=z.useContext(ic),{pathname:s}=Zf(),o=JSON.stringify(pL(r,n.v7_relativeSplatPath)),a=z.useRef(!1);return yL(()=>{a.current=!0}),z.useCallback(function(c,h){if(h===void 0&&(h={}),!a.current)return;if(typeof c=="number"){i.go(c);return}let f=mL(c,JSON.parse(o),s,h.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:fa([e,f.pathname])),(h.replace?i.replace:i.push)(f,h.state,h)},[e,i,o,s,t])}function xL(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=z.useContext(nc),{matches:r}=z.useContext(ic),{pathname:s}=Zf(),o=JSON.stringify(pL(r,i.v7_relativeSplatPath));return z.useMemo(()=>mL(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function Cz(t,e){return Tz(t,e)}function Tz(t,e,n,i){Yf()||Un(!1);let{navigator:r}=z.useContext(nc),{matches:s}=z.useContext(ic),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Zf(),h;if(e){var f;let A=typeof e=="string"?sd(e):e;l==="/"||(f=A.pathname)!=null&&f.startsWith(l)||Un(!1),h=A}else h=c;let p=h.pathname||"/",m=p;if(l!=="/"){let A=l.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(A.length).join("/")}let v=ez(t,{pathname:m}),S=Bz(v&&v.map(A=>Object.assign({},A,{params:Object.assign({},a,A.params),pathname:fa([l,r.encodeLocation?r.encodeLocation(A.pathname).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?l:fa([l,r.encodeLocation?r.encodeLocation(A.pathnameBase).pathname:A.pathnameBase])})),s,n,i);return e&&S?z.createElement(qv.Provider,{value:{location:xf({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:ia.Pop}},S):S}function bz(){let t=Fz(),e=_z(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},e),n?z.createElement("pre",{style:r},n):null,null)}const Rz=z.createElement(bz,null);class Pz extends z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?z.createElement(ic.Provider,{value:this.props.routeContext},z.createElement(vL.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Iz(t){let{routeContext:e,match:n,children:i}=t,r=z.useContext(Ow);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),z.createElement(ic.Provider,{value:e},i)}function Bz(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=i)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(r=n)==null?void 0:r.errors;if(a!=null){let h=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);h>=0||Un(!1),o=o.slice(0,Math.min(o.length,h+1))}let l=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let h=0;h<o.length;h++){let f=o[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:p,errors:m}=n,v=f.route.loader&&p[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||v){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((h,f,p)=>{let m,v=!1,S=null,A=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,S=f.route.errorElement||Rz,l&&(c<0&&p===0?(v=!0,A=null):c===p&&(v=!0,A=f.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,p+1)),x=()=>{let _;return m?_=S:v?_=A:f.route.Component?_=z.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=h,z.createElement(Iz,{match:f,routeContext:{outlet:h,matches:g,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?z.createElement(Pz,{location:n.location,revalidation:n.revalidation,component:S,error:m,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}var _L=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(_L||{}),N0=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(N0||{});function Lz(t){let e=z.useContext(Ow);return e||Un(!1),e}function Dz(t){let e=z.useContext(Sz);return e||Un(!1),e}function Nz(t){let e=z.useContext(ic);return e||Un(!1),e}function AL(t){let e=Nz(),n=e.matches[e.matches.length-1];return n.route.id||Un(!1),n.route.id}function Fz(){var t;let e=z.useContext(vL),n=Dz(N0.UseRouteError),i=AL(N0.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function kz(){let{router:t}=Lz(_L.UseNavigateStable),e=AL(N0.UseNavigateStable),n=z.useRef(!1);return yL(()=>{n.current=!0}),z.useCallback(function(r,s){s===void 0&&(s={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,xf({fromRouteId:e},s)))},[t,e])}function ol(t){Un(!1)}function Oz(t){let{basename:e="/",children:n=null,location:i,navigationType:r=ia.Pop,navigator:s,static:o=!1,future:a}=t;Yf()&&Un(!1);let l=e.replace(/^\/*/,"/"),c=z.useMemo(()=>({basename:l,navigator:s,static:o,future:xf({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof i=="string"&&(i=sd(i));let{pathname:h="/",search:f="",hash:p="",state:m=null,key:v="default"}=i,S=z.useMemo(()=>{let A=kw(h,l);return A==null?null:{location:{pathname:A,search:f,hash:p,state:m,key:v},navigationType:r}},[l,h,f,p,m,v,r]);return S==null?null:z.createElement(nc.Provider,{value:c},z.createElement(qv.Provider,{children:n,value:S}))}function Uz(t){let{children:e,location:n}=t;return Cz(zA(e),n)}new Promise(()=>{});function zA(t,e){e===void 0&&(e=[]);let n=[];return z.Children.forEach(t,(i,r)=>{if(!z.isValidElement(i))return;let s=[...e,r];if(i.type===z.Fragment){n.push.apply(n,zA(i.props.children,s));return}i.type!==ol&&Un(!1),!i.props.index||!i.props.children||Un(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=zA(i.props.children,s)),n.push(o)}),n}/**
59 * React Router DOM v6.26.0
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function HA(){return HA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},HA.apply(this,arguments)}function zz(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,s;for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Hz(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Gz(t,e){return t.button===0&&(!e||e==="_self")&&!Hz(t)}const Vz=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],jz="6";try{window.__reactRouterVersion=jz}catch{}const Wz="startTransition",p2=PU[Wz];function Xz(t){let{basename:e,children:n,future:i,window:r}=t,s=z.useRef();s.current==null&&(s.current=Y5({window:r,v5Compat:!0}));let o=s.current,[a,l]=z.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},h=z.useCallback(f=>{c&&p2?p2(()=>l(f)):l(f)},[l,c]);return z.useLayoutEffect(()=>o.listen(h),[o,h]),z.createElement(Oz,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:i})}const Jz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Kz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jl=z.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:h,unstable_viewTransition:f}
67=e,p=zz(e,Vz),{basename:m}=z.useContext(nc),v,S=!1;if(typeof c=="string"&&Kz.test(c)&&(v=c,Jz))try{let _=new URL(window.location.href),M=c.startsWith("//")?new URL(_.protocol+c):new URL(c),b=kw(M.pathname,m);M.origin===_.origin&&b!=null?c=b+M.search+M.hash:S=!0}catch{}let A=wz(c,{relative:r}),g=qz(c,{replace:o,state:a,target:l,preventScrollReset:h,relative:r,unstable_viewTransition:f});function x(_){i&&i(_),_.defaultPrevented||g(_)}return z.createElement("a",HA({},p,{href:v||A,onClick:S||s?i:x,ref:n,target:l}))});var m2;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(m2||(m2={}));var g2;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(g2||(g2={}));function qz(t,e){let{target:n,replace:i,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,l=Mz(),c=Zf(),h=xL(t,{relative:o});return z.useCallback(f=>{if(Gz(f,n)){f.preventDefault();let p=i!==void 0?i:D0(c)===D0(h);l(t,{replace:p,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[c,l,h,i,r,n,t,s,o,a])}const Uw=({title:t,oneliner:e})=>F.jsxs("div",{className:"flex flex-col justify-center items-center",children:[F.jsx("h2",{className:"sec-title text-center text-3xl md:text-4xl",children:t}),F.jsx("h3",{className:"sec-oneliner text-center text-base md:text-xl",children:e})]}),Qz=()=>F.jsxs("section",{id:"about",className:"w-screen min-h-screen sm:h-screen flex flex-col justify-start items-center py-24 scroll-mt-24 overflow-hidden",children:[F.jsx(Uw,{title:"About Me",oneliner:"Me and My Journey"}),F.jsx("div",{className:"max-w-[70%] h-full flex flex-col justify-center items-center text-center text-base font-light",children:"I am a full-stack software engineer with a background in engineering physics, working at the intersection of AI products, SaaS platforms, event-driven backend systems, and quantum computing. About five years ago, when I first discovered Web Development and Quantum Computing, they totally amazed me, and I have been dedicating myself to them ever since through online courses, research internships, mentorship programs, open-source contributions, and shipping a lot of projects. Fast forward to today, I am a core Software Development Engineer at Goodspace AI, where I build AI-powered hiring products end-to-end. On the side, I build log0, my open-source log-intelligence and incident platform. I also mentor at Google Summer of Code and serve on the AsyncAPI Technical Steering Committee, and I contribute to the open-source quantum ecosystem across qBraid, QuEST, and the Unitary Foundation, with 600+ data structures and algorithms problems solved along the way."})]}),SL=z.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Qv=z.createContext({}),zw=z.createContext(null),Hw=typeof window<"u",Yz=Hw?z.useLayoutEffect:z.useEffect,wL=z.createContext({strict:!1}),Yv=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Zz="framerAppearId",ML="data-"+Yv(Zz),$z={skipAnimations:!1,useManualTiming:!1};function eH(t){let e=new Set,n=new Set,i=!1,r=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,h=!1,f=!1)=>{const m=f&&i?e:n;return h&&s.add(c),m.has(c)||m.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(o=c,i){r=!0;return}i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,r&&(r=!1,l.process(c))}};return l}const Fm=["read","resolveKeyframes","update","preRender","render","postRender"],tH=40;function EL(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Fm.reduce((g,x)=>(g[x]=eH(s),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:h,render:f,postRender:p}=o,m=()=>{const g=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(g-r.timestamp,tH),1),r.timestamp=g,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),h.process(r),f.process(r),p.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(m))},v=()=>{n=!0,i=!0,r.isProcessing||t(m)};return{schedule:Fm.reduce((g,x)=>{const _=o[x];return g[x]=(M,b=!1,C=!1)=>(n||v(),_.schedule(M,b,C)),g},{}),cancel:g=>{for(let x=0;x<Fm.length;x++)o[Fm[x]].cancel(g)},state:r,steps:o}}const{schedule:Gw,cancel:gne}=EL(queueMicrotask,!1);function pu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const CL=z.createContext({});let v2=!1;function nH(t,e,n,i,r){var s;const{visualElement:o}=z.useContext(Qv),a=z.useContext(wL),l=z.useContext(zw),c=z.useContext(SL).reducedMotion,h=z.useRef();i=i||a.renderer,!h.current&&i&&(h.current=i(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}
vendor: 6,645 bytes, line 67
67));const f=h.current,p=z.useContext(CL);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&rH(h.current,n,r,p),z.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[ML],v=z.useRef(!!m&&!window.MotionHandoffIsComplete&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,m)));return Yz(()=>{f&&(f.updateFeatures(),Gw.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),z.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current=!1,v2||(v2=!0,queueMicrotask(iH)))}),f}function iH(){window.MotionHandoffIsComplete=!0}function rH(t,e,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:TL(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&pu(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}function TL(t){if(t)return t.options.allowProjection!==!1?t.projection:TL(t.parent)}function sH(t,e,n){return z.useCallback(i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):pu(n)&&(n.current=i))},[e])}function _f(t){return typeof t=="string"||Array.isArray(t)}function Af(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Vw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jw=["initial",...Vw];function Zv(t){return Af(t.animate)||jw.some(e=>_f(t[e]))}function bL(t){return!!(Zv(t)||t.variants)}function oH(t,e){if(Zv(t)){const{initial:n,animate:i}=t;return{initial:n===!1||_f(n)?n:void 0,animate:_f(i)?i:void 0}}return t.inherit!==!1?e:{}}function aH(t){const{initial:e,animate:n}=oH(t,z.useContext(Qv));return z.useMemo(()=>({initial:e,animate:n}),[y2(e),y2(n)])}function y2(t){return Array.isArray(t)?t.join(" "):t}const x2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Wu={};for(const t in x2)Wu[t]={isEnabled:e=>x2[t].some(n=>!!e[n])};function lH(t){for(const e in t)Wu[e]={...Wu[e],...t[e]}}const RL=z.createContext({}),cH=Symbol.for("motionComponentSymbol"),Ti=t=>t;let GA=Ti;function uH({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&lH(t);function s(a,l){let c;const h={...z.useContext(SL),...a,layoutId:dH(a)},{isStatic:f}=h,p=aH(a),m=i(a,f);if(!f&&Hw){hH();const v=fH(h);c=v.MeasureLayout,p.visualElement=nH(r,m,h,e,v.ProjectionNode)}return F.jsxs(Qv.Provider,{value:p,children:[c&&p.visualElement?F.jsx(c,{visualElement:p.visualElement,...h}):null,n(r,a,sH(m,p.visualElement,l),m,f,p.visualElement)]})}const o=z.forwardRef(s);return o[cH]=r,o}function dH({layoutId:t}){const e=z.useContext(RL).id;return e&&t!==void 0?e+"-"+t:t}function hH(t,e){z.useContext(wL).strict}function fH(t){const{drag:e,layout:n}=Wu;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function pH(t){function e(i,r={}){return uH(t(i,r))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(i,r)=>(n.has(r)||n.set(r,e(r)),n.get(r))})}const mH=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ww(t){return typeof t!="string"||t.includes("-")?!1:!!(mH.indexOf(t)>-1||/[A-Z]/u.test(t))}const F0={};function gH(t){Object.assign(F0,t)}const $f=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ca=new Set($f);function PL(t,{layout:e,layoutId:n}){return Ca.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!F0[t]||t==="opacity")}const Ei=t=>!!(t&&t.getVelocity),IL=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ya=(t,e,n)=>n>e?e:n<t?t:n,od={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kh={...od,transform:t=>ya(0,1,t)},km={...od,default:1},Oh=t=>Math.round(t*1e5)/1e5,Xw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,vH=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,yH=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ep(t){return typeof t=="string"}function xH(t){return t==null}const tp=t=>({test:e=>ep(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),qo=tp("deg"),Ls=tp("%"),gt=tp("px"),_H=tp("vh"),AH=tp("vw"),_2={...Ls,parse:t=>Ls.parse(t)/100,transform:t=>Ls.transform(t*100)},A2={...od,transform:Math.round},Jw={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,radius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,size:gt,top:gt,right:gt,bottom:gt,left:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,rotate:qo,rotateX:qo,rotateY:qo,rotateZ:qo,scale:km,scaleX:km,scaleY:km,scaleZ:km,skew:qo,skewX:qo,skewY:qo,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:kh,originX:_2,originY:_2,originZ:gt,zIndex:A2,backgroundPositionX:gt,backgroundPositionY:gt,fillOpacity:kh,strokeOpacity:kh,numOctaves:A2},SH={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wH=$f.length;function MH(t,e,n){let i="",r=!0;for(let s=0;s<wH;s++){const o=$f[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=IL(a,Jw[o]);if(!l){r=!1;const h=SH[o]||o;i+=`${h}(${c}) `}n&&(e[o]=c)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}const BL=t=>e=>typeof e=="string"&&e.startsWith(t),LL=BL("--"),EH=BL("var(--"),Kw=t=>EH(t)?CH.test(t.split("/*")[0].trim()):!1,CH=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qw(t,e,n){const{style:i,vars:r,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const c=e[l];
vendor: 4,459 bytes, line 67
67if(Ca.has(l)){o=!0;continue}else if(LL(l)){r[l]=c;continue}else{const h=IL(c,Jw[l]);l.startsWith("origin")?(a=!0,s[l]=h):i[l]=h}}if(e.transform||(o||n?i.transform=MH(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:h=0}=s;i.transformOrigin=`${l} ${c} ${h}`}}const Qw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function DL(t,e,n){for(const i in e)!Ei(e[i])&&!PL(i,n)&&(t[i]=e[i])}function TH({transformTemplate:t},e){return z.useMemo(()=>{const n=Qw();return qw(n,e,t),Object.assign({},n.vars,n.style)},[e])}function bH(t,e){const n=t.style||{},i={};return DL(i,n,t),Object.assign(i,TH(t,e)),i}function RH(t,e){const n={},i=bH(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const PH=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function k0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||PH.has(t)}let NL=t=>!k0(t);function IH(t){t&&(NL=e=>e.startsWith("on")?!k0(e):t(e))}try{IH(require("@emotion/is-prop-valid").default)}catch{}function BH(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(NL(r)||n===!0&&k0(r)||!e&&!k0(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}function S2(t,e,n){return typeof t=="string"?t:gt.transform(e+n*t)}function LH(t,e,n){const i=S2(e,t.x,t.width),r=S2(n,t.y,t.height);return`${i} ${r}`}const DH={offset:"stroke-dashoffset",array:"stroke-dasharray"},NH={offset:"strokeDashoffset",array:"strokeDasharray"};function FH(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?DH:NH;t[s.offset]=gt.transform(-i);const o=gt.transform(e),a=gt.transform(n);t[s.array]=`${o} ${a}`}function Yw(t,{attrX:e,attrY:n,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},h,f){if(qw(t,c,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:v}=t;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=LH(v,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(p.x=e),n!==void 0&&(p.y=n),i!==void 0&&(p.scale=i),o!==void 0&&FH(p,o,a,l,!1)}const FL=()=>({...Qw(),attrs:{}}),Zw=t=>typeof t=="string"&&t.toLowerCase()==="svg";function kH(t,e,n,i){const r=z.useMemo(()=>{const s=FL();return Yw(s,e,Zw(i),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};DL(s,t.style,t),r.style={...s,...r.style}}return r}function OH(t=!1){return(n,i,r,{latestValues:s},o)=>{const l=(Ww(n)?kH:RH)(i,s,o,n),c=BH(i,typeof n=="string",t),h=n!==z.Fragment?{...c,...l,ref:r}:{},{children:f}=i,p=z.useMemo(()=>Ei(f)?f.get():f,[f]);return z.createElement(n,{...h,children:p})}}function kL(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const s in n)t.style.setProperty(s,n[s])}const OL=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function UL(t,e,n,i){kL(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(OL.has(r)?r:Yv(r),e.attrs[r])}function $w(t,e,n){var i;const{style:r}=t,s={};for(const o in r)(Ei(r[o])||e.style&&Ei(e.style[o])||PL(o,t)||((i=n==null?void 0:n.getValue(o))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(s[o]=r[o]);return n&&r&&typeof r.willChange=="string"&&(n.applyWillChange=!1),s}function zL(t,e,n){const i=$w(t,e,n);for(const r in t)if(Ei(t[r])||Ei(e[r])){const s=$f.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=t[r]}return i}function w2(t){const e=[{},{}];
67return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function eM(t,e,n,i){if(typeof e=="function"){const[r,s]=w2(i);e=e(n!==void 0?n:t.custom,r,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,s]=w2(i);e=e(n!==void 0?n:t.custom,r,s)}return e}function UH(t){const e=z.useRef(null);return e.current===null&&(e.current=t()),e.current}const VA=t=>Array.isArray(t),zH=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),HH=t=>VA(t)?t[t.length-1]||0:t;function e0(t){const e=Ei(t)?t.get():t;return zH(e)?e.toValue():e}const HL=new Set(["opacity","clipPath","filter","transform"]);function GL(t){if(Ca.has(t))return"transform";if(HL.has(t))return Yv(t)}function $v(t,e){t.indexOf(e)===-1&&t.push(e)}function ey(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function GH({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:i},r,s,o,a){const l={latestValues:jH(r,s,o,a?!1:t,e),renderState:n()};return i&&(l.mount=c=>i(r,c,l)),l}const VL=t=>(e,n)=>{const i=z.useContext(Qv),r=z.useContext(zw),s=()=>GH(t,e,i,r,n);return n?s():UH(s)};function VH(t,e){const n=GL(e);n&&$v(t,n)}function M2(t,e,n){const i=Array.isArray(e)?e:[e];for(let r=0;r<i.length;r++){const s=eM(t,i[r]);if(s){const{transitionEnd:o,transition:a,...l}=s;n(l,o)}}}function jH(t,e,n,i,r){var s;const o={},a=[],l=i&&((s=t.style)===null||s===void 0?void 0:s.willChange)===void 0,c=r(t,{});for(const A in c)o[A]=e0(c[A]);let{initial:h,animate:f}=t;const p=Zv(t),m=bL(t);e&&m&&!p&&t.inherit!==!1&&(h===void 0&&(h=e.initial),f===void 0&&(f=e.animate));let v=n?n.initial===!1:!1;v=v||h===!1;const S=v?f:h;return S&&typeof S!="boolean"&&!Af(S)&&M2(t,S,(A,g)=>{for(const x in A){let _=A[x];if(Array.isArray(_)){const M=v?_.length-1:0;_=_[M]}_!==null&&(o[x]=_)}for(const x in g)o[x]=g[x]}),l&&(f&&h!==!1&&!Af(f)&&M2(t,f,A=>{for(const g in A)VH(a,g)}),a.length&&(o.willChange=a.join(","))),o}const{schedule:Qt,cancel:So,state:ai,steps:C_}=EL(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ti,!0),WH={useVisualState:VL({scrapeMotionValuesFromProps:zL,createRenderState:FL,onMount:(t,e,{renderState:n,latestValues:i})=>{Qt.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Qt.render(()=>{Yw(n,i,Zw(e.tagName),t.transformTemplate),UL(e,n)})}})},XH={useVisualState:VL({applyWillChange:!0,scrapeMotionValuesFromProps:$w,createRenderState:Qw})};function JH(t,{forwardMotionProps:e=!1},n,i){return{...Ww(t)?WH:XH,preloadedFeatures:n,useRender:OH(e),createVisualElement:i,Component:t}}function ao(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const jL=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function ty(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const KH=t=>e=>jL(e)&&t(e,ty(e));function ho(t,e,n,i){return ao(t,e,KH(n),i)}const qH=(t,e)=>n=>e(t(n)),fo=(...t)=>t.reduce(qH);function WL(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const E2=WL("dragHorizontal"),C2=WL("dragVertical");function XL(t){let e=!1;if(t==="y")e=C2();else if(t==="x")e=E2();else{const n=E2(),i=C2();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function JL(){const t=XL(!0);return t?(t(),!1):!0}class Ta{constructor(e){this.isMounted=!1,this.node=e}update(){}}function T2(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd",r=(s,o)=>
67{if(s.pointerType==="touch"||JL())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[i];l&&Qt.postRender(()=>l(s,o))};return ho(t.current,n,r,{passive:!t.getProps()[i]})}class QH extends Ta{mount(){this.unmount=fo(T2(this.node,!0),T2(this.node,!1))}unmount(){}}class YH extends Ta{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fo(ao(this.node.current,"focus",()=>this.onFocus()),ao(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const KL=(t,e)=>e?t===e?!0:KL(t,e.parentElement):!1;function T_(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ty(n))}class ZH extends Ta{constructor(){super(...arguments),this.removeStartListeners=Ti,this.removeEndListeners=Ti,this.removeAccessibleListeners=Ti,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),s=ho(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:h,globalTapTarget:f}=this.node.getProps(),p=!f&&!KL(this.node.current,a.target)?h:c;p&&Qt.update(()=>p(a,l))},{passive:!(i.onTap||i.onPointerUp)}),o=ho(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=fo(s,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||T_("up",(l,c)=>{const{onTap:h}=this.node.getProps();h&&Qt.postRender(()=>h(l,c))})};this.removeEndListeners(),this.removeEndListeners=ao(this.node.current,"keyup",o),T_("down",(a,l)=>{this.startPress(a,l)})},n=ao(this.node.current,"keydown",e),i=()=>{this.isPressing&&T_("cancel",(s,o)=>this.cancelPress(s,o))},r=ao(this.node.current,"blur",i);this.removeAccessibleListeners=fo(n,r)}}startPress(e,n){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&Qt.postRender(()=>i(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!JL()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&Qt.postRender(()=>i(e,n))}mount(){const e=this.node.getProps(),n=ho(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=ao(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=fo(n,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const jA=new WeakMap,b_=new WeakMap,$H=t=>{const e=jA.get(t.target);e&&e(t)},eG=t=>{t.forEach($H)};function tG({root:t,...e}){const n=t||document;b_.has(n)||b_.set(n,{});const i=b_.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(eG,{root:t,...e})),i[r]}function nG(t,e,n){const i=tG(e);return jA.set(t,n),i.observe(t),()=>{jA.delete(t),i.unobserve(t)}}const iG={some:0,all:1};class rG extends Ta{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:iG[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=c?h:f;p&&p(l)};return nG(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(sG(e,n))&&this.startObserver()}unmount(){}}function sG({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const oG={inView:{Feature:rG},tap:{Feature:ZH},focus:{Feature:YH},hover:{Feature:QH}};function qL(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function ny(t,e,n){const i=t.getProps();return eM(i,e,n!==void 0?n:i.custom,t)}const po=t=>t*1e3,mo=t=>t/1e3,aG={type:"spring",stiffness:500,damping:25,restSpeed:10},lG=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),cG={type:"keyframes",duration:.8},uG={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dG=(t,{keyframes:e})=>e.length>2?cG:Ca.has(t)?t.startsWith("scale")?lG(e[1]):aG:uG;function hG({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:
vendor: 25,335 bytes, line 67
67o,repeatDelay:a,from:l,elapsed:c,...h}){return!!Object.keys(h).length}function tM(t,e){return t[e]||t.default||t}const fG=t=>t!==null;function iy(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(fG),s=e&&n!=="loop"&&e%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}let t0;function pG(){t0=void 0}const pa={now:()=>(t0===void 0&&pa.set(ai.isProcessing||$z.useManualTiming?ai.timestamp:performance.now()),t0),set:t=>{t0=t,queueMicrotask(pG)}},QL=t=>/^0[^.\s]+$/u.test(t);function mG(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||QL(t):!0}const YL=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),gG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vG(t){const e=gG.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}function ZL(t,e,n=1){const[i,r]=vG(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return YL(o)?parseFloat(o):o}return Kw(r)?ZL(r,e,n+1):r}const yG=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),b2=t=>t===od||t===gt,R2=(t,e)=>parseFloat(t.split(", ")[e]),P2=(t,e)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return R2(r[1],e);{const s=i.match(/^matrix\((.+)\)$/u);return s?R2(s[1],t):0}},xG=new Set(["x","y","z"]),_G=$f.filter(t=>!xG.has(t));function AG(t){const e=[];return _G.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Xu={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:P2(4,13),y:P2(5,14)};Xu.translateX=Xu.x;Xu.translateY=Xu.y;const $L=t=>e=>e.test(t),SG={test:t=>t==="auto",parse:t=>t},eD=[od,gt,Ls,qo,AH,_H,SG],I2=t=>eD.find($L(t)),Rl=new Set;let WA=!1,XA=!1;function tD(){if(XA){const t=Array.from(Rl).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const r=AG(i);r.length&&(n.set(i,r),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,o])=>{var a;(a=i.getValue(s))===null||a===void 0||a.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}XA=!1,WA=!1,Rl.forEach(t=>t.complete()),Rl.clear()}function nD(){Rl.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(XA=!0)})}function wG(){nD(),tD()}class nM{constructor(e,n,i,r,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Rl.add(this),WA||(WA=!0,Qt.read(nD),Qt.resolveKeyframes(tD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:r}=this;for(let s=0;s<e.length;s++)if(e[s]===null)if(s===0){const o=r==null?void 0:r.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(i&&n){const l=i.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),r&&o===void 0&&r.set(e[0])}else e[s]=e[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Rl.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Rl.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const iM=(t,e)=>n=>!!(ep(n)&&yH.test(n)&&n.startsWith(t)||e&&!xH(n)&&Object.prototype.hasOwnProperty.call(n,e)),iD=(t,e,n)=>i=>{if(!ep(i))return i;const[r,s,o,a]=i.match(Xw);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},MG=t=>ya(0,255,t),R_={...od,transform:t=>Math.round(MG(t))},yl={test:iM("rgb","red"),parse:iD("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+R_.transform(t)+", "+R_.transform(e)+", "+R_.transform(n)+", "+Oh(kh.transform(i))+")"};function EG(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const JA={test:iM("#"),parse:EG,transform:yl.transform},mu={test:iM("hsl","hue"),parse:iD("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Ls.transform(Oh(e))+", "+Ls.transform(Oh(n))+", "+Oh(kh.transform(i))+")"},wi={test:t=>yl.test(t)||JA.test(t)||mu.test(t),parse:t=>yl.test(t)?yl.parse(t):mu.test(t)?mu.parse(t):JA.parse(t),transform:t=>ep(t)?t:t.hasOwnProperty("red")?yl.transform(t):mu.transform(t)};function CG(t){var e,n;return isNaN(t)&&ep(t)&&(((e=t.match(Xw))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(vH))===null||n===void 0?void 0:n.length)||0)>0}const rD="number",sD="color",TG="var",bG="var(",B2="${}",RG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Sf(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const a=e.replace(RG,l=>(wi.test(l)?(i.color.push(s),r.push(sD),n.push(wi.parse(l))):l.startsWith(bG)?(i.var.push(s),r.push(TG),n.push(l)):(i.number.push(s),r.push(rD),n.push(parseFloat(l))),++s,B2)).split(B2);return{values:n,split:a,indexes:i,types:r}}function oD(t){return Sf(t).values}function aD(t){const{split:e,types:n}=Sf(t),i=e.length;return r=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],r[o]!==void 0){const a=n[o];a===rD?s+=Oh(r[o]):a===sD?s+=wi.transform(r[o]):s+=r[o]}return s}}const PG=t=>typeof t=="number"?0:t;function IG(t){const e=oD(t);return aD(t)(e.map(PG))}const xa={test:CG,parse:oD,createTransformer:aD,getAnimatableNone:IG},BG=new Set(["brightness","contrast","saturate","opacity"]);function LG(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(Xw)||[];if(!i)return t;const r=n.replace(i,"");let s=BG.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const DG=/\b([a-z-]*)\(.*?\)/gu,KA={...xa,getAnimatableNone:t=>{const e=t.match(DG);return e?e.map(LG).join(" "):t}},NG={...Jw,color:wi,backgroundColor:wi,outlineColor:wi,fill:wi,stroke:wi,borderColor:wi,borderTopColor:wi,borderRightColor:wi,borderBottomColor:wi,borderLeftColor:wi,filter:KA,WebkitFilter:KA},rM=t=>NG[t];function lD(t,e){let n=rM(t);return n!==KA&&(n=xa),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const FG=new Set(["auto","none","0"]);function kG(t,e,n){let i=0,r;for(;i<t.length&&!r;){const s=t[i];typeof s=="string"&&!FG.has(s)&&Sf(s).values.length&&(r=t[i]),i++}if(r&&n)for(const s of e)t[s]=lD(n,r)}class cD extends nM{constructor(e,n,i,r){super(e,n,i,r,r==null?void 0:r.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Kw(c))){const h=ZL(c,n.current);h!==void 0&&(e[l]=h),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!yG.has(i)||e.length!==2)return;const[r,s]=e,o=I2(r),a=I2(s);if(o!==a)if(b2(o)&&b2(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let r=0;r<e.length;r++)mG(e[r])&&i.push(r);i.length&&kG(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Xu[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&e.getValue(i,r).jump(r,!1)}measureEndState(){var e;const{element:n,name:i,unresolvedKeyframes:r}=this;if(!n.current)return;const s=n.getValue(i);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=Xu[i](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function uD(t){let e;return()=>(e===void 0&&(e=t()),e)}const L2=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(xa.test(t)||t==="0")&&!t.startsWith("url("));function OG(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function UG(t,e,n,i){const r=t[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=L2(r,e),a=L2(s,e);return!o||!a?!1:OG(t)||n==="spring"&&i}class dD{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&wG(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:i,type:r,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!UG(e,i,r,s))if(o)this.options.duration=0;else{l==null||l(iy(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const h=this.initPlayback(e,n);h!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function hD(t,e){return e?t*(1e3/e):0}const zG=5;function fD(t,e,n){const i=Math.max(e-zG,0);return hD(n-t(i),e-i)}const P_=.001,HG=.01,GG=10,VG=.05,jG=1;function WG({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,s,o=1-e;o=ya(VG,jG,o),t=ya(HG,GG,mo(t)),o<1?(r=c=>{const h=c*o,f=h*t,p=h-n,m=qA(c,o),v=Math.exp(-f);return P_-p/m*v},s=c=>{const f=c*o*t,p=f*n+n,m=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-f),S=qA(Math.pow(c,2),o);return(-r(c)+P_>0?-1:1)*((p-m)*v)/S}):(r=c=>{const h=Math.exp(-c*t),f=(c-n)*t+1;return-P_+h*f},s=c=>{const h=Math.exp(-c*t),f=(n-c)*(t*t);return h*f});const a=5/t,l=JG(r,s,a);if(t=po(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}const XG=12;function JG(t,e,n){let i=n;for(let r=1;r<XG;r++)i=i-t(i)/e(i);return i}function qA(t,e){return t*Math.sqrt(1-e*e)}const KG=["duration","bounce"],qG=["stiffness","damping","mass"];function D2(t,e){return e.some(n=>t[n]!==void 0)}function QG(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!D2(t,qG)&&D2(t,KG)){const n=WG(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function pD({keyframes:t,restDelta:e,restSpeed:n,...i}){const r=t[0],s=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=QG({...i,velocity:-mo(i.velocity||0)}),m=f||0,v=l/(2*Math.sqrt(a*c)),S=s-r,A=mo(Math.sqrt(a/c)),g=Math.abs(S)<5;n||(n=g?.01:2),e||(e=g?.005:.5);let x;if(v<1){const _=qA(A,v);x=M=>{const b=Math.exp(-v*A*M);return s-b*((m+v*A*S)/_*Math.sin(_*M)+S*Math.cos(_*M))}}else if(v===1)x=_=>s-Math.exp(-A*_)*(S+(m+A*S)*_);else{const _=A*Math.sqrt(v*v-1);x=M=>{const b=Math.exp(-v*A*M),C=Math.min(_*M,300);return s-b*((m+v*A*S)*Math.sinh(C)+_*S*Math.cosh(C))/_}}return{calculatedDuration:p&&h||null,next:_=>{const M=x(_);if(p)o.done=_>=h;else{let b=0;v<1&&(b=_===0?po(m):fD(x,_,M));const C=Math.abs(b)<=n,P=Math.abs(s-M)<=e;o.done=C&&P}return o.value=o.done?s:M,o}}}function N2({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:h}){const f=t[0],p={done:!1,value:f},m=B=>a!==void 0&&B<a||l!==void 0&&B>l,v=B=>a===void 0?l:l===void 0||Math.abs(a-B)<Math.abs(l-B)?a:l;let S=n*e;const A=f+S,g=o===void 0?A:o(A);g!==A&&(S=g-f);const x=B=>-S*Math.exp(-B/i),_=B=>g+x(B),M=B=>{const R=x(B),T=_(B);p.done=Math.abs(R)<=c,p.value=p.done?g:T};let b,C;const P=B=>{m(p.value)&&(b=B,C=pD({keyframes:[p.value,v(p.value)],velocity:fD(_,B,p.value),damping:r,stiffness:s,restDelta:c,restSpeed:h}))};return P(0),{calculatedDuration:null,next:B=>{let R=!1;return!C&&b===void 0&&(R=!0,M(B),P(B)),b!==void 0&&B>=b?C.next(B-b):(!R&&M(B),p)}}}const mD=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,YG=1e-7,ZG=12;function $G(t,e,n,i,r){let s,o,a=0;do o=e+(n-e)/2,s=mD(o,i,r)-t,s>0?n=o:e=o;while(Math.abs(s)>YG&&++a<ZG);return o}function np(t,e,n,i){if(t===e&&n===i)return Ti;const r=s=>$G(s,0,1,t,n);return s=>s===0||s===1?s:mD(r(s),e,i)}const e9=np(.42,0,1,1),t9=np(0,0,.58,1),gD=np(.42,0,.58,1),n9=t=>Array.isArray(t)&&typeof t[0]!="number",vD=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,yD=t=>e=>1-t(1-e),sM=t=>1-Math.sin(Math.acos(t)),xD=yD(sM),i9=vD(sM),_D=np(.33,1.53,.69,.99),oM=yD(_D),r9=vD(oM),s9=t=>(t*=2)<1?.5*oM(t):.5*(2-Math.pow(2,-10*(t-1))),F2={linear:Ti,easeIn:e9,easeInOut:gD,easeOut:t9,circIn:sM,circInOut:i9,circOut:xD,backIn:oM,backInOut:r9,backOut:_D,anticipate:s9},k2=t=>{if(Array.isArray(t)){GA(t.length===4);const[e,n,i,r]=t;return np(e,n,i,r)}else if(typeof t=="string")return GA(F2[t]!==void 0),F2[t];return t},wf=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i},gn=(t,e,n)=>t+(e-t)*n;function I_(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function o9({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let r=0,s=0,o=0;if(!e)r=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=I_(l,a,t+1/3),s=I_(l,a,t),o=I_(l,a,t-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}function O0(t,e){return n=>n>0?e:t}const B_=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},a9=[JA,yl,mu],l9=t=>a9.find(e=>e.test(t));function O2(t){const e=l9(t);if(!e)return!1;let n=e.parse(t);return e===mu&&(n=o9(n)),n}const U2=(t,e)=>{const n=O2(t),i=O2(e);if(!n||!i)return O0(t,e);const r={...n};return s=>(r.red=B_(n.red,i.red,s),r.green=B_(n.green,i.green,s),r.blue=B_(n.blue,i.blue,s),r.alpha=gn(n.alpha,i.alpha,s),yl.transform(r))},QA=new Set(["none","hidden"]);function c9(t,e){return QA.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function u9(t,e){return n=>gn(t,e,n)}function aM(t){return typeof t=="number"?u9:typeof t=="string"?Kw(t)?O0:wi.test(t)?U2:f9:Array.isArray(t)?AD:typeof t=="object"?wi.test(t)?U2:d9:O0}function AD(t,e){const n=[...t],i=n.length,r=t.map((s,o)=>aM(s)(s,e[o]));return s=>{for(let o=0;o<i;o++)n[o]=r[o](s);return n}}function d9(t,e){const n={...t,...e},i={};for(const r in n)t[r]!==void 0&&e[r]!==void 0&&(i[r]=aM(t[r])(t[r],e[r]));return r=>{for(const s in i)n[s]=i[s](r);return n}}function h9(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],a=t.indexes[o][r[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;i[s]=l,r[o]++}return i}const f9=(t,e)=>{const n=xa.createTransformer(e),i=Sf(t),r=Sf(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?QA.has(t)&&!r.values.length||QA.has(e)&&!i.values.length?c9(t,e):fo(AD(h9(i,r),r.values),n):O0(t,e)};function SD(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?gn(t,e,n):aM(t)(t,e)}function p9(t,e,n){const i=[],r=n||SD,s=t.length-1;for(let o=0;o<s;o++){let a=r(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Ti:e;a=fo(l,a)}i.push(a)}return i}function m9(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(GA(s===e.length),s===1)return()=>e[0];if(s===2&&t[0]===t[1])return()=>e[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=p9(e,i,r),a=o.length,l=c=>{let h=0;if(a>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=wf(t[h],t[h+1],c);return o[h](f)};return n?c=>l(ya(t[0],t[s-1],c)):l}function g9(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=wf(0,e,i);t.push(gn(n,1,r))}}function v9(t){const e=[0];return g9(e,t.length-1),e}function y9(t,e){return t.map(n=>n*e)}function x9(t,e){return t.map(()=>e||gD).splice(0,t.length-1)}function U0({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=n9(i)?i.map(k2):k2(i),s={done:!1,value:e[0]},o=y9(n&&n.length===e.length?n:v9(e),t),a=m9(o,e,{ease:Array.isArray(r)?r:x9(e,r)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const z2=2e4;function _9(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<z2;)e+=n,i=t.next(e);return e>=z2?1/0:e}const A9=t=>{const e=({timestamp:n})=>t(n);return{start:()=>Qt.update(e,!0),stop:()=>So(e),now:()=>ai.isProcessing?ai.timestamp:pa.now()}},S9={decay:N2,inertia:N2,tween:U0,keyframes:U0,spring:pD},w9=t=>t/100;class lM extends dD{constructor({KeyframeResolver:e=nM,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:i,motionValue:r,keyframes:s}=this.options,o=(a,l)=>this.onKeyframesResolved(a,l);i&&r&&r.owner?this.resolver=r.owner.resolveKeyframes(s,o,i,r):this.resolver=new e(s,o,i,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=this.options,a=S9[n]||U0;let l,c;a!==U0&&typeof e[0]!="number"&&(l=fo(w9,SD(e[0],e[1])),e=[0,100]);const h=a({...this.options,keyframes:e});s==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),h.calculatedDuration===null&&(h.calculatedDuration=_9(h));const{calculatedDuration:f}=h,p=f+r,m=p*(i+1)-r;return{generator:h,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:p,totalDuration:m}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:i}=this;if(!i){const{keyframes:B}=this.options;return{done:!0,value:B[B.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:h,resolvedDuration:f}=i;if(this.startTime===null)return s.next(0);const{delay:p,repeat:m,repeatType:v,repeatDelay:S,onUpdate:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-h/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-p*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>h;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let _=this.currentTime,M=s;if(m){const B=Math.min(this.currentTime,h)/f;let R=Math.floor(B),T=B%1;!T&&B>=1&&(T=1),T===1&&R--,R=Math.min(R,m+1),!!(R%2)&&(v==="reverse"?(T=1-T,S&&(T-=S/f)):v==="mirror"&&(M=o)),_=ya(0,1,T)*f}const b=x?{done:!1,value:l[0]}:M.next(_);a&&(b.value=a(b.value));let{done:C}=b;!x&&c!==null&&(C=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return P&&r!==void 0&&(b.value=iy(l,this.options,r)),A&&A(b.value),P&&this.finish(),b}get duration(){const{resolved:e}=this;return e?mo(e.calculatedDuration):0}get time(){return mo(this.currentTime)}set time(e){e=po(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=mo(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=A9,onPlay:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=i),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const wD=t=>Array.isArray(t)&&typeof t[0]=="number";function MD(t){return!!(!t||typeof t=="string"&&t in cM||wD(t)||Array.isArray(t)&&t.every(MD))}const wh=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,cM={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wh([0,.65,.55,1]),circOut:wh([.55,0,1,.45]),backIn:wh([.31,.01,.66,-.59]),backOut:wh([.33,1.53,.69,.99])};function M9(t){return ED(t)||cM.easeOut}function ED(t){if(t)return wD(t)?wh(t):Array.isArray(t)?t.map(M9):cM[t]}function E9(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const h=ED(a);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const C9=uD(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),z0=10,T9=2e4;function b9(t){return t.type==="spring"||!MD(t.ease)}function R9(t,e){const n=new lM({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const r=[];let s=0;for(;!i.done&&s<T9;)i=n.sample(s),r.push(i.value),s+=z0;return{times:void 0,keyframes:r,duration:s-z0,ease:"linear"}}class H2 extends dD{constructor(e){super(e);const{name:n,motionValue:i,keyframes:r}=this.options;this.resolver=new cD(r,(s,o)=>this.onKeyframesResolved(s,o),n,i),this.resolver.scheduleResolve()}initPlayback(e,n){var i;let{duration:r=300,times:s,ease:o,type:a,motionValue:l,name:c}=this.options;if(!(!((i=l.owner)===null||i===void 0)&&i.current))return!1;if(b9(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,...v}=this.options,S=R9(e,v);e=S.keyframes,e.length===1&&(e[1]=e[0]),r=S.duration,s=S.times,o=S.ease,a="keyframes"}const h=E9(l.owner.current,c,e,{...this.options,duration:r,times:s,ease:o});return h.startTime=pa.now(),this.pendingTimeline?(h.timeline=this.pendingTimeline,this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:f}=this.options;l.set(iy(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:r,times:s,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return mo(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return mo(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=po(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return Ti;const{animation:i}=n;i.timeline=e,i.onfinish=null}return Ti}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:i,duration:r,type:s,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:h,onComplete:f,...p}=this.options,m=new lM({...p,keyframes:i,duration:r,type:s,ease:o,times:a,isGenerator:!0}),v=po(this.time);c.setWithVelocity(m.sample(v-z0).value,m.sample(v).value,z0)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:i,repeatDelay:r,repeatType:s,damping:o,type:a}=e;return C9()&&i&&HL.has(i)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUp
67date&&!r&&s!=="mirror"&&o!==0&&a!=="inertia"}}function P9(t,e){let n;const i=()=>{const{currentTime:r}=e,o=(r===null?0:r.value)/100;n!==o&&t(o),n=o};return Qt.update(i,!0),()=>So(i)}const I9=uD(()=>window.ScrollTimeline!==void 0);class B9{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=n}attachTimeline(e){const n=this.animations.map(i=>{if(I9()&&i.attachTimeline)i.attachTimeline(e);else return i.pause(),P9(r=>{i.time=i.duration*r},e)});return()=>{n.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const uM=(t,e,n,i={},r,s,o)=>a=>{const l=tM(i,t)||{},c=l.delay||i.delay||0;let{elapsed:h=0}=i;h=h-po(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-h,onUpdate:m=>{e.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),o&&o()},onStop:o,name:t,motionValue:e,element:s?void 0:r};hG(l)||(f={...f,...dG(t,f)}),f.duration&&(f.duration=po(f.duration)),f.repeatDelay&&(f.repeatDelay=po(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let p=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(p=!0)),p&&!s&&e.get()!==void 0){const m=iy(f.keyframes,l);if(m!==void 0)return Qt.update(()=>{f.onUpdate(m),f.onComplete()}),new B9([])}return!s&&H2.supports(f)?new H2(f):new lM(f)};class dM{constructor(){this.subscriptions=[]}add(e){return $v(this.subscriptions,e),()=>ey(this.subscriptions,e)}notify(e,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,n,i);else for(let s=0;s<r;s++){const o=this.subscriptions[s];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const G2=30,L9=t=>!isNaN(parseFloat(t));class CD{constructor(e,n={}){this.version="11.3.24",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,r=!0)=>{const s=pa.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=pa.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=L9(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new dM);const i=this.events[e].add(n);return e==="change"?()=>{i(),Qt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=pa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>G2)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,G2);return hD(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mf(t,e){return new CD(t,e)}function D9(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Mf(n))}function N9(t,e){const n=ny(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const o in s){const a=HH(s[o]);D9(t,o,a)}}function TD(t){return t.getProps()[ML]}class F9 extends CD{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const n=GL(e);if(!n)return;const i=this.counts.get(n)||0;this.counts.set(n,i+1),i===0&&(this.output.push(n),this.update());let r=!1;return()=>{if(r)return;r=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(ey(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function k9(t){return!!(Ei(t)&&t.add)}function YA(t,e){var n;if(!t.applyWillChange)return;let i=t.getValue("willChange");if(!i&&!(!((n=t.props.style)===null||n===void 0)&&n.willChange)&&(i=new F9("auto"),t.addValue("willChange",i
vendor: 47,397 bytes, line 67
67)),k9(i))return i.add(e)}function O9({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function bD(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(o=i);const c=[],h=r&&t.animationState&&t.animationState.getState()[r];for(const f in l){const p=t.getValue(f,(s=t.latestValues[f])!==null&&s!==void 0?s:null),m=l[f];if(m===void 0||h&&O9(h,f))continue;const v={delay:n,elapsed:0,...tM(o||{},f)};let S=!1;if(window.MotionHandoffAnimation){const g=TD(t);if(g){const x=window.MotionHandoffAnimation(g,f,Qt);x!==null&&(v.elapsed=x,S=!0)}}p.start(uM(f,p,m,t.shouldReduceMotion&&Ca.has(f)?{type:!1}:v,t,S,YA(t,f)));const A=p.animation;A&&c.push(A)}return a&&Promise.all(c).then(()=>{Qt.update(()=>{a&&N9(t,a)})}),c}function ZA(t,e,n={}){var i;const r=ny(t,e,n.type==="exit"?(i=t.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(bD(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:h=0,staggerChildren:f,staggerDirection:p}=s;return U9(t,e,h+c,f,p,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,h]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>h())}else return Promise.all([o(),a(n.delay)])}function U9(t,e,n=0,i=0,r=1,s){const o=[],a=(t.variantChildren.size-1)*i,l=r===1?(c=0)=>c*i:(c=0)=>a-c*i;return Array.from(t.variantChildren).sort(z9).forEach((c,h)=>{c.notify("AnimationStart",e),o.push(ZA(c,e,{...s,delay:n+l(h)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function z9(t,e){return t.sortNodePosition(e)}function H9(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>ZA(t,s,n));i=Promise.all(r)}else if(typeof e=="string")i=ZA(t,e,n);else{const r=typeof e=="function"?ny(t,e,n.custom):e;i=Promise.all(bD(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const G9=[...Vw].reverse(),V9=Vw.length;function j9(t){return e=>Promise.all(e.map(({animation:n,options:i})=>H9(t,n,i)))}function W9(t){let e=j9(t),n=V2(),i=!0;const r=l=>(c,h)=>{var f;const p=ny(t,h,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(p){const{transition:m,transitionEnd:v,...S}=p;c={...c,...S,...v}}return c};function s(l){e=l(t)}function o(l){const c=t.getProps(),h=t.getVariantContext(!0)||{},f=[],p=new Set;let m={},v=1/0;for(let A=0;A<V9;A++){const g=G9[A],x=n[g],_=c[g]!==void 0?c[g]:h[g],M=_f(_),b=g===l?x.isActive:null;b===!1&&(v=A);let C=_===h[g]&&_!==c[g]&&M;if(C&&i&&t.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...m},!x.isActive&&b===null||!_&&!x.prevProp||Af(_)||typeof _=="boolean")continue;let B=X9(x.prevProp,_)||g===l&&x.isActive&&!C&&M||A>v&&M,R=!1;const T=Array.isArray(_)?_:[_];let L=T.reduce(r(g),{});b===!1&&(L={});const{prevResolvedValues:W={}}=x,Y={...W,...L},q=j=>{B=!0,p.has(j)&&(R=!0,p.delete(j)),x.needsAnimating[j]=!0;const Z=t.getValue(j);Z&&(Z.liveStyle=!1)};for(const j in Y){const Z=L[j],H=W[j];if(m.hasOwnProperty(j))continue;let D=!1;VA(Z)&&VA(H)?D=!qL(Z,H):D=Z!==H,D?Z!=null?q(j):p.add(j):Z!==void 0&&p.has(j)?q(j):x.protectedKeys[j]=!0}x.prevProp=_,x.prevResolvedValues=L,x.isActive&&(m={...m,...L}),i&&t.blockInitialAnimation&&(B=!1),B&&(!C||R)&&f.push(...T.map(j=>({animation:j,options:{type:g}})))}if(p.size){const A={};p.forEach(g=>{const x=t.getBaseTarget(g),_=t.getValue(g);_&&(_.liveStyle=!0),A[g]=x??null}),f.push({animation:A})}let S=!!f.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(S=!1),i=!1,S?e(f):Promise.resolve()}function a(l,c){var h;if(n[l].isActive===c)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const f=o(l);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=V2(),i=!0}}}function X9(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!qL(e,t):!1}function Ga(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function V2(){return{animate:Ga(!0),whileInView:Ga(),whileHover:Ga(),whileTap:Ga(),whileDrag:Ga(),whileFocus:Ga(),exit:Ga()}}class J9 extends Ta{constructor(e){super(e),e.animationState||(e.animationState=W9(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Af(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let K9=0;class q9 extends Ta{constructor(){super(...arguments),this.id=K9++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Q9={animation:{Feature:J9},exit:{Feature:q9}},j2=(t,e)=>Math.abs(t-e);function Y9(t,e){const n=j2(t.x,e.x),i=j2(t.y,e.y);return Math.sqrt(n**2+i**2)}class RD{constructor(e,n,{transformPagePoint:i,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=D_(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=Y9(f.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:v}=f,{timestamp:S}=ai;this.history.push({...v,timestamp:S});const{onStart:A,onMove:g}=this.handlers;p||(A&&A(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=L_(p,this.transformPagePoint),Qt.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:m,onSessionEnd:v,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=D_(f.type==="pointercancel"?this.lastMoveEventInfo:L_(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,A),v&&v(f,A)},!jL(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const o=ty(e),a=L_(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=ai;this.history=[{...l,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,D_(a,this.history)),this.removeListeners=fo(ho(this.contextWindow,"pointermove",this.handlePointerMove),ho(this.contextWindow,"pointerup",this.handlePointerUp),ho(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),So(this.updatePoint)}}function L_(t,e){return e?{point:e(t.point)}:t}function W2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function D_({point:t},e){return{point:t,delta:W2(t,PD(e)),offset:W2(t,Z9(e)),velocity:$9(e,.1)}}function Z9(t){return t[0]}function PD(t){return t[t.length-1]}function $9(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=PD(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>po(e)));)n--;if(!i)return{x:0,y:0};const s=mo(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const ID=1e-4,e8=1-ID,t8=1+ID,BD=.01,n8=0-BD,i8=0+BD;function vr(t){return t.max-t.min}function r8(t,e,n){return Math.abs(t-e)<=n}function X2(t,e,n,i=.5){t.origin=i,t.originPoint=gn(e.min,e.max,t.origin),t.scale=vr(n)/vr(e),t.translate=gn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=e8&&t.scale<=t8||isNaN(t.scale))&&(t.scale=1),(t.translate>=n8&&t.translate<=i8||isNaN(t.translate))&&(t.translate=0)}function Uh(t,e,n,i){X2(t.x,e.x,n.x,i?i.originX:void 0),X2(t.y,e.y,n.y,i?i.originY:void 0)}function J2(t,e,n){t.min=n.min+e.min,t.max=t.min+vr(e)}function s8(t,e,n){J2(t.x,e.x,n.x),J2(t.y,e.y,n.y)}function K2(t,e,n){t.min=e.min-n.min,t.max=t.min+vr(e)}function zh(t,e,n){K2(t.x,e.x,n.x),K2(t.y,e.y,n.y)}function o8(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?gn(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?gn(n,t,i.max):Math.min(t,n)),t}function q2(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function a8(t,{top:e,left:n,bottom:i,right:r}){return{x:q2(t.x,n,r),y:q2(t.y,e,i)}}function Q2(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function l8(t,e){return{x:Q2(t.x,e.x),y:Q2(t.y,e.y)}}function c8(t,e){let n=.5;const i=vr(t),r=vr(e);return r>i?n=wf(e.min,e.max-i,t.min):i>r&&(n=wf(t.min,t.max-r,e.min)),ya(0,1,n)}function u8(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const $A=.35;function d8(t=$A){return t===!1?t=0:t===!0&&(t=$A),{x:Y2(t,"left","right"),y:Y2(t,"top","bottom")}}function Y2(t,e,n){return{min:Z2(t,e),max:Z2(t,n)}}function Z2(t,e){return typeof t=="number"?t:t[e]||0}const $2=()=>({translate:0,scale:1,origin:0,originPoint:0}),gu=()=>({x:$2(),y:$2()}),eb=()=>({min:0,max:0}),In=()=>({x:eb(),y:eb()});function Br(t){return[t("x"),t("y")]}function LD({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function h8({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function f8(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function N_(t){return t===void 0||t===1}function eS({scale:t,scaleX:e,scaleY:n}){return!N_(t)||!N_(e)||!N_(n)}function al(t){return eS(t)||DD(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function DD(t){return tb(t.x)||tb(t.y)}function tb(t){return t&&t!=="0%"}function H0(t,e,n){const i=t-n,r=e*i;return n+r}function nb(t,e,n,i,r){return r!==void 0&&(t=H0(t,r,i)),H0(t,n,i)+e}function tS(t,e=0,n=1,i,r){t.min=nb(t.min,e,n,i,r),t.max=nb(t.max,e,n,i,r)}function ND(t,{x:e,y:n}){tS(t.x,e.translate,e.scale,e.originPoint),tS(t.y,n.translate,n.scale,n.originPoint)}const ib=.999999999999,rb=1.0000000000001;function p8(t,e,n,i=!1){const r=n.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a<r;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&yu(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,ND(t,o)),i&&al(s.latestValues)&&yu(t,s.latestValues))}e.x<rb&&e.x>ib&&(e.x=1),e.y<rb&&e.y>ib&&(e.y=1)}function vu(t,e){t.min=t.min+e,t.max=t.max+e}function sb(t,e,n,i,r=.5){const s=gn(t.min,t.max,r);tS(t,e,n,s,i)}function yu(t,e){sb(t.x,e.x,e.scaleX,e.scale,e.originX),sb(t.y,e.y,e.scaleY,e.scale,e.originY)}function FD(t,e){return LD(f8(t.getBoundingClientRect(),e))}function m8(t,e,n){const i=FD(t,n),{scroll:r}=e;return r&&(vu(i.x,r.offset.x),vu(i.y,r.offset.y)),i}const kD=({current:t})=>t?t.ownerDocument.defaultView:null,g8=new WeakMap;class v8{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=In(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ty(h,"page").point)},s=(h,f)=>{var p;const{drag:m,dragPropagation:v,onDragStart:S}=this.getProps();if(m&&!v&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=XL(m),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Br(g=>{let x=this.getAxisMotionValue(g).get()||0;if(Ls.test(x)){const{projection:_}=this.visualElement;if(_&&_.layout){const M=_.layout.layoutBox[g];M&&(x=vr(M)*(parseFloat(x)/100))}}this.originPoint[g]=x}),S&&Qt.postRender(()=>S(h,f)),(p=this.removeWillChange)===null||p===void 0||p.call(this),this.removeWillChange=YA(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},o=(h,f)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:v,onDrag:S}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:A}=f;if(m&&this.currentDirection===null){this.currentDirection=y8(A),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,A),this.updateAxis("y",f.point,A),this.visualElement.render(),S&&S(h,f)},a=(h,f)=>this.stop(h,f),l=()=>Br(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new RD(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:kD(this.visualElement)})}stop(e,n){var i;(i=this.removeWillChange)===null||i===void 0||i.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&Qt.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!Om(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=o8(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;n&&pu(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=a8(r.layoutBox,n):this.constraints=!1,this.elastic=d8(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Br(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=u8(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!pu(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=m8(i,r.root,this.visualElement.getTransformPagePoint());let o=l8(r.layout.layoutBox,s);if(n){const a=n(h8(o));this.hasMutatedConstraints=!!a,a&&(o=LD(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Br(h=>{if(!Om(h,n,this.currentDirection))return;let f=l&&l[h]||{};o&&(f={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,v={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(h,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return i.start(uM(e,i,0,n,this.visualElement,!1,YA(this.visualElement,e)))}stopAnimation(){Br(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Br(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Br(n=>{const{drag:i}=this.getProps();if(!Om(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[n];s.set(e[n]-gn(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!pu(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Br(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=c8({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Br(o=>{if(!Om(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(gn(l,c,r[o]))})}addListeners(){if(!this.visualElement.current)return;g8.set(this.visualElement,this);const e=this.visualElement.current,n=ho(e,"pointerdown",l=>{const{drag:c,dragListener:h=!0}=this.getProps();c&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();pu(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Qt.read(i);const o=ao(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Br(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=$A,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Om(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function y8(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class x8 extends Ta{constructor(e){super(e),this.removeGroupControls=Ti,this.removeListeners=Ti,this.controls=new v8(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ti}unmount(){this.removeGroupControls(),this.removeListeners()}}const ob=t=>(e,n)=>{t&&Qt.postRender(()=>t(e,n))};class _8 extends Ta{constructor(){super(...arguments),this.removePointerDownListener=Ti}onPointerDown(e){this.session=new RD(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kD(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:ob(e),onStart:ob(n),onMove:i,onEnd:(s,o)=>{delete this.session,r&&Qt.postRender(()=>r(s,o))}}}mount(){this.removePointerDownListener=ho(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function A8(){const t=z.useContext(zw);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,r=z.useId();z.useEffect(()=>i(r),[]);const s=z.useCallback(()=>n&&n(r),[r,n]);return!e&&n?[!1,s]:[!0]}const n0={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ab(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Kd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(gt.test(t))t=parseFloat(t);else return t;const n=ab(t,e.target.x),i=ab(t,e.target.y);return`${n}% ${i}%`}},S8={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=xa.parse(t);if(r.length>5)return i;const s=xa.createTransformer(t),o=typeof r[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const c=gn(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=c),typeof r[3+o]=="number"&&(r[3+o]/=c),s(r)}};class w8 extends z.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;gH(M8),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),n0.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Qt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Gw.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function OD(t){const[e,n]=A8(),i=z.useContext(RL);return F.jsx(w8,{...t,layoutGroup:i,switchLayoutGroup:z.useContext(CL),isPresent:e,safeToRemove:n})}const M8={borderRadius:{...Kd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kd,borderTopRightRadius:Kd,borderBottomLeftRadius:Kd,borderBottomRightRadius:Kd,boxShadow:S8},UD=["TopLeft","TopRight","BottomLeft","BottomRight"],E8=UD.length,lb=t=>typeof t=="string"?parseFloat(t):t,cb=t=>typeof t=="number"||gt.test(t);function C8(t,e,n,i,r,s){r?(t.opacity=gn(0,n.opacity!==void 0?n.opacity:1,T8(i)),t.opacityExit=gn(e.opacity!==void 0?e.opacity:1,0,b8(i))):s&&(t.opacity=gn(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let o=0;o<E8;o++){const a=`border${UD[o]}Radius`;let l=ub(e,a),c=ub(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||cb(l)===cb(c)?(t[a]=Math.max(gn(lb(l),lb(c),i),0),(Ls.test(c)||Ls.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=gn(e.rotate||0,n.rotate||0,i))}function ub(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const T8=zD(0,.5,xD),b8=zD(.5,.95,Ti);function zD(t,e,n){return i=>i<t?0:i>e?1:n(wf(t,e,i))}function db(t,e){t.min=e.min,t.max=e.max}function Rr(t,e){db(t.x,e.x),db(t.y,e.y)}function hb(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function fb(t,e,n,i,r){return t-=e,t=H0(t,1/n,i),r!==void 0&&(t=H0(t,1/r,i)),t}function R8(t,e=0,n=1,i=.5,r,s=t,o=t){if(Ls.test(e)&&(e=parseFloat(e),e=gn(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=gn(s.min,s.max,i);t===s&&(a-=e),t.min=fb(t.min,e,n,a,r),t.max=fb(t.max,e,n,a,r)}function pb(t,e,[n,i,r],s,o){R8(t,e[n],e[i],e[r],e.scale,s,o)}const P8=["x","scaleX","originX"],I8=["y","scaleY","originY"];function mb(t,e,n,i){pb(t.x,e,P8,n?n.x:void 0,i?i.x:void 0),pb(t.y,e,I8,n?n.y:void 0,i?i.y:void 0)}function gb(t){return t.translate===0&&t.scale===1}function HD(t){return gb(t.x)&&gb(t.y)}function vb(t,e){return t.min===e.min&&t.max===e.max}function B8(t,e){return vb(t.x,e.x)&&vb(t.y,e.y)}function yb(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function GD(t,e){return yb(t.x,e.x)&&yb(t.y,e.y)}function xb(t){return vr(t.x)/vr(t.y)}function _b(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class L8{constructor(){this.members=[]}add(e){$v(this.members,e),e.scheduleRender()}remove(e){if(ey(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(r=>e===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function D8(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:h,rotateX:f,rotateY:p,skewX:m,skewY:v}=n;c&&(i=`perspective(${c}px) ${i}`),h&&(i+=`rotate(${h}deg) `),f&&(i+=`rotateX(${f}deg) `),p&&(i+=`rotateY(${p}deg) `),m&&(i+=`skewX(${m}deg) `),v&&(i+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const N8=(t,e)=>t.depth-e.depth;class F8{constructor(){this.children=[],this.isDirty=!1}add(e){$v(this.children,e),this.isDirty=!0}remove(e){ey(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(N8),this.isDirty=!1,this.children.forEach(e)}}function k8(t,e){const n=pa.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(So(i),t(s-e))};return Qt.read(i,!0),()=>So(i)}function O8(t){return t instanceof SVGElement&&t.tagName!=="svg"}function U8(t,e,n){const i=Ei(t)?t:Mf(t);return i.start(uM("",i,e,n)),i.animation}const ll={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Mh=typeof window<"u"&&window.MotionDebug!==void 0,F_=["","X","Y","Z"],z8={visibility:"hidden"},Ab=1e3;let H8=0;function k_(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function VD(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?window.MotionHasOptimisedTransformAnimation(TD(e))?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?VD(t.parent):!1:!1}function jD({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=H8++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Mh&&(ll.totalNodes=ll.resolvedTargetDeltas=ll.recalculatedProjection=0),this.nodes.forEach(j8),this.nodes.forEach(q8),this.nodes.forEach(Q8),this.nodes.forEach(W8),Mh&&window.MotionDebug.record(ll)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new F8)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new dM),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=O8(o),this.instance=o;const{layoutId:l,layout:c,visualElement:h}=this.options;if(h&&!h.current&&h.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const p=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=k8(p,250),n0.hasAnimatedSinceResize&&(n0.hasAnimatedSinceResize=!1,this.nodes.forEach(wb))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||tV,{onLayoutAnimationStart:A,onLayoutAnimationComplete:g}=h.getProps(),x=!this.targetLayout||!GD(this.targetLayout,v)||m,_=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||_||p&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,_);const M={...tM(S,"layout"),onPlay:A,onComplete:g};(h.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else p||wb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,So(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Y8),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionHandoffCancelAll&&VD(this)&&window.MotionHandoffCancelAll(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const f=this.path[h];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Sb);return}this.isUpdating||this.nodes.forEach(J8),this.isUpdating=!1,this.nodes.forEach(K8),this.nodes.forEach(G8),this.nodes.forEach(V8),this.clearAllSnapshots();const a=pa.now();ai.delta=ya(0,1e3/60,a-ai.timestamp),ai.timestamp=a,ai.isProcessing=!0,C_.update.process(ai),C_.preRender.process(ai),C_.render.process(ai),ai.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(X8),this.sharedNodes.forEach(Z8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=In(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!HD(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,h=c!==this.prevTransformTemplateValue;o&&(a||al(this.latestValues)||h)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),nV(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return In();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(iV))){const{scroll:h}=this.root;h&&(vu(l.x,h.offset.x),vu(l.y,h.offset.y))}return l}removeElementScroll(o){var a;const l=In();if(Rr(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const h=this.path[c],{scroll:f,options:p}=h;h!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Rr(l,o),vu(l.x,f.offset.x),vu(l.y,f.offset.y))}return l}applyTransform(o,a=!1){const l=In();Rr(l,o);for(let c=0;c<this.path.length;c++){const h=this.path[c];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&yu(l,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),al(h.latestValues)&&yu(l,h.latestValues)}return al(this.latestValues)&&yu(l,this.latestValues),l}removeTransform(o){const a=In();Rr(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!al(c.latestValues))continue;eS(c.latestValues)&&c.updateSnapshot();const h=In(),f=c.measurePageBox();Rr(h,f),mb(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,h)}return al(this.latestValues)&&mb(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ai.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:p}=this.options;if(!(!this.layout||!(f||p))){if(this.resolvedRelativeTargetAt=ai.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=In(),this.relativeTargetOrigin=In(),zh(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),Rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=In(),this.targetWithTransforms=In()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s8(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Rr(this.target,this.layout.layoutBox),ND(this.target,this.targetDelta)):Rr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=In(),this.relativeTargetOrigin=In(),zh(this.relativeTargetOrigin,this.target,m.target),Rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Mh&&ll.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||eS(this.parent.latestValues)||DD(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ai.timestamp&&(c=!1),c)return;const{layout:h,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||f))return;Rr(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,m=this.treeScale.y;p8(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=In());const{target:v}=a;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hb(this.prevProjectionDelta.x,this.projectionDelta.x),hb(this.prevProjectionDelta.y,this.projectionDelta.y)),Uh(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==m||!_b(this.projectionDelta.x,this.prevProjectionDelta.x)||!_b(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),Mh&&ll.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gu(),this.projectionDelta=gu(),this.projectionDeltaWithTransform=gu()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},h={...this.latestValues},f=gu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=In(),m=l?l.source:void 0,v=this.layout?this.layout.source:void 0,S=m!==v,A=this.getStack(),g=!A||A.members.length<=1,x=!!(S&&!g&&this.options.crossfade===!0&&!this.path.some(eV));this.animationProgress=0;let _;this.mixTargetDelta=M=>{const b=M/1e3;Mb(f.x,o.x,b),Mb(f.y,o.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zh(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$8(this.relativeTarget,this.relativeTargetOrigin,p,b),_&&B8(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=In()),Rr(_,this.relativeTarget)),S&&(this.animationValues=h,C8(h,c,this.latestValues,b,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(So(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qt.update(()=>{n0.hasAnimatedSinceResize=!0,this.currentAnimation=U8(0,Ab,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ab),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:h}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&WD(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||In();const f=vr(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const p=vr(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}Rr(a,l),yu(a,h),Uh(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new L8),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&k_("z",o,c,this.animationValues);for(let h=0;h<F_.length;h++)k_(`rotate${F_[h]}`,o,c,this.animationValues),k_(`skew${F_[h]}`,o,c,this.animationValues);o.render();for(const h in c)o.setStaticValue(h,c[h]),this.animationValues&&(this.animationValues[h]=c[h]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return z8;const c={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=e0(o==null?void 0:o.pointerEvents)||"",c.transform=h?h(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const S={};return this.options.layoutId&&(S.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,S.pointerEvents=e0(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!al(this.latestValues)&&(S.transform=h?h({},""):"none",this.hasProjected=!1),S}const p=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=D8(this.projectionDeltaWithTransform,this.treeScale,p),h&&(c.transform=h(p,c.transform));const{x:m,y:v}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${v.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=p.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const S in F0){if(p[S]===void 0)continue;const{correct:A,applyTo:g}=F0[S],x=c.transform==="none"?p[S]:A(p[S],f);if(g){const _=g.length;for(let M=0;M<_;M++)c[g[M]]=x}else c[S]=x}return this.options.layoutId&&(c.pointerEvents=f===this?e0(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Sb),this.root.sharedNodes.clear()}}}function G8(t){t.updateLayout()}function V8(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;s==="size"?Br(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],m=vr(p);p.min=i[f].min,p.max=p.min+m}):WD(s,n.layoutBox,i)&&Br(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],m=vr(i[f]);p.max=p.min+m,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+m)});const a=gu();Uh(a,i,n.layoutBox);const l=gu();o?Uh(l,t.applyTransform(r,!0),n.measuredBox):Uh(l,i,n.layoutBox);const c=!HD(a);let h=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:m}=f;if(p&&m){const v=In();zh(v,n.layoutBox,p.layoutBox);const S=In();zh(S,i,m.layoutBox),GD(v,S)||(h=!0),f.options.layoutRoot&&(t.relativeTarget=S,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:h})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function j8(t){Mh&&ll.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function W8(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function X8(t){t.clearSnapshot()}function Sb(t){t.clearMeasurements()}function J8(t){t.isLayoutDirty=!1}function K8(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function wb(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function q8(t){t.resolveTargetDelta()}function Q8(t){t.calcProjection()}
vendor: 4,430 bytes, line 67
67function Y8(t){t.resetSkewAndRotation()}function Z8(t){t.removeLeadSnapshot()}function Mb(t,e,n){t.translate=gn(e.translate,0,n),t.scale=gn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Eb(t,e,n,i){t.min=gn(e.min,n.min,i),t.max=gn(e.max,n.max,i)}function $8(t,e,n,i){Eb(t.x,e.x,n.x,i),Eb(t.y,e.y,n.y,i)}function eV(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const tV={duration:.45,ease:[.4,0,.1,1]},Cb=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Tb=Cb("applewebkit/")&&!Cb("chrome/")?Math.round:Ti;function bb(t){t.min=Tb(t.min),t.max=Tb(t.max)}function nV(t){bb(t.x),bb(t.y)}function WD(t,e,n){return t==="position"||t==="preserve-aspect"&&!r8(xb(e),xb(n),.2)}function iV(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const rV=jD({attachResizeListener:(t,e)=>ao(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),O_={current:void 0},XD=jD({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!O_.current){const t=new rV({});t.mount(window),t.setOptions({layoutScroll:!0}),O_.current=t}return O_.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),sV={pan:{Feature:_8},drag:{Feature:x8,ProjectionNode:XD,MeasureLayout:OD}},nS={current:null},JD={current:!1};function oV(){if(JD.current=!0,!!Hw)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>nS.current=t.matches;t.addListener(e),e()}else nS.current=!1}function aV(t,e,n){for(const i in e){const r=e[i],s=n[i];if(Ei(r))t.addValue(i,r);else if(Ei(s))t.addValue(i,Mf(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=t.getStaticValue(i);t.addValue(i,Mf(o!==void 0?o:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Rb=new WeakMap,lV=[...eD,wi,xa],cV=t=>lV.find($L(t)),Pb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],uV=jw.length;class dV{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:s,visualState:o},a={}){this.applyWillChange=!1,this.resolveKeyframes=(p,m,v,S)=>new this.KeyframeResolver(p,m,v,S,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nM,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Qt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Zv(n),this.isVariantNode=bL(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];l[p]!==void 0&&Ei(m)&&m.set(l[p],!1)}}mount(e){this.current=e,Rb.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),JD.current||oV(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nS.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Rb.delete(this.current),this.projection&&this.projection.unmount(),So(this.notifyUpdate),So(this.render),this.valueSubscriptions.forEach(e
67=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const i=Ca.has(e),r=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Qt.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Wu){const n=Wu[e];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):In()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Pb.length;i++){const r=Pb[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,o=e[s];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=aV(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const i=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}const n={};for(let i=0;i<uV;i++){const r=jw[i],s=this.props[r];(_f(s)||s===!1)&&(n[r]=s)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Mf(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){var i;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(YL(r)||QL(r))?r=parseFloat(r):!cV(r)&&xa.test(n)&&(r=lD(e,n)),this.setBaseTarget(e,Ei(r)?r.get():r)),Ei(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const o=eM(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(r=o[e])}if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Ei(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new dM),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class KD extends dV{constructor(){super(...arguments),this.KeyframeResolver=cD}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}}function hV(t){return window.getComputedStyle(t)}class fV extends KD{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=kL}readValueFromInstance(e,n){if(Ca.has(n)){const i=rM(n);return i&&i.default||0}else{const i=hV(e),r=(LL(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return FD(e,n)}build(e,n,i){qw(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return $w(e,n,i)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ei(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class pV extends KD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=In}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ca.has(n)){const i=rM(n);return i&&i.default||0}return n=OL.has(n)?n:Yv(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return zL(e,n,i)}build(e,n,i){Yw(e,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,i,r){UL(e,n,i,r)}mount(e){this.isSVGTag=Zw(e.tagName),super.mount(e)}}const mV=(t,e)=>Ww(t)?new pV(e):new fV(e,{allowProjection:t!==z.Fragment}),gV={layout:{ProjectionNode:XD,MeasureLayout:OD}},vV={...Q9,...oG,...sV,...gV},Pl=pH((t,e)=>JH(t,e,vV,mV));var iS=new Map,Um=new WeakMap,Ib=0,yV=void 0;function xV(t){return t?(Um.has(t)||(Ib+=1,Um.set(t,Ib.toString())),Um.get(t)):"0"}function _V(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?xV(t.root):t[e]}`).toString()}function AV(t){const e=_V(t);let n=iS.get(e);if(!n){const i=new Map;let r;const s=new IntersectionObserver(o=>{o.forEach(a=>{var l;const c=a.isIntersecting&&r.some(h=>a.intersectionRatio>=h);t.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=c),(l=i.get(a.target))==null||l.forEach(h=>{h(c,a)})})},t);r=s.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:s,elements:i},iS.set(e,n)}return n}function SV(t,e,n={},i=yV){if(typeof window.IntersectionObserver>"u"&&i!==void 0){const l=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:r,observer:s,elements:o}=AV(n),a=o.get(t)||[];return o.has(t)||o.set(t,a),a.push(e),s.observe(t),function(){a.splice(a.indexOf(e),1),a.length===0&&(o.delete(t),s.unobserve(t)),o.size===0&&(s.disconnect(),iS.delete(r))}}function qD({threshold:t,delay:e,trackVisibility:n,rootMargin:i,root:r,triggerOnce:s,skip:o,initialInView:a,fallbackInView:l,onChange:c}={}){var h;const[f,p]=z.useState(null),m=z.useRef(),[v,S]=z.useState({inView:!!a,entry:void 0});m.current=c,z.useEffect(()=>{if(o||!f)return;let _;return _=SV(f,(M,b)=>{S({inView:M,entry:b}),m.current&&m.current(M,b),b.isIntersecting&&s&&_&&(_(),_=void 0)},{root:r,rootMargin:i,threshold:t,trackVisibility:n,delay:e},l),()=>{_&&_()}},[Array.isArray(t)?t.toString():t,f,r,i,s,o,n,l,e]);const A=(h=v.entry)==null?void 0:h.target,g=z.useRef();!f&&A&&!s&&!o&&g.current!==A&&(g.current=A,S({inView:!!a,entry:void 0}));const x=[p,v.inView,v.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}const QD=z.createContext(null),wV=({children:t})=>{const[e,n]=z.useState("Home"),[i,r]=z.useState(0);return F.jsx(QD.Provider,{value:{activeSection:e,setActiveSection:n,timeOfLastClickOnSection:i,setTimeOfLastClickOnSection:r},children:t})};function YD(){const t=z.useContext(QD);if(t===null)throw new Error("useActiveSectionContext must be used within an ActiveSectionContextProvider.");return t}function ZD(t,e=.75){const{setActiveSection:n,timeOfLastClickOnSection:i}=YD(),{ref:r,inView:s}=qD({threshold:e});return z.useEffect(()=>{s&&Date.now()-i>1e3&&n(t)},[s,n,i,t]),{ref:r}}function ry({sectionName:t,threshold:e=.75,setCurrentCVSection:n,timeOfLastClickOnCVSection:i}){const{ref:r,inView:s}=qD({threshold:e});return z.useEffect(()=>{s&&Date.now()-i>1e3&&n(t)},[s,n,i,t]),{ref:r}}var $D={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Bb=Ft.createContext&&Ft.createContext($D),MV=["attr","size","title"];function EV(t,e){if(t==null)return{};var n=CV(t,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)i=s[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function CV(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function G0(){return G0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},G0.apply(this,arguments)}
vendor: 4,504 bytes, line 67
67function Lb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function V0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lb(Object(n),!0).forEach(function(i){TV(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lb(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function TV(t,e,n){return e=bV(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bV(t){var e=RV(t,"string");return typeof e=="symbol"?e:e+""}function RV(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function eN(t){return t&&t.map((e,n)=>Ft.createElement(e.tag,V0({key:n},e.attr),eN(e.child)))}function ad(t){return e=>Ft.createElement(PV,G0({attr:V0({},t.attr)},e),eN(t.child))}function PV(t){var e=n=>{var{attr:i,size:r,title:s}=t,o=EV(t,MV),a=r||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Ft.createElement("svg",G0({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,o,{className:l,style:V0(V0({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Ft.createElement("title",null,s),t.children)};return Bb!==void 0?Ft.createElement(Bb.Consumer,null,n=>e(n)):e($D)}function IV(t){return ad({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8"},child:[]}]})(t)}function BV(t){return ad({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"},child:[]}]})(t)}function LV(t){return ad({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854zm4.943 12.248V6.169H2.542v7.225zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248S2.4 3.226 2.4 3.934c0 .694.521 1.248 1.327 1.248zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016l.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225z"},child:[]}]})(t)}function DV(t){return ad({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.026 15c6.038 0 9.341-5.003 9.341-9.334q.002-.211-.006-.422A6.7 6.7 0 0 0 16 3.542a6.7 6.7 0 0 1-1.889.518 3.3 3.3 0 0 0 1.447-1.817 6.5 6.5 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.32 9.32 0 0 1-6.767-3.429 3.29 3.29 0 0 0 1.018 4.382A3.3 3.3 0 0 1 .64 6.575v.045a3.29 3.29 0 0 0 2.632 3.218 3.2 3.2 0 0 1-.865.115 3 3 0 0 1-.614-.057 3.28 3.28 0 0 0 3.067 2.277A6.6 6.6 0 0 1 .78 13.58a6 6 0 0 1-.78-.045A9.34 9.34 0 0 0 5.026 15"},child:[]}]})(t)}function NV(t){return ad({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13.483 0a1.374 1.374 0 0 0-.961.438L7.116 6.226l-3.854 4.126a5.266 5.266 0 0 0-1.209 2.104 5.35 5.35 0 0 0-.125.513 5.527 5.527 0 0 0 .062 2.362 5.83 5.83 0 0 0 .349 1.017 5.938 5.938 0 0 0 1.271 1.818l4.277 4.193.039.038c2.248 2.165 5.852 2.133 8.063-.074l2.396-2.392c.54-.54.54-1.414.003-1.955a1.378 1.378 0 0 0-1.951-.003l-2.396 2.392a3.021 3.021 0 0 1-4.205.038l-.02-.019-4.276-4.193c-.652-.64-.972-1.469-.948-2.263a2.68 2.68 0 0 1 .066-.523 2.545 2.545 0 0 1 .619-1.164L9.13 8.114c1.058
67-1.134 3.204-1.27 4.43-.278l3.501 2.831c.593.48 1.461.387 1.94-.207a1.384 1.384 0 0 0-.207-1.943l-3.5-2.831c-.8-.647-1.766-1.045-2.774-1.202l2.015-2.158A1.384 1.384 0 0 0 13.483 0zm-2.866 12.815a1.38 1.38 0 0 0-1.38 1.382 1.38 1.38 0 0 0 1.38 1.382H20.79a1.38 1.38 0 0 0 1.38-1.382 1.38 1.38 0 0 0-1.38-1.382z"},child:[]}]})(t)}function rS(t){return ad({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}const Hh={baseUrl:"https://ashmit.dev",emailjsServiceId:"service_ukcxe1l",emailjsTemplateId:"template_2rdb4p9",emailjsPublicKey:"T41QKFUN_X1WeKcfT",GraphqlContentApi:"https://api-ap-south-1.hygraph.com/v2/cll9yrx081f1601t93tr6g3wv/master",GraphqlToken:"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImdjbXMtbWFpbi1wcm9kdWN0aW9uIn0.eyJ2ZXJzaW9uIjozLCJpYXQiOjE2OTE5NjUzNzksImF1ZCI6WyJodHRwczovL2FwaS1hcC1zb3V0aC0xLmh5Z3JhcGguY29tL3YyL2NsbDl5cngwODFmMTYwMXQ5M3RyNmczd3YvbWFzdGVyIiwibWFuYWdlbWVudC1uZXh0LmdyYXBoY21zLmNvbSJdLCJpc3MiOiJodHRwczovL21hbmFnZW1lbnQuZ3JhcGhjbXMuY29tLyIsInN1YiI6Ijk2ZTliOGVjLWFhYTktNDhmZS1hNWQ0LThkMTgwN2ZlNjRiMyIsImp0aSI6ImNsbGEwaTJrZDFmZGUwMXVtZmZ6MTl6NTIifQ.tak7W9mklkF6PEMsW2xlKpZrk4fl3Qk6HRTac46PcZE2ws4bGFb1ME742RyTdABaNWQorn7-VxA2iy3J4aEig4PD2sP4HVMbEKcOPwsh7HjfvJOIjrQ8Ux6VbvVnzwPBwj3qHGU1pvS6-CTOxPRrmnYwcIW-7GHcQhWHziPTIMZwih5RC-ORj1yiA784y25WM3REp2kgtru2ujwgivuAFXqY6I-rCPCEPrm2-pjtiJLHk9usRPblV3V3Y6f7zAXkY37dUnW4ssAG0BEwzFGUzxXKJDU-F8tmfm8lpTa6IUSj70Mqgj4CdYNToXbHnfqy84wZi7ffoeLiuzNH-sSqehiUmuVkd348qP-MMHnIcfvAqXTA-IW-ydorkxaaTKgU5yk-vfVuzQOUKirSxC3JYggpxS1035u1ZoyB3xsQ3EWVRo0JJSoSYeuiWzbxjIAYOfd-YyEJf3hiqrzHCV5vlQRnlti3idEqy7ydmsDeHLyWeNaLIJzBoACHQRbXtExuNOsidu_omzZ_fUVuxsvG0ZzGN-PvvSr9DhpO0GsbBLjxbMZlCGoeGzTVCLY2-j_wrudeHurVOHRqgYqL3HSohago6eckWEXrgcw-b2effLhZgKZCLGK4yC6WRRhh6FF2x5X-BTKP1Sw9tvFWuYiyywXscOyqqzqJVIWvw7tOLAM"},sS=Hh.baseUrl,nn={email:"mailto:[email protected]",discord:"https://discord.gg/bznez4qQQt",whatsapp:"https://whatsapp.com/channel/0029Va7cc274o7qQkwKxS93D",youtube:"https://www.youtube.com/@ashmitjsg",instagram:"https://www.instagram.com/_.ashmit.gupta._/",facebook:"https://www.facebook.com/ashmitjsg",linkedin:"https://www.linkedin.com/in/ashmitjsg/",twitter:"https://twitter.com/ashmitjsg",dribbble:"https://dribbble.com/ashmitjsg/",github:"https://github.com/ashmitjsg",gitlab:"https://gitlab.com/ashmitjsg",hashnode:"https://engineeringwithashmit.hashnode.dev/",medium:"https://medium.com/@ashmitjsg",mlsa:"https://mvp.microsoft.com/en-US/studentambassadors/profile/5712f83a-b4c5-4033-b77a-a5ce2bbd6ea3",holopin:"https://www.holopin.io/@devilkillerag",codolio:"https://codolio.com/profile/ashmit",leetcode:"https://leetcode.com/u/ashmitjsg/",codingninja:"https://www.naukri.com/code360/profile/jaisarita",gfg:"https://www.geeksforgeeks.org/user/jaisarita/",gsoc24:"https://summerofcode.withgoogle.com/archive/2024/projects/S49Gon9W"},FV=[{path:"/discord",name:"Discord Server",emoji:"🚀",url:nn.discord},{path:"/whatsapp",name:"WhatsApp Channel",emoji:"🔥",url:nn.whatsapp},{path:"/youtube",name:"YouTube Channel",emoji:"📹",url:nn.youtube},{path:"/instagram",name:"Instagram Profile",emoji:"✨",url:nn.instagram},{path:"/facebook",name:"Facebook Profile",emoji:"👀",url:nn.facebook},{path:"/linkedin",name:"LinkedIn Profile",emoji:"🐬",url:nn.linkedin},{path:"/twitter",name:"Twitter Profile",emoji:"🐤",url:nn.twitter},{path:"/dribbble",name:"Dribbble Profile",emoji:"🏀",url:nn.dribbble},{path:"/github",name:"GitHub Profile",emoji:"😸",url:nn.github},{path:"/gitlab",name:"GitLab Profile",emoji:"🦊",url:nn.gitlab},{path:"/hashnode",name:"Hashnode Blog",emoji:"📖",url:nn.hashnode},{path:"/medium",name:"Medium Blog",emoji:"📖",url:nn.medium},{path:"/mlsa",name:"MLSA Profile",emoji:"🪟",url:nn.mlsa},{path:"/holopin",name:"Holopin Profile",emoji:"🦖",url:nn.holopin},{path:"/codolio",name:"Codolio Profile",emoji:"🦖",url:nn.codolio},{path:"/leetcode",name:"Leetcode Profile",emoji:"🦖",url:nn.leetcode},{path:"/codingninja",name:"Coding Ninja Profile",emoji:"🦖",url:nn.codingninja},{path:"/gfg",name:"GFG Profile",emoji:"🦖",url:nn.gfg},{path:"/gsoc24",name:"GSoC 2024 Project",emoji:"🦖",url:nn.gsoc24}],kV=()=>{const{ref:t}=ZD("Home",.5);return F.jsx("section",{ref:t,id:"home",className:"w-screen h-screen flex justify-center items-center",children:F.jsxs("div",{className:"hero w-[95vw] h-[93vh] sm:h-[95vh] flex flex-col justify-center items-center",children:[F.jsxs(Pl.div,{className:"flex flex-col justify-center items-center",initial:{opacity:0,y:100}
67,animate:{opacity:1,y:0},transition:{delay:.5},children:[F.jsxs("div",{className:"text-4xl sm:text-6xl md:text-7xl lg:text-9xl font-semibold py-4 whitespace-nowrap",children:["Hi, I am ",F.jsx("span",{"data-text":"Ashmit",className:"",children:"Ashmit"}),"."]}),F.jsx("div",{className:"text-base text-center sm:text-2xl md:text-3xl sm:py-2 sm:whitespace-nowrap",children:"A Full-Stack and Quantum Software Engineer."})]}),F.jsxs(Pl.div,{className:"flex flex-col sm:flex-row justify-center items-center gap-4 sm:gap-2 py-8",initial:{opacity:0,y:200},animate:{opacity:1,y:0},transition:{delay:.6},children:[F.jsxs(jl,{to:"/contact",className:"group bg-white text-black px-7 py-3 flex justify-center items-center gap-3 rounded-full hover:bg-gray-200 active:scale-95 transition",children:["Contact me here ",F.jsx(IV,{className:"opacity-70 group-hover:translate-x-1 transition"})]}),F.jsxs("a",{href:`${sS}/pdfs/Resume_Ashmit_JaiSarita_Gupta.pdf`,download:!0,className:"group cursor-pointer hover:bg-white hover:text-black transition duration-500 ease-in-out border border-white border-opacity-40 bg-opacity-80 text-white px-7 py-3 flex justify-center items-center gap-2 rounded-full active:scale-95",children:[" Download Resume ",F.jsx(rS,{className:"opacity-70 group-hover:translate-y-[1px] transition"})]}),F.jsxs("div",{id:"hero_socials",className:"flex justify-center items-center gap-2",children:[F.jsx("a",{href:"/linkedin",target:"_blank",className:"w-12 h-12 cursor-pointer hover:bg-white hover:text-black transition duration-700 ease-in-out border border-white border-opacity-40 bg-opacity-80 text-white flex justify-center items-center rounded-full active:scale-90",children:F.jsx(LV,{})}),F.jsx("a",{href:"/twitter",target:"_blank",className:"w-12 h-12 cursor-pointer hover:bg-white hover:text-black transition duration-700 ease-in-out border border-white border-opacity-40 bg-opacity-80 text-white flex justify-center items-center rounded-full active:scale-90",children:F.jsx(DV,{})}),F.jsx("a",{href:"/github",target:"_blank",className:"w-12 h-12 cursor-pointer hover:bg-white hover:text-black transition duration-700 ease-in-out border border-white border-opacity-40 bg-opacity-80 text-white flex justify-center items-center rounded-full active:scale-90",children:F.jsx(BV,{})}),F.jsx("a",{href:"/codolio",target:"_blank",className:"w-12 h-12 cursor-pointer hover:bg-white hover:text-black transition duration-700 ease-in-out border border-white border-opacity-40 bg-opacity-80 text-white flex justify-center items-center rounded-full active:scale-90",children:F.jsx(NV,{})})]})]})]})})};function tN(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=tN(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ls(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=tN(t))&&(i&&(i+=" "),i+=e);return i}const OV=[{name:"Home",link:"/"},{name:"About",link:"/#about"},{name:"Experience",link:"/#experience"},{name:"Projects",link:"/projects"},{name:"Blog",link:"https://engineeringwithashmit.hashnode.dev/",external:!0},{name:"Résumé",link:"/resume"},{name:"Contact",link:"/contact"}],ip=()=>{const{activeSection:t,setActiveSection:e}=YD(),[n,i]=z.useState(!1);return F.jsxs("header",{className:"z-[999] relative",children:[F.jsx("div",{onClick:()=>i(!n),id:"toggleMenu",className:"md:hidden z-[9999] fixed top-5 right-5 cursor-pointer",children:n?F.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M19 4.99994L5 18.9999",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("path",{d:"M5 4.99994L19 18.9999",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}):F.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M4 5L20 5",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("path",{d:"M4 12L20 12",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("path",{d:"M4 19L20 19",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),F.jsx(Pl.div,{className:`${n?"block md:block":"hidden md:block"} fixed left-1/2  border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] backdrop-blur-[0.5rem] top-10 h-[90%] w-[84vw] rounded-3xl md:top-6 md:h-[47px] md:w-[642px] md:rounded-full`,initial:{y:-100,x:"-50%",opacity:0}
67,animate:{y:0,x:"-50%",opacity:1},transition:{delay:.3}}),F.jsx("nav",{className:`${n?"block md:block":"hidden md:block"} flex items-center justify-center fixed top-[0.5rem] left-1/2 -translate-x-1/2 h-[90%] py-0 md:top-[1.7rem] md:h-[initial]`,children:F.jsx("ul",{className:"flex flex-col md:flex-row w-[100px] item justify-center gap-y-1 text-[0.9rem] font-medium text-gray-300 md:w-[initial] flex-nowrap md:gap-5",children:OV.map(r=>F.jsx(Pl.li,{className:"h-[34px] md:h-[40px] flex items-center justify-center relative",initial:{y:-100,opacity:0},animate:{y:0,opacity:1},transition:{delay:.3},children:"external"in r&&r.external?F.jsx("a",{href:r.link,target:"_blank",rel:"noreferrer",className:"flex w-full items-center justify-center p-3 hover:text-gray-500 transition",children:r.name}):F.jsxs(jl,{to:r.link,onClick:()=>e(r.name),className:ls("flex w-full items-center justify-center p-3 hover:text-gray-500 transition",{"text-gray-950":t===r.name}),children:[r.name,r.name===t&&F.jsx(Pl.span,{className:"bg-gray-100 rounded-full absolute inset-0 -z-10",layoutId:"activeSection",transition:{type:"spring",stiffness:380,damping:30}})]})},r.link))})})]})};/**
68 * @license
69 * Copyright 2010-2024 Three.js Authors
70 * SPDX-License-Identifier: MIT
71 */const ld="167",cl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},ul={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},nN=0,oS=1,iN=2,UV=3,rN=0,sy=1,Gh=2,is=3,ks=0,Ui=1,Or=2,go=0,Il=1,aS=2,lS=3,cS=4,sN=5,ea=100,oN=101,aN=102,lN=103,cN=104,uN=200,dN=201,hN=202,fN=203,j0=204,W0=205,pN=206,mN=207,gN=208,vN=209,yN=210,xN=211,_N=212,AN=213,SN=214,wN=0,MN=1,EN=2,Ef=3,CN=4,TN=5,bN=6,RN=7,rp=0,PN=1,IN=2,Ds=0,BN=1,LN=2,DN=3,hM=4,NN=5,FN=6,kN=7,uS="attached",ON="detached",oy=300,wo=301,_a=302,Cf=303,Tf=304,cd=306,Aa=1e3,dr=1001,Ju=1002,jn=1003,ay=1004,zV=1004,xl=1005,HV=1005,Tn=1006,Iu=1007,GV=1007,zr=1008,VV=1008,fs=1009,fM=1010,pM=1011,Ku=1012,ly=1013,Mo=1014,Qi=1015,ud=1016,cy=1017,uy=1018,Wl=1020,mM=35902,gM=1021,vM=1022,Ci=1023,yM=1024,xM=1025,Bl=1026,Xl=1027,dy=1028,sp=1029,_M=1030,hy=1031,jV=1032,fy=1033,Vh=33776,jh=33777,Wh=33778,Xh=33779,X0=35840,J0=35841,K0=35842,q0=35843,Q0=36196,Y0=37492,Z0=37496,$0=37808,ev=37809,tv=37810,nv=37811,iv=37812,rv=37813,sv=37814,ov=37815,av=37816,lv=37817,cv=37818,uv=37819,dv=37820,hv=37821,Jh=36492,fv=36494,pv=36495,AM=36283,mv=36284,gv=36285,vv=36286,UN=2200,zN=2201,HN=2202,qu=2300,Qu=2301,i0=2302,_l=2400,Al=2401,bf=2402,py=2500,SM=2501,GN=0,wM=1,yv=2,VN=3200,jN=3201,WV=3202,XV=3203,ba=0,WN=1,io="",Dr="srgb",bo="srgb-linear",my="display-p3",op="display-p3-linear",Rf="linear",rn="srgb",Pf="rec709",If="p3",JV=0,dl=7680,KV=7681,qV=7682,QV=7683,YV=34055,ZV=34056,$V=5386,e6=512,t6=513,n6=514,i6=515,r6=516,s6=517,o6=518,dS=519,XN=512,JN=513,KN=514,MM=515,qN=516,QN=517,YN=518,ZN=519,Bf=35044,Ll=35048,a6=35040,l6=35045,c6=35049,u6=35041,d6=35046,h6=35050,f6=35042,p6="100",hS="300 es",Ps=2e3,Lf=2001;class Os{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}}const xi=["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 Db=1234567;const Dl=Math.PI/180,Yu=180/Math.PI;function mr(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(xi[t&255]+xi[t>>8&255]+xi[t>>16&255]+xi[t>>24&255]+"-"+xi[e&255]+xi[e>>8&255]+"-"+xi[e>>16&15|64]+xi[e>>24&255]+"-"+xi[n&63|128]+xi[n>>8&255]+"-"+xi[n>>16&255]+xi[n>>24&255]+xi[i&255]+xi[i>>8&255]+xi[i>>16&255]+xi[i>>24&255]).toLowerCase()}function Cn(t,e,n){return Math.max(e,Math.min(n,t))}function EM(t,e){return(t%e+e)%e}function m6(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)}function g6(t,e,n){return t!==e?(n-t)/(e-t):0}function Kh(t,e,n){return(1-n)*t+n*e}function v6(t,e,n,i){return Kh(t,e,1-Math.exp(-n*i))}function y6(t,e=1){return e-Math.abs(EM(t,e*2)-e)}function x6(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function _6(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function A6(t,e){return t+Math.floor(Math.random()*(e-t+1))}function S6(t,e){return t+Math.random()*(e-t)}
vendor: 39,107 bytes, line 71
71function w6(t){return t*(.5-Math.random())}function M6(t){t!==void 0&&(Db=t);let e=Db+=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 E6(t){return t*Dl}function C6(t){return t*Yu}function T6(t){return(t&t-1)===0&&t!==0}function b6(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function R6(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function P6(t,e,n,i,r){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((e+i)/2),h=o((e+i)/2),f=s((e-i)/2),p=o((e-i)/2),m=s((i-e)/2),v=o((i-e)/2);switch(r){case"XYX":t.set(a*h,l*f,l*p,a*c);break;case"YZY":t.set(l*p,a*h,l*f,a*c);break;case"ZXZ":t.set(l*f,l*p,a*h,a*c);break;case"XZX":t.set(a*h,l*v,l*m,a*c);break;case"YXY":t.set(l*m,a*h,l*v,a*c);break;case"ZYZ":t.set(l*v,l*m,a*h,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Fi(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Ct(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const CM={DEG2RAD:Dl,RAD2DEG:Yu,generateUUID:mr,clamp:Cn,euclideanModulo:EM,mapLinear:m6,inverseLerp:g6,lerp:Kh,damp:v6,pingpong:y6,smoothstep:x6,smootherstep:_6,randInt:A6,randFloat:S6,randFloatSpread:w6,seededRandom:M6,degToRad:E6,radToDeg:C6,isPowerOfTwo:T6,ceilPowerOfTwo:b6,floorPowerOfTwo:R6,setQuaternionFromProperEuler:P6,normalize:Ct,denormalize:Fi};class he{constructor(e=0,n=0){he.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.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 n=this.x,i=this.y,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6],this.y=r[1]*n+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=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 n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Cn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),r=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Et{constructor(e,n,i,r,s,o,a,l,c){Et.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,o,a,l,c)}set(e,n,i,r,s,o,a,l,c){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=n,h[4]=s,h[5]=l,h[6]=i,h[7]=o,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],h=i[4],f=i[7],p=i[2],m=i[5],v=i[8],S=r[0],A=r[3],g=r[6],x=r[1],_=r[4],M=r[7],b=r[2],C=r[5],P=r[8];return s[0]=o*S+a*x+l*b,s[3]=o*A+a*_+l*C,s[6]=o*g+a*M+l*P,s[1]=c*S+h*x+f*b,s[4]=c*A+h*_+f*C,s[7]=c*g+h*M+f*P,s[2]=p*S+m*x+v*b,s[5]=p*A+m*_+v*C,s[8]=p*g+m*M+v*P,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8];return n*o*h-n*a*c-i*s*h+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8],f=h*o-a*c,p=a*l-h*s,m=c*s-o*l,v=n*f+i*p+r*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const S=1/v;return e[0]=f*S,e[1]=(r*c-h*i)*S,e[2]=(a*i-r*o)*S,e[3]=p*S,e[4]=(h*n-r*l)*S,e[5]=(r*s-a*n)*S,e[6]=m*S,e[7]=(i*l-c*n)*S,e[8]=(o*n-i*s)*S,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(U_.makeScale(e,n)),this}rotate(e){return this.premultiply(U_.makeRotation(-e)),this}translate(e,n){return this.premultiply(U_.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<9;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const U_=new Et;function $N(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const I6={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function xu(t,e){return new I6[t](e)}function Df(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function eF(){const t=Df("canvas");return t.style.display="block",t}const Nb={};function Bu(t){t in Nb||(Nb[t]=!0,console.warn(t))}function B6(t,e,n){return new Promise(function(i,r){function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:r();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:i()}}setTimeout(s,n)})}const Fb=new Et().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),kb=new Et().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),qd={[bo]:{transfer:Rf,primaries:Pf,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t,fromReference:t=>t},[Dr]:{transfer:rn,primaries:Pf,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[op]:{transfer:Rf,primaries:If,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.applyMatrix3(kb),fromReference:t=>t.applyMatrix3(Fb)},[my]:{transfer:rn,primaries:If,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.convertSRGBToLinear().applyMatrix3(kb),fromReference:t=>t.applyMatrix3(Fb).convertLinearToSRGB()}},L6=new Set([bo,op]),Xt={enabled:!0,_workingColorSpace:bo,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!L6.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const i=qd[e].toReference,r=qd[n].fromReference;return r(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return qd[t].primaries},getTransfer:function(t){return t===io?Rf:qd[t].transfer},getLuminanceCoefficients:function(t,e=this._workingColorSpace){return t.fromArray(qd[e].luminanceCoefficients)}};function Lu(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function z_(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let bc;class tF{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{bc===void 0&&(bc=Df("canvas")),bc.width=e.width,bc.height=e.height;const i=bc.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=bc}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Df("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=Lu(s[o]/255)*255;return i.putImageData(r,0,0),n}else if(e.data){const n=e.data.slice(0);for(let i=0;i<n.length;i++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[i]=Math.floor(Lu(n[i]/255)*255):n[i]=Lu(n[i]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let D6=0,Sl=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:D6++}),this.uuid=mr(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={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(H_(r[o].image)):s.push(H_(r[o]))}else s=H_(r);i.url=s}return n||(e.images[this.uuid]=i),i}};function H_(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?tF.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let N6=0;class Zt extends Os{constructor(e=Zt.DEFAULT_IMAGE,n=Zt.DEFAULT_MAPPING,i=dr,r=dr,s=Tn,o=zr,a=Ci,l=fs,c=Zt.DEFAULT_ANISOTROPY,h=io){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:N6++}),this.uuid=mr(),this.name="",this.source=new Sl(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new he(0,0),this.repeat=new he(1,1),this.center=new he(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Et,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==oy)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Aa:e.x=e.x-Math.floor(e.x);break;case dr:e.x=e.x<0?0:1;break;case Ju: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 Aa:e.y=e.y-Math.floor(e.y);break;case dr:e.y=e.y<0?0:1;break;case Ju: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++}}Zt.DEFAULT_IMAGE=null;Zt.DEFAULT_MAPPING=oy;Zt.DEFAULT_ANISOTROPY=1;class Ut{constructor(e=0,n=0,i=0,r=1){Ut.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,r){return this.x=e,this.y=n,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.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 n=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*n+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*n+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*n+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,r,s;const l=e.elements,c=l[0],h=l[4],f=l[8],p=l[1],m=l[5],v=l[9],S=l[2],A=l[6],g=l[10];if(Math.abs(h-p)<.01&&Math.abs(f-S)<.01&&Math.abs(v-A)<.01){if(Math.abs(h+p)<.1&&Math.abs(f+S)<.1&&Math.abs(v+A)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const _=(c+1)/2,M=(m+1)/2,b=(g+1)/2,C=(h+p)/4,P=(f+S)/4,B=(v+A)/4;return _>M&&_>b?_<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(_),r=C/i,s=P/i):M>b?M<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(M),i=C/r,s=B/r):b<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(b),i=P/s,r=B/s),this.set(i,r,s,n),this}let x=Math.sqrt((A-v)*(A-v)+(f-S)*(f-S)+(p-h)*(p-h));return Math.abs(x)<.001&&(x=1),this.x=(A-v)/x,this.y=(f-S)/x,this.z=(p-h)/x,this.w=Math.acos((c+m+g-1)/2),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),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 nF extends Os{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Ut(0,0,e,n),this.scissorTest=!1,this.viewport=new Ut(0,0,e,n);const r={width:e,height:n,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Tn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new Zt(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}setSize(e,n,i=1){if(this.width!==e||this.height!==n||this.depth!==i){this.width=e,this.height=n,this.depth=i;for(let r=0,s=this.textures.length;r<s;r++)this.textures[r].image.width=e,this.textures[r].image.height=n,this.textures[r].image.depth=i;this.dispose()}this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}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 i=0,r=e.textures.length;i<r;i++)this.textures[i]=e.textures[i].clone(),this.textures[i].isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new Sl(n),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 ps extends nF{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class gy extends Zt{constructor(e=null,n=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=jn,this.minFilter=jn,this.wrapR=dr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class F6 extends ps{constructor(e=1,n=1,i=1,r={}){super(e,n,r),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new gy(null,e,n,i),this.texture.isRenderTargetTexture=!0}}class TM extends Zt{constructor(e=null,n=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=jn,this.minFilter=jn,this.wrapR=dr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class k6 extends ps{constructor(e=1,n=1,i=1,r={}){super(e,n,r),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new TM(null,e,n,i),this.texture.isRenderTargetTexture=!0}}class xn{constructor(e=0,n=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=i,this._w=r}static slerpFlat(e,n,i,r,s,o,a){let l=i[r+0],c=i[r+1],h=i[r+2],f=i[r+3];const p=s[o+0],m=s[o+1],v=s[o+2],S=s[o+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=h,e[n+3]=f;return}if(a===1){e[n+0]=p,e[n+1]=m,e[n+2]=v,e[n+3]=S;return}if(f!==S||l!==p||c!==m||h!==v){let A=1-a;const g=l*p+c*m+h*v+f*S,x=g>=0?1:-1,_=1-g*g;if(_>Number.EPSILON){const b=Math.sqrt(_),C=Math.atan2(b,g*x);A=Math.sin(A*C)/b,a=Math.sin(a*C)/b}const M=a*x;if(l=l*A+p*M,c=c*A+m*M,h=h*A+v*M,f=f*A+S*M,A===1-a){const b=1/Math.sqrt(l*l+c*c+h*h+f*f);l*=b,c*=b,h*=b,f*=b}}e[n]=l,e[n+1]=c,e[n+2]=h,e[n+3]=f}static multiplyQuaternionsFlat(e,n,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],h=i[r+3],f=s[o],p=s[o+1],m=s[o+2],v=s[o+3];return e[n]=a*v+h*f+l*m-c*p,e[n+1]=l*v+h*p+c*f-a*m,e[n+2]=c*v+h*m+a*p-l*f,e[n+3]=h*v-a*f-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,n,i,r){return this._x=e,this._y=n,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),h=a(r/2),f=a(s/2),p=l(i/2),m=l(r/2),v=l(s/2);switch(o){case"XYZ":this._x=p*h*f+c*m*v,this._y=c*m*f-p*h*v,this._z=c*h*v+p*m*f,this._w=c*h*f-p*m*v;break;case"YXZ":this._x=p*h*f+c*m*v,this._y=c*m*f-p*h*v,this._z=c*h*v-p*m*f,this._w=c*h*f+p*m*v;break;case"ZXY":this._x=p*h*f-c*m*v,this._y=c*m*f+p*h*v,this._z=c*h*v+p*m*f,this._w=c*h*f-p*m*v;break;case"ZYX":this._x=p*h*f-c*m*v,this._y=c*m*f+p*h*v,this._z=c*h*v-p*m*f,this._w=c*h*f+p*m*v;break;case"YZX":this._x=p*h*f+c*m*v,this._y=c*m*f+p*h*v,this._z=c*h*v-p*m*f,this._w=c*h*f-p*m*v;break;case"XZY":this._x=p*h*f-c*m*v,this._y=c*m*f-p*h*v,this._z=c*h*v+p*m*f,this._w=c*h*f+p*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],r=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],h=n[6],f=n[10],p=i+a+f;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(h-l)*m,this._y=(s-c)*m,this._z=(o-r)*m}else if(i>a&&i>f){const m=2*Math.sqrt(1+i-a-f);this._w=(h-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-i-f);this._w=(s-c)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+h)/m}else{const m=2*Math.sqrt(1+f-i-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+h)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Cn(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,n/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,r=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,h=n._w;return this._x=i*h+o*a+r*c-s*l,this._y=r*h+o*l+s*a-i*c,this._z=s*h+o*c+i*l-r*a,this._w=o*h-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*i+n*this._x,this._y=m*r+n*this._y,this._z=m*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),h=Math.atan2(c,a),f=Math.sin((1-n)*h)/c,p=Math.sin(n*h)/c;return this._w=o*f+this._w*p,this._x=i*f+this._x*p,this._y=r*f+this._y*p,this._z=s*f+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),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 k{constructor(e=0,n=0,i=0){k.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.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,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(Ob.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(Ob.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6]*r,this.y=s[1]*n+s[4]*i+s[7]*r,this.z=s[2]*n+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*n+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*n+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*n+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*n+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),h=2*(a*n-s*r),f=2*(s*i-o*n);return this.x=n+l*c+o*f-a*h,this.y=i+l*h+a*c-s*f,this.z=r+l*f+s*h-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 n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[4]*i+s[8]*r,this.y=s[1]*n+s[5]*i+s[9]*r,this.z=s[2]*n+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,r=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return G_.copy(this).projectOnVector(e),this.sub(G_)}reflect(e){return this.sub(G_.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Cn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return n*n+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const r=Math.sin(n)*e;return this.x=r*Math.sin(i),this.y=Math.cos(n)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=r,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*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,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(e),this.y=n,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const G_=new k,Ob=new xn;class ui{constructor(e=new k(1/0,1/0,1/0),n=new k(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n+=3)this.expandByPoint(Yr.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,i=e.count;n<i;n++)this.expandByPoint(Yr.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=Yr.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}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,n=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(n===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Yr):Yr.fromBufferAttribute(s,o),Yr.applyM
vendor: 3,585 bytes, line 71
71atrix4(e.matrixWorld),this.expandByPoint(Yr);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),zm.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),zm.copy(i.boundingBox)),zm.applyMatrix4(e.matrixWorld),this.union(zm)}const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],n);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,n){return n.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,Yr),Yr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Qd),Hm.subVectors(this.max,Qd),Rc.subVectors(e.a,Qd),Pc.subVectors(e.b,Qd),Ic.subVectors(e.c,Qd),Uo.subVectors(Pc,Rc),zo.subVectors(Ic,Pc),Va.subVectors(Rc,Ic);let n=[0,-Uo.z,Uo.y,0,-zo.z,zo.y,0,-Va.z,Va.y,Uo.z,0,-Uo.x,zo.z,0,-zo.x,Va.z,0,-Va.x,-Uo.y,Uo.x,0,-zo.y,zo.x,0,-Va.y,Va.x,0];return!V_(n,Rc,Pc,Ic,Hm)||(n=[1,0,0,0,1,0,0,0,1],!V_(n,Rc,Pc,Ic,Hm))?!1:(Gm.crossVectors(Uo,zo),n=[Gm.x,Gm.y,Gm.z],V_(n,Rc,Pc,Ic,Hm))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Yr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Yr).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:(Xs[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Xs[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Xs[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Xs[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Xs[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Xs[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Xs[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Xs[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Xs),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 Xs=[new k,new k,new k,new k,new k,new k,new k,new k],Yr=new k,zm=new ui,Rc=new k,Pc=new k,Ic=new k,Uo=new k,zo=new k,Va=new k,Qd=new k,Hm=new k,Gm=new k,ja=new k;function V_(t,e,n,i,r){for(let s=0,o=t.length-3;s<=o;s+=3){ja.fromArray(t,s);const a=r.x*Math.abs(ja.x)+r.y*Math.abs(ja.y)+r.z*Math.abs(ja.z),l=e.dot(ja),c=n.dot(ja),h=i.dot(ja);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>a)return!1}return!0}const O6=new ui,Yd=new k,j_=new k;class di{constructor(e=new k,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}
vendor: 17,410 bytes, line 71
71setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):O6.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,i.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 n=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,n){const i=this.center.distanceToSquared(e);return n.copy(e),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}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;Yd.subVectors(e,this.center);const n=Yd.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),r=(i-this.radius)*.5;this.center.addScaledVector(Yd,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(j_.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Yd.copy(e.center).add(j_)),this.expandByPoint(Yd.copy(e.center).sub(j_))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Js=new k,W_=new k,Vm=new k,Ho=new k,X_=new k,jm=new k,J_=new k;class rc{constructor(e=new k,n=new k(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.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,Js)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Js.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Js.copy(this.origin).addScaledVector(this.direction,n),Js.distanceToSquared(e))}distanceSqToSegment(e,n,i,r){W_.copy(e).add(n).multiplyScalar(.5),Vm.copy(n).sub(e).normalize(),Ho.copy(this.origin).sub(W_);const s=e.distanceTo(n)*.5,o=-this.direction.dot(Vm),a=Ho.dot(this.direction),l=-Ho.dot(Vm),c=Ho.lengthSq(),h=Math.abs(1-o*o);let f,p,m,v;if(h>0)if(f=o*l-a,p=o*a-l,v=s*h,f>=0)if(p>=-v)if(p<=v){const S=1/h;f*=S,p*=S,m=f*(f+o*p+2*a)+p*(o*f+p+2*l)+c}else p=s,f=Math.max(0,-(o*p+a)),m=-f*f+p*(p+2*l)+c;else p=-s,f=Math.max(0,-(o*p+a)),m=-f*f+p*(p+2*l)+c;else p<=-v?(f=Math.max(0,-(-o*s+a)),p=f>0?-s:Math.min(Math.max(-s,-l),s),m=-f*f+p*(p+2*l)+c):p<=v?(f=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+c):(f=Math.max(0,-(o*s+a)),p=f>0?s:Math.min(Math.max(-s,-l),s),m=-f*f+p*(p+2*l)+c);else p=o>0?-s:s,f=Math.max(0,-(o*p+a)),m=-f*f+p*(p+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),r&&r.copy(W_).addScaledVector(Vm,p),m}intersectSphere(e,n){Js.subVectors(e.center,this.origin);const i=Js.dot(this.direction),r=Js.dot(Js)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,r,s,o,a,l;const c=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,p=this.origin;return c>=0?(i=(e.min.x-p.x)*c,r=(e.max.x-p.x)*c):(i=(e.max.x-p.x)*c,r=(e.min.x-p.x)*c),h>=0?(s=(e.min.y-p.y)*h,o=(e.max.y-p.y)*h):(s=(e.max.y-p.y)*h,o=(e.min.y-p.y)*h),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),f>=0?(a=(e.min.z-p.z)*f,l=(e.max.z-p.z)*f):(a=(e.max.z-p.z)*f,l=(e.min.z-p.z)*f),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,n)}intersectsBox(e){return this.intersectBox(e,Js)!==null}intersectTriangle(e,n,i,r,s){X_.subVectors(n,e),jm.subVectors(i,e),J_.crossVectors(X_,jm);let o=this.direction.dot(J_),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Ho.subVectors(this.origin,e);const l=a*this.direction.dot(jm.crossVectors(Ho,jm));if(l<0)return null;const c=a*this.direction.dot(X_.cross(Ho));if(c<0||l+c>o)return null;const h=-a*Ho.dot(J_);return h<0?null:this.at(h/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class at{constructor(e,n,i,r,s,o,a,l,c,h,f,p,m,v,S,A){at.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,n,i,r,s,o,a,l,c,h,f,p,m,v,S,A)}set(e,n,i,r,s,o,a,l,c,h,f,p,m,v,S,A){const g=this.elements;return g[0]=e,g[4]=n,g[8]=i,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=h,g[10]=f,g[14]=p,g[3]=m,g[7]=v,g[11]=S,g[15]=A,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new at().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,r=1/Bc.setFromMatrixColumn(e,0).length(),s=1/Bc.setFromMatrixColumn(e,1).length(),o=1/Bc.setFromMatrixColumn(e,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*s,n[5]=i[5]*s,n[6]=i[6]*s,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),h=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const p=o*h,m=o*f,v=a*h,S=a*f;n[0]=l*h,n[4]=-l*f,n[8]=c,n[1]=m+v*c,n[5]=p-S*c,n[9]=-a*l,n[2]=S-p*c,n[6]=v+m*c,n[10]=o*l}else if(e.order==="YXZ"){const p=l*h,m=l*f,v=c*h,S=c*f;n[0]=p+S*a,n[4]=v*a-m,n[8]=o*c,n[1]=o*f,n[5]=o*h,n[9]=-a,n[2]=m*a-v,n[6]=S+p*a,n[10]=o*l}else if(e.order==="ZXY"){const p=l*h,m=l*f,v=c*h,S=c*f;n[0]=p-S*a,n[4]=-o*f,n[8]=v+m*a,n[1]=m+v*a,n[5]=o*h,n[9]=S-p*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const p=o*h,m=o*f,v=a*h,S=a*f;n[0]=l*h,n[4]=v*c-m,n[8]=p*c+S,n[1]=l*f,n[5]=S*c+p,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*c,v=a*l,S=a*c;n[0]=l*h,n[4]=S-p*f,n[8]=v*f+m,n[1]=f,n[5]=o*h,n[9]=-a*h,n[2]=-c*h,n[6]=m*f+v,n[10]=p-S*f}else if(e.order==="XZY"){const p=o*l,m=o*c,v=a*l,S=a*c;n[0]=l*h,n[4]=-f,n[8]=c*h,n[1]=p*f+S,n[5]=o*h,n[9]=m*f-v,n[2]=v*f-m,n[6]=a*h,n[10]=S*f+p}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(U6,e,z6)}lookAt(e,n,i){const r=this.elements;return or.subVectors(e,n),or.lengthSq()===0&&(or.z=1),or.normalize(),Go.crossVectors(i,or),Go.lengthSq()===0&&(Math.abs(i.z)===1?or.x+=1e-4:or.z+=1e-4,or.normalize(),Go.crossVectors(i,or)),Go.normalize(),Wm.crossVectors(or,Go),r[0]=Go.x,r[4]=Wm.x,r[8]=or.x,r[1]=Go.y,r[5]=Wm.y,r[9]=or.y,r[2]=Go.z,r[6]=Wm.z,r[10]=or.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],h=i[1],f=i[5],p=i[9],m=i[13],v=i[2],S=i[6],A=i[10],g=i[14],x=i[3],_=i[7],M=i[11],b=i[15],C=r[0],P=r[4],B=r[8],R=r[12],T=r[1],L=r[5],W=r[9],Y=r[13],q=r[2],j=r[6],Z=r[10],H=r[14],D=r[3],X=r[7],J=r[11],$=r[15];return s[0]=o*C+a*T+l*q+c*D,s[4]=o*P+a*L+l*j+c*X,s[8]=o*B+a*W+l*Z+c*J,s[12]=o*R+a*Y+l*H+c*$,s[1]=h*C+f*T+p*q+m*D,s[5]=h*P+f*L+p*j+m*X,s[9]=h*B+f*W+p*Z+m*J,s[13]=h*R+f*Y+p*H+m*$,s[2]=v*C+S*T+A*q+g*D,s[6]=v*P+S*L+A*j+g*X,s[10]=v*B+S*W+A*Z+g*J,s[14]=v*R+S*Y+A*H+g*$,s[3]=x*C+_*T+M*q+b*D,s[7]=x*P+_*L+M*j+b*X,s[11]=x*B+_*W+M*Z+b*J,s[15]=x*R+_*Y+M*H+b*$,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],h=e[2],f=e[6],p=e[10],m=e[14],v=e[3],S=e[7],A=e[11],g=e[15];return v*(+s*l*f-r*c*f-s*a*p+i*c*p+r*a*m-i*l*m)+S*(+n*l*m-n*c*p+s*o*p-r*o*m+r*c*h-s*l*h)+A*(+n*c*f-n*a*m-s*o*f+i*o*m+s*a*h-i*c*h)+g*(-r*a*h-n*l*f+n*a*p+r*o*f-i*o*p+i*l*h)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=n,r[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8],f=e[9],p=e[10],m=e[11],v=e[12],S=e[13],A=e[14],g=e[15],x=f*A*c-S*p*c+S*l*m-a*A*m-f*l*g+a*p*g,_=v*p*c-h*A*c-v*l*m+o*A*m+h*l*g-o*p*g,M=h*S*c-v*f*c+v*a*m-o*S*m-h*a*g+o*f*g,b=v*f*l-h*S*l-v*a*p+o*S*p+h*a*A-o*f*A,C=n*x+i*_+r*M+s*b;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]=x*P,e[1]=(S*p*s-f*A*s-S*r*m+i*A*m+f*r*g-i*p*g)*P,e[2]=(a*A*s-S*l*s+S*r*c-i*A*c-a*r*g+i*l*g)*P,e[3]=(f*l*s-a*p*s-f*r*c+i*p*c+a*r*m-i*l*m)*P,e[4]=_*P,e[5]=(h*A*s-v*p*s+v*r*m-n*A*m-h*r*g+n*p*g)*P,e[6]=(v*l*s-o*A*s-v*r*c+n*A*c+o*r*g-n*l*g)*P,e[7]=(o*p*s-h*l*s+h*r*c-n*p*c-o*r*m+n*l*m)*P,e[8]=M*P,e[9]=(v*f*s-h*S*s-v*i*m+n*S*m+h*i*g-n*f*g)*P,e[10]=(o*S*s-v*a*s+v*i*c-n*S*c-o*i*g+n*a*g)*P,e[11]=(h*a*s-o*f*s-h*i*c+n*f*c+o*i*m-n*a*m)*P,e[12]=b*P,e[13]=(h*S*r-v*f*r+v*i*p-n*S*p-h*i*A+n*f*A)*P,e[14]=(v*a*r-o*S*r-v*i*l+n*S*l+o*i*A-n*a*A)*P,e[15]=(o*f*r-h*a*r+h*i*l-n*f*l-o*i*p+n*a*p)*P,this}scale(e){const n=this.elements,i=e.x,r=e.y,s=e.z;return n[0]*=i,n[4]*=r,n[8]*=s,n[1]*=i,n[5]*=r,n[9]*=s,n[2]*=i,n[6]*=r,n[10]*=s,n[3]*=i,n[7]*=r,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,r))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),r=Math.sin(n),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,h=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,h*a+i,h*l-r*o,0,c*l-r*a,h*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,n,r,1,0,0,0,0,1),this}compose(e,n,i){const r=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,h=o+o,f=a+a,p=s*c,m=s*h,v=s*f,S=o*h,A=o*f,g=a*f,x=l*c,_=l*h,M=l*f,b=i.x,C=i.y,P=i.z;return r[0]=(1-(S+g))*b,r[1]=(m+M)*b,r[2]=(v-_)*b,r[3]=0,r[4]=(m-M)*C,r[5]=(1-(p+g))*C,r[6]=(A+x)*C,r[7]=0,r[8]=(v+_)*P,r[9]=(A-x)*P,r[10]=(1-(p+S))*P,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,n,i){const r=this.elements;let s=Bc.set(r[0],r[1],r[2]).length();const o=Bc.set(r[4],r[5],r[6]).length(),a=Bc.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Zr.copy(this);const c=1/s,h=1/o,f=1/a;return Zr.elements[0]*=c,Zr.elements[1]*=c,Zr.elements[2]*=c,Zr.elements[4]*=h,Zr.elements[5]*=h,Zr.elements[6]*=h,Zr.elements[8]*=f,Zr.elements[9]*=f,Zr.elements[10]*=f,n.setFromRotationMatrix(Zr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,n,i,r,s,o,a=Ps){const l=this.elements,c=2*s/(n-e),h=2*s/(i-r),f=(n+e)/(n-e),p=(i+r)/(i-r);let m,v;if(a===Ps)m=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===Lf)m=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=h,l[9]=p,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,i,r,s,o,a=Ps){const l=this.elements,c=1/(n-e),h=1/(i-r),f=1/(o-s),p=(n+e)*c,m=(i+r)*h;let v,S;if(a===Ps)v=(o+s)*f,S=-2*f;else if(a===Lf)v=s*f,S=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-p,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=S,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<16;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const Bc=new k,Zr=new at,U6=new k(0,0,0),z6=new k(1,1,1),Go=new k,Wm=new k,or=new k,Ub=new at,zb=new xn;class er{constructor(e=0,n=0,i=0,r=er.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,r=this._order){return this._x=e,this._y=n,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],h=r[9],f=r[2],p=r[6],m=r[10];switch(n){case"XYZ":this._y=Math.asin(Cn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Cn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Cn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Cn(f,-1,1)),Math.abs(f)<.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(Cn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Cn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return Ub.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Ub,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return zb.setFromEuler(this),this.setFromQuaternion(zb,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+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}}er.DEFAULT_ORDER="XYZ";class Nl{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 H6=0;const Hb=new k,Lc=new xn,Ks=new at,Xm=new k,Zd=new k,G6=new k,V6=new xn,Gb=new k(1,0,0),Vb=ne
vendor: 9,541 bytes, line 71
71w k(0,1,0),jb=new k(0,0,1),Wb={type:"added"},j6={type:"removed"},Dc={type:"childadded",child:null},K_={type:"childremoved",child:null};class kt extends Os{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:H6++}),this.uuid=mr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=kt.DEFAULT_UP.clone();const e=new k,n=new er,i=new xn,r=new k(1,1,1);function s(){i.setFromEuler(n,!1)}function o(){n.setFromQuaternion(i,void 0,!1)}n._onChange(s),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new at},normalMatrix:{value:new Et}}),this.matrix=new at,this.matrixWorld=new at,this.matrixAutoUpdate=kt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Nl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return Lc.setFromAxisAngle(e,n),this.quaternion.multiply(Lc),this}rotateOnWorldAxis(e,n){return Lc.setFromAxisAngle(e,n),this.quaternion.premultiply(Lc),this}rotateX(e){return this.rotateOnAxis(Gb,e)}rotateY(e){return this.rotateOnAxis(Vb,e)}rotateZ(e){return this.rotateOnAxis(jb,e)}translateOnAxis(e,n){return Hb.copy(e).applyQuaternion(this.quaternion),this.position.add(Hb.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(Gb,e)}translateY(e){return this.translateOnAxis(Vb,e)}translateZ(e){return this.translateOnAxis(jb,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Ks.copy(this.matrixWorld).invert())}lookAt(e,n,i){e.isVector3?Xm.copy(e):Xm.set(e,n,i);const r=this.parent;this.updateWorldMatrix(!0,!1),Zd.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ks.lookAt(Zd,Xm,this.up):Ks.lookAt(Xm,Zd,this.up),this.quaternion.setFromRotationMatrix(Ks),r&&(Ks.extractRotation(r.matrixWorld),Lc.setFromRotationMatrix(Ks),this.quaternion.premultiply(Lc.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.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(Wb),Dc.child=e,this.dispatchEvent(Dc),Dc.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(j6),K_.child=e,this.dispatchEvent(K_),K_.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),Ks.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Ks.multiply(e.parent.matrixWorld)),e.applyMatrix4(Ks),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Wb),Dc.child=e,this.dispatchEvent(Dc),Dc.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,n);if(o!==void 0)return o}}getObjectsByProperty(e,n,i=[]){this[e]===n&&i.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,n,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Zd,e,G6),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Zd,V6,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null&&(e(n),n.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 n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].updateMatrixWorld(e)}updateWorldMatrix(e,n){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].updateWorldMatrix(!1,!0)}}toJSON(e){const n=e===void 0||typeof e=="string",i={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,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.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));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,h=l.length;c<h;c++){const f=l[c];s(e.shapes,f)}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(n){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),h=o(e.images),f=o(e.shapes),p=o(e.skeletons),m=o(e.animations),v=o(e.nodes);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),h.length>0&&(i.images=h),f.length>0&&(i.shapes=f),p.length>
vendor: 13,594 bytes, line 71
710&&(i.skeletons=p),m.length>0&&(i.animations=m),v.length>0&&(i.nodes=v)}return i.object=r,i;function o(a){const l=[];for(const c in a){const h=a[c];delete h.metadata,l.push(h)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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)),n===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}kt.DEFAULT_UP=new k(0,1,0);kt.DEFAULT_MATRIX_AUTO_UPDATE=!0;kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const $r=new k,qs=new k,q_=new k,Qs=new k,Nc=new k,Fc=new k,Xb=new k,Q_=new k,Y_=new k,Z_=new k;class Ki{constructor(e=new k,n=new k,i=new k){this.a=e,this.b=n,this.c=i}static getNormal(e,n,i,r){r.subVectors(i,n),$r.subVectors(e,n),r.cross($r);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,n,i,r,s){$r.subVectors(r,n),qs.subVectors(i,n),q_.subVectors(e,n);const o=$r.dot($r),a=$r.dot(qs),l=$r.dot(q_),c=qs.dot(qs),h=qs.dot(q_),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const p=1/f,m=(c*l-a*h)*p,v=(o*h-a*l)*p;return s.set(1-m-v,v,m)}static containsPoint(e,n,i,r){return this.getBarycoord(e,n,i,r,Qs)===null?!1:Qs.x>=0&&Qs.y>=0&&Qs.x+Qs.y<=1}static getInterpolation(e,n,i,r,s,o,a,l){return this.getBarycoord(e,n,i,r,Qs)===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,Qs.x),l.addScaledVector(o,Qs.y),l.addScaledVector(a,Qs.z),l)}static isFrontFacing(e,n,i,r){return $r.subVectors(i,n),qs.subVectors(e,n),$r.cross(qs).dot(r)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,r){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,n,i,r){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return $r.subVectors(this.c,this.b),qs.subVectors(this.a,this.b),$r.cross(qs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ki.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ki.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,i,r,s){return Ki.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}containsPoint(e){return Ki.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ki.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,r=this.b,s=this.c;let o,a;Nc.subVectors(r,i),Fc.subVectors(s,i),Q_.subVectors(e,i);const l=Nc.dot(Q_),c=Fc.dot(Q_);if(l<=0&&c<=0)return n.copy(i);Y_.subVectors(e,r);const h=Nc.dot(Y_),f=Fc.dot(Y_);if(h>=0&&f<=h)return n.copy(r);const p=l*f-h*c;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),n.copy(i).addScaledVector(Nc,o);Z_.subVectors(e,s);const m=Nc.dot(Z_),v=Fc.dot(Z_);if(v>=0&&m<=v)return n.copy(s);const S=m*c-l*v;if(S<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(i).addScaledVector(Fc,a);const A=h*v-m*f;if(A<=0&&f-h>=0&&m-v>=0)return Xb.subVectors(s,r),a=(f-h)/(f-h+(m-v)),n.copy(r).addScaledVector(Xb,a);const g=1/(A+S+p);return o=S*g,a=p*g,n.copy(i).addScaledVector(Nc,o).addScaledVector(Fc,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const iF={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},Vo={h:0,s:0,l:0},Jm={h:0,s:0,l:0};function $_(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class ze{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===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,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Dr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Xt.toWorkingColorSpace(this,n),this}setRGB(e,n,i,r=Xt.workingColorSpace){return this.r=e,this.g=n,this.b=i,Xt.toWorkingColorSpace(this,r),this}setHSL(e,n,i,r=Xt.workingColorSpace){if(e=EM(e,1),n=Cn(n,0,1),i=Cn(i,0,1),n===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+n):i+n-i*n,o=2*i-s;this.r=$_(o,s,e+1/3),this.g=$_(o,s,e),this.b=$_(o,s,e-1/3)}return Xt.toWorkingColorSpace(this,r),this}setStyle(e,n=Dr){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(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,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(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,n);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 i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Dr){const i=iF[e.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Lu(e.r),this.g=Lu(e.g),this.b=Lu(e.b),this}copyLinearToSRGB(e){return this.r=z_(e.r),this.g=z_(e.g),this.b=z_(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Dr){return Xt.fromWorkingColorSpace(_i.copy(this),e),Math.round(Cn(_i.r*255,0,255))*65536+Math.round(Cn(_i.g*255,0,255))*256+Math.round(Cn(_i.b*255,0,255))}getHexString(e=Dr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Xt.workingColorSpace){Xt.fromWorkingColorSpace(_i.copy(this),n);const i=_i.r,r=_i.g,s=_i.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const h=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=h<=.5?f/(o+a):f/(2-o-a),o){case i:l=(r-s)/f+(r<s?6:0);break;case r:l=(s-i)/f+2;break;case s:l=(i-r)/f+4;break}l/=6}return e.h=l,e.s=c,e.l=h,e}getRGB(e,n=Xt.workingColorSpace){return Xt.fromWorkingColorSpace(_i.copy(this),n),e.r=_i.r,e.g=_i.g,e.b=_i.b,e}getStyle(e=Dr){Xt.fromWorkingColorSpace(_i.copy(this),e);const n=_i.r,i=_i.g,r=_i.b;return e!==Dr?`color(${e} ${n.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,n,i){return this.getHSL(Vo),this.setHSL(Vo.h+e,Vo.s+n,Vo.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.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,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,i){return this.r=e.r+(n.r-e.r)*i,this.g=e.g+(n.g-e.g)*i,this.b=e.b+(n.b-e.b)*i,this}lerpHSL(e,n){this.getHSL(Vo),e.getHSL(Jm);const i=Kh(Vo.h,Jm.h,n),r=Kh(Vo.s,Jm.s,n),s=Kh(Vo.l,Jm.l,n);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*n+s[3]*i+s[6]*r,this.g=s[1]*n+s[4]*i+s[7]*r,this.b=s[2]*n+s[5]*i+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const _i=new ze;ze.NAMES=iF;let W6=0;class zn extends Os{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:W6++}),this.uuid=mr(),this.name="",this.type="Material",this.blending=Il,this.side=ks,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=j0,this.blendDst=W0,this.blendEquation=ea,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ze(0,0,0),this.blendAlpha=0,this.depthFunc=Ef,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=dS,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=dl,this.stencilZFail=dl,this.stencilZPass=dl,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const r=this[n];if(r===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};
vendor: 54,063 bytes, lines 71-223
71i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Il&&(i.blending=this.blending),this.side!==ks&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==j0&&(i.blendSrc=this.blendSrc),this.blendDst!==W0&&(i.blendDst=this.blendDst),this.blendEquation!==ea&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Ef&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==dS&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==dl&&(i.stencilFail=this.stencilFail),this.stencilZFail!==dl&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==dl&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.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 n=e.clippingPlanes;let i=null;if(n!==null){const r=n.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=n[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class hr extends zn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ze(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 er,this.combine=rp,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 ro=X6();function X6(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),i=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,r[l]=24,r[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,r[l]=-c-1,r[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,r[l]=13,r[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,h=0;for(;!(c&8388608);)c<<=1,h-=8388608;c&=-8388609,h+=947912704,s[l]=c|h}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Xi(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Cn(t,-65504,65504),ro.floatView[0]=t;const e=ro.uint32View[0],n=e>>23&511;return ro.baseTable[n]+((e&8388607)>>ro.shiftTable[n])}function Eh(t){const e=t>>10;return ro.uint32View[0]=ro.mantissaTable[ro.offsetTable[e]+(t&1023)]+ro.exponentTable[e],ro.floatView[0]}const J6={toHalfFloat:Xi,fromHalfFloat:Eh},Fn=new k,Km=new he;class Nt{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=Bf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Qi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Bu("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}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,n,i){e*=this.itemSize,i*=n.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=n.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,i=this.count;n<i;n++)Km.fromBufferAttribute(this,n),Km.applyMatrix3(e),this.setXY(n,Km.x,Km.y);else if(this.itemSize===3)for(let n=0,i=this.count;n<i;n++)Fn.fromBufferAttribute(this,n),Fn.applyMatrix3(e),this.setXYZ(n,Fn.x,Fn.y,Fn.z);return this}applyMatrix4(e){for(let n=0,i=this.count;n<i;n++)Fn.fromBufferAttribute(this,n),Fn.applyMatrix4(e),this.setXYZ(n,Fn.x,Fn.y,Fn.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)Fn.fromBufferAttribute(this,n),Fn.applyNormalMatrix(e),this.setXYZ(n,Fn.x,Fn.y,Fn.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)Fn.fromBufferAttribute(this,n),Fn.transformDirection(e),this.setXYZ(n,Fn.x,Fn.y,Fn.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let i=this.array[e*this.itemSize+n];return this.normalized&&(i=Fi(i,this.array)),i}setComponent(e,n,i){return this.normalized&&(i=Ct(i,this.array)),this.array[e*this.itemSize+n]=i,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=Fi(n,this.array)),n}setX(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=Fi(n,this.array)),n}setY(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized&&(n=Fi(n,this.array)),n}setZ(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized&&(n=Fi(n,this.array)),n}setW(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array)),this.array[e+0]=n,this.array[e+1]=i,this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array),s=Ct(s,this.array)),this.array[e+0]=n,this.array[e+1]=i,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!==Bf&&(e.usage=this.usage),e}}class K6 extends Nt{constructor(e,n,i){super(new Int8Array(e),n,i)}}class q6 extends Nt{constructor(e,n,i){super(new Uint8Array(e),n,i)}}class Q6 extends Nt{constructor(e,n,i){super(new Uint8ClampedArray(e),n,i)}}class Y6 extends Nt{constructor(e,n,i){super(new Int16Array(e),n,i)}}class bM extends Nt{constructor(e,n,i){super(new Uint16Array(e),n,i)}}class Z6 extends Nt{constructor(e,n,i){super(new Int32Array(e),n,i)}}class RM extends Nt{constructor(e,n,i){super(new Uint32Array(e),n,i)}}class $6 extends Nt{constructor(e,n,i){super(new Uint16Array(e),n,i),this.isFloat16BufferAttribute=!0}getX(e){let n=Eh(this.array[e*this.itemSize]);return this.normalized&&(n=Fi(n,this.array)),n}setX(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize]=Xi(n),this}getY(e){let n=Eh(this.array[e*this.itemSize+1]);return this.normalized&&(n=Fi(n,this.array)),n}setY(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize+1]=Xi(n),this}getZ(e){let n=Eh(this.array[e*this.itemSize+2]);return this.normalized&&(n=Fi(n,this.array)),n}setZ(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize+2]=Xi(n),this}getW(e){let n=Eh(this.array[e*this.itemSize+3]);return this.normalized&&(n=Fi(n,this.array)),n}setW(e,n){return this.normalized&&(n=Ct(n,this.array)),this.array[e*this.itemSize+3]=Xi(n),this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array)),this.array[e+0]=Xi(n),this.array[e+1]=Xi(i),this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array)),this.array[e+0]=Xi(n),this.array[e+1]=Xi(i),this.array[e+2]=Xi(r),this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array),s=Ct(s,this.array)),this.array[e+0]=Xi(n),this.array[e+1]=Xi(i),this.array[e+2]=Xi(r),this.array[e+3]=Xi(s),this}}class et extends Nt{constructor(e,n,i){super(new Float32Array(e),n,i)}}let ej=0;const Pr=new at,e1=new kt,kc=new k,ar=new ui,$d=new ui,ei=new k;class St extends Os{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:ej++}),this.uuid=mr(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new($N(e)?RM:bM)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,i=0){this.groups.push({start:e,count:n,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(e),n.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new Et().getNormalMatrix(e);i.applyNormalMatrix(s),i.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 Pr.makeRotationFromQuaternion(e),this.applyMatrix4(Pr),this}rotateX(e){return Pr.makeRotationX(e),this.applyMatrix4(Pr),this}rotateY(e){return Pr.makeRotationY(e),this.applyMatrix4(Pr),this}rotateZ(e){return Pr.makeRotationZ(e),this.applyMatrix4(Pr),this}translate(e,n,i){return Pr.makeTranslation(e,n,i),this.applyMatrix4(Pr),this}scale(e,n,i){return Pr.makeScale(e,n,i),this.applyMatrix4(Pr),this}lookAt(e){return e1.lookAt(e),e1.updateMatrix(),this.applyMatrix4(e1.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(kc).negate(),this.translate(kc.x,kc.y,kc.z),this}setFromPoints(e){const n=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];n.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new et(n,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ui);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new k(-1/0,-1/0,-1/0),new k(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let i=0,r=n.length;i<r;i++){const s=n[i];ar.setFromBufferAttribute(s),this.morphTargetsRelative?(ei.addVectors(this.boundingBox.min,ar.min),this.boundingBox.expandByPoint(ei),ei.addVectors(this.boundingBox.max,ar.max),this.boundingBox.expandByPoint(ei)):(this.boundingBox.expandByPoint(ar.min),this.boundingBox.expandByPoint(ar.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new di);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new k,1/0);return}if(e){const i=this.boundingSphere.center;if(ar.setFromBufferAttribute(e),n)for(let s=0,o=n.length;s<o;s++){const a=n[s];$d.setFromBufferAttribute(a),this.morphTargetsRelative?(ei.addVectors(ar.min,$d.min),ar.expandByPoint(ei),ei.addVectors(ar.max,$d.max),ar.expandByPoint(ei)):(ar.expandByPoint($d.min),ar.expandByPoint($d.max))}ar.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;s++)ei.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(ei));if(n)for(let s=0,o=n.length;s<o;s++){const a=n[s],l=this.morphTargetsRelative;for(let c=0,h=a.count;c<h;c++)ei.fromBufferAttribute(a,c),l&&(kc.fromBufferAttribute(e,c),ei.add(kc)),r=Math.max(r,i.distanceToSquared(ei))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=n.position,r=n.normal,s=n.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Nt(new Float32Array(4*i.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let B=0;B<i.count;B++)a[B]=new k,l[B]=new k;const c=new k,h=new k,f=new k,p=new he,m=new he,v=new he,S=new k,A=new k;function g(B,R,T){c.fromBufferAttribute(i,B),h.fromBufferAttribute(i,R),f.fromBufferAttribute(i,T),p.fromBufferAttribute(s,B),m.fromBufferAttribute(s,R),v.fromBufferAttribute(s,T),h.sub(c),f.sub(c),m.sub(p),v.sub(p);const L=1/(m.x*v.y-v.x*m.y);isFinite(L)&&(S.copy(h).multiplyScalar(v.y).addScaledVector(f,-m.y).multiplyScalar(L),A.copy(f).multiplyScalar(m.x).addScaledVector(h,-v.x).multiplyScalar(L),a[B].add(S),a[R].add(S),a[T].add(S),l[B].add(A),l[R].add(A),l[T].add(A))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let B=0,R=x.length;B<R;++B){const T=x[B],L=T.start,W=T.count;for(let Y=L,q=L+W;Y<q;Y+=3)g(e.getX(Y+0),e.getX(Y+1),e.getX(Y+2))}const _=new k,M=new k,b=new k,C=new k;function P(B){b.fromBufferAttribute(r,B),C.copy(b);const R=a[B];_.copy(R),_.sub(b.multiplyScalar(b.dot(R))).normalize(),M.crossVectors(C,R);const L=M.dot(l[B])<0?-1:1;o.setXYZW(B,_.x,_.y,_.z,L)}for(let B=0,R=x.length;B<R;++B){const T=x[B],L=T.start,W=T.count;for(let Y=L,q=L+W;Y<q;Y+=3)P(e.getX(Y+0)),P(e.getX(Y+1)),P(e.getX(Y+2))}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Nt(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let p=0,m=i.count;p<m;p++)i.setXYZ(p,0,0,0);const r=new k,s=new k,o=new k,a=new k,l=new k,c=new k,h=new k,f=new k;if(e)for(let p=0,m=e.count;p<m;p+=3){const v=e.getX(p+0),S=e.getX(p+1),A=e.getX(p+2);r.fromBufferAttribute(n,v),s.fromBufferAttribute(n,S),o.fromBufferAttribute(n,A),h.subVectors(o,s),f.subVectors(r,s),h.cross(f),a.fromBufferAttribute(i,v),l.fromBufferAttribute(i,S),c.fromBufferAttribute(i,A),a.add(h),l.add(h),c.add(h),i.setXYZ(v,a.x,a.y,a.z),i.setXYZ(S,l.x,l.y,l.z),i.setXYZ(A,c.x,c.y,c.z)}else for(let p=0,m=n.count;p<m;p+=3)r.fromBufferAttribute(n,p+0),s.fromBufferAttribute(n,p+1),o.fromBufferAttribute(n,p+2),h.subVectors(o,s),f.subVectors(r,s),h.cross(f),i.setXYZ(p+0,h.x,h.y,h.z),i.setXYZ(p+1,h.x,h.y,h.z),i.setXYZ(p+2,h.x,h.y,h.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,i=e.count;n<i;n++)ei.fromBufferAttribute(e,n),ei.normalize(),e.setXYZ(n,ei.x,ei.y,ei.z)}toNonIndexed(){function e(a,l){const c=a.array,h=a.itemSize,f=a.normalized,p=new c.constructor(l.length*h);let m=0,v=0;for(let S=0,A=l.length;S<A;S++){a.isInterleavedBufferAttribute?m=l[S]*a.data.stride+a.offset:m=l[S]*h;for(let g=0;g<h;g++)p[v++]=c[m++]}return new Nt(p,h,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new St,i=this.index.array,r=this.attributes;for(const a in r){const l=r[a],c=e(l,i);n.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let h=0,f=c.length;h<f;h++){const p=c[h],m=e(p,i);l.push(m)}n.morphAttributes[a]=l}n.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addGroup(c.start,c.count,c.materialIndex)}return n}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),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 n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const c=i[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],h=[];for(let f=0,p=c.length;f<p;f++){const m=c[f];h.push(m.toJSON(e.data))}h.length>0&&(r[l]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(n));const r=e.attributes;for(const c in r){const h=r[c];this.setAttribute(c,h.clone(n))}const s=e.morphAttributes;for(const c in s){const h=[],f=s[c];for(let p=0,m=f.length;p<m;p++)h.push(f[p].clone(n));this.morphAttributes[c]=h}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,h=o.length;c<h;c++){const f=o[c];this.addGroup(f.start,f.count,f.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 Jb=new at,Wa=new rc,qm=new di,Kb=new k,Oc=new k,Uc=new k,zc=new k,t1=new k,Qm=new k,Ym=new he,Zm=new he,$m=new he,qb=new k,Qb=new k,Yb=new k,eg=new k,tg=new k;class bn extends kt{constructor(e=new St,n=new hr){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),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 n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[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,n){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,o=i.morphTargetsRelative;n.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){Qm.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const h=a[l],f=s[l];h!==0&&(t1.fromBufferAttribute(f,e),o?Qm.addScaledVector(t1,h):Qm.addScaledVector(t1.sub(n),h))}n.add(Qm)}return n}raycast(e,n){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),qm.copy(i.boundingSphere),qm.applyMatrix4(s),Wa.copy(e.ray).recast(e.near),!(qm.containsPoint(Wa.origin)===!1&&(Wa.intersectSphere(qm,Kb)===null||Wa.origin.distanceToSquared(Kb)>(e.far-e.near)**2))&&(Jb.copy(s).invert(),Wa.copy(e.ray).applyMatrix4(Jb),!(i.boundingBox!==null&&Wa.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,Wa)))}_computeIntersections(e,n,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,h=s.attributes.uv1,f=s.attributes.normal,p=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,S=p.length;v<S;v++){const A=p[v],g=o[A.materialIndex],x=Math.max(A.start,m.start),_=Math.min(a.count,Math.min(A.start+A.count,m.start+m.count));for(let M=x,b=_;M<b;M+=3){const C=a.getX(M),P=a.getX(M+1),B=a.getX(M+2);r=ng(this,g,e,i,c,h,f,C,P,B),r&&(r.faceIndex=Math.floor(M/3),r.face.materialIndex=A.materialIndex,n.push(r))}}else{const v=Math.max(0,m.start),S=Math.min(a.count,m.start+m.count);for(let A=v,g=S;A<g;A+=3){const x=a.getX(A),_=a.getX(A+1),M=a.getX(A+2);r=ng(this,o,e,i,c,h,f,x,_,M),r&&(r.faceIndex=Math.floor(A/3),n.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,S=p.length;v<S;v++){const A=p[v],g=o[A.materialIndex],x=Math.max(A.start,m.start),_=Math.min(l.count,Math.min(A.start+A.count,m.start+m.count));for(let M=x,b=_;M<b;M+=3){const C=M,P=M+1,B=M+2;r=ng(this,g,e,i,c,h,f,C,P,B),r&&(r.faceIndex=Math.floor(M/3),r.face.materialIndex=A.materialIndex,n.push(r))}}else{const v=Math.max(0,m.start),S=Math.min(l.count,m.start+m.count);for(let A=v,g=S;A<g;A+=3){const x=A,_=A+1,M=A+2;r=ng(this,o,e,i,c,h,f,x,_,M),r&&(r.faceIndex=Math.floor(A/3),n.push(r))}}}}function tj(t,e,n,i,r,s,o,a){let l;if(e.side===Ui?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===ks,a),l===null)return null;tg.copy(a),tg.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(tg);return c<n.near||c>n.far?null:{distance:c,point:tg.clone(),object:t}}function ng(t,e,n,i,r,s,o,a,l,c){t.getVertexPosition(a,Oc),t.getVertexPosition(l,Uc),t.getVertexPosition(c,zc);const h=tj(t,e,n,i,Oc,Uc,zc,eg);if(h){r&&(Ym.fromBufferAttribute(r,a),Zm.fromBufferAttribute(r,l),$m.fromBufferAttribute(r,c),h.uv=Ki.getInterpolation(eg,Oc,Uc,zc,Ym,Zm,$m,new he)),s&&(Ym.fromBufferAttribute(s,a),Zm.fromBufferAttribute(s,l),$m.fromBufferAttribute(s,c),h.uv1=Ki.getInterpolation(eg,Oc,Uc,zc,Ym,Zm,$m,new he)),o&&(qb.fromBufferAttribute(o,a),Qb.fromBufferAttribute(o,l),Yb.fromBufferAttribute(o,c),h.normal=Ki.getInterpolation(eg,Oc,Uc,zc,qb,Qb,Yb,new k),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const f={a,b:l,c,normal:new k,materialIndex:0};Ki.getNormal(Oc,Uc,zc,f.normal),h.face=f}return h}class Ra extends St{constructor(e=1,n=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],h=[],f=[];let p=0,m=0;v("z","y","x",-1,-1,i,n,e,o,s,0),v("z","y","x",1,-1,i,n,-e,o,s,1),v("x","z","y",1,1,e,i,n,r,o,2),v("x","z","y",1,-1,e,i,-n,r,o,3),v("x","y","z",1,-1,e,n,i,r,s,4),v("x","y","z",-1,-1,e,n,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new et(c,3)),this.setAttribute("normal",new et(h,3)),this.setAttribute("uv",new et(f,2));function v(S,A,g,x,_,M,b,C,P,B,R){const T=M/P,L=b/B,W=M/2,Y=b/2,q=C/2,j=P+1,Z=B+1;let H=0,D=0;const X=new k;for(let J=0;J<Z;J++){const $=J*L-Y;for(let ue=0;ue<j;ue++){const Ae=ue*T-W;X[S]=Ae*x,X[A]=$*_,X[g]=q,c.push(X.x,X.y,X.z),X[S]=0,X[A]=0,X[g]=C>0?1:-1,h.push(X.x,X.y,X.z),f.push(ue/P),f.push(1-J/B),H+=1}}for(let J=0;J<B;J++)for(let $=0;$<P;$++){const ue=p+$+j*J,Ae=p+$+j*(J+1),te=p+($+1)+j*(J+1),ce=p+($+1)+j*J;l.push(ue,Ae,ce),l.push(Ae,te,ce),D+=6}a.addGroup(m,D,R),m+=D,p+=H}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ra(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Zu(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][i]=null):e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function Di(t){const e={};for(let n=0;n<t.length;n++){const i=Zu(t[n]);for(const r in i)e[r]=i[r]}return e}function nj(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function rF(t){const e=t.getRenderTarget();return e===null?t.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Xt.workingColorSpace}const PM={clone:Zu,merge:Di};var ij=`void main() {
72	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
73}`,rj=`void main() {
74	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
75}`;class Wr extends zn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=ij,this.fragmentShader=rj,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=Zu(e.uniforms),this.uniformsGroups=nj(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?n.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[r]={type:"m4",value:o.toArray()}:n.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class ap extends kt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new at,this.projectionMatrix=new at,this.projectionMatrixInverse=new at,this.coordinateSystem=Ps}copy(e,n){return super.copy(e,n),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,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const jo=new k,Zb=new he,$b=new he;class un extends ap{constructor(e=50,n=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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 n=.5*this.getFilmHeight()/e;this.fov=Yu*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Dl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Yu*2*Math.atan(Math.tan(Dl*.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,n,i){jo.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(jo.x,jo.y).multiplyScalar(-e/jo.z),jo.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(jo.x,jo.y).multiplyScalar(-e/jo.z)}getViewSize(e,n){return this.getViewBounds(e,Zb,$b),n.subVectors($b,Zb)}setViewOffset(e,n,i,r,s,o){this.aspect=e/n,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=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Dl*.5*this.fov)/this.zoom,i=2*n,r=this.aspect*i,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,n-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Hc=-90,Gc=1;class IM extends kt{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new un(Hc,Gc,e,n);r.layers=this.layers,this.add(r);const s=new un(Hc,Gc,e,n);s.layers=this.layers,this.add(s);const o=new un(Hc,Gc,e,n);o.layers=this.layers,this.add(o);const a=new un(Hc,Gc,e,n);a.layers=this.layers,this.add(a);const l=new un(Hc,Gc,e,n);l.layers=this.layers,this.add(l);const c=new un(Hc,Gc,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,r,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===Ps)i.up.set(0,1,0),i.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===Lf)i.up.set(0,-1,0),i.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 n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,h]=this.children,f=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const S=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(n,s),e.setRenderTarget(i,1,r),e.render(n,o),e.setRenderTarget(i,2,r),e.render(n,a),e.setRenderTarget(i,3,r),e.render(n,l),e.setRenderTarget(i,4,r),e.render(n,c),i.texture.generateMipmaps=S,e.setRenderTarget(i,5,r),e.render(n,h),e.setRenderTarget(f,p,m),e.xr.enabled=v,i.texture.needsPMREMUpdate=!0}}class lp extends Zt{constructor(e,n,i,r,s,o,a,l,c,h){e=e!==void 0?e:[],n=n!==void 0?n:wo,super(e,n,i,r,s,o,a,l,c,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class BM extends ps{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new lp(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Tn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`
76
77				varying vec3 vWorldDirection;
78
79				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
80
81					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
82
83				}
84
85				void main() {
86
87					vWorldDirection = transformDirection( position, modelMatrix );
88
89					#include <begin_vertex>
90					#include <project_vertex>
91
92				}
93			`,fragmentShader:`
94
95				uniform sampler2D tEquirect;
96
97				varying vec3 vWorldDirection;
98
99				#include <common>
100
101				void main() {
102
103					vec3 direction = normalize( vWorldDirection );
104
105					vec2 sampleUV = equirectUv( direction );
106
107					gl_FragColor = texture2D( tEquirect, sampleUV );
108
109				}
110			`},r=new Ra(5,5,5),s=new Wr({name:"CubemapFromEquirect",uniforms:Zu(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Ui,blending:go});s.uniforms.tEquirect.value=n;const o=new bn(r,s),a=n.minFilter;return n.minFilter===zr&&(n.minFilter=Tn),new IM(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,i,r);e.setRenderTarget(s)}}const n1=new k,sj=new k,oj=new Et;class no{constructor(e=new k(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,r){return this.normal.set(e,n,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const r=n1.subVectors(i,n).cross(sj.subVectors(e,n)).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,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const i=e.delta(n1),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:n.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>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,n){const i=n||oj.getNormalMatrix(e),r=this.coplanarPoint(n1).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Xa=new di,ig=new k;class cp{constructor(e=new no,n=new no,i=new no,r=new no,s=new no,o=new no){this.planes=[e,n,i,r,s,o]}set(e,n,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=Ps){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],h=r[5],f=r[6],p=r[7],m=r[8],v=r[9],S=r[10],A=r[11],g=r[12],x=r[13],_=r[14],M=r[15];if(i[0].setComponents(l-s,p-c,A-m,M-g).normalize(),i[1].setComponents(l+s,p+c,A+m,M+g).normalize(),i[2].setComponents(l+o,p+h,A+v,M+x).normalize(),i[3].setComponents(l-o,p-h,A-v,M-x).normalize(),i[4].setComponents(l-a,p-f,A-S,M-_).normalize(),n===Ps)i[5].setComponents(l+a,p+f,A+S,M+_).normalize();else if(n===Lf)i[5].setComponents(a,f,S,_).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Xa.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Xa.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Xa)}intersectsSprite(e){return Xa.center.set(0,0,0),Xa.radius=.7071067811865476,Xa.applyMatrix4(e.matrixWorld),this.intersectsSphere(Xa)}intersectsSphere(e){const n=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const n=this.planes;for(let i=0;i<6;i++){const r=n[i];if(ig.x=r.normal.x>0?e.max.x:e.min.x,ig.y=r.normal.y>0?e.max.y:e.min.y,ig.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(ig)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function sF(){let t=null,e=!1,n=null,i=null;function r(s,o){n(s,o),i=t.requestAnimationFrame(r)}return{start:function(){e!==!0&&n!==null&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function aj(t){const e=new WeakMap;function n(a,l){const c=a.array,h=a.usage,f=c.byteLength,p=t.createBuffer();t.bindBuffer(l,p),t.bufferData(l,c,h),a.onUploadCallback();let m;if(c instanceof Float32Array)m=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=t.HALF_FLOAT:m=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=t.SHORT;else if(c instanceof Uint32Array)m=t.UNSIGNED_INT;else if(c instanceof Int32Array)m=t.INT;else if(c instanceof Int8Array)m=t.BYTE;else if(c instanceof Uint8Array)m=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=t.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:f}}function i(a,l,c){const h=l.array,f=l._updateRange,p=l.updateRanges;if(t.bindBuffer(c,a),f.count===-1&&p.length===0&&t.bufferSubData(c,0,h),p.length!==0){for(let m=0,v=p.length;m<v;m++){const S=p[m];t.bufferSubData(c,S.start*h.BYTES_PER_ELEMENT,h,S.start,S.count)}l.clearUpdateRanges()}f.count!==-1&&(t.bufferSubData(c,f.offset*h.BYTES_PER_ELEMENT,h,f.offset,f.count),f.count=-1),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&&(t.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const h=e.get(a);(!h||h.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,n(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.");i(c.buffer,a,l),c.version=a.version}}return{get:r,remove:s,update:o}}class dd extends St{constructor(e=1,n=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:i,heightSegments:r};const s=e/2,o=n/2,a=Math.floor(i),l=Math.floor(r),c=a+1,h=l+1,f=e/a,p=n/l,m=[],v=[],S=[],A=[];for(let g=0;g<h;g++){const x=g*p-o;for(let _=0;_<c;_++){const M=_*f-s;v.push(M,-x,0),S.push(0,0,1),A.push(_/a),A.push(1-g/l)}}for(let g=0;g<l;g++)for(let x=0;x<a;x++){const _=x+c*g,M=x+c*(g+1),b=x+1+c*(g+1),C=x+1+c*g;m.push(_,M,C),m.push(M,b,C)}this.setIndex(m),this.setAttribute("position",new et(v,3)),this.setAttribute("normal",new et(S,3)),this.setAttribute("uv",new et(A,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new dd(e.width,e.height,e.widthSegments,e.heightSegments)}}var lj=`#ifdef USE_ALPHAHASH
111	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
112#endif`,cj=`#ifdef USE_ALPHAHASH
113	const float ALPHA_HASH_SCALE = 0.05;
114	float hash2D( vec2 value ) {
115		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
116	}
117	float hash3D( vec3 value ) {
118		return hash2D( vec2( hash2D( value.xy ), value.z ) );
119	}
120	float getAlphaHashThreshold( vec3 position ) {
121		float maxDeriv = max(
122			length( dFdx( position.xyz ) ),
123			length( dFdy( position.xyz ) )
124		);
125		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
126		vec2 pixScales = vec2(
127			exp2( floor( log2( pixScale ) ) ),
128			exp2( ceil( log2( pixScale ) ) )
129		);
130		vec2 alpha = vec2(
131			hash3D( floor( pixScales.x * position.xyz ) ),
132			hash3D( floor( pixScales.y * position.xyz ) )
133		);
134		float lerpFactor = fract( log2( pixScale ) );
135		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
136		float a = min( lerpFactor, 1.0 - lerpFactor );
137		vec3 cases = vec3(
138			x * x / ( 2.0 * a * ( 1.0 - a ) ),
139			( x - 0.5 * a ) / ( 1.0 - a ),
140			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
141		);
142		float threshold = ( x < ( 1.0 - a ) )
143			? ( ( x < a ) ? cases.x : cases.y )
144			: cases.z;
145		return clamp( threshold , 1.0e-6, 1.0 );
146	}
147#endif`,uj=`#ifdef USE_ALPHAMAP
148	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
149#endif`,dj=`#ifdef USE_ALPHAMAP
150	uniform sampler2D alphaMap;
151#endif`,hj=`#ifdef USE_ALPHATEST
152	#ifdef ALPHA_TO_COVERAGE
153	diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
154	if ( diffuseColor.a == 0.0 ) discard;
155	#else
156	if ( diffuseColor.a < alphaTest ) discard;
157	#endif
158#endif`,fj=`#ifdef USE_ALPHATEST
159	uniform float alphaTest;
160#endif`,pj=`#ifdef USE_AOMAP
161	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
162	reflectedLight.indirectDiffuse *= ambientOcclusion;
163	#if defined( USE_CLEARCOAT ) 
164		clearcoatSpecularIndirect *= ambientOcclusion;
165	#endif
166	#if defined( USE_SHEEN ) 
167		sheenSpecularIndirect *= ambientOcclusion;
168	#endif
169	#if defined( USE_ENVMAP ) && defined( STANDARD )
170		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
171		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
172	#endif
173#endif`,mj=`#ifdef USE_AOMAP
174	uniform sampler2D aoMap;
175	uniform float aoMapIntensity;
176#endif`,gj=`#ifdef USE_BATCHING
177	#if ! defined( GL_ANGLE_multi_draw )
178	#define gl_DrawID _gl_DrawID
179	uniform int _gl_DrawID;
180	#endif
181	uniform highp sampler2D batchingTexture;
182	uniform highp usampler2D batchingIdTexture;
183	mat4 getBatchingMatrix( const in float i ) {
184		int size = textureSize( batchingTexture, 0 ).x;
185		int j = int( i ) * 4;
186		int x = j % size;
187		int y = j / size;
188		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
189		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
190		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
191		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
192		return mat4( v1, v2, v3, v4 );
193	}
194	float getIndirectIndex( const in int i ) {
195		int size = textureSize( batchingIdTexture, 0 ).x;
196		int x = i % size;
197		int y = i / size;
198		return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
199	}
200#endif
201#ifdef USE_BATCHING_COLOR
202	uniform sampler2D batchingColorTexture;
203	vec3 getBatchingColor( const in float i ) {
204		int size = textureSize( batchingColorTexture, 0 ).x;
205		int j = int( i );
206		int x = j % size;
207		int y = j / size;
208		return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
209	}
210#endif`,vj=`#ifdef USE_BATCHING
211	mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
212#endif`,yj=`vec3 transformed = vec3( position );
213#ifdef USE_ALPHAHASH
214	vPosition = vec3( position );
215#endif`,xj=`vec3 objectNormal = vec3( normal );
216#ifdef USE_TANGENT
217	vec3 objectTangent = vec3( tangent.xyz );
218#endif`,_j=`float G_BlinnPhong_Implicit( ) {
219	return 0.25;
220}
221float D_BlinnPhong( const in float shininess, const in float dotNH ) {
222	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
223}
224vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
225	vec3 halfDir = normalize( lightDir + viewDir );
226	float dotNH = saturate( dot( normal, halfDir ) );
227	float dotVH = saturate( dot( viewDir, halfDir ) );
228	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
229	float G = G_BlinnPhong_Implicit( );
230	float D = D_BlinnPhong( shininess, dotNH );
231	return F * ( G * D );
232} // validated`,Aj=`#ifdef USE_IRIDESCENCE
233	const mat3 XYZ_TO_REC709 = mat3(
234		 3.2404542, -0.9692660,  0.0556434,
235		-1.5371385,  1.8760108, -0.2040259,
236		-0.4985314,  0.0415560,  1.0572252
237	);
238	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
239		vec3 sqrtF0 = sqrt( fresnel0 );
240		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
241	}
242	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
243		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
244	}
245	float IorToFresnel0( float transmittedIor, float incidentIor ) {
246		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
247	}
248	vec3 evalSensitivity( float OPD, vec3 shift ) {
249		float phase = 2.0 * PI * OPD * 1.0e-9;
250		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
251		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
252		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
253		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
254		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 ) );
255		xyz /= 1.0685e-7;
256		vec3 rgb = XYZ_TO_REC709 * xyz;
257		return rgb;
258	}
259	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
260		vec3 I;
261		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
262		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
263		float cosTheta2Sq = 1.0 - sinTheta2Sq;
264		if ( cosTheta2Sq < 0.0 ) {
265			return vec3( 1.0 );
266		}
267		float cosTheta2 = sqrt( cosTheta2Sq );
268		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
269		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
270		float T121 = 1.0 - R12;
271		float phi12 = 0.0;
272		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
273		float phi21 = PI - phi12;
274		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
275		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
276		vec3 phi23 = vec3( 0.0 );
277		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
278		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
279		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
280		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
281		vec3 phi = vec3( phi21 ) + phi23;
282		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
283		vec3 r123 = sqrt( R123 );
284		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
285		vec3 C0 = R12 + Rs;
286		I = C0;
287		vec3 Cm = Rs - T121;
288		for ( int m = 1; m <= 2; ++ m ) {
289			Cm *= r123;
290			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
291			I += Cm * Sm;
292		}
293		return max( I, vec3( 0.0 ) );
294	}
295#endif`,Sj=`#ifdef USE_BUMPMAP
296	uniform sampler2D bumpMap;
297	uniform float bumpScale;
298	vec2 dHdxy_fwd() {
299		vec2 dSTdx = dFdx( vBumpMapUv );
300		vec2 dSTdy = dFdy( vBumpMapUv );
301		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
302		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
303		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
304		return vec2( dBx, dBy );
305	}
306	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
307		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
308		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
309		vec3 vN = surf_norm;
310		vec3 R1 = cross( vSigmaY, vN );
311		vec3 R2 = cross( vN, vSigmaX );
312		float fDet = dot( vSigmaX, R1 ) * faceDirection;
313		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
314		return normalize( abs( fDet ) * surf_norm - vGrad );
315	}
316#endif`,wj=`#if NUM_CLIPPING_PLANES > 0
317	vec4 plane;
318	#ifdef ALPHA_TO_COVERAGE
319		float distanceToPlane, distanceGradient;
320		float clipOpacity = 1.0;
321		#pragma unroll_loop_start
322		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
323			plane = clippingPlanes[ i ];
324			distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
325			distanceGradient = fwidth( distanceToPlane ) / 2.0;
326			clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
327			if ( clipOpacity == 0.0 ) discard;
328		}
329		#pragma unroll_loop_end
330		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
331			float unionClipOpacity = 1.0;
332			#pragma unroll_loop_start
333			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
334				plane = clippingPlanes[ i ];
335				distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
336				distanceGradient = fwidth( distanceToPlane ) / 2.0;
337				unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
338			}
339			#pragma unroll_loop_end
340			clipOpacity *= 1.0 - unionClipOpacity;
341		#endif
342		diffuseColor.a *= clipOpacity;
343		if ( diffuseColor.a == 0.0 ) discard;
344	#else
345		#pragma unroll_loop_start
346		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
347			plane = clippingPlanes[ i ];
348			if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
349		}
350		#pragma unroll_loop_end
351		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
352			bool clipped = true;
353			#pragma unroll_loop_start
354			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
355				plane = clippingPlanes[ i ];
356				clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
357			}
358			#pragma unroll_loop_end
359			if ( clipped ) discard;
360		#endif
361	#endif
362#endif`,Mj=`#if NUM_CLIPPING_PLANES > 0
363	varying vec3 vClipPosition;
364	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
365#endif`,Ej=`#if NUM_CLIPPING_PLANES > 0
366	varying vec3 vClipPosition;
367#endif`,Cj=`#if NUM_CLIPPING_PLANES > 0
368	vClipPosition = - mvPosition.xyz;
369#endif`,Tj=`#if defined( USE_COLOR_ALPHA )
370	diffuseColor *= vColor;
371#elif defined( USE_COLOR )
372	diffuseColor.rgb *= vColor;
373#endif`,bj=`#if defined( USE_COLOR_ALPHA )
374	varying vec4 vColor;
375#elif defined( USE_COLOR )
376	varying vec3 vColor;
377#endif`,Rj=`#if defined( USE_COLOR_ALPHA )
378	varying vec4 vColor;
379#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
380	varying vec3 vColor;
381#endif`,Pj=`#if defined( USE_COLOR_ALPHA )
382	vColor = vec4( 1.0 );
383#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
384	vColor = vec3( 1.0 );
385#endif
386#ifdef USE_COLOR
387	vColor *= color;
388#endif
389#ifdef USE_INSTANCING_COLOR
390	vColor.xyz *= instanceColor.xyz;
391#endif
392#ifdef USE_BATCHING_COLOR
393	vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
394	vColor.xyz *= batchingColor.xyz;
395#endif`,Ij=`#define PI 3.141592653589793
396#define PI2 6.283185307179586
397#define PI_HALF 1.5707963267948966
398#define RECIPROCAL_PI 0.3183098861837907
399#define RECIPROCAL_PI2 0.15915494309189535
400#define EPSILON 1e-6
401#ifndef saturate
402#define saturate( a ) clamp( a, 0.0, 1.0 )
403#endif
404#define whiteComplement( a ) ( 1.0 - saturate( a ) )
405float pow2( const in float x ) { return x*x; }
406vec3 pow2( const in vec3 x ) { return x*x; }
407float pow3( const in float x ) { return x*x*x; }
408float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
409float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
410float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
411highp float rand( const in vec2 uv ) {
412	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
413	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
414	return fract( sin( sn ) * c );
415}
416#ifdef HIGH_PRECISION
417	float precisionSafeLength( vec3 v ) { return length( v ); }
418#else
419	float precisionSafeLength( vec3 v ) {
420		float maxComponent = max3( abs( v ) );
421		return length( v / maxComponent ) * maxComponent;
422	}
423#endif
424struct IncidentLight {
425	vec3 color;
426	vec3 direction;
427	bool visible;
428};
429struct ReflectedLight {
430	vec3 directDiffuse;
431	vec3 directSpecular;
432	vec3 indirectDiffuse;
433	vec3 indirectSpecular;
434};
435#ifdef USE_ALPHAHASH
436	varying vec3 vPosition;
437#endif
438vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
439	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
440}
441vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
442	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
443}
444mat3 transposeMat3( const in mat3 m ) {
445	mat3 tmp;
446	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
447	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
448	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
449	return tmp;
450}
451bool isPerspectiveMatrix( mat4 m ) {
452	return m[ 2 ][ 3 ] == - 1.0;
453}
454vec2 equirectUv( in vec3 dir ) {
455	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
456	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
457	return vec2( u, v );
458}
459vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
460	return RECIPROCAL_PI * diffuseColor;
461}
462vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
463	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
464	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
465}
466float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
467	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
468	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
469} // validated`,Bj=`#ifdef ENVMAP_TYPE_CUBE_UV
470	#define cubeUV_minMipLevel 4.0
471	#define cubeUV_minTileSize 16.0
472	float getFace( vec3 direction ) {
473		vec3 absDirection = abs( direction );
474		float face = - 1.0;
475		if ( absDirection.x > absDirection.z ) {
476			if ( absDirection.x > absDirection.y )
477				face = direction.x > 0.0 ? 0.0 : 3.0;
478			else
479				face = direction.y > 0.0 ? 1.0 : 4.0;
480		} else {
481			if ( absDirection.z > absDirection.y )
482				face = direction.z > 0.0 ? 2.0 : 5.0;
483			else
484				face = direction.y > 0.0 ? 1.0 : 4.0;
485		}
486		return face;
487	}
488	vec2 getUV( vec3 direction, float face ) {
489		vec2 uv;
490		if ( face == 0.0 ) {
491			uv = vec2( direction.z, direction.y ) / abs( direction.x );
492		} else if ( face == 1.0 ) {
493			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
494		} else if ( face == 2.0 ) {
495			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
496		} else if ( face == 3.0 ) {
497			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
498		} else if ( face == 4.0 ) {
499			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
500		} else {
501			uv = vec2( direction.x, direction.y ) / abs( direction.z );
502		}
503		return 0.5 * ( uv + 1.0 );
504	}
505	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
506		float face = getFace( direction );
507		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
508		mipInt = max( mipInt, cubeUV_minMipLevel );
509		float faceSize = exp2( mipInt );
510		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
511		if ( face > 2.0 ) {
512			uv.y += faceSize;
513			face -= 3.0;
514		}
515		uv.x += face * faceSize;
516		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
517		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
518		uv.x *= CUBEUV_TEXEL_WIDTH;
519		uv.y *= CUBEUV_TEXEL_HEIGHT;
520		#ifdef texture2DGradEXT
521			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
522		#else
523			return texture2D( envMap, uv ).rgb;
524		#endif
525	}
526	#define cubeUV_r0 1.0
527	#define cubeUV_m0 - 2.0
528	#define cubeUV_r1 0.8
529	#define cubeUV_m1 - 1.0
530	#define cubeUV_r4 0.4
531	#define cubeUV_m4 2.0
532	#define cubeUV_r5 0.305
533	#define cubeUV_m5 3.0
534	#define cubeUV_r6 0.21
535	#define cubeUV_m6 4.0
536	float roughnessToMip( float roughness ) {
537		float mip = 0.0;
538		if ( roughness >= cubeUV_r1 ) {
539			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
540		} else if ( roughness >= cubeUV_r4 ) {
541			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
542		} else if ( roughness >= cubeUV_r5 ) {
543			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
544		} else if ( roughness >= cubeUV_r6 ) {
545			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
546		} else {
547			mip = - 2.0 * log2( 1.16 * roughness );		}
548		return mip;
549	}
550	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
551		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
552		float mipF = fract( mip );
553		float mipInt = floor( mip );
554		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
555		if ( mipF == 0.0 ) {
556			return vec4( color0, 1.0 );
557		} else {
558			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
559			return vec4( mix( color0, color1, mipF ), 1.0 );
560		}
561	}
562#endif`,Lj=`vec3 transformedNormal = objectNormal;
563#ifdef USE_TANGENT
564	vec3 transformedTangent = objectTangent;
565#endif
566#ifdef USE_BATCHING
567	mat3 bm = mat3( batchingMatrix );
568	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
569	transformedNormal = bm * transformedNormal;
570	#ifdef USE_TANGENT
571		transformedTangent = bm * transformedTangent;
572	#endif
573#endif
574#ifdef USE_INSTANCING
575	mat3 im = mat3( instanceMatrix );
576	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
577	transformedNormal = im * transformedNormal;
578	#ifdef USE_TANGENT
579		transformedTangent = im * transformedTangent;
580	#endif
581#endif
582transformedNormal = normalMatrix * transformedNormal;
583#ifdef FLIP_SIDED
584	transformedNormal = - transformedNormal;
585#endif
586#ifdef USE_TANGENT
587	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
588	#ifdef FLIP_SIDED
589		transformedTangent = - transformedTangent;
590	#endif
591#endif`,Dj=`#ifdef USE_DISPLACEMENTMAP
592	uniform sampler2D displacementMap;
593	uniform float displacementScale;
594	uniform float displacementBias;
595#endif`,Nj=`#ifdef USE_DISPLACEMENTMAP
596	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
596placementBias );
597#endif`,Fj=`#ifdef USE_EMISSIVEMAP
598	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
599	totalEmissiveRadiance *= emissiveColor.rgb;
600#endif`,kj=`#ifdef USE_EMISSIVEMAP
601	uniform sampler2D emissiveMap;
602#endif`,Oj="gl_FragColor = linearToOutputTexel( gl_FragColor );",Uj=`
603const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(
604	vec3( 0.8224621, 0.177538, 0.0 ),
605	vec3( 0.0331941, 0.9668058, 0.0 ),
606	vec3( 0.0170827, 0.0723974, 0.9105199 )
607);
608const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(
609	vec3( 1.2249401, - 0.2249404, 0.0 ),
610	vec3( - 0.0420569, 1.0420571, 0.0 ),
611	vec3( - 0.0196376, - 0.0786361, 1.0982735 )
612);
613vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {
614	return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );
615}
616vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {
617	return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );
618}
619vec4 LinearTransferOETF( in vec4 value ) {
620	return value;
621}
622vec4 sRGBTransferOETF( in vec4 value ) {
623	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 );
624}`,zj=`#ifdef USE_ENVMAP
625	#ifdef ENV_WORLDPOS
626		vec3 cameraToFrag;
627		if ( isOrthographic ) {
628			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
629		} else {
630			cameraToFrag = normalize( vWorldPosition - cameraPosition );
631		}
632		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
633		#ifdef ENVMAP_MODE_REFLECTION
634			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
635		#else
636			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
637		#endif
638	#else
639		vec3 reflectVec = vReflect;
640	#endif
641	#ifdef ENVMAP_TYPE_CUBE
642		vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
643	#else
644		vec4 envColor = vec4( 0.0 );
645	#endif
646	#ifdef ENVMAP_BLENDING_MULTIPLY
647		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
648	#elif defined( ENVMAP_BLENDING_MIX )
649		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
650	#elif defined( ENVMAP_BLENDING_ADD )
651		outgoingLight += envColor.xyz * specularStrength * reflectivity;
652	#endif
653#endif`,Hj=`#ifdef USE_ENVMAP
654	uniform float envMapIntensity;
655	uniform float flipEnvMap;
656	uniform mat3 envMapRotation;
657	#ifdef ENVMAP_TYPE_CUBE
658		uniform samplerCube envMap;
659	#else
660		uniform sampler2D envMap;
661	#endif
662	
663#endif`,Gj=`#ifdef USE_ENVMAP
664	uniform float reflectivity;
665	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
666		#define ENV_WORLDPOS
667	#endif
668	#ifdef ENV_WORLDPOS
669		varying vec3 vWorldPosition;
670		uniform float refractionRatio;
671	#else
672		varying vec3 vReflect;
673	#endif
674#endif`,Vj=`#ifdef USE_ENVMAP
675	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
676		#define ENV_WORLDPOS
677	#endif
678	#ifdef ENV_WORLDPOS
679		
680		varying vec3 vWorldPosition;
681	#else
682		varying vec3 vReflect;
683		uniform float refractionRatio;
684	#endif
685#endif`,jj=`#ifdef USE_ENVMAP
686	#ifdef ENV_WORLDPOS
687		vWorldPosition = worldPosition.xyz;
688	#else
689		vec3 cameraToVertex;
690		if ( isOrthographic ) {
691			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
692		} else {
693			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
694		}
695		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
696		#ifdef ENVMAP_MODE_REFLECTION
697			vReflect = reflect( cameraToVertex, worldNormal );
698		#else
699			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
700		#endif
701	#endif
702#endif`,Wj=`#ifdef USE_FOG
703	vFogDepth = - mvPosition.z;
704#endif`,Xj=`#ifdef USE_FOG
705	varying float vFogDepth;
706#endif`,Jj=`#ifdef USE_FOG
707	#ifdef FOG_EXP2
708		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
709	#else
710		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
711	#endif
712	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
713#endif`,Kj=`#ifdef USE_FOG
714	uniform vec3 fogColor;
715	varying float vFogDepth;
716	#ifdef FOG_EXP2
717		uniform float fogDensity;
718	#else
719		uniform float fogNear;
720		uniform float fogFar;
721	#endif
722#endif`,qj=`#ifdef USE_GRADIENTMAP
723	uniform sampler2D gradientMap;
724#endif
725vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
726	float dotNL = dot( normal, lightDirection );
727	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
728	#ifdef USE_GRADIENTMAP
729		return vec3( texture2D( gradientMap, coord ).r );
730	#else
731		vec2 fw = fwidth( coord ) * 0.5;
732		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
733	#endif
734}`,Qj=`#ifdef USE_LIGHTMAP
735	uniform sampler2D lightMap;
736	uniform float lightMapIntensity;
737#endif`,Yj=`LambertMaterial material;
738material.diffuseColor = diffuseColor.rgb;
739material.specularStrength = specularStrength;`,Zj=`varying vec3 vViewPosition;
740struct LambertMaterial {
741	vec3 diffuseColor;
742	float specularStrength;
743};
744void 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 ) {
745	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
746	vec3 irradiance = dotNL * directLight.color;
747	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
748}
749void 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 ) {
750	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
751}
752#define RE_Direct				RE_Direct_Lambert
753#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,$j=`uniform bool receiveShadow;
754uniform vec3 ambientLightColor;
755#if defined( USE_LIGHT_PROBES )
756	uniform vec3 lightProbe[ 9 ];
757#endif
758vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
759	float x = normal.x, y = normal.y, z = normal.z;
760	vec3 result = shCoefficients[ 0 ] * 0.886227;
761	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
762	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
763	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
764	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
765	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
766	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
767	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
768	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
769	return result;
770}
771vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
772	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
773	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
774	return irradiance;
775}
776vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
777	vec3 irradiance = ambientLightColor;
778	return irradiance;
779}
780float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
781	float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
782	if ( cutoffDistance > 0.0 ) {
783		distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
784	}
785	return distanceFalloff;
786}
787float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
788	return smoothstep( coneCosine, penumbraCosine, angleCosine );
789}
790#if NUM_DIR_LIGHTS > 0
791	struct DirectionalLight {
792		vec3 direction;
793		vec3 color;
794	};
795	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
796	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
797		light.color = directionalLight.color;
798		light.direction = directionalLight.direction;
799		light.visible = true;
800	}
801#endif
802#if NUM_POINT_LIGHTS > 0
803	struct PointLight {
804		vec3 position;
805		vec3 color;
806		float distance;
807		float decay;
808	};
809	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
810	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
811		vec3 lVector = pointLight.position - geometryPosition;
812		light.direction = normalize( lVector );
813		float lightDistance = length( lVector );
814		light.color = pointLight.color;
815		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
816		light.visible = ( light.color != vec3( 0.0 ) );
817	}
818#endif
819#if NUM_SPOT_LIGHTS > 0
820	struct SpotLight {
821		vec3 position;
822		vec3 direction;
823		vec3 color;
824		float distance;
825		float decay;
826		float coneCos;
827		float penumbraCos;
828	};
829	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
830	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
831		vec3 lVector = spotLight.position - geometryPosition;
832		light.direction = normalize( lVector );
833		float angleCos = dot( light.direction, spotLight.direction );
834		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
835		if ( spotAttenuation > 0.0 ) {
836			float lightDistance = length( lVector );
837			light.color = spotLight.color * spotAttenuation;
838			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
839			light.visible = ( light.color != vec3( 0.0 ) );
840		} else {
841			light.color = vec3( 0.0 );
842			light.visible = false;
843		}
844	}
845#endif
846#if NUM_RECT_AREA_LIGHTS > 0
847	struct RectAreaLight {
848		vec3 color;
849		vec3 position;
850		vec3 halfWidth;
851		vec3 halfHeight;
852	};
853	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
854	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
855#endif
856#if NUM_HEMI_LIGHTS > 0
857	struct HemisphereLight {
858		vec3 direction;
859		vec3 skyColor;
860		vec3 groundColor;
861	};
862	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
863	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
864		float dotNL = dot( normal, hemiLight.direction );
865		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
866		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
867		return irradiance;
868	}
869#endif`,eW=`#ifdef USE_ENVMAP
870	vec3 getIBLIrradiance( const in vec3 normal ) {
871		#ifdef ENVMAP_TYPE_CUBE_UV
872			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
873			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
874			return PI * envMapColor.rgb * envMapIntensity;
875		#else
876			return vec3( 0.0 );
877		#endif
878	}
879	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
880		#ifdef ENVMAP_TYPE_CUBE_UV
881			vec3 reflectVec = reflect( - viewDir, normal );
882			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
883			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
884			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
885			return envMapColor.rgb * envMapIntensity;
886		#else
887			return vec3( 0.0 );
888		#endif
889	}
890	#ifdef USE_ANISOTROPY
891		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
892			#ifdef ENVMAP_TYPE_CUBE_UV
893				vec3 bentNormal = cross( bitangent, viewDir );
894				bentNormal = normalize( cross( bentNormal, bitangent ) );
895				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
896				return getIBLRadiance( viewDir, bentNormal, roughness );
897			#else
898				return vec3( 0.0 );
899			#endif
900		}
901	#endif
902#endif`,tW=`ToonMaterial material;
903material.diffuseColor = diffuseColor.rgb;`,nW=`varying vec3 vViewPosition;
904struct ToonMaterial {
905	vec3 diffuseColor;
906};
907void 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 ) {
908	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
909	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
910}
911void 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 ) {
912	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
913}
914#define RE_Direct				RE_Direct_Toon
915#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,iW=`BlinnPhongMaterial material;
916material.diffuseColor = diffuseColor.rgb;
917material.specularColor = specular;
918material.specularShininess = shininess;
919material.specularStrength = specularStrength;`,rW=`varying vec3 vViewPosition;
920struct BlinnPhongMaterial {
921	vec3 diffuseColor;
922	vec3 specularColor;
923	float specularShininess;
924	float specularStrength;
925};
926void 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 ) {
927	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
928	vec3 irradiance = dotNL * directLight.color;
929	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
930	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
931}
932void 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 ) {
933	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
934}
935#define RE_Direct				RE_Direct_BlinnPhong
936#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,sW=`PhysicalMaterial material;
937material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
938vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
939float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
940material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
941material.roughness = min( material.roughness, 1.0 );
942#ifdef IOR
943	material.ior = ior;
944	#ifdef USE_SPECULAR
945		float specularIntensityFactor = specularIntensity;
946		vec3 specularColorFactor = specularColor;
947		#ifdef USE_SPECULAR_COLORMAP
948			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
949		#endif
950		#ifdef USE_SPECULAR_INTENSITYMAP
951			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
952		#endif
953		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
954	#else
955		float specularIntensityFactor = 1.0;
956		vec3 specularColorFactor = vec3( 1.0 );
957		material.specularF90 = 1.0;
958	#endif
959	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
960#else
961	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
962	material.specularF90 = 1.0;
963#endif
964#ifdef USE_CLEARCOAT
965	material.clearcoat = clearcoat;
966	material.clearcoatRoughness = clearcoatRoughness;
967	material.clearcoatF0 = vec3( 0.04 );
968	material.clearcoatF90 = 1.0;
969	#ifdef USE_CLEARCOATMAP
970		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
971	#endif
972	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
973		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
974	#endif
975	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
976	material.clearcoatRoughness += geometryRoughness;
977	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
978#endif
979#ifdef USE_DISPERSION
980	material.dispersion = dispersion;
981#endif
982#ifdef USE_IRIDESCENCE
983	material.iridescence = iridescence;
984	material.iridescenceIOR = iridescenceIOR;
985	#ifdef USE_IRIDESCENCEMAP
986		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
987	#endif
988	#ifdef USE_IRIDESCENCE_THICKNESSMAP
989		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
990	#else
991		material.iridescenceThickness = iridescenceThicknessMaximum;
992	#endif
993#endif
994#ifdef USE_SHEEN
995	material.sheenColor = sheenColor;
996	#ifdef USE_SHEEN_COLORMAP
997		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
998	#endif
999	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
1000	#ifdef USE_SHEEN_ROUGHNESSMAP
1001		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
1002	#endif
1003#endif
1004#ifdef USE_ANISOTROPY
1005	#ifdef USE_ANISOTROPYMAP
1006		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
1007		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
1008		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
1009	#else
1010		vec2 anisotropyV = anisotropyVector;
1011	#endif
1012	material.anisotropy = length( anisotropyV );
1013	if( material.anisotropy == 0.0 ) {
1014		anisotropyV = vec2( 1.0, 0.0 );
1015	} else {
1016		anisotropyV /= material.anisotropy;
1017		material.anisotropy = saturate( material.anisotropy );
1018	}
1019	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
1020	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
1021	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
1022#endif`,oW
vendor: 14,687 bytes, lines 1022-1323
1022=`struct PhysicalMaterial {
1023	vec3 diffuseColor;
1024	float roughness;
1025	vec3 specularColor;
1026	float specularF90;
1027	float dispersion;
1028	#ifdef USE_CLEARCOAT
1029		float clearcoat;
1030		float clearcoatRoughness;
1031		vec3 clearcoatF0;
1032		float clearcoatF90;
1033	#endif
1034	#ifdef USE_IRIDESCENCE
1035		float iridescence;
1036		float iridescenceIOR;
1037		float iridescenceThickness;
1038		vec3 iridescenceFresnel;
1039		vec3 iridescenceF0;
1040	#endif
1041	#ifdef USE_SHEEN
1042		vec3 sheenColor;
1043		float sheenRoughness;
1044	#endif
1045	#ifdef IOR
1046		float ior;
1047	#endif
1048	#ifdef USE_TRANSMISSION
1049		float transmission;
1050		float transmissionAlpha;
1051		float thickness;
1052		float attenuationDistance;
1053		vec3 attenuationColor;
1054	#endif
1055	#ifdef USE_ANISOTROPY
1056		float anisotropy;
1057		float alphaT;
1058		vec3 anisotropyT;
1059		vec3 anisotropyB;
1060	#endif
1061};
1062vec3 clearcoatSpecularDirect = vec3( 0.0 );
1063vec3 clearcoatSpecularIndirect = vec3( 0.0 );
1064vec3 sheenSpecularDirect = vec3( 0.0 );
1065vec3 sheenSpecularIndirect = vec3(0.0 );
1066vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
1067    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
1068    float x2 = x * x;
1069    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
1070    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
1071}
1072float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
1073	float a2 = pow2( alpha );
1074	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
1075	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
1076	return 0.5 / max( gv + gl, EPSILON );
1077}
1078float D_GGX( const in float alpha, const in float dotNH ) {
1079	float a2 = pow2( alpha );
1080	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
1081	return RECIPROCAL_PI * a2 / pow2( denom );
1082}
1083#ifdef USE_ANISOTROPY
1084	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 ) {
1085		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
1086		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
1087		float v = 0.5 / ( gv + gl );
1088		return saturate(v);
1089	}
1090	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
1091		float a2 = alphaT * alphaB;
1092		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
1093		highp float v2 = dot( v, v );
1094		float w2 = a2 / v2;
1095		return RECIPROCAL_PI * a2 * pow2 ( w2 );
1096	}
1097#endif
1098#ifdef USE_CLEARCOAT
1099	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
1100		vec3 f0 = material.clearcoatF0;
1101		float f90 = material.clearcoatF90;
1102		float roughness = material.clearcoatRoughness;
1103		float alpha = pow2( roughness );
1104		vec3 halfDir = normalize( lightDir + viewDir );
1105		float dotNL = saturate( dot( normal, lightDir ) );
1106		float dotNV = saturate( dot( normal, viewDir ) );
1107		float dotNH = saturate( dot( normal, halfDir ) );
1108		float dotVH = saturate( dot( viewDir, halfDir ) );
1109		vec3 F = F_Schlick( f0, f90, dotVH );
1110		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1111		float D = D_GGX( alpha, dotNH );
1112		return F * ( V * D );
1113	}
1114#endif
1115vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
1116	vec3 f0 = material.specularColor;
1117	float f90 = material.specularF90;
1118	float roughness = material.roughness;
1119	float alpha = pow2( roughness );
1120	vec3 halfDir = normalize( lightDir + viewDir );
1121	float dotNL = saturate( dot( normal, lightDir ) );
1122	float dotNV = saturate( dot( normal, viewDir ) );
1123	float dotNH = saturate( dot( normal, halfDir ) );
1124	float dotVH = saturate( dot( viewDir, halfDir ) );
1125	vec3 F = F_Schlick( f0, f90, dotVH );
1126	#ifdef USE_IRIDESCENCE
1127		F = mix( F, material.iridescenceFresnel, material.iridescence );
1128	#endif
1129	#ifdef USE_ANISOTROPY
1130		float dotTL = dot( material.anisotropyT, lightDir );
1131		float dotTV = dot( material.anisotropyT, viewDir );
1132		float dotTH = dot( material.anisotropyT, halfDir );
1133		float dotBL = dot( material.anisotropyB, lightDir );
1134		float dotBV = dot( material.anisotropyB, viewDir );
1135		float dotBH = dot( material.anisotropyB, halfDir );
1136		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
1137		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
1138	#else
1139		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1140		float D = D_GGX( alpha, dotNH );
1141	#endif
1142	return F * ( V * D );
1143}
1144vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
1145	const float LUT_SIZE = 64.0;
1146	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
1147	const float LUT_BIAS = 0.5 / LUT_SIZE;
1148	float dotNV = saturate( dot( N, V ) );
1149	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
1150	uv = uv * LUT_SCALE + LUT_BIAS;
1151	return uv;
1152}
1153float LTC_ClippedSphereFormFactor( const in vec3 f ) {
1154	float l = length( f );
1155	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
1156}
1157vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
1158	float x = dot( v1, v2 );
1159	float y = abs( x );
1160	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
1161	float b = 3.4175940 + ( 4.1616724 + y ) * y;
1162	float v = a / b;
1163	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
1164	return cross( v1, v2 ) * theta_sintheta;
1165}
1166vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
1167	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
1168	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
1169	vec3 lightNormal = cross( v1, v2 );
1170	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
1171	vec3 T1, T2;
1172	T1 = normalize( V - N * dot( V, N ) );
1173	T2 = - cross( N, T1 );
1174	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
1175	vec3 coords[ 4 ];
1176	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
1177	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
1178	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
1179	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
1180	coords[ 0 ] = normalize( coords[ 0 ] );
1181	coords[ 1 ] = normalize( coords[ 1 ] );
1182	coords[ 2 ] = normalize( coords[ 2 ] );
1183	coords[ 3 ] = normalize( coords[ 3 ] );
1184	vec3 vectorFormFactor = vec3( 0.0 );
1185	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
1186	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
1187	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
1188	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
1189	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
1190	return vec3( result );
1191}
1192#if defined( USE_SHEEN )
1193float D_Charlie( float roughness, float dotNH ) {
1194	float alpha = pow2( roughness );
1195	float invAlpha = 1.0 / alpha;
1196	float cos2h = dotNH * dotNH;
1197	float sin2h = max( 1.0 - cos2h, 0.0078125 );
1198	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
1199}
1200float V_Neubelt( float dotNV, float dotNL ) {
1201	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
1202}
1203vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
1204	vec3 halfDir = normalize( lightDir + viewDir );
1205	float dotNL = saturate( dot( normal, lightDir ) );
1206	float dotNV = saturate( dot( normal, viewDir ) );
1207	float dotNH = saturate( dot( normal, halfDir ) );
1208	float D = D_Charlie( sheenRoughness, dotNH );
1209	float V = V_Neubelt( dotNV, dotNL );
1210	return sheenColor * ( D * V );
1211}
1212#endif
1213float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1214	float dotNV = saturate( dot( normal, viewDir ) );
1215	float r2 = roughness * roughness;
1216	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
1217	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
1218	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
1219	return saturate( DG * RECIPROCAL_PI );
1220}
1221vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1222	float dotNV = saturate( dot( normal, viewDir ) );
1223	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
1224	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
1225	vec4 r = roughness * c0 + c1;
1226	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
1227	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
1228	return fab;
1229}
1230vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
1231	vec2 fab = DFGApprox( normal, viewDir, roughness );
1232	return specularColor * fab.x + specularF90 * fab.y;
1233}
1234#ifdef USE_IRIDESCENCE
1235void 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 ) {
1236#else
1237void 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 ) {
1238#endif
1239	vec2 fab = DFGApprox( normal, viewDir, roughness );
1240	#ifdef USE_IRIDESCENCE
1241		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
1242	#else
1243		vec3 Fr = specularColor;
1244	#endif
1245	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
1246	float Ess = fab.x + fab.y;
1247	float Ems = 1.0 - Ess;
1248	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
1249	singleScatter += FssEss;
1250	multiScatter += Fms * Ems;
1251}
1252#if NUM_RECT_AREA_LIGHTS > 0
1253	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 ) {
1254		vec3 normal = geometryNormal;
1255		vec3 viewDir = geometryViewDir;
1256		vec3 position = geometryPosition;
1257		vec3 lightPos = rectAreaLight.position;
1258		vec3 halfWidth = rectAreaLight.halfWidth;
1259		vec3 halfHeight = rectAreaLight.halfHeight;
1260		vec3 lightColor = rectAreaLight.color;
1261		float roughness = material.roughness;
1262		vec3 rectCoords[ 4 ];
1263		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
1264		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
1265		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
1266		vec2 uv = LTC_Uv( normal, viewDir, roughness );
1267		vec4 t1 = texture2D( ltc_1, uv );
1268		vec4 t2 = texture2D( ltc_2, uv );
1269		mat3 mInv = mat3(
1270			vec3( t1.x, 0, t1.y ),
1271			vec3(    0, 1,    0 ),
1272			vec3( t1.z, 0, t1.w )
1273		);
1274		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
1275		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
1276		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
1277	}
1278#endif
1279void 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 ) {
1280	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
1281	vec3 irradiance = dotNL * directLight.color;
1282	#ifdef USE_CLEARCOAT
1283		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
1284		vec3 ccIrradiance = dotNLcc * directLight.color;
1285		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
1286	#endif
1287	#ifdef USE_SHEEN
1288		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
1289	#endif
1290	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
1291	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1292}
1293void 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 ) {
1294	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1295}
1296void 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) {
1297	#ifdef USE_CLEARCOAT
1298		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
1299	#endif
1300	#ifdef USE_SHEEN
1301		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1302	#endif
1303	vec3 singleScattering = vec3( 0.0 );
1304	vec3 multiScattering = vec3( 0.0 );
1305	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
1306	#ifdef USE_IRIDESCENCE
1307		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
1308	#else
1309		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
1310	#endif
1311	vec3 totalScattering = singleScattering + multiScattering;
1312	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
1313	reflectedLight.indirectSpecular += radiance * singleScattering;
1314	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
1315	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
1316}
1317#define RE_Direct				RE_Direct_Physical
1318#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
1319#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
1320#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
1321float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
1322	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
1323}`,
1323aW=`
1324vec3 geometryPosition = - vViewPosition;
1325vec3 geometryNormal = normal;
1326vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
1327vec3 geometryClearcoatNormal = vec3( 0.0 );
1328#ifdef USE_CLEARCOAT
1329	geometryClearcoatNormal = clearcoatNormal;
1330#endif
1331#ifdef USE_IRIDESCENCE
1332	float dotNVi = saturate( dot( normal, geometryViewDir ) );
1333	if ( material.iridescenceThickness == 0.0 ) {
1334		material.iridescence = 0.0;
1335	} else {
1336		material.iridescence = saturate( material.iridescence );
1337	}
1338	if ( material.iridescence > 0.0 ) {
1339		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
1340		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
1341	}
1342#endif
1343IncidentLight directLight;
1344#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
1345	PointLight pointLight;
1346	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
1347	PointLightShadow pointLightShadow;
1348	#endif
1349	#pragma unroll_loop_start
1350	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
1351		pointLight = pointLights[ i ];
1352		getPointLightInfo( pointLight, geometryPosition, directLight );
1353		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
1354		pointLightShadow = pointLightShadows[ i ];
1355		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
1356		#endif
1357		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1358	}
1359	#pragma unroll_loop_end
1360#endif
1361#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
1362	SpotLight spotLight;
1363	vec4 spotColor;
1364	vec3 spotLightCoord;
1365	bool inSpotLightMap;
1366	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
1367	SpotLightShadow spotLightShadow;
1368	#endif
1369	#pragma unroll_loop_start
1370	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
1371		spotLight = spotLights[ i ];
1372		getSpotLightInfo( spotLight, geometryPosition, directLight );
1373		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1374		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
1375		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1376		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
1377		#else
1378		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1379		#endif
1380		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
1381			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
1382			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
1383			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
1384			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
1385		#endif
1386		#undef SPOT_LIGHT_MAP_INDEX
1387		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1388		spotLightShadow = spotLightShadows[ i ];
1389		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
1390		#endif
1391		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1392	}
1393	#pragma unroll_loop_end
1394#endif
1395#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
1396	DirectionalLight directionalLight;
1397	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
1398	DirectionalLightShadow directionalLightShadow;
1399	#endif
1400	#pragma unroll_loop_start
1401	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
1402		directionalLight = directionalLights[ i ];
1403		getDirectionalLightInfo( directionalLight, directLight );
1404		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
1405		directionalLightShadow = directionalLightShadows[ i ];
1406		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
1407		#endif
1408		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1409	}
1410	#pragma unroll_loop_end
1411#endif
1412#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
1413	RectAreaLight rectAreaLight;
1414	#pragma unroll_loop_start
1415	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
1416		rectAreaLight = rectAreaLights[ i ];
1417		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1418	}
1419	#pragma unroll_loop_end
1420#endif
1421#if defined( RE_IndirectDiffuse )
1422	vec3 iblIrradiance = vec3( 0.0 );
1423	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
1424	#if defined( USE_LIGHT_PROBES )
1425		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
1426	#endif
1427	#if ( NUM_HEMI_LIGHTS > 0 )
1428		#pragma unroll_loop_start
1429		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
1430			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
1431		}
1432		#pragma unroll_loop_end
1433	#endif
1434#endif
1435#if defined( RE_IndirectSpecular )
1436	vec3 radiance = vec3( 0.0 );
1437	vec3 clearcoatRadiance = vec3( 0.0 );
1438#endif`,lW=`#if defined( RE_IndirectDiffuse )
1439	#ifdef USE_LIGHTMAP
1440		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
1441		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
1442		irradiance += lightMapIrradiance;
1443	#endif
1444	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
1445		iblIrradiance += getIBLIrradiance( geometryNormal );
1446	#endif
1447#endif
1448#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
1449	#ifdef USE_ANISOTROPY
1450		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
1451	#else
1452		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
1453	#endif
1454	#ifdef USE_CLEARCOAT
1455		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
1456	#endif
1457#endif`,cW=`#if defined( RE_IndirectDiffuse )
1458	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1459#endif
1460#if defined( RE_IndirectSpecular )
1461	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1462#endif`,uW=`#if defined( USE_LOGDEPTHBUF )
1463	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
1464#endif`,dW=`#if defined( USE_LOGDEPTHBUF )
1465	uniform float logDepthBufFC;
1466	varying float vFragDepth;
1467	varying float vIsPerspective;
1468#endif`,hW=`#ifdef USE_LOGDEPTHBUF
1469	varying float vFragDepth;
1470	varying float vIsPerspective;
1471#endif`,fW=`#ifdef USE_LOGDEPTHBUF
1472	vFragDepth = 1.0 + gl_Position.w;
1473	vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
1474#endif`,pW=`#ifdef USE_MAP
1475	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
1476	#ifdef DECODE_VIDEO_TEXTURE
1477		sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );
1478	
1479	#endif
1480	diffuseColor *= sampledDiffuseColor;
1481#endif`,mW=`#ifdef USE_MAP
1482	uniform sampler2D map;
1483#endif`,gW=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1484	#if defined( USE_POINTS_UV )
1485		vec2 uv = vUv;
1486	#else
1487		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
1488	#endif
1489#endif
1490#ifdef USE_MAP
1491	diffuseColor *= texture2D( map, uv );
1492#endif
1493#ifdef USE_ALPHAMAP
1494	diffuseColor.a *= texture2D( alphaMap, uv ).g;
1495#endif`,vW=`#if defined( USE_POINTS_UV )
1496	varying vec2 vUv;
1497#else
1498	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1499		uniform mat3 uvTransform;
1500	#endif
1501#endif
1502#ifdef USE_MAP
1503	uniform sampler2D map;
1504#endif
1505#ifdef USE_ALPHAMAP
1506	uniform sampler2D alphaMap;
1507#endif`,yW=`float metalnessFactor = metalness;
1508#ifdef USE_METALNESSMAP
1509	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
1510	metalnessFactor *= texelMetalness.b;
1511#endif`,xW=`#ifdef USE_METALNESSMAP
1512	uniform sampler2D metalnessMap;
1513#endif`,_W=`#ifdef USE_INSTANCING_MORPH
1514	float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1515	float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
1516	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1517		morphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
1518	}
1519#endif`,AW=`#if defined( USE_MORPHCOLORS )
1520	vColor *= morphTargetBaseInfluence;
1521	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1522		#if defined( USE_COLOR_ALPHA )
1523			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
1524		#elif defined( USE_COLOR )
1525			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
1526		#endif
1527	}
1528#endif`,SW=`#ifdef USE_MORPHNORMALS
1529	objectNormal *= morphTargetBaseInfluence;
1530	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1531		if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
1532	}
1533#endif`,wW=`#ifdef USE_MORPHTARGETS
1534	#ifndef USE_INSTANCING_MORPH
1535		uniform float morphTargetBaseInfluence;
1536		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1537	#endif
1538	uniform sampler2DArray morphTargetsTexture;
1539	uniform ivec2 morphTargetsTextureSize;
1540	vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
1541		int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
1542		int y = texelIndex / morphTargetsTextureSize.x;
1543		int x = texelIndex - y * morphTargetsTextureSize.x;
1544		ivec3 morphUV = ivec3( x, y, morphTargetIndex );
1545		return texelFetch( morphTargetsTexture, morphUV, 0 );
1546	}
1547#endif`,MW=`#ifdef USE_MORPHTARGETS
1548	transformed *= morphTargetBaseInfluence;
1549	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1550		if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
1551	}
1552#endif`,EW=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
1553#ifdef FLAT_SHADED
1554	vec3 fdx = dFdx( vViewPosition );
1555	vec3 fdy = dFdy( vViewPosition );
1556	vec3 normal = normalize( cross( fdx, fdy ) );
1557#else
1558	vec3 normal = normalize( vNormal );
1559	#ifdef DOUBLE_SIDED
1560		normal *= faceDirection;
1561	#endif
1562#endif
1563#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
1564	#ifdef USE_TANGENT
1565		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1566	#else
1567		mat3 tbn = getTangentFrame( - vViewPosition, normal,
1568		#if defined( USE_NORMALMAP )
1569			vNormalMapUv
1570		#elif defined( USE_CLEARCOAT_NORMALMAP )
1571			vClearcoatNormalMapUv
1572		#else
1573			vUv
1574		#endif
1575		);
1576	#endif
1577	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1578		tbn[0] *= faceDirection;
1579		tbn[1] *= faceDirection;
1580	#endif
1581#endif
1582#ifdef USE_CLEARCOAT_NORMALMAP
1583	#ifdef USE_TANGENT
1584		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1585	#else
1586		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
1587	#endif
1588	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1589		tbn2[0] *= faceDirection;
1590		tbn2[1] *= faceDirection;
1591	#endif
1592#endif
1593vec3 nonPerturbedNormal = normal;`,CW=`#ifdef USE_NORMALMAP_OBJECTSPACE
1594	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1595	#ifdef FLIP_SIDED
1596		normal = - normal;
1597	#endif
1598	#ifdef DOUBLE_SIDED
1599		normal = normal * faceDirection;
1600	#endif
1601	normal = normalize( normalMatrix * normal );
1602#elif defined( USE_NORMALMAP_TANGENTSPACE )
1603	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1604	mapN.xy *= normalScale;
1605	normal = normalize( tbn * mapN );
1606#elif defined( USE_BUMPMAP )
1607	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
1608#endif`,TW=`#ifndef FLAT_SHADED
1609	varying vec3 vNormal;
1610	#ifdef USE_TANGENT
1611		varying vec3 vTangent;
1612		varying vec3 vBitangent;
1613	#endif
1614#endif`,bW=`#ifndef FLAT_SHADED
1615	varying vec3 vNormal;
1616	#ifdef USE_TANGENT
1617		varying vec3 vTangent;
1618		varying vec3 vBitangent;
1619	#endif
1620#endif`,RW=`#ifndef FLAT_SHADED
1621	vNormal = normalize( transformedNormal );
1622	#ifdef USE_TANGENT
1623		vTangent = normalize( transformedTangent );
1624		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
1625	#endif
1626#endif`,PW=`#ifdef USE_NORMALMAP
1627	uniform sampler2D normalMap;
1628	uniform vec2 normalScale;
1629#endif
1630#ifdef USE_NORMALMAP_OBJECTSPACE
1631	uniform mat3 normalMatrix;
1632#endif
1633#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
1634	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
1635		vec3 q0 = dFdx( eye_pos.xyz );
1636		vec3 q1 = dFdy( eye_pos.xyz );
1637		vec2 st0 = dFdx( uv.st );
1638		vec2 st1 = dFdy( uv.st );
1639		vec3 N = surf_norm;
1640		vec3 q1perp = cross( q1, N );
1641		vec3 q0perp = cross( N, q0 );
1642		vec3 T = q1perp * st0.x + q0perp * st1.x;
1643		vec3 B = q1perp * st0.y + q0perp * st1.y;
1644		float det = max( dot( T, T ), dot( B, B ) );
1645		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
1646		return mat3( T * scale, B * scale, N );
1647	}
1648#endif`,IW=`#ifdef USE_CLEARCOAT
1649	vec3 clearcoatNormal = nonPerturbedNormal;
1650#endif`,BW=`#ifdef USE_CLEARCOAT_NORMALMAP
1651	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
1652	clearcoatMapN.xy *= clearcoatNormalScale;
1653	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
1654#endif`,LW=`#ifdef USE_CLEARCOATMAP
1655	uniform sampler2D clearcoatMap;
1656#endif
1657#ifdef USE_CLEARCOAT_NORMALMAP
1658	uniform sampler2D clearcoatNormalMap;
1659	uniform vec2 clearcoatNormalScale;
1660#endif
1661#ifdef USE_CLEARCOAT_ROUGHNESSMAP
1662	uniform sampler2D clearcoatRoughnessMap;
1663#endif`,DW=`#ifdef USE_IRIDESCENCEMAP
1664	uniform sampler2D iridescenceMap;
1665#endif
1666#ifdef USE_IRIDESCENCE_THICKNESSMAP
1667	uniform sampler2D iridescenceThicknessMap;
1668#endif`,NW=`#ifdef OPAQUE
1669diffuseColor.a = 1.0;
1670#endif
1671#ifdef USE_TRANSMISSION
1672diffuseColor.a *= material.transmissionAlpha;
1673#endif
1674gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,FW=`vec3 packNormalToRGB( const in vec3 normal ) {
1675	return normalize( normal ) * 0.5 + 0.5;
1676}
1677vec3 unpackRGBToNormal( const in vec3 rgb ) {
1678	return 2.0 * rgb.xyz - 1.0;
1679}
1680const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
1681const float Inv255 = 1. / 255.;
1682const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
1683const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
1684const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
1685const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
1686vec4 packDepthToRGBA( const in float v ) {
1687	if( v <= 0.0 )
1688		return vec4( 0., 0., 0., 0. );
1689	if( v >= 1.0 )
1690		return vec4( 1., 1., 1., 1. );
1691	float vuf;
1692	float af = modf( v * PackFactors.a, vuf );
1693	float bf = modf( vuf * ShiftRight8, vuf );
1694	float gf = modf( vuf * ShiftRight8, vuf );
1695	return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
1696}
1697vec3 packDepthToRGB( const in float v ) {
1698	if( v <= 0.0 )
1699		return vec3( 0., 0., 0. );
1700	if( v >= 1.0 )
1701		return vec3( 1., 1., 1. );
1702	float vuf;
1703	float bf = modf( v * PackFactors.b, vuf );
1704	float gf = modf( vuf * ShiftRight8, vuf );
1705	return vec3( vuf * Inv255, gf * PackUpscale, bf );
1706}
1707vec2 packDepthToRG( const in float v ) {
1708	if( v <= 0.0 )
1709		return vec2( 0., 0. );
1710	if( v >= 1.0 )
1711		return vec2( 1., 1. );
1712	float vuf;
1713	float gf = modf( v * 256., vuf );
1714	return vec2( vuf * Inv255, gf );
1715}
1716float unpackRGBAToDepth( const in vec4 v ) {
1717	return dot( v, UnpackFactors4 );
1718}
1719float unpackRGBToDepth( const in vec3 v ) {
1720	return dot( v, UnpackFactors3 );
1721}
1722float unpackRGToDepth( const in vec2 v ) {
1723	return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
1724}
1725vec4 pack2HalfToRGBA( const in vec2 v ) {
1726	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
1727	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
1728}
1729vec2 unpackRGBATo2Half( const in vec4 v ) {
1730	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
1731}
1732float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
1733	return ( viewZ + near ) / ( near - far );
1734}
1735float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
1736	return depth * ( near - far ) - near;
1737}
1738float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
1739	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
1740}
1741float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
1742	return ( near * far ) / ( ( far - near ) * depth - far );
1743}`,kW=`#ifdef PREMULTIPLIED_ALPHA
1744	gl_FragColor.rgb *= gl_FragColor.a;
1745#endif`,OW=`vec4 mvPosition = vec4( transformed, 1.0 );
1746#ifdef USE_BATCHING
1747	mvPosition = batchingMatrix * mvPosition;
1748#endif
1749#ifdef USE_INSTANCING
1750	mvPosition = instanceMatrix * mvPosition;
1751#endif
1752mvPosition = modelViewMatrix * mvPosition;
1753gl_Position = projectionMatrix * mvPosition;`,UW=`#ifdef DITHERING
1754	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
1755#endif`,zW=`#ifdef DITHERING
1756	vec3 dithering( vec3 color ) {
1757		float grid_position = rand( gl_FragCoord.xy );
1758		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
1759		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
1760		return color + dither_shift_RGB;
1761	}
1762#endif`,HW=`float roughnessFactor = roughness;
1763#ifdef USE_ROUGHNESSMAP
1764	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
1765	roughnessFactor *= texelRoughness.g;
1766#endif`,GW=`#ifdef USE_ROUGHNESSMAP
1767	uniform sampler2D roughnessMap;
1768#endif`,VW=
vendor: 8,887 bytes, lines 1768-1954
1768`#if NUM_SPOT_LIGHT_COORDS > 0
1769	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1770#endif
1771#if NUM_SPOT_LIGHT_MAPS > 0
1772	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
1773#endif
1774#ifdef USE_SHADOWMAP
1775	#if NUM_DIR_LIGHT_SHADOWS > 0
1776		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
1777		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1778		struct DirectionalLightShadow {
1779			float shadowIntensity;
1780			float shadowBias;
1781			float shadowNormalBias;
1782			float shadowRadius;
1783			vec2 shadowMapSize;
1784		};
1785		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1786	#endif
1787	#if NUM_SPOT_LIGHT_SHADOWS > 0
1788		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
1789		struct SpotLightShadow {
1790			float shadowIntensity;
1791			float shadowBias;
1792			float shadowNormalBias;
1793			float shadowRadius;
1794			vec2 shadowMapSize;
1795		};
1796		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1797	#endif
1798	#if NUM_POINT_LIGHT_SHADOWS > 0
1799		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
1800		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1801		struct PointLightShadow {
1802			float shadowIntensity;
1803			float shadowBias;
1804			float shadowNormalBias;
1805			float shadowRadius;
1806			vec2 shadowMapSize;
1807			float shadowCameraNear;
1808			float shadowCameraFar;
1809		};
1810		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1811	#endif
1812	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
1813		return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
1814	}
1815	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
1816		return unpackRGBATo2Half( texture2D( shadow, uv ) );
1817	}
1818	float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
1819		float occlusion = 1.0;
1820		vec2 distribution = texture2DDistribution( shadow, uv );
1821		float hard_shadow = step( compare , distribution.x );
1822		if (hard_shadow != 1.0 ) {
1823			float distance = compare - distribution.x ;
1824			float variance = max( 0.00000, distribution.y * distribution.y );
1825			float softness_probability = variance / (variance + distance * distance );			softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );			occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
1826		}
1827		return occlusion;
1828	}
1829	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
1830		float shadow = 1.0;
1831		shadowCoord.xyz /= shadowCoord.w;
1832		shadowCoord.z += shadowBias;
1833		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
1834		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
1835		if ( frustumTest ) {
1836		#if defined( SHADOWMAP_TYPE_PCF )
1837			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1838			float dx0 = - texelSize.x * shadowRadius;
1839			float dy0 = - texelSize.y * shadowRadius;
1840			float dx1 = + texelSize.x * shadowRadius;
1841			float dy1 = + texelSize.y * shadowRadius;
1842			float dx2 = dx0 / 2.0;
1843			float dy2 = dy0 / 2.0;
1844			float dx3 = dx1 / 2.0;
1845			float dy3 = dy1 / 2.0;
1846			shadow = (
1847				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
1848				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
1849				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
1850				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
1851				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
1852				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
1853				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
1854				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
1855				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
1856				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
1857				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
1858				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
1859				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
1860				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
1861				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
1862				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
1863				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
1864			) * ( 1.0 / 17.0 );
1865		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
1866			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1867			float dx = texelSize.x;
1868			float dy = texelSize.y;
1869			vec2 uv = shadowCoord.xy;
1870			vec2 f = fract( uv * shadowMapSize + 0.5 );
1871			uv -= f * texelSize;
1872			shadow = (
1873				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
1874				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
1875				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
1876				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
1877				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
1878					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
1879					 f.x ) +
1880				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
1881					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
1882					 f.x ) +
1883				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
1884					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
1885					 f.y ) +
1886				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
1887					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
1888					 f.y ) +
1889				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
1890						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
1891						  f.x ),
1892					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
1893						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
1894						  f.x ),
1895					 f.y )
1896			) * ( 1.0 / 9.0 );
1897		#elif defined( SHADOWMAP_TYPE_VSM )
1898			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
1899		#else
1900			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
1901		#endif
1902		}
1903		return mix( 1.0, shadow, shadowIntensity );
1904	}
1905	vec2 cubeToUV( vec3 v, float texelSizeY ) {
1906		vec3 absV = abs( v );
1907		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
1908		absV *= scaleToCube;
1909		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
1910		vec2 planar = v.xy;
1911		float almostATexel = 1.5 * texelSizeY;
1912		float almostOne = 1.0 - almostATexel;
1913		if ( absV.z >= almostOne ) {
1914			if ( v.z > 0.0 )
1915				planar.x = 4.0 - v.x;
1916		} else if ( absV.x >= almostOne ) {
1917			float signX = sign( v.x );
1918			planar.x = v.z * signX + 2.0 * signX;
1919		} else if ( absV.y >= almostOne ) {
1920			float signY = sign( v.y );
1921			planar.x = v.x + 2.0 * signY + 2.0;
1922			planar.y = v.z * signY - 2.0;
1923		}
1924		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
1925	}
1926	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
1927		float shadow = 1.0;
1928		vec3 lightToPosition = shadowCoord.xyz;
1929		
1930		float lightToPositionLength = length( lightToPosition );
1931		if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
1932			float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );			dp += shadowBias;
1933			vec3 bd3D = normalize( lightToPosition );
1934			vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
1935			#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
1936				vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
1937				shadow = (
1938					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
1939					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
1940					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
1941					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
1942					texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
1943					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
1944					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
1945					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
1946					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
1947				) * ( 1.0 / 9.0 );
1948			#else
1949				shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
1950			#endif
1951		}
1952		return mix( 1.0, shadow, shadowIntensity );
1953	}
1954#endif`,
1954jW=`#if NUM_SPOT_LIGHT_COORDS > 0
1955	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
1956	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1957#endif
1958#ifdef USE_SHADOWMAP
1959	#if NUM_DIR_LIGHT_SHADOWS > 0
1960		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
1961		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1962		struct DirectionalLightShadow {
1963			float shadowIntensity;
1964			float shadowBias;
1965			float shadowNormalBias;
1966			float shadowRadius;
1967			vec2 shadowMapSize;
1968		};
1969		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1970	#endif
1971	#if NUM_SPOT_LIGHT_SHADOWS > 0
1972		struct SpotLightShadow {
1973			float shadowIntensity;
1974			float shadowBias;
1975			float shadowNormalBias;
1976			float shadowRadius;
1977			vec2 shadowMapSize;
1978		};
1979		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1980	#endif
1981	#if NUM_POINT_LIGHT_SHADOWS > 0
1982		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
1983		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1984		struct PointLightShadow {
1985			float shadowIntensity;
1986			float shadowBias;
1987			float shadowNormalBias;
1988			float shadowRadius;
1989			vec2 shadowMapSize;
1990			float shadowCameraNear;
1991			float shadowCameraFar;
1992		};
1993		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1994	#endif
1995#endif`,WW=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
1996	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
1997	vec4 shadowWorldPosition;
1998#endif
1999#if defined( USE_SHADOWMAP )
2000	#if NUM_DIR_LIGHT_SHADOWS > 0
2001		#pragma unroll_loop_start
2002		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2003			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
2004			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
2005		}
2006		#pragma unroll_loop_end
2007	#endif
2008	#if NUM_POINT_LIGHT_SHADOWS > 0
2009		#pragma unroll_loop_start
2010		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2011			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
2012			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
2013		}
2014		#pragma unroll_loop_end
2015	#endif
2016#endif
2017#if NUM_SPOT_LIGHT_COORDS > 0
2018	#pragma unroll_loop_start
2019	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
2020		shadowWorldPosition = worldPosition;
2021		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
2022			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
2023		#endif
2024		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
2025	}
2026	#pragma unroll_loop_end
2027#endif`,XW=`float getShadowMask() {
2028	float shadow = 1.0;
2029	#ifdef USE_SHADOWMAP
2030	#if NUM_DIR_LIGHT_SHADOWS > 0
2031	DirectionalLightShadow directionalLight;
2032	#pragma unroll_loop_start
2033	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2034		directionalLight = directionalLightShadows[ i ];
2035		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
2036	}
2037	#pragma unroll_loop_end
2038	#endif
2039	#if NUM_SPOT_LIGHT_SHADOWS > 0
2040	SpotLightShadow spotLight;
2041	#pragma unroll_loop_start
2042	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
2043		spotLight = spotLightShadows[ i ];
2044		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
2045	}
2046	#pragma unroll_loop_end
2047	#endif
2048	#if NUM_POINT_LIGHT_SHADOWS > 0
2049	PointLightShadow pointLight;
2050	#pragma unroll_loop_start
2051	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2052		pointLight = pointLightShadows[ i ];
2053		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
2054	}
2055	#pragma unroll_loop_end
2056	#endif
2057	#endif
2058	return shadow;
2059}`,JW=`#ifdef USE_SKINNING
2060	mat4 boneMatX = getBoneMatrix( skinIndex.x );
2061	mat4 boneMatY = getBoneMatrix( skinIndex.y );
2062	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
2063	mat4 boneMatW = getBoneMatrix( skinIndex.w );
2064#endif`,KW=`#ifdef USE_SKINNING
2065	uniform mat4 bindMatrix;
2066	uniform mat4 bindMatrixInverse;
2067	uniform highp sampler2D boneTexture;
2068	mat4 getBoneMatrix( const in float i ) {
2069		int size = textureSize( boneTexture, 0 ).x;
2070		int j = int( i ) * 4;
2071		int x = j % size;
2072		int y = j / size;
2073		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
2074		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
2075		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
2076		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
2077		return mat4( v1, v2, v3, v4 );
2078	}
2079#endif`,qW=`#ifdef USE_SKINNING
2080	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
2081	vec4 skinned = vec4( 0.0 );
2082	skinned += boneMatX * skinVertex * skinWeight.x;
2083	skinned += boneMatY * skinVertex * skinWeight.y;
2084	skinned += boneMatZ * skinVertex * skinWeight.z;
2085	skinned += boneMatW * skinVertex * skinWeight.w;
2086	transformed = ( bindMatrixInverse * skinned ).xyz;
2087#endif`,QW=`#ifdef USE_SKINNING
2088	mat4 skinMatrix = mat4( 0.0 );
2089	skinMatrix += skinWeight.x * boneMatX;
2090	skinMatrix += skinWeight.y * boneMatY;
2091	skinMatrix += skinWeight.z * boneMatZ;
2092	skinMatrix += skinWeight.w * boneMatW;
2093	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
2094	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
2095	#ifdef USE_TANGENT
2096		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
2097	#endif
2098#endif`,YW=`float specularStrength;
2099#ifdef USE_SPECULARMAP
2100	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
2101	specularStrength = texelSpecular.r;
2102#else
2103	specularStrength = 1.0;
2104#endif`,ZW=`#ifdef USE_SPECULARMAP
2105	uniform sampler2D specularMap;
2106#endif`,$W=`#if defined( TONE_MAPPING )
2107	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
2108#endif`,e7=`#ifndef saturate
2109#define saturate( a ) clamp( a, 0.0, 1.0 )
2110#endif
2111uniform float toneMappingExposure;
2112vec3 LinearToneMapping( vec3 color ) {
2113	return saturate( toneMappingExposure * color );
2114}
2115vec3 ReinhardToneMapping( vec3 color ) {
2116	color *= toneMappingExposure;
2117	return saturate( color / ( vec3( 1.0 ) + color ) );
2118}
2119vec3 OptimizedCineonToneMapping( vec3 color ) {
2120	color *= toneMappingExposure;
2121	color = max( vec3( 0.0 ), color - 0.004 );
2122	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
2123}
2124vec3 RRTAndODTFit( vec3 v ) {
2125	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
2126	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
2127	return a / b;
2128}
2129vec3 ACESFilmicToneMapping( vec3 color ) {
2130	const mat3 ACESInputMat = mat3(
2131		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
2132		vec3( 0.04823, 0.01566, 0.83777 )
2133	);
2134	const mat3 ACESOutputMat = mat3(
2135		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
2136		vec3( -0.07367, -0.00605,  1.07602 )
2137	);
2138	color *= toneMappingExposure / 0.6;
2139	color = ACESInputMat * color;
2140	color = RRTAndODTFit( color );
2141	color = ACESOutputMat * color;
2142	return saturate( color );
2143}
2144const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
2145	vec3( 1.6605, - 0.1246, - 0.0182 ),
2146	vec3( - 0.5876, 1.1329, - 0.1006 ),
2147	vec3( - 0.0728, - 0.0083, 1.1187 )
2148);
2149const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
2150	vec3( 0.6274, 0.0691, 0.0164 ),
2151	vec3( 0.3293, 0.9195, 0.0880 ),
2152	vec3( 0.0433, 0.0113, 0.8956 )
2153);
2154vec3 agxDefaultContrastApprox( vec3 x ) {
2155	vec3 x2 = x * x;
2156	vec3 x4 = x2 * x2;
2157	return + 15.5 * x4 * x2
2158		- 40.14 * x4 * x
2159		+ 31.96 * x4
2160		- 6.868 * x2 * x
2161		+ 0.4298 * x2
2162		+ 0.1191 * x
2163		- 0.00232;
2164}
2165vec3 AgXToneMapping( vec3 color ) {
2166	const mat3 AgXInsetMatrix = mat3(
2167		vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
2168		vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
2169		vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
2170	);
2171	const mat3 AgXOutsetMatrix = mat3(
2172		vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
2173		vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
2174		vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
2175	);
2176	const float AgxMinEv = - 12.47393;	const float AgxMaxEv = 4.026069;
2177	color *= toneMappingExposure;
2178	color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
2179	color = AgXInsetMatrix * color;
2180	color = max( color, 1e-10 );	color = log2( color );
2181	color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
2182	color = clamp( color, 0.0, 1.0 );
2183	color = agxDefaultContrastApprox( color );
2184	color = AgXOutsetMatrix * color;
2185	color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
2186	color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
2187	color = clamp( color, 0.0, 1.0 );
2188	return color;
2189}
2190vec3 NeutralToneMapping( vec3 color ) {
2191	const float StartCompression = 0.8 - 0.04;
2192	const float Desaturation = 0.15;
2193	color *= toneMappingExposure;
2194	float x = min( color.r, min( color.g, color.b ) );
2195	float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
2196	color -= offset;
2197	float peak = max( color.r, max( color.g, color.b ) );
2198	if ( peak < StartCompression ) return color;
2199	float d = 1. - StartCompression;
2200	float newPeak = 1. - d * d / ( peak + d - StartCompression );
2201	color *= newPeak / peak;
2202	float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
2203	return mix( color, vec3( newPeak ), g );
2204}
2205vec3 CustomToneMapping( vec3 color ) { return color; }`,t7=`#ifdef USE_TRANSMISSION
2206	material.transmission = transmission;
2207	material.transmissionAlpha = 1.0;
2208	material.thickness = thickness;
2209	material.attenuationDistance = attenuationDistance;
2210	material.attenuationColor = attenuationColor;
2211	#ifdef USE_TRANSMISSIONMAP
2212		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
2213	#endif
2214	#ifdef USE_THICKNESSMAP
2215		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
2216	#endif
2217	vec3 pos = vWorldPosition;
2218	vec3 v = normalize( cameraPosition - pos );
2219	vec3 n = inverseTransformDirection( normal, viewMatrix );
2220	vec4 transmitted = getIBLVolumeRefraction(
2221		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
2222		pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
2223		material.attenuationColor, material.attenuationDistance );
2224	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
2225	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
2226#endif`,n7=`#ifdef USE_TRANSMISSION
2227	uniform float transmission;
2228	uniform float thickness;
2229	uniform float attenuationDistance;
2230	uniform vec3 attenuationColor;
2231	#ifdef USE_TRANSMISSIONMAP
2232		uniform sampler2D transmissionMap;
2233	#endif
2234	#ifdef USE_THICKNESSMAP
2235		uniform sampler2D thicknessMap;
2236	#endif
2237	uniform vec2 transmissionSamplerSize;
2238	uniform sampler2D transmissionSamplerMap;
2239	uniform mat4 modelMatrix;
2240	uniform mat4 projectionMatrix;
2241	varying vec3 vWorldPosition;
2242	float w0( float a ) {
2243		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
2244	}
2245	float w1( float a ) {
2246		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
2247	}
2248	float w2( float a ){
2249		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
2250	}
2251	float w3( float a ) {
2252		return ( 1.0 / 6.0 ) * ( a * a * a );
2253	}
2254	float g0( float a ) {
2255		return w0( a ) + w1( a );
2256	}
2257	float g1( float a ) {
2258		return w2( a ) + w3( a );
2259	}
2260	float h0( float a ) {
2261		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
2262	}
2263	float h1( float a ) {
2264		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
2265	}
2266	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
2267		uv = uv * texelSize.zw + 0.5;
2268		vec2 iuv = floor( uv );
2269		vec2 fuv = fract( uv );
2270		float g0x = g0( fuv.x );
2271		float g1x = g1( fuv.x );
2272		float h0x = h0( fuv.x );
2273		float h1x = h1( fuv.x );
2274		float h0y = h0( fuv.y );
2275		float h1y = h1( fuv.y );
2276		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2277		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2278		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2279		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2280		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
2281			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
2282	}
2283	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
2284		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
2285		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
2286		vec2 fLodSizeInv = 1.0 / fLodSize;
2287		vec2 cLodSizeInv = 1.0 / cLodSize;
2288		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
2289		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
2290		return mix( fSample, cSample, fract( lod ) );
2291	}
2292	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
2293		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
2294		vec3 modelScale;
2295		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
2296		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
2297		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
2298		return normalize( refractionVector ) * thickness * modelScale;
2299	}
2300	float applyIorToRoughness( const in float roughness, const in float ior ) {
2301		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
2302	}
2303	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
2304		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
2305		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
2306	}
2307	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
2308		if ( isinf( attenuationDistance ) ) {
2309			return vec3( 1.0 );
2310		} else {
2311			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
2312			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
2313		}
2314	}
2315	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
2316		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
2317		const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
2318		const in vec3 attenuationColor, const in float attenuationDistance ) {
2319		vec4 transmittedLight;
2320		vec3 transmittance;
2321		#ifdef USE_DISPERSION
2322			float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
2323			vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
2324			for ( int i = 0; i < 3; i ++ ) {
2325				vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
2326				vec3 refractedRayExit = position + transmissionRay;
2327		
2328				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2329				vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2330				refractionCoords += 1.0;
2331				refractionCoords /= 2.0;
2332		
2333				vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
2334				transmittedLight[ i ] = transmissionSample[ i ];
2335				transmittedLight.a += transmissionSample.a;
2336				transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
2337			}
2338			transmittedLight.a /= 3.0;
2339		
2340		#else
2341		
2342			vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
2343			vec3 refractedRayExit = position + transmissionRay;
2344			vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2345			vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2346			refractionCoords += 1.0;
2347			refractionCoords /= 2.0;
2348			transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
2349			transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
2350		
2351		#endif
2352		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
2353		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
2354		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
2355		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
2356	}
2357#endif`,i7=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2358	varying vec2 vUv;
2359#endif
2360#ifdef USE_MAP
2361	varying vec2 vMapUv;
2362#endif
2363#ifdef USE_ALPHAMAP
2364	varying vec2 vAlphaMapUv;
2365#endif
2366#ifdef USE_LIGHTMAP
2367	varying vec2 vLightMapUv;
2368#endif
2369#ifdef USE_AOMAP
2370	varying vec2 vAoMapUv;
2371#endif
2372#ifdef USE_BUMPMAP
2373	varying vec2 vBumpMapUv;
2374#endif
2375#ifdef USE_NORMALMAP
2376	varying vec2 vNormalMapUv;
2377#endif
2378#ifdef USE_EMISSIVEMAP
2379	varying vec2 vEmissiveMapUv;
2380#endif
2381#ifdef USE_METALNESSMAP
2382	varying vec2 vMetalnessMapUv;
2383#endif
2384#ifdef USE_ROUGHNESSMAP
2385	varying vec2 vRoughnessMapUv;
2386#endif
2387#ifdef USE_ANISOTROPYMAP
2388	varying vec2 vAnisotropyMapUv;
2389#endif
2390#ifdef USE_CLEARCOATMAP
2391	varying vec2 vClearcoatMapUv;
2392#endif
2393#ifdef USE_CLEARCOAT_NORMALMAP
2394	varying vec2 vClearcoatNormalMapUv;
2395#endif
2396#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2397	varying vec2 vClearcoatRoughnessMapUv;
2398#endif
2399#ifdef USE_IRIDESCENCEMAP
2400	varying vec2 vIridescenceMapUv;
2401#endif
2402#ifdef USE_IRIDESCENCE_THICKNESSMAP
2403	varying vec2 vIridescenceThicknessMapUv;
2404#endif
2405#ifdef USE_SHEEN_COLORMAP
2406	varying vec2 vSheenColorMapUv;
2407#endif
2408#ifdef USE_SHEEN_ROUGHNESSMAP
2409	varying vec2 vSheenRoughnessMapUv;
2410#endif
2411#ifdef USE_SPECULARMAP
2412	varying vec2 vSpecularMapUv;
2413#endif
2414#ifdef USE_SPECULAR_COLORMAP
2415	varying vec2 vSpecularColorMapUv;
2416#endif
2417#ifdef USE_SPECULAR_INTENSITYMAP
2418	varying vec2 vSpecularIntensityMapUv;
2419#endif
2420#ifdef USE_TRANSMISSIONMAP
2421	uniform mat3 transmissionMapTransform;
2422	varying vec2 vTransmissionMapUv;
2423#endif
2424#ifdef USE_THICKNESSMAP
2425	uniform mat3 thicknessMapTransform;
2426	varying vec2 vThicknessMapUv;
2427#endif`,r7=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2428	varying vec2 vUv;
2429#endif
2430#ifdef USE_MAP
2431	uniform mat3 mapTransform;
2432	varying vec2 vMapUv;
2433#endif
2434#ifdef USE_ALPHAMAP
2435	uniform mat3 alphaMapTransform;
2436	varying vec2 vAlphaMapUv;
2437#endif
2438#ifdef USE_LIGHTMAP
2439	uniform mat3 lightMapTransform;
2440	varying vec2 vLightMapUv;
2441#endif
2442#ifdef USE_AOMAP
2443	uniform mat3 aoMapTransform;
2444	varying vec2 vAoMapUv;
2445#endif
2446#ifdef USE_BUMPMAP
2447	uniform mat3 bumpMapTransform;
2448	varying vec2 vBumpMapUv;
2449#endif
2450#ifdef USE_NORMALMAP
2451	uniform mat3 normalMapTransform;
2452	varying vec2 vNormalMapUv;
2453#endif
2454#ifdef USE_DISPLACEMENTMAP
2455	uniform mat3 displacementMapTransform;
2456	varying vec2 vDisplacementMapUv;
2457#endif
2458#ifdef USE_EMISSIVEMAP
2459	uniform mat3 emissiveMapTransform;
2460	varying vec2 vEmissiveMapUv;
2461#endif
2462#ifdef USE_METALNESSMAP
2463	uniform mat3 metalnessMapTransform;
2464	varying vec2 vMetalnessMapUv;
2465#endif
2466#ifdef USE_ROUGHNESSMAP
2467	uniform mat3 roughnessMapTransform;
2468	varying vec2 vRoughnessMapUv;
2469#endif
2470#ifdef USE_ANISOTROPYMAP
2471	uniform mat3 anisotropyMapTransform;
2472	varying vec2 vAnisotropyMapUv;
2473#endif
2474#ifdef USE_CLEARCOATMAP
2475	uniform mat3 clearcoatMapTransform;
2476	varying vec2 vClearcoatMapUv;
2477#endif
2478#ifdef USE_CLEARCOAT_NORMALMAP
2479	uniform mat3 clearcoatNormalMapTransform;
2480	varying vec2 vClearcoatNormalMapUv;
2481#endif
2482#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2483	uniform mat3 clearcoatRoughnessMapTransform;
2484	varying vec2 vClearcoatRoughnessMapUv;
2485#endif
2486#ifdef USE_SHEEN_COLORMAP
2487	uniform mat3 sheenColorMapTransform;
2488	varying vec2 vSheenColorMapUv;
2489#endif
2490#ifdef USE_SHEEN_ROUGHNESSMAP
2491	uniform mat3 sheenRoughnessMapTransform;
2492	varying vec2 vSheenRoughnessMapUv;
2493#endif
2494#ifdef USE_IRIDESCENCEMAP
2495	uniform mat3 iridescenceMapTransform;
2496	varying vec2 vIridescenceMapUv;
2497#endif
2498#ifdef USE_IRIDESCENCE_THICKNESSMAP
2499	uniform mat3 iridescenceThicknessMapTransform;
2500	varying vec2 vIridescenceThicknessMapUv;
2501#endif
2502#ifdef USE_SPECULARMAP
2503	uniform mat3 specularMapTransform;
2504	varying vec2 vSpecularMapUv;
2505#endif
2506#ifdef USE_SPECULAR_COLORMAP
2507	uniform mat3 specularColorMapTransform;
2508	varying vec2 vSpecularColorMapUv;
2509#endif
2510#ifdef USE_SPECULAR_INTENSITYMAP
2511	uniform mat3 specularIntensityMapTransform;
2512	varying vec2 vSpecularIntensityMapUv;
2513#endif
2514#ifdef USE_TRANSMISSIONMAP
2515	uniform mat3 transmissionMapTransform;
2516	varying vec2 vTransmissionMapUv;
2517#endif
2518#ifdef USE_THICKNESSMAP
2519	uniform mat3 thicknessMapTransform;
2520	varying vec2 vThicknessMapUv;
2521#endif`,s7=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2522	vUv = vec3( uv, 1 ).xy;
2523#endif
2524#ifdef USE_MAP
2525	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
2526#endif
2527#ifdef USE_ALPHAMAP
2528	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
2529#endif
2530#ifdef USE_LIGHTMAP
2531	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
2532#endif
2533#ifdef USE_AOMAP
2534	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
2535#endif
2536#ifdef USE_BUMPMAP
2537	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
2538#endif
2539#ifdef USE_NORMALMAP
2540	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
2541#endif
2542#ifdef USE_DISPLACEMENTMAP
2543	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
2544#endif
2545#ifdef USE_EMISSIVEMAP
2546	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
2547#endif
2548#ifdef USE_METALNESSMAP
2549	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
2550#endif
2551#ifdef USE_ROUGHNESSMAP
2552	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
2553#endif
2554#ifdef USE_ANISOTROPYMAP
2555	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
2556#endif
2557#ifdef USE_CLEARCOATMAP
2558	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
2559#endif
2560#ifdef USE_CLEARCOAT_NORMALMAP
2561	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
2562#endif
2563#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2564	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
2565#endif
2566#ifdef USE_IRIDESCENCEMAP
2567	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
2568#endif
2569#ifdef USE_IRIDESCENCE_THICKNESSMAP
2570	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
2571#endif
2572#ifdef USE_SHEEN_COLORMAP
2573	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
2574#endif
2575#ifdef USE_SHEEN_ROUGHNESSMAP
2576	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
2577#endif
2578#ifdef USE_SPECULARMAP
2579	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
2580#endif
2581#ifdef USE_SPECULAR_COLORMAP
2582	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
2583#endif
2584#ifdef USE_SPECULAR_INTENSITYMAP
2585	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
2586#endif
2587#ifdef USE_TRANSMISSIONMAP
2588	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
2589#endif
2590#ifdef USE_THICKNESSMAP
2591	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
2592#endif`,o7=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
2593	vec4 worldPosition = vec4( transformed, 1.0 );
2594	#ifdef USE_BATCHING
2595		worldPosition = batchingMatrix * worldPosition;
2596	#endif
2597	#ifdef USE_INSTANCING
2598		worldPosition = instanceMatrix * worldPosition;
2599	#endif
2600	worldPosition = modelMatrix * worldPosition;
2601#endif`;const a7=`varying vec2 vUv;
2602uniform mat3 uvTransform;
2603void main() {
2604	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
2605	gl_Position = vec4( position.xy, 1.0, 1.0 );
2606}`,l7=`uniform sampler2D t2D;
2607uniform float backgroundIntensity;
2608varying vec2 vUv;
2609void main() {
2610	vec4 texColor = texture2D( t2D, vUv );
2611	#ifdef DECODE_VIDEO_TEXTURE
2612		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 );
2613	#endif
2614	texColor.rgb *= backgroundIntensity;
2615	gl_FragColor = texColor;
2616	#include <tonemapping_fragment>
2617	#include <colorspace_fragment>
2618}`,c7=`varying vec3 vWorldDirection;
2619#include <common>
2620void main() {
2621	vWorldDirection = transformDirection( position, modelMatrix );
2622	#include <begin_vertex>
2623	#include <project_vertex>
2624	gl_Position.z = gl_Position.w;
2625}`,u7=`#ifdef ENVMAP_TYPE_CUBE
2626	uniform samplerCube envMap;
2627#elif defined( ENVMAP_TYPE_CUBE_UV )
2628	uniform sampler2D envMap;
2629#endif
2630uniform float flipEnvMap;
2631uniform float backgroundBlurriness;
2632uniform float backgroundIntensity;
2633uniform mat3 backgroundRotation;
2634varying vec3 vWorldDirection;
2635#include <cube_uv_reflection_fragment>
2636void main() {
2637	#ifdef ENVMAP_TYPE_CUBE
2638		vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
2639	#elif defined( ENVMAP_TYPE_CUBE_UV )
2640		vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
2641	#else
2642		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
2643	#endif
2644	texColor.rgb *= backgroundIntensity;
2645	gl_FragColor = texColor;
2646	#include <tonemapping_fragment>
2647	#include <colorspace_fragment>
2648}`,d7=`varying vec3 vWorldDirection;
2649#include <common>
2650void main() {
2651	vWorldDirection = transformDirection( position, modelMatrix );
2652	#include <begin_vertex>
2653	#include <project_vertex>
2654	gl_Position.z = gl_Position.w;
2655}`,h7=`uniform samplerCube tCube;
2656uniform float tFlip;
2657uniform float opacity;
2658varying vec3 vWorldDirection;
2659void main() {
2660	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
2661	gl_FragColor = texColor;
2662	gl_FragColor.a *= opacity;
2663	#include <tonemapping_fragment>
2664	#include <colorspace_fragment>
2665}`,f7=`#include <common>
2666#include <batching_pars_vertex>
2667#include <uv_pars_vertex>
2668#include <displacementmap_pars_vertex>
2669#include <morphtarget_pars_vertex>
2670#include <skinning_pars_vertex>
2671#include <logdepthbuf_pars_vertex>
2672#include <clipping_planes_pars_vertex>
2673varying vec2 vHighPrecisionZW;
2674void main() {
2675	#include <uv_vertex>
2676	#include <batching_vertex>
2677	#include <skinbase_vertex>
2678	#include <morphinstance_vertex>
2679	#ifdef USE_DISPLACEMENTMAP
2680		#include <beginnormal_vertex>
2681		#include <morphnormal_vertex>
2682		#include <skinnormal_vertex>
2683	#endif
2684	#include <begin_vertex>
2685	#include <morphtarget_vertex>
2686	#include <skinning_vertex>
2687	#include <displacementmap_vertex>
2688	#include <project_vertex>
2689	#include <logdepthbuf_vertex>
2690	#include <clipping_planes_vertex>
2691	vHighPrecisionZW = gl_Position.zw;
2692}`,p7=`#if DEPTH_PACKING == 3200
2693	uniform float opacity;
2694#endif
2695#include <common>
2696#include <packing>
2697#include <uv_pars_fragment>
2698#include <map_pars_fragment>
2699#include <alphamap_pars_fragment>
2700#include <alphatest_pars_fragment>
2701#include <alphahash_pars_fragment>
2702#include <logdepthbuf_pars_fragment>
2703#include <clipping_planes_pars_fragment>
2704varying vec2 vHighPrecisionZW;
2705void main() {
2706	vec4 diffuseColor = vec4( 1.0 );
2707	#include <clipping_planes_fragment>
2708	#if DEPTH_PACKING == 3200
2709		diffuseColor.a = opacity;
2710	#endif
2711	#include <map_fragment>
2712	#include <alphamap_fragment>
2713	#include <alphatest_fragment>
2714	#include <alphahash_fragment>
2715	#include <logdepthbuf_fragment>
2716	float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
2717	#if DEPTH_PACKING == 3200
2718		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
2719	#elif DEPTH_PACKING == 3201
2720		gl_FragColor = packDepthToRGBA( fragCoordZ );
2721	#elif DEPTH_PACKING == 3202
2722		gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
2723	#elif DEPTH_PACKING == 3203
2724		gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
2725	#endif
2726}`,m7=`#define DISTANCE
2727varying vec3 vWorldPosition;
2728#include <common>
2729#include <batching_pars_vertex>
2730#include <uv_pars_vertex>
2731#include <displacementmap_pars_vertex>
2732#include <morphtarget_pars_vertex>
2733#include <skinning_pars_vertex>
2734#include <clipping_planes_pars_vertex>
2735void main() {
2736	#include <uv_vertex>
2737	#include <batching_vertex>
2738	#include <skinbase_vertex>
2739	#include <morphinstance_vertex>
2740	#ifdef USE_DISPLACEMENTMAP
2741		#include <beginnormal_vertex>
2742		#include <morphnormal_vertex>
2743		#include <skinnormal_vertex>
2744	#endif
2745	#include <begin_vertex>
2746	#include <morphtarget_vertex>
2747	#include <skinning_vertex>
2748	#include <displacementmap_vertex>
2749	#include <project_vertex>
2750	#include <worldpos_vertex>
2751	#include <clipping_planes_vertex>
2752	vWorldPosition = worldPosition.xyz;
2753}`,g7=`#define DISTANCE
2754uniform vec3 referencePosition;
2755uniform float nearDistance;
2756uniform float farDistance;
2757varying vec3 vWorldPosition;
2758#include <common>
2759#include <packing>
2760#include <uv_pars_fragment>
2761#include <map_pars_fragment>
2762#include <alphamap_pars_fragment>
2763#include <alphatest_pars_fragment>
2764#include <alphahash_pars_fragment>
2765#include <clipping_planes_pars_fragment>
2766void main () {
2767	vec4 diffuseColor = vec4( 1.0 );
2768	#include <clipping_planes_fragment>
2769	#include <map_fragment>
2770	#include <alphamap_fragment>
2771	#include <alphatest_fragment>
2772	#include <alphahash_fragment>
2773	float dist = length( vWorldPosition - referencePosition );
2774	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
2775	dist = saturate( dist );
2776	gl_FragColor = packDepthToRGBA( dist );
2777}`,v7=`varying vec3 vWorldDirection;
2778#include <common>
2779void main() {
2780	vWorldDirection = transformDirection( position, modelMatrix );
2781	#include <begin_vertex>
2782	#include <project_vertex>
2783}
2783`,y7=`uniform sampler2D tEquirect;
2784varying vec3 vWorldDirection;
2785#include <common>
2786void main() {
2787	vec3 direction = normalize( vWorldDirection );
2788	vec2 sampleUV = equirectUv( direction );
2789	gl_FragColor = texture2D( tEquirect, sampleUV );
2790	#include <tonemapping_fragment>
2791	#include <colorspace_fragment>
2792}`,x7=`uniform float scale;
2793attribute float lineDistance;
2794varying float vLineDistance;
2795#include <common>
2796#include <uv_pars_vertex>
2797#include <color_pars_vertex>
2798#include <fog_pars_vertex>
2799#include <morphtarget_pars_vertex>
2800#include <logdepthbuf_pars_vertex>
2801#include <clipping_planes_pars_vertex>
2802void main() {
2803	vLineDistance = scale * lineDistance;
2804	#include <uv_vertex>
2805	#include <color_vertex>
2806	#include <morphinstance_vertex>
2807	#include <morphcolor_vertex>
2808	#include <begin_vertex>
2809	#include <morphtarget_vertex>
2810	#include <project_vertex>
2811	#include <logdepthbuf_vertex>
2812	#include <clipping_planes_vertex>
2813	#include <fog_vertex>
2814}`,_7=`uniform vec3 diffuse;
2815uniform float opacity;
2816uniform float dashSize;
2817uniform float totalSize;
2818varying float vLineDistance;
2819#include <common>
2820#include <color_pars_fragment>
2821#include <uv_pars_fragment>
2822#include <map_pars_fragment>
2823#include <fog_pars_fragment>
2824#include <logdepthbuf_pars_fragment>
2825#include <clipping_planes_pars_fragment>
2826void main() {
2827	vec4 diffuseColor = vec4( diffuse, opacity );
2828	#include <clipping_planes_fragment>
2829	if ( mod( vLineDistance, totalSize ) > dashSize ) {
2830		discard;
2831	}
2832	vec3 outgoingLight = vec3( 0.0 );
2833	#include <logdepthbuf_fragment>
2834	#include <map_fragment>
2835	#include <color_fragment>
2836	outgoingLight = diffuseColor.rgb;
2837	#include <opaque_fragment>
2838	#include <tonemapping_fragment>
2839	#include <colorspace_fragment>
2840	#include <fog_fragment>
2841	#include <premultiplied_alpha_fragment>
2842}`,A7=`#include <common>
2843#include <batching_pars_vertex>
2844#include <uv_pars_vertex>
2845#include <envmap_pars_vertex>
2846#include <color_pars_vertex>
2847#include <fog_pars_vertex>
2848#include <morphtarget_pars_vertex>
2849#include <skinning_pars_vertex>
2850#include <logdepthbuf_pars_vertex>
2851#include <clipping_planes_pars_vertex>
2852void main() {
2853	#include <uv_vertex>
2854	#include <color_vertex>
2855	#include <morphinstance_vertex>
2856	#include <morphcolor_vertex>
2857	#include <batching_vertex>
2858	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
2859		#include <beginnormal_vertex>
2860		#include <morphnormal_vertex>
2861		#include <skinbase_vertex>
2862		#include <skinnormal_vertex>
2863		#include <defaultnormal_vertex>
2864	#endif
2865	#include <begin_vertex>
2866	#include <morphtarget_vertex>
2867	#include <skinning_vertex>
2868	#include <project_vertex>
2869	#include <logdepthbuf_vertex>
2870	#include <clipping_planes_vertex>
2871	#include <worldpos_vertex>
2872	#include <envmap_vertex>
2873	#include <fog_vertex>
2874}`,S7=`uniform vec3 diffuse;
2875uniform float opacity;
2876#ifndef FLAT_SHADED
2877	varying vec3 vNormal;
2878#endif
2879#include <common>
2880#include <dithering_pars_fragment>
2881#include <color_pars_fragment>
2882#include <uv_pars_fragment>
2883#include <map_pars_fragment>
2884#include <alphamap_pars_fragment>
2885#include <alphatest_pars_fragment>
2886#include <alphahash_pars_fragment>
2887#include <aomap_pars_fragment>
2888#include <lightmap_pars_fragment>
2889#include <envmap_common_pars_fragment>
2890#include <envmap_pars_fragment>
2891#include <fog_pars_fragment>
2892#include <specularmap_pars_fragment>
2893#include <logdepthbuf_pars_fragment>
2894#include <clipping_planes_pars_fragment>
2895void main() {
2896	vec4 diffuseColor = vec4( diffuse, opacity );
2897	#include <clipping_planes_fragment>
2898	#include <logdepthbuf_fragment>
2899	#include <map_fragment>
2900	#include <color_fragment>
2901	#include <alphamap_fragment>
2902	#include <alphatest_fragment>
2903	#include <alphahash_fragment>
2904	#include <specularmap_fragment>
2905	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2906	#ifdef USE_LIGHTMAP
2907		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
2908		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
2909	#else
2910		reflectedLight.indirectDiffuse += vec3( 1.0 );
2911	#endif
2912	#include <aomap_fragment>
2913	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
2914	vec3 outgoingLight = reflectedLight.indirectDiffuse;
2915	#include <envmap_fragment>
2916	#include <opaque_fragment>
2917	#include <tonemapping_fragment>
2918	#include <colorspace_fragment>
2919	#include <fog_fragment>
2920	#include <premultiplied_alpha_fragment>
2921	#include <dithering_fragment>
2922}`,w7=`#define LAMBERT
2923varying vec3 vViewPosition;
2924#include <common>
2925#include <batching_pars_vertex>
2926#include <uv_pars_vertex>
2927#include <displacementmap_pars_vertex>
2928#include <envmap_pars_vertex>
2929#include <color_pars_vertex>
2930#include <fog_pars_vertex>
2931#include <normal_pars_vertex>
2932#include <morphtarget_pars_vertex>
2933#include <skinning_pars_vertex>
2934#include <shadowmap_pars_vertex>
2935#include <logdepthbuf_pars_vertex>
2936#include <clipping_planes_pars_vertex>
2937void main() {
2938	#include <uv_vertex>
2939	#include <color_vertex>
2940	#include <morphinstance_vertex>
2941	#include <morphcolor_vertex>
2942	#include <batching_vertex>
2943	#include <beginnormal_vertex>
2944	#include <morphnormal_vertex>
2945	#include <skinbase_vertex>
2946	#include <skinnormal_vertex>
2947	#include <defaultnormal_vertex>
2948	#include <normal_vertex>
2949	#include <begin_vertex>
2950	#include <morphtarget_vertex>
2951	#include <skinning_vertex>
2952	#include <displacementmap_vertex>
2953	#include <project_vertex>
2954	#include <logdepthbuf_vertex>
2955	#include <clipping_planes_vertex>
2956	vViewPosition = - mvPosition.xyz;
2957	#include <worldpos_vertex>
2958	#include <envmap_vertex>
2959	#include <shadowmap_vertex>
2960	#include <fog_vertex>
2961}`,M7=`#define LAMBERT
2962uniform vec3 diffuse;
2963uniform vec3 emissive;
2964uniform float opacity;
2965#include <common>
2966#include <packing>
2967#include <dithering_pars_fragment>
2968#include <color_pars_fragment>
2969#include <uv_pars_fragment>
2970#include <map_pars_fragment>
2971#include <alphamap_pars_fragment>
2972#include <alphatest_pars_fragment>
2973#include <alphahash_pars_fragment>
2974#include <aomap_pars_fragment>
2975#include <lightmap_pars_fragment>
2976#include <emissivemap_pars_fragment>
2977#include <envmap_common_pars_fragment>
2978#include <envmap_pars_fragment>
2979#include <fog_pars_fragment>
2980#include <bsdfs>
2981#include <lights_pars_begin>
2982#include <normal_pars_fragment>
2983#include <lights_lambert_pars_fragment>
2984#include <shadowmap_pars_fragment>
2985#include <bumpmap_pars_fragment>
2986#include <normalmap_pars_fragment>
2987#include <specularmap_pars_fragment>
2988#include <logdepthbuf_pars_fragment>
2989#include <clipping_planes_pars_fragment>
2990void main() {
2991	vec4 diffuseColor = vec4( diffuse, opacity );
2992	#include <clipping_planes_fragment>
2993	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2994	vec3 totalEmissiveRadiance = emissive;
2995	#include <logdepthbuf_fragment>
2996	#include <map_fragment>
2997	#include <color_fragment>
2998	#include <alphamap_fragment>
2999	#include <alphatest_fragment>
3000	#include <alphahash_fragment>
3001	#include <specularmap_fragment>
3002	#include <normal_fragment_begin>
3003	#include <normal_fragment_maps>
3004	#include <emissivemap_fragment>
3005	#include <lights_lambert_fragment>
3006	#include <lights_fragment_begin>
3007	#include <lights_fragment_maps>
3008	#include <lights_fragment_end>
3009	#include <aomap_fragment>
3010	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3011	#include <envmap_fragment>
3012	#include <opaque_fragment>
3013	#include <tonemapping_fragment>
3014	#include <colorspace_fragment>
3015	#include <fog_fragment>
3016	#include <premultiplied_alpha_fragment>
3017	#include <dithering_fragment>
3018}`,E7=`#define MATCAP
3019varying vec3 vViewPosition;
3020#include <common>
3021#include <batching_pars_vertex>
3022#include <uv_pars_vertex>
3023#include <color_pars_vertex>
3024#include <displacementmap_pars_vertex>
3025#include <fog_pars_vertex>
3026#include <normal_pars_vertex>
3027#include <morphtarget_pars_vertex>
3028#include <skinning_pars_vertex>
3029#include <logdepthbuf_pars_vertex>
3030#include <clipping_planes_pars_vertex>
3031void main() {
3032	#include <uv_vertex>
3033	#include <color_vertex>
3034	#include <morphinstance_vertex>
3035	#include <morphcolor_vertex>
3036	#include <batching_vertex>
3037	#include <beginnormal_vertex>
3038	#include <morphnormal_vertex>
3039	#include <skinbase_vertex>
3040	#include <skinnormal_vertex>
3041	#include <defaultnormal_vertex>
3042	#include <normal_vertex>
3043	#include <begin_vertex>
3044	#include <morphtarget_vertex>
3045	#include <skinning_vertex>
3046	#include <displacementmap_vertex>
3047	#include <project_vertex>
3048	#include <logdepthbuf_vertex>
3049	#include <clipping_planes_vertex>
3050	#include <fog_vertex>
3051	vViewPosition = - mvPosition.xyz;
3052}`,C7=`#define MATCAP
3053uniform vec3 diffuse;
3054uniform float opacity;
3055uniform sampler2D matcap;
3056varying vec3 vViewPosition;
3057#include <common>
3058#include <dithering_pars_fragment>
3059#include <color_pars_fragment>
3060#include <uv_pars_fragment>
3061#include <map_pars_fragment>
3062#include <alphamap_pars_fragment>
3063#include <alphatest_pars_fragment>
3064#include <alphahash_pars_fragment>
3065#include <fog_pars_fragment>
3066#include <normal_pars_fragment>
3067#include <bumpmap_pars_fragment>
3068#include <normalmap_pars_fragment>
3069#include <logdepthbuf_pars_fragment>
3070#include <clipping_planes_pars_fragment>
3071void main() {
3072	vec4 diffuseColor = vec4( diffuse, opacity );
3073	#include <clipping_planes_fragment>
3074	#include <logdepthbuf_fragment>
3075	#include <map_fragment>
3076	#include <color_fragment>
3077	#include <alphamap_fragment>
3078	#include <alphatest_fragment>
3079	#include <alphahash_fragment>
3080	#include <normal_fragment_begin>
3081	#include <normal_fragment_maps>
3082	vec3 viewDir = normalize( vViewPosition );
3083	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
3084	vec3 y = cross( viewDir, x );
3085	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
3086	#ifdef USE_MATCAP
3087		vec4 matcapColor = texture2D( matcap, uv );
3088	#else
3089		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
3090	#endif
3091	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
3092	#include <opaque_fragment>
3093	#include <tonemapping_fragment>
3094	#include <colorspace_fragment>
3095	#include <fog_fragment>
3096	#include <premultiplied_alpha_fragment>
3097	#include <dithering_fragment>
3098}`,T7=`#define NORMAL
3099#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3100	varying vec3 vViewPosition;
3101#endif
3102#include <common>
3103#include <batching_pars_vertex>
3104#include <uv_pars_vertex>
3105#include <displacementmap_pars_vertex>
3106#include <normal_pars_vertex>
3107#include <morphtarget_pars_vertex>
3108#include <skinning_pars_vertex>
3109#include <logdepthbuf_pars_vertex>
3110#include <clipping_planes_pars_vertex>
3111void main() {
3112	#include <uv_vertex>
3113	#include <batching_vertex>
3114	#include <beginnormal_vertex>
3115	#include <morphinstance_vertex>
3116	#include <morphnormal_vertex>
3117	#include <skinbase_vertex>
3118	#include <skinnormal_vertex>
3119	#include <defaultnormal_vertex>
3120	#include <normal_vertex>
3121	#include <begin_vertex>
3122	#include <morphtarget_vertex>
3123	#include <skinning_vertex>
3124	#include <displacementmap_vertex>
3125	#include <project_vertex>
3126	#include <logdepthbuf_vertex>
3127	#include <clipping_planes_vertex>
3128#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3129	vViewPosition = - mvPosition.xyz;
3130#endif
3131}`,b7=`#define NORMAL
3132uniform float opacity;
3133#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3134	varying vec3 vViewPosition;
3135#endif
3136#include <packing>
3137#include <uv_pars_fragment>
3138#include <normal_pars_fragment>
3139#include <bumpmap_pars_fragment>
3140#include <normalmap_pars_fragment>
3141#include <logdepthbuf_pars_fragment>
3142#include <clipping_planes_pars_fragment>
3143void main() {
3144	vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
3145	#include <clipping_planes_fragment>
3146	#include <logdepthbuf_fragment>
3147	#include <normal_fragment_begin>
3148	#include <normal_fragment_maps>
3149	gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
3150	#ifdef OPAQUE
3151		gl_FragColor.a = 1.0;
3152	#endif
3153}`,R7=`#define PHONG
3154varying vec3 vViewPosition;
3155#include <common>
3156#include <batching_pars_vertex>
3157#include <uv_pars_vertex>
3158#include <displacementmap_pars_vertex>
3159#include <envmap_pars_vertex>
3160#include <color_pars_vertex>
3161#include <fog_pars_vertex>
3162#include <normal_pars_vertex>
3163#include <morphtarget_pars_vertex>
3164#include <skinning_pars_vertex>
3165#include <shadowmap_pars_vertex>
3166#include <logdepthbuf_pars_vertex>
3167#include <clipping_planes_pars_vertex>
3168void main() {
3169	#include <uv_vertex>
3170	#include <color_vertex>
3171	#include <morphcolor_vertex>
3172	#include <batching_vertex>
3173	#include <beginnormal_vertex>
3174	#include <morphinstance_vertex>
3175	#include <morphnormal_vertex>
3176	#include <skinbase_vertex>
3177	#include <skinnormal_vertex>
3178	#include <defaultnormal_vertex>
3179	#include <normal_vertex>
3180	#include <begin_vertex>
3181	#include <morphtarget_vertex>
3182	#include <skinning_vertex>
3183	#include <displacementmap_vertex>
3184	#include <project_vertex>
3185	#include <logdepthbuf_vertex>
3186	#include <clipping_planes_vertex>
3187	vViewPosition = - mvPosition.xyz;
3188	#include <worldpos_vertex>
3189	#include <envmap_vertex>
3190	#include <shadowmap_vertex>
3191	#include <fog_vertex>
3192}`,P7=`#define PHONG
3193uniform vec3 diffuse;
3194uniform vec3 emissive;
3195uniform vec3 specular;
3196uniform float shininess;
3197uniform float opacity;
3198#include <common>
3199#include <packing>
3200#include <dithering_pars_fragment>
3201#include <color_pars_fragment>
3202#include <uv_pars_fragment>
3203#include <map_pars_fragment>
3204#include <alphamap_pars_fragment>
3205#include <alphatest_pars_fragment>
3206#include <alphahash_pars_fragment>
3207#include <aomap_pars_fragment>
3208#include <lightmap_pars_fragment>
3209#include <emissivemap_pars_fragment>
3210#include <envmap_common_pars_fragment>
3211#include <envmap_pars_fragment>
3212#include <fog_pars_fragment>
3213#include <bsdfs>
3214#include <lights_pars_begin>
3215#include <normal_pars_fragment>
3216#include <lights_phong_pars_fragment>
3217#include <shadowmap_pars_fragment>
3218#include <bumpmap_pars_fragment>
3219#include <normalmap_pars_fragment>
3220#include <specularmap_pars_fragment>
3221#include <logdepthbuf_pars_fragment>
3222#include <clipping_planes_pars_fragment>
3223void main() {
3224	vec4 diffuseColor = vec4( diffuse, opacity );
3225	#include <clipping_planes_fragment>
3226	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3227	vec3 totalEmissiveRadiance = emissive;
3228	#include <logdepthbuf_fragment>
3229	#include <map_fragment>
3230	#include <color_fragment>
3231	#include <alphamap_fragment>
3232	#include <alphatest_fragment>
3233	#include <alphahash_fragment>
3234	#include <specularmap_fragment>
3235	#include <normal_fragment_begin>
3236	#include <normal_fragment_maps>
3237	#include <emissivemap_fragment>
3238	#include <lights_phong_fragment>
3239	#include <lights_fragment_begin>
3240	#include <lights_fragment_maps>
3241	#include <lights_fragment_end>
3242	#include <aomap_fragment>
3243	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
3244	#include <envmap_fragment>
3245	#include <opaque_fragment>
3246	#include <tonemapping_fragment>
3247	#include <colorspace_fragment>
3248	#include <fog_fragment>
3249	#include <premultiplied_alpha_fragment>
3250	#include <dithering_fragment>
3251}`,I7=`#define STANDARD
3252varying vec3 vViewPosition;
3253#ifdef USE_TRANSMISSION
3254	varying vec3 vWorldPosition;
3255#endif
3256#include <common>
3257#include <batching_pars_vertex>
3258#include <uv_pars_vertex>
3259#include <displacementmap_pars_vertex>
3260#include <color_pars_vertex>
3261#include <fog_pars_vertex>
3262#include <normal_pars_vertex>
3263#include <morphtarget_pars_vertex>
3264#include <skinning_pars_vertex>
3265#include <shadowmap_pars_vertex>
3266#include <logdepthbuf_pars_vertex>
3267#include <clipping_planes_pars_vertex>
3268void main() {
3269	#include <uv_vertex>
3270	#include <color_vertex>
3271	#include <morphinstance_vertex>
3272	#include <morphcolor_vertex>
3273	#include <batching_vertex>
3274	#include <beginnormal_vertex>
3275	#include <morphnormal_vertex>
3276	#include <skinbase_vertex>
3277	#include <skinnormal_vertex>
3278	#include <defaultnormal_vertex>
3279	#include <normal_vertex>
3280	#include <begin_vertex>
3281	#include <morphtarget_vertex>
3282	#include <skinning_vertex>
3283	#include <displacementmap_vertex>
3284	#include <project_vertex>
3285	#include <logdepthbuf_vertex>
3286	#include <clipping_planes_vertex>
3287	vViewPosition = - mvPosition.xyz;
3288	#include <worldpos_vertex>
3289	#include <shadowmap_vertex>
3290	#include <fog_vertex>
3291#ifdef USE_TRANSMISSION
3292	vWorldPosition = worldPosition.xyz;
3293#endif
3294}`,B7=`#define STANDARD
3295#ifdef PHYSICAL
3296	#define IOR
3297	#define USE_SPECULAR
3298#endif
3299uniform vec3 diffuse;
3300uniform vec3 emissive;
3301uniform float roughness;
3302uniform float metalness;
3303uniform float opacity;
3304#ifdef IOR
3305	uniform float ior;
3306#endif
3307#ifdef USE_SPECULAR
3308	uniform float specularIntensity;
3309	uniform vec3 specularColor;
3310	#ifdef USE_SPECULAR_COLORMAP
3311		uniform sampler2D specularColorMap;
3312	#endif
3313	#ifdef USE_SPECULAR_INTENSITYMAP
3314		uniform sampler2D specularIntensityMap;
3315	#endif
3316#endif
3317#ifdef USE_CLEARCOAT
3318	uniform float clearcoat;
3319	uniform float clearcoatRoughness;
3320#endif
3321#ifdef USE_DISPERSION
3322	uniform float dispersion;
3323#endif
3324#ifdef USE_IRIDESCENCE
3325	uniform float iridescence;
3326	uniform float iridescenceIOR;
3327	uniform float iridescenceThicknessMinimum;
3328	uniform float iridescenceThicknessMaximum;
3329#endif
3330#ifdef USE_SHEEN
3331	uniform vec3 sheenColor;
3332	uniform float sheenRoughness;
3333	#ifdef USE_SHEEN_COLORMAP
3334		uniform sampler2D sheenColorMap;
3335	#endif
3336	#ifdef USE_SHEEN_ROUGHNESSMAP
3337		uniform sampler2D sheenRoughnessMap;
3338	#endif
3339#endif
3340#ifdef USE_ANISOTROPY
3341	uniform vec2 anisotropyVector;
3342	#ifdef USE_ANISOTROPYMAP
3343		uniform sampler2D anisotropyMap;
3344	#endif
3345#endif
3346varying vec3 vViewPosition;
3347#include <common>
3348#include <packing>
3349#include <dithering_pars_fragment>
3350#include <color_pars_fragment>
3351#include <uv_pars_fragment>
3352#include <map_pars_fragment>
3353#include <alphamap_pars_fragment>
3354#include <alphatest_pars_fragment>
3355#include <alphahash_pars_fragment>
3356#include <aomap_pars_fragment>
3357#include <lightmap_pars_fragment>
3358#include <emissivemap_pars_fragment>
3359#include <iridescence_fragment>
3360#include <cube_uv_reflection_fragment>
3361#include <envmap_common_pars_fragment>
3362#include <envmap_physical_pars_fragment>
3363#include <fog_pars_fragment>
3364#include <lights_pars_begin>
3365#include <normal_pars_fragment>
3366#include <lights_physical_pars_fragment>
3367#include <transmission_pars_fragment>
3368#include <shadowmap_pars_fragment>
3369#include <bumpmap_pars_fragment>
3370#include <normalmap_pars_fragment>
3371#include <clearcoat_pars_fragment>
3372#include <iridescence_pars_fragment>
3373#include <roughnessmap_pars_fragment>
3374#include <metalnessmap_pars_fragment>
3375#include <logdepthbuf_pars_fragment>
3376#include <clipping_planes_pars_fragment>
3377void main() {
3378	vec4 diffuseColor = vec4( diffuse, opacity );
3379	#include <clipping_planes_fragment>
3380	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3381	vec3 totalEmissiveRadiance = emissive;
3382	#include <logdepthbuf_fragment>
3383	#include <map_fragment>
3384	#include <color_fragment>
3385	#include <alphamap_fragment>
3386	#include <alphatest_fragment>
3387	#include <alphahash_fragment>
3388	#include <roughnessmap_fragment>
3389	#include <metalnessmap_fragment>
3390	#include <normal_fragment_begin>
3391	#include <normal_fragment_maps>
3392	#include <clearcoat_normal_fragment_begin>
3393	#include <clearcoat_normal_fragment_maps>
3394	#include <emissivemap_fragment>
3395	#include <lights_physical_fragment>
3396	#include <lights_fragment_begin>
3397	#include <lights_fragment_maps>
3398	#include <lights_fragment_end>
3399	#include <aomap_fragment>
3400	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
3401	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
3402	#include <transmission_fragment>
3403	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
3404	#ifdef USE_SHEEN
3405		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
3406		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
3407	#endif
3408	#ifdef USE_CLEARCOAT
3409		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
3410		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
3411		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
3412	#endif
3413	#include <opaque_fragment>
3414	#include <tonemapping_fragment>
3415	#include <colorspace_fragment>
3416	#include <fog_fragment>
3417	#include <premultiplied_alpha_fragment>
3418	#include <dithering_fragment>
3419}`,L7=`#define TOON
3420varying vec3 vViewPosition;
3421#include <common>
3422#include <batching_pars_vertex>
3423#include <uv_pars_vertex>
3424#include <displacementmap_pars_vertex>
3425#include <color_pars_vertex>
3426#include <fog_pars_vertex>
3427#include <normal_pars_vertex>
3428#include <morphtarget_pars_vertex>
3429#include <skinning_pars_vertex>
3430#include <shadowmap_pars_vertex>
3431#include <logdepthbuf_pars_vertex>
3432#include <clipping_planes_pars_vertex>
3433void main() {
3434	#include <uv_vertex>
3435	#include <color_vertex>
3436	#include <morphinstance_vertex>
3437	#include <morphcolor_vertex>
3438	#include <batching_vertex>
3439	#include <beginnormal_vertex>
3440	#include <morphnormal_vertex>
3441	#include <skinbase_vertex>
3442	#include <skinnormal_vertex>
3443	#include <defaultnormal_vertex>
3444	#include <normal_vertex>
3445	#include <begin_vertex>
3446	#include <morphtarget_vertex>
3447	#include <skinning_vertex>
3448	#include <displacementmap_vertex>
3449	#include <project_vertex>
3450	#include <logdepthbuf_vertex>
3451	#include <clipping_planes_vertex>
3452	vViewPosition = - mvPosition.xyz;
3453	#include <worldpos_vertex>
3454	#include <shadowmap_vertex>
3455	#include <fog_vertex>
3456}`,D7=`#define TOON
3457uniform vec3 diffuse;
3458uniform vec3 emissive;
3459uniform float opacity;
3460#include <common>
3461#include <packing>
3462#include <dithering_pars_fragment>
3463#include <color_pars_fragment>
3464#include <uv_pars_fragment>
3465#include <map_pars_fragment>
3466#include <alphamap_pars_fragment>
3467#include <alphatest_pars_fragment>
3468#include <alphahash_pars_fragment>
3469#include <aomap_pars_fragment>
3470#include <lightmap_pars_fragment>
3471#include <emissivemap_pars_fragment>
3472#include <gradientmap_pars_fragment>
3473#include <fog_pars_fragment>
3474#include <bsdfs>
3475#include <lights_pars_begin>
3476#include <normal_pars_fragment>
3477#include <lights_toon_pars_fragment>
3478#include <shadowmap_pars_fragment>
3479#include <bumpmap_pars_fragment>
3480#include <normalmap_pars_fragment>
3481#include <logdepthbuf_pars_fragment>
3482#include <clipping_planes_pars_fragment>
3483void main() {
3484	vec4 diffuseColor = vec4( diffuse, opacity );
3485	#include <clipping_planes_fragment>
3486	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3487	vec3 totalEmissiveRadiance = emissive;
3488	#include <logdepthbuf_fragment>
3489	#include <map_fragment>
3490	#include <color_fragment>
3491	#include <alphamap_fragment>
3492	#include <alphatest_fragment>
3493	#include <alphahash_fragment>
3494	#include <normal_fragment_begin>
3495	#include <normal_fragment_maps>
3496	#include <emissivemap_fragment>
3497	#include <lights_toon_fragment>
3498	#include <lights_fragment_begin>
3499	#include <lights_fragment_maps>
3500	#include <lights_fragment_end>
3501	#include <aomap_fragment>
3502	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3503	#include <opaque_fragment>
3504	#include <tonemapping_fragment>
3505	#include <colorspace_fragment>
3506	#include <fog_fragment>
3507	#include <premultiplied_alpha_fragment>
3508	#include <dithering_fragment>
3509}`,N7=`uniform float size;
3510uniform float scale;
3511#include <common>
3512#include <color_pars_vertex>
3513#include <fog_pars_vertex>
3514#include <morphtarget_pars_vertex>
3515#include <logdepthbuf_pars_vertex>
3516#include <clipping_planes_pars_vertex>
3517#ifdef USE_POINTS_UV
3518	varying vec2 vUv;
3519	uniform mat3 uvTransform;
3520#endif
3521void main() {
3522	#ifdef USE_POINTS_UV
3523		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
3524	#endif
3525	#include <color_vertex>
3526	#include <morphinstance_vertex>
3527	#include <morphcolor_vertex>
3528	#include <begin_vertex>
3529	#include <morphtarget_vertex>
3530	#include <project_vertex>
3531	gl_PointSize = size;
3532	#ifdef USE_SIZEATTENUATION
3533		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3534		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
3535	#endif
3536	#include <logdepthbuf_vertex>
3537	#include <clipping_planes_vertex>
3538	#include <worldpos_vertex>
3539	#include <fog_vertex>
3540}`,F7=`uniform vec3 diffuse;
3541uniform float opacity;
3542#include <common>
3543#include <color_pars_fragment>
3544#include <map_particle_pars_fragment>
3545#include <alphatest_pars_fragment>
3546#include <alphahash_pars_fragment>
3547#include <fog_pars_fragment>
3548#include <logdepthbuf_pars_fragment>
3549#include <clipping_planes_pars_fragment>
3550void main() {
3551	vec4 diffuseColor = vec4( diffuse, opacity );
3552	#include <clipping_planes_fragment>
3553	vec3 outgoingLight = vec3( 0.0 );
3554	#include <logdepthbuf_fragment>
3555	#include <map_particle_fragment>
3556	#include <color_fragment>
3557	#include <alphatest_fragment>
3558	#include <alphahash_fragment>
3559	outgoingLight = diffuseColor.rgb;
3560	#include <opaque_fragment>
3561	#include <tonemapping_fragment>
3562	#include <colorspace_fragment>
3563	#include <fog_fragment>
3564	#include <premultiplied_alpha_fragment>
3565}`,k7=`#include <common>
3566#include <batching_pars_vertex>
3567#include <fog_pars_vertex>
3568#include <morphtarget_pars_vertex>
3569#include <skinning_pars_vertex>
3570#include <logdepthbuf_pars_vertex>
3571#include <shadowmap_pars_vertex>
3572void main() {
3573	#include <batching_vertex>
3574	#include <beginnormal_vertex>
3575	#include <morphinstance_vertex>
3576	#include <morphnormal_vertex>
3577	#include <skinbase_vertex>
3578	#include <skinnormal_vertex>
3579	#include <defaultnormal_vertex>
3580	#include <begin_vertex>
3581	#include <morphtarget_vertex>
3582	#include <skinning_vertex>
3583	#include <project_vertex>
3584	#include <logdepthbuf_vertex>
3585	#include <worldpos_vertex>
3586	#include <shadowmap_vertex>
3587	#include <fog_vertex>
3588}`,O7=`uniform vec3 color;
3589uniform float opacity;
3590#include <common>
3591#include <packing>
3592#include <fog_pars_fragment>
3593#include <bsdfs>
3594#include <lights_pars_begin>
3595#include <logdepthbuf_pars_fragment>
3596#include <shadowmap_pars_fragment>
3597#include <shadowmask_pars_fragment>
3598void main() {
3599	#include <logdepthbuf_fragment>
3600	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
3601	#include <tonemapping_fragment>
3602	#include <colorspace_fragment>
3603	#include <fog_fragment>
3604}`,U7=`uniform float rotation;
3605uniform vec2 center;
3606#include <common>
3607#include <uv_pars_vertex>
3608#include <fog_pars_vertex>
3609#include <logdepthbuf_pars_vertex>
3610#include <clipping_planes_pars_vertex>
3611void main() {
3612	#include <uv_vertex>
3613	vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
3614	vec2 scale;
3615	scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
3616	scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
3617	#ifndef USE_SIZEATTENUATION
3618		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3619		if ( isPerspective ) scale *= - mvPosition.z;
3620	#endif
3621	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
3622	vec2 rotatedPosition;
3623	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3624	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3625	mvPosition.xy += rotatedPosition;
3626	gl_Position = projectionMatrix * mvPosition;
3627	#include <logdepthbuf_vertex>
3628	#include <clipping_planes_vertex>
3629	#include <fog_vertex>
3630}`,z7=`uniform vec3 diffuse;
3631uniform float opacity;
3632#include <common>
3633#include <uv_pars_fragment>
3634#include <map_pars_fragment>
3635#include <alphamap_pars_fragment>
3636#include <alphatest_pars_fragment>
3637#include <alphahash_pars_fragment>
3638#include <fog_pars_fragment>
3639#include <logdepthbuf_pars_fragment>
3640#include <clipping_planes_pars_fragment>
3641void main() {
3642	vec4 diffuseColor = vec4( diffuse, opacity );
3643	#include <clipping_planes_fragment>
3644	vec3 outgoingLight = vec3( 0.0 );
3645	#include <logdepthbuf_fragment>
3646	#include <map_fragment>
3647	#include <alphamap_fragment>
3648	#include <alphatest_fragment>
3649	#include <alphahash_fragment>
3650	outgoingLight = diffuseColor.rgb;
3651	#include <opaque_fragment>
3652	#include <tonemapping_fragment>
3653	#include <colorspace_fragment>
3654	#include <fog_fragment>
3655}`,Tt={alphahash_fragment:lj,alphahash_pars_fragment:cj,alphamap_fragment:uj,alphamap_pars_fragment:dj,alphatest_fragment:hj,alphatest_pars_fragment:fj,aomap_fragment:pj,aomap_pars_fragment:mj,batching_pars_vertex:gj,batching_vertex:vj,begin_vertex:yj,beginnormal_vertex:xj,bsdfs:_j,iridescence_fragment:Aj,bumpmap_pars_fragment:Sj,clipping_planes_fragment:wj,clipping_planes_pars_fragment:Mj,clipping_planes_pars_vertex:Ej,clipping_planes_vertex:Cj,color_fragment:Tj,color_pars_fragment:bj,color_pars_vertex:Rj,color_vertex:Pj,common:Ij,cube_uv_reflection_fragment:Bj,defaultnormal_vertex:Lj,displacementmap_pars_vertex:Dj,displacementmap_vertex:Nj,emissivemap_fragment:Fj,emissivemap_pars_fragment:kj,colorspace_fragment:Oj,colorspace_pars_fragment:Uj,envmap_fragment:zj,envmap_common_pars_fragment:Hj,envmap_pars_fragment:Gj,envmap_pars_vertex:Vj,envmap_physical_pars_fragment:eW,envmap_vertex:jj,fog_vertex:Wj,fog_pars_vertex:Xj,fog_fragment:Jj,fog_pars_fragment:Kj,gradientmap_pars_fragment:qj,lightmap_pars_fragment:Qj,lights_lambert_fragment:Yj,lights_lambert_pars_fragment:Zj,lights_pars_begin:$j,lights_toon_fragment:tW,lights_toon_pars_fragment:nW,lights_phong_fragment:iW,lights_phong_pars_fragment:rW,lights_physical_fragment:sW,lights_physical_pars_fragment:oW,lights_fragment_begin:aW,lights_fragment_maps:lW,lights_fragment_end:cW,logdepthbuf_fragment:uW,logdepthbuf_pars_fragment:dW,logdepthbuf_pars_vertex:hW,logdepthbuf_vertex:fW,map_fragment:pW,map_pars_fragment:mW,map_particle_fragment:gW,map_particle_pars_fragment:vW,metalnessmap_fragment:yW,metalnessmap_pars_fragment:xW,morphinstance_vertex:_W,morphcolor_vertex:AW,morphnormal_vertex:SW,morphtarget_pars_vertex:wW,morphtarget_vertex:MW,normal_fragment_begin:EW,normal_fragment_maps:CW,normal_pars_fragment:TW,normal_pars_vertex:bW,normal_vertex:RW,normalmap_pars_fragment:PW,clearcoat_normal_fragment_begin:IW,clearcoat_normal_fragment_maps:BW,clearcoat_pars_fragment:LW,iridescence_pars_fragment:DW,opaque_fragment:NW,packing:FW,premultiplied_alpha_fragment:kW,project_vertex:OW,dithering_fragment:UW,dithering_pars_fragment:zW,roughnessmap_fragment:HW,roughnessmap_pars_fragment:GW,shadowmap_pars_fragment:VW,shadowmap_pars_vertex:jW,shadowmap_vertex:WW,shadowmask_pars_fragment:XW,skinbase_vertex:JW,skinning_pars_vertex:KW,skinning_vertex:qW,skinnormal_vertex:QW,specularmap_fragment:YW,specularmap_pars_fragment:ZW,tonemapping_fragment:$W,tonemapping_pars_fragment:e7,transmission_fragment:t7,transmission_pars_fragment:n7,uv_pars_fragment:i7,uv_pars_vertex:r7,uv_vertex:s7,worldpos_vertex:o7,background_vert:a7,background_frag:l7,backgroundCube_vert:c7,backgroundCube_frag:u7,cube_vert:d7,cube_frag:h7,depth_vert:f7,depth_frag:p7,distanceRGBA_vert:m7,distanceRGBA_frag:g7,equirect_vert:v7,equirect_frag:y7,linedashed_vert:x7,linedashed_frag:_7,meshbasic_vert:A7,meshbasic_frag:S7,meshlambert_vert:w7,meshlambert_frag:M7,meshmatcap_vert:E7,meshmatcap_frag:C7,meshnormal_vert:T7,meshnormal_frag:b7,meshphong_vert:R7,meshphong_frag:P7,meshphysical_vert:I7,meshphysical_frag:B7,meshtoon_vert:L7,meshtoon_frag:D7,points_vert:N7,points_frag:F7,shadow_vert:k7,shadow_frag:O7,sprite_vert:U7,sprite_frag:z7},He={common:{diffuse:{value:new ze(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Et},alphaMap:{value:null},alphaMapTransform:{value:new Et},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Et}},envmap:{envMap:{value:null},envMapRotation:{value:new Et},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Et}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Et}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Et},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Et},normalScale:{value:new he(1,1)}}
vendor: 28,746 bytes, lines 3655-3730
3655,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Et},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Et}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Et}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Et}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ze(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 ze(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Et},alphaTest:{value:0},uvTransform:{value:new Et}},sprite:{diffuse:{value:new ze(16777215)},opacity:{value:1},center:{value:new he(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Et},alphaMap:{value:null},alphaMapTransform:{value:new Et},alphaTest:{value:0}}},as={basic:{uniforms:Di([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.fog]),vertexShader:Tt.meshbasic_vert,fragmentShader:Tt.meshbasic_frag},lambert:{uniforms:Di([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.fog,He.lights,{emissive:{value:new ze(0)}}]),vertexShader:Tt.meshlambert_vert,fragmentShader:Tt.meshlambert_frag},phong:{uniforms:Di([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.fog,He.lights,{emissive:{value:new ze(0)},specular:{value:new ze(1118481)},shininess:{value:30}}]),vertexShader:Tt.meshphong_vert,fragmentShader:Tt.meshphong_frag},standard:{uniforms:Di([He.common,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.roughnessmap,He.metalnessmap,He.fog,He.lights,{emissive:{value:new ze(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag},toon:{uniforms:Di([He.common,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.gradientmap,He.fog,He.lights,{emissive:{value:new ze(0)}}]),vertexShader:Tt.meshtoon_vert,fragmentShader:Tt.meshtoon_frag},matcap:{uniforms:Di([He.common,He.bumpmap,He.normalmap,He.displacementmap,He.fog,{matcap:{value:null}}]),vertexShader:Tt.meshmatcap_vert,fragmentShader:Tt.meshmatcap_frag},points:{uniforms:Di([He.points,He.fog]),vertexShader:Tt.points_vert,fragmentShader:Tt.points_frag},dashed:{uniforms:Di([He.common,He.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Tt.linedashed_vert,fragmentShader:Tt.linedashed_frag},depth:{uniforms:Di([He.common,He.displacementmap]),vertexShader:Tt.depth_vert,fragmentShader:Tt.depth_frag},normal:{uniforms:Di([He.common,He.bumpmap,He.normalmap,He.displacementmap,{opacity:{value:1}}]),vertexShader:Tt.meshnormal_vert,fragmentShader:Tt.meshnormal_frag},sprite:{uniforms:Di([He.sprite,He.fog]),vertexShader:Tt.sprite_vert,fragmentShader:Tt.sprite_frag},background:{uniforms:{uvTransform:{value:new Et},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Tt.background_vert,fragmentShader:Tt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Et}},vertexShader:Tt.backgroundCube_vert,fragmentShader:Tt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Tt.cube_vert,fragmentShader:Tt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Tt.equirect_vert,fragmentShader:Tt.equirect_frag},distanceRGBA:{uniforms:Di([He.common,He.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Tt.distanceRGBA_vert,fragmentShader:Tt.distanceRGBA_frag},shadow:{uniforms:Di([He.lights,He.fog,{color:{value:new ze(0)},opacity:{value:1}}]),vertexShader:Tt.shadow_vert,fragmentShader:Tt.shadow_frag}};as.physical={uniforms:Di([as.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Et},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Et},clearcoatNormalScale:{value:new he(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Et},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Et},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Et},sheen:{value:0},sheenColor:{value:new ze(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Et},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Et},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Et},transmissionSamplerSize:{value:new he},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Et},attenuationDistance:{value:0},attenuationColor:{value:new ze(0)},specularColor:{value:new ze(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Et},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Et},anisotropyVector:{value:new he},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Et}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag};const rg={r:0,b:0,g:0},Ja=new er,H7=new at;function G7(t,e,n,i,r,s,o){const a=new ze(0);let l=s===!0?0:1,c,h,f=null,p=0,m=null;function v(x){let _=x.isScene===!0?x.background:null;return _&&_.isTexture&&(_=(x.backgroundBlurriness>0?n:e).get(_)),_}function S(x){let _=!1;const M=v(x);M===null?g(a,l):M&&M.isColor&&(g(M,1),_=!0);const b=t.xr.getEnvironmentBlendMode();b==="additive"?i.buffers.color.setClear(0,0,0,1,o):b==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||_)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function A(x,_){const M=v(_);M&&(M.isCubeTexture||M.mapping===cd)?(h===void 0&&(h=new bn(new Ra(1,1,1),new Wr({name:"BackgroundCubeMaterial",uniforms:Zu(as.backgroundCube.uniforms),vertexShader:as.backgroundCube.vertexShader,fragmentShader:as.backgroundCube.fragmentShader,side:Ui,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(b,C,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),Ja.copy(_.backgroundRotation),Ja.x*=-1,Ja.y*=-1,Ja.z*=-1,M.isCubeTexture&&M.isRenderTargetTexture===!1&&(Ja.y*=-1,Ja.z*=-1),h.material.uniforms.envMap.value=M,h.material.uniforms.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,h.material.uniforms.backgroundRotation.value.setFromMatrix4(H7.makeRotationFromEuler(Ja)),h.material.toneMapped=Xt.getTransfer(M.colorSpace)!==rn,(f!==M||p!==M.version||m!==t.toneMapping)&&(h.material.needsUpdate=!0,f=M,p=M.version,m=t.toneMapping),h.layers.enableAll(),x.unshift(h,h.geometry,h.material,0,0,null)):M&&M.isTexture&&(c===void 0&&(c=new bn(new dd(2,2),new Wr({name:"BackgroundMaterial",uniforms:Zu(as.background.uniforms),vertexShader:as.background.vertexShader,fragmentShader:as.background.fragmentShader,side:ks,depthTest:!1,depthWrite:!1,fog:!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=M,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=Xt.getTransfer(M.colorSpace)!==rn,M.matrixAutoUpdate===!0&&M.updateMatrix(),c.material.uniforms.uvTransform.value.copy(M.matrix),(f!==M||p!==M.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=M,p=M.version,m=t.toneMapping),c.layers.enableAll(),x.unshift(c,c.geometry,c.material,0,0,null))}function g(x,_){x.getRGB(rg,rF(t)),i.buffers.color.setClear(rg.r,rg.g,rg.b,_,o)}return{getClearColor:function(){return a},setClearColor:function(x,_=1){a.set(x),l=_,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,g(a,l)},render:S,addToRenderList:A}}function V7(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),i={},r=p(null);let s=r,o=!1;function a(T,L,W,Y,q){let j=!1;const Z=f(Y,W,L);s!==Z&&(s=Z,c(s.object)),j=m(T,Y,W,q),j&&v(T,Y,W,q),q!==null&&e.update(q,t.ELEMENT_ARRAY_BUFFER),(j||o)&&(o=!1,M(T,L,W,Y),q!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(q).buffer))}function l(){return t.createVertexArray()}function c(T){return t.bindVertexArray(T)}function h(T){return t.deleteVertexArray(T)}function f(T,L,W){const Y=W.wireframe===!0;let q=i[T.id];q===void 0&&(q={},i[T.id]=q);let j=q[L.id];j===void 0&&(j={},q[L.id]=j);let Z=j[Y];return Z===void 0&&(Z=p(l()),j[Y]=Z),Z}function p(T){const L=[],W=[],Y=[];for(let q=0;q<n;q++)L[q]=0,W[q]=0,Y[q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:W,attributeDivisors:Y,object:T,attributes:{},index:null}}function m(T,L,W,Y){const q=s.attributes,j=L.attributes;let Z=0;const H=W.getAttributes();for(const D in H)if(H[D].location>=0){const J=q[D];let $=j[D];if($===void 0&&(D==="instanceMatrix"&&T.instanceMatrix&&($=T.instanceMatrix),D==="instanceColor"&&T.instanceColor&&($=T.instanceColor)),J===void 0||J.attribute!==$||$&&J.data!==$.data)return!0;Z++}return s.attributesNum!==Z||s.index!==Y}function v(T,L,W,Y){const q={},j=L.attributes;let Z=0;const H=W.getAttributes();for(const D in H)if(H[D].location>=0){let J=j[D];J===void 0&&(D==="instanceMatrix"&&T.instanceMatrix&&(J=T.instanceMatrix),D==="instanceColor"&&T.instanceColor&&(J=T.instanceColor));const $={};$.attribute=J,J&&J.data&&($.data=J.data),q[D]=$,Z++}s.attributes=q,s.attributesNum=Z,s.index=Y}function S(){const T=s.newAttributes;for(let L=0,W=T.length;L<W;L++)T[L]=0}function A(T){g(T,0)}function g(T,L){const W=s.newAttributes,Y=s.enabledAttributes,q=s.attributeDivisors;W[T]=1,Y[T]===0&&(t.enableVertexAttribArray(T),Y[T]=1),q[T]!==L&&(t.vertexAttribDivisor(T,L),q[T]=L)}function x(){const T=s.newAttributes,L=s.enabledAttributes;for(let W=0,Y=L.length;W<Y;W++)L[W]!==T[W]&&(t.disableVertexAttribArray(W),L[W]=0)}function _(T,L,W,Y,q,j,Z){Z===!0?t.vertexAttribIPointer(T,L,W,q,j):t.vertexAttribPointer(T,L,W,Y,q,j)}function M(T,L,W,Y){S();const q=Y.attributes,j=W.getAttributes(),Z=L.defaultAttributeValues;for(const H in j){const D=j[H];if(D.location>=0){let X=q[H];if(X===void 0&&(H==="instanceMatrix"&&T.instanceMatrix&&(X=T.instanceMatrix),H==="instanceColor"&&T.instanceColor&&(X=T.instanceColor)),X!==void 0){const J=X.normalized,$=X.itemSize,ue=e.get(X);if(ue===void 0)continue;const Ae=ue.buffer,te=ue.type,ce=ue.bytesPerElement,xe=te===t.INT||te===t.UNSIGNED_INT||X.gpuType===ly;if(X.isInterleavedBufferAttribute){const _e=X.data,De=_e.stride,it=X.offset;if(_e.isInstancedInterleavedBuffer){for(let Ue=0;Ue<D.locationSize;Ue++)g(D.location+Ue,_e.meshPerAttribute);T.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=_e.meshPerAttribute*_e.count)}else for(let Ue=0;Ue<D.locationSize;Ue++)A(D.location+Ue);t.bindBuffer(t.ARRAY_BUFFER,Ae);for(let Ue=0;Ue<D.locationSize;Ue++)_(D.location+Ue,$/D.locationSize,te,J,De*ce,(it+$/D.locationSize*Ue)*ce,xe)}else{if(X.isInstancedBufferAttribute){for(let _e=0;_e<D.locationSize;_e++)g(D.location+_e,X.meshPerAttribute);T.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=X.meshPerAttribute*X.count)}else for(let _e=0;_e<D.locationSize;_e++)A(D.location+_e);t.bindBuffer(t.ARRAY_BUFFER,Ae);for(let _e=0;_e<D.locationSize;_e++)_(D.location+_e,$/D.locationSize,te,J,$*ce,$/D.locationSize*_e*ce,xe)}}else if(Z!==void 0){const J=Z[H];if(J!==void 0)switch(J.length){case 2:t.vertexAttrib2fv(D.location,J);break;case 3:t.vertexAttrib3fv(D.location,J);break;case 4:t.vertexAttrib4fv(D.location,J);break;default:t.vertexAttrib1fv(D.location,J)}}}}x()}function b(){B();for(const T in i){const L=i[T];for(const W in L){const Y=L[W];for(const q in Y)h(Y[q].object),delete Y[q];delete L[W]}delete i[T]}}function C(T){if(i[T.id]===void 0)return;const L=i[T.id];for(const W in L){const Y=L[W];for(const q in Y)h(Y[q].object),delete Y[q];delete L[W]}delete i[T.id]}function P(T){for(const L in i){const W=i[L];if(W[T.id]===void 0)continue;const Y=W[T.id];for(const q in Y)h(Y[q].object),delete Y[q];delete W[T.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:b,releaseStatesOfGeometry:C,releaseStatesOfProgram:P,initAttributes:S,enableAttribute:A,disableUnusedAttributes:x}}function j7(t,e,n){let i;function r(c){i=c}function s(c,h){t.drawArrays(i,c,h),n.update(h,i,1)}function o(c,h,f){f!==0&&(t.drawArraysInstanced(i,c,h,f),n.update(h,i,f))}function a(c,h,f){if(f===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,c,0,h,0,f);let m=0;for(let v=0;v<f;v++)m+=h[v];n.update(m,i,1)}function l(c,h,f,p){if(f===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let v=0;v<c.length;v++)o(c[v],h[v],p[v]);else{m.multiDrawArraysInstancedWEBGL(i,c,0,h,0,p,0,f);let v=0;for(let S=0;S<f;S++)v+=h[S];for(let S=0;S<p.length;S++)n.update(v,i,p[S])}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function W7(t,e,n,i){let r;function s(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const C=e.get("EXT_texture_filter_anisotropic");r=t.getParameter(C.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function o(C){return!(C!==Ci&&i.convert(C)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(C){const P=C===ud&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(C!==fs&&i.convert(C)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&C!==Qi&&!P)}function l(C){if(C==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const h=l(c);h!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",h,"instead."),c=h);const f=n.logarithmicDepthBuffer===!0,p=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_TEXTURE_SIZE),S=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),A=t.getParameter(t.MAX_VERTEX_ATTRIBS),g=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),x=t.getParameter(t.MAX_VARYING_VECTORS),_=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),M=m>0,b=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:v,maxCubemapSize:S,maxAttributes:A,maxVertexUniforms:g,maxVaryings:x,maxFragmentUniforms:_,vertexTextures:M,maxSamples:b}}function X7(t){const e=this;let n=null,i=0,r=!1,s=!1;const o=new no,a=new Et,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,p){const m=f.length!==0||p||i!==0||r;return r=p,i=f.length,m},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,p){n=h(f,p,0)},this.setState=function(f,p,m){const v=f.clippingPlanes,S=f.clipIntersection,A=f.clipShadows,g=t.get(f);if(!r||v===null||v.length===0||s&&!A)s?h(null):c();else{const x=s?0:i,_=x*4;let M=g.clippingState||null;l.value=M,M=h(v,p,_,m);for(let b=0;b!==_;++b)M[b]=n[b];g.clippingState=M,this.numIntersection=S?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(f,p,m,v){const S=f!==null?f.length:0;let A=null;if(S!==0){if(A=l.value,v!==!0||A===null){const g=m+S*4,x=p.matrixWorldInverse;a.getNormalMatrix(x),(A===null||A.length<g)&&(A=new Float32Array(g));for(let _=0,M=m;_!==S;++_,M+=4)o.copy(f[_]).applyMatrix4(x,a),o.normal.toArray(A,M),A[M+3]=o.constant}l.value=A,l.needsUpdate=!0}return e.numPlanes=S,e.numIntersection=0,A}}function J7(t){let e=new WeakMap;function n(o,a){return a===Cf?o.mapping=wo:a===Tf&&(o.mapping=_a),o}function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===Cf||a===Tf)if(e.has(o)){const l=e.get(o).texture;return n(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new BM(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",r),n(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:i,dispose:s}}class Hr extends ap{constructor(e=-1,n=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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,n,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+n,l=r-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const _u=4,eR=[.125,.215,.35,.446,.526,.582],pl=20,i1=new Hr,tR=new ze;let r1=null,s1=0,o1=0,a1=!1;const hl=(1+Math.sqrt(5))/2,Vc=1/hl,nR=[new k(-hl,Vc,0),new k(hl,Vc,0),new k(-Vc,0,hl),new k(Vc,0,hl),new k(0,hl,-Vc),new k(0,hl,Vc),new k(-1,1,-1),new k(1,1,-1),new k(-1,1,1),new k(1,1,1)];class fS{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,i=.1,r=100){r1=this._renderer.getRenderTarget(),s1=this._renderer.getActiveCubeFace(),o1=this._renderer.getActiveMipmapLevel(),a1=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=sR(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=rR(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(r1,s1,o1),this._renderer.xr.enabled=a1,e.scissorTest=!1,sg(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===wo||e.mapping===_a?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),r1=this._renderer.getRenderTarget(),s1=this._renderer.getActiveCubeFace(),o1=this._renderer.getActiveMipmapLevel(),a1=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=n||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,i={magFilter:Tn,minFilter:Tn,generateMipmaps:!1,type:ud,format:Ci,colorSpace:bo,depthBuffer:!1},r=iR(e,n,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=iR(e,n,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=K7(s)),this._blurMaterial=q7(s,e,n)}return r}_compileMaterial(e){const n=new bn(this._lodPlanes[0],e);this._renderer.compile(n,i1)}_sceneToCubeUV(e,n,i,r){const a=new un(90,1,n,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],h=this._renderer,f=h.autoClear,p=h.toneMapping;h.getClearColor(tR),h.toneMapping=Ds,h.autoClear=!1;const m=new hr({name:"PMREM.Background",side:Ui,depthWrite:!1,depthTest:!1}),v=new bn(new Ra,m);let S=!1;const A=e.background;A?A.isColor&&(m.color.copy(A),e.background=null,S=!0):(m.color.copy(tR),S=!0);for(let g=0;g<6;g++){const x=g%3;x===0?(a.up.set(0,l[g],0),a.lookAt(c[g],0,0)):x===1?(a.up.set(0,0,l[g]),a.lookAt(0,c[g],0)):(a.up.set(0,l[g],0),a.lookAt(0,0,c[g]));const _=this._cubeSize;sg(r,x*_,g>2?_:0,_,_),h.setRenderTarget(r),S&&h.render(v,a),h.render(e,a)}v.geometry.dispose(),v.material.dispose(),h.toneMapping=p,h.autoClear=f,e.background=A}_textureToCubeUV(e,n){const i=this._renderer,r=e.mapping===wo||e.mapping===_a;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=sR()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=rR());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new bn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;sg(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,i1)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s<r;s++){const o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),a=nR[(r-s-1)%nR.length];this._blur(e,s-1,s,o,a)}n.autoClear=i}_blur(e,n,i,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,n,i,r,"latitudinal",s),this._halfBlur(o,e,i,i,r,"longitudinal",s)}_halfBlur(e,n,i,r,s,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const h=3,f=new bn(this._lodPlanes[r],c),p=c.uniforms,m=this._sizeLods[i]-1,v=isFinite(s)?Math.PI/(2*m):2*Math.PI/(2*pl-1),S=s/v,A=isFinite(s)?1+Math.floor(h*S):pl;A>pl&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${A} samples when the maximum is set to ${pl}`);const g=[];let x=0;for(let P=0;P<pl;++P){const B=P/S,R=Math.exp(-B*B/2);g.push(R),P===0?x+=R:P<A&&(x+=2*R)}for(let P=0;P<g.length;P++)g[P]=g[P]/x;p.envMap.value=e.texture,p.samples.value=A,p.weights.value=g,p.latitudinal.value=o==="latitudinal",a&&(p.poleAxis.value=a);const{_lodMax:_}=this;p.dTheta.value=v,p.mipInt.value=_-i;const M=this._sizeLods[r],b=3*M*(r>_-_u?r-_+_u:0),C=4*(this._cubeSize-M);sg(n,b,C,3*M,2*M),l.setRenderTarget(n),l.render(f,i1)}}function K7(t){const e=[],n=[],i=[];let r=t;const s=t-_u+1+eR.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);n.push(a);let l=1/a;o>t-_u?l=eR[o-t+_u-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),h=-c,f=1+c,p=[h,h,f,h,f,f,h,h,f,f,h,f],m=6,v=6,S=3,A=2,g=1,x=new Float32Array(S*v*m),_=new Float32Array(A*v*m),M=new Float32Array(g*v*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];x.set(R,S*v*C),_.set(p,A*v*C);const T=[C,C,C,C,C,C];M.set(T,g*v*C)}const b=new St;b.setAttribute("position",new Nt(x,S)),b.setAttribute("uv",new Nt(_,A)),b.setAttribute("faceIndex",new Nt(M,g)),e.push(b),r>_u&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function iR(t,e,n){const i=new ps(t,e,n);return i.texture.mapping=cd,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function sg(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function q7(t,e,n){const i=new Float32Array(pl),r=new k(0,1,0);return new Wr({name:"SphericalGaussianBlur",defines:{n:pl,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:LM(),fragmentShader:`
3656
3657			precision mediump float;
3658			precision mediump int;
3659
3660			varying vec3 vOutputDirection;
3661
3662			uniform sampler2D envMap;
3663			uniform int samples;
3664			uniform float weights[ n ];
3665			uniform bool latitudinal;
3666			uniform float dTheta;
3667			uniform float mipInt;
3668			uniform vec3 poleAxis;
3669
3670			#define ENVMAP_TYPE_CUBE_UV
3671			#include <cube_uv_reflection_fragment>
3672
3673			vec3 getSample( float theta, vec3 axis ) {
3674
3675				float cosTheta = cos( theta );
3676				// Rodrigues' axis-angle rotation
3677				vec3 sampleDirection = vOutputDirection * cosTheta
3678					+ cross( axis, vOutputDirection ) * sin( theta )
3679					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
3680
3681				return bilinearCubeUV( envMap, sampleDirection, mipInt );
3682
3683			}
3684
3685			void main() {
3686
3687				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
3688
3689				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
3690
3691					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
3692
3693				}
3694
3695				axis = normalize( axis );
3696
3697				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
3698				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
3699
3700				for ( int i = 1; i < n; i++ ) {
3701
3702					if ( i >= samples ) {
3703
3704						break;
3705
3706					}
3707
3708					float theta = dTheta * float( i );
3709					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
3710					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
3711
3712				}
3713
3714			}
3715		`,blending:go,depthTest:!1,depthWrite:!1})}function rR(){return new Wr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:LM(),fragmentShader:`
3716
3717			precision mediump float;
3718			precision mediump int;
3719
3720			varying vec3 vOutputDirection;
3721
3722			uniform sampler2D envMap;
3723
3724			#include <common>
3725
3726			void main() {
3727
3728				vec3 outputDirection = normalize( vOutputDirection );
3729				vec2 uv = equirectUv( outputDirection );
3730
3731				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
3732
3733			}
3734		`,blending:go,depthTest:!1,depthWrite:!1})}function sR(){return new Wr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:LM(),fragmentShader:`
3735
3736			precision mediump float;
3737			precision mediump int;
3738
3739			uniform float flipEnvMap;
3740
3741			varying vec3 vOutputDirection;
3742
3743			uniform samplerCube envMap;
3744
3745			void main() {
3746
3747				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
3748
3749			}
3750		`,blending:go,depthTest:!1,depthWrite:!1})}function LM(){return`
3751
3752		precision mediump float;
3753		precision mediump int;
3754
3755		attribute float faceIndex;
3756
3757		varying vec3 vOutputDirection;
3758
3759		// RH coordinate system; PMREM face-indexing convention
3760		vec3 getDirection( vec2 uv, float face ) {
3761
3762			uv = 2.0 * uv - 1.0;
3763
3764			vec3 direction = vec3( uv, 1.0 );
3765
3766			if ( face == 0.0 ) {
3767
3768				direction = direction.zyx; // ( 1, v, u ) pos x
3769
3770			} else if ( face == 1.0 ) {
3771
3772				direction = direction.xzy;
3773				direction.xz *= -1.0; // ( -u, 1, -v ) pos y
3774
3775			} else if ( face == 2.0 ) {
3776
3777				direction.x *= -1.0; // ( -u, v, 1 ) pos z
3778
3779			} else if ( face == 3.0 ) {
3780
3781				direction = direction.zyx;
3782				direction.xz *= -1.0; // ( -1, v, -u ) neg x
3783
3784			} else if ( face == 4.0 ) {
3785
3786				direction = direction.xzy;
3787				direction.xy *= -1.0; // ( -u, -1, v ) neg y
3788
3789			} else if ( face == 5.0 ) {
3790
3791				direction.z *= -1.0; // ( u, v, -1 ) neg z
3792
3793			}
3794
3795			return direction;
3796
3797		}
3798
3799		void main() {
3800
3801			vOutputDirection = getDirection( uv, faceIndex );
3802			gl_Position = vec4( position, 1.0 );
3803
3804		}
3805	`}function Q7(t){let e=new WeakMap,n=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===Cf||l===Tf,h=l===wo||l===_a;if(c||h){let f=e.get(a);const p=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==p)return n===null&&(n=new fS(t)),f=c?n.fromEquirectangular(a,f):n.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const m=a.image;return c&&m&&m.height>0||h&&m&&r(m)?(n===null&&(n=new fS(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function r(a){let l=0;const c=6;for(let h=0;h<c;h++)a[h]!==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,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:o}}function Y7(t){const e={};function n(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(i)}return e[i]=r,r}return{has:function(i){return n(i)!==null},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(i){const r=n(i);return r===null&&Bu("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function Z7(t,e,n,i){const r={},s=new WeakMap;function o(f){const p=f.target;p.index!==null&&e.remove(p.index);for(const v in p.attributes)e.remove(p.attributes[v]);for(const v in p.morphAttributes){const S=p.morphAttributes[v];for(let A=0,g=S.length;A<g;A++)e.remove(S[A])}p.removeEventListener("dispose",o),delete r[p.id];const m=s.get(p);m&&(e.remove(m),s.delete(p)),i.releaseStatesOfGeometry(p),p.isInstancedBufferGeometry===!0&&delete p._maxInstanceCount,n.memory.geometries--}function a(f,p){return r[p.id]===!0||(p.addEventListener("dispose",o),r[p.id]=!0,n.memory.geometries++),p}function l(f){const p=f.attributes;for(const v in p)e.update(p[v],t.ARRAY_BUFFER);const m=f.morphAttributes;for(const v in m){const S=m[v];for(let A=0,g=S.length;A<g;A++)e.update(S[A],t.ARRAY_BUFFER)}}function c(f){const p=[],m=f.index,v=f.attributes.position;let S=0;if(m!==null){const x=m.array;S=m.version;for(let _=0,M=x.length;_<M;_+=3){const b=x[_+0],C=x[_+1],P=x[_+2];p.push(b,C,C,P,P,b)}}else if(v!==void 0){const x=v.array;S=v.version;for(let _=0,M=x.length/3-1;_<M;_+=3){const b=_+0,C=_+1,P=_+2;p.push(b,C,C,P,P,b)}}else return;const A=new($N(p)?RM:bM)(p,1);A.version=S;const g=s.get(f);g&&e.remove(g),s.set(f,A)}function h(f){const p=s.get(f);if(p){const m=f.index;m!==null&&p.version<m.version&&c(f)}else c(f);return s.get(f)}return{get:a,update:l,getWireframeAttribute:h}}function $7(t,e,n){let i;function r(p){i=p}let s,o;function a(p){s=p.type,o=p.bytesPerElement}function l(p,m){t.drawElements(i,m,s,p*o),n.update(m,i,1)}function c(p,m,v){v!==0&&(t.drawElementsInstanced(i,m,s,p*o,v),n.update(m,i,v))}function h(p,m,v){if(v===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,m,0,s,p,0,v);let A=0;for(let g=0;g<v;g++)A+=m[g];n.update(A,i,1)}function f(p,m,v,S){if(v===0)return;const A=e.get("WEBGL_multi_draw");if(A===null)for(let g=0;g<p.length;g++)c(p[g]/o,m[g],S[g]);
vendor: 4,558 bytes, line 3805
3805else{A.multiDrawElementsInstancedWEBGL(i,m,0,s,p,0,S,0,v);let g=0;for(let x=0;x<v;x++)g+=m[x];for(let x=0;x<S.length;x++)n.update(g,i,S[x])}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=h,this.renderMultiDrawInstances=f}function eX(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function i(s,o,a){switch(n.calls++,o){case t.TRIANGLES:n.triangles+=a*(s/3);break;case t.LINES:n.lines+=a*(s/2);break;case t.LINE_STRIP:n.lines+=a*(s-1);break;case t.LINE_LOOP:n.lines+=a*s;break;case t.POINTS:n.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function r(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:r,update:i}}function tX(t,e,n){const i=new WeakMap,r=new Ut;function s(o,a,l){const c=o.morphTargetInfluences,h=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,f=h!==void 0?h.length:0;let p=i.get(a);if(p===void 0||p.count!==f){let T=function(){B.dispose(),i.delete(a),a.removeEventListener("dispose",T)};var m=T;p!==void 0&&p.texture.dispose();const v=a.morphAttributes.position!==void 0,S=a.morphAttributes.normal!==void 0,A=a.morphAttributes.color!==void 0,g=a.morphAttributes.position||[],x=a.morphAttributes.normal||[],_=a.morphAttributes.color||[];let M=0;v===!0&&(M=1),S===!0&&(M=2),A===!0&&(M=3);let b=a.attributes.position.count*M,C=1;b>e.maxTextureSize&&(C=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const P=new Float32Array(b*C*4*f),B=new gy(P,b,C,f);B.type=Qi,B.needsUpdate=!0;const R=M*4;for(let L=0;L<f;L++){const W=g[L],Y=x[L],q=_[L],j=b*C*4*L;for(let Z=0;Z<W.count;Z++){const H=Z*R;v===!0&&(r.fromBufferAttribute(W,Z),P[j+H+0]=r.x,P[j+H+1]=r.y,P[j+H+2]=r.z,P[j+H+3]=0),S===!0&&(r.fromBufferAttribute(Y,Z),P[j+H+4]=r.x,P[j+H+5]=r.y,P[j+H+6]=r.z,P[j+H+7]=0),A===!0&&(r.fromBufferAttribute(q,Z),P[j+H+8]=r.x,P[j+H+9]=r.y,P[j+H+10]=r.z,P[j+H+11]=q.itemSize===4?r.w:1)}}p={count:f,texture:B,size:new he(b,C)},i.set(a,p),a.addEventListener("dispose",T)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(t,"morphTexture",o.morphTexture,n);else{let v=0;for(let A=0;A<c.length;A++)v+=c[A];const S=a.morphTargetsRelative?1:1-v;l.getUniforms().setValue(t,"morphTargetBaseInfluence",S),l.getUniforms().setValue(t,"morphTargetInfluences",c)}l.getUniforms().setValue(t,"morphTargetsTexture",p.texture,n),l.getUniforms().setValue(t,"morphTargetsTextureSize",p.size)}return{update:s}}function nX(t,e,n,i){let r=new WeakMap;function s(l){const c=i.render.frame,h=l.geometry,f=e.get(l,h);if(r.get(f)!==c&&(e.update(f),r.set(f,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==c&&(n.update(l.instanceMatrix,t.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,t.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const p=l.skeleton;r.get(p)!==c&&(p.update(),r.set(p,c))}return f}function o(){r=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),n.remove(c.instanceMatrix),c.instanceColor!==null&&n.remove(c.instanceColor)}return{update:s,dispose:o}}class DM extends Zt{constructor(e,n,i,r,s,o,a,l,c,h=Bl){if(h!==Bl&&h!==Xl)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===Bl&&(i=Mo),i===void 0&&h===Xl&&(i=Wl),super(null,r,s,o,a,l,h,i,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:jn,this.minFilter=l!==void 0?l:jn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}const oF=new Zt,oR=new DM(1,1),aF=new gy,lF=new TM,cF=new lp,aR=[],lR=[],cR=new Float32Array(16),uR=new Float32Array(9),dR=new Float32Array(4);function hd(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=aR[r];if(s===void 0&&(s=new Float32Array(r),aR[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function Xn(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function Jn(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function vy(t,e){let n=lR[e];n===void 0&&(n=new Int32Array(e),lR[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function iX(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function rX(t,e){const n=this.cache;
vendor: 6,262 bytes, line 3805
3805if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Xn(n,e))return;t.uniform2fv(this.addr,e),Jn(n,e)}}function sX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(Xn(n,e))return;t.uniform3fv(this.addr,e),Jn(n,e)}}function oX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Xn(n,e))return;t.uniform4fv(this.addr,e),Jn(n,e)}}function aX(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(Xn(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Jn(n,e)}else{if(Xn(n,i))return;dR.set(i),t.uniformMatrix2fv(this.addr,!1,dR),Jn(n,i)}}function lX(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(Xn(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Jn(n,e)}else{if(Xn(n,i))return;uR.set(i),t.uniformMatrix3fv(this.addr,!1,uR),Jn(n,i)}}function cX(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(Xn(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Jn(n,e)}else{if(Xn(n,i))return;cR.set(i),t.uniformMatrix4fv(this.addr,!1,cR),Jn(n,i)}}function uX(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function dX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Xn(n,e))return;t.uniform2iv(this.addr,e),Jn(n,e)}}function hX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Xn(n,e))return;t.uniform3iv(this.addr,e),Jn(n,e)}}function fX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Xn(n,e))return;t.uniform4iv(this.addr,e),Jn(n,e)}}function pX(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function mX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Xn(n,e))return;t.uniform2uiv(this.addr,e),Jn(n,e)}}function gX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Xn(n,e))return;t.uniform3uiv(this.addr,e),Jn(n,e)}}function vX(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Xn(n,e))return;t.uniform4uiv(this.addr,e),Jn(n,e)}}function yX(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r);let s;this.type===t.SAMPLER_2D_SHADOW?(oR.compareFunction=MM,s=oR):s=oF,n.setTexture2D(e||s,r)}function xX(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||lF,r)}function _X(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||cF,r)}function AX(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||aF,r)}function SX(t){switch(t){case 5126:return iX;case 35664:return rX;case 35665:return sX;case 35666:return oX;case 35674:return aX;case 35675:return lX;case 35676:return cX;case 5124:case 35670:return uX;case 35667:case 35671:return dX;case 35668:case 35672:return hX;case 35669:case 35673:return fX;case 5125:return pX;case 36294:return mX;case 36295:return gX;case 36296:return vX;case 35678:case 36198:case 36298:case 36306:case 35682:return yX;case 35679:case 36299:case 36307:return xX;case 35680:case 36300:case 36308:case 36293:return _X;case 36289:case 36303:case 36311:case 36292:return AX}}function wX(t,e){t.uniform1fv(this.addr,e)}function MX(t,e){const n=hd(e,this.size,2);t.uniform2fv(this.addr,n)}function EX(t,e){const n=hd(e,this.size,3);t.uniform3fv(this.addr,n)}function CX(t,e){const n=hd(e,this.size,4);t.uniform4fv(this.addr,n)}function TX(t,e){const n=hd(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function bX(t,e){const n=hd(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function RX(t,e){const n=hd(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function PX(t,e){t.uniform1iv(this.addr,e)}function IX(t,e){t.uniform2iv(this.addr,e)}function BX(t,e){t.uniform3iv(this.addr,e)}function LX(t,e){t.uniform4iv(this.addr,e)}function DX(t,e){t.uniform1uiv(this.addr,e)}function NX(t,e){t.uniform2uiv(this.addr,e)}function FX(t,e){t.uniform3uiv(this.addr,e)}function kX(t,e){t.uniform4uiv(this.addr,e)}function OX(t,e,n){const i=this.cache,r=e.length,s=vy(n,r);Xn(i,s)||(t.uniform1iv(this.addr,s),Jn(i,s));for(let o=0;o!==r;++o)n.setTexture2D(e[o]||oF,s[o])}function UX(t,e,n){const i=this.cache,r=e.length,s=vy(n,r);Xn(i,s)||(t.uniform1iv(this.addr,s),Jn(i,s));for(let o=0;o!==r;++o)n.setTexture3D(e[o]||lF,s[o])}function zX(t,e,n){const i=this.cache,r=e.length,s=vy(n,r);Xn(i,s)||(t.uniform1iv(this.addr,s),Jn(i,s));for(let o=0;o!==r;++o)n.setTextureCube(e[o]||cF,s[o])}function HX(t,e,n){const i=this.cache,r=e.length,s=vy(n,r);Xn(i,s)||(t.uniform1iv(this.addr,s),Jn(i,s));for(let o=0;o!==r;++o)n.setTexture2DArray(e[o]||aF,s[o])}function GX(t){switch(t){case 5126:return wX;case 35664:return MX;case 35665:return EX;case 35666:return CX;case 35674:return TX;case 35675:return bX;case 35676:return RX;case 5124:case 35670:return PX;case 35667:case 35671:return IX;case 35668:case 35672:return BX;case 35669:case 35673:return LX;case 5125:return DX;case 36294:return NX;case 36295:return FX;case 36296:return kX;case 35678:case 36198:case 36298:case 36306:case 35682:return OX;case 35679:case 36299:case 36307:return UX;case 35680:case 36300:case 36308:case 36293:return zX;case 36289:case 36303:case 36311:case 36292:return HX}}class VX{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.setValue=SX(n.type)}}class jX{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=GX(n.t
vendor: 8,720 bytes, lines 3805-3839
3805ype)}}class WX{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,i){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,n[a.id],i)}}}const l1=/(\w+)(\])?(\[|\.)?/g;function hR(t,e){t.seq.push(e),t.map[e.id]=e}function XX(t,e,n){const i=t.name,r=i.length;for(l1.lastIndex=0;;){const s=l1.exec(i),o=l1.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){hR(n,c===void 0?new VX(a,t,e):new jX(a,t,e));break}else{let f=n.map[a];f===void 0&&(f=new WX(a),hR(n,f)),n=f}}}class r0{constructor(e,n){this.seq=[],this.map={};const i=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(n,r),o=e.getUniformLocation(n,s.name);XX(s,o,this)}}setValue(e,n,i,r){const s=this.map[n];s!==void 0&&s.setValue(e,i,r)}setOptional(e,n,i){const r=n[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,n,i,r){for(let s=0,o=n.length;s!==o;++s){const a=n[s],l=i[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,n){const i=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in n&&i.push(o)}return i}}function fR(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}const JX=37297;let KX=0;function qX(t,e){const n=t.split(`
3806`),i=[],r=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let o=r;o<s;o++){const a=o+1;i.push(`${a===e?">":" "} ${a}: ${n[o]}`)}return i.join(`
3807`)}function QX(t){const e=Xt.getPrimaries(Xt.workingColorSpace),n=Xt.getPrimaries(t);let i;switch(e===n?i="":e===If&&n===Pf?i="LinearDisplayP3ToLinearSRGB":e===Pf&&n===If&&(i="LinearSRGBToLinearDisplayP3"),t){case bo:case op:return[i,"LinearTransferOETF"];case Dr:case my:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}function pR(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),r=t.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return n.toUpperCase()+`
3808
3809`+r+`
3810
3811`+qX(t.getShaderSource(e),o)}else return r}function YX(t,e){const n=QX(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function ZX(t,e){let n;switch(e){case BN:n="Linear";break;case LN:n="Reinhard";break;case DN:n="OptimizedCineon";break;case hM:n="ACESFilmic";break;case FN:n="AgX";break;case kN:n="Neutral";break;case NN:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const og=new k;function $X(){Xt.getLuminanceCoefficients(og);const t=og.x.toFixed(4),e=og.y.toFixed(4),n=og.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${t}, ${e}, ${n} );`,"	return dot( weights, rgb );","}"].join(`
3812`)}function eJ(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Ch).join(`
3813`)}function tJ(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(`
3814`)}function nJ(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=t.getActiveAttrib(e,r),o=s.name;let a=1;s.type===t.FLOAT_MAT2&&(a=2),s.type===t.FLOAT_MAT3&&(a=3),s.type===t.FLOAT_MAT4&&(a=4),n[o]={type:s.type,location:t.getAttribLocation(e,o),locationSize:a}}return n}function Ch(t){return t!==""}function mR(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.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,n).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 gR(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const iJ=/^[ \t]*#include +<([\w\d./]+)>/gm;function pS(t){return t.replace(iJ,sJ)}const rJ=new Map;function sJ(t,e){let n=Tt[e];if(n===void 0){const i=rJ.get(e);if(i!==void 0)n=Tt[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return pS(n)}const oJ=/#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 vR(t){return t.replace(oJ,aJ)}function aJ(t,e,n,i){let r="";for(let s=parseInt(e);s<parseInt(n);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function yR(t){let e=`precision ${t.precision} float;
3815	precision ${t.precision} int;
3816	precision ${t.precision} sampler2D;
3817	precision ${t.precision} samplerCube;
3818	precision ${t.precision} sampler3D;
3819	precision ${t.precision} sampler2DArray;
3820	precision ${t.precision} sampler2DShadow;
3821	precision ${t.precision} samplerCubeShadow;
3822	precision ${t.precision} sampler2DArrayShadow;
3823	precision ${t.precision} isampler2D;
3824	precision ${t.precision} isampler3D;
3825	precision ${t.precision} isamplerCube;
3826	precision ${t.precision} isampler2DArray;
3827	precision ${t.precision} usampler2D;
3828	precision ${t.precision} usampler3D;
3829	precision ${t.precision} usamplerCube;
3830	precision ${t.precision} usampler2DArray;
3831	`;return t.precision==="highp"?e+=`
3832#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
3833#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
3834#define LOW_PRECISION`),e}function lJ(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===sy?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===Gh?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===is&&(e="SHADOWMAP_TYPE_VSM"),e}function cJ(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case wo:case _a:e="ENVMAP_TYPE_CUBE";break;case cd:e="ENVMAP_TYPE_CUBE_UV";break}return e}function uJ(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case _a:e="ENVMAP_MODE_REFRACTION";break}return e}function dJ(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case rp:e="ENVMAP_BLENDING_MULTIPLY";break;case PN:e="ENVMAP_BLENDING_MIX";break;case IN:e="ENVMAP_BLENDING_ADD";break}return e}function hJ(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:i,maxMip:n}}function fJ(t,e,n,i){const r=t.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=lJ(n),c=cJ(n),h=uJ(n),f=dJ(n),p=hJ(n),m=eJ(n),v=tJ(s),S=r.createProgram();let A,g,x=n.glslVersion?"#version "+n.glslVersion+`
3835`:"";n.isRawShaderMaterial?(A=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(Ch).join(`
3836`),A.length>0&&(A+=`
3837`),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(Ch).join(`
3838`),g.length>0&&(g+=`
3839`)):(A=[yR(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alph
vendor: 4,971 bytes, lines 3839-3841
3839aMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","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",`
3840`].filter(Ch).join(`
3841`),g=[yR(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+h:"",n.envMap?"#define "+f:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IR
3841IDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Ds?"#define TONE_MAPPING":"",n.toneMapping!==Ds?Tt.tonemapping_pars_fragment:"",n.toneMapping!==Ds?ZX("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Tt.colorspace_pars_fragment,YX("linearToOutputTexel",n.outputColorSpace),$X(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
3842`].filter(Ch).join(`
3843`)),o=pS(o),o=mR(o,n),o=gR(o,n),a=pS(a),a=mR(a,n),a=gR(a,n),o=vR(o),a=vR(a),n.isRawShaderMaterial!==!0&&(x=`#version 300 es
3844`,A=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(`
3845`)+`
3846`+A,g=["#define varying in",n.glslVersion===hS?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===hS?"":"#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(`
3847`)+`
3848`+g);const _=x+A+o,M=x+g+a,b=fR(r,r.VERTEX_SHADER,_),C=fR(r,r.FRAGMENT_SHADER,M);r.attachShader(S,b),r.attachShader(S,C),n.index0AttributeName!==void 0?r.bindAttribLocation(S,0,n.index0AttributeName):n.morphTargets===!0&&r.bindAttribLocation(S,0,"position"),r.linkProgram(S);function P(L){if(t.debug.checkShaderErrors){const W=r.getProgramInfoLog(S).trim(),Y=r.getShaderInfoLog(b).trim(),q=r.getShaderInfoLog(C).trim();let j=!0,Z=!0;if(r.getProgramParameter(S,r.LINK_STATUS)===!1)if(j=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(r,S,b,C);else{const H=pR(r,b,"vertex"),D=pR(r,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(S,r.VALIDATE_STATUS)+`
3849
3850Material Name: `+L.name+`
3851Material Type: `+L.type+`
3852
3853Program Info Log: `+W+`
3854`+H+`
3855`+D)}else W!==""?console.warn("THREE.WebGLProgram: Program Info Log:",W):(Y===""||q==="")&&(Z=!1);Z&&(L.diagnostics={runnable:j,programLog:W,vertexShader:{log:Y,prefix:A},fragmentShader:{log:q,prefix:g}})}r.deleteShader(b),r.deleteShader(C),B=new r0(r,S),R=nJ(r,S)}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 T=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return T===!1&&(T=r.getProgramParameter(S,JX)),T},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(S),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=KX++,this.cacheKey=e,this.usedTimes=1,this.program=S,this.vertexShader=b,this.fragmentShader=C,this}let pJ=0;class mJ{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(n),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new gJ(e),n.set(e,i)),i}}class gJ{constructor(e){this.id=pJ++,this.code=e,this.usedTimes=0}}function vJ(t,e,n,i,r,s,o){const a=new Nl,l=new mJ,c=new Set,h=[],f=r.logarithmicDepthBuffer,p=r.vertexTextures;let m=r.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function S(R){return c.add(R),R===0?"uv":`uv${R}`}function A(R,T,L,W,Y){const q=W.fog,j=Y.geometry,Z=R.isMeshStandardMaterial?W.environment:null,H=(R.isMeshStandardMaterial?n:e).get(R.envMap||Z),D=H&&H.mapping===cd?H.image.height:null,X=v[R.type];R.precision!==null&&(m=r.getMaxPrecision(R.precision),m!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",m,"instead."));const J=j.morphAttributes.position||j.morphAttributes.normal||j.morphAttributes.color,$=J!==void 0?J.length:0;let ue=0;j.morphAttributes.position!==void 0&&(ue=1),j.morphAttributes.normal!==void 0&&(ue=2),j.morphAttributes.color!==void 0&&(ue=3);let Ae,te,ce,xe;if(X){const Rt=as[X];Ae=Rt.vertexShader,te=Rt.fragmentShader}else Ae=R.vertexShader,te=R.fragmentShader,l.update(R),ce=l.getVertexShaderID(R),xe=l.getFragmentShaderID(R);const _e=t.getRenderTarget(),De=Y.isInstancedMesh===!0,it=Y.isBatchedMesh===!0,Ue=!!R.map,Be=!!R.matcap,U=!!H,ye=!!R.aoMap,Te=!!R.lightMap,Ne=!!R.bumpMap,ge=!!R.normalMap,Ze=!!R.displacementMap,Oe=!!R.emissiveMap,je=!!R.metalnessMap,V=!!R.roughnessMap,N=R.anisotropy>0,se=R.clearcoat>0,Me=R.dispersion>0,we=R.iridescence>0,Ee=R.sheen>0,rt=R.transmission>0,Pe=N&&!!R.anisotropyMap,Ke=se&&!!R.clearcoatMap,xt=se&&!!R.clearcoatNormalMap,Re=se&&!!R.clearcoatRoughnessMap,We=we&&!!R.iridescenceMap,It=we&&!!R.iridescenceThicknessMap,ft=Ee&&!!R.sheenColorMap,qe=Ee&&!!R.sheenRoughnessMap,Q=!!R.specularMap,me=!!R.specularColorMap,Ve=!!R.specularIntensityMap,K=rt&&!!R.transmissionMap,Ce=rt&&!!R.thicknessMap,pe=!!R.gradientMap,ve=!!R.alphaMap,Fe=R.alphaTest>0,dt=!!R.alphaHash,_t=!!R.extensions;let zt=Ds;R.toneMapped&&(_e===null||_e.isXRRenderTarget===!0)&&(zt=t.toneMapping);const an={shaderID:X,shaderType:R.type,shaderName:R.name,vertexShader:Ae,fragmentShader:te,defines:R.defines,customVertexShaderID:ce,customFragmentShaderID:xe,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:m,batching:it,batchingColor:it&&Y._colorsTexture!==null,instancing:De,instancingColor:De&&Y.instanceColor!==null,instancingMorph:De&&Y.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:_e===null?t.outputColorSpace:_e.isXRRenderTarget===!0?_e.texture.colorSpace:bo,alphaToCoverage:!!R.alphaToCoverage,map:Ue,matcap:Be,envMap:U,envMapMode:U&&H.mapping,envMapCubeUVHeight:D,aoMap:ye,lightMap:Te,bumpMap:Ne,normalMap:ge,displacementMap:p&&Ze,emissiveMap:Oe,normalMapObjectSpace:ge&&R.normalMapType===WN,normalMapTangentSpace:ge&&R.normalMapType===ba,metalnessMap:je,roughnessMap:V,anisotropy:N,anisotropyMap:Pe,clearcoat:se,clearcoatMap:Ke,clearcoatNormalMap:xt,clearcoatRoughnessMap:Re,dispersion:Me,iridescence:we,iridescenceMap:We,iridescenceThicknessMap:It,sheen:Ee,sheenColorMap:ft,sheenRoughnessMap:qe,specularMap:Q,specularColorMap:me,specularIntensityMap:Ve,transmission:rt,transmissionMap:K,thicknessMap:Ce,gradientMap:pe,opaque:R.transparent===!1&&R.blending===Il&&R.alphaToCoverage===!1,alphaMap:ve,alphaTest:Fe,alphaHash:dt,combine:R.combine,mapUv:Ue&&S(R.map.channel),aoMapUv:ye&&S(R.aoMap.channel),lightMapUv:Te&&S(R.lightMap.channel),bumpMapUv:Ne&&S(R.bumpMap.channel),normalMapUv:ge&&S(R.normalMap.channel),displacementMapUv:Ze&&S(R.displacementMap.channel),emissiveMapUv:Oe&&S(R.emissiveMap.channel),metalnessMapUv:je&&S(R.metalnessMap.channel),roughnessMapUv:V&&S(R.roughnessMap.channel),anisotropyMapUv:Pe&&S(R.anisotropyMap.channel),clearcoatMapUv:Ke&&S(R.clearcoatMap.channel),clearcoatNormalMapUv:xt&&S(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&S(R.clearcoatRoughnessMap.channel),iridescenceMapUv:We&&S(R.iridescenceMap.channel),iridescenceThicknessMapUv:It&&S(R.iridescenceThicknessMap.channel),sheenColorMapUv:ft&&S(R.sheenColorMap.channel),sheenRoughnessMapUv:qe&&S(R.sheenRoughnessMap.channel),specularMapUv:Q&&S(R.specularMap.channel),specularColorMapUv:me&&S(R.specularColorMap.channel),specularIntensityMapUv:Ve&&S(R.specularIntensityMap.channel),transmissionMapUv:K&&S(R.transmissionMap.channel),thicknessMapUv:Ce&&S(R.thicknessMap.channel),alphaMapUv:ve&&S(R.alphaMap.channel),vertexTangents:!!j.attributes.tangent&&(ge||N),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!j.attributes.color&&j.attributes.color.itemSize===4,pointsUvs:Y.isPoints===!0&&!!j.attributes.uv&&(Ue||ve),fog:!!q,useFog:R.fog===!0,fogExp2:!!q&&q.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:Y.isSkinnedMesh===!0,morphTargets:j.morphAttributes.position!==void 0,morphNormals:j.morphAttributes.normal!==void 0,morphColors:j.morphAttributes.color!==void 0,morphTargetsCount:$,morphTextureStride:ue,numDirLights:T.directional.length,numPointLights:T.point.length,numSpotLights:T.spot.length,numSpotLightMaps:T.spotLightMap.length,numRectAreaLights:T.rectArea.length,numHemiLights:T.hemi.length,numDirLightShadows:T.directionalShadowMap.length,numPointLightShadows:T.pointShadowMap.length,numSpotLightShadows:T.spotShadowMap.length,numSpotLightShadowsWithMaps:T.numSpotLightShadowsWithMaps,numLightProbes:T.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:R.dithering,shadowMapEnabled:t.shadowMap.enabled&&L.length>0,shadowMapType:t.shadowMap.type,toneMapping:zt,decodeVideoTexture:Ue&&R.map.isVideoTexture===!0&&Xt.getTransfer(R.map.colorSpace)===rn,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===Or,flipSided:R.side===Ui,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionCl
vendor: 14,671 bytes, lines 3855-3883
3855ipCullDistance:_t&&R.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(_t&&R.extensions.multiDraw===!0||it)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()};return an.vertexUv1s=c.has(1),an.vertexUv2s=c.has(2),an.vertexUv3s=c.has(3),c.clear(),an}function g(R){const T=[];if(R.shaderID?T.push(R.shaderID):(T.push(R.customVertexShaderID),T.push(R.customFragmentShaderID)),R.defines!==void 0)for(const L in R.defines)T.push(L),T.push(R.defines[L]);return R.isRawShaderMaterial===!1&&(x(T,R),_(T,R),T.push(t.outputColorSpace)),T.push(R.customProgramCacheKey),T.join()}function x(R,T){R.push(T.precision),R.push(T.outputColorSpace),R.push(T.envMapMode),R.push(T.envMapCubeUVHeight),R.push(T.mapUv),R.push(T.alphaMapUv),R.push(T.lightMapUv),R.push(T.aoMapUv),R.push(T.bumpMapUv),R.push(T.normalMapUv),R.push(T.displacementMapUv),R.push(T.emissiveMapUv),R.push(T.metalnessMapUv),R.push(T.roughnessMapUv),R.push(T.anisotropyMapUv),R.push(T.clearcoatMapUv),R.push(T.clearcoatNormalMapUv),R.push(T.clearcoatRoughnessMapUv),R.push(T.iridescenceMapUv),R.push(T.iridescenceThicknessMapUv),R.push(T.sheenColorMapUv),R.push(T.sheenRoughnessMapUv),R.push(T.specularMapUv),R.push(T.specularColorMapUv),R.push(T.specularIntensityMapUv),R.push(T.transmissionMapUv),R.push(T.thicknessMapUv),R.push(T.combine),R.push(T.fogExp2),R.push(T.sizeAttenuation),R.push(T.morphTargetsCount),R.push(T.morphAttributeCount),R.push(T.numDirLights),R.push(T.numPointLights),R.push(T.numSpotLights),R.push(T.numSpotLightMaps),R.push(T.numHemiLights),R.push(T.numRectAreaLights),R.push(T.numDirLightShadows),R.push(T.numPointLightShadows),R.push(T.numSpotLightShadows),R.push(T.numSpotLightShadowsWithMaps),R.push(T.numLightProbes),R.push(T.shadowMapType),R.push(T.toneMapping),R.push(T.numClippingPlanes),R.push(T.numClipIntersection),R.push(T.depthPacking)}function _(R,T){a.disableAll(),T.supportsVertexTextures&&a.enable(0),T.instancing&&a.enable(1),T.instancingColor&&a.enable(2),T.instancingMorph&&a.enable(3),T.matcap&&a.enable(4),T.envMap&&a.enable(5),T.normalMapObjectSpace&&a.enable(6),T.normalMapTangentSpace&&a.enable(7),T.clearcoat&&a.enable(8),T.iridescence&&a.enable(9),T.alphaTest&&a.enable(10),T.vertexColors&&a.enable(11),T.vertexAlphas&&a.enable(12),T.vertexUv1s&&a.enable(13),T.vertexUv2s&&a.enable(14),T.vertexUv3s&&a.enable(15),T.vertexTangents&&a.enable(16),T.anisotropy&&a.enable(17),T.alphaHash&&a.enable(18),T.batching&&a.enable(19),T.dispersion&&a.enable(20),T.batchingColor&&a.enable(21),R.push(a.mask),a.disableAll(),T.fog&&a.enable(0),T.useFog&&a.enable(1),T.flatShading&&a.enable(2),T.logarithmicDepthBuffer&&a.enable(3),T.skinning&&a.enable(4),T.morphTargets&&a.enable(5),T.morphNormals&&a.enable(6),T.morphColors&&a.enable(7),T.premultipliedAlpha&&a.enable(8),T.shadowMapEnabled&&a.enable(9),T.doubleSided&&a.enable(10),T.flipSided&&a.enable(11),T.useDepthPacking&&a.enable(12),T.dithering&&a.enable(13),T.transmission&&a.enable(14),T.sheen&&a.enable(15),T.opaque&&a.enable(16),T.pointsUvs&&a.enable(17),T.decodeVideoTexture&&a.enable(18),T.alphaToCoverage&&a.enable(19),R.push(a.mask)}function M(R){const T=v[R.type];let L;if(T){const W=as[T];L=PM.clone(W.uniforms)}else L=R.uniforms;return L}function b(R,T){let L;for(let W=0,Y=h.length;W<Y;W++){const q=h[W];if(q.cacheKey===T){L=q,++L.usedTimes;break}}return L===void 0&&(L=new fJ(t,T,R,s),h.push(L)),L}function C(R){if(--R.usedTimes===0){const T=h.indexOf(R);h[T]=h[h.length-1],h.pop(),R.destroy()}}function P(R){l.remove(R)}function B(){l.dispose()}return{getParameters:A,getProgramCacheKey:g,getUniforms:M,acquireProgram:b,releaseProgram:C,releaseShaderCache:P,programs:h,dispose:B}}function yJ(){let t=new WeakMap;function e(s){let o=t.get(s);return o===void 0&&(o={},t.set(s,o)),o}function n(s){t.delete(s)}function i(s,o,a){t.get(s)[o]=a}function r(){t=new WeakMap}return{get:e,remove:n,update:i,dispose:r}}function xJ(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function xR(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function _R(){const t=[];let e=0;const n=[],i=[],r=[];function s(){e=0,n.length=0,i.length=0,r.length=0}function o(f,p,m,v,S,A){let g=t[e];return g===void 0?(g={id:f.id,object:f,geometry:p,material:m,groupOrder:v,renderOrder:f.renderOrder,z:S,group:A},t[e]=g):(g.id=f.id,g.object=f,g.geometry=p,g.material=m,g.groupOrder=v,g.renderOrder=f.renderOrder,g.z=S,g.group=A),e++,g}function a(f,p,m,v,S,A){const g=o(f,p,m,v,S,A);m.transmission>0?i.push(g):m.transparent===!0?r.push(g):n.push(g)}function l(f,p,m,v,S,A){const g=o(f,p,m,v,S,A);m.transmission>0?i.unshift(g):m.transparent===!0?r.unshift(g):n.unshift(g)}function c(f,p){n.length>1&&n.sort(f||xJ),i.length>1&&i.sort(p||xR),r.length>1&&r.sort(p||xR)}function h(){for(let f=e,p=t.length;f<p;f++){const m=t[f];if(m.id===null)break;m.id=null,m.object=null,m.geometry=null,m.material=null,m.group=null}}return{opaque:n,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:h,sort:c}}function _J(){let t=new WeakMap;function e(i,r){const s=t.get(i);let o;return s===void 0?(o=new _R,t.set(i,[o])):r>=s.length?(o=new _R,s.push(o)):o=s[r],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function AJ(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new k,color:new ze};break;case"SpotLight":n={position:new k,direction:new k,color:new ze,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new k,color:new ze,distance:0,decay:0};break;case"HemisphereLight":n={direction:new k,skyColor:new ze,groundColor:new ze};break;case"RectAreaLight":n={color:new ze,position:new k,halfWidth:new k,halfHeight:new k};break}return t[e.id]=n,n}}}function SJ(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new he};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new he};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new he,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let wJ=0;function MJ(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function EJ(t){const e=new AJ,n=SJ(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new k);const r=new k,s=new at,o=new at;function a(c){let h=0,f=0,p=0;for(let R=0;R<9;R++)i.probe[R].set(0,0,0);let m=0,v=0,S=0,A=0,g=0,x=0,_=0,M=0,b=0,C=0,P=0;c.sort(MJ);for(let R=0,T=c.length;R<T;R++){const L=c[R],W=L.color,Y=L.intensity,q=L.distance,j=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)h+=W.r*Y,f+=W.g*Y,p+=W.b*Y;else if(L.isLightProbe){for(let Z=0;Z<9;Z++)i.probe[Z].addScaledVector(L.sh.coefficients[Z],Y);P++}else if(L.isDirectionalLight){const Z=e.get(L);if(Z.color.copy(L.color).multiplyScalar(L.intensity),L.castShadow){const H=L.shadow,D=n.get(L);D.shadowIntensity=H.intensity,D.shadowBias=H.bias,D.shadowNormalBias=H.normalBias,D.shadowRadius=H.radius,D.shadowMapSize=H.mapSize,i.directionalShadow[m]=D,i.directionalShadowMap[m]=j,i.directionalShadowMatrix[m]=L.shadow.matrix,x++}i.directional[m]=Z,m++}else if(L.isSpotLight){const Z=e.get(L);Z.position.setFromMatrixPosition(L.matrixWorld),Z.color.copy(W).multiplyScalar(Y),Z.distance=q,Z.coneCos=Math.cos(L.angle),Z.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),Z.decay=L.decay,i.spot[S]=Z;const H=L.shadow;if(L.map&&(i.spotLightMap[b]=L.map,b++,H.updateMatrices(L),L.castShadow&&C++),i.spotLightMatrix[S]=H.matrix,L.castShadow){const D=n.get(L);D.shadowIntensity=H.intensity,D.shadowBias=H.bias,D.shadowNormalBias=H.normalBias,D.shadowRadius=H.radius,D.shadowMapSize=H.mapSize,i.spotShadow[S]=D,i.spotShadowMap[S]=j,M++}S++}else if(L.isRectAreaLight){const Z=e.get(L);Z.color.copy(W).multiplyScalar(Y),Z.halfWidth.set(L.width*.5,0,0),Z.halfHeight.set(0,L.height*.5,0),i.rectArea[A]=Z,A++}else if(L.isPointLight){const Z=e.get(L);if(Z.color.copy(L.color).multiplyScalar(L.intensity),Z.distance=L.distance,Z.decay=L.decay,L.castShadow){const H=L.shadow,D=n.get(L);D.shadowIntensity=H.intensity,D.shadowBias=H.bias,D.shadowNormalBias=H.normalBias,D.shadowRadius=H.radius,D.shadowMapSize=H.mapSize,D.shadowCameraNear=H.camera.near,D.shadowCameraFar=H.camera.far,i.pointShadow[v]=D,i.pointShadowMap[v]=j,i.pointShadowMatrix[v]=L.shadow.matrix,_++}i.point[v]=Z,v++}else if(L.isHemisphereLight){const Z=e.get(L);Z.skyColor.copy(L.color).multiplyScalar(Y),Z.groundColor.copy(L.groundColor).multiplyScalar(Y),i.hemi[g]=Z,g++}}A>0&&(t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=He.LTC_FLOAT_1,i.rectAreaLTC2=He.LTC_FLOAT_2):(i.rectAreaLTC1=He.LTC_HALF_1,i.rectAreaLTC2=He.LTC_HALF_2)),i.ambient[0]=h,i.ambient[1]=f,i.ambient[2]=p;const B=i.hash;(B.directionalLength!==m||B.pointLength!==v||B.spotLength!==S||B.rectAreaLength!==A||B.hemiLength!==g||B.numDirectionalShadows!==x||B.numPointShadows!==_||B.numSpotShadows!==M||B.numSpotMaps!==b||B.numLightProbes!==P)&&(i.directional.length=m,i.spot.length=S,i.rectArea.length=A,i.point.length=v,i.hemi.length=g,i.directionalShadow.length=x,i.directionalShadowMap.length=x,i.pointShadow.length=_,i.pointShadowMap.length=_,i.spotShadow.length=M,i.spotShadowMap.length=M,i.directionalShadowMatrix.length=x,i.pointShadowMatrix.length=_,i.spotLightMatrix.length=M+b-C,i.spotLightMap.length=b,i.numSpotLightShadowsWithMaps=C,i.numLightProbes=P,B.directionalLength=m,B.pointLength=v,B.spotLength=S,B.rectAreaLength=A,B.hemiLength=g,B.numDirectionalShadows=x,B.numPointShadows=_,B.numSpotShadows=M,B.numSpotMaps=b,B.numLightProbes=P,i.version=wJ++)}function l(c,h){let f=0,p=0,m=0,v=0,S=0;const A=h.matrixWorldInverse;for(let g=0,x=c.length;g<x;g++){const _=c[g];if(_.isDirectionalLight){const M=i.directional[f];M.direction.setFromMatrixPosition(_.matrixWorld),r.setFromMatrixPosition(_.target.matrixWorld),M.direction.sub(r),M.direction.transformDirection(A),f++}else if(_.isSpotLight){const M=i.spot[m];M.position.setFromMatrixPosition(_.matrixWorld),M.position.applyMatrix4(A),M.direction.setFromMatrixPosition(_.matrixWorld),r.setFromMatrixPosition(_.target.matrixWorld),M.direction.sub(r),M.direction.transformDirection(A),m++}else if(_.isRectAreaLight){const M=i.rectArea[v];M.position.setFromMatrixPosition(_.matrixWorld),M.position.applyMatrix4(A),o.identity(),s.copy(_.matrixWorld),s.premultiply(A),o.extractRotation(s),M.halfWidth.set(_.width*.5,0,0),M.halfHeight.set(0,_.height*.5,0),M.halfWidth.applyMatrix4(o),M.halfHeight.applyMatrix4(o),v++}else if(_.isPointLight){const M=i.point[p];M.position.setFromMatrixPosition(_.matrixWorld),M.position.applyMatrix4(A),p++}else if(_.isHemisphereLight){const M=i.hemi[S];M.direction.setFromMatrixPosition(_.matrixWorld),M.direction.transformDirection(A),S++}}}return{setup:a,setupView:l,state:i}}function AR(t){const e=new EJ(t),n=[],i=[];function r(h){c.camera=h,n.length=0,i.length=0}function s(h){n.push(h)}function o(h){i.push(h)}function a(){e.setup(n)}function l(h){e.setupView(n,h)}const c={lightsArray:n,shadowsArray:i,camera:null,lights:e,transmissionRenderTarget:{}};return{init:r,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function CJ(t){let e=new WeakMap;function n(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new AR(t),e.set(r,[a])):s>=o.length?(a=new AR(t),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:n,dispose:i}}class NM extends zn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=VN,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 FM extends zn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const TJ=`void main() {
3856	gl_Position = vec4( position, 1.0 );
3857}`,bJ=`uniform sampler2D shadow_pass;
3858uniform vec2 resolution;
3859uniform float radius;
3860#include <packing>
3861void main() {
3862	const float samples = float( VSM_SAMPLES );
3863	float mean = 0.0;
3864	float squared_mean = 0.0;
3865	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
3866	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
3867	for ( float i = 0.0; i < samples; i ++ ) {
3868		float uvOffset = uvStart + i * uvStride;
3869		#ifdef HORIZONTAL_PASS
3870			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
3871			mean += distribution.x;
3872			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
3873		#else
3874			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
3875			mean += depth;
3876			squared_mean += depth * depth;
3877		#endif
3878	}
3879	mean = mean / samples;
3880	squared_mean = squared_mean / samples;
3881	float std_dev = sqrt( squared_mean - mean * mean );
3882	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
3883}`;function RJ(t,e,n){let i=new cp;const r=new he,s=new he,o=new Ut,a=new NM({depthPacking:jN}),l=new FM,c={},h=n.maxTextureSize,f={[ks]:Ui,[Ui]:ks,[Or]:Or}
vendor: 10,683 bytes, line 3883
3883,p=new Wr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new he},radius:{value:4}},vertexShader:TJ,fragmentShader:bJ}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const v=new St;v.setAttribute("position",new Nt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const S=new bn(v,p),A=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=sy;let g=this.type;this.render=function(C,P,B){if(A.enabled===!1||A.autoUpdate===!1&&A.needsUpdate===!1||C.length===0)return;const R=t.getRenderTarget(),T=t.getActiveCubeFace(),L=t.getActiveMipmapLevel(),W=t.state;W.setBlending(go),W.buffers.color.setClear(1,1,1,1),W.buffers.depth.setTest(!0),W.setScissorTest(!1);const Y=g!==is&&this.type===is,q=g===is&&this.type!==is;for(let j=0,Z=C.length;j<Z;j++){const H=C[j],D=H.shadow;if(D===void 0){console.warn("THREE.WebGLShadowMap:",H,"has no shadow.");continue}if(D.autoUpdate===!1&&D.needsUpdate===!1)continue;r.copy(D.mapSize);const X=D.getFrameExtents();if(r.multiply(X),s.copy(D.mapSize),(r.x>h||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/X.x),r.x=s.x*X.x,D.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/X.y),r.y=s.y*X.y,D.mapSize.y=s.y)),D.map===null||Y===!0||q===!0){const $=this.type!==is?{minFilter:jn,magFilter:jn}:{};D.map!==null&&D.map.dispose(),D.map=new ps(r.x,r.y,$),D.map.texture.name=H.name+".shadowMap",D.camera.updateProjectionMatrix()}t.setRenderTarget(D.map),t.clear();const J=D.getViewportCount();for(let $=0;$<J;$++){const ue=D.getViewport($);o.set(s.x*ue.x,s.y*ue.y,s.x*ue.z,s.y*ue.w),W.viewport(o),D.updateMatrices(H,$),i=D.getFrustum(),M(P,B,D.camera,H,this.type)}D.isPointLightShadow!==!0&&this.type===is&&x(D,B),D.needsUpdate=!1}g=this.type,A.needsUpdate=!1,t.setRenderTarget(R,T,L)};function x(C,P){const B=e.update(S);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 ps(r.x,r.y)),p.uniforms.shadow_pass.value=C.map.texture,p.uniforms.resolution.value=C.mapSize,p.uniforms.radius.value=C.radius,t.setRenderTarget(C.mapPass),t.clear(),t.renderBufferDirect(P,null,B,p,S,null),m.uniforms.shadow_pass.value=C.mapPass.texture,m.uniforms.resolution.value=C.mapSize,m.uniforms.radius.value=C.radius,t.setRenderTarget(C.map),t.clear(),t.renderBufferDirect(P,null,B,m,S,null)}function _(C,P,B,R){let T=null;const L=B.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(L!==void 0)T=L;else if(T=B.isPointLight===!0?l:a,t.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){const W=T.uuid,Y=P.uuid;let q=c[W];q===void 0&&(q={},c[W]=q);let j=q[Y];j===void 0&&(j=T.clone(),q[Y]=j,P.addEventListener("dispose",b)),T=j}if(T.visible=P.visible,T.wireframe=P.wireframe,R===is?T.side=P.shadowSide!==null?P.shadowSide:P.side:T.side=P.shadowSide!==null?P.shadowSide:f[P.side],T.alphaMap=P.alphaMap,T.alphaTest=P.alphaTest,T.map=P.map,T.clipShadows=P.clipShadows,T.clippingPlanes=P.clippingPlanes,T.clipIntersection=P.clipIntersection,T.displacementMap=P.displacementMap,T.displacementScale=P.displacementScale,T.displacementBias=P.displacementBias,T.wireframeLinewidth=P.wireframeLinewidth,T.linewidth=P.linewidth,B.isPointLight===!0&&T.isMeshDistanceMaterial===!0){const W=t.properties.get(T);W.light=B}return T}function M(C,P,B,R,T){if(C.visible===!1)return;if(C.layers.test(P.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&T===is)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,C.matrixWorld);const Y=e.update(C),q=C.material;if(Array.isArray(q)){const j=Y.groups;for(let Z=0,H=j.length;Z<H;Z++){const D=j[Z],X=q[D.materialIndex];if(X&&X.visible){const J=_(C,X,R,T);C.onBeforeShadow(t,C,P,B,Y,J,D),t.renderBufferDirect(B,null,Y,J,C,D),C.onAfterShadow(t,C,P,B,Y,J,D)}}}else if(q.visible){const j=_(C,q,R,T);C.onBeforeShadow(t,C,P,B,Y,j,null),t.renderBufferDirect(B,null,Y,j,C,null),C.onAfterShadow(t,C,P,B,Y,j,null)}}const W=C.children;for(let Y=0,q=W.length;Y<q;Y++)M(W[Y],P,B,R,T)}function b(C){C.target.removeEventListener("dispose",b);for(const B in c){const R=c[B],T=C.target.uuid;T in R&&(R[T].dispose(),delete R[T])}}}function PJ(t){function e(){let K=!1;const Ce=new Ut;let pe=null;const ve=new Ut(0,0,0,0);return{setMask:function(Fe){pe!==Fe&&!K&&(t.colorMask(Fe,Fe,Fe,Fe),pe=Fe)},setLocked:function(Fe){K=Fe},setClear:function(Fe,dt,_t,zt,an){an===!0&&(Fe*=zt,dt*=zt,_t*=zt),Ce.set(Fe,dt,_t,zt),ve.equals(Ce)===!1&&(t.clearColor(Fe,dt,_t,zt),ve.copy(Ce))},reset:function(){K=!1,pe=null,ve.set(-1,0,0,0)}}}function n(){let K=!1,Ce=null,pe=null,ve=null;return{setTest:function(Fe){Fe?xe(t.DEPTH_TEST):_e(t.DEPTH_TEST)},setMask:function(Fe){Ce!==Fe&&!K&&(t.depthMask(Fe),Ce=Fe)},setFunc:function(Fe){if(pe!==Fe){switch(Fe){case wN:t.depthFunc(t.NEVER);break;case MN:t.depthFunc(t.ALWAYS);break;case EN:t.depthFunc(t.LESS);break;case Ef:t.depthFunc(t.LEQUAL);break;case CN:t.depthFunc(t.EQUAL);break;case TN:t.depthFunc(t.GEQUAL);break;case bN:t.depthFunc(t.GREATER);break;case RN:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}pe=Fe}},setLocked:function(Fe){K=Fe},setClear:function(Fe){ve!==Fe&&(t.clearDepth(Fe),ve=Fe)},reset:function(){K=!1,Ce=null,pe=null,ve=null}}}function i(){let K=!1,Ce=null,pe=null,ve=null,Fe=null,dt=null,_t=null,zt=null,an=null;return{setTest:function(Rt){K||(Rt?xe(t.STENCIL_TEST):_e(t.STENCIL_TEST))},setMask:function(Rt){Ce!==Rt&&!K&&(t.stencilMask(Rt),Ce=Rt)},setFunc:function(Rt,Kn,qn){(pe!==Rt||ve!==Kn||Fe!==qn)&&(t.stencilFunc(Rt,Kn,qn),pe=Rt,ve=Kn,Fe=qn)},setOp:function(Rt,Kn,qn){(dt!==Rt||_t!==Kn||zt!==qn)&&(t.stencilOp(Rt,Kn,qn),dt=Rt,_t=Kn,zt=qn)},setLocked:function(Rt){K=Rt},setClear:function(Rt){an!==Rt&&(t.clearStencil(Rt),an=Rt)},reset:function(){K=!1,Ce=null,pe=null,ve=null,Fe=null,dt=null,_t=null,zt=null,an=null}}}const r=new e,s=new n,o=new i,a=new WeakMap,l=new WeakMap;let c={},h={},f=new WeakMap,p=[],m=null,v=!1,S=null,A=null,g=null,x=null,_=null,M=null,b=null,C=new ze(0,0,0),P=0,B=!1,R=null,T=null,L=null,W=null,Y=null;const q=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let j=!1,Z=0;const H=t.getParameter(t.VERSION);H.indexOf("WebGL")!==-1?(Z=parseFloat(/^WebGL (\d)/.exec(H)[1]),j=Z>=1):H.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(H)[1]),j=Z>=2);let D=null,X={};const J=t.getParameter(t.SCISSOR_BOX),$=t.getParameter(t.VIEWPORT),ue=new Ut().fromArray(J),Ae=new Ut().fromArray($);function te(K,Ce,pe,ve){const Fe=new Uint8Array(4),dt=t.createTexture();t.bindTexture(K,dt),t.texParameteri(K,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(K,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let _t=0;_t<pe;_t++)K===t.TEXTURE_3D||K===t.TEXTURE_2D_ARRAY?t.texImage3D(Ce,0,t.RGBA,1,1,ve,0,t.RGBA,t.UNSIGNED_BYTE,Fe):t.texImage2D(Ce+_t,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,Fe);return dt}const ce={};ce[t.TEXTURE_2D]=te(t.TEXTURE_2D,t.TEXTURE_2D,1),ce[t.TEXTURE_CUBE_MAP]=te(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),ce[t.TEXTURE_2D_ARRAY]=te(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),ce[t.TEXTURE_3D]=te(t.TEXTURE_3D,t.TEXTURE_3D,1,1),r.setClear(0,0,0,1),s.setClear(1),o.setClear(0),xe(t.DEPTH_TEST),s.setFunc(Ef),Ne(!1),ge(oS),xe(t.CULL_FACE),ye(go);function xe(K){c[K]!==!0&&(t.enable(K),c[K]=!0)}function _e(K){c[K]!==!1&&(t.disable(K),c[K]=!1)}function De(K,Ce){return h[K]!==Ce?(t.bindFramebuffer(K,Ce),h[K]=Ce,K===t.DRAW_FRAMEBUFFER&&(h[t.FRAMEBUFFER]=Ce),K===t.FRAMEBUFFER&&(h[t.DRAW_FRAMEBUFFER]=Ce),!0):!1}function it(K,Ce){let pe=p,ve=!1;if(K){pe=f.get(Ce),pe===void 0&&(pe=[],f.set(Ce,pe));const Fe=K.textures;if(pe.length!==Fe.length||pe[0]!==t.COLOR_ATTACHMENT0){for(let dt=0,_t=Fe.length;dt<_t;dt++)pe[dt]=t.COLOR_ATTACHMENT0+dt;pe.length=Fe.length,ve=!0}}else pe[0]!==t.BACK&&(pe[0]=t.BACK,ve=!0);ve&&t.drawBuffers(pe)}function Ue(K){return m!==K?(t.useProgram(K),m=K,!0):!1}const Be={[ea]:t.FUNC_ADD,[oN]:t.FUNC_SUBTRACT,[aN]:t.FUNC_REVERSE_SUBTRACT};Be[lN]=t.MIN,Be[cN]=t.MAX;const U={[uN]:t.ZERO,[dN]:t.ONE,[hN]:t.SRC_COLOR,[j0]:t.SRC_ALPHA,[yN]:t.SRC_ALPHA_SATURATE,[gN]:t.DST_COLOR,[pN]:t.DST_ALPHA,[fN]:t.ONE_MINUS_SRC_COLOR,[W0]:t.ONE_MINUS_SRC_ALPHA,[vN]:t.ONE_MINUS_DST_COLOR,[mN]:t.ONE_MINUS_DST_ALPHA,[xN]:t.CONSTANT_COLOR,[_N]:t.ONE_MINUS_CONSTANT_COLOR,[AN]:t.CONSTANT_ALPHA,[SN]:t.ONE_MINUS_CONSTANT_ALPHA};function ye(K,Ce,pe,ve,Fe,dt,_t,zt,an,Rt){if(K===go){v===!0&&(_e(t.BLEND),v=!1);return}if(v===!1&&(xe(t.BLEND),v=!0),K!==sN){if(K!==S||Rt!==B){if((A!==ea||_!==ea)&&(t.blendEquation(t.FUNC_ADD),A=ea,_=ea),Rt)switch(K){case Il:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case aS:t.blendFunc(t.ONE,t.ONE);break;case lS:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case cS:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}else switch(K){case Il:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case aS:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case lS:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case cS:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}g=null,x=null,M=null,b=null,C.set(0,0,0),P=0,S=K,B=Rt}return}Fe=Fe||Ce,dt=dt||pe,_t=_t||ve,(Ce!==A||Fe!==_)&&(t.blendEquationSeparate(Be[Ce],Be[Fe]),A=Ce,_=Fe),(pe!==g||ve!==x||dt!==M||_t!==b)&&(t.blendFuncSeparate(U[pe],U[ve],U[dt],U[_t]),g=pe,x=ve,M=dt,b=_t),(zt.equals(C)===!1||an!==P)&&(t.blendColor(zt.r,zt.g,zt.b,an),C.copy(zt),P=an),S=K,B=!1}function Te(K,Ce){K.side===Or?_e(t.CULL_FACE):xe(t.CULL_FACE);let pe=K.side===Ui;Ce&&(pe=!pe),Ne(pe),K.blending===Il&&K.transparent===!1?ye(go):ye(K.blending,K.blendEquation,K.blendSrc,K.blendDst,K.blendEquationAlpha,K.blendSrcAlpha,K.blendDstAlpha,K.blendColor,K.blendAlpha,K.premultipliedAlpha),s.setFunc(K.depthFunc),s.setTest(K.depthTest),s.setMask(K.depthWrite),r.setMask(K.colorWrite);const ve=K.stencilWrite;o.setTest(ve),ve&&(o.setMask(K.stencilWriteMask),o.setFunc(K.stencilFunc,K.stencilRef,K.stencilFuncMask),o.setOp(K.stencilFail,K.stencilZFail,K.stencilZPass)),Oe(K.polygonOffset,K.polygonOffsetFactor,K.polygonOffsetUnits),K.alphaToCoverage===!0?xe(t.SAMPLE_ALPHA_TO_COVERAGE):_e(t.SAMPLE_ALPHA_TO_COVERAGE)}function Ne(K){R!==K&&(K?t.frontFace(t.CW):t.frontFace(t.CCW),R=K)}function ge(K){K!==nN?(xe(t.CULL_FACE),K!==T&&(K===oS?t.cullFace(t.BACK):K===iN?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):_e(t.CULL_FACE),T=K}function Ze(K){K!==L&&(j&&t.lineWidth(K),L=K)}
vendor: 9,972 bytes, line 3883
3883function Oe(K,Ce,pe){K?(xe(t.POLYGON_OFFSET_FILL),(W!==Ce||Y!==pe)&&(t.polygonOffset(Ce,pe),W=Ce,Y=pe)):_e(t.POLYGON_OFFSET_FILL)}function je(K){K?xe(t.SCISSOR_TEST):_e(t.SCISSOR_TEST)}function V(K){K===void 0&&(K=t.TEXTURE0+q-1),D!==K&&(t.activeTexture(K),D=K)}function N(K,Ce,pe){pe===void 0&&(D===null?pe=t.TEXTURE0+q-1:pe=D);let ve=X[pe];ve===void 0&&(ve={type:void 0,texture:void 0},X[pe]=ve),(ve.type!==K||ve.texture!==Ce)&&(D!==pe&&(t.activeTexture(pe),D=pe),t.bindTexture(K,Ce||ce[K]),ve.type=K,ve.texture=Ce)}function se(){const K=X[D];K!==void 0&&K.type!==void 0&&(t.bindTexture(K.type,null),K.type=void 0,K.texture=void 0)}function Me(){try{t.compressedTexImage2D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function we(){try{t.compressedTexImage3D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ee(){try{t.texSubImage2D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function rt(){try{t.texSubImage3D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Pe(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ke(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function xt(){try{t.texStorage2D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Re(){try{t.texStorage3D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function We(){try{t.texImage2D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function It(){try{t.texImage3D.apply(t,arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function ft(K){ue.equals(K)===!1&&(t.scissor(K.x,K.y,K.z,K.w),ue.copy(K))}function qe(K){Ae.equals(K)===!1&&(t.viewport(K.x,K.y,K.z,K.w),Ae.copy(K))}function Q(K,Ce){let pe=l.get(Ce);pe===void 0&&(pe=new WeakMap,l.set(Ce,pe));let ve=pe.get(K);ve===void 0&&(ve=t.getUniformBlockIndex(Ce,K.name),pe.set(K,ve))}function me(K,Ce){const ve=l.get(Ce).get(K);a.get(Ce)!==ve&&(t.uniformBlockBinding(Ce,ve,K.__bindingPointIndex),a.set(Ce,ve))}function Ve(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),c={},D=null,X={},h={},f=new WeakMap,p=[],m=null,v=!1,S=null,A=null,g=null,x=null,_=null,M=null,b=null,C=new ze(0,0,0),P=0,B=!1,R=null,T=null,L=null,W=null,Y=null,ue.set(0,0,t.canvas.width,t.canvas.height),Ae.set(0,0,t.canvas.width,t.canvas.height),r.reset(),s.reset(),o.reset()}return{buffers:{color:r,depth:s,stencil:o},enable:xe,disable:_e,bindFramebuffer:De,drawBuffers:it,useProgram:Ue,setBlending:ye,setMaterial:Te,setFlipSided:Ne,setCullFace:ge,setLineWidth:Ze,setPolygonOffset:Oe,setScissorTest:je,activeTexture:V,bindTexture:N,unbindTexture:se,compressedTexImage2D:Me,compressedTexImage3D:we,texImage2D:We,texImage3D:It,updateUBOMapping:Q,uniformBlockBinding:me,texStorage2D:xt,texStorage3D:Re,texSubImage2D:Ee,texSubImage3D:rt,compressedTexSubImage2D:Pe,compressedTexSubImage3D:Ke,scissor:ft,viewport:qe,reset:Ve}}function IJ(t,e){const n=t.image&&t.image.width?t.image.width/t.image.height:1;return n>e?(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}function BJ(t,e){const n=t.image&&t.image.width?t.image.width/t.image.height:1;return n>e?(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}function LJ(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function mS(t,e,n,i){const r=DJ(i);switch(n){case gM:return t*e;case yM:return t*e;case xM:return t*e*2;case dy:return t*e/r.components*r.byteLength;case sp:return t*e/r.components*r.byteLength;case _M:return t*e*2/r.components*r.byteLength;case hy:return t*e*2/r.components*r.byteLength;case vM:return t*e*3/r.components*r.byteLength;case Ci:return t*e*4/r.components*r.byteLength;case fy:return t*e*4/r.components*r.byteLength;case Vh:case jh:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Wh:case Xh:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case J0:case q0:return Math.max(t,16)*Math.max(e,8)/4;case X0:case K0:return Math.max(t,8)*Math.max(e,8)/2;case Q0:case Y0:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Z0:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case $0:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case ev:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case tv:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case nv:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case iv:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case rv:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case sv:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case ov:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case av:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case lv:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case cv:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case uv:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case dv:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case hv:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Jh:case fv:case pv:return Math.ceil(t/4)*Math.ceil(e/4)*16;case AM:case mv:return Math.ceil(t/4)*Math.ceil(e/4)*8;case gv:case vv:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function DJ(t){switch(t){case fs:case fM:return{byteLength:1,components:1};case Ku:case pM:case ud:return{byteLength:2,components:1};case cy:case uy:return{byteLength:2,components:4};case Mo:case ly:case Qi:return{byteLength:4,components:1};case mM:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const NJ={contain:IJ,cover:BJ,fill:LJ,getByteLength:mS};function FJ(t,e,n,i,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 he,h=new WeakMap;let f;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(V,N){return m?new OffscreenCanvas(V,N):Df("canvas")}function S(V,N,se){let Me=1;const we=je(V);if((we.width>se||we.height>se)&&(Me=se/Math.max(we.width,we.height)),Me<1)if(typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&V instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&V instanceof ImageBitmap||typeof VideoFrame<"u"&&V instanceof VideoFrame){const Ee=Math.floor(Me*we.width),rt=Math.floor(Me*we.height);f===void 0&&(f=v(Ee,rt));const Pe=N?v(Ee,rt):f;return Pe.width=Ee,Pe.height=rt,Pe.getContext("2d").drawImage(V,0,0,Ee,rt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+we.width+"x"+we.height+") to ("+Ee+"x"+rt+")."),Pe}else return"data"in V&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+we.width+"x"+we.height+")."),V;return V}function A(V){return V.generateMipmaps&&V.minFilter!==jn&&V.minFilter!==Tn}function g(V){t.generateMipmap(V)}function x(V,N,se,Me,we=!1){if(V!==null){if(t[V]!==void 0)return t[V];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+V+"'")}let Ee=N;if(N===t.RED&&(se===t.FLOAT&&(Ee=t.R32F),se===t.HALF_FLOAT&&(Ee=t.R16F),se===t.UNSIGNED_BYTE&&(Ee=t.R8)),N===t.RED_INTEGER&&(se===t.UNSIGNED_BYTE&&(Ee=t.R8UI),se===t.UNSIGNED_SHORT&&(Ee=t.R16UI),se===t.UNSIGNED_INT&&(Ee=t.R32UI),se===t.BYTE&&(Ee=t.R8I),se===t.SHORT&&(Ee=t.R16I),se===t.INT&&(Ee=t.R32I)),N===t.RG&&(se===t.FLOAT&&(Ee=t.RG32F),se===t.HALF_FLOAT&&(Ee=t.RG16F),se===t.UNSIGNED_BYTE&&(Ee=t.RG8)),N===t.RG_INTEGER&&(se===t.UNSIGNED_BYTE&&(Ee=t.RG8UI),se===t.UNSIGNED_SHORT&&(Ee=t.RG16UI),se===t.UNSIGNED_INT&&(Ee=t.RG32UI),se===t.BYTE&&(Ee=t.RG8I),se===t.SHORT&&(Ee=t.RG16I),se===t.INT&&(Ee=t.RG32I)),N===t.RGB&&se===t.UNSIGNED_INT_5_9_9_9_REV&&(Ee=t.RGB9_E5),N===t.RGBA){const rt=we?Rf:Xt.getTransfer(Me);se===t.FLOAT&&(Ee=t.RGBA32F),se===t.HALF_FLOAT&&(Ee=t.RGBA16F),se===t.UNSIGNED_BYTE&&(Ee=rt===rn?t.SRGB8_ALPHA8:t.RGBA8),se===t.UNSIGNED_SHORT_4_4_4_4&&(Ee=t.RGBA4),se===t.UNSIGNED_SHORT_5_5_5_1&&(Ee=t.RGB5_A1)}return(Ee===t.R16F||Ee===t.R32F||Ee===t.RG16F||Ee===t.RG32F||Ee===t.RGBA16F||Ee===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ee}function _(V,N){let se;return V?N===null||N===Mo||N===Wl?se=t.DEPTH24_STENCIL8:N===Qi?se=t.DEPTH32F_STENCIL8:N===Ku&&(se=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):N===null||N===Mo||N===Wl?se=t.DEPTH_COMPONENT24:N===Qi?se=t.DEPTH_COMPONENT32F:N===Ku&&(se=t.DEPTH_COMPONENT16),se}function M(V,N){return A(V)===!0||V.isFramebufferTexture&&V.minFilter!==jn&&V.minFilter!==Tn?Math.log2(Math.max(N.width,N.height))+1:V.mipmaps!==void 0&&V.mipmaps.length>0?V.mipmaps.length:V.isCompressedTexture&&Array.isArray(V.image)?N.mipmaps.length:1}function b(V){const N=V.target;N.removeEventListener("dispose",b),P(N),N.isVideoTexture&&h.delete(N)}function C(V){const N=V.target;N.removeEventListener("dispose",C),R(N)}function P(V){const N=i.get(V);if(N.__webglInit===void 0)return;
vendor: 4,624 bytes, line 3883
3883const se=V.source,Me=p.get(se);if(Me){const we=Me[N.__cacheKey];we.usedTimes--,we.usedTimes===0&&B(V),Object.keys(Me).length===0&&p.delete(se)}i.remove(V)}function B(V){const N=i.get(V);t.deleteTexture(N.__webglTexture);const se=V.source,Me=p.get(se);delete Me[N.__cacheKey],o.memory.textures--}function R(V){const N=i.get(V);if(V.depthTexture&&V.depthTexture.dispose(),V.isWebGLCubeRenderTarget)for(let Me=0;Me<6;Me++){if(Array.isArray(N.__webglFramebuffer[Me]))for(let we=0;we<N.__webglFramebuffer[Me].length;we++)t.deleteFramebuffer(N.__webglFramebuffer[Me][we]);else t.deleteFramebuffer(N.__webglFramebuffer[Me]);N.__webglDepthbuffer&&t.deleteRenderbuffer(N.__webglDepthbuffer[Me])}else{if(Array.isArray(N.__webglFramebuffer))for(let Me=0;Me<N.__webglFramebuffer.length;Me++)t.deleteFramebuffer(N.__webglFramebuffer[Me]);else t.deleteFramebuffer(N.__webglFramebuffer);if(N.__webglDepthbuffer&&t.deleteRenderbuffer(N.__webglDepthbuffer),N.__webglMultisampledFramebuffer&&t.deleteFramebuffer(N.__webglMultisampledFramebuffer),N.__webglColorRenderbuffer)for(let Me=0;Me<N.__webglColorRenderbuffer.length;Me++)N.__webglColorRenderbuffer[Me]&&t.deleteRenderbuffer(N.__webglColorRenderbuffer[Me]);N.__webglDepthRenderbuffer&&t.deleteRenderbuffer(N.__webglDepthRenderbuffer)}const se=V.textures;for(let Me=0,we=se.length;Me<we;Me++){const Ee=i.get(se[Me]);Ee.__webglTexture&&(t.deleteTexture(Ee.__webglTexture),o.memory.textures--),i.remove(se[Me])}i.remove(V)}let T=0;function L(){T=0}function W(){const V=T;return V>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+V+" texture units while this GPU supports only "+r.maxTextures),T+=1,V}function Y(V){const N=[];return N.push(V.wrapS),N.push(V.wrapT),N.push(V.wrapR||0),N.push(V.magFilter),N.push(V.minFilter),N.push(V.anisotropy),N.push(V.internalFormat),N.push(V.format),N.push(V.type),N.push(V.generateMipmaps),N.push(V.premultiplyAlpha),N.push(V.flipY),N.push(V.unpackAlignment),N.push(V.colorSpace),N.join()}function q(V,N){const se=i.get(V);if(V.isVideoTexture&&Ze(V),V.isRenderTargetTexture===!1&&V.version>0&&se.__version!==V.version){const Me=V.image;if(Me===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Me.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ae(se,V,N);return}}n.bindTexture(t.TEXTURE_2D,se.__webglTexture,t.TEXTURE0+N)}function j(V,N){const se=i.get(V);if(V.version>0&&se.__version!==V.version){Ae(se,V,N);return}n.bindTexture(t.TEXTURE_2D_ARRAY,se.__webglTexture,t.TEXTURE0+N)}function Z(V,N){const se=i.get(V);if(V.version>0&&se.__version!==V.version){Ae(se,V,N);return}n.bindTexture(t.TEXTURE_3D,se.__webglTexture,t.TEXTURE0+N)}function H(V,N){const se=i.get(V);if(V.version>0&&se.__version!==V.version){te(se,V,N);return}n.bindTexture(t.TEXTURE_CUBE_MAP,se.__webglTexture,t.TEXTURE0+N)}const D={[Aa]:t.REPEAT,[dr]:t.CLAMP_TO_EDGE,[Ju]:t.MIRRORED_REPEAT},X={[jn]:t.NEAREST,[ay]:t.NEAREST_MIPMAP_NEAREST,[xl]:t.NEAREST_MIPMAP_LINEAR,[Tn]:t.LINEAR,[Iu]:t.LINEAR_MIPMAP_NEAREST,[zr]:t.LINEAR_MIPMAP_LINEAR},J={[XN]:t.NEVER,[ZN]:t.ALWAYS,[JN]:t.LESS,[MM]:t.LEQUAL,[KN]:t.EQUAL,[YN]:t.GEQUAL,[qN]:t.GREATER,[QN]:t.NOTEQUAL};function $(V,N){if(N.type===Qi&&e.has("OES_texture_float_linear")===!1&&(N.magFilter===Tn||N.magFilter===Iu||N.magFilter===xl||N.magFilter===zr||N.minFilter===Tn||N.minFilter===Iu||N.minFilter===xl||N.minFilter===zr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(V,t.TEXTURE_WRAP_S,D[N.wrapS]),t.texParameteri(V,t.TEXTURE_WRAP_T,D[N.wrapT]),(V===t.TEXTURE_3D||V===t.TEXTURE_2D_ARRAY)&&t.texParameteri(V,t.TEXTURE_WRAP_R,D[N.wrapR]),t.texParameteri(V,t.TEXTURE_MAG_FILTER,X[N.magFilter]),t.texParameteri(V,t.TEXTURE_MIN_FILTER,X[N.minFilter]),N.compareFunction&&(t.texParameteri(V,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(V,t.TEXTURE_COMPARE_FUNC,J[N.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(N.magFilter===jn||N.minFilter!==xl&&N.minFilter!==zr||N.type===Qi&&e.has("OES_texture_float_linear")===!1)return;if(N.anisotropy>1||i.get(N).__currentAnisotropy){const se=e.get("EXT_texture_filter_anisotropic");t.texParameterf(V,se.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,r.getMaxAnisotropy())),i.get(N).__currentAnisotropy=N.anisotropy}}}function ue(V,N){let se=!1;V.__webglInit===void 0&&(V.__webglInit=!0,N.addEventListener("dispose",b));const Me=N.source;let we=p.get(Me);we===void 0&&(we={},p.set(Me,we));const Ee=Y(N);
vendor: 4,627 bytes, line 3883
3883if(Ee!==V.__cacheKey){we[Ee]===void 0&&(we[Ee]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,se=!0),we[Ee].usedTimes++;const rt=we[V.__cacheKey];rt!==void 0&&(we[V.__cacheKey].usedTimes--,rt.usedTimes===0&&B(N)),V.__cacheKey=Ee,V.__webglTexture=we[Ee].texture}return se}function Ae(V,N,se){let Me=t.TEXTURE_2D;(N.isDataArrayTexture||N.isCompressedArrayTexture)&&(Me=t.TEXTURE_2D_ARRAY),N.isData3DTexture&&(Me=t.TEXTURE_3D);const we=ue(V,N),Ee=N.source;n.bindTexture(Me,V.__webglTexture,t.TEXTURE0+se);const rt=i.get(Ee);if(Ee.version!==rt.__version||we===!0){n.activeTexture(t.TEXTURE0+se);const Pe=Xt.getPrimaries(Xt.workingColorSpace),Ke=N.colorSpace===io?null:Xt.getPrimaries(N.colorSpace),xt=N.colorSpace===io||Pe===Ke?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,N.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,N.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,xt);let Re=S(N.image,!1,r.maxTextureSize);Re=Oe(N,Re);const We=s.convert(N.format,N.colorSpace),It=s.convert(N.type);let ft=x(N.internalFormat,We,It,N.colorSpace,N.isVideoTexture);$(Me,N);let qe;const Q=N.mipmaps,me=N.isVideoTexture!==!0,Ve=rt.__version===void 0||we===!0,K=Ee.dataReady,Ce=M(N,Re);if(N.isDepthTexture)ft=_(N.format===Xl,N.type),Ve&&(me?n.texStorage2D(t.TEXTURE_2D,1,ft,Re.width,Re.height):n.texImage2D(t.TEXTURE_2D,0,ft,Re.width,Re.height,0,We,It,null));else if(N.isDataTexture)if(Q.length>0){me&&Ve&&n.texStorage2D(t.TEXTURE_2D,Ce,ft,Q[0].width,Q[0].height);for(let pe=0,ve=Q.length;pe<ve;pe++)qe=Q[pe],me?K&&n.texSubImage2D(t.TEXTURE_2D,pe,0,0,qe.width,qe.height,We,It,qe.data):n.texImage2D(t.TEXTURE_2D,pe,ft,qe.width,qe.height,0,We,It,qe.data);N.generateMipmaps=!1}else me?(Ve&&n.texStorage2D(t.TEXTURE_2D,Ce,ft,Re.width,Re.height),K&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,Re.width,Re.height,We,It,Re.data)):n.texImage2D(t.TEXTURE_2D,0,ft,Re.width,Re.height,0,We,It,Re.data);else if(N.isCompressedTexture)if(N.isCompressedArrayTexture){me&&Ve&&n.texStorage3D(t.TEXTURE_2D_ARRAY,Ce,ft,Q[0].width,Q[0].height,Re.depth);for(let pe=0,ve=Q.length;pe<ve;pe++)if(qe=Q[pe],N.format!==Ci)if(We!==null)if(me){if(K)if(N.layerUpdates.size>0){const Fe=mS(qe.width,qe.height,N.format,N.type);for(const dt of N.layerUpdates){const _t=qe.data.subarray(dt*Fe/qe.data.BYTES_PER_ELEMENT,(dt+1)*Fe/qe.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,pe,0,0,dt,qe.width,qe.height,1,We,_t,0,0)}N.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,pe,0,0,0,qe.width,qe.height,Re.depth,We,qe.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,pe,ft,qe.width,qe.height,Re.depth,0,qe.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else me?K&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,pe,0,0,0,qe.width,qe.height,Re.depth,We,It,qe.data):n.texImage3D(t.TEXTURE_2D_ARRAY,pe,ft,qe.width,qe.height,Re.depth,0,We,It,qe.data)}else{me&&Ve&&n.texStorage2D(t.TEXTURE_2D,Ce,ft,Q[0].width,Q[0].height);for(let pe=0,ve=Q.length;pe<ve;pe++)qe=Q[pe],N.format!==Ci?We!==null?me?K&&n.compressedTexSubImage2D(t.TEXTURE_2D,pe,0,0,qe.width,qe.height,We,qe.data):n.compressedTexImage2D(t.TEXTURE_2D,pe,ft,qe.width,qe.height,0,qe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):me?K&&n.texSubImage2D(t.TEXTURE_2D,pe,0,0,qe.width,qe.height,We,It,qe.data):n.texImage2D(t.TEXTURE_2D,pe,ft,qe.width,qe.height,0,We,It,qe.data)}else if(N.isDataArrayTexture)if(me){if(Ve&&n.texStorage3D(t.TEXTURE_2D_ARRAY,Ce,ft,Re.width,Re.height,Re.depth),K)if(N.layerUpdates.size>0){const pe=mS(Re.width,Re.height,N.format,N.type);for(const ve of N.layerUpdates){const Fe=Re.data.subarray(ve*pe/Re.data.BYTES_PER_ELEMENT,(ve+1)*pe/Re.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,ve,Re.width,Re.height,1,We,It,Fe)}N.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Re.width,Re.height,Re.depth,We,It,Re.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,ft,Re.width,Re.height,Re.depth,0,We,It,Re.data);else if(N.isData3DTexture)me?(Ve&&n.texStorage3D(t.TEXTURE_3D,Ce,ft,Re.width,Re.height,Re.depth),K&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Re.width,Re.height,Re.depth,We,It,Re.data)):n.texImage3D(t.TEXTURE_3D,0,ft,Re.width,Re.height,Re.depth,0,We,It,Re.data);else if(N.isFramebufferTexture){if(Ve)if(me)n.texStorage2D(t.TEXTURE_2D,Ce,ft,Re.width,Re.height);else{let pe=Re.width,ve=Re.height;for(let Fe=0;Fe<Ce;Fe++)n.texImage2D(t.TEXTURE_2D,Fe,ft,pe,ve,0,We,It,null),pe>>=1,ve>>
vendor: 9,284 bytes, line 3883
3883=1}}else if(Q.length>0){if(me&&Ve){const pe=je(Q[0]);n.texStorage2D(t.TEXTURE_2D,Ce,ft,pe.width,pe.height)}for(let pe=0,ve=Q.length;pe<ve;pe++)qe=Q[pe],me?K&&n.texSubImage2D(t.TEXTURE_2D,pe,0,0,We,It,qe):n.texImage2D(t.TEXTURE_2D,pe,ft,We,It,qe);N.generateMipmaps=!1}else if(me){if(Ve){const pe=je(Re);n.texStorage2D(t.TEXTURE_2D,Ce,ft,pe.width,pe.height)}K&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,We,It,Re)}else n.texImage2D(t.TEXTURE_2D,0,ft,We,It,Re);A(N)&&g(Me),rt.__version=Ee.version,N.onUpdate&&N.onUpdate(N)}V.__version=N.version}function te(V,N,se){if(N.image.length!==6)return;const Me=ue(V,N),we=N.source;n.bindTexture(t.TEXTURE_CUBE_MAP,V.__webglTexture,t.TEXTURE0+se);const Ee=i.get(we);if(we.version!==Ee.__version||Me===!0){n.activeTexture(t.TEXTURE0+se);const rt=Xt.getPrimaries(Xt.workingColorSpace),Pe=N.colorSpace===io?null:Xt.getPrimaries(N.colorSpace),Ke=N.colorSpace===io||rt===Pe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,N.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,N.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ke);const xt=N.isCompressedTexture||N.image[0].isCompressedTexture,Re=N.image[0]&&N.image[0].isDataTexture,We=[];for(let ve=0;ve<6;ve++)!xt&&!Re?We[ve]=S(N.image[ve],!0,r.maxCubemapSize):We[ve]=Re?N.image[ve].image:N.image[ve],We[ve]=Oe(N,We[ve]);const It=We[0],ft=s.convert(N.format,N.colorSpace),qe=s.convert(N.type),Q=x(N.internalFormat,ft,qe,N.colorSpace),me=N.isVideoTexture!==!0,Ve=Ee.__version===void 0||Me===!0,K=we.dataReady;let Ce=M(N,It);$(t.TEXTURE_CUBE_MAP,N);let pe;if(xt){me&&Ve&&n.texStorage2D(t.TEXTURE_CUBE_MAP,Ce,Q,It.width,It.height);for(let ve=0;ve<6;ve++){pe=We[ve].mipmaps;for(let Fe=0;Fe<pe.length;Fe++){const dt=pe[Fe];N.format!==Ci?ft!==null?me?K&&n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe,0,0,dt.width,dt.height,ft,dt.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe,Q,dt.width,dt.height,0,dt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):me?K&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe,0,0,dt.width,dt.height,ft,qe,dt.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe,Q,dt.width,dt.height,0,ft,qe,dt.data)}}}else{if(pe=N.mipmaps,me&&Ve){pe.length>0&&Ce++;const ve=je(We[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Ce,Q,ve.width,ve.height)}for(let ve=0;ve<6;ve++)if(Re){me?K&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,0,0,We[ve].width,We[ve].height,ft,qe,We[ve].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,Q,We[ve].width,We[ve].height,0,ft,qe,We[ve].data);for(let Fe=0;Fe<pe.length;Fe++){const _t=pe[Fe].image[ve].image;me?K&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe+1,0,0,_t.width,_t.height,ft,qe,_t.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe+1,Q,_t.width,_t.height,0,ft,qe,_t.data)}}else{me?K&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,0,0,ft,qe,We[ve]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,0,Q,ft,qe,We[ve]);for(let Fe=0;Fe<pe.length;Fe++){const dt=pe[Fe];me?K&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe+1,0,0,ft,qe,dt.image[ve]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ve,Fe+1,Q,ft,qe,dt.image[ve])}}}A(N)&&g(t.TEXTURE_CUBE_MAP),Ee.__version=we.version,N.onUpdate&&N.onUpdate(N)}V.__version=N.version}function ce(V,N,se,Me,we,Ee){const rt=s.convert(se.format,se.colorSpace),Pe=s.convert(se.type),Ke=x(se.internalFormat,rt,Pe,se.colorSpace);if(!i.get(N).__hasExternalTextures){const Re=Math.max(1,N.width>>Ee),We=Math.max(1,N.height>>Ee);we===t.TEXTURE_3D||we===t.TEXTURE_2D_ARRAY?n.texImage3D(we,Ee,Ke,Re,We,N.depth,0,rt,Pe,null):n.texImage2D(we,Ee,Ke,Re,We,0,rt,Pe,null)}n.bindFramebuffer(t.FRAMEBUFFER,V),ge(N)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Me,we,i.get(se).__webglTexture,0,Ne(N)):(we===t.TEXTURE_2D||we>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&we<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,Me,we,i.get(se).__webglTexture,Ee),n.bindFramebuffer(t.FRAMEBUFFER,null)}function xe(V,N,se){if(t.bindRenderbuffer(t.RENDERBUFFER,V),N.depthBuffer){const Me=N.depthTexture,we=Me&&Me.isDepthTexture?Me.type:null,Ee=_(N.stencilBuffer,we),rt=N.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Pe=Ne(N);ge(N)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Pe,Ee,N.width,N.height):se?t.renderbufferStorageMultisample(t.RENDERBUFFER,Pe,Ee,N.width,N.height):t.renderbufferStorage(t.RENDERBUFFER,Ee,N.width,N.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,rt,t.RENDERBUFFER,V)}else{const Me=N.textures;for(let we=0;we<Me.length;we++){const Ee=Me[we],rt=s.convert(Ee.format,Ee.colorSpace),Pe=s.convert(Ee.type),Ke=x(Ee.internalFormat,rt,Pe,Ee.colorSpace),xt=Ne(N);se&&ge(N)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,xt,Ke,N.width,N.height):ge(N)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,xt,Ke,N.width,N.height):t.renderbufferStorage(t.RENDERBUFFER,Ke,N.width,N.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function _e(V,N){if(N&&N.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,V),!(N.depthTexture&&N.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(N.depthTexture).__webglTexture||N.depthTexture.image.width!==N.width||N.depthTexture.image.height!==N.height)&&(N.depthTexture.image.width=N.width,N.depthTexture.image.height=N.height,N.depthTexture.needsUpdate=!0),q(N.depthTexture,0);const Me=i.get(N.depthTexture).__webglTexture,we=Ne(N);if(N.depthTexture.format===Bl)ge(N)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Me,0,we):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Me,0);else if(N.depthTexture.format===Xl)ge(N)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Me,0,we):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Me,0);else throw new Error("Unknown depthTexture format")}function De(V){const N=i.get(V),se=V.isWebGLCubeRenderTarget===!0;if(V.depthTexture&&!N.__autoAllocateDepthBuffer){if(se)throw new Error("target.depthTexture not supported in Cube render targets");_e(N.__webglFramebuffer,V)}else if(se){N.__webglDepthbuffer=[];for(let Me=0;Me<6;Me++)n.bindFramebuffer(t.FRAMEBUFFER,N.__webglFramebuffer[Me]),N.__webglDepthbuffer[Me]=t.createRenderbuffer(),xe(N.__webglDepthbuffer[Me],V,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,N.__webglFramebuffer),N.__webglDepthbuffer=t.createRenderbuffer(),xe(N.__webglDepthbuffer,V,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function it(V,N,se){const Me=i.get(V);N!==void 0&&ce(Me.__webglFramebuffer,V,V.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),se!==void 0&&De(V)}function Ue(V){const N=V.texture,se=i.get(V),Me=i.get(N);V.addEventListener("dispose",C);const we=V.textures,Ee=V.isWebGLCubeRenderTarget===!0,rt=we.length>1;if(rt||(Me.__webglTexture===void 0&&(Me.__webglTexture=t.createTexture()),Me.__version=N.version,o.memory.textures++),Ee){se.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(N.mipmaps&&N.mipmaps.length>0){se.__webglFramebuffer[Pe]=[];for(let Ke=0;Ke<N.mipmaps.length;Ke++)se.__webglFramebuffer[Pe][Ke]=t.createFramebuffer()}else se.__webglFramebuffer[Pe]=t.createFramebuffer()}else{if(N.mipmaps&&N.mipmaps.length>0){se.__webglFramebuffer=[];for(let Pe=0;Pe<N.mipmaps.length;Pe++)se.__webglFramebuffer[Pe]=t.createFramebuffer()}else se.__webglFramebuffer=t.createFramebuffer();if(rt)for(let Pe=0,Ke=we.length;Pe<Ke;Pe++){const xt=i.get(we[Pe]);xt.__webglTexture===void 0&&(xt.__webglTexture=t.createTexture(),o.memory.textures++)}if(V.samples>0&&ge(V)===!1){se.__webglMultisampledFramebuffer=t.createFramebuffer(),se.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Pe=0;Pe<we.length;Pe++){const Ke=we[Pe];se.__webglColorRenderbuffer[Pe]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,se.__webglColorRenderbuffer[Pe]);const xt=s.convert(Ke.format,Ke.colorSpace),Re=s.convert(Ke.type),We=x(Ke.internalFormat,xt,Re,Ke.colorSpace,V.isXRRenderTarget===!0),It=Ne(V);t.renderbufferStorageMultisample(t.RENDERBUFFER,It,We,V.width,V.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Pe,t.RENDERBUFFER,se.__webglColorRenderbuffer[Pe])}t.bindRenderbuffer(t.RENDERBUFFER,null),V.depthBuffer&&(se.__webglDepthRenderbuffer=t.createRenderbuffer(),xe(se.__webglDepthRenderbuffer,V,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(Ee){n.bindTexture(t.TEXTURE_CUBE_MAP,Me.__webglTexture),$(t.TEXTURE_CUBE_MAP,N);for(let Pe=0;Pe<6;Pe++)if(N.mipmaps&&N.mipmaps.length>0)for(let Ke=0;Ke<N.mipmaps.length;Ke++)ce(se.__webglFramebuffer[Pe][Ke],V,N,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,Ke);else ce(se.__webglFramebuffer[Pe],V,N,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0);A(N)&&g(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(rt){for(let Pe=0,Ke=we.length;Pe<Ke;Pe++){const xt=we[Pe],Re=i.get(xt);n.bindTexture(t.TEXTURE_2D,Re.__webglTexture),$(t.TEXTURE_2D,xt),ce(se.__webglFramebuffer,V,xt,t.COLOR_ATTACHMENT0+Pe,t.TEXTURE_2D,0),A(xt)&&g(t.TEXTURE_2D)}n.unbindTexture()}else{let Pe=t.TEXTURE_2D;
vendor: 7,879 bytes, line 3883
3883if((V.isWebGL3DRenderTarget||V.isWebGLArrayRenderTarget)&&(Pe=V.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(Pe,Me.__webglTexture),$(Pe,N),N.mipmaps&&N.mipmaps.length>0)for(let Ke=0;Ke<N.mipmaps.length;Ke++)ce(se.__webglFramebuffer[Ke],V,N,t.COLOR_ATTACHMENT0,Pe,Ke);else ce(se.__webglFramebuffer,V,N,t.COLOR_ATTACHMENT0,Pe,0);A(N)&&g(Pe),n.unbindTexture()}V.depthBuffer&&De(V)}function Be(V){const N=V.textures;for(let se=0,Me=N.length;se<Me;se++){const we=N[se];if(A(we)){const Ee=V.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,rt=i.get(we).__webglTexture;n.bindTexture(Ee,rt),g(Ee),n.unbindTexture()}}}const U=[],ye=[];function Te(V){if(V.samples>0){if(ge(V)===!1){const N=V.textures,se=V.width,Me=V.height;let we=t.COLOR_BUFFER_BIT;const Ee=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,rt=i.get(V),Pe=N.length>1;if(Pe)for(let Ke=0;Ke<N.length;Ke++)n.bindFramebuffer(t.FRAMEBUFFER,rt.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Ke,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,rt.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+Ke,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,rt.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,rt.__webglFramebuffer);for(let Ke=0;Ke<N.length;Ke++){if(V.resolveDepthBuffer&&(V.depthBuffer&&(we|=t.DEPTH_BUFFER_BIT),V.stencilBuffer&&V.resolveStencilBuffer&&(we|=t.STENCIL_BUFFER_BIT)),Pe){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,rt.__webglColorRenderbuffer[Ke]);const xt=i.get(N[Ke]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,xt,0)}t.blitFramebuffer(0,0,se,Me,0,0,se,Me,we,t.NEAREST),l===!0&&(U.length=0,ye.length=0,U.push(t.COLOR_ATTACHMENT0+Ke),V.depthBuffer&&V.resolveDepthBuffer===!1&&(U.push(Ee),ye.push(Ee),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,ye)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,U))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),Pe)for(let Ke=0;Ke<N.length;Ke++){n.bindFramebuffer(t.FRAMEBUFFER,rt.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Ke,t.RENDERBUFFER,rt.__webglColorRenderbuffer[Ke]);const xt=i.get(N[Ke]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,rt.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+Ke,t.TEXTURE_2D,xt,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,rt.__webglMultisampledFramebuffer)}else if(V.depthBuffer&&V.resolveDepthBuffer===!1&&l){const N=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[N])}}}function Ne(V){return Math.min(r.maxSamples,V.samples)}function ge(V){const N=i.get(V);return V.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&N.__useRenderToTexture!==!1}function Ze(V){const N=o.render.frame;h.get(V)!==N&&(h.set(V,N),V.update())}function Oe(V,N){const se=V.colorSpace,Me=V.format,we=V.type;return V.isCompressedTexture===!0||V.isVideoTexture===!0||se!==bo&&se!==io&&(Xt.getTransfer(se)===rn?(Me!==Ci||we!==fs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),N}function je(V){return typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement?(c.width=V.naturalWidth||V.width,c.height=V.naturalHeight||V.height):typeof VideoFrame<"u"&&V instanceof VideoFrame?(c.width=V.displayWidth,c.height=V.displayHeight):(c.width=V.width,c.height=V.height),c}this.allocateTextureUnit=W,this.resetTextureUnits=L,this.setTexture2D=q,this.setTexture2DArray=j,this.setTexture3D=Z,this.setTextureCube=H,this.rebindTextures=it,this.setupRenderTarget=Ue,this.updateRenderTargetMipmap=Be,this.updateMultisampleRenderTarget=Te,this.setupDepthRenderbuffer=De,this.setupFrameBufferTexture=ce,this.useMultisampledRTT=ge}function uF(t,e){function n(i,r=io){let s;const o=Xt.getTransfer(r);if(i===fs)return t.UNSIGNED_BYTE;if(i===cy)return t.UNSIGNED_SHORT_4_4_4_4;if(i===uy)return t.UNSIGNED_SHORT_5_5_5_1;if(i===mM)return t.UNSIGNED_INT_5_9_9_9_REV;if(i===fM)return t.BYTE;if(i===pM)return t.SHORT;if(i===Ku)return t.UNSIGNED_SHORT;if(i===ly)return t.INT;if(i===Mo)return t.UNSIGNED_INT;if(i===Qi)return t.FLOAT;if(i===ud)return t.HALF_FLOAT;if(i===gM)return t.ALPHA;if(i===vM)return t.RGB;if(i===Ci)return t.RGBA;if(i===yM)return t.LUMINANCE;if(i===xM)return t.LUMINANCE_ALPHA;if(i===Bl)return t.DEPTH_COMPONENT;if(i===Xl)return t.DEPTH_STENCIL;if(i===dy)return t.RED;if(i===sp)return t.RED_INTEGER;if(i===_M)return t.RG;if(i===hy)return t.RG_INTEGER;if(i===fy)return t.RGBA_INTEGER;if(i===Vh||i===jh||i===Wh||i===Xh)if(o===rn)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Vh)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===jh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Wh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Xh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Vh)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===jh)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Wh)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Xh)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===X0||i===J0||i===K0||i===q0)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===X0)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===J0)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===K0)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===q0)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===Q0||i===Y0||i===Z0)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===Q0||i===Y0)return o===rn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===Z0)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===$0||i===ev||i===tv||i===nv||i===iv||i===rv||i===sv||i===ov||i===av||i===lv||i===cv||i===uv||i===dv||i===hv)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===$0)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===ev)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===tv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===nv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===iv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===rv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===sv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===ov)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===av)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===lv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===cv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===uv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===dv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===hv)return o===rn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Jh||i===fv||i===pv)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===Jh)return o===rn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===fv)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===pv)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===AM||i===mv||i===gv||i===vv)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===Jh)return s.COMPRESSED_RED_RGT
vendor: 11,642 bytes, lines 3883-3907
3883C1_EXT;if(i===mv)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===gv)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===vv)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Wl?t.UNSIGNED_INT_24_8:t[i]!==void 0?t[i]:null}return{convert:n}}class dF extends un{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class lo extends kt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const kJ={type:"move"};class c1{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new lo,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 lo,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new k,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new k),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new lo,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new k,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new k),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const S of e.hand.values()){const A=n.getJointPose(S,i),g=this._getHandJoint(c,S);A!==null&&(g.matrix.fromArray(A.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=A.radius),g.visible=A!==null}const h=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],p=h.position.distanceTo(f.position),m=.02,v=.005;c.inputState.pinching&&p>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&p<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,i),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=n.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),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(kJ)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new lo;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}const OJ=`
3884void main() {
3885
3886	gl_Position = vec4( position, 1.0 );
3887
3888}`,UJ=`
3889uniform sampler2DArray depthColor;
3890uniform float depthWidth;
3891uniform float depthHeight;
3892
3893void main() {
3894
3895	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
3896
3897	if ( coord.x >= 1.0 ) {
3898
3899		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
3900
3901	} else {
3902
3903		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
3904
3905	}
3906
3907}`;class zJ{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,i){if(this.texture===null){const r=new Zt,s=e.properties.get(r);s.__webglTexture=n.texture,(n.depthNear!=i.depthNear||n.depthFar!=i.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,i=new Wr({vertexShader:OJ,fragmentShader:UJ,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new bn(new dd(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class HJ extends Os{constructor(e,n){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,h=null,f=null,p=null,m=null,v=null;const S=new zJ,A=n.getContextAttributes();let g=null,x=null;const _=[],M=[],b=new he;let C=null;const P=new un;P.layers.enable(1),P.viewport=new Ut;const B=new un;B.layers.enable(2),B.viewport=new Ut;const R=[P,B],T=new dF;T.layers.enable(1),T.layers.enable(2);let L=null,W=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(te){let ce=_[te];return ce===void 0&&(ce=new c1,_[te]=ce),ce.getTargetRaySpace()},this.getControllerGrip=function(te){let ce=_[te];return ce===void 0&&(ce=new c1,_[te]=ce),ce.getGripSpace()},this.getHand=function(te){let ce=_[te];return ce===void 0&&(ce=new c1,_[te]=ce),ce.getHandSpace()};function Y(te){const ce=M.indexOf(te.inputSource);if(ce===-1)return;const xe=_[ce];xe!==void 0&&(xe.update(te.inputSource,te.frame,c||o),xe.dispatchEvent({type:te.type,data:te.inputSource}))}function q(){r.removeEventListener("select",Y),r.removeEventListener("selectstart",Y),r.removeEventListener("selectend",Y),r.removeEventListener("squeeze",Y),r.removeEventListener("squeezestart",Y),r.removeEventListener("squeezeend",Y),r.removeEventListener("end",q),r.removeEventListener("inputsourceschange",j);for(let te=0;te<_.length;te++){const ce=M[te];ce!==null&&(M[te]=null,_[te].disconnect(ce))}L=null,W=null,S.reset(),e.setRenderTarget(g),m=null,p=null,f=null,r=null,x=null,Ae.stop(),i.isPresenting=!1,e.setPixelRatio(C),e.setSize(b.width,b.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(te){s=te,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(te){a=te,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(te){c=te},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return f},this.getFrame=function(){return v},this.getSession=function(){return r},this.setSession=async function(te){if(r=te,r!==null){if(g=e.getRenderTarget(),r.addEventListener("select",Y),r.addEventListener("selectstart",Y),r.addEventListener("selectend",Y),r.addEventListener("squeeze",Y),r.addEventListener("squeezestart",Y),r.addEventListener("squeezeend",Y),r.addEventListener("end",q),r.addEventListener("inputsourceschange",j),A.xrCompatible!==!0&&await n.makeXRCompatible(),C=e.getPixelRatio(),e.getSize(b),r.renderState.layers===void 0){const ce={antialias:A.antialias,alpha:!0,depth:A.depth,stencil:A.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,n,ce),r.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),x=new ps(m.framebufferWidth,m.framebufferHeight,{format:Ci,type:fs,colorSpace:e.outputColorSpace,stencilBuffer:A.stencil})}else{let ce=null,xe=null,_e=null;A.depth&&(_e=A.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,ce=A.stencil?Xl:Bl,xe=A.stencil?Wl:Mo);const De={colorFormat:n.RGBA8,depthFormat:_e,scaleFactor:s};f=new XRWebGLBinding(r,n),p=f.createProjectionLayer(De),r.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),x=new ps(p.textureWidth,p.textureHeight,{format:Ci,type:fs,depthTexture:new DM(p.textureWidth,p.textureHeight,xe,void 0,void 0,void 0,void 0,void 0,void 0,ce),stencilBuffer:A.stencil,colorSpace:e.outputColorSpace,samples:A.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1})}x.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),Ae.setContext(r),Ae.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return S.getDepthTexture()};function j(te){for(let ce=0;ce<te.removed.length;ce++){const xe=te.removed[ce],_e=M.indexOf(xe);_e>=0&&(M[_e]=null,_[_e].disconnect(xe))}for(let ce=0;ce<te.added.length;ce++){const xe=te.added[ce];let _e=M.indexOf(xe);if(_e===-1){for(let it=0;it<_.length;it++)if(it>=M.length){M.push(xe),_e=it;break}else if(M[it]===null){M[it]=xe,_e=it;break}if(_e===-1)break}const De=_[_e];De&&De.connect(xe)}}const Z=new k,H=new k;function D(te,ce,xe){Z.setFromMatrixPosition(ce.matrixWorld),H.setFromMatrixPosition(xe.matrixWorld);const _e=Z.distanceTo(H),De=ce.projectionMatrix.elements,it=xe.projectionMatrix.elements,Ue=De[14]/(De[10]-1),Be=De[14]/(De[10]+1),U=(De[9]+1)/De[5],ye=(De[9]-1)/De[5],Te=(De[8]-1)/De[0],Ne=(it[8]+1)/it[0],ge=Ue*Te,Ze=Ue*Ne,Oe=_e/(-Te+Ne),je=Oe*-Te;ce.matrixWorld.decompose(te.position,te.quaternion,te.scale),te.translateX(je),te.translateZ(Oe),te.matrixWorld.compose(te.position,te.quaternion,te.scale),te.matrixWorldInverse.copy(te.matrixWorld).invert();const V=Ue+Oe,N=Be+Oe,se=ge-je,Me=Ze+(_e-je),we=U*Be/N*V,Ee=ye*Be/N*V;te.projectionMatrix.makePerspective(se,Me,we,Ee,V,N),te.projectionMatrixInverse.copy(te.projectionMatrix).invert()}function X(te,ce){ce===null?te.matrixWorld.copy(te.matrix):te.matrixWorld.multiplyMatrices(ce.matrixWorld,te.matrix),te.matrixWorldInverse.copy(te.matrixWorld).invert()}this.updateCamera=function(te){if(r===null)return;S.texture!==null&&(te.near=S.depthNear,te.far=S.depthFar),T.near=B.near=P.near=te.near,T.far=B.far=P.far=te.far,(L!==T.near||W!==T.far)&&(r.updateRenderState({depthNear:T.near,depthFar:T.far}),L=T.near,W=T.far,P.near=L,P.far=W,B.near=L,B.far=W,P.updateProjectionMatrix(),B.updateProjectionMatrix(),te.updateProjectionMatrix());const ce=te.parent,xe=T.cameras;X(T,ce);for(let _e=0;_e<xe.length;_e++)X(xe[_e],ce);xe.length===2?D(T,P,B):T.projectionMatrix.copy(P.projectionMatrix),J(te,T,ce)};function J(te,ce,xe){xe===null?te.matrix.copy(ce.matrixWorld):(te.matrix.copy(xe.matrixWorld),te.matrix.invert(),te.matrix.multiply(ce.matrixWorld)),te.matrix.decompose(te.position,te.quaternion,te.scale),te.updateMatrixWorld(!0),te.projectionMatrix.copy(ce.projectionMatrix),te.projectionMatrixInverse.copy(ce.projectionMatrixInverse),te.isPerspectiveCamera&&(te.fov=Yu*2*Math.atan(1/te.projectionMatrix.elements[5]),te.zoom=1)}this.getCamera=function(){return T},this.getFoveation=function(){if(!(p===null&&m===null))return l},this.setFoveation=function(te){l=te,p!==null&&(p.fixedFoveation=te),m!==null&&m.fixedFoveation!==void 0&&(m.fixedFoveation=te)},this.hasDepthSensing=function(){return S.texture!==null},this.getDepthSensingMesh=function(){return S.getMesh(T)};let $=null;function ue(te,ce){if(h=ce.getViewerPose(c||o),v=ce,h!==null){const xe=h.views;m!==null&&(e.setRenderTargetFramebuffer(x,m.framebuffer),e.setRenderTarget(x));let _e=!1;xe.length!==T.cameras.length&&(T.cameras.length=0,_e=!0);for(let it=0;
vendor: 12,987 bytes, line 3907
3907it<xe.length;it++){const Ue=xe[it];let Be=null;if(m!==null)Be=m.getViewport(Ue);else{const ye=f.getViewSubImage(p,Ue);Be=ye.viewport,it===0&&(e.setRenderTargetTextures(x,ye.colorTexture,p.ignoreDepthValues?void 0:ye.depthStencilTexture),e.setRenderTarget(x))}let U=R[it];U===void 0&&(U=new un,U.layers.enable(it),U.viewport=new Ut,R[it]=U),U.matrix.fromArray(Ue.transform.matrix),U.matrix.decompose(U.position,U.quaternion,U.scale),U.projectionMatrix.fromArray(Ue.projectionMatrix),U.projectionMatrixInverse.copy(U.projectionMatrix).invert(),U.viewport.set(Be.x,Be.y,Be.width,Be.height),it===0&&(T.matrix.copy(U.matrix),T.matrix.decompose(T.position,T.quaternion,T.scale)),_e===!0&&T.cameras.push(U)}const De=r.enabledFeatures;if(De&&De.includes("depth-sensing")){const it=f.getDepthInformation(xe[0]);it&&it.isValid&&it.texture&&S.init(e,it,r.renderState)}}for(let xe=0;xe<_.length;xe++){const _e=M[xe],De=_[xe];_e!==null&&De!==void 0&&De.update(_e,ce,c||o)}$&&$(te,ce),ce.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:ce}),v=null}const Ae=new sF;Ae.setAnimationLoop(ue),this.setAnimationLoop=function(te){$=te},this.dispose=function(){}}}const Ka=new er,GJ=new at;function VJ(t,e){function n(A,g){A.matrixAutoUpdate===!0&&A.updateMatrix(),g.value.copy(A.matrix)}function i(A,g){g.color.getRGB(A.fogColor.value,rF(t)),g.isFog?(A.fogNear.value=g.near,A.fogFar.value=g.far):g.isFogExp2&&(A.fogDensity.value=g.density)}function r(A,g,x,_,M){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(A,g):g.isMeshToonMaterial?(s(A,g),f(A,g)):g.isMeshPhongMaterial?(s(A,g),h(A,g)):g.isMeshStandardMaterial?(s(A,g),p(A,g),g.isMeshPhysicalMaterial&&m(A,g,M)):g.isMeshMatcapMaterial?(s(A,g),v(A,g)):g.isMeshDepthMaterial?s(A,g):g.isMeshDistanceMaterial?(s(A,g),S(A,g)):g.isMeshNormalMaterial?s(A,g):g.isLineBasicMaterial?(o(A,g),g.isLineDashedMaterial&&a(A,g)):g.isPointsMaterial?l(A,g,x,_):g.isSpriteMaterial?c(A,g):g.isShadowMaterial?(A.color.value.copy(g.color),A.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(A,g){A.opacity.value=g.opacity,g.color&&A.diffuse.value.copy(g.color),g.emissive&&A.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(A.map.value=g.map,n(g.map,A.mapTransform)),g.alphaMap&&(A.alphaMap.value=g.alphaMap,n(g.alphaMap,A.alphaMapTransform)),g.bumpMap&&(A.bumpMap.value=g.bumpMap,n(g.bumpMap,A.bumpMapTransform),A.bumpScale.value=g.bumpScale,g.side===Ui&&(A.bumpScale.value*=-1)),g.normalMap&&(A.normalMap.value=g.normalMap,n(g.normalMap,A.normalMapTransform),A.normalScale.value.copy(g.normalScale),g.side===Ui&&A.normalScale.value.negate()),g.displacementMap&&(A.displacementMap.value=g.displacementMap,n(g.displacementMap,A.displacementMapTransform),A.displacementScale.value=g.displacementScale,A.displacementBias.value=g.displacementBias),g.emissiveMap&&(A.emissiveMap.value=g.emissiveMap,n(g.emissiveMap,A.emissiveMapTransform)),g.specularMap&&(A.specularMap.value=g.specularMap,n(g.specularMap,A.specularMapTransform)),g.alphaTest>0&&(A.alphaTest.value=g.alphaTest);const x=e.get(g),_=x.envMap,M=x.envMapRotation;_&&(A.envMap.value=_,Ka.copy(M),Ka.x*=-1,Ka.y*=-1,Ka.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(Ka.y*=-1,Ka.z*=-1),A.envMapRotation.value.setFromMatrix4(GJ.makeRotationFromEuler(Ka)),A.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,A.reflectivity.value=g.reflectivity,A.ior.value=g.ior,A.refractionRatio.value=g.refractionRatio),g.lightMap&&(A.lightMap.value=g.lightMap,A.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,A.lightMapTransform)),g.aoMap&&(A.aoMap.value=g.aoMap,A.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,A.aoMapTransform))}function o(A,g){A.diffuse.value.copy(g.color),A.opacity.value=g.opacity,g.map&&(A.map.value=g.map,n(g.map,A.mapTransform))}function a(A,g){A.dashSize.value=g.dashSize,A.totalSize.value=g.dashSize+g.gapSize,A.scale.value=g.scale}function l(A,g,x,_){A.diffuse.value.copy(g.color),A.opacity.value=g.opacity,A.size.value=g.size*x,A.scale.value=_*.5,g.map&&(A.map.value=g.map,n(g.map,A.uvTransform)),g.alphaMap&&(A.alphaMap.value=g.alphaMap,n(g.alphaMap,A.alphaMapTransform)),g.alphaTest>0&&(A.alphaTest.value=g.alphaTest)}function c(A,g){A.diffuse.value.copy(g.color),A.opacity.value=g.opacity,A.rotation.value=g.rotation,g.map&&(A.map.value=g.map,n(g.map,A.mapTransform)),g.alphaMap&&(A.alphaMap.value=g.alphaMap,n(g.alphaMap,A.alphaMapTransform)),g.alphaTest>0&&(A.alphaTest.value=g.alphaTest)}function h(A,g){A.specular.value.copy(g.specular),A.shininess.value=Math.max(g.shininess,1e-4)}function f(A,g){g.gradientMap&&(A.gradientMap.value=g.gradientMap)}function p(A,g){A.metalness.value=g.metalness,g.metalnessMap&&(A.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,A.metalnessMapTransform)),A.roughness.value=g.roughness,g.roughnessMap&&(A.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,A.roughnessMapTransform)),g.envMap&&(A.envMapIntensity.value=g.envMapIntensity)}function m(A,g,x){A.ior.value=g.ior,g.sheen>0&&(A.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),A.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(A.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,A.sheenColorMapTransform)),g.sheenRoughnessMap&&(A.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,A.sheenRoughnessMapTransform))),g.clearcoat>0&&(A.clearcoat.value=g.clearcoat,A.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(A.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,A.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(A.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,A.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(A.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,A.clearcoatNormalMapTransform),A.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Ui&&A.clearcoatNormalScale.value.negate())),g.dispersion>0&&(A.dispersion.value=g.dispersion),g.iridescence>0&&(A.iridescence.value=g.iridescence,A.iridescenceIOR.value=g.iridescenceIOR,A.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],A.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(A.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,A.iridescenceMapTransform)),g.iridescenceThicknessMap&&(A.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,A.iridescenceThicknessMapTransform))),g.transmission>0&&(A.transmission.value=g.transmission,A.transmissionSamplerMap.value=x.texture,A.transmissionSamplerSize.value.set(x.width,x.height),g.transmissionMap&&(A.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,A.transmissionMapTransform)),A.thickness.value=g.thickness,g.thicknessMap&&(A.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,A.thicknessMapTransform)),A.attenuationDistance.value=g.attenuationDistance,A.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(A.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(A.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,A.anisotropyMapTransform))),A.specularIntensity.value=g.specularIntensity,A.specularColor.value.copy(g.specularColor),g.specularColorMap&&(A.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,A.specularColorMapTransform)),g.specularIntensityMap&&(A.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,A.specularIntensityMapTransform))}function v(A,g){g.matcap&&(A.matcap.value=g.matcap)}function S(A,g){const x=e.get(g).light;A.referencePosition.value.setFromMatrixPosition(x.matrixWorld),A.nearDistance.value=x.shadow.camera.near,A.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function jJ(t,e,n,i){let r={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(x,_){const M=_.program;i.uniformBlockBinding(x,M)}function c(x,_){let M=r[x.id];M===void 0&&(v(x),M=h(x),r[x.id]=M,x.addEventListener("dispose",A));const b=_.program;i.updateUBOMapping(x,b);const C=e.render.frame;s[x.id]!==C&&(p(x),s[x.id]=C)}function h(x){const _=f();x.__bindingPointIndex=_;const M=t.createBuffer(),b=x.__size,C=x.usage;return t.bindBuffer(t.UNIFORM_BUFFER,M),t.bufferData(t.UNIFORM_BUFFER,b,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,M),M}function f(){for(let x=0;x<a;x++)if(o.indexOf(x)===-1)return o.push(x),x;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(x){const _=r[x.id],M=x.uniforms,b=x.__cache;t.bindBuffer(t.UNIFORM_BUFFER,_);for(let C=0,P=M.length;C<P;C++){const B=Array.isArray(M[C])?M[C]:[M[C]];for(let R=0,T=B.length;R<T;R++){const L=B[R];if(m(L,C,R,b)===!0){const W=L.__offset,Y=Array.isArray(L.value)?L.value:[L.value];let q=0;for(let j=0;j<Y.length;j++){const Z=Y[j],H=S(Z);typeof Z=="number"||typeof Z=="boolean"?(L.__data[0]=Z,t.bufferSubData(t.UNIFORM_BUFFER,W+q,L.__data)):Z.isMatrix3?(L.__data[0]=Z.elements[0],L.__data[1]=Z.elements[1],L.__data[2]=Z.elements[2],L.__data[3]=0,L.__data[4]=Z.elements[3],L.__data[5]=Z.elements[4],L.__data[6]=Z.elements[5],L.__data[7]=0,L.__data[8]=Z.elements[6],L.__data[9]=Z.elements[7],L.__data[10]=Z.elements[8],L.__data[11]=0):(Z.toArray(L.__data,q),q+=H.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,W,L.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function m(x,_,M,b){const C=x.value,P=_+"_"+M;if(b[P]===void 0)return typeof C=="number"||typeof C=="boolean"?b[P]=C:b[P]=C.clone(),!0;{const B=b[P];if(typeof C=="number"||typeof C=="boolean"){if(B!==C)return b[P]=C,!0}else if(B.equals(C)===!1)return B.copy(C),!0}return!1}function v(x){const _=x.uniforms;let M=0;const b=16;for(let P=0,B=_.length;P<B;P++){const R=Array.isArray(_[P])?_[P]:[_[P]];for(let T=0,L=R.length;T<L;T++){const W=R[T],Y=Array.isArray(W.value)?W.value:[W.value];for(let q=0,j=Y.length;q<j;q++){const Z=Y[q],H=S(Z),D=M%b,X=D%H.boundary,J=D+X;M+=X,J!==0&&b-J<H.storage&&(M+=b-J),W.__data=new Float32Array(H.storage/Float32Array.BYTES_PER_ELEMENT),W.__offset=M,M+=H.storage}}}const C=M%b;return C>0&&(M+=b-C),x.__size=M,x.__cache={},this}function S(x){const _={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(_.boundary=4,_.storage=4):x.isVector2?(_.boundary=8,_.storage=8):x.isVector3||x.isColor?(_.boundary=16,_.storage=12):x.isVector4?(_.boundary=16,_.storage=16):x.isMatrix3?(_.boundary=48,_.storage=48):x.isMatrix4?(_.boundary=64,_.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),_}function A(x){const _=x.target;_.removeEventListener("dispose",A);const M=o.indexOf(_.__bindingPointIndex);o.splice(M,1),t.deleteBuffer(r[_.id]),delete r[_.id],delete s[_.id]}function g(){for(const x in r)t.deleteBuffer(r[x]);o=[],r={},s={}}return{bind:l,update:c,dispose:g}}class hF{constructor(e={}){const{canvas:n=eF(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let p;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=i.getContextAttributes().alpha}else p=o;const m=new Uint32Array(4),v=new Int32Array(4);let S=null,A=null;const g=[],x=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Dr,this.toneMapping=Ds,this.toneMappingExposure=1;const _=this;let M=!1,b=0,C=0,P=null,B=-1,R=null;const T=new Ut,L=new Ut;let W=null;const Y=new ze(0);let q=0,j=n.width,Z=n.height,H=1,D=null,X=null;const J=new Ut(0,0,j,Z),$=new Ut(0,0,j,Z);let ue=!1;const Ae=new cp;let te=!1,ce=!1;const xe=new at,_e=new k,De=new Ut,it={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ue=!1;function Be(){return P===null?H:1}let U=i;function ye(O,ne){return n.getContext(O,ne)}try{const O={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${ld}`),n.addEventListener("webglcontextlost",pe,!1),n.addEventListener("webglcontextrestored",ve,!1),n.addEventListener("webglcontextcreationerror",Fe,!1),U===null){const ne="webgl2";if(U=ye(ne,O),U===null)throw ye(ne)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(O){throw console.error("THREE.WebGLRenderer: "+O.message),O}let Te,Ne,ge,Ze,Oe,je,V,N,se,Me,we,Ee,rt,Pe,Ke,xt,Re,We,It,ft,qe,Q,me,Ve;
vendor: 4,698 bytes, line 3907
3907function K(){Te=new Y7(U),Te.init(),Q=new uF(U,Te),Ne=new W7(U,Te,e,Q),ge=new PJ(U),Ze=new eX(U),Oe=new yJ,je=new FJ(U,Te,ge,Oe,Ne,Q,Ze),V=new J7(_),N=new Q7(_),se=new aj(U),me=new V7(U,se),Me=new Z7(U,se,Ze,me),we=new nX(U,Me,se,Ze),It=new tX(U,Ne,je),xt=new X7(Oe),Ee=new vJ(_,V,N,Te,Ne,me,xt),rt=new VJ(_,Oe),Pe=new _J,Ke=new CJ(Te),We=new G7(_,V,N,ge,we,p,l),Re=new RJ(_,we,Ne),Ve=new jJ(U,Ze,Ne,ge),ft=new j7(U,Te,Ze),qe=new $7(U,Te,Ze),Ze.programs=Ee.programs,_.capabilities=Ne,_.extensions=Te,_.properties=Oe,_.renderLists=Pe,_.shadowMap=Re,_.state=ge,_.info=Ze}K();const Ce=new HJ(_,U);this.xr=Ce,this.getContext=function(){return U},this.getContextAttributes=function(){return U.getContextAttributes()},this.forceContextLoss=function(){const O=Te.get("WEBGL_lose_context");O&&O.loseContext()},this.forceContextRestore=function(){const O=Te.get("WEBGL_lose_context");O&&O.restoreContext()},this.getPixelRatio=function(){return H},this.setPixelRatio=function(O){O!==void 0&&(H=O,this.setSize(j,Z,!1))},this.getSize=function(O){return O.set(j,Z)},this.setSize=function(O,ne,ae=!0){if(Ce.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}j=O,Z=ne,n.width=Math.floor(O*H),n.height=Math.floor(ne*H),ae===!0&&(n.style.width=O+"px",n.style.height=ne+"px"),this.setViewport(0,0,O,ne)},this.getDrawingBufferSize=function(O){return O.set(j*H,Z*H).floor()},this.setDrawingBufferSize=function(O,ne,ae){j=O,Z=ne,H=ae,n.width=Math.floor(O*ae),n.height=Math.floor(ne*ae),this.setViewport(0,0,O,ne)},this.getCurrentViewport=function(O){return O.copy(T)},this.getViewport=function(O){return O.copy(J)},this.setViewport=function(O,ne,ae,le){O.isVector4?J.set(O.x,O.y,O.z,O.w):J.set(O,ne,ae,le),ge.viewport(T.copy(J).multiplyScalar(H).round())},this.getScissor=function(O){return O.copy($)},this.setScissor=function(O,ne,ae,le){O.isVector4?$.set(O.x,O.y,O.z,O.w):$.set(O,ne,ae,le),ge.scissor(L.copy($).multiplyScalar(H).round())},this.getScissorTest=function(){return ue},this.setScissorTest=function(O){ge.setScissorTest(ue=O)},this.setOpaqueSort=function(O){D=O},this.setTransparentSort=function(O){X=O},this.getClearColor=function(O){return O.copy(We.getClearColor())},this.setClearColor=function(){We.setClearColor.apply(We,arguments)},this.getClearAlpha=function(){return We.getClearAlpha()},this.setClearAlpha=function(){We.setClearAlpha.apply(We,arguments)},this.clear=function(O=!0,ne=!0,ae=!0){let le=0;if(O){let re=!1;if(P!==null){const Le=P.texture.format;re=Le===fy||Le===hy||Le===sp}if(re){const Le=P.texture.type,Je=Le===fs||Le===Mo||Le===Ku||Le===Wl||Le===cy||Le===uy,tt=We.getClearColor(),$e=We.getClearAlpha(),ut=tt.r,pt=tt.g,ct=tt.b;Je?(m[0]=ut,m[1]=pt,m[2]=ct,m[3]=$e,U.clearBufferuiv(U.COLOR,0,m)):(v[0]=ut,v[1]=pt,v[2]=ct,v[3]=$e,U.clearBufferiv(U.COLOR,0,v))}else le|=U.COLOR_BUFFER_BIT}ne&&(le|=U.DEPTH_BUFFER_BIT),ae&&(le|=U.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),U.clear(le)},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(){n.removeEventListener("webglcontextlost",pe,!1),n.removeEventListener("webglcontextrestored",ve,!1),n.removeEventListener("webglcontextcreationerror",Fe,!1),Pe.dispose(),Ke.dispose(),Oe.dispose(),V.dispose(),N.dispose(),we.dispose(),me.dispose(),Ve.dispose(),Ee.dispose(),Ce.dispose(),Ce.removeEventListener("sessionstart",qn),Ce.removeEventListener("sessionend",wp),Us.stop()};function pe(O){O.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;const O=Ze.autoReset,ne=Re.enabled,ae=Re.autoUpdate,le=Re.needsUpdate,re=Re.type;K(),Ze.autoReset=O,Re.enabled=ne,Re.autoUpdate=ae,Re.needsUpdate=le,Re.type=re}function Fe(O){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",O.statusMessage)}function dt(O){const ne=O.target;ne.removeEventListener("dispose",dt),_t(ne)}function _t(O){zt(O),Oe.remove(O)}function zt(O){const ne=Oe.get(O).programs;ne!==void 0&&(ne.forEach(function(ae){Ee.releaseProgram(ae)}),O.isShaderMaterial&&Ee.releaseShaderCache(O))}this.renderBufferDirect=function(O,ne,ae,le,re,Le){ne===null&&(ne=it);const Je=re.isMesh&&re.matrixWorld.determinant()<0,tt=Wy(O,ne,ae,le,re);ge.setMaterial(le,Je);let $e=ae.index,ut=1;if(le.wireframe===!0){if($e=Me.getWireframeAttribute(ae),$e===void 0)return;ut=2}const pt=ae.drawRange,ct=ae.attributes.position;let Gt=pt.start*ut,$t=(pt.start+pt.count)*ut;Le!==null&&(Gt=Math.max(Gt,Le.start*ut),$t=Math.min($t,(Le.start+Le.count)*ut)),$e!==null?(Gt=Math.max(Gt,0),$t=M
vendor: 10,141 bytes, line 3907
3907ath.min($t,$e.count)):ct!=null&&(Gt=Math.max(Gt,0),$t=Math.min($t,ct.count));const Kt=$t-Gt;if(Kt<0||Kt===1/0)return;me.setup(re,le,tt,ae,$e);let An,lt=ft;if($e!==null&&(An=se.get($e),lt=qe,lt.setIndex(An)),re.isMesh)le.wireframe===!0?(ge.setLineWidth(le.wireframeLinewidth*Be()),lt.setMode(U.LINES)):lt.setMode(U.TRIANGLES);else if(re.isLine){let ke=le.linewidth;ke===void 0&&(ke=1),ge.setLineWidth(ke*Be()),re.isLineSegments?lt.setMode(U.LINES):re.isLineLoop?lt.setMode(U.LINE_LOOP):lt.setMode(U.LINE_STRIP)}else re.isPoints?lt.setMode(U.POINTS):re.isSprite&&lt.setMode(U.TRIANGLES);if(re.isBatchedMesh)if(re._multiDrawInstances!==null)lt.renderMultiDrawInstances(re._multiDrawStarts,re._multiDrawCounts,re._multiDrawCount,re._multiDrawInstances);else if(Te.get("WEBGL_multi_draw"))lt.renderMultiDraw(re._multiDrawStarts,re._multiDrawCounts,re._multiDrawCount);else{const ke=re._multiDrawStarts,en=re._multiDrawCounts,vt=re._multiDrawCount,tn=$e?se.get($e).bytesPerElement:1,Gi=Oe.get(le).currentProgram.getUniforms();for(let Ln=0;Ln<vt;Ln++)Gi.setValue(U,"_gl_DrawID",Ln),lt.render(ke[Ln]/tn,en[Ln])}else if(re.isInstancedMesh)lt.renderInstances(Gt,Kt,re.count);else if(ae.isInstancedBufferGeometry){const ke=ae._maxInstanceCount!==void 0?ae._maxInstanceCount:1/0,en=Math.min(ae.instanceCount,ke);lt.renderInstances(Gt,Kt,en)}else lt.render(Gt,Kt)};function an(O,ne,ae){O.transparent===!0&&O.side===Or&&O.forceSinglePass===!1?(O.side=Ui,O.needsUpdate=!0,dc(O,ne,ae),O.side=ks,O.needsUpdate=!0,dc(O,ne,ae),O.side=Or):dc(O,ne,ae)}this.compile=function(O,ne,ae=null){ae===null&&(ae=O),A=Ke.get(ae),A.init(ne),x.push(A),ae.traverseVisible(function(re){re.isLight&&re.layers.test(ne.layers)&&(A.pushLight(re),re.castShadow&&A.pushShadow(re))}),O!==ae&&O.traverseVisible(function(re){re.isLight&&re.layers.test(ne.layers)&&(A.pushLight(re),re.castShadow&&A.pushShadow(re))}),A.setupLights();const le=new Set;return O.traverse(function(re){const Le=re.material;if(Le)if(Array.isArray(Le))for(let Je=0;Je<Le.length;Je++){const tt=Le[Je];an(tt,ae,re),le.add(tt)}else an(Le,ae,re),le.add(Le)}),x.pop(),A=null,le},this.compileAsync=function(O,ne,ae=null){const le=this.compile(O,ne,ae);return new Promise(re=>{function Le(){if(le.forEach(function(Je){Oe.get(Je).currentProgram.isReady()&&le.delete(Je)}),le.size===0){re(O);return}setTimeout(Le,10)}Te.get("KHR_parallel_shader_compile")!==null?Le():setTimeout(Le,10)})};let Rt=null;function Kn(O){Rt&&Rt(O)}function qn(){Us.stop()}function wp(){Us.start()}const Us=new sF;Us.setAnimationLoop(Kn),typeof self<"u"&&Us.setContext(self),this.setAnimationLoop=function(O){Rt=O,Ce.setAnimationLoop(O),O===null?Us.stop():Us.start()},Ce.addEventListener("sessionstart",qn),Ce.addEventListener("sessionend",wp),this.render=function(O,ne){if(ne!==void 0&&ne.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(M===!0)return;if(O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),ne.parent===null&&ne.matrixWorldAutoUpdate===!0&&ne.updateMatrixWorld(),Ce.enabled===!0&&Ce.isPresenting===!0&&(Ce.cameraAutoUpdate===!0&&Ce.updateCamera(ne),ne=Ce.getCamera()),O.isScene===!0&&O.onBeforeRender(_,O,ne,P),A=Ke.get(O,x.length),A.init(ne),x.push(A),xe.multiplyMatrices(ne.projectionMatrix,ne.matrixWorldInverse),Ae.setFromProjectionMatrix(xe),ce=this.localClippingEnabled,te=xt.init(this.clippingPlanes,ce),S=Pe.get(O,g.length),S.init(),g.push(S),Ce.enabled===!0&&Ce.isPresenting===!0){const Le=_.xr.getDepthSensingMesh();Le!==null&&xd(Le,ne,-1/0,_.sortObjects)}xd(O,ne,0,_.sortObjects),S.finish(),_.sortObjects===!0&&S.sort(D,X),Ue=Ce.enabled===!1||Ce.isPresenting===!1||Ce.hasDepthSensing()===!1,Ue&&We.addToRenderList(S,O),this.info.render.frame++,te===!0&&xt.beginShadows();const ae=A.state.shadowsArray;Re.render(ae,O,ne),te===!0&&xt.endShadows(),this.info.autoReset===!0&&this.info.reset();const le=S.opaque,re=S.transmissive;if(A.setupLights(),ne.isArrayCamera){const Le=ne.cameras;if(re.length>0)for(let Je=0,tt=Le.length;Je<tt;Je++){const $e=Le[Je];cc(le,re,O,$e)}Ue&&We.render(O);for(let Je=0,tt=Le.length;Je<tt;Je++){const $e=Le[Je];_d(S,O,$e,$e.viewport)}}else re.length>0&&cc(le,re,O,ne),Ue&&We.render(O),_d(S,O,ne);P!==null&&(je.updateMultisampleRenderTarget(P),je.updateRenderTargetMipmap(P)),O.isScene===!0&&O.onAfterRender(_,O,ne),me.resetDefaultState(),B=-1,R=null,x.pop(),x.length>0?(A=x[x.length-1],te===!0&&xt.setGlobalState(_.clippingPlanes,A.state.camera)):A=null,g.pop(),g.length>0?S=g[g.length-1]:S=null};function xd(O,ne,ae,le){if(O.visible===!1)return;if(O.layers.test(ne.layers)){if(O.isGroup)ae=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(ne);else if(O.isLight)A.pushLight(O),O.castShadow&&A.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||Ae.intersectsSprite(O)){le&&De.setFromMatrixPosition(O.matrixWorld).applyMatrix4(xe);const Je=we.update(O),tt=O.material;tt.visible&&S.push(O,Je,tt,ae,De.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(!O.frustumCulled||Ae.intersectsObject(O))){const Je=we.update(O),tt=O.material;if(le&&(O.boundingSphere!==void 0?(O.boundingSphere===null&&O.computeBoundingSphere(),De.copy(O.boundingSphere.center)):(Je.boundingSphere===null&&Je.computeBoundingSphere(),De.copy(Je.boundingSphere.center)),De.applyMatrix4(O.matrixWorld).applyMatrix4(xe)),Array.isArray(tt)){const $e=Je.groups;for(let ut=0,pt=$e.length;ut<pt;ut++){const ct=$e[ut],Gt=tt[ct.materialIndex];Gt&&Gt.visible&&S.push(O,Je,Gt,ae,De.z,ct)}}else tt.visible&&S.push(O,Je,tt,ae,De.z,null)}}const Le=O.children;for(let Je=0,tt=Le.length;Je<tt;Je++)xd(Le[Je],ne,ae,le)}function _d(O,ne,ae,le){const re=O.opaque,Le=O.transmissive,Je=O.transparent;A.setupLightsView(ae),te===!0&&xt.setGlobalState(_.clippingPlanes,ae),le&&ge.viewport(T.copy(le)),re.length>0&&uc(re,ne,ae),Le.length>0&&uc(Le,ne,ae),Je.length>0&&uc(Je,ne,ae),ge.buffers.depth.setTest(!0),ge.buffers.depth.setMask(!0),ge.buffers.color.setMask(!0),ge.setPolygonOffset(!1)}function cc(O,ne,ae,le){if((ae.isScene===!0?ae.overrideMaterial:null)!==null)return;A.state.transmissionRenderTarget[le.id]===void 0&&(A.state.transmissionRenderTarget[le.id]=new ps(1,1,{generateMipmaps:!0,type:Te.has("EXT_color_buffer_half_float")||Te.has("EXT_color_buffer_float")?ud:fs,minFilter:zr,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Xt.workingColorSpace}));const Le=A.state.transmissionRenderTarget[le.id],Je=le.viewport||T;Le.setSize(Je.z,Je.w);const tt=_.getRenderTarget();_.setRenderTarget(Le),_.getClearColor(Y),q=_.getClearAlpha(),q<1&&_.setClearColor(16777215,.5),_.clear(),Ue&&We.render(ae);const $e=_.toneMapping;_.toneMapping=Ds;const ut=le.viewport;if(le.viewport!==void 0&&(le.viewport=void 0),A.setupLightsView(le),te===!0&&xt.setGlobalState(_.clippingPlanes,le),uc(O,ae,le),je.updateMultisampleRenderTarget(Le),je.updateRenderTargetMipmap(Le),Te.has("WEBGL_multisampled_render_to_texture")===!1){let pt=!1;for(let ct=0,Gt=ne.length;ct<Gt;ct++){const $t=ne[ct],Kt=$t.object,An=$t.geometry,lt=$t.material,ke=$t.group;if(lt.side===Or&&Kt.layers.test(le.layers)){const en=lt.side;lt.side=Ui,lt.needsUpdate=!0,Ro(Kt,ae,le,An,lt,ke),lt.side=en,lt.needsUpdate=!0,pt=!0}}pt===!0&&(je.updateMultisampleRenderTarget(Le),je.updateRenderTargetMipmap(Le))}_.setRenderTarget(tt),_.setClearColor(Y,q),ut!==void 0&&(le.viewport=ut),_.toneMapping=$e}function uc(O,ne,ae){const le=ne.isScene===!0?ne.overrideMaterial:null;for(let re=0,Le=O.length;re<Le;re++){const Je=O[re],tt=Je.object,$e=Je.geometry,ut=le===null?Je.material:le,pt=Je.group;tt.layers.test(ae.layers)&&Ro(tt,ne,ae,$e,ut,pt)}}function Ro(O,ne,ae,le,re,Le){O.onBeforeRender(_,ne,ae,le,re,Le),O.modelViewMatrix.multiplyMatrices(ae.matrixWorldInverse,O.matrixWorld),O.normalMatrix.getNormalMatrix(O.modelViewMatrix),re.transparent===!0&&re.side===Or&&re.forceSinglePass===!1?(re.side=Ui,re.needsUpdate=!0,_.renderBufferDirect(ae,ne,le,re,O,Le),re.side=ks,re.needsUpdate=!0,_.renderBufferDirect(ae,ne,le,re,O,Le),re.side=Or):_.renderBufferDirect(ae,ne,le,re,O,Le),O.onAfterRender(_,ne,ae,le,re,Le)}function dc(O,ne,ae){ne.isScene!==!0&&(ne=it);const le=Oe.get(O),re=A.state.lights,Le=A.state.shadowsArray,Je=re.state.version,tt=Ee.getParameters(O,re.state,Le,ne,ae),$e=Ee.getProgramCacheKey(tt);let ut=le.programs;le.environment=O.isMeshStandardMaterial?ne.environment:null,le.fog=ne.fog,le.envMap=(O.isMeshStandardMaterial?N:V).get(O.envMap||le.environment),le.envMapRotation=le.environment!==null&&O.envMap===null?ne.environmentRotation:O.envMapRotation,ut===void 0&&(O.addEventListener("dispose",dt),ut=new Map,le.programs=ut);let pt=ut.get($e);if(pt!==void 0){if(le.currentProgram===pt&&le.lightsStateVersion===Je)return Ep(O,tt),pt}else tt.uniforms=Ee.getUniforms(O),O.onBeforeCompile(tt,_),pt=Ee.acquireProgram(tt,$e),ut.set($e,pt),le.uniforms=tt.uniforms;const ct=le.uniforms;return(!O.isShaderMaterial&&!O.isRawShaderMaterial||O.clipping===!0)&&(ct.clippingPlanes=xt.uniform),Ep(O,tt),le.needsLights=Jy(O),le.lightsStateVersion=Je,le.needsLights&&(ct.ambientLightColor.value=re.state.ambient,ct.lightProbe.value=re.state.probe,ct.directionalLights.value=re.state.directional,ct.directionalLightShadows.value=re.state.directionalShadow,ct.spotLights.value=re.state.spot,ct.spotLightShadows.value=re.state.spotShadow,ct.rectAreaLights.value=re.state.rectArea,ct.ltc_1.value=re.state.rectAreaLTC1,ct.ltc_2.value=re.state.rectAreaLTC2,ct.pointLights.value=re.state.point,ct.pointLightShadows.value=re.state.pointShadow,ct.hemisphereLights.value=re.state.hemi,ct.directionalShadowMap.value=re.state.directionalShadowMap,ct.directionalShadowMatrix.value=re.state.directionalShadowMatrix,ct.spotShadowMap.value=re.state.spotShadowMap,ct.spotLightMatrix.value=re.state.spotLightMatrix,ct.spotLightMap.value=re.state.spotLightMap,ct.pointShadowMap.value=re.state.pointShadowMap,ct.pointShadowMatrix.value=re.state.pointShadowMatrix),le.currentProgram=pt,le.uniformsList=null,pt}function Mp(O){if(O.uniformsList===null){const ne=O.currentProgram.getUniforms();O.uniformsList=r0.seqWithValue(ne.seq,O.uniforms)}return O.uniformsList}function Ep(O,ne){const ae=Oe.get(O);
vendor: 6,697 bytes, line 3907
3907ae.outputColorSpace=ne.outputColorSpace,ae.batching=ne.batching,ae.batchingColor=ne.batchingColor,ae.instancing=ne.instancing,ae.instancingColor=ne.instancingColor,ae.instancingMorph=ne.instancingMorph,ae.skinning=ne.skinning,ae.morphTargets=ne.morphTargets,ae.morphNormals=ne.morphNormals,ae.morphColors=ne.morphColors,ae.morphTargetsCount=ne.morphTargetsCount,ae.numClippingPlanes=ne.numClippingPlanes,ae.numIntersection=ne.numClipIntersection,ae.vertexAlphas=ne.vertexAlphas,ae.vertexTangents=ne.vertexTangents,ae.toneMapping=ne.toneMapping}function Wy(O,ne,ae,le,re){ne.isScene!==!0&&(ne=it),je.resetTextureUnits();const Le=ne.fog,Je=le.isMeshStandardMaterial?ne.environment:null,tt=P===null?_.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:bo,$e=(le.isMeshStandardMaterial?N:V).get(le.envMap||Je),ut=le.vertexColors===!0&&!!ae.attributes.color&&ae.attributes.color.itemSize===4,pt=!!ae.attributes.tangent&&(!!le.normalMap||le.anisotropy>0),ct=!!ae.morphAttributes.position,Gt=!!ae.morphAttributes.normal,$t=!!ae.morphAttributes.color;let Kt=Ds;le.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Kt=_.toneMapping);const An=ae.morphAttributes.position||ae.morphAttributes.normal||ae.morphAttributes.color,lt=An!==void 0?An.length:0,ke=Oe.get(le),en=A.state.lights;if(te===!0&&(ce===!0||O!==R)){const ri=O===R&&le.id===B;xt.setState(le,O,ri)}let vt=!1;le.version===ke.__version?(ke.needsLights&&ke.lightsStateVersion!==en.state.version||ke.outputColorSpace!==tt||re.isBatchedMesh&&ke.batching===!1||!re.isBatchedMesh&&ke.batching===!0||re.isBatchedMesh&&ke.batchingColor===!0&&re.colorTexture===null||re.isBatchedMesh&&ke.batchingColor===!1&&re.colorTexture!==null||re.isInstancedMesh&&ke.instancing===!1||!re.isInstancedMesh&&ke.instancing===!0||re.isSkinnedMesh&&ke.skinning===!1||!re.isSkinnedMesh&&ke.skinning===!0||re.isInstancedMesh&&ke.instancingColor===!0&&re.instanceColor===null||re.isInstancedMesh&&ke.instancingColor===!1&&re.instanceColor!==null||re.isInstancedMesh&&ke.instancingMorph===!0&&re.morphTexture===null||re.isInstancedMesh&&ke.instancingMorph===!1&&re.morphTexture!==null||ke.envMap!==$e||le.fog===!0&&ke.fog!==Le||ke.numClippingPlanes!==void 0&&(ke.numClippingPlanes!==xt.numPlanes||ke.numIntersection!==xt.numIntersection)||ke.vertexAlphas!==ut||ke.vertexTangents!==pt||ke.morphTargets!==ct||ke.morphNormals!==Gt||ke.morphColors!==$t||ke.toneMapping!==Kt||ke.morphTargetsCount!==lt)&&(vt=!0):(vt=!0,ke.__version=le.version);let tn=ke.currentProgram;vt===!0&&(tn=dc(le,ne,re));let Gi=!1,Ln=!1,Qn=!1;const ln=tn.getUniforms(),Jr=ke.uniforms;if(ge.useProgram(tn.program)&&(Gi=!0,Ln=!0,Qn=!0),le.id!==B&&(B=le.id,Ln=!0),Gi||R!==O){ln.setValue(U,"projectionMatrix",O.projectionMatrix),ln.setValue(U,"viewMatrix",O.matrixWorldInverse);const ri=ln.map.cameraPosition;ri!==void 0&&ri.setValue(U,_e.setFromMatrixPosition(O.matrixWorld)),Ne.logarithmicDepthBuffer&&ln.setValue(U,"logDepthBufFC",2/(Math.log(O.far+1)/Math.LN2)),(le.isMeshPhongMaterial||le.isMeshToonMaterial||le.isMeshLambertMaterial||le.isMeshBasicMaterial||le.isMeshStandardMaterial||le.isShaderMaterial)&&ln.setValue(U,"isOrthographic",O.isOrthographicCamera===!0),R!==O&&(R=O,Ln=!0,Qn=!0)}if(re.isSkinnedMesh){ln.setOptional(U,re,"bindMatrix"),ln.setOptional(U,re,"bindMatrixInverse");const ri=re.skeleton;ri&&(ri.boneTexture===null&&ri.computeBoneTexture(),ln.setValue(U,"boneTexture",ri.boneTexture,je))}re.isBatchedMesh&&(ln.setOptional(U,re,"batchingTexture"),ln.setValue(U,"batchingTexture",re._matricesTexture,je),ln.setOptional(U,re,"batchingIdTexture"),ln.setValue(U,"batchingIdTexture",re._indirectTexture,je),ln.setOptional(U,re,"batchingColorTexture"),re._colorsTexture!==null&&ln.setValue(U,"batchingColorTexture",re._colorsTexture,je));const hc=ae.morphAttributes;if((hc.position!==void 0||hc.normal!==void 0||hc.color!==void 0)&&It.update(re,ae,tn),(Ln||ke.receiveShadow!==re.receiveShadow)&&(ke.receiveShadow=re.receiveShadow,ln.setValue(U,"receiveShadow",re.receiveShadow)),le.isMeshGouraudMaterial&&le.envMap!==null&&(Jr.envMap.value=$e,Jr.flipEnvMap.value=$e.isCubeTexture&&$e.isRenderTargetTexture===!1?-1:1),le.isMeshStandardMaterial&&le.envMap===null&&ne.environment!==null&&(Jr.envMapIntensity.value=ne.environmentIntensity),Ln&&(ln.setValue(U,"toneMappingExposure",_.toneMappingExposure),ke.needsLights&&Xy(Jr,Qn),Le&&le.fog===!0&&rt.refreshFogUniforms(Jr,Le),rt.refreshMaterialUniforms(Jr,le,H,Z,A.state.transmissionRenderTarget[O.id]),r0.upload(U,Mp(ke),Jr,je)),le.isShaderMaterial&&le.uniformsNeedUpdate===!0&&(r0.upload(U,Mp(ke),Jr,je),le.uniformsNeedUpdate=!1),le.isSpriteMaterial&&ln.setValue(U,"center",re.center),ln.setValue(U,"modelViewMatrix",re.modelViewMatrix),ln.setValue(U,"normalMatrix",re.normalMatrix),ln.setValue(U,"modelMatrix",re.matrixWorld),le.isShaderMaterial||le.isRawShaderMaterial){const ri=le.uniformsGroups;for(let fc=0,tr=ri.length;fc<tr;fc++){const Cp=ri[fc];Ve.update(Cp,tn),Ve.bind(Cp,tn)}}return tn}function Xy(O,ne){O.ambientLightColor.needsUpdate=ne,O.lightProbe.needsUpdate=ne,O.directionalLights.needsUpdate=ne,O.directionalLightShadows.needsUpdate=ne,O.pointLights.needsUpdate=ne,O.pointLightShadows.needsUpdate=ne,O.spotLights.needsUpdate=ne,O.spotLightShadows.needsUpdate=ne,O.rectAreaLights.needsUpdate=ne,O.hemisphereLights.needsUpdate=ne}function Jy(O){return O.isMeshLambertMaterial||O.isMeshToonMaterial||O.isMeshPhongMaterial||O.isMeshStandardMaterial||O.isShadowMaterial||O.isShaderMaterial&&O.lights===!0}this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(O,ne,ae){Oe.get(O.texture).__webglTexture=ne,Oe.get(O.depthTexture).__webglTexture=ae;const le=Oe.get(O);le.__hasExternalTextures=!0,le.__autoAllocateDepthBuffer=ae===void 0,le.__autoAllocateDepthBuffer||Te.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),le.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(O,ne){const ae=Oe.get(O);ae.__webglFramebuffer=ne,ae.__useDefaultFramebuffer=ne===void 0},this.setRenderTarget=function(O,ne=0,ae=0){P=O,b=ne,C=ae;let le=!0,re=null,Le=!1,Je=!1;if(O){const $e=Oe.get(O);$e.__useDefaultFramebuffer!==void 0?(ge.bindFramebuffer(U.FRAMEBUFFER,null),le=!1):$e.__webglFramebuffer===void 0?je.setupRenderTarget(O):$e.__hasExternalTextures&&je.rebindTextures(O,Oe.get(O.texture).__webglTexture,Oe.get(O.depthTexture).__webglTexture);const ut=O.texture;(ut.isData3DTexture||ut.isDataArrayTexture||ut.isCompressedArrayTexture)&&(Je=!0);const pt=Oe.get(O).__webglFramebuffer;
vendor: 2,608 bytes, line 3907
3907O.isWebGLCubeRenderTarget?(Array.isArray(pt[ne])?re=pt[ne][ae]:re=pt[ne],Le=!0):O.samples>0&&je.useMultisampledRTT(O)===!1?re=Oe.get(O).__webglMultisampledFramebuffer:Array.isArray(pt)?re=pt[ae]:re=pt,T.copy(O.viewport),L.copy(O.scissor),W=O.scissorTest}else T.copy(J).multiplyScalar(H).floor(),L.copy($).multiplyScalar(H).floor(),W=ue;if(ge.bindFramebuffer(U.FRAMEBUFFER,re)&&le&&ge.drawBuffers(O,re),ge.viewport(T),ge.scissor(L),ge.setScissorTest(W),Le){const $e=Oe.get(O.texture);U.framebufferTexture2D(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,U.TEXTURE_CUBE_MAP_POSITIVE_X+ne,$e.__webglTexture,ae)}else if(Je){const $e=Oe.get(O.texture),ut=ne||0;U.framebufferTextureLayer(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,$e.__webglTexture,ae||0,ut)}B=-1},this.readRenderTargetPixels=function(O,ne,ae,le,re,Le,Je){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let tt=Oe.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&Je!==void 0&&(tt=tt[Je]),tt){ge.bindFramebuffer(U.FRAMEBUFFER,tt);try{const $e=O.texture,ut=$e.format,pt=$e.type;if(!Ne.textureFormatReadable(ut)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ne.textureTypeReadable(pt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ne>=0&&ne<=O.width-le&&ae>=0&&ae<=O.height-re&&U.readPixels(ne,ae,le,re,Q.convert(ut),Q.convert(pt),Le)}finally{const $e=P!==null?Oe.get(P).__webglFramebuffer:null;ge.bindFramebuffer(U.FRAMEBUFFER,$e)}}},this.readRenderTargetPixelsAsync=async function(O,ne,ae,le,re,Le,Je){if(!(O&&O.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let tt=Oe.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&Je!==void 0&&(tt=tt[Je]),tt){ge.bindFramebuffer(U.FRAMEBUFFER,tt);try{const $e=O.texture,ut=$e.format,pt=$e.type;if(!Ne.textureFormatReadable(ut))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Ne.textureTypeReadable(pt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ne>=0&&ne<=O.width-le&&ae>=0&&ae<=O.height-re){const ct=U.createBuffer();U.bindBuffer(U.PIXEL_PACK_BUFFER,ct),U.bufferData(U.PIXEL_PACK_BUFFER,Le.byteLength,U.STREAM_READ),U.readPixels(ne,ae,le,re,Q.convert(ut),Q.convert(pt),
39070),U.flush();const Gt=U.fenceSync(U.SYNC_GPU_COMMANDS_COMPLETE,0);await B6(U,Gt,4);try{U.bindBuffer(U.PIXEL_PACK_BUFFER,ct),U.getBufferSubData(U.PIXEL_PACK_BUFFER,0,Le)}finally{U.deleteBuffer(ct),U.deleteSync(Gt)}return Le}}finally{const $e=P!==null?Oe.get(P).__webglFramebuffer:null;ge.bindFramebuffer(U.FRAMEBUFFER,$e)}}},this.copyFramebufferToTexture=function(O,ne=null,ae=0){O.isTexture!==!0&&(Bu("WebGLRenderer: copyFramebufferToTexture function signature has changed."),ne=arguments[0]||null,O=arguments[1]);const le=Math.pow(2,-ae),re=Math.floor(O.image.width*le),Le=Math.floor(O.image.height*le),Je=ne!==null?ne.x:0,tt=ne!==null?ne.y:0;je.setTexture2D(O,0),U.copyTexSubImage2D(U.TEXTURE_2D,ae,0,0,Je,tt,re,Le),ge.unbindTexture()},this.copyTextureToTexture=function(O,ne,ae=null,le=null,re=0){O.isTexture!==!0&&(Bu("WebGLRenderer: copyTextureToTexture function signature has changed."),le=arguments[0]||null,O=arguments[1],ne=arguments[2],re=arguments[3]||0,ae=null);let Le,Je,tt,$e,ut,pt;ae!==null?(Le=ae.max.x-ae.min.x,Je=ae.max.y-ae.min.y,tt=ae.min.x,$e=ae.min.y):(Le=O.image.width,Je=O.image.height,tt=0,$e=0),le!==null?(ut=le.x,pt=le.y):(ut=0,pt=0);const ct=Q.convert(ne.format),Gt=Q.convert(ne.type);je.setTexture2D(ne,0),U.pixelStorei(U.UNPACK_FLIP_Y_WEBGL,ne.flipY),U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne.premultiplyAlpha),U.pixelStorei(U.UNPACK_ALIGNMENT,ne.unpackAlignment);const $t=U.getParameter(U.UNPACK_ROW_LENGTH),Kt=U.getParameter(U.UNPACK_IMAGE_HEIGHT),An=U.getParameter(U.UNPACK_SKIP_PIXELS),lt=U.getParameter(U.UNPACK_SKIP_ROWS),ke=U.getParameter(U.UNPACK_SKIP_IMAGES),en=O.isCompressedTexture?O.mipmaps[re]:O.image;U.pixelStorei(U.UNPACK_ROW_LENGTH,en.width),U.pixelStorei(U.UNPACK_IMAGE_HEIGHT,en.height),U.pixelStorei(U.UNPACK_SKIP_PIXELS,tt),U.pixelStorei(U.UNPACK_SKIP_ROWS,$e),O.isDataTexture?U.texSubImage2D(U.TEXTURE_2D,re,ut,pt,Le,Je,ct,Gt,en.data):O.isCompressedTexture?U.compressedTexSubImage2D(U.TEXTURE_2D,re,ut,pt,en.width,en.height,ct,en.data):U.texSubImage2D(U.TEXTURE_2D,re,ut,pt,Le,Je,ct,Gt,en),U.pixelStorei(U.UNPACK_ROW_LENGTH,$t),U.pixelStorei(U.UNPACK_IMAGE_HEIGHT,Kt),U.pixelStorei(U.UNPACK_SKIP_PIXELS,An),U.pixelStorei(U.UNPACK_SKIP_ROWS,lt),U.pixelStorei(U.UNPACK_SKIP_IMAGES,ke),re===0&&ne.generateMipmaps&&U.generateMipmap(U.TEXTURE_2D),ge.unbindTexture()},this.copyTextureToTexture3D=function(O,ne,ae=null,le=null,re=0){O.isTexture!==!0&&(Bu("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ae=arguments[0]||null,le=arguments[1]||null,O=arguments[2],ne=arguments[3],re=arguments[4]||0);let Le,Je,tt,$e,ut,pt,ct,Gt,$t;const Kt=O.isCompressedTexture?O.mipmaps[re]:O.image;ae!==null?(Le=ae.max.x-ae.min.x,Je=ae.max.y-ae.min.y,tt=ae.max.z-ae.min.z,$e=ae.min.x,ut=ae.min.y,pt=ae.min.z):(Le=Kt.width,Je=Kt.height,tt=Kt.depth,$e=0,ut=0,pt=0),le!==null?(ct=le.x,Gt=le.y,$t=le.z):(ct=0,Gt=0,$t=0);const An=Q.convert(ne.format),lt=Q.convert(ne.type);let ke;if(ne.isData3DTexture)je.setTexture3D(ne,0),ke=U.TEXTURE_3D;else if(ne.isDataArrayTexture||ne.isCompressedArrayTexture)je.setTexture2DArray(ne,0),ke=U.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}U.pixelStorei(U.UNPACK_FLIP_Y_WEBGL,ne.flipY),U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne.premultiplyAlpha),U.pixelStorei(U.UNPACK_ALIGNMENT,ne.unpackAlignment);const en=U.getParameter(U.UNPACK_ROW_LENGTH),vt=U.getParameter(U.UNPACK_IMAGE_HEIGHT),tn=U.getParameter(U.UNPACK_SKIP_PIXELS),Gi=U.getParameter(U.UNPACK_SKIP_ROWS),Ln=U.getParameter(U.UNPACK_SKIP_IMAGES);U.pixelStorei(U.UNPACK_ROW_LENGTH,Kt.width),U.pixelStorei(U.UNPACK_IMAGE_HEIGHT,Kt.height),U.pixelStorei(U.UNPACK_SKIP_PIXELS,$e),U.pixelStorei(U.UNPACK_SKIP_ROWS,ut),U.pixelStorei(U.UNPACK_SKIP_IMAGES,pt),O.isDataTexture||O.isData3DTexture?U.texSubImage3D(ke,re,ct,Gt,$t,Le,Je,tt,An,lt,Kt.data):ne.isCompressedArrayTexture?U.compressedTexSubImage3D(ke,re,ct,Gt,$t,Le,Je,tt,An,Kt.data):U.texSubImage3D(ke,re,ct,Gt,$t,Le,Je,tt,An,lt,Kt),U.pixelStorei(U.UNPACK_ROW_LENGTH,en),U.pixelStorei(U.UNPACK_IMAGE_HEIGHT,vt),U.pixelStorei(U.UNPACK_SKIP_PIXELS,tn),U.pixelStorei(U.UNPACK_SKIP_ROWS,Gi),U.pixelStorei(U.UNPACK_SKIP_IMAGES,Ln),re===0&&ne.generateMipmaps&&U.generateMipmap(ke),ge.unbindTexture()},this.initRenderTarget=function(O){Oe.get(O).__webglFramebuffer===void 0&&je.setupRenderTarget(O)},this.initTexture=function(O){O.isCubeTexture?je.setTextureCube(O,0):O.isData3DTexture?je.setTexture3D(O,0):O.isDataArrayTexture||O.isCompressedArrayTexture?je.setTexture2DArray(O,0):je.setTexture2D(O,0),ge.unbindTexture()},this.resetState=function(){b=0,C=0,P=null,ge.reset(),me.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ps}get outputColorSpace(){return this._outputColorSpace}
vendor: 21,973 bytes, line 3907
3907set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===my?"display-p3":"srgb",n.unpackColorSpace=Xt.workingColorSpace===op?"display-p3":"srgb"}}class yy{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new ze(e),this.density=n}clone(){return new yy(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class xy{constructor(e,n=1,i=1e3){this.isFog=!0,this.name="",this.color=new ze(e),this.near=n,this.far=i}clone(){return new xy(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class xv extends kt{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 er,this.environmentIntensity=1,this.environmentRotation=new er,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),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 n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class up{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Bf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=mr()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Bu("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}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,n,i){e*=this.stride,i*=n.stride;for(let r=0,s=this.stride;r<s;r++)this.array[e+r]=n.array[i+r];return this}set(e,n=0){return this.array.set(e,n),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=mr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const n=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(n,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=mr()),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 Li=new k;class Sa{constructor(e,n,i,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=n,this.offset=i,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 n=0,i=this.data.count;n<i;n++)Li.fromBufferAttribute(this,n),Li.applyMatrix4(e),this.setXYZ(n,Li.x,Li.y,Li.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)Li.fromBufferAttribute(this,n),Li.applyNormalMatrix(e),this.setXYZ(n,Li.x,Li.y,Li.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)Li.fromBufferAttribute(this,n),Li.transformDirection(e),this.setXYZ(n,Li.x,Li.y,Li.z);return this}getComponent(e,n){let i=this.array[e*this.data.stride+this.offset+n];return this.normalized&&(i=Fi(i,this.array)),i}setComponent(e,n,i){return this.normalized&&(i=Ct(i,this.array)),this.data.array[e*this.data.stride+this.offset+n]=i,this}setX(e,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[e*this.data.stride+this.offset]=n,this}setY(e,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[e*this.data.stride+this.offset+1]=n,this}setZ(e,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[e*this.data.stride+this.offset+2]=n,this}setW(e,n){return this.normalized&&(n=Ct(n,this.array)),this.data.array[e*this.data.stride+this.offset+3]=n,this}getX(e){let n=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(n=Fi(n,this.array)),n}getY(e){let n=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(n=Fi(n,this.array)),n}getZ(e){let n=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(n=Fi(n,this.array)),n}getW(e){let n=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(n=Fi(n,this.array)),n}setXY(e,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this}setXYZ(e,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this.data.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(n=Ct(n,this.array),i=Ct(i,this.array),r=Ct(r,this.array),s=Ct(s,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this.data.array[e+2]=r,this.data.array[e+3]=s,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)n.push(this.data.array[r+s])}return new Nt(new this.array.constructor(n),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 Sa(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)n.push(this.data.array[r+s])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:n,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 kM extends zn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new ze(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 jc;const eh=new k,Wc=new k,Xc=new k,Jc=new he,th=new he,fF=new at,ag=new k,nh=new k,lg=new k,SR=new he,u1=new he,wR=new he;class pF extends kt{constructor(e=new kM){if(super(),this.isSprite=!0,this.type="Sprite",jc===void 0){jc=new St;const n=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new up(n,5);jc.setIndex([0,1,2,0,2,3]),jc.setAttribute("position",new Sa(i,3,0,!1)),jc.setAttribute("uv",new Sa(i,2,3,!1))}this.geometry=jc,this.material=e,this.center=new he(.5,.5)}raycast(e,n){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Wc.setFromMatrixScale(this.matrixWorld),fF.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Xc.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Wc.multiplyScalar(-Xc.z);const i=this.material.rotation;let r,s;i!==0&&(s=Math.cos(i),r=Math.sin(i));const o=this.center;cg(ag.set(-.5,-.5,0),Xc,o,Wc,r,s),cg(nh.set(.5,-.5,0),Xc,o,Wc,r,s),cg(lg.set(.5,.5,0),Xc,o,Wc,r,s),SR.set(0,0),u1.set(1,0),wR.set(1,1);let a=e.ray.intersectTriangle(ag,nh,lg,!1,eh);if(a===null&&(cg(nh.set(-.5,.5,0),Xc,o,Wc,r,s),u1.set(0,1),a=e.ray.intersectTriangle(ag,lg,nh,!1,eh),a===null))return;const l=e.ray.origin.distanceTo(eh);l<e.near||l>e.far||n.push({distance:l,point:eh.clone(),uv:Ki.getInterpolation(eh,ag,nh,lg,SR,u1,wR,new he),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function cg(t,e,n,i,r,s){Jc.subVectors(t,n).addScalar(.5).multiply(i),r!==void 0?(th.x=s*Jc.x-r*Jc.y,th.y=r*Jc.x+s*Jc.y):th.copy(Jc),t.copy(e),t.x+=th.x,t.y+=th.y,t.applyMatrix4(fF)}const ug=new k,MR=new k;class mF extends kt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let i=0,r=n.length;i<r;i++){const s=n[i];this.addLevel(s.object.clone(),s.distance,s.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,n=0,i=0){n=Math.abs(n);const r=this.levels;let s;for(s=0;s<r.length&&!(n<r[s].distance);s++);return r.splice(s,0,{distance:n,hysteresis:i,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const n=this.levels;if(n.length>0){let i,r;for(i=1,r=n.length;i<r;i++){let s=n[i].distance;if(n[i].object.visible&&(s-=s*n[i].hysteresis),e<s)break}return n[i-1].object}return null}raycast(e,n){if(this.levels.length>0){ug.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(ug);this.getObjectForDistance(r).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){ug.setFromMatrixPosition(e.matrixWorld),MR.setFromMatrixPosition(this.matrixWorld);const i=ug.distanceTo(MR)/e.zoom;n[0].object.visible=!0;let r,s;for(r=1,s=n.length;r<s;r++){let o=n[r].distance;if(n[r].object.visible&&(o-=o*n[r].hysteresis),i>=o)n[r-1].object.visible=!1,n[r].object.visible=!0;else break}for(this._currentLevel=r-1;r<s;r++)n[r].object.visible=!1}}toJSON(e){const n=super.toJSON(e);this.autoUpdate===!1&&(n.object.autoUpdate=!1),n.object.levels=[];const i=this.levels;for(let r=0,s=i.length;r<s;r++){const o=i[r];n.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return n}}const ER=new k,CR=new Ut,TR=new Ut,WJ=new k,bR=new at,dg=new k,d1=new di,RR=new at,h1=new rc;class OM extends bn{constructor(e,n){super(e,n),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=uS,this.bindMatrix=new at,this.bindMatrixInverse=new at,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new ui),this.boundingBox.makeEmpty();const n=e.getAttribute("position");for(let i=0;i<n.count;i++)this.getVertexPosition(i,dg),this.boundingBox.expandByPoint(dg)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new di),this.boundingSphere.makeEmpty();const n=e.getAttribute("position");for(let i=0;i<n.count;i++)this.getVertexPosition(i,dg),this.boundingSphere.expandByPoint(dg)}copy(e,n){return super.copy(e,n),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,n){const i=this.material,r=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),d1.copy(this.boundingSphere),d1.applyMatrix4(r),e.ray.intersectsSphere(d1)!==!1&&(RR.copy(r).invert(),h1.copy(e.ray).applyMatrix4(RR),!(this.boundingBox!==null&&h1.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,n,h1)))}getVertexPosition(e,n){return super.getVertexPosition(e,n),this.applyBoneTransform(e,n),n}bind(e,n){this.skeleton=e,n===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),n=this.matrixWorld),this.bindMatrix.copy(n),this.bindMatrixInverse.copy(n).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Ut,n=this.geometry.attributes.skinWeight;for(let i=0,r=n.count;i<r;i++){e.fromBufferAttribute(n,i);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),n.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===uS?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===ON?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,n){const i=this.skeleton,r=this.geometry;CR.fromBufferAttribute(r.attributes.skinIndex,e),TR.fromBufferAttribute(r.attributes.skinWeight,e),ER.copy(n).applyMatrix4(this.bindMatrix),n.set(0,0,0);for(let s=0;s<4;s++){const o=TR.getComponent(s);if(o!==0){const a=CR.getComponent(s);bR.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),n.addScaledVector(WJ.copy(ER).applyMatrix4(bR),o)}}return n.applyMatrix4(this.bindMatrixInverse)}}class _y extends kt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Ns extends Zt{constructor(e=null,n=1,i=1,r,s,o,a,l,c=jn,h=jn,f,p){super(null,o,a,l,c,h,r,s,f,p),this.isDataTexture=!0,this.image={data:e,width:n,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const PR=new at,XJ=new at;class dp{constructor(e=[],n=[]){this.uuid=mr(),this.bones=e.slice(0),this.boneInverses=n,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,n=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),n.length===0)this.calculateInverses();else if(e.length!==n.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new at)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,n=this.bones.length;e<n;e++){const i=new at;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,n=this.bones.length;e<n;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,n=this.bones.length;e<n;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,n=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const a=e[s]?e[s].matrixWorld:XJ;PR.multiplyMatrices(a,n[s]),PR.toArray(i,s*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new dp(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 n=new Float32Array(e*e*4);n.set(this.boneMatrices);const i=new Ns(n,e,e,Ci,Qi);return i.needsUpdate=!0,this.boneMatrices=n,this.boneTexture=i,this}getBoneByName(e){for(let n=0,i=this.bones.length;n<i;n++){const r=this.bones[n];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,n){this.uuid=e.uuid;for(let i=0,r=e.bones.length;i<r;i++){const s=e.bones[i];let o=n[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new _y),this.bones.push(o),this.boneInverses.push(new at().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const n=this.bones,i=this.boneInverses;for(let r=0,s=n.length;r<s;r++){const o=n[r];e.bones.push(o.uuid);const a=i[r];e.boneInverses.push(a.toArray())}return e}}class Jl extends Nt{constructor(e,n,i,r=1){super(e,n,i),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 Kc=new at,IR=new at,hg=[],BR=new ui,JJ=new at,ih=new bn,rh=new di;class UM extends bn{constructor(e,n,i){super(e,n),this.isInstancedMesh=!0,this.instanceMatrix=new Jl(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<i;r++)this.setMatrixAt(r,JJ)}computeBoundingBox(){const e=this.geometry,n=this.count;this.boundingBox===null&&(this.boundingBox=new ui),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<n;i++)this.getMatrixAt(i,Kc),BR.copy(e.boundingBox).applyMatrix4(Kc),this.boundingBox.union(BR)}computeBoundingSphere(){const e=this.geometry,n=this.count;this.boundingSphere===null&&(this.boundingSphere=new di),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<n;i++)this.getMatrixAt(i,Kc),rh.copy(e.boundingSphere).applyMatrix4(Kc),this.boundingSphere.union(rh)}copy(e,n){return super.copy(e,n),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,n){n.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,n){n.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,n){const i=n.morphTargetInfluences,r=this.morphTexture.source.data.data,s=i.length+1,o=e*s+1;for(let a=0;a<i.length;a++)i[a]=r[o+a]}raycast(e,n){const i=this.matrixWorld,r=this.count;if(ih.geometry=this.geometry,ih.material=this.material,ih.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),rh.copy(this.boundingSphere),rh.applyMatrix4(i),e.ray.intersectsSphere(rh)!==!1))for(let s=0;s<r;s++){this.getMatrixAt(s,Kc),IR.multiplyMatrices(i,Kc),ih.matrixWorld=IR,ih.raycast(e,hg);for(let o=0,a=hg.length;o<a;o++){const l=hg[o];l.instanceId=s,l.object=this,n.push(l)}hg.length=0}}setColorAt(e,n){this.instanceColor===null&&(this.instanceColor=new Jl(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),n.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,n){n.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,n){const i=n.morphTargetInfluences,r=i.length+1;this.morphTexture===null&&(this.morphTexture=new Ns(new Float32Array(r*this.count),r,this.count,dy,Qi));const s=this.morphTexture.source.data.data;let o=0;for(let c=0;c<i.length;c++)o+=i[c];const a=this.geometry.morphTargetsRelative?1:1-o,l=r*e;s[l]=a,s.set(i,l+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}function KJ(t,e){return t.z-e.z}function qJ(t,e){return e.z-t.z}class QJ{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,n,i){const r=this.pool,s=this.list;this.index>=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const o=r[this.index];s.push(o),this.index++,o.start=e.start,o.count=e.count,o.z=n,o.index=i}reset(){this.list.length=0,this.index=0}}const Wo=new at,f1=new at,YJ=new at,ZJ=new ze(1,1,1),LR=new at,p1=new cp,fg=new ui,qa=new di,sh=new k,DR=new k,$J=new k,m1=new QJ,Ai=new bn,pg=[];function eK(t,e,n=0){const i=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const r=t.count;for(let s=0;s<r;s++)for(let o=0;o<i;o++)e.setComponent(s+n,o,t.getComponent(s,o))}else e.array.set(t.array,n*i);e.needsUpdate=!0}class gF extends bn{get maxInstanceCount(){return this._maxInstanceCount}constructor(e,n,i=n*2,r){super(new St,r),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._drawInfo=[],this._drawRanges=[],this._reservedRanges=[],this._bounds=[],this._maxInstanceCount=e,this._maxVertexCount=n,this._maxIndexCount=i,this._geometryInitialized=!1,this._geometryCount=0,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._visibilityChanged=!0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const n=new Float32Array(e*e*4),i=new Ns(n,e,e,Ci,Qi);this._matricesTexture=i}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const n=new Uint32Array(e*e),i=new Ns(n,e,e,sp,Mo);this._indirectTexture=i}_initColorsTexture(){let e=Math.sqrt(this._maxIndexCount);e=Math.ceil(e);const n=new Float32Array(e*e*4).fill(1),i=new Ns(n,e,e,Ci,Qi);
3907i.colorSpace=Xt.workingColorSpace,this._colorsTexture=i}_initializeGeometry(e){const n=this.geometry,i=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,h=new a.constructor(i*l),f=new Nt(h,l,c);n.setAttribute(s,f)}if(e.getIndex()!==null){const s=i>65535?new Uint32Array(r):new Uint16Array(r);n.setIndex(new Nt(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const i in n.attributes){if(!e.hasAttribute(i))throw new Error(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const r=e.getAttribute(i),s=n.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ui);const e=this._geometryCount,n=this.boundingBox,i=this._drawInfo;n.makeEmpty();for(let r=0;r<e;r++){if(i[r].active===!1)continue;const s=i[r].geometryIndex;this.getMatrixAt(r,Wo),this.getBoundingBoxAt(s,fg).applyMatrix4(Wo),n.union(fg)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new di);const e=this.boundingSphere,n=this._drawInfo;e.makeEmpty();for(let i=0,r=n.length;i<r;i++){if(n[i].active===!1)continue;const s=n[i].geometryIndex;this.getMatrixAt(i,Wo),this.getBoundingSphereAt(s,qa).applyMatrix4(Wo),e.union(qa)}}addInstance(e){if(this._drawInfo.length>=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");this._drawInfo.push({visible:!0,active:!0,geometryIndex:e});const n=this._drawInfo.length-1,i=this._matricesTexture,r=i.image.data;YJ.toArray(r,n*16),i.needsUpdate=!0;const s=this._colorsTexture;return s&&(ZJ.toArray(s.image.data,n*4),s.needsUpdate=!0),n}addGeometry(e,n=-1,i=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._drawInfo.length>=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,l=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),n===-1?r.vertexCount=e.getAttribute("position").count:r.vertexCount=n,s===null?r.vertexStart=0:r.vertexStart=s.vertexStart+s.vertexCount;const c=e.getIndex(),h=c!==null;if(h&&(i===-1?r.indexCount=c.count:r.indexCount=i,s===null?r.indexStart=0:r.indexStart=s.indexStart+s.indexCount),r.indexStart!==-1&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const f=this._geometryCount;return this._geometryCount++,o.push(r),a.push({start:h?r.indexStart:r.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new ui,sphereInitialized:!1,sphere:new di}),this.setGeometryAt(f,e),f}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const i=this.geometry,r=i.getIndex()!==null,s=i.getIndex(),o=n.getIndex(),a=this._reservedRanges[e];if(r&&o.count>a.indexCount||n.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.vertexCount;for(const m in i.attributes){const v=n.getAttribute(m),S=i.getAttribute(m);eK(v,S,l);const A=v.itemSize;for(let g=v.count,x=c;g<x;g++){const _=l+g;for(let M=0;M<A;M++)S.setComponent(_,M,0)}S.needsUpdate=!0,S.addUpdateRange(l*A,c*A)}if(r){const m=a.indexStart;for(let v=0;v<o.count;v++)s.setX(m+v,l+o.getX(v));for(let v=o.count,S=a.indexCount;v<S;v++)s.setX(m+v,l);s.needsUpdate=!0,s.addUpdateRange(m,a.indexCount)}const h=this._bounds[e];n.boundingBox!==null?(h.box.copy(n.boundingBox),h.boxInitialized=!0):h.boxInitialized=!1,n.boundingSphere!==null?(h.sphere.copy(n.boundingSphere),h.sphereInitialized=!0):h.sphereInitialized=!1;const f=this._drawRanges[e],p=n.getAttribute("position");return f.count=r?o.count:p.count,this._visibilityChanged=!0,e}getBoundingBoxAt(e,n){if(e>=this._geometryCount)return null;const i=this._bounds[e],r=i.box,s=this.geometry;if(i.boxInitialized===!1){r.makeEmpty();const o=s.index,a=s.attributes.position,l=this._drawRanges[e];for(let c=l.start,h=l.start+l.count;c<h;c++){let f=c;o&&(f=o.getX(f)),r.expandByPoint(sh.fromBufferAttribute(a,f))}i.boxInitialized=!0}return n.copy(r),n}getBoundingSphereAt(e,n){if(e>=this._geometryCount)return null;const i=this._bounds[e],r=i.sphere,s=this.geometry;if(i.sphereInitialized===!1){r.makeEmpty(),this.getBoundingBoxAt(e,fg),fg.getCenter(r.center);const o=s.index,a=s.attributes.position,l=this._drawRanges[e];let c=0;for(let h=l.start,f=l.start+l.count;h<f;h++){let p=h;o&&(p=o.getX(p)),sh.fromBufferAttribute(a,p),c=Math.max(c,r.center.distanceToSquared(sh))}r.radius=Math.sqrt(c),i.sphereInitialized=!0}return n.copy(r),n}setMatrixAt(e,n){const i=this._drawInfo,r=this._matricesTexture,s=this._matricesTexture.image.data;return e>=i.length||i[e].active===!1?this:(n.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,n){const i=this._drawInfo,r=this._matricesTexture.image.data;return e>=i.length||i[e].active===!1?null:n.fromArray(r,e*16)}setColorAt(e,n){this._colorsTexture===null&&this._initColorsTexture();const i=this._colorsTexture,r=this._colorsTexture.image.data,s=this._drawInfo;return e>=s.length||s[e].active===!1?this:(n.toArray(r,e*4),i.needsUpdate=!0,this)}getColorAt(e,n){const i=this._colorsTexture.image.data,r=this._drawInfo;return e>=r.length||r[e].active===!1?null:n.fromArray(i,e*4)}setVisibleAt(e,n){const i=this._drawInfo;return e>=i.length||i[e].active===!1||i[e].visible===n?this:(i[e].visible=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._drawInfo;return e>=n.length||n[e].active===!1?!1:n[e].visible}raycast(e,n){const i=this._drawInfo,r=this._drawRanges,s=this.matrixWorld,o=this.geometry;Ai.material=this.material,Ai.geometry.index=o.index,Ai.geometry.attributes=o.attributes,Ai.geometry.boundingBox===null&&(Ai.geometry.boundingBox=new ui),Ai.geometry.boundingSphere===null&&(Ai.geometry.boundingSphere=new di);for(let a=0,l=i.length;a<l;a++){if(!i[a].visible||!i[a].active)continue;const c=i[a].geometryIndex,h=r[c];Ai.geometry.setDrawRange(h.start,h.count),this.getMatrixAt(a,Ai.matrixWorld).premultiply(s),this.getBoundingBoxAt(c,Ai.geometry.boundingBox),this.getBoundingSphereAt(c,Ai.geometry.boundingSphere),Ai.raycast(e,pg);for(let f=0,p=pg.length;f<p;f++){const m=pg[f];m.object=this,m.batchId=a,n.push(m)}pg.length=0}Ai.material=null,Ai.geometry.index=null,Ai.geometry.attributes={},Ai.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._drawRanges=e._drawRanges.map(n=>({...n})),this._reservedRanges=e._reservedRanges.map(n=>({...n})),this._drawInfo=e._drawInfo.map(n=>({...n})),this._bounds=e._bounds.map(n=>({boxInitialized:n.boxInitialized,box:n.box.clone(),sphereInitialized:n.sphereInitialized,sphere:n.sphere.clone()})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,i,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._drawInfo,c=this._multiDrawStarts,h=this._multiDrawCounts,f=this._drawRanges,p=this.perObjectFrustumCulled,m=this._indirectTexture,v=m.image.data;p&&(LR.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),p1.setFromProjectionMatrix(LR,e.coordinateSystem));let S=0;if(this.sortObjects){f1.copy(this.matrixWorld).invert(),sh.setFromMatrixPosition(i.matrixWorld).applyMatrix4(f1),DR.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(f1);for(let x=0,_=l.length;x<_;x++)if(l[x].visible&&l[x].active){const M=l[x].geometryIndex;
3907this.getMatrixAt(x,Wo),this.getBoundingSphereAt(M,qa).applyMatrix4(Wo);let b=!1;if(p&&(b=!p1.intersectsSphere(qa)),!b){const C=$J.subVectors(qa.center,sh).dot(DR);m1.push(f[M],C,x)}}const A=m1.list,g=this.customSort;g===null?A.sort(s.transparent?qJ:KJ):g.call(this,A,i);for(let x=0,_=A.length;x<_;x++){const M=A[x];c[S]=M.start*a,h[S]=M.count,v[S]=M.index,S++}m1.reset()}else for(let A=0,g=l.length;A<g;A++)if(l[A].visible&&l[A].active){const x=l[A].geometryIndex;let _=!1;if(p&&(this.getMatrixAt(A,Wo),this.getBoundingSphereAt(x,qa).applyMatrix4(Wo),_=!p1.intersectsSphere(qa)),!_){const M=f[x];c[S]=M.start*a,h[S]=M.count,v[S]=A,S++}}m.needsUpdate=!0,this._multiDrawCount=S,this._visibilityChanged=!1}onBeforeShadow(e,n,i,r,s,o){this.onBeforeRender(e,null,r,s,o)}}class Ri extends zn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new ze(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 _v=new k,Av=new k,NR=new at,oh=new rc,mg=new di,g1=new k,FR=new k;class Eo extends kt{constructor(e=new St,n=new Ri){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),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 n=e.attributes.position,i=[0];for(let r=1,s=n.count;r<s;r++)_v.fromBufferAttribute(n,r-1),Av.fromBufferAttribute(n,r),i[r]=i[r-1],i[r]+=_v.distanceTo(Av);e.setAttribute("lineDistance",new et(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,n){const i=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),mg.copy(i.boundingSphere),mg.applyMatrix4(r),mg.radius+=s,e.ray.intersectsSphere(mg)===!1)return;NR.copy(r).invert(),oh.copy(e.ray).applyMatrix4(NR);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,h=i.index,p=i.attributes.position;if(h!==null){const m=Math.max(0,o.start),v=Math.min(h.count,o.start+o.count);for(let S=m,A=v-1;S<A;S+=c){const g=h.getX(S),x=h.getX(S+1),_=gg(this,e,oh,l,g,x);_&&n.push(_)}if(this.isLineLoop){const S=h.getX(v-1),A=h.getX(m),g=gg(this,e,oh,l,S,A);g&&n.push(g)}}else{const m=Math.max(0,o.start),v=Math.min(p.count,o.start+o.count);for(let S=m,A=v-1;S<A;S+=c){const g=gg(this,e,oh,l,S,S+1);g&&n.push(g)}if(this.isLineLoop){const S=gg(this,e,oh,l,v-1,m);S&&n.push(S)}}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[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 gg(t,e,n,i,r,s){const o=t.geometry.attributes.position;if(_v.fromBufferAttribute(o,r),Av.fromBufferAttribute(o,s),n.distanceSqToSegment(_v,Av,g1,FR)>i)return;g1.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(g1);if(!(l<e.near||l>e.far))return{distance:l,point:FR.clone().applyMatrix4(t.matrixWorld),index:r,face:null,faceIndex:null,object:t}}const kR=new k,OR=new k;class ms extends Eo{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,i=[];for(let r=0,s=n.count;r<s;r+=2)kR.fromBufferAttribute(n,r),OR.fromBufferAttribute(n,r+1),i[r]=r===0?0:i[r-1],i[r+1]=i[r]+kR.distanceTo(OR);e.setAttribute("lineDistance",new et(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class zM extends Eo{constructor(e,n){super(e,n),this.isLineLoop=!0,this.type="LineLoop"}}class hp extends zn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new ze(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 UR=new at,gS=new rc,vg=new di,yg=new k;let HM=class extends kt{constructor(e=new St,n=new hp){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,n){const i=this.geometry,r=this.matrixWorld,s=e.params.Points.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),vg.copy(i.boundingSphere),vg.applyM
vendor: 22,024 bytes, line 3907
3907atrix4(r),vg.radius+=s,e.ray.intersectsSphere(vg)===!1)return;UR.copy(r).invert(),gS.copy(e.ray).applyMatrix4(UR);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=i.index,f=i.attributes.position;if(c!==null){const p=Math.max(0,o.start),m=Math.min(c.count,o.start+o.count);for(let v=p,S=m;v<S;v++){const A=c.getX(v);yg.fromBufferAttribute(f,A),zR(yg,A,l,r,e,n,this)}}else{const p=Math.max(0,o.start),m=Math.min(f.count,o.start+o.count);for(let v=p,S=m;v<S;v++)yg.fromBufferAttribute(f,v),zR(yg,v,l,r,e,n,this)}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[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 zR(t,e,n,i,r,s,o){const a=gS.distanceSqToPoint(t);if(a<n){const l=new k;gS.closestPointToPoint(t,l),l.applyMatrix4(i);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,object:o})}}class tK extends Zt{constructor(e,n,i,r,s,o,a,l,c){super(e,n,i,r,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Tn,this.magFilter=s!==void 0?s:Tn,this.generateMipmaps=!1;const h=this;function f(){h.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class nK extends Zt{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=jn,this.minFilter=jn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Ay extends Zt{constructor(e,n,i,r,s,o,a,l,c,h,f,p){super(null,o,a,l,c,h,r,s,f,p),this.isCompressedTexture=!0,this.image={width:n,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class iK extends Ay{constructor(e,n,i,r,s,o){super(e,n,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=dr,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class rK extends Ay{constructor(e,n,i){super(void 0,e[0].width,e[0].height,n,i,wo),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class sK extends Zt{constructor(e,n,i,r,s,o,a,l,c){super(e,n,i,r,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class gs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const i=this.getUtoTmapping(e);return this.getPoint(i,n)}getPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return n}getSpacedPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPointAt(i/e));return n}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 n=[];let i,r=this.getPoint(0),s=0;n.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),n.push(s),r=i;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const i=this.getLengths();let r=0;const s=i.length;let o;n?o=n:o=e*i[s-1];let a=0,l=s-1,c;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else if(c>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,m=(o-h)/p;return(r+m)/(s-1)}getTangent(e,n){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=n||(o.isVector2?new he:new k);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const i=this.getUtoTmapping(e);return this.getTangent(i,n)}computeFrenetFrames(e,n){const i=new k,r=[],s=[],o=[],a=new k,l=new at;for(let m=0;m<=e;m++){const v=m/e;r[m]=this.getTangentAt(v,new k)}s[0]=new k,o[0]=new k;let c=Number.MAX_VALUE;const h=Math.abs(r[0].x),f=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=c&&(c=h,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),p<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let 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 v=Math.acos(Cn(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,v))}o[m].crossVectors(r[m],s[m])}if(n===!0){let m=Math.acos(Cn(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let v=1;v<=e;v++)s[v].applyMatrix4(l.makeRotationAxis(r[v],m*v)),o[v].crossVectors(r[v],s[v])}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.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Sy extends gs{constructor(e=0,n=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new he){const i=n,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 h=Math.cos(this.aRotation),f=Math.sin(this.aRotation),p=l-this.aX,m=c-this.aY;l=p*h-m*f+this.aX,c=p*f+m*h+this.aY}return i.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 vF extends Sy{constructor(e,n,i,r,s,o){super(e,n,i,i,r,s,o),this.isArcCurve=!0,this.type="ArcCurve"}}function GM(){let t=0,e=0,n=0,i=0;function r(s,o,a,l){t=s,e=a,n=-3*s+3*o-2*a-l,i=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,h,f){let p=(o-s)/c-(a-s)/(c+h)+(a-o)/h,m=(a-o)/h-(l-o)/(h+f)+(l-a)/f;p*=h,m*=h,r(o,a,p,m)},calc:function(s){const o=s*s,a=o*s;return t+e*s+n*o+i*a}}}const xg=new k,v1=new GM,y1=new GM,x1=new GM;class yF extends gs{constructor(e=[],n=!1,i="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=n,this.curveType=i,this.tension=r}getPoint(e,n=new k){const i=n,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,h;this.closed||a>0?c=r[(a-1)%s]:(xg.subVectors(r[0],r[1]).add(r[0]),c=xg);const f=r[a%s],p=r[(a+1)%s];if(this.closed||a+2<s?h=r[(a+2)%s]:(xg.subVectors(r[s-1],r[s-2]).add(r[s-1]),h=xg),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let v=Math.pow(c.distanceToSquared(f),m),S=Math.pow(f.distanceToSquared(p),m),A=Math.pow(p.distanceToSquared(h),m);S<1e-4&&(S=1),v<1e-4&&(v=S),A<1e-4&&(A=S),v1.initNonuniformCatmullRom(c.x,f.x,p.x,h.x,v,S,A),y1.initNonuniformCatmullRom(c.y,f.y,p.y,h.y,v,S,A),x1.initNonuniformCatmullRom(c.z,f.z,p.z,h.z,v,S,A)}else this.curveType==="catmullrom"&&(v1.initCatmullRom(c.x,f.x,p.x,h.x,this.tension),y1.initCatmullRom(c.y,f.y,p.y,h.y,this.tension),x1.initCatmullRom(c.z,f.z,p.z,h.z,this.tension));return i.set(v1.calc(l),y1.calc(l),x1.calc(l)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];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 n=0,i=this.points.length;n<i;n++){const r=this.points[n];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 n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new k().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function HR(t,e,n,i,r){const s=(i-e)*.5,o=(r-n)*.5,a=t*t,l=t*a;return(2*n-2*i+s+o)*l+(-3*n+3*i-2*s-o)*a+s*t+n}function oK(t,e){const n=1-t;return n*n*e}function aK(t,e){return 2*(1-t)*t*e}function lK(t,e){return t*t*e}function qh(t,e,n,i){return oK(t,e)+aK(t,n)+lK(t,i)}function cK(t,e){const n=1-t;return n*n*n*e}function uK(t,e){const n=1-t;return 3*n*n*t*e}function dK(t,e){return 3*(1-t)*t*t*e}function hK(t,e){return t*t*t*e}function Qh(t,e,n,i,r){return cK(t,e)+uK(t,n)+dK(t,i)+hK(t,r)}class VM extends gs{constructor(e=new he,n=new he,i=new he,r=new he){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new he){const i=n,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set(Qh(e,r.x,s.x,o.x,a.x),Qh(e,r.y,s.y,o.y,a.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class xF extends gs{constructor(e=new k,n=new k,i=new k,r=new k){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new k){const i=n,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set(Qh(e,r.x,s.x,o.x,a.x),Qh(e,r.y,s.y,o.y,a.y),Qh(e,r.z,s.z,o.z,a.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class jM extends gs{constructor(e=new he,n=new he){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=n}getPoint(e,n=new he){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new he){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}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 _F extends gs{constructor(e=new k,n=new k){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=n}getPoint(e,n=new k){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new k){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}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 WM extends gs{constructor(e=new he,n=new he,i=new he){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new he){const i=n,r=this.v0,s=this.v1,o=this.v2;return i.set(qh(e,r.x,s.x,o.x),qh(e,r.y,s.y,o.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class XM extends gs{constructor(e=new k,n=new k,i=new k){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new k){const i=n,r=this.v0,s=this.v1,o=this.v2;return i.set(qh(e,r.x,s.x,o.x),qh(e,r.y,s.y,o.y),qh(e,r.z,s.z,o.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class JM extends gs{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,n=new he){const i=n,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],h=r[o>r.length-2?r.length-1:o+1],f=r[o>r.length-3?r.length-1:o+2];return i.set(HR(a,l.x,c.x,h.x,f.x),HR(a,l.y,c.y,h.y,f.y)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,i=this.points.length;n<i;n++){const r=this.points[n];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new he().fromArray(r))}return this}}var Sv=Object.freeze({__proto__:null,ArcCurve:vF,CatmullRomCurve3:yF,CubicBezierCurve:VM,CubicBezierCurve3:xF,EllipseCurve:Sy,LineCurve:jM,LineCurve3:_F,QuadraticBezierCurve:WM,QuadraticBezierCurve3:XM,SplineCurve:JM});class AF extends gs{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),n=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(n)){const i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Sv[i](n,e))}return this}getPoint(e,n){const i=e*this.getLength(),r=this.getCurveLengths();let s=0;for(;s<r.length;){if(r[s]>=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}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 n=0;for(let i=0,r=this.curves.length;i<r;i++)n+=this.curves[i].getLength(),e.push(n);return this.cacheLengths=e,e}getSpacedPoints(e=40){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return this.autoClose&&n.push(n[0]),n}getPoints(e=12){const n=[];let i;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 h=l[c];i&&i.equals(h)||(n.push(h),i=h)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let n=0,i=this.curves.length;n<i;n++){const r=this.curves[n];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(new Sv[r.type]().fromJSON(r))}return this}}class Nf extends AF{constructor(e){super(),this.type="Path",this.currentPoint=new he,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let n=1,i=e.length;n<i;n++)this.lineTo(e[n].x,e[n].y);return this}moveTo(e,n){return this.currentPoint.set(e,n),this}lineTo(e,n){const i=new jM(this.currentPoint.clone(),new he(e,n));return this.curves.push(i),this.currentPoint.set(e,n),this}quadraticCurveTo(e,n,i,r){const s=new WM(this.currentPoint.clone(),new he(e,n),new he(i,r));return this.curves.push(s),this.currentPoint.set(i,r),this}bezierCurveTo(e,n,i,r,s,o){const a=new VM(this.currentPoint.clone(),new he(e,n),new he(i,r),new he(s,o));return this.curves.push(a),this.currentPoint.set(s,o),this}splineThru(e){const n=[this.currentPoint.clone()].concat(e),i=new JM(n);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,n,i,r,s,o){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,n+l,i,r,s,o),this}absarc(e,n,i,r,s,o){return this.absellipse(e,n,i,i,r,s,o),this}ellipse(e,n,i,r,s,o,a,l){const c=this.currentPoint.x,h=this.currentPoint.y;return this.absellipse(e+c,n+h,i,r,s,o,a,l),this}absellipse(e,n,i,r,s,o,a,l){const c=new Sy(e,n,i,r,s,o,a,l);if(this.curves.length>0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const h=c.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class fp extends St{constructor(e=[new he(0,-.5),new he(.5,0),new he(0,.5)],n=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:i,phiLength:r},n=Math.floor(n),r=Cn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],h=1/n,f=new k,p=new he,m=new k,v=new k,S=new k;let A=0,g=0;for(let x=0;x<=e.length-1;x++)switch(x){case 0:A=e[x+1].x-e[x].x,g=e[x+1].y-e[x].y,m.x=g*1,m.y=-A,m.z=g*0,S.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(S.x,S.y,S.z);break;default:A=e[x+1].x-e[x].x,g=e[x+1].y-e[x].y,m.x=g*1,m.y=-A,m.z=g*0,v.copy(m),m.x+=S.x,m.y+=S.y,m.z+=S.z,m.normalize(),l.push(m.x,m.y,m.z),S.copy(v)}for(let x=0;x<=n;x++){const _=i+x*h*r,M=Math.sin(_),b=Math.cos(_);for(let C=0;C<=e.length-1;C++){f.x=e[C].x*M,f.y=e[C].y,f.z=e[C].x*b,o.push(f.x,f.y,f.z),p.x=x/n,p.y=C/(e.length-1),a.push(p.x,p.y);const P=l[3*C+0]*M,B=l[3*C+1],R=l[3*C+0]*b;c.push(P,B,R)}}for(let x=0;x<n;x++)for(let _=0;_<e.length-1;_++){const M=_+x*e.length,b=M,C=M+e.length,P=M+e.length+1,B=M+1;s.push(b,C,B),s.push(P,B,C)}this.setIndex(s),this.setAttribute("position",new et(o,3)),this.setAttribute("uv",new et(a,2)),this.setAttribute("normal",new et(c,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new fp(e.points,e.segments,e.phiStart,e.phiLength)}}class wy extends fp{constructor(e=1,n=1,i=4,r=8){const s=new Nf;s.absarc(0,-n/2,e,Math.PI*1.5,0),s.absarc(0,n/2,e,0,Math.PI*.5),super(s.getPoints(i),r),this.type="CapsuleGeometry",this.parameters={radius:e,length:n,capSegments:i,radialSegments:r}}static fromJSON(e){return new wy(e.radius,e.length,e.capSegments,e.radialSegments)}}class My extends St{constructor(e=1,n=32,i=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:n,thetaStart:i,thetaLength:r},n=Math.max(3,n);const s=[],o=[],a=[],l=[],c=new k,h=new he;o.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let f=0,p=3;f<=n;f++,p+=3){const m=i+f/n*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),h.x=(o[p]/e+1)/2,h.y=(o[p+1]/e+1)/2,l.push(h.x,h.y)}for(let f=1;f<=n;f++)s.push(f,f+1,0);this.setIndex(s),this.setAttribute("position",new et(o,3)),this.setAttribute("normal",new et(a,3)),this.setAttribute("uv",new et(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new My(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class fd extends St{constructor(e=1,n=1,i=1,r=32,s=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:n,height:i,radialSegments:r,heightSegments:s,openEnded:o,thetaStart:a,thetaLength:l};const c=this;r=Math.floor(r),s=Math.floor(s);const h=[],f=[],p=[],m=[];let v=0;const S=[],A=i/2;let g=0;x(),o===!1&&(e>0&&_(!0),n>0&&_(!1)),this.setIndex(h),this.setAttribute("position",new et(f,3)),this.setAttribute("normal",new et(p,3)),this.setAttribute("uv",new et(m,2));function x(){const M=new k,b=new k;let C=0;const P=(n-e)/i;for(let B=0;B<=s;B++){const R=[],T=B/s,L=T*(n-e)+e;for(let W=0;W<=r;W++){const Y=W/r,q=Y*l+a,j=Math.sin(q),Z=Math.cos(q);b.x=L*j,b.y=-T*i+A,b.z=L*Z,f.push(b.x,b.y,b.z),M.set(j,P,Z).normalize(),p.push(M.x,M.y,M.z),m.push(Y,1-T),R.push(v++)}S.push(R)}for(let B=0;B<r;B++)for(let R=0;R<s;R++){const T=S[R][B],L=S[R+1][B],W=S[R+1][B+1],Y=S[R][B+1];h.push(T,L,Y),h.push(L,W,Y),C+=6}c.addGroup(g,C,0),g+=C}function _(M){const b=v,C=new he,P=new k;let B=0;const R=M===!0?e:n,T=M===!0?1:-1;for(let W=1;W<=r;W++)f.push(0,A*T,0),p.push(0,T,0),m.push(.5,.5),v++;const L=v;for(let W=0;W<=r;W++){const q=W/r*l+a,j=Math.cos(q),Z=Math.sin(q);P.x=R*Z,P.y=A*T,P.z=R*j,f.push(P.x,P.y,P.z),p.push(0,T,0),C.x=j*.5+.5,C.y=Z*.5*T+.5,m.push(C.x,C.y),v++}for(let W=0;W<r;W++){const Y=b+W,q=L+W;M===!0?h.push(q,q+1,Y):h.push(q+1,q,Y),B+=3}c.addGroup(g,B,M===!0?1:2),g+=B}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new fd(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ey extends fd{constructor(e=1,n=1,i=32,r=1,s=!1,o=0,a=Math.PI*2){super(0,e,n,i,r,s,o,a),this.type="C
3907oneGeometry",this.parameters={radius:e,height:n,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new Ey(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Pa extends St{constructor(e=[],n=[],i=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:n,radius:i,detail:r};const s=[],o=[];a(r),c(i),h(),this.setAttribute("position",new et(s,3)),this.setAttribute("normal",new et(s.slice(),3)),this.setAttribute("uv",new et(o,2)),r===0?this.computeVertexNormals():this.normalizeNormals();function a(x){const _=new k,M=new k,b=new k;for(let C=0;C<n.length;C+=3)m(n[C+0],_),m(n[C+1],M),m(n[C+2],b),l(_,M,b,x)}function l(x,_,M,b){const C=b+1,P=[];for(let B=0;B<=C;B++){P[B]=[];const R=x.clone().lerp(M,B/C),T=_.clone().lerp(M,B/C),L=C-B;for(let W=0;W<=L;W++)W===0&&B===C?P[B][W]=R:P[B][W]=R.clone().lerp(T,W/L)}for(let B=0;B<C;B++)for(let R=0;R<2*(C-B)-1;R++){const T=Math.floor(R/2);R%2===0?(p(P[B][T+1]),p(P[B+1][T]),p(P[B][T])):(p(P[B][T+1]),p(P[B+1][T+1]),p(P[B+1][T]))}}function c(x){const _=new k;for(let M=0;M<s.length;M+=3)_.x=s[M+0],_.y=s[M+1],_.z=s[M+2],_.normalize().multiplyScalar(x),s[M+0]=_.x,s[M+1]=_.y,s[M+2]=_.z}function h(){const x=new k;for(let _=0;_<s.length;_+=3){x.x=s[_+0],x.y=s[_+1],x.z=s[_+2];const M=A(x)/2/Math.PI+.5,b=g(x)/Math.PI+.5;o.push(M,1-b)}v(),f()}function f(){for(let x=0;x<o.length;x+=6){const _=o[x+0],M=o[x+2],b=o[x+4],C=Math.max(_,M,b),P=Math.min(_,M,b);C>.9&&P<.1&&(_<.2&&(o[x+0]+=1),M<.2&&(o[x+2]+=1),b<.2&&(o[x+4]+=1))}}function p(x){s.push(x.x,x.y,x.z)}function m(x,_){const M=x*3;_.x=e[M+0],_.y=e[M+1],_.z=e[M+2]}function v(){const x=new k,_=new k,M=new k,b=new k,C=new he,P=new he,B=new he;for(let R=0,T=0;R<s.length;R+=9,T+=6){x.set(s[R+0],s[R+1],s[R+2]),_.set(s[R+3],s[R+4],s[R+5]),M.set(s[R+6],s[R+7],s[R+8]),C.set(o[T+0],o[T+1]),P.set(o[T+2],o[T+3]),B.set(o[T+4],o[T+5]),b.copy(x).add(_).add(M).divideScalar(3);const L=A(b);S(C,T+0,x,L),S(P,T+2,_,L),S(B,T+4,M,L)}}function S(x,_,M,b){b<0&&x.x===1&&(o[_]=x.x-1),M.x===0&&M.z===0&&(o[_]=b/2/Math.PI+.5)}function A(x){return Math.atan2(x.z,-x.x)}function g(x){return Math.atan2(-x.y,Math.sqrt(x.x*x.x+x.z*x.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Pa(e.vertices,e.indices,e.radius,e.details)}}class Cy extends Pa{constructor(e=1,n=0){const i=(1+Math.sqrt(5))/2,r=1/i,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,-i,0,-r,i,0,r,-i,0,r,i,-r,-i,0,-r,i,0,r,-i,0,r,i,0,-i,0,-r,i,0,-r,-i,0,r,i,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: 152,937 bytes, line 3907
390719,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(s,o,e,n),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new Cy(e.radius,e.detail)}}const _g=new k,Ag=new k,_1=new k,Sg=new Ki;class SF extends St{constructor(e=null,n=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:n},e!==null){const r=Math.pow(10,4),s=Math.cos(Dl*n),o=e.getIndex(),a=e.getAttribute("position"),l=o?o.count:a.count,c=[0,0,0],h=["a","b","c"],f=new Array(3),p={},m=[];for(let v=0;v<l;v+=3){o?(c[0]=o.getX(v),c[1]=o.getX(v+1),c[2]=o.getX(v+2)):(c[0]=v,c[1]=v+1,c[2]=v+2);const{a:S,b:A,c:g}=Sg;if(S.fromBufferAttribute(a,c[0]),A.fromBufferAttribute(a,c[1]),g.fromBufferAttribute(a,c[2]),Sg.getNormal(_1),f[0]=`${Math.round(S.x*r)},${Math.round(S.y*r)},${Math.round(S.z*r)}`,f[1]=`${Math.round(A.x*r)},${Math.round(A.y*r)},${Math.round(A.z*r)}`,f[2]=`${Math.round(g.x*r)},${Math.round(g.y*r)},${Math.round(g.z*r)}`,!(f[0]===f[1]||f[1]===f[2]||f[2]===f[0]))for(let x=0;x<3;x++){const _=(x+1)%3,M=f[x],b=f[_],C=Sg[h[x]],P=Sg[h[_]],B=`${M}_${b}`,R=`${b}_${M}`;R in p&&p[R]?(_1.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[x],index1:c[_],normal:_1.clone()})}}for(const v in p)if(p[v]){const{index0:S,index1:A}=p[v];_g.fromBufferAttribute(a,S),Ag.fromBufferAttribute(a,A),m.push(_g.x,_g.y,_g.z),m.push(Ag.x,Ag.y,Ag.z)}this.setAttribute("position",new et(m,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Fl extends Nf{constructor(e){super(e),this.uuid=mr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const n=[];for(let i=0,r=this.holes.length;i<r;i++)n[i]=this.holes[i].getPoints(e);return n}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let n=0,i=this.holes.length;n<i;n++){const r=this.holes[n];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(new Nf().fromJSON(r))}return this}}const fK={triangulate:function(t,e,n=2){const i=e&&e.length,r=i?e[0]*n:t.length;let s=wF(t,0,r,n,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c,h,f,p,m;if(i&&(s=yK(t,e,s,n)),t.length>80*n){a=c=t[0],l=h=t[1];for(let v=n;v<r;v+=n)f=t[v],p=t[v+1],f<a&&(a=f),p<l&&(l=p),f>c&&(c=f),p>h&&(h=p);m=Math.max(c-a,h-l),m=m!==0?32767/m:0}return Ff(s,o,n,a,l,m,0),o}};function wF(t,e,n,i,r){let s,o;if(r===RK(t,e,n,i)>0)for(s=e;s<n;s+=i)o=GR(s,t[s],t[s+1],o);else for(s=n-i;s>=e;s-=i)o=GR(s,t[s],t[s+1],o);return o&&Ty(o,o.next)&&(Of(o),o=o.next),o}function Kl(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(Ty(n,n.next)||vn(n.prev,n,n.next)===0)){if(Of(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function Ff(t,e,n,i,r,s,o){if(!t)return;!o&&s&&wK(t,i,r,s);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?mK(t,i,r,s):pK(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Of(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=gK(Kl(t),e,n),Ff(t,e,n,i,r,s,2)):o===2&&vK(t,e,n,i,r,s):Ff(Kl(t),e,n,i,r,s,1);break}}}function pK(t){const e=t.prev,n=t,i=t.next;if(vn(e,n,i)>=0)return!1;const r=e.x,s=n.x,o=i.x,a=e.y,l=n.y,c=i.y,h=r<s?r<o?r:o:s<o?s:o,f=a<l?a<c?a:c:l<c?l:c,p=r>s?r>o?r:o:s>o?s:o,m=a>l?a>c?a:c:l>c?l:c;let v=i.next;for(;v!==e;){if(v.x>=h&&v.x<=p&&v.y>=f&&v.y<=m&&Au(r,a,s,l,o,c,v.x,v.y)&&vn(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function mK(t,e,n,i){const r=t.prev,s=t,o=t.next;if(vn(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,h=r.y,f=s.y,p=o.y,m=a<l?a<c?a:c:l<c?l:c,v=h<f?h<p?h:p:f<p?f:p,S=a>l?a>c?a:c:l>c?l:c,A=h>f?h>p?h:p:f>p?f:p,g=vS(m,v,e,n,i),x=vS(S,A,e,n,i);let _=t.prevZ,M=t.nextZ;for(;_&&_.z>=g&&M&&M.z<=x;){if(_.x>=m&&_.x<=S&&_.y>=v&&_.y<=A&&_!==r&&_!==o&&Au(a,h,l,f,c,p,_.x,_.y)&&vn(_.prev,_,_.next)>=0||(_=_.prevZ,M.x>=m&&M.x<=S&&M.y>=v&&M.y<=A&&M!==r&&M!==o&&Au(a,h,l,f,c,p,M.x,M.y)&&vn(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;_&&_.z>=g;){if(_.x>=m&&_.x<=S&&_.y>=v&&_.y<=A&&_!==r&&_!==o&&Au(a,h,l,f,c,p,_.x,_.y)&&vn(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;M&&M.z<=x;){if(M.x>=m&&M.x<=S&&M.y>=v&&M.y<=A&&M!==r&&M!==o&&Au(a,h,l,f,c,p,M.x,M.y)&&vn(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function gK(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!Ty(r,s)&&MF(r,i,i.next,s)&&kf(r,s)&&kf(s,r)&&(e.push(r.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),Of(i),Of(i.next),i=t=s),i=i.next}while(i!==t);return Kl(i)}function vK(t,e,n,i,r,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&CK(o,a)){let l=EF(o,a);o=Kl(o,o.next),l=Kl(l,l.next),Ff(o,e,n,i,r,s,0),Ff(l,e,n,i,r,s,0);return}a=a.next}o=o.next}while(o!==t)}function yK(t,e,n,i){const r=[];let s,o,a,l,c;for(s=0,o=e.length;s<o;s++)a=e[s]*i,l=s<o-1?e[s+1]*i:t.length,c=wF(t,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(EK(c));for(r.sort(xK),s=0;s<r.length;s++)n=_K(r[s],n);return n}function xK(t,e){return t.x-e.x}function _K(t,e){const n=AK(t,e);if(!n)return e;const i=EF(n,t);return Kl(i,i.next),Kl(n,n.next)}function AK(t,e){let n=e,i=-1/0,r;const s=t.x,o=t.y;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const p=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(p<=s&&p>i&&(i=p,r=n.x<n.next.x?n:n.next,p===s))return r}n=n.next}while(n!==e);if(!r)return null;const a=r,l=r.x,c=r.y;let h=1/0,f;n=r;do s>=n.x&&n.x>=l&&s!==n.x&&Au(o<c?s:i,o,l,c,o<c?i:s,o,n.x,n.y)&&(f=Math.abs(o-n.y)/(s-n.x),kf(n,t)&&(f<h||f===h&&(n.x>r.x||n.x===r.x&&SK(r,n)))&&(r=n,h=f)),n=n.next;while(n!==a);return r}function SK(t,e){return vn(t.prev,t,e.prev)<0&&vn(e.next,t,t.next)<0}function wK(t,e,n,i){let r=t;do r.z===0&&(r.z=vS(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,MK(r)}function MK(t){let e,n,i,r,s,o,a,l,c=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,i=n,a=0,e=0;e<c&&(a++,i=i.nextZ,!!i);e++);for(l=c;a>0||l>0&&i;)a!==0&&(l===0||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(o>1);return t}function vS(t,e,n,i,r){return t=(t-n)*r|0,e=(e-i)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function EK(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function Au(t,e,n,i,r,s,o,a){return(r-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(i-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(r-o)*(i-a)}function CK(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!TK(t,e)&&(kf(t,e)&&kf(e,t)&&bK(t,e)&&(vn(t.prev,t,e.prev)||vn(t,e.prev,e))||Ty(t,e)&&vn(t.prev,t,t.next)>0&&vn(e.prev,e,e.next)>0)}function vn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Ty(t,e){return t.x===e.x&&t.y===e.y}function MF(t,e,n,i){const r=Mg(vn(t,e,n)),s=Mg(vn(t,e,i)),o=Mg(vn(n,i,t)),a=Mg(vn(n,i,e));return!!(r!==s&&o!==a||r===0&&wg(t,n,e)||s===0&&wg(t,i,e)||o===0&&wg(n,t,i)||a===0&&wg(n,e,i))}function wg(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Mg(t){return t>0?1:t<0?-1:0}function TK(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&MF(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function kf(t,e){return vn(t.prev,t,t.next)<0?vn(t,e,t.next)>=0&&vn(t,t.prev,e)>=0:vn(t,e,t.prev)<0||vn(t,t.next,e)<0}function bK(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function EF(t,e){const n=new yS(t.i,t.x,t.y),i=new yS(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function GR(t,e,n,i){const r=new yS(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Of(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function yS(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function RK(t,e,n,i){let r=0;for(let s=e,o=n-i;s<n;s+=i)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}class Fs{static area(e){const n=e.length;let i=0;for(let r=n-1,s=0;s<n;r=s++)i+=e[r].x*e[s].y-e[s].x*e[r].y;return i*.5}static isClockWise(e){return Fs.area(e)<0}static triangulateShape(e,n){const i=[],r=[],s=[];VR(e),jR(i,e);let o=e.length;n.forEach(VR);for(let l=0;l<n.length;l++)r.push(o),o+=n[l].length,jR(i,n[l]);const a=fK.triangulate(i,r);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function VR(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function jR(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class by extends St{constructor(e=new Fl([new he(.5,.5),new he(-.5,.5),new he(-.5,-.5),new he(.5,-.5)]),n={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:n},e=Array.isArray(e)?e:[e];const i=this,r=[],s=[];for(let a=0,l=e.length;a<l;a++){const c=e[a];o(c)}this.setAttribute("position",new et(r,3)),this.setAttribute("uv",new et(s,2)),this.computeVertexNormals();function o(a){const l=[],c=n.curveSegments!==void 0?n.curveSegments:12,h=n.steps!==void 0?n.steps:1,f=n.depth!==void 0?n.depth:1;let p=n.bevelEnabled!==void 0?n.bevelEnabled:!0,m=n.bevelThickness!==void 0?n.bevelThickness:.2,v=n.bevelSize!==void 0?n.bevelSize:m-.1,S=n.bevelOffset!==void 0?n.bevelOffset:0,A=n.bevelSegments!==void 0?n.bevelSegments:3;const g=n.extrudePath,x=n.UVGenerator!==void 0?n.UVGenerator:PK;let _,M=!1,b,C,P,B;g&&(_=g.getSpacedPoints(h),M=!0,p=!1,b=g.computeFrenetFrames(h,!1),C=new k,P=new k,B=new k),p||(A=0,m=0,v=0,S=0);const R=a.extractPoints(c);let T=R.shape;const L=R.holes;if(!Fs.isClockWise(T)){T=T.reverse();for(let U=0,ye=L.length;U<ye;U++){const Te=L[U];Fs.isClockWise(Te)&&(L[U]=Te.reverse())}}const Y=Fs.triangulateShape(T,L),q=T;for(let U=0,ye=L.length;U<ye;U++){const Te=L[U];T=T.concat(Te)}function j(U,ye,Te){return ye||console.error("THREE.ExtrudeGeometry: vec does not exist"),U.clone().addScaledVector(ye,Te)}const Z=T.length,H=Y.length;function D(U,ye,Te){let Ne,ge,Ze;const Oe=U.x-ye.x,je=U.y-ye.y,V=Te.x-U.x,N=Te.y-U.y,se=Oe*Oe+je*je,Me=Oe*N-je*V;if(Math.abs(Me)>Number.EPSILON){const we=Math.sqrt(se),Ee=Math.sqrt(V*V+N*N),rt=ye.x-je/we,Pe=ye.y+Oe/we,Ke=Te.x-N/Ee,xt=Te.y+V/Ee,Re=((Ke-rt)*N-(xt-Pe)*V)/(Oe*N-je*V);Ne=rt+Oe*Re-U.x,ge=Pe+je*Re-U.y;const We=Ne*Ne+ge*ge;if(We<=2)return new he(Ne,ge);Ze=Math.sqrt(We/2)}else{let we=!1;Oe>Number.EPSILON?V>Number.EPSILON&&(we=!0):Oe<-Number.EPSILON?V<-Number.EPSILON&&(we=!0):Math.sign(je)===Math.sign(N)&&(we=!0),we?(Ne=-je,ge=Oe,Ze=Math.sqrt(se)):(Ne=Oe,ge=je,Ze=Math.sqrt(se/2))}return new he(Ne/Ze,ge/Ze)}const X=[];for(let U=0,ye=q.length,Te=ye-1,Ne=U+1;U<ye;U++,Te++,Ne++)Te===ye&&(Te=0),Ne===ye&&(Ne=0),X[U]=D(q[U],q[Te],q[Ne]);const J=[];let $,ue=X.concat();for(let U=0,ye=L.length;U<ye;U++){const Te=L[U];$=[];for(let Ne=0,ge=Te.length,Ze=ge-1,Oe=Ne+1;Ne<ge;Ne++,Ze++,Oe++)Ze===ge&&(Ze=0),Oe===ge&&(Oe=0),$[Ne]=D(Te[Ne],Te[Ze],Te[Oe]);J.push($),ue=ue.concat($)}for(let U=0;U<A;U++){const ye=U/A,Te=m*Math.cos(ye*Math.PI/2),Ne=v*Math.sin(ye*Math.PI/2)+S;for(let ge=0,Ze=q.length;ge<Ze;ge++){const Oe=j(q[ge],X[ge],Ne);_e(Oe.x,Oe.y,-Te)}for(let ge=0,Ze=L.length;ge<Ze;ge++){const Oe=L[ge];$=J[ge];for(let je=0,V=Oe.length;je<V;je++){const N=j(Oe[je],$[je],Ne);_e(N.x,N.y,-Te)}}}const Ae=v+S;for(let U=0;U<Z;U++){const ye=p?j(T[U],ue[U],Ae):T[U];M?(P.copy(b.normals[0]).multiplyScalar(ye.x),C.copy(b.binormals[0]).multiplyScalar(ye.y),B.copy(_[0]).add(P).add(C),_e(B.x,B.y,B.z)):_e(ye.x,ye.y,0)}for(let U=1;U<=h;U++)for(let ye=0;ye<Z;ye++){const Te=p?j(T[ye],ue[ye],Ae):T[ye];M?(P.copy(b.normals[U]).multiplyScalar(Te.x),C.copy(b.binormals[U]).multiplyScalar(Te.y),B.copy(_[U]).add(P).add(C),_e(B.x,B.y,B.z)):_e(Te.x,Te.y,f/h*U)}for(let U=A-1;U>=0;U--){const ye=U/A,Te=m*Math.cos(ye*Math.PI/2),Ne=v*Math.sin(ye*Math.PI/2)+S;for(let ge=0,Ze=q.length;ge<Ze;ge++){const Oe=j(q[ge],X[ge],Ne);_e(Oe.x,Oe.y,f+Te)}for(let ge=0,Ze=L.length;ge<Ze;ge++){const Oe=L[ge];$=J[ge];for(let je=0,V=Oe.length;je<V;je++){const N=j(Oe[je],$[je],Ne);M?_e(N.x,N.y+_[h-1].y,_[h-1].x+Te):_e(N.x,N.y,f+Te)}}}te(),ce();function te(){const U=r.length/3;if(p){let ye=0,Te=Z*ye;for(let Ne=0;Ne<H;Ne++){const ge=Y[Ne];De(ge[2]+Te,ge[1]+Te,ge[0]+Te)}ye=h+A*2,Te=Z*ye;for(let Ne=0;Ne<H;Ne++){const ge=Y[Ne];De(ge[0]+Te,ge[1]+Te,ge[2]+Te)}}else{for(let ye=0;ye<H;ye++){const Te=Y[ye];De(Te[2],Te[1],Te[0])}for(let ye=0;ye<H;ye++){const Te=Y[ye];De(Te[0]+Z*h,Te[1]+Z*h,Te[2]+Z*h)}}i.addGroup(U,r.length/3-U,0)}function ce(){const U=r.length/3;let ye=0;xe(q,ye),ye+=q.length;for(let Te=0,Ne=L.length;Te<Ne;Te++){const ge=L[Te];xe(ge,ye),ye+=ge.length}i.addGroup(U,r.length/3-U,1)}function xe(U,ye){let Te=U.length;for(;--Te>=0;){const Ne=Te;let ge=Te-1;ge<0&&(ge=U.length-1);for(let Ze=0,Oe=h+A*2;Ze<Oe;Ze++){const je=Z*Ze,V=Z*(Ze+1),N=ye+Ne+je,se=ye+ge+je,Me=ye+ge+V,we=ye+Ne+V;it(N,se,Me,we)}}}function _e(U,ye,Te){l.push(U),l.push(ye),l.push(Te)}function De(U,ye,Te){Ue(U),Ue(ye),Ue(Te);const Ne=r.length/3,ge=x.generateTopUV(i,r,Ne-3,Ne-2,Ne-1);Be(ge[0]),Be(ge[1]),Be(ge[2])}function it(U,ye,Te,Ne){Ue(U),Ue(ye),Ue(Ne),Ue(ye),Ue(Te),Ue(Ne);const ge=r.length/3,Ze=x.generateSideWallUV(i,r,ge-6,ge-3,ge-2,ge-1);Be(Ze[0]),Be(Ze[1]),Be(Ze[3]),Be(Ze[1]),Be(Ze[2]),Be(Ze[3])}function Ue(U){r.push(l[U*3+0]),r.push(l[U*3+1]),r.push(l[U*3+2])}function Be(U){s.push(U.x),s.push(U.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes,i=this.parameters.options;return IK(n,i,e)}static fromJSON(e,n){const i=[];for(let s=0,o=e.shapes.length;s<o;s++){const a=n[e.shapes[s]];i.push(a)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new Sv[r.type]().fromJSON(r)),new by(i,e.options)}}const PK={generateTopUV:function(t,e,n,i,r){const s=e[n*3],o=e[n*3+1],a=e[i*3],l=e[i*3+1],c=e[r*3],h=e[r*3+1];return[new he(s,o),new he(a,l),new he(c,h)]},generateSideWallUV:function(t,e,n,i,r,s){const o=e[n*3],a=e[n*3+1],l=e[n*3+2],c=e[i*3],h=e[i*3+1],f=e[i*3+2],p=e[r*3],m=e[r*3+1],v=e[r*3+2],S=e[s*3],A=e[s*3+1],g=e[s*3+2];return Math.abs(a-h)<Math.abs(o-c)?[new he(o,1-l),new he(c,1-f),new he(p,1-v),new he(S,1-g)]:[new he(a,1-l),new he(h,1-f),new he(m,1-v),new he(A,1-g)]}};function IK(t,e,n){if(n.shapes=[],Array.isArray(t))for(let i=0,r=t.length;i<r;i++){const s=t[i];n.shapes.push(s.uuid)}else n.shapes.push(t.uuid);return n.options=Object.assign({},e),e.extrudePath!==void 0&&(n.options.extrudePath=e.extrudePath.toJSON()),n}class Ry extends Pa{constructor(e=1,n=0){const i=(1+Math.sqrt(5))/2,r=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],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,n),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new Ry(e.radius,e.detail)}}class pp extends Pa{constructor(e=1,n=0){const i=[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(i,r,e,n),this.type="OctahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new pp(e.radius,e.detail)}}class Py extends St{constructor(e=.5,n=1,i=32,r=1,s=0,o=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:n,thetaSegments:i,phiSegments:r,thetaStart:s,thetaLength:o},i=Math.max(3,i),r=Math.max(1,r);const a=[],l=[],c=[],h=[];let f=e;const p=(n-e)/r,m=new k,v=new he;for(let S=0;S<=r;S++){for(let A=0;A<=i;A++){const g=s+A/i*o;m.x=f*Math.cos(g),m.y=f*Math.sin(g),l.push(m.x,m.y,m.z),c.push(0,0,1),v.x=(m.x/n+1)/2,v.y=(m.y/n+1)/2,h.push(v.x,v.y)}f+=p}for(let S=0;S<r;S++){const A=S*(i+1);for(let g=0;g<i;g++){const x=g+A,_=x,M=x+i+1,b=x+i+2,C=x+1;a.push(_,M,C),a.push(M,b,C)}}this.setIndex(a),this.setAttribute("position",new et(l,3)),this.setAttribute("normal",new et(c,3)),this.setAttribute("uv",new et(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Py(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Iy extends St{constructor(e=new Fl([new he(0,.5),new he(-.5,-.5),new he(.5,-.5)]),n=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:n};const i=[],r=[],s=[],o=[];let a=0,l=0;if(Array.isArray(e)===!1)c(e);else for(let h=0;h<e.length;h++)c(e[h]),this.addGroup(a,l,h),a+=l,l=0;this.setIndex(i),this.setAttribute("position",new et(r,3)),this.setAttribute("normal",new et(s,3)),this.setAttribute("uv",new et(o,2));function c(h){const f=r.length/3,p=h.extractPoints(n);let m=p.shape;const v=p.holes;Fs.isClockWise(m)===!1&&(m=m.reverse());for(let A=0,g=v.length;A<g;A++){const x=v[A];Fs.isClockWise(x)===!0&&(v[A]=x.reverse())}const S=Fs.triangulateShape(m,v);for(let A=0,g=v.length;A<g;A++){const x=v[A];m=m.concat(x)}for(let A=0,g=m.length;A<g;A++){const x=m[A];r.push(x.x,x.y,0),s.push(0,0,1),o.push(x.x,x.y)}for(let A=0,g=S.length;A<g;A++){const x=S[A],_=x[0]+f,M=x[1]+f,b=x[2]+f;i.push(_,M,b),l+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes;return BK(n,e)}static fromJSON(e,n){const i=[];for(let r=0,s=e.shapes.length;r<s;r++){const o=n[e.shapes[r]];i.push(o)}return new Iy(i,e.curveSegments)}}function BK(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const r=t[n];e.shapes.push(r.uuid)}else e.shapes.push(t.uuid);return e}class mp extends St{constructor(e=1,n=32,i=16,r=0,s=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:n,heightSegments:i,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},n=Math.max(3,Math.floor(n)),i=Math.max(2,Math.floor(i));const l=Math.min(o+a,Math.PI);let c=0;const h=[],f=new k,p=new k,m=[],v=[],S=[],A=[];for(let g=0;g<=i;g++){const x=[],_=g/i;let M=0;g===0&&o===0?M=.5/n:g===i&&l===Math.PI&&(M=-.5/n);for(let b=0;b<=n;b++){const C=b/n;f.x=-e*Math.cos(r+C*s)*Math.sin(o+_*a),f.y=e*Math.cos(o+_*a),f.z=e*Math.sin(r+C*s)*Math.sin(o+_*a),v.push(f.x,f.y,f.z),p.copy(f).normalize(),S.push(p.x,p.y,p.z),A.push(C+M,1-_),x.push(c++)}h.push(x)}for(let g=0;g<i;g++)for(let x=0;x<n;x++){const _=h[g][x+1],M=h[g][x],b=h[g+1][x],C=h[g+1][x+1];(g!==0||o>0)&&m.push(_,M,C),(g!==i-1||l<Math.PI)&&m.push(M,b,C)}this.setIndex(m),this.setAttribute("position",new et(v,3)),this.setAttribute("normal",new et(S,3)),this.setAttribute("uv",new et(A,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new mp(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class By extends Pa{constructor(e=1,n=0){const i=[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(i,r,e,n),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new By(e.radius,e.detail)}}class Ly extends St{constructor(e=1,n=.4,i=12,r=48,s=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:n,radialSegments:i,tubularSegments:r,arc:s},i=Math.floor(i),r=Math.floor(r);const o=[],a=[],l=[],c=[],h=new k,f=new k,p=new k;for(let m=0;m<=i;m++)for(let v=0;v<=r;v++){const S=v/r*s,A=m/i*Math.PI*2;f.x=(e+n*Math.cos(A))*Math.cos(S),f.y=(e+n*Math.cos(A))*Math.sin(S),f.z=n*Math.sin(A),a.push(f.x,f.y,f.z),h.x=e*Math.cos(S),h.y=e*Math.sin(S),p.subVectors(f,h).normalize(),l.push(p.x,p.y,p.z),c.push(v/r),c.push(m/i)}for(let m=1;m<=i;m++)for(let v=1;v<=r;v++){const S=(r+1)*m+v-1,A=(r+1)*(m-1)+v-1,g=(r+1)*(m-1)+v,x=(r+1)*m+v;o.push(S,A,x),o.push(A,g,x)}this.setIndex(o),this.setAttribute("position",new et(a,3)),this.setAttribute("normal",new et(l,3)),this.setAttribute("uv",new et(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ly(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Dy extends St{constructor(e=1,n=.4,i=64,r=8,s=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:n,tubularSegments:i,radialSegments:r,p:s,q:o},i=Math.floor(i),r=Math.floor(r);const a=[],l=[],c=[],h=[],f=new k,p=new k,m=new k,v=new k,S=new k,A=new k,g=new k;for(let _=0;_<=i;++_){const M=_/i*s*Math.PI*2;x(M,s,o,e,m),x(M+.01,s,o,e,v),A.subVectors(v,m),g.addVectors(v,m),S.crossVectors(A,g),g.crossVectors(S,A),S.normalize(),g.normalize();for(let b=0;b<=r;++b){const C=b/r*Math.PI*2,P=-n*Math.cos(C),B=n*Math.sin(C);f.x=m.x+(P*g.x+B*S.x),f.y=m.y+(P*g.y+B*S.y),f.z=m.z+(P*g.z+B*S.z),l.push(f.x,f.y,f.z),p.subVectors(f,m).normalize(),c.push(p.x,p.y,p.z),h.push(_/i),h.push(b/r)}}for(let _=1;_<=i;_++)for(let M=1;M<=r;M++){const b=(r+1)*(_-1)+(M-1),C=(r+1)*_+(M-1),P=(r+1)*_+M,B=(r+1)*(_-1)+M;a.push(b,C,B),a.push(C,P,B)}this.setIndex(a),this.setAttribute("position",new et(l,3)),this.setAttribute("normal",new et(c,3)),this.setAttribute("uv",new et(h,2));function x(_,M,b,C,P){const B=Math.cos(_),R=Math.sin(_),T=b/M*_,L=Math.cos(T);P.x=C*(2+L)*.5*B,P.y=C*(2+L)*R*.5,P.z=C*Math.sin(T)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Dy(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Ny extends St{constructor(e=new XM(new k(-1,-1,0),new k(-1,1,0),new k(1,1,0)),n=64,i=1,r=8,s=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:n,radius:i,radialSegments:r,closed:s};const o=e.computeFrenetFrames(n,s);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new k,l=new k,c=new he;let h=new k;const f=[],p=[],m=[],v=[];S(),this.setIndex(v),this.setAttribute("position",new et(f,3)),this.setAttribute("normal",new et(p,3)),this.setAttribute("uv",new et(m,2));function S(){for(let _=0;_<n;_++)A(_);A(s===!1?n:0),x(),g()}function A(_){h=e.getPointAt(_/n,h);const M=o.normals[_],b=o.binormals[_];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*M.x+B*b.x,l.y=R*M.y+B*b.y,l.z=R*M.z+B*b.z,l.normalize(),p.push(l.x,l.y,l.z),a.x=h.x+i*l.x,a.y=h.y+i*l.y,a.z=h.z+i*l.z,f.push(a.x,a.y,a.z)}}function g(){for(let _=1;_<=n;_++)for(let M=1;M<=r;M++){const b=(r+1)*(_-1)+(M-1),C=(r+1)*_+(M-1),P=(r+1)*_+M,B=(r+1)*(_-1)+M;v.push(b,C,B),v.push(C,P,B)}}function x(){for(let _=0;_<=n;_++)for(let M=0;M<=r;M++)c.x=_/n,c.y=M/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 Ny(new Sv[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class CF extends St{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const n=[],i=new Set,r=new k,s=new k;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,h=l.length;c<h;++c){const f=l[c],p=f.start,m=f.count;for(let v=p,S=p+m;v<S;v+=3)for(let A=0;A<3;A++){const g=a.getX(v+A),x=a.getX(v+(A+1)%3);r.fromBufferAttribute(o,g),s.fromBufferAttribute(o,x),WR(r,s,i)===!0&&(n.push(r.x,r.y,r.z),n.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 h=3*a+c,f=3*a+(c+1)%3;r.fromBufferAttribute(o,h),s.fromBufferAttribute(o,f),WR(r,s,i)===!0&&(n.push(r.x,r.y,r.z),n.push(s.x,s.y,s.z))}}this.setAttribute("position",new et(n,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function WR(t,e,n){const i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`;return n.has(i)===!0||n.has(r)===!0?!1:(n.add(i),n.add(r),!0)}var XR=Object.freeze({__proto__:null,BoxGeometry:Ra,CapsuleGeometry:wy,CircleGeometry:My,ConeGeometry:Ey,CylinderGeometry:fd,DodecahedronGeometry:Cy,EdgesGeometry:SF,ExtrudeGeometry:by,IcosahedronGeometry:Ry,LatheGeometry:fp,OctahedronGeometry:pp,PlaneGeometry:dd,PolyhedronGeometry:Pa,RingGeometry:Py,ShapeGeometry:Iy,SphereGeometry:mp,TetrahedronGeometry:By,TorusGeometry:Ly,TorusKnotGeometry:Dy,TubeGeometry:Ny,WireframeGeometry:CF});class TF extends zn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new ze(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 bF extends Wr{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class gp extends zn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new ze(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 ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ba,this.normalScale=new he(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 er,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 Xr extends gp{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 he(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Cn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new ze(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 ze(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new ze(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 RF extends zn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new ze(16777215),this.specular=new ze(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ba,this.normalScale=new he(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new er,this.combine=rp,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 PF extends zn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ze(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ba,this.normalScale=new he(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 IF extends zn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ba,this.normalScale=new he(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 BF extends zn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ba,this.normalScale=new he(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new er,this.combine=rp,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 LF extends zn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ze(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ba,this.normalScale=new he(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class DF extends Ri{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 wl(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function NF(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function FF(t){function e(r,s){return t[r]-t[s]}const n=t.length,i=new Array(n);for(let r=0;r!==n;++r)i[r]=r;return i.sort(e),i}function xS(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,o=0;o!==i;++s){const a=n[s]*e;for(let l=0;l!==e;++l)r[o++]=t[a+l]}return r}function KM(t,e,n,i){let r=1,s=t[0];for(;s!==void 0&&s[i]===void 0;)s=t[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),n.push.apply(n,o)),s=t[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(n,n.length)),s=t[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),n.push(o)),s=t[r++];while(s!==void 0)}function LK(t,e,n,i,r=30){const s=t.clone();s.name=e;const o=[];for(let l=0;l<s.tracks.length;++l){const c=s.tracks[l],h=c.getValueSize(),f=[],p=[];for(let m=0;m<c.times.length;++m){const v=c.times[m]*r;if(!(v<n||v>=i)){f.push(c.times[m]);for(let S=0;S<h;++S)p.push(c.values[m*h+S])}}f.length!==0&&(c.times=wl(f,c.times.constructor),c.values=wl(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 DK(t,e=0,n=t,i=30){i<=0&&(i=30);const r=n.tracks.length,s=e/i;for(let o=0;o<r;++o){const a=n.tracks[o],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const c=t.tracks.find(function(g){return g.name===a.name&&g.ValueTypeName===l});if(c===void 0)continue;let h=0;const f=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(h=f/3);let p=0;const m=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=m/3);const v=a.times.length-1;let S;if(s<=a.times[0]){const g=h,x=f-h;S=a.values.slice(g,x)}else if(s>=a.times[v]){const g=v*f+h,x=g+f-h;S=a.values.slice(g,x)}else{const g=a.createInterpolant(),x=h,_=f-h;g.evaluate(s),S=g.resultBuffer.slice(x,_)}l==="quaternion"&&new xn().fromArray(S).normalize().conjugate().toArray(S);const A=c.times.length;for(let g=0;g<A;++g){const x=g*m+p;if(l==="quaternion")xn.multiplyQuaternionsFlat(c.values,x,S,0,c.values,x);else{const _=m-p*2;for(let M=0;M<_;++M)c.values[x+M]-=S[M]}}}return t.blendMode=SM,t}const NK={convertArray:wl,isTypedArray:NF,getKeyframeOrder:FF,sortedArray:xS,flattenJSON:KM,subclip:LK,makeClipAdditive:DK};class pd{constructor(e,n,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new n.constructor(i),this.sampleValues=n,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let i=this._cachedIndex,r=n[i],s=n[i-1];e:{t:{let o;n:{i:if(!(e<r)){for(let a=i+2;;){if(r===void 0){if(e<s)break i;return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(s=r,r=n[++i],e<r)break t}o=n.length;break n}if(!(e>=s)){const a=n[1];e<a&&(i=2,s=a);for(let l=i-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(r=s,s=n[--i-1],e>=s)break t}o=i,i=0;break n}break e}for(;i<o;){const a=i+o>>>1;e<n[a]?o=a:i=a+1}if(r=n[i],s=n[i-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,s,r)}return this.interpolate_(i,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const n=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r;for(let o=0;o!==r;++o)n[o]=i[s+o];return n}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class kF extends pd{constructor(e,n,i,r){super(e,n,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:_l,endingEnd:_l}}intervalChanged_(e,n,i){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 Al:s=e,a=2*n-i;break;case bf:s=r.length-2,a=n+r[s]-r[s+1];break;default:s=e,a=i}if(l===void 0)switch(this.getSettings_().endingEnd){case Al:o=e,l=2*i-n;break;case bf:o=1,l=i+r[1]-r[0];break;default:o=e-1,l=n}const c=(i-n)*.5,h=this.valueSize;this._weightPrev=c/(n-a),this._weightNext=c/(l-i),this._offsetPrev=s*h,this._offsetNext=o*h}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,h=this._offsetPrev,f=this._offsetNext,p=this._weightPrev,m=this._weightNext,v=(i-n)/(r-n),S=v*v,A=S*v,g=-p*A+2*p*S-p*v,x=(1+p)*A+(-1.5-2*p)*S+(-.5+p)*v+1,_=(-1-m)*A+(1.5+m)*S+.5*v,M=m*A-m*S;for(let b=0;b!==a;++b)s[b]=g*o[h+b]+x*o[c+b]+_*o[l+b]+M*o[f+b];return s}}class qM extends pd{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,h=(i-n)/(r-n),f=1-h;for(let p=0;p!==a;++p)s[p]=o[c+p]*f+o[l+p]*h;return s}}class OF extends pd{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class vs{constructor(e,n,i,r){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(n===void 0||n.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=wl(n,this.TimeBufferType),this.values=wl(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const n=e.constructor;let i;if(n.toJSON!==this.toJSON)i=n.toJSON(e);else{i={name:e.name,times:wl(e.times,Array),values:wl(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new OF(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new qM(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new kF(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let n;switch(e){case qu:n=this.InterpolantFactoryMethodDiscrete;break;case Qu:n=this.InterpolantFactoryMethodLinear;break;case i0:n=this.InterpolantFactoryMethodSmooth;break}if(n===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=n,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return qu;case this.InterpolantFactoryMethodLinear:return Qu;case this.InterpolantFactoryMethodSmooth:return i0}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]+=e}return this}scale(e){if(e!==1){const n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]*=e}return this}trim(e,n){const i=this.times,r=i.length;let s=0,o=r-1;for(;s!==r&&i[s]<e;)++s;for(;o!==-1&&i[o]>n;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&NF(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===i0,s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const c=e[a],h=e[a+1];if(c!==h&&(a!==1||c!==e[0]))if(r)l=!0;else{const f=a*i,p=f-i,m=f+i;for(let v=0;v!==i;++v){const S=n[f+v];if(S!==n[p+v]||S!==n[m+v]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const f=a*i,p=o*i;for(let m=0;m!==i;++m)n[p+m]=n[f+m]}++o}}if(s>0){e[o]=e[s];for(let a=s*i,l=o*i,c=0;c!==i;++c)n[l+c]=n[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*i)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),i=this.constructor,r=new i(this.name,e,n);return r.createInterpolant=this.createInterpolant,r}}vs.prototype.TimeBufferType=Float32Array;vs.prototype.ValueBufferType=Float32Array;vs.prototype.DefaultInterpolation=Qu;class sc extends vs{constructor(e,n,i){super(e,n,i)}}sc.prototype.ValueTypeName="bool";sc.prototype.ValueBufferType=Array;sc.prototype.DefaultInterpolation=qu;sc.prototype.InterpolantFactoryMethodLinear=void 0;sc.prototype.InterpolantFactoryMethodSmooth=void 0;class QM extends vs{}QM.prototype.ValueTypeName="color";class ql extends vs{}ql.prototype.ValueTypeName="number";class UF extends pd{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-n)/(r-n);let c=e*a;for(let h=c+a;c!==h;c+=4)xn.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ql extends vs{InterpolantFactoryMethodLinear(e){return new UF(this.times,this.values,this.getValueSize(),e)}}Ql.prototype.ValueTypeName="quaternion";Ql.prototype.InterpolantFactoryMethodSmooth=void 0;class oc extends vs{constructor(e,n,i){super(e,n,i)}}oc.prototype.ValueTypeName="string";oc.prototype.ValueBufferType=Array;oc.prototype.DefaultInterpolation=qu;oc.prototype.InterpolantFactoryMethodLinear=void 0;oc.prototype.InterpolantFactoryMethodSmooth=void 0;class Yl extends vs{}Yl.prototype.ValueTypeName="vector";class $u{constructor(e="",n=-1,i=[],r=py){this.name=e,this.tracks=i,this.duration=n,this.blendMode=r,this.uuid=mr(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)n.push(kK(i[o]).scale(r));const s=new this(e.name,e.duration,n,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const n=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)n.push(vs.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,n,i,r){const s=n.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 h=FF(l);l=xS(l,1,h),c=xS(c,1,h),!r&&l[0]===0&&(l.push(s),c.push(c[0])),o.push(new ql(".morphTargetInfluences["+n[a].name+"]",l,c).scale(1/i))}return new this(e,-1,o)}static findByName(e,n){let i=e;if(!Array.isArray(e)){const r=e;i=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<i.length;r++)if(i[r].name===n)return i[r];return null}static CreateClipsFromMorphTargetSequences(e,n,i){const r={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],h=c.name.match(s);if(h&&h.length>1){const f=h[1];let p=r[f];p||(r[f]=p=[]),p.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],n,i));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(f,p,m,v,S){if(m.length!==0){const A=[],g=[];KM(m,A,g,v),A.length!==0&&S.push(new f(p,A,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f<c.length;f++){const p=c[f].keys;if(!(!p||p.length===0))if(p[0].morphTargets){const m={};let v;for(v=0;v<p.length;v++)if(p[v].morphTargets)for(let S=0;S<p[v].morphTargets.length;S++)m[p[v].morphTargets[S]]=-1;for(const S in m){const A=[],g=[];for(let x=0;x!==p[v].morphTargets.length;++x){const _=p[v];A.push(_.time),g.push(_.morphTarget===S?1:0)}r.push(new ql(".morphTargetInfluence["+S+"]",A,g))}l=m.length*o}else{const m=".bones["+n[f].name+"]";i(Yl,m+".position",p,"pos",r),i(Ql,m+".quaternion",p,"rot",r),i(Yl,m+".scale",p,"scl",r)}}return r.length===0?null:new this(s,l,r,a)}resetDuration(){const e=this.tracks;let n=0;for(let i=0,r=e.length;i!==r;++i){const s=this.tracks[i];n=Math.max(n,s.times[s.times.length-1])}return this.duration=n,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 n=0;n<this.tracks.length;n++)e=e&&this.tracks[n].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());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function FK(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ql;case"vector":case"vector2":case"vector3":case"vector4":return Yl;case"color":return QM;case"quaternion":return Ql;case"bool":case"boolean":return sc;case"string":return oc}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function kK(t){if(t.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=FK(t.type);if(t.times===void 0){const n=[],i=[];KM(t.keys,n,i,"value"),t.times=n,t.values=i}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const co={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class YM{constructor(e,n,i){const r=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=i,this.itemStart=function(h){a++,s===!1&&r.onStart!==void 0&&r.onStart(h,o,a),s=!0},this.itemEnd=function(h){o++,r.onProgress!==void 0&&r.onProgress(h,o,a),o===a&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(h){r.onError!==void 0&&r.onError(h)},this.resolveURL=function(h){return l?l(h):h},this.setURLModifier=function(h){return l=h,this},this.addHandler=function(h,f){return c.push(h,f),this},this.removeHandler=function(h){const f=c.indexOf(h);return f!==-1&&c.splice(f,2),this},this.getHandler=function(h){for(let f=0,p=c.length;f<p;f+=2){const m=c[f],v=c[f+1];if(m.global&&(m.lastIndex=0),m.test(h))return v}return null}}}const Su=new YM;class Pi{constructor(e){this.manager=e!==void 0?e:Su,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){const i=this;return new Promise(function(r,s){i.load(e,r,n,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}}Pi.DEFAULT_MATERIAL_NAME="__DEFAULT";const Ys={};class OK extends Error{constructor(e,n){super(e),this.response=n}}class yr extends Pi{constructor(e){super(e)}load(e,n,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=co.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{n&&n(s),this.manager.itemEnd(e)},0),s;if(Ys[e]!==void 0){Ys[e].push({onLoad:n,onProgress:i,onError:r});return}Ys[e]=[],Ys[e].push({onLoad:n,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const h=Ys[e],f=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=p?parseInt(p):0,v=m!==0;let S=0;const A=new ReadableStream({start(g){x();function x(){f.read().then(({done:_,value:M})=>{if(_)g.close();else{S+=M.byteLength;const b=new ProgressEvent("progress",{lengthComputable:v,loaded:S,total:m});for(let C=0,P=h.length;C<P;C++){const B=h[C];B.onProgress&&B.onProgress(b)}g.enqueue(M),x()}},_=>{g.error(_)})}}});return new Response(A)}else throw new OK(`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(h=>new DOMParser().parseFromString(h,a));case"json":return c.json();default:if(a===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),p=f&&f[1]?f[1].toLowerCase():void 0,m=new TextDecoder(p);return c.arrayBuffer().then(v=>m.decode(v))}}}).then(c=>{co.add(e,c);const h=Ys[e];delete Ys[e];for(let f=0,p=h.length;f<p;f++){const m=h[f];m.onLoad&&m.onLoad(c)}}).catch(c=>{const h=Ys[e];if(h===void 0)throw this.manager.itemError(e),c;delete Ys[e];for(let f=0,p=h.length;f<p;f++){const m=h[f];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}}class UK extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new yr(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const n=[];for(let i=0;i<e.length;i++){const r=$u.parse(e[i]);n.push(r)}return n}}class zK extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=[],a=new Ay,l=new yr(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(s.withCredentials);let c=0;function h(f){l.load(e[f],function(p){const m=s.parse(p,!0);o[f]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps},c+=1,c===6&&(m.mipmapCount===1&&(a.minFilter=Tn),a.image=o,a.format=m.format,a.needsUpdate=!0,n&&n(a))},i,r)}if(Array.isArray(e))for(let f=0,p=e.length;f<p;++f)h(f);else l.load(e,function(f){const p=s.parse(f,!0);if(p.isCubemap){const m=p.mipmaps.length/p.mipmapCount;for(let v=0;v<m;v++){o[v]={mipmaps:[]};for(let S=0;S<p.mipmapCount;S++)o[v].mipmaps.push(p.mipmaps[v*p.mipmapCount+S]),o[v].format=p.format,o[v].width=p.width,o[v].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=Tn),a.format=p.format,a.needsUpdate=!0,n&&n(a)},i,r);return a}}class Uf extends Pi{constructor(e){super(e)}load(e,n,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=co.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o;const a=Df("img");function l(){h(),co.add(e,this),n&&n(this),s.manager.itemEnd(e)}function c(f){h(),r&&r(f),s.manager.itemError(e),s.manager.itemEnd(e)}function h(){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),s.manager.itemStart(e),a.src=e,a}}class HK extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=new lp;s.colorSpace=Dr;const o=new Uf(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function l(c){o.load(e[c],function(h){s.images[c]=h,a++,a===6&&(s.needsUpdate=!0,n&&n(s))},void 0,r)}for(let c=0;c<e.length;++c)l(c);return s}}class GK extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new Ns,a=new yr(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(h){if(r!==void 0)r(h);else{console.error(h);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:dr,o.wrapT=c.wrapT!==void 0?c.wrapT:dr,o.magFilter=c.magFilter!==void 0?c.magFilter:Tn,o.minFilter=c.minFilter!==void 0?c.minFilter:Tn,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(o.colorSpace=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=zr),c.mipmapCount===1&&(o.minFilter=Tn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,n&&n(o,c)},i,r),o}}class vp extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=new Zt,o=new Uf(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,n!==void 0&&n(s)},i,r),s}}class Ia extends kt{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new ze(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(n.object.target=this.target.uuid),n}}class zF extends Ia{constructor(e,n,i){super(e,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(kt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new ze(n)}copy(e,n){return super.copy(e,n),this.groundColor.copy(e.groundColor),this}}const A1=new at,JR=new k,KR=new k;class ZM{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new he(512,512),this.map=null,this.mapPass=null,this.matrix=new at,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new cp,this._frameExtents=new he(1,1),this._viewportCount=1,this._viewports=[new Ut(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,i=this.matrix;JR.setFromMatrixPosition(e.matrixWorld),n.position.copy(JR),KR.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(KR),n.updateMatrixWorld(),A1.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(A1),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(A1)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){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 VK extends ZM{constructor(){super(new un(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,i=Yu*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||n.far;(i!==n.fov||r!==n.aspect||s!==n.far)&&(n.fov=i,n.aspect=r,n.far=s,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class $M extends Ia{constructor(e,n,i=0,r=Math.PI/3,s=0,o=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(kt.DEFAULT_UP),this.updateMatrix(),this.target=new kt,this.distance=i,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new VK}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const qR=new at,ah=new k,S1=new k;class jK extends ZM{constructor(){super(new un(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new he(4,2),this._viewportCount=6,this._viewports=[new Ut(2,1,1,1),new Ut(0,1,1,1),new Ut(3,1,1,1),new Ut(1,1,1,1),new Ut(3,0,1,1),new Ut(1,0,1,1)],this._cubeDirections=[new k(1,0,0),new k(-1,0,0),new k(0,0,1),new k(0,0,-1),new k(0,1,0),new k(0,-1,0)],this._cubeUps=[new k(0,1,0),new k(0,1,0),new k(0,1,0),new k(0,1,0),new k(0,0,1),new k(0,0,-1)]}updateMatrices(e,n=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),ah.setFromMatrixPosition(e.matrixWorld),i.position.copy(ah),S1.copy(i.position),S1.add(this._cubeDirections[n]),i.up.copy(this._cubeUps[n]),i.lookAt(S1),i.updateMatrixWorld(),r.makeTranslation(-ah.x,-ah.y,-ah.z),qR.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(qR)}}class eE extends Ia{constructor(e,n,i=0,r=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new jK}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class WK extends ZM{constructor(){super(new Hr(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class tE extends Ia{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(kt.DEFAULT_UP),this.updateMatrix(),this.target=new kt,this.shadow=new WK}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class HF extends Ia{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class GF extends Ia{constructor(e,n,i=10,r=10){super(e,n),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,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 n=super.toJSON(e);return n.object.width=this.width,n.object.height=this.height,n}}class VF{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new k)}set(e){for(let n=0;n<9;n++)this.coefficients[n].copy(e[n]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,n){const i=e.x,r=e.y,s=e.z,o=this.coefficients;return n.copy(o[0]).multiplyScalar(.282095),n.addScaledVector(o[1],.488603*r),n.addScaledVector(o[2],.488603*s),n.addScaledVector(o[3],.488603*i),n.addScaledVector(o[4],1.092548*(i*r)),n.addScaledVector(o[5],1.092548*(r*s)),n.addScaledVector(o[6],.315392*(3*s*s-1)),n.addScaledVector(o[7],1.092548*(i*s)),n.addScaledVector(o[8],.546274*(i*i-r*r)),n}getIrradianceAt(e,n){const i=e.x,r=e.y,s=e.z,o=this.coefficients;return n.copy(o[0]).multiplyScalar(.886227),n.addScaledVector(o[1],2*.511664*r),n.addScaledVector(o[2],2*.511664*s),n.addScaledVector(o[3],2*.511664*i),n.addScaledVector(o[4],2*.429043*i*r),n.addScaledVector(o[5],2*.429043*r*s),n.addScaledVector(o[6],.743125*s*s-.247708),n.addScaledVector(o[7],2*.429043*i*s),n.addScaledVector(o[8],.429043*(i*i-r*r)),n}add(e){for(let n=0;n<9;n++)this.coefficients[n].add(e.coefficients[n]);return this}addScaledSH(e,n){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],n);return this}scale(e){for(let n=0;n<9;n++)this.coefficients[n].multiplyScalar(e);return this}lerp(e,n){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],n);return this}equals(e){for(let n=0;n<9;n++)if(!this.coefficients[n].equals(e.coefficients[n]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,n=0){const i=this.coefficients;for(let r=0;r<9;r++)i[r].fromArray(e,n+r*3);return this}toArray(e=[],n=0){const i=this.coefficients;for(let r=0;r<9;r++)i[r].toArray(e,n+r*3);return e}static getBasisAt(e,n){const i=e.x,r=e.y,s=e.z;n[0]=.282095,n[1]=.488603*r,n[2]=.488603*s,n[3]=.488603*i,n[4]=1.092548*i*r,n[5]=1.092548*r*s,n[6]=.315392*(3*s*s-1),n[7]=1.092548*i*s,n[8]=.546274*(i*i-r*r)}}class jF extends Ia{constructor(e=new VF,n=1){super(void 0,n),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const n=super.toJSON(e);return n.object.sh=this.sh.toArray(),n}}class Fy extends Pi{constructor(e){super(e),this.textures={}}load(e,n,i,r){const s=this,o=new yr(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const n=this.textures;function i(s){return n[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),n[s]}const r=Fy.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 ze().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.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=i(o.value);break;case"c":r.uniforms[s].value=new ze().setHex(o.value);break;case"v2":r.uniforms[s].value=new he().fromArray(o.value);break;case"v3":r.uniforms[s].value=new k().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Ut().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Et().fromArray(o.value);break;case"m4":r.uniforms[s].value=new at().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=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new he().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.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=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new he().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:TF,SpriteMaterial:kM,RawShaderMaterial:bF,ShaderMaterial:Wr,PointsMaterial:hp,MeshPhysicalMaterial:Xr,MeshStandardMaterial:gp,MeshPhongMaterial:RF,MeshToonMaterial:PF,MeshNormalMaterial:IF,MeshLambertMaterial:BF,MeshDepthMaterial:NM,MeshDistanceMaterial:FM,MeshBasicMaterial:hr,MeshMatcapMaterial:LF,LineDashedMaterial:DF,LineBasicMaterial:Ri,Material:zn};return new n[e]}}class ma{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let i=0,r=e.length;i<r;i++)n+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(n))}catch{return n}}static extractUrlBase(e){const n=e.lastIndexOf("/");return n===-1?"./":e.slice(0,n+1)}static resolveURL(e,n){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(n)&&/^\//.test(e)&&(n=n.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:n+e)}}class WF extends St{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 XF extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new yr(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const n={},i={};function r(m,v){if(n[v]!==void 0)return n[v];const A=m.interleavedBuffers[v],g=s(m,A.buffer),x=xu(A.type,g),_=new up(x,A.stride);return _.uuid=A.uuid,n[v]=_,_}function s(m,v){if(i[v]!==void 0)return i[v];const A=m.arrayBuffers[v],g=new Uint32Array(A).buffer;return i[v]=g,g}const o=e.isInstancedBufferGeometry?new WF:new St,a=e.data.index;if(a!==void 0){const m=xu(a.type,a.array);o.setIndex(new Nt(m,1))}const l=e.data.attributes;for(const m in l){const v=l[m];let S;if(v.isInterleavedBufferAttribute){const A=r(e.data,v.data);S=new Sa(A,v.itemSize,v.offset,v.normalized)}else{const A=xu(v.type,v.array),g=v.isInstancedBufferAttribute?Jl:Nt;S=new g(A,v.itemSize,v.normalized)}v.name!==void 0&&(S.name=v.name),v.usage!==void 0&&S.setUsage(v.usage),o.setAttribute(m,S)}const c=e.data.morphAttributes;if(c)for(const m in c){const v=c[m],S=[];for(let A=0,g=v.length;A<g;A++){const x=v[A];let _;if(x.isInterleavedBufferAttribute){const M=r(e.data,x.data);_=new Sa(M,x.itemSize,x.offset,x.normalized)}else{const M=xu(x.type,x.array);_=new Nt(M,x.itemSize,x.normalized)}x.name!==void 0&&(_.name=x.name),S.push(_)}o.morphAttributes[m]=S}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const f=e.data.groups||e.data.drawcalls||e.data.offsets;if(f!==void 0)for(let m=0,v=f.length;m!==v;++m){const S=f[m];o.addGroup(S.start,S.count,S.materialIndex)}const p=e.data.boundingSphere;if(p!==void 0){const m=new k;p.center!==void 0&&m.fromArray(p.center),o.boundingSphere=new di(m,p.radius)}return e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class XK extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=this.path===""?ma.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new yr(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(f){r!==void 0&&r(f),console.error("THREE:ObjectLoader: Can't parse "+e+".",f.message);return}const h=c.metadata;if(h===void 0||h.type===void 0||h.type.toLowerCase()==="geometry"){r!==void 0&&r(new Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}s.parse(c,n)},i,r)}async loadAsync(e,n){const i=this,r=this.path===""?ma.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||r;const s=new yr(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials);const o=await s.loadAsync(e,n),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 i.parseAsync(a)}parse(e,n){const i=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,function(){n!==void 0&&n(c)}),a=this.parseTextures(e.textures,o),l=this.parseMaterials(e.materials,a),c=this.parseObject(e.object,s,l,a,i),h=this.parseSkeletons(e.skeletons,c);if(this.bindSkeletons(c,h),this.bindLightTargets(c),n!==void 0){let f=!1;for(const p in o)if(o[p].data instanceof HTMLImageElement){f=!0;break}f===!1&&n(c)}return c}async parseAsync(e){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),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,n),c=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,c),this.bindLightTargets(l),l}parseShapes(e){const n={};if(e!==void 0)for(let i=0,r=e.length;i<r;i++){const s=new Fl().fromJSON(e[i]);n[s.uuid]=s}return n}parseSkeletons(e,n){const i={},r={};if(n.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 dp().fromJSON(e[s],r);i[a.uuid]=a}return i}parseGeometries(e,n){const i={};if(e!==void 0){const r=new XF;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 XR?a=XR[l.type].fromJSON(l,n):console.warn(`THREE.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),i[l.uuid]=a}}return i}parseMaterials(e,n){const i={},r={};if(e!==void 0){const s=new Fy;s.setTextures(n);for(let o=0,a=e.length;o<a;o++){const l=e[o];i[l.uuid]===void 0&&(i[l.uuid]=s.parse(l)),r[l.uuid]=i[l.uuid]}}return r}parseAnimations(e){const n={};if(e!==void 0)for(let i=0;i<e.length;i++){const r=e[i],s=$u.parse(r);n[s.uuid]=s}return n}parseImages(e,n){const i=this,r={};let s;function o(l){return i.manager.itemStart(l),s.load(l,function(){i.manager.itemEnd(l)},void 0,function(){i.manager.itemError(l),i.manager.itemEnd(l)})}function a(l){if(typeof l=="string"){const c=l,h=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c)?c:i.resourcePath+c;return o(h)}else return l.data?{data:xu(l.type,l.data),width:l.width,height:l.height}:null}if(e!==void 0&&e.length>0){const l=new YM(n);s=new Uf(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,h=e.length;c<h;c++){const f=e[c],p=f.url;if(Array.isArray(p)){const m=[];for(let v=0,S=p.length;v<S;v++){const A=p[v],g=a(A);g!==null&&(g instanceof HTMLImageElement?m.push(g):m.push(new Ns(g.data,g.width,g.height)))}r[f.uuid]=new Sl(m)}else{const m=a(f.url);r[f.uuid]=new Sl(m)}}}return r}async parseImagesAsync(e){const n=this,i={};let r;async function s(o){if(typeof o=="string"){const a=o,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:n.resourcePath+a;return await r.loadAsync(l)}else return o.data?{data:xu(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){r=new Uf(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 h=[];for(let f=0,p=c.length;f<p;f++){const m=c[f],v=await s(m);v!==null&&(v instanceof HTMLImageElement?h.push(v):h.push(new Ns(v.data,v.width,v.height)))}i[l.uuid]=new Sl(h)}else{const h=await s(l.url);i[l.uuid]=new Sl(h)}}}return i}parseTextures(e,n){function i(s,o){return typeof s=="number"?s:(console.warn("THREE.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&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),n[a.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const l=n[a.image],c=l.data;let h;Array.isArray(c)?(h=new lp,c.length===6&&(h.needsUpdate=!0)):(c&&c.data?h=new Ns:h=new Zt,c&&(h.needsUpdate=!0)),h.source=l,h.uuid=a.uuid,a.name!==void 0&&(h.name=a.name),a.mapping!==void 0&&(h.mapping=i(a.mapping,JK)),a.channel!==void 0&&(h.channel=a.channel),a.offset!==void 0&&h.offset.fromArray(a.offset),a.repeat!==void 0&&h.repeat.fromArray(a.repeat),a.center!==void 0&&h.center.fromArray(a.center),a.rotation!==void 0&&(h.rotation=a.rotation),a.wrap!==void 0&&(h.wrapS=i(a.wrap[0],QR),h.wrapT=i(a.wrap[1],QR)),a.format!==void 0&&(h.format=a.format),a.internalFormat!==void 0&&(h.internalFormat=a.internalFormat),a.type!==void 0&&(h.type=a.type),a.colorSpace!==void 0&&(h.colorSpace=a.colorSpace),a.minFilter!==void 0&&(h.minFilter=i(a.minFilter,YR)),a.magFilter!==void 0&&(h.magFilter=i(a.magFilter,YR)),a.anisotropy!==void 0&&(h.anisotropy=a.anisotropy),a.flipY!==void 0&&(h.flipY=a.flipY),a.generateMipmaps!==void 0&&(h.generateMipmaps=a.generateMipmaps),a.premultiplyAlpha!==void 0&&(h.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(h.unpackAlignment=a.unpackAlignment),a.compareFunction!==void 0&&(h.compareFunction=a.compareFunction),a.userData!==void 0&&(h.userData=a.userData),r[a.uuid]=h}return r}parseObject(e,n,i,r,s){let o;function a(p){return n[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",p),n[p]}function l(p){if(p!==void 0){if(Array.isArray(p)){const m=[];for(let v=0,S=p.length;v<S;v++){const A=p[v];i[A]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",A),m.push(i[A])}return m}return i[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",p),i[p]}}function c(p){return r[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",p),r[p]}let h,f;switch(e.type){case"Scene":o=new xv,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new ze(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 xy(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new yy(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 un(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 Hr(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 HF(e.color,e.intensity);break;case"DirectionalLight":o=new tE(e.color,e.intensity),o.target=e.target||"";break;case"PointLight":o=new eE(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new GF(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new $M(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),o.target=e.target||"";break;case"HemisphereLight":o=new zF(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=new jF().fromJSON(e);break;case"SkinnedMesh":h=a(e.geometry),f=l(e.material),o=new OM(h,f),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":h=a(e.geometry),f=l(e.material),o=new bn(h,f);break;case"InstancedMesh":h=a(e.geometry),f=l(e.material);const p=e.count,m=e.instanceMatrix,v=e.instanceColor;o=new UM(h,f,p),o.instanceMatrix=new Jl(new Float32Array(m.array),16),v!==void 0&&(o.instanceColor=new Jl(new Float32Array(v.array),v.itemSize));break;case"BatchedMesh":h=a(e.geometry),f=l(e.material),o=new gF(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,f),o.geometry=h,o.perObjectFrustumCulled=e.perObjectFrustumCulled,o.sortObjects=e.sortObjects,o._drawRanges=e.drawRanges,o._reservedRanges=e.reservedRanges,o._visibility=e.visibility,o._active=e.active,o._bounds=e.bounds.map(S=>{const A=new ui;A.min.fromArray(S.boxMin),A.max.fromArray(S.boxMax);const g=new di;return g.radius=S.sphereRadius,g.center.fromArray(S.sphereCenter),{boxInitialized:S.boxInitialized,box:A,sphereInitialized:S.sphereInitialized,sphere:g}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":o=new mF;break;case"Line":o=new Eo(a(e.geometry),l(e.material));break;case"LineLoop":o=new zM(a(e.geometry),l(e.material));break;case"LineSegments":o=new ms(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new HM(a(e.geometry),l(e.material));break;case"Sprite":o=new pF(l(e.material));break;case"Group":o=new lo;break;case"Bone":o=new _y;break;default:o=new kt}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],n,i,r,s))}if(e.animations!==void 0){const p=e.animations;for(let m=0;m<p.length;m++){const v=p[m];o.animations.push(s[v])}}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 v=p[m],S=o.getObjectByProperty("uuid",v.object);S!==void 0&&o.addLevel(S,v.distance,v.hysteresis)}}return o}bindSkeletons(e,n){Object.keys(n).length!==0&&e.traverse(function(i){if(i.isSkinnedMesh===!0&&i.skeleton!==void 0){const r=n[i.skeleton];r===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",i.skeleton):i.bind(r,i.bindMatrix)}})}bindLightTargets(e){e.traverse(function(n){if(n.isDirectionalLight||n.isSpotLight){const i=n.target,r=e.getObjectByProperty("uuid",i);r!==void 0?n.target=r:n.target=new kt}})}}const JK={UVMapping:oy,CubeReflectionMapping:wo,CubeRefractionMapping:_a,EquirectangularReflectionMapping:Cf,EquirectangularRefractionMapping:Tf,CubeUVReflectionMapping:cd},QR={RepeatWrapping:Aa,ClampToEdgeWrapping:dr,MirroredRepeatWrapping:Ju},YR={NearestFilter:jn,NearestMipmapNearestFilter:ay,NearestMipmapLinearFilter:xl,LinearFilter:Tn,LinearMipmapNearestFilter:Iu,LinearMipmapLinearFilter:zr};class JF extends Pi{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=co.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{n&&n(c),s.manager.itemEnd(e)}).catch(c=>{r&&r(c)});return}return setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;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 co.add(e,c),n&&n(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),co.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});co.add(e,l),s.manager.itemStart(e)}}let Eg;class nE{static getContext(){return Eg===void 0&&(Eg=new(window.AudioContext||window.webkitAudioContext)),Eg}static setContext(e){Eg=e}}class KK extends Pi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new yr(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);nE.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},i,r);function a(l){r?r(l):console.error(l),s.manager.itemError(e)}}}const ZR=new at,$R=new at,Qa=new at;class qK{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new un,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new un,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 n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,Qa.copy(e.projectionMatrix);const r=n.eyeSep/2,s=r*n.near/n.focus,o=n.near*Math.tan(Dl*n.fov*.5)/n.zoom;let a,l;$R.elements[12]=-r,ZR.elements[12]=r,a=-o*n.aspect+s,l=o*n.aspect+s,Qa.elements[0]=2*n.near/(l-a),Qa.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Qa),a=-o*n.aspect-s,l=o*n.aspect-s,Qa.elements[0]=2*n.near/(l-a),Qa.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Qa)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply($R),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(ZR)}}class iE{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=eP(),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 n=eP();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function eP(){return(typeof performance>"u"?Date:performance).now()}const Ya=new k,tP=new xn,QK=new k,Za=new k;class YK extends kt{constructor(){super(),this.type="AudioListener",this.context=nE.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new iE}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 n=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ya,tP,QK),Za.set(0,0,-1).applyQuaternion(tP),n.positionX){const r=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(Ya.x,r),n.positionY.linearRampToValueAtTime(Ya.y,r),n.positionZ.linearRampToValueAtTime(Ya.z,r),n.forwardX.linearRampToValueAtTime(Za.x,r),n.forwardY.linearRampToValueAtTime(Za.y,r),n.forwardZ.linearRampToValueAtTime(Za.z,r),n.upX.linearRampToValueAtTime(i.x,r),n.upY.linearRampToValueAtTime(i.y,r),n.upZ.linearRampToValueAtTime(i.z,r)}else n.setPosition(Ya.x,Ya.y,Ya.z),n.setOrientation(Za.x,Za.y,Za.z,i.x,i.y,i.z)}}class KF extends kt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e<n;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,n=this.filters.length;e<n;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){console.warn("THREE.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}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){console.warn("THREE.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}}const $a=new k,nP=new xn,ZK=new k,el=new k;class $K extends KF{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,n,i){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=n,this.panner.coneOuterGain=i,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose($a,nP,ZK),el.set(0,0,1).applyQuaternion(nP);const n=this.panner;if(n.positionX){const i=this.context.currentTime+this.listener.timeDelta;n.positionX.linearRampToValueAtTime($a.x,i),n.positionY.linearRampToValueAtTime($a.y,i),n.positionZ.linearRampToValueAtTime($a.z,i),n.orientationX.linearRampToValueAtTime(el.x,i),n.orientationY.linearRampToValueAtTime(el.y,i),n.orientationZ.linearRampToValueAtTime(el.z,i)}else n.setPosition($a.x,$a.y,$a.z),n.setOrientation(el.x,el.y,el.z)}}class eq{constructor(e,n=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=n,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 n=this.getFrequencyData();for(let i=0;i<n.length;i++)e+=n[i];return e/n.length}}class qF{constructor(e,n,i){this.binding=e,this.valueSize=i;let r,s,o;switch(n){case"quaternion":r=this._slerp,s=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(i*6),this._workIndex=5;break;case"string":case"bool":r=this._select,s=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(i*5);break;default:r=this._lerp,s=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(i*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,n){const i=this.buffer,r=this.valueSize,s=e*r+r;let o=this.cumulativeWeight;if(o===0){for(let a=0;a!==r;++a)i[s+a]=i[a];o=n}else{o+=n;const a=n/o;this._mixBufferRegion(i,s,0,a,r)}this.cumulativeWeight=o}accumulateAdditive(e){const n=this.buffer,i=this.valueSize,r=i*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(n,r,0,e,i),this.cumulativeWeightAdditive+=e}apply(e){const n=this.valueSize,i=this.buffer,r=e*n+n,s=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,s<1){const l=n*this._origIndex;this._mixBufferRegion(i,r,l,1-s,n)}o>0&&this._mixBufferRegionAdditive(i,r,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(i[l]!==i[l+n]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,n=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(n,r);for(let s=i,o=r;s!==o;++s)n[s]=n[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let i=e;i<n;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,n=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[n+i]=this.buffer[e+i]}_select(e,n,i,r,s){if(r>=.5)for(let o=0;o!==s;++o)e[n+o]=e[i+o]}_slerp(e,n,i,r){xn.slerpFlat(e,n,e,n,e,i,r)}_slerpAdditive(e,n,i,r,s){const o=this._workIndex*s;xn.multiplyQuaternionsFlat(e,o,e,n,e,i),xn.slerpFlat(e,n,e,n,e,o,r)}_lerp(e,n,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=n+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,n,i,r,s){for(let o=0;o!==s;++o){const a=n+o;e[a]=e[a]+e[i+o]*r}}}const rE="\\[\\]\\.:\\/",tq=new RegExp("["+rE+"]","g"),sE="[^"+rE+"]",nq="[^"+rE.replace("\\.","")+"]",iq=/((?:WC+[\/:])*)/.source.replace("WC",sE),rq=/(WCOD+)?/.source.replace("WCOD",nq),sq=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sE),oq=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sE),aq=new RegExp("^"+iq+rq+sq+oq+"$"),lq=["material","materials","bones","map"];class cq{constructor(e,n,i){const r=i||Ot.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,r)}getValue(e,n){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,n)}setValue(e,n){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].unbind()}}class Ot{constructor(e,n,i){this.path=n,this.parsedPath=i||Ot.parseTrackName(n),this.node=Ot.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,i){return e&&e.isAnimationObjectGroup?new Ot.Composite(e,n,i):new Ot(e,n,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(tq,"")}static parseTrackName(e){const n=aq.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);lq.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(n);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o<s.length;o++){const a=s[o];if(a.name===n||a.uuid===n)return a;const l=i(a.children);if(l)return l}return null},r=i(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,n){e[n]=this.targetObject[this.propertyName]}_getValue_array(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)e[n++]=i[r]}_getValue_arrayElement(e,n){e[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,n){this.resolvedProperty.toArray(e,n)}_setValue_direct(e,n){this.targetObject[this.propertyName]=e[n]}_setValue_direct_setNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++]}_setValue_array_setNeedsUpdate(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,n){this.resolvedProperty[this.propertyIndex]=e[n]}_setValue_arrayElement_setNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,n){this.resolvedProperty.fromArray(e,n)}_setValue_fromArray_setNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,n){this.bind(),this.getValue(e,n)}_setValue_unbound(e,n){this.bind(),this.setValue(e,n)}bind(){let e=this.node;const n=this.parsedPath,i=n.objectName,r=n.propertyName;let s=n.propertyIndex;if(e||(e=Ot.findNode(this.rootNode,n.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let c=n.objectIndex;switch(i){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.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){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let h=0;h<e.length;h++)if(e[h].name===c){c=h;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[i]}if(c!==void 0){if(e[c]===void 0){console.error("THREE.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=n.nodeName;console.error("THREE.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.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(r==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.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}}Ot.Composite=cq;Ot.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Ot.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Ot.prototype.GetterByBindingType=[Ot.prototype._getValue_direct,Ot.prototype._getValue_array,Ot.prototype._getValue_arrayElement,Ot.prototype._getValue_toArray];Ot.prototype.SetterByBindingTypeAndVersioning=[[Ot.prototype._setValue_direct,Ot.prototype._setValue_direct_setNeedsUpdate,Ot.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ot.prototype._setValue_array,Ot.prototype._setValue_array_setNeedsUpdate,Ot.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ot.prototype._setValue_arrayElement,Ot.prototype._setValue_arrayElement_setNeedsUpdate,Ot.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ot.prototype._setValue_fromArray,Ot.prototype._setValue_fromArray_setNeedsUpdate,Ot.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class uq{constructor(){this.isAnimationObjectGroup=!0,this.uuid=mr(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let i=0,r=arguments.length;i!==r;++i)e[arguments[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}add(){const e=this._objects,n=this._indicesByUUID,i=this._paths,r=this._parsedPaths,s=this._bindings,o=s.length;let a,l=e.length,c=this.nCachedObjects_;for(let h=0,f=arguments.length;h!==f;++h){const p=arguments[h],m=p.uuid;let v=n[m];if(v===void 0){v=l++,n[m]=v,e.push(p);for(let S=0,A=o;S!==A;++S)s[S].push(new Ot(p,i[S],r[S]))}else if(v<c){a=e[v];const S=--c,A=e[S];n[A.uuid]=v,e[v]=A,n[m]=S,e[S]=p;for(let g=0,x=o;g!==x;++g){const _=s[g],M=_[S];let b=_[v];_[v]=M,b===void 0&&(b=new Ot(p,i[g],r[g])),_[S]=b}}else e[v]!==a&&console.error("THREE.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,n=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const l=arguments[o],c=l.uuid,h=n[c];if(h!==void 0&&h>=s){const f=s++,p=e[f];n[p.uuid]=h,e[h]=p,n[c]=f,e[f]=l;for(let m=0,v=r;m!==v;++m){const S=i[m],A=S[f],g=S[h];S[h]=A,S[f]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,n=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],h=c.uuid,f=n[h];if(f!==void 0)if(delete n[h],f<s){const p=--s,m=e[p],v=--o,S=e[v];n[m.uuid]=f,e[f]=m,n[S.uuid]=p,e[p]=S,e.pop();for(let A=0,g=r;A!==g;++A){const x=i[A],_=x[p],M=x[v];x[f]=_,x[p]=M,x.pop()}}else{const p=--o,m=e[p];p>0&&(n[m.uuid]=f),e[f]=m,e.pop();for(let v=0,S=r;v!==S;++v){const A=i[v];A[f]=A[p],A.pop()}}}this.nCachedObjects_=s}subscribe_(e,n){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,h=this.nCachedObjects_,f=new Array(c);r=s.length,i[e]=r,o.push(e),a.push(n),s.push(f);for(let p=h,m=l.length;p!==m;++p){const v=l[p];f[p]=new Ot(v,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,i=n[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];n[c]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class QF{constructor(e,n,i=null,r=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=i,this.blendMode=r;const s=n.tracks,o=s.length,a=new Array(o),l={endingStart:_l,endingEnd:_l};for(let c=0;c!==o;++c){const h=s[c].createInterpolant(null);a[c]=h,h.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=zN,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,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,i){if(e.fadeOut(n),this.fadeIn(n),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,i){return e.crossFadeFrom(this,n,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+i,c[0]=e/o,c[1]=n/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,n,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?n=0:(this._startTime=null,n=i*l)}n*=this._updateTimeScale(e);const o=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case SM:for(let h=0,f=l.length;h!==f;++h)l[h].evaluate(o),c[h].accumulateAdditive(a);break;case py:default:for(let h=0,f=l.length;h!==f;++h)l[h].evaluate(o),c[h].accumulate(r,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];n*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];n*=r,e>i.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===HN;if(e===0)return s===-1?r:o&&(s&1)===1?n-r:r;if(i===UN){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=n)r=n;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>=n||r<0){const a=Math.floor(r/n);r-=n*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?n: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 n-r}return r}_setEndings(e,n,i){const r=this._interpolantSettings;i?(r.endingStart=Al,r.endingEnd=Al):(e?r.endingStart=this.zeroSlopeAtStart?Al:_l:r.endingStart=bf,n?r.endingEnd=this.zeroSlopeAtEnd?Al:_l:r.endingEnd=bf)}_scheduleFading(e,n,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=n,a[1]=s+e,l[1]=i,this}}const dq=new Float32Array(1);class hq extends Os{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let h=c[l];h===void 0&&(h={},c[l]=h);for(let f=0;f!==s;++f){const p=r[f],m=p.name;let v=h[m];if(v!==void 0)++v.referenceCount,o[f]=v;else{if(v=o[f],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const S=n&&n._propertyBindings[f].binding.parsedPath;v=new qF(Ot.create(i,m,S),p.ValueTypeName,p.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),o[f]=v}a[f].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n<this._nActiveActions}_addInactiveAction(e,n,i){const r=this._actions,s=this._actionsByClip;let o=s[n];if(o===void 0)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,s[n]=o;else{const a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[i]=e}_removeInactiveAction(e){const n=this._actions,i=n[n.length-1],r=e._cacheIndex;i._cacheIndex=r,n[r]=i,n.pop(),e._cacheIndex=null;const s=e._clip.uuid,o=this._actionsByClip,a=o[s],l=a.knownActions,c=l[l.length-1],h=e._byClipCacheIndex;c._byClipCacheIndex=h,l[h]=c,l.pop(),e._byClipCacheIndex=null;const f=a.actionByRoot,p=(e._localRoot||this._root).uuid;delete f[p],l.length===0&&delete o[s],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];--s.referenceCount===0&&this._removeInactiveBinding(s)}}_lendAction(e){const n=this._actions,i=e._cacheIndex,r=this._nActiveActions++,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_takeBackAction(e){const n=this._actions,i=e._cacheIndex,r=--this._nActiveActions,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_addInactiveBinding(e,n,i){const r=this._bindingsByRootAndName,s=this._bindings;let o=r[n];o===void 0&&(o={},r[n]=o),o[i]=e,e._cacheIndex=s.length,s.push(e)}_removeInactiveBinding(e){const n=this._bindings,i=e.binding,r=i.rootNode.uuid,s=i.path,o=this._bindingsByRootAndName,a=o[r],l=n[n.length-1],c=e._cacheIndex;l._cacheIndex=c,n[c]=l,n.pop(),delete a[s],Object.keys(a).length===0&&delete o[r]}_lendBinding(e){const n=this._bindings,i=e._cacheIndex,r=this._nActiveBindings++,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_takeBackBinding(e){const n=this._bindings,i=e._cacheIndex,r=--this._nActiveBindings,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_lendControlInterpolant(){const e=this._controlInterpolants,n=this._nActiveControlInterpolants++;let i=e[n];return i===void 0&&(i=new qM(new Float32Array(2),new Float32Array(2),1,dq),i.__cacheIndex=n,e[n]=i),i}_takeBackControlInterpolant(e){const n=this._controlInterpolants,i=e.__cacheIndex,r=--this._nActiveControlInterpolants,s=n[r];e.__cacheIndex=r,n[r]=e,s.__cacheIndex=i,n[i]=s}clipAction(e,n,i){const r=n||this._root,s=r.uuid;let o=typeof e=="string"?$u.findByName(r,e):e;const a=o!==null?o.uuid:e,l=this._actionsByClip[a];let c=null;if(i===void 0&&(o!==null?i=o.blendMode:i=py),l!==void 0){const f=l.actionByRoot[s];if(f!==void 0&&f.blendMode===i)return f;c=l.knownActions[0],o===null&&(o=c._clip)}if(o===null)return null;const h=new QF(this,o,n,i);return this._bindAction(h,c),this._addInactiveAction(h,a,s),h}existingAction(e,n){const i=n||this._root,r=i.uuid,s=typeof e=="string"?$u.findByName(i,e):e,o=s?s.uuid:e,a=this._actionsByClip[o];return a!==void 0&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions,n=this._nActiveActions;for(let i=n-1;i>=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const n=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)n[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 n=0;n<this._actions.length;n++)this._actions[n].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const n=this._actions,i=e.uuid,r=this._actionsByClip,s=r[i];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 h=c._cacheIndex,f=n[n.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,f._cacheIndex=h,n[h]=f,n.pop(),this._removeInactiveBindingsForAction(c)}delete r[i]}}uncacheRoot(e){const n=e.uuid,i=this._actionsByClip;for(const o in i){const a=i[o].actionByRoot,l=a[n];l!==void 0&&(this._deactivateAction(l),this._removeInactiveAction(l))}const r=this._bindingsByRootAndName,s=r[n];if(s!==void 0)for(const o in s){const a=s[o];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(e,n){const i=this.existingAction(e,n);i!==null&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class oE{constructor(e){this.value=e}clone(){return new oE(this.value.clone===void 0?this.value:this.value.clone())}}let fq=0;class pq extends Os{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:fq++}),this.name="",this.usage=Bf,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const n=this.uniforms.indexOf(e);return n!==-1&&this.uniforms.splice(n,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;const n=e.uniforms;this.uniforms.length=0;for(let i=0,r=n.length;i<r;i++){const s=Array.isArray(n[i])?n[i]:[n[i]];for(let o=0;o<s.length;o++)this.uniforms.push(s[o].clone())}return this}clone(){return new this.constructor().copy(this)}}class mq extends up{constructor(e,n,i=1){super(e,n),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const n=super.clone(e);return n.meshPerAttribute=this.meshPerAttribute,n}toJSON(e){const n=super.toJSON(e);return n.isInstancedInterleavedBuffer=!0,n.meshPerAttribute=this.meshPerAttribute,n}}class gq{constructor(e,n,i,r,s){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=n,this.itemSize=i,this.elementSize=r,this.count=s,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,n){return this.type=e,this.elementSize=n,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}const iP=new at;class YF{constructor(e,n,i=0,r=1/0){this.ray=new rc(e,n),this.near=i,this.far=r,this.camera=null,this.layers=new Nl,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,n){this.ray.set(e,n)}setFromCamera(e,n){n.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(n).sub(this.ray.origin).normalize(),this.camera=n):n.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld),this.camera=n):console.error("THREE.Raycaster: Unsupported camera type: "+n.type)}setFromXRController(e){return iP.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(iP),this}intersectObject(e,n=!0,i=[]){return _S(e,this,i,n),i.sort(rP),i}intersectObjects(e,n=!0,i=[]){for(let r=0,s=e.length;r<s;r++)_S(e[r],this,i,n);return i.sort(rP),i}}function rP(t,e){return t.distance-e.distance}function _S(t,e,n,i){let r=!0;if(t.layers.test(e.layers)&&t.raycast(e,n)===!1&&(r=!1),r===!0&&i===!0){const s=t.children;for(let o=0,a=s.length;o<a;o++)_S(s[o],e,n,!0)}}class wv{constructor(e=1,n=0,i=0){return this.radius=e,this.phi=n,this.theta=i,this}set(e,n,i){return this.radius=e,this.phi=n,this.theta=i,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,i){return this.radius=Math.sqrt(e*e+n*n+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(Cn(n/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class vq{constructor(e=1,n=0,i=0){return this.radius=e,this.theta=n,this.y=i,this}set(e,n,i){return this.radius=e,this.theta=n,this.y=i,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,i){return this.radius=Math.sqrt(e*e+i*i),this.theta=Math.atan2(e,i),this.y=n,this}clone(){return new this.constructor().copy(this)}}class aE{constructor(e,n,i,r){aE.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,n,i,r)}identity(){return this.set(1,0,0,1),this}fromArray(e,n=0){for(let i=0;i<4;i++)this.elements[i]=e[i+n];return this}set(e,n,i,r){const s=this.elements;return s[0]=e,s[2]=n,s[1]=i,s[3]=r,this}}const sP=new he;class yq{constructor(e=new he(1/0,1/0),n=new he(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=sP.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.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,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,sP).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 oP=new k,Cg=new k;class xq{constructor(e=new k,n=new k){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),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,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){oP.subVectors(e,this.start),Cg.subVectors(this.end,this.start);const i=Cg.dot(Cg);let s=Cg.dot(oP)/i;return n&&(s=Cn(s,0,1)),s}closestPointToPoint(e,n,i){const r=this.closestPointToPointParameter(e,n);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const aP=new k;class _q extends kt{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const i=new St,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o<l;o++,a++){const c=o/l*Math.PI*2,h=a/l*Math.PI*2;r.push(Math.cos(c),Math.sin(c),1,Math.cos(h),Math.sin(h),1)}i.setAttribute("position",new et(r,3));const s=new Ri({fog:!1,toneMapped:!1});this.cone=new ms(i,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,n=e*Math.tan(this.light.angle);this.cone.scale.set(n,n,e),aP.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(aP),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Xo=new k,Tg=new at,w1=new at;class Aq extends ms{constructor(e){const n=ZF(e),i=new St,r=[],s=[],o=new ze(0,0,1),a=new ze(0,1,0);for(let c=0;c<n.length;c++){const h=n[c];h.parent&&h.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),s.push(o.r,o.g,o.b),s.push(a.r,a.g,a.b))}i.setAttribute("position",new et(r,3)),i.setAttribute("color",new et(s,3));const l=new Ri({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(i,l),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=n,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const n=this.bones,i=this.geometry,r=i.getAttribute("position");w1.copy(this.root.matrixWorld).invert();for(let s=0,o=0;s<n.length;s++){const a=n[s];a.parent&&a.parent.isBone&&(Tg.multiplyMatrices(w1,a.matrixWorld),Xo.setFromMatrixPosition(Tg),r.setXYZ(o,Xo.x,Xo.y,Xo.z),Tg.multiplyMatrices(w1,a.parent.matrixWorld),Xo.setFromMatrixPosition(Tg),r.setXYZ(o+1,Xo.x,Xo.y,Xo.z),o+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function ZF(t){const e=[];t.isBone===!0&&e.push(t);for(let n=0;n<t.children.length;n++)e.push.apply(e,ZF(t.children[n]));return e}class Sq extends bn{constructor(e,n,i){const r=new mp(n,4,2),s=new hr({wireframe:!0,fog:!1,toneMapped:!1});super(r,s),this.light=e,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const wq=new k,lP=new ze,cP=new ze;class Mq extends kt{constructor(e,n,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const r=new pp(n);r.rotateY(Math.PI*.5),this.material=new hr({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 Nt(o,3)),this.add(new bn(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 n=e.geometry.getAttribute("color");lP.copy(this.light.color),cP.copy(this.light.groundColor);for(let i=0,r=n.count;i<r;i++){const s=i<r/2?lP:cP;n.setXYZ(i,s.r,s.g,s.b)}n.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(wq.setFromMatrixPosition(this.light.matrixWorld).negate())}}class Eq extends ms{constructor(e=10,n=10,i=4473924,r=8947848){i=new ze(i),r=new ze(r);const s=n/2,o=e/n,a=e/2,l=[],c=[];for(let p=0,m=0,v=-a;p<=n;p++,v+=o){l.push(-a,0,v,a,0,v),l.push(v,0,-a,v,0,a);const S=p===s?i:r;S.toArray(c,m),m+=3,S.toArray(c,m),m+=3,S.toArray(c,m),m+=3,S.toArray(c,m),m+=3}const h=new St;h.setAttribute("position",new et(l,3)),h.setAttribute("color",new et(c,3));const f=new Ri({vertexColors:!0,toneMapped:!1});super(h,f),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class Cq extends ms{constructor(e=10,n=16,i=8,r=64,s=4473924,o=8947848){s=new ze(s),o=new ze(o);const a=[],l=[];if(n>1)for(let f=0;f<n;f++){const p=f/n*(Math.PI*2),m=Math.sin(p)*e,v=Math.cos(p)*e;a.push(0,0,0),a.push(m,0,v);const S=f&1?s:o;l.push(S.r,S.g,S.b),l.push(S.r,S.g,S.b)}for(let f=0;f<i;f++){const p=f&1?s:o,m=e-e/i*f;for(let v=0;v<r;v++){let S=v/r*(Math.PI*2),A=Math.sin(S)*m,g=Math.cos(S)*m;a.push(A,0,g),l.push(p.r,p.g,p.b),S=(v+1)/r*(Math.PI*2),A=Math.sin(S)*m,g=Math.cos(S)*m,a.push(A,0,g),l.push(p.r,p.g,p.b)}}const c=new St;c.setAttribute("position",new et(a,3)),c.setAttribute("color",new et(l,3));const h=new Ri({vertexColors:!0,toneMapped:!1});super(c,h),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const uP=new k,bg=new k,dP=new k;class Tq extends kt{constructor(e,n,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",n===void 0&&(n=1);let r=new St;r.setAttribute("position",new et([-n,n,0,n,n,0,n,-n,0,-n,-n,0,-n,n,0],3));const s=new Ri({fog:!1,toneMapped:!1});this.lightPlane=new Eo(r,s),this.add(this.lightPlane),r=new St,r.setAttribute("position",new et([0,0,0,0,0,1],3)),this.targetLine=new Eo(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),uP.setFromMatrixPosition(this.light.matrixWorld),bg.setFromMatrixPosition(this.light.target.matrixWorld),dP.subVectors(bg,uP),this.lightPlane.lookAt(bg),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(bg),this.targetLine.scale.z=dP.length()}}const Rg=new k,wn=new ap;class bq extends ms{constructor(e){const n=new St,i=new Ri({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(v,S){l(v),l(S)}function l(v){r.push(0,0,0),s.push(0,0,0),o[v]===void 0&&(o[v]=[]),o[v].push(r.length/3-1)}n.setAttribute("position",new et(r,3)),n.setAttribute("color",new et(s,3)),super(n,i),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 ze(16755200),h=new ze(16711680),f=new ze(43775),p=new ze(16777215),m=new ze(3355443);this.setColors(c,h,f,p,m)}setColors(e,n,i,r,s){const a=this.geometry.getAttribute("color");a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,n.r,n.g,n.b),a.setXYZ(25,n.r,n.g,n.b),a.setXYZ(26,n.r,n.g,n.b),a.setXYZ(27,n.r,n.g,n.b),a.setXYZ(28,n.r,n.g,n.b),a.setXYZ(29,n.r,n.g,n.b),a.setXYZ(30,n.r,n.g,n.b),a.setXYZ(31,n.r,n.g,n.b),a.setXYZ(32,i.r,i.g,i.b),a.setXYZ(33,i.r,i.g,i.b),a.setXYZ(34,i.r,i.g,i.b),a.setXYZ(35,i.r,i.g,i.b),a.setXYZ(36,i.r,i.g,i.b),a.setXYZ(37,i.r,i.g,i.b),a.setXYZ(38,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}update(){const e=this.geometry,n=this.pointMap,i=1,r=1;wn.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Pn("c",n,e,wn,0,0,-1),Pn("t",n,e,wn,0,0,1),Pn("n1",n,e,wn,-i,-r,-1),Pn("n2",n,e,wn,i,-r,-1),Pn("n3",n,e,wn,-i,r,-1),Pn("n4",n,e,wn,i,r,-1),Pn("f1",n,e,wn,-i,-r,1),Pn("f2",n,e,wn,i,-r,1),Pn("f3",n,e,wn,-i,r,1),Pn("f4",n,e,wn,i,r,1),Pn("u1",n,e,wn,i*.7,r*1.1,-1),Pn("u2",n,e,wn,-i*.7,r*1.1,-1),Pn("u3",n,e,wn,0,r*2,-1),Pn("cf1",n,e,wn,-i,0,1),Pn("cf2",n,e,wn,i,0,1),Pn("cf3",n,e,wn,0,-r,1),Pn("cf4",n,e,wn,0,r,1),Pn("cn1",n,e,wn,-i,0,-1),Pn("cn2",n,e,wn,i,0,-1),Pn("cn3",n,e,wn,0,-r,-1),Pn("cn4",n,e,wn,0,r,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Pn(t,e,n,i,r,s,o){Rg.set(r,s,o).unproject(i);const a=e[t];if(a!==void 0){const l=n.getAttribute("position");for(let c=0,h=a.length;c<h;c++)l.setXYZ(a[c],Rg.x,Rg.y,Rg.z)}}const Pg=new ui;class Rq extends ms{constructor(e,n=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(8*3),s=new St;s.setIndex(new Nt(i,1)),s.setAttribute("position",new Nt(r,3)),super(s,new Ri({color:n,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&Pg.setFromObject(this.object),Pg.isEmpty())return;const n=Pg.min,i=Pg.max,r=this.geometry.attributes.position,s=r.array;s[0]=i.x,s[1]=i.y,s[2]=i.z,s[3]=n.x,s[4]=i.y,s[5]=i.z,s[6]=n.x,s[7]=n.y,s[8]=i.z,s[9]=i.x,s[10]=n.y,s[11]=i.z,s[12]=i.x,s[13]=i.y,s[14]=n.z,s[15]=n.x,s[16]=i.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=i.x,s[22]=n.y,s[23]=n.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,n){return super.copy(e,n),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Pq extends ms{constructor(e,n=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),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 St;s.setIndex(new Nt(i,1)),s.setAttribute("position",new et(r,3)),super(s,new Ri({color:n,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const n=this.box;n.isEmpty()||(n.getCenter(this.position),n.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class Iq extends Eo{constructor(e,n=1,i=16776960){const r=i,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 St;o.setAttribute("position",new et(s,3)),o.computeBoundingSphere(),super(o,new Ri({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=n;const a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],l=new St;l.setAttribute("position",new et(a,3)),l.computeBoundingSphere(),this.add(new bn(l,new hr({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 hP=new k;let Ig,M1;class Bq extends kt{constructor(e=new k(0,0,1),n=new k(0,0,0),i=1,r=16776960,s=i*.2,o=s*.2){super(),this.type="ArrowHelper",Ig===void 0&&(Ig=new St,Ig.setAttribute("position",new et([0,0,0,0,1,0],3)),M1=new fd(0,.5,1,5,1),M1.translate(0,-.5,0)),this.position.copy(n),this.line=new Eo(Ig,new Ri({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new bn(M1,new hr({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,s,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{hP.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(hP,n)}}setLength(e,n=e*.2,i=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(i,n,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Lq extends ms{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new St;r.setAttribute("position",new et(n,3)),r.setAttribute("color",new et(i,3));const s=new Ri({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,n,i){const r=new ze,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(n),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Dq{constructor(){this.type="ShapePath",this.color=new ze,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Nf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,i,r){return this.currentPath.quadraticCurveTo(e,n,i,r),this}bezierCurveTo(e,n,i,r,s,o){return this.currentPath.bezierCurveTo(e,n,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const x=[];for(let _=0,M=g.length;_<M;_++){const b=g[_],C=new Fl;C.curves=b.curves,x.push(C)}return x}function i(g,x){const _=x.length;let M=!1;for(let b=_-1,C=0;C<_;b=C++){let P=x[b],B=x[C],R=B.x-P.x,T=B.y-P.y;if(Math.abs(T)>Number.EPSILON){if(T<0&&(P=x[C],R=-R,B=x[b],T=-T),g.y<P.y||g.y>B.y)continue;if(g.y===P.y){if(g.x===P.x)return!0}else{const L=T*(g.x-P.x)-R*(g.y-P.y);if(L===0)return!0;if(L<0)continue;M=!M}}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 M}const r=Fs.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 Fl,l.curves=a.curves,c.push(l),c;let h=!r(s[0].getPoints());h=e?!h:h;const f=[],p=[];let m=[],v=0,S;p[v]=void 0,m[v]=[];for(let g=0,x=s.length;g<x;g++)a=s[g],S=a.getPoints(),o=r(S),o=e?!o:o,o?(!h&&p[v]&&v++,p[v]={s:new Fl,p:S},p[v].s.curves=a.curves,h&&v++,m[v]=[]):m[v].push({h:a,p:S[0]});if(!p[0])return n(s);if(p.length>1){let g=!1,x=0;for(let _=0,M=p.length;_<M;_++)f[_]=[];for(let _=0,M=p.length;_<M;_++){const b=m[_];for(let C=0;C<b.length;C++){const P=b[C];let B=!0;for(let R=0;R<p.length;R++)i(P.p,p[R].p)&&(_!==R&&x++,B?(B=!1,f[R].push(P)):g=!0);B&&f[_].push(P)}}x>0&&g===!1&&(m=f)}let A;for(let g=0,x=p.length;g<x;g++){l=p[g].s,c.push(l),A=m[g];for(let _=0,M=A.length;_<M;_++)l.holes.push(A[_].h)}return c}}class Nq extends ps{constructor(e=1,n=1,i=1,r={}){console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'),super(e,n,{...r,count:i}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:ld}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=ld);const Fq=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:hM,AddEquation:ea,AddOperation:IN,AdditiveAnimationBlendMode:SM,AdditiveBlending:aS,AgXToneMapping:FN,AlphaFormat:gM,AlwaysCompare:ZN,AlwaysDepth:MN,AlwaysStencilFunc:dS,AmbientLight:HF,AnimationAction:QF,AnimationClip:$u,AnimationLoader:UK,AnimationMixer:hq,AnimationObjectGroup:uq,AnimationUtils:NK,ArcCurve:vF,ArrayCamera:dF,ArrowHelper:Bq,AttachedBindMode:uS,Audio:KF,AudioAnalyser:eq,AudioContext:nE,AudioListener:YK,AudioLoader:KK,AxesHelper:Lq,BackSide:Ui,BasicDepthPacking:VN,BasicShadowMap:rN,BatchedMesh:gF,Bone:_y,BooleanKeyframeTrack:sc,Box2:yq,Box3:ui,Box3Helper:Pq,BoxGeometry:Ra,BoxHelper:Rq,BufferAttribute:Nt,BufferGeometry:St,BufferGeometryLoader:XF,ByteType:fM,Cache:co,Camera:ap,CameraHelper:bq,CanvasTexture:sK,CapsuleGeometry:wy,CatmullRomCurve3:yF,CineonToneMapping:DN,CircleGeometry:My,ClampToEdgeWrapping:dr,Clock:iE,Color:ze,ColorKeyframeTrack:QM,ColorManagement:Xt,CompressedArrayTexture:iK,CompressedCubeTexture:rK,CompressedTexture:Ay,CompressedTextureLoader:zK,ConeGeometry:Ey,ConstantAlphaFactor:AN,ConstantColorFactor:xN,CubeCamera:IM,CubeReflectionMapping:wo,CubeRefractionMapping:_a,CubeTexture:lp,CubeTextureLoader:HK,CubeUVReflectionMapping:cd,CubicBezierCurve:VM,CubicBezierCurve3:xF,CubicInterpolant:kF,CullFaceBack:oS,CullFaceFront:iN,CullFaceFrontBack:UV,CullFaceNone:nN,Curve:gs,CurvePath:AF,CustomBlending:sN,CustomToneMapping:NN,CylinderGeometry:fd,Cylindrical:vq,Data3DTexture:TM,DataArrayTexture:gy,DataTexture:Ns,DataTextureLoader:GK,DataUtils:J6,DecrementStencilOp:QV,DecrementWrapStencilOp:ZV,DefaultLoadingManager:Su,DepthFormat:Bl,DepthStencilFormat:Xl,DepthTexture:DM,DetachedBindMode:ON,DirectionalLight:tE,DirectionalLightHelper:Tq,DiscreteInterpolant:OF,DisplayP3ColorSpace:my,DodecahedronGeometry:Cy,DoubleSide:Or,DstAlphaFactor:pN,DstColorFactor:gN,DynamicCopyUsage:h6,DynamicDrawUsage:Ll,DynamicReadUsage:c6,EdgesGeometry:SF,EllipseCurve:Sy,EqualCompare:KN,EqualDepth:CN,EqualStencilFunc:n6,EquirectangularReflectionMapping:Cf,EquirectangularRefractionMapping:Tf,Euler:er,EventDispatcher:Os,ExtrudeGeometry:by,FileLoader:yr,Float16BufferAttribute:$6,Float32BufferAttribute:et,FloatType:Qi,Fog:xy,FogExp2:yy,FramebufferTexture:nK,FrontSide:ks,Frustum:cp,GLBufferAttribute:gq,GLSL1:p6,GLSL3:hS,GreaterCompare:qN,GreaterDepth:bN,GreaterEqualCompare:YN,GreaterEqualDepth:TN,GreaterEqualStencilFunc:o6,GreaterStencilFunc:r6,GridHelper:Eq,Group:lo,HalfFloatType:ud,HemisphereLight:zF,HemisphereLightHelper:Mq,IcosahedronGeometry:Ry,ImageBitmapLoader:JF,ImageLoader:Uf,ImageUtils:tF,IncrementStencilOp:qV,IncrementWrapStencilOp:YV,InstancedBufferAttribute:Jl,InstancedBufferGeometry:WF,InstancedInterleavedBuffer:mq,InstancedMesh:UM,Int16BufferAttribute:Y6,Int32BufferAttribute:Z6,Int8BufferAttribute:K6,IntType:ly,InterleavedBuffer:up,InterleavedBufferAttribute:Sa,Interpolant:pd,InterpolateDiscrete:qu,InterpolateLinear:Qu,InterpolateSmooth:i0,InvertStencilOp:$V,KeepStencilOp:dl,KeyframeTrack:vs,LOD:mF,LatheGeometry:fp,Layers:Nl,LessCompare:JN,LessDepth:EN,LessEqualCompare:MM,LessEqualDepth:Ef,LessEqualStencilFunc:i6,LessStencilFunc:t6,Light:Ia,LightProbe:jF,Line:Eo,Line3:xq,LineBasicMaterial:Ri,LineCurve:jM,LineCurve3:_F,LineDashedMaterial:DF,LineLoop:zM,LineSegments:ms,LinearDisplayP3ColorSpace:op,LinearFilter:Tn,LinearInterpolant:qM,LinearMipMapLinearFilter:VV,LinearMipMapNearestFilter:GV,LinearMipmapLinearFilter:zr,LinearMipmapNearestFilter:Iu,LinearSRGBColorSpace:bo,LinearToneMapping:BN,LinearTransfer:Rf,Loader:Pi,LoaderUtils:ma,LoadingManager:YM,LoopOnce:UN,LoopPingPong:HN,LoopRepeat:zN,LuminanceAlphaFormat:xM,LuminanceFormat:yM,MOUSE:cl,Material:zn,MaterialLoader:Fy,MathUtils:CM,Matrix2:aE,Matrix3:Et,Matr
3907ix4:at,MaxEquation:cN,Mesh:bn,MeshBasicMaterial:hr,MeshDepthMaterial:NM,MeshDistanceMaterial:FM,MeshLambertMaterial:BF,MeshMatcapMaterial:LF,MeshNormalMaterial:IF,MeshPhongMaterial:RF,MeshPhysicalMaterial:Xr,MeshStandardMaterial:gp,MeshToonMaterial:PF,MinEquation:lN,MirroredRepeatWrapping:Ju,MixOperation:PN,MultiplyBlending:cS,MultiplyOperation:rp,NearestFilter:jn,NearestMipMapLinearFilter:HV,NearestMipMapNearestFilter:zV,NearestMipmapLinearFilter:xl,NearestMipmapNearestFilter:ay,NeutralToneMapping:kN,NeverCompare:XN,NeverDepth:wN,NeverStencilFunc:e6,NoBlending:go,NoColorSpace:io,NoToneMapping:Ds,NormalAnimationBlendMode:py,NormalBlending:Il,NotEqualCompare:QN,NotEqualDepth:RN,NotEqualStencilFunc:s6,NumberKeyframeTrack:ql,Object3D:kt,ObjectLoader:XK,ObjectSpaceNormalMap:WN,OctahedronGeometry:pp,OneFactor:dN,OneMinusConstantAlphaFactor:SN,OneMinusConstantColorFactor:_N,OneMinusDstAlphaFactor:mN,OneMinusDstColorFactor:vN,OneMinusSrcAlphaFactor:W0,OneMinusSrcColorFactor:fN,OrthographicCamera:Hr,P3Primaries:If,PCFShadowMap:sy,PCFSoftShadowMap:Gh,PMREMGenerator:fS,Path:Nf,PerspectiveCamera:un,Plane:no,PlaneGeometry:dd,PlaneHelper:Iq,PointLight:eE,PointLightHelper:Sq,Points:HM,PointsMaterial:hp,PolarGridHelper:Cq,PolyhedronGeometry:Pa,PositionalAudio:$K,PropertyBinding:Ot,PropertyMixer:qF,QuadraticBezierCurve:WM,QuadraticBezierCurve3:XM,Quaternion:xn,QuaternionKeyframeTrack:Ql,QuaternionLinearInterpolant:UF,RED_GREEN_RGTC2_Format:gv,RED_RGTC1_Format:AM,REVISION:ld,RGBADepthPacking:jN,RGBAFormat:Ci,RGBAIntegerFormat:fy,RGBA_ASTC_10x10_Format:uv,RGBA_ASTC_10x5_Format:av,RGBA_ASTC_10x6_Format:lv,RGBA_ASTC_10x8_Format:cv,RGBA_ASTC_12x10_Format:dv,RGBA_ASTC_12x12_Format:hv,RGBA_ASTC_4x4_Format:$0,RGBA_ASTC_5x4_Format:ev,RGBA_ASTC_5x5_Format:tv,RGBA_ASTC_6x5_Format:nv,RGBA_ASTC_6x6_Format:iv,RGBA_ASTC_8x5_Format:rv,RGBA_ASTC_8x6_Format:sv,RGBA_ASTC_8x8_Format:ov,RGBA_BPTC_Format:Jh,RGBA_ETC2_EAC_Format:Z0,RGBA_PVRTC_2BPPV1_Format:q0,RGBA_PVRTC_4BPPV1_Format:K0,RGBA_S3TC_DXT1_Format:jh,RGBA_S3TC_DXT3_Format:Wh,RGBA_S3TC_DXT5_Format:Xh,RGBDepthPacking:WV,RGBFormat:vM,RGBIntegerFormat:jV,RGB_BPTC_SIGNED_Format:fv,RGB_BPTC_UNSIGNED_Format:pv,RGB_ETC1_Format:Q0,RGB_ETC2_Format:Y0,RGB_PVRTC_2BPPV1_Format:J0,RGB_PVRTC_4BPPV1_Format:X0,RGB_S3TC_DXT1_Format:Vh,RGDepthPacking:XV,RGFormat:_M,RGIntegerFormat:hy,RawShaderMaterial:bF,Ray:rc,Raycaster:YF,Rec709Primaries:Pf,RectAreaLight:GF,RedFormat:dy,RedIntegerFormat:sp,ReinhardToneMapping:LN,RenderTarget:nF,RepeatWrapping:Aa,ReplaceStencilOp:KV,ReverseSubtractEquation:aN,RingGeometry:Py,SIGNED_RED_GREEN_RGTC2_Format:vv,SIGNED_RED_RGTC1_Format:mv,SRGBColorSpace:Dr,SRGBTransfer:rn,Scene:xv,ShaderChunk:Tt,ShaderLib:as,ShaderMaterial:Wr,ShadowMaterial:TF,Shape:Fl,ShapeGeometry:Iy,ShapePath:Dq,ShapeUtils:Fs,ShortType:pM,Skeleton:dp,SkeletonHelper:Aq,SkinnedMesh:OM,Source:Sl,Sphere:di,SphereGeometry:mp,Spherical:wv,SphericalHarmonics3:VF,SplineCurve:JM,SpotLight:$M,SpotLightHelper:_q,Sprite:pF,SpriteMaterial:kM,SrcAlphaFactor:j0,SrcAlphaSaturateFactor:yN,SrcColorFactor:hN,StaticCopyUsage:d6,StaticDrawUsage:Bf,StaticReadUsage:l6,StereoCamera:qK,StreamCopyUsage:f6,StreamDrawUsage:a6,StreamReadUsage:u6,StringKeyframeTrack:oc,SubtractEquation:oN,SubtractiveBlending:lS,TOUCH:ul,TangentSpaceNormalMap:ba,TetrahedronGeometry:By,Texture:Zt,TextureLoader:vp,TextureUtils:NJ,TorusGeometry:Ly,TorusKnotGeometry:Dy,Triangle:Ki,TriangleFanDrawMode:yv,TriangleStripDrawMode:wM,TrianglesDrawMode:GN,TubeGeometry:Ny,UVMapping:oy,Uint16BufferAttribute:bM,Uint32BufferAttribute:RM,Uint8BufferAttribute:q6,Uint8ClampedBufferAttribute:Q6,Uniform:oE,UniformsGroup:pq,UniformsLib:He,UniformsUtils:PM,UnsignedByteType:fs,UnsignedInt248Type:Wl,UnsignedInt5999Type:mM,UnsignedIntType:Mo,UnsignedShort4444Type:cy,UnsignedShort5551Type:uy,UnsignedShortType:Ku,VSMShadowMap:is,Vector2:he,Vector3:k,Vector4:Ut,VectorKeyframeTrack:Yl,VideoTexture:tK,WebGL3DRenderTarget:k6,WebGLArrayRenderTarget:F6,WebGLCoordinateSystem:Ps,WebGLCubeRenderTarget:BM,WebGLMultipleRenderTargets:Nq,WebGLRenderTarget:ps,WebGLRenderer:hF,WebGLUtils:uF,WebGPUCoordinateSystem:Lf,WireframeGeometry:CF,WrapAroundEnding:bf,ZeroCurvatureEnding:_l,ZeroFactor:uN,ZeroSlopeEnding:Al,ZeroStencilOp:JV,createCanvasElement:eF},Symbol.toStringTag,{value:"Module"}));var $F={exports:{}},ac={};/**
3908 * @license React
3909 * react-reconciler-constants.production.min.js
3910 *
3911 * Copyright (c) Facebook, Inc. and its affiliates.
3912 *
3913 * This source code is licensed under the MIT license found in the
3914 * LICENSE file in the root directory of this source tree.
3915 */ac.ConcurrentRoot=1;
vendor: 140,463 bytes, lines 3915-3978
3915ac.ContinuousEventPriority=4;ac.DefaultEventPriority=16;ac.DiscreteEventPriority=1;ac.IdleEventPriority=536870912;ac.LegacyRoot=0;$F.exports=ac;var wu=$F.exports;function kq(t){let e;const n=new Set,i=(c,h)=>{const f=typeof c=="function"?c(e):c;if(f!==e){const p=e;e=h?f:Object.assign({},e,f),n.forEach(m=>m(e,p))}},r=()=>e,s=(c,h=r,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function m(){const v=h(e);if(!f(p,v)){const S=p;c(p=v,S)}}return n.add(m),()=>n.delete(m)},l={setState:i,getState:r,subscribe:(c,h,f)=>h||f?s(c,h,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(i,r,l),l}const Oq=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),fP=Oq?z.useEffect:z.useLayoutEffect;function ek(t){const e=typeof t=="function"?kq(t):t,n=(i=e.getState,r=Object.is)=>{const[,s]=z.useReducer(A=>A+1,0),o=e.getState(),a=z.useRef(o),l=z.useRef(i),c=z.useRef(r),h=z.useRef(!1),f=z.useRef();f.current===void 0&&(f.current=i(o));let p,m=!1;(a.current!==o||l.current!==i||c.current!==r||h.current)&&(p=i(o),m=!r(f.current,p)),fP(()=>{m&&(f.current=p),a.current=o,l.current=i,c.current=r,h.current=!1});const v=z.useRef(o);fP(()=>{const A=()=>{try{const x=e.getState(),_=l.current(x);c.current(f.current,_)||(a.current=x,f.current=_,s())}catch{h.current=!0,s()}},g=e.subscribe(A);return e.getState()!==v.current&&A(),g},[]);const S=m?p:f.current;return z.useDebugValue(S),S};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[n,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},n}var tk={exports:{}},nk={exports:{}},ik={};/**
3916 * @license React
3917 * scheduler.production.min.js
3918 *
3919 * Copyright (c) Facebook, Inc. and its affiliates.
3920 *
3921 * This source code is licensed under the MIT license found in the
3922 * LICENSE file in the root directory of this source tree.
3923 */(function(t){function e(D,X){var J=D.length;D.push(X);e:for(;0<J;){var $=J-1>>>1,ue=D[$];if(0<r(ue,X))D[$]=X,D[J]=ue,J=$;else break e}}function n(D){return D.length===0?null:D[0]}function i(D){if(D.length===0)return null;var X=D[0],J=D.pop();if(J!==X){D[0]=J;e:for(var $=0,ue=D.length,Ae=ue>>>1;$<Ae;){var te=2*($+1)-1,ce=D[te],xe=te+1,_e=D[xe];if(0>r(ce,J))xe<ue&&0>r(_e,ce)?(D[$]=_e,D[xe]=J,$=xe):(D[$]=ce,D[te]=J,$=te);else if(xe<ue&&0>r(_e,J))D[$]=_e,D[xe]=J,$=xe;else break e}}return X}function r(D,X){var J=D.sortIndex-X.sortIndex;return J!==0?J:D.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],h=1,f=null,p=3,m=!1,v=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(D){for(var X=n(c);X!==null;){if(X.callback===null)i(c);else if(X.startTime<=D)i(c),X.sortIndex=X.expirationTime,e(l,X);else break;X=n(c)}}function M(D){if(S=!1,_(D),!v)if(n(l)!==null)v=!0,Z(b);else{var X=n(c);X!==null&&H(M,X.startTime-D)}}function b(D,X){v=!1,S&&(S=!1,g(B),B=-1),m=!0;var J=p;try{for(_(X),f=n(l);f!==null&&(!(f.expirationTime>X)||D&&!L());){var $=f.callback;if(typeof $=="function"){f.callback=null,p=f.priorityLevel;var ue=$(f.expirationTime<=X);X=t.unstable_now(),typeof ue=="function"?f.callback=ue:f===n(l)&&i(l),_(X)}else i(l);f=n(l)}if(f!==null)var Ae=!0;else{var te=n(c);te!==null&&H(M,te.startTime-X),Ae=!1}return Ae}finally{f=null,p=J,m=!1}}var C=!1,P=null,B=-1,R=5,T=-1;function L(){return!(t.unstable_now()-T<R)}function W(){if(P!==null){var D=t.unstable_now();T=D;var X=!0;try{X=P(!0,D)}finally{X?Y():(C=!1,P=null)}}else C=!1}var Y;if(typeof x=="function")Y=function(){x(W)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,j=q.port2;q.port1.onmessage=W,Y=function(){j.postMessage(null)}}else Y=function(){A(W,0)};function Z(D){P=D,C||(C=!0,Y())}function H(D,X){B=A(function(){D(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(D){D.callback=null},t.unstable_continueExecution=function(){v||m||(v=!0,Z(b))},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(D){switch(p){case 1:case 2:case 3:var X=3;break;default:X=p}var J=p;p=X;try{return D()}finally{p=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(D,X){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var J=p;p=D;try{return X()}finally{p=J}},t.unstable_scheduleCallback=function(D,X,J){var $=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?$+J:$):J=$,D){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=J+ue,D={id:h++,callback:X,priorityLevel:D,startTime:J,expirationTime:ue,sortIndex:-1},J>$?(D.sortIndex=J,e(c,D),n(l)===null&&D===n(c)&&(S?(g(B),B=-1):S=!0,H(M,J-$))):(D.sortIndex=ue,e(l,D),v||m||(v=!0,Z(b))),D},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(D){var X=p;return function(){var J=p;p=X;try{return D.apply(this,arguments)}finally{p=J}}}})(ik);nk.exports=ik;var AS=nk.exports;/**
3924 * @license React
3925 * react-reconciler.production.min.js
3926 *
3927 * Copyright (c) Facebook, Inc. and its affiliates.
3928 *
3929 * This source code is licensed under the MIT license found in the
3930 * LICENSE file in the root directory of this source tree.
3931 */var Uq=function(e){var n={},i=z,r=AS,s=Object.assign;function o(u){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+u,y=1;y<arguments.length;y++)d+="&args[]="+encodeURIComponent(arguments[y]);return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),b=Symbol.iterator;function C(u){return u===null||typeof u!="object"?null:(u=b&&u[b]||u["@@iterator"],typeof u=="function"?u:null)}function P(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case h:return"Fragment";case c:return"Portal";case p:return"Profiler";case f:return"StrictMode";case A:return"Suspense";case g:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case v:return(u.displayName||"Context")+".Consumer";case m:return(u._context.displayName||"Context")+".Provider";case S:var d=u.render;return u=u.displayName,u||(u=d.displayName||d.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case x:return d=u.displayName||null,d!==null?d:P(u.type)||"Memo";case _:d=u._payload,u=u._init;try{return P(u(d))}catch{}}return null}function B(u){var d=u.type;switch(u.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=d.render,u=u.displayName||u.name||"",d.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(d);case 8:return d===f?"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 d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function R(u){var d=u,y=u;if(u.alternate)for(;d.return;)d=d.return;else{u=d;do d=u,d.flags&4098&&(y=d.return),u=d.return;while(u)}return d.tag===3?y:null}function T(u){if(R(u)!==u)throw Error(o(188))}function L(u){var d=u.alternate;if(!d){if(d=R(u),d===null)throw Error(o(188));return d!==u?null:u}for(var y=u,w=d;;){var E=y.return;if(E===null)break;var I=E.alternate;if(I===null){if(w=E.return,w!==null){y=w;continue}break}if(E.child===I.child){for(I=E.child;I;){if(I===y)return T(E),u;if(I===w)return T(E),d;I=I.sibling}throw Error(o(188))}if(y.return!==w.return)y=E,w=I;else{for(var G=!1,ee=E.child;ee;){if(ee===y){G=!0,y=E,w=I;break}if(ee===w){G=!0,w=E,y=I;break}ee=ee.sibling}if(!G){for(ee=I.child;ee;){if(ee===y){G=!0,y=I,w=E;break}if(ee===w){G=!0,w=I,y=E;break}ee=ee.sibling}if(!G)throw Error(o(189))}}if(y.alternate!==w)throw Error(o(190))}if(y.tag!==3)throw Error(o(188));return y.stateNode.current===y?u:d}function W(u){return u=L(u),u!==null?Y(u):null}function Y(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var d=Y(u);if(d!==null)return d;u=u.sibling}return null}function q(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){if(u.tag!==4){var d=q(u);if(d!==null)return d}u=u.sibling}return null}var j=Array.isArray,Z=e.getPublicInstance,H=e.getRootHostContext,D=e.getChildHostContext,X=e.prepareForCommit,J=e.resetAfterCommit,$=e.createInstance,ue=e.appendInitialChild,Ae=e.finalizeInitialChildren,te=e.prepareUpdate,ce=e.shouldSetTextContent,xe=e.createTextInstance,_e=e.scheduleTimeout,De=e.cancelTimeout,it=e.noTimeout,Ue=e.isPrimaryRenderer,Be=e.supportsMutation,U=e.supportsPersistence,ye=e.supportsHydration,Te=e.getInstanceFromNode,Ne=e.preparePortalMount,ge=e.getCurrentEventPriority,Ze=e.detachDeletedInstance,Oe=e.supportsMicrotasks,je=e.scheduleMicrotask,V=e.supportsTestSelectors,N=e.findFiberRoot,se=e.getBoundingRect,Me=e.getTextContent,we=e.isHiddenSubtree,Ee=e.matchAccessibilityRole,rt=e.setFocusIfFocusable,Pe=e.setupIntersectionObserver,Ke=e.appendChild,xt=e.appendChildToContainer,Re=e.commitTextUpdate,We=e.commitMount,It=e.commitUpdate,ft=e.insertBefore,qe=e.insertInContainerBefore,Q=e.removeChild,me=e.removeChildFromContainer,Ve=e.resetTextContent,K=e.hideInstance,Ce=e.hideTextInstance,pe=e.unhideInstance,ve=e.unhideTextInstance,Fe=e.clearContainer,dt=e.cloneInstance,_t=e.createContainerChildSet,zt=e.appendChildToContainerChildSet,an=e.finalizeContainerChildren,Rt=e.replaceContainerChildren,Kn=e.cloneHiddenInstance,qn=e.cloneHiddenTextInstance,wp=e.canHydrateInstance,Us=e.canHydrateTextInstance,xd=e.canHydrateSuspenseInstance,_d=e.isSuspenseInstancePending,cc=e.isSuspenseInstanceFallback,uc=e.registerSuspenseInstanceRetry,Ro=e.getNextHydratableSibling,dc=e.getFirstHydratableChild,Mp=e.getFirstHydratableChildWithinContainer,Ep=e.getFirstHydratableChildWithinSuspenseInstance,Wy=e.hydrateInstance,Xy=e.hydrateTextInstance,Jy=e.hydrateSuspenseInstance,O=e.getNextHydratableInstanceAfterSuspenseInstance,ne=e.commitHydratedContainer,ae=e.commitHydratedSuspenseInstance,le=e.clearSuspenseBoundary,re=e.clearSuspenseBoundaryFromContainer,Le=e.shouldDeleteUnhydratedTailInstances,Je=e.didNotMatchHydratedContainerTextInstance,tt=e.didNotMatchHydratedTextInstance,$e;function ut(u){if($e===void 0)try{throw Error()}catch(y){var d=y.stack.trim().match(/\n( *(at )?)/);$e=d&&d[1]||""}return`
3932`+$e+u}var pt=!1;function ct(u,d){if(!u||pt)return"";pt=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(Ie){var w=Ie}Reflect.construct(u,[],d)}else{try{d.call()}catch(Ie){w=Ie}u.call(d.prototype)}else{try{throw Error()}catch(Ie){w=Ie}u()}}catch(Ie){if(Ie&&w&&typeof Ie.stack=="string"){for(var E=Ie.stack.split(`
3933`),I=w.stack.split(`
3934`),G=E.length-1,ee=I.length-1;1<=G&&0<=ee&&E[G]!==I[ee];)ee--;for(;1<=G&&0<=ee;G--,ee--)if(E[G]!==I[ee]){if(G!==1||ee!==1)do if(G--,ee--,0>ee||E[G]!==I[ee]){var fe=`
3935`+E[G].replace(" at new "," at ");return u.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",u.displayName)),fe}while(1<=G&&0<=ee);break}}}finally{pt=!1,Error.prepareStackTrace=y}return(u=u?u.displayName||u.name:"")?ut(u):""}var Gt=Object.prototype.hasOwnProperty,$t=[],Kt=-1;function An(u){return{current:u}}function lt(u){0>Kt||(u.current=$t[Kt],$t[Kt]=null,Kt--)}function ke(u,d){Kt++,$t[Kt]=u.current,u.current=d}var en={},vt=An(en),tn=An(!1),Gi=en;function Ln(u,d){var y=u.type.contextTypes;if(!y)return en;var w=u.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===d)return w.__reactInternalMemoizedMaskedChildContext;var E={},I;for(I in y)E[I]=d[I];return w&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=d,u.__reactInternalMemoizedMaskedChildContext=E),E}function Qn(u){return u=u.childContextTypes,u!=null}function ln(){lt(tn),lt(vt)}function Jr(u,d,y){if(vt.current!==en)throw Error(o(168));ke(vt,d),ke(tn,y)}function hc(u,d,y){var w=u.stateNode;if(d=d.childContextTypes,typeof w.getChildContext!="function")return y;w=w.getChildContext();for(var E in w)if(!(E in d))throw Error(o(108,B(u)||"Unknown",E));return s({},y,w)}function ri(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||en,Gi=vt.current,ke(vt,u),ke(tn,tn.current),!0}function fc(u,d,y){var w=u.stateNode;if(!w)throw Error(o(169));y?(u=hc(u,d,Gi),w.__reactInternalMemoizedMergedChildContext=u,lt(tn),lt(vt),ke(vt,u)):lt(tn),ke(tn,y)}var tr=Math.clz32?Math.clz32:SO,Cp=Math.log,AO=Math.LN2;function SO(u){return u>>>=0,u===0?32:31-(Cp(u)/AO|0)|0}var Tp=64,bp=4194304;function Ad(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function Rp(u,d){var y=u.pendingLanes;if(y===0)return 0;var w=0,E=u.suspendedLanes,I=u.pingedLanes,G=y&268435455;if(G!==0){var ee=G&~E;ee!==0?w=Ad(ee):(I&=G,I!==0&&(w=Ad(I)))}else G=y&~E,G!==0?w=Ad(G):I!==0&&(w=Ad(I));if(w===0)return 0;if(d!==0&&d!==w&&!(d&E)&&(E=w&-w,I=d&-d,E>=I||E===16&&(I&4194240)!==0))return d;if(w&4&&(w|=y&16),d=u.entangledLanes,d!==0)for(u=u.entanglements,d&=w;0<d;)y=31-tr(d),E=1<<y,w|=u[y],d&=~E;return w}function wO(u,d){switch(u){case 1:case 2:case 4:return d+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 d+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 MO(u,d){for(var y=u.suspendedLanes,w=u.pingedLanes,E=u.expirationTimes,I=u.pendingLanes;0<I;){var G=31-tr(I),ee=1<<G,fe=E[G];fe===-1?(!(ee&y)||ee&w)&&(E[G]=wO(ee,d)):fe<=d&&(u.expiredLanes|=ee),I&=~ee}}function Ky(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function qy(u){for(var d=[],y=0;31>y;y++)d.push(u);return d}function Sd(u,d,y){u.pendingLanes|=d,d!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,d=31-tr(d),u[d]=y}function EO(u,d){var y=u.pendingLanes&~d;u.pendingLanes=d,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=d,u.mutableReadLanes&=d,u.entangledLanes&=d,d=u.entanglements;var w=u.eventTimes;for(u=u.expirationTimes;0<y;){var E=31-tr(y),I=1<<E;d[E]=0,w[E]=-1,u[E]=-1,y&=~I}}function Qy(u,d){var y=u.entangledLanes|=d;for(u=u.entanglements;y;){var w=31-tr(y),E=1<<w;E&d|u[w]&d&&(u[w]|=d),y&=~E}}var Vt=0;function SE(u){return u&=-u,1<u?4<u?u&268435455?16:536870912:4:1}var Yy=r.unstable_scheduleCallback,wE=r.unstable_cancelCallback,CO=r.unstable_shouldYield,TO=r.unstable_requestPaint,Yn=r.unstable_now,Zy=r.unstable_ImmediatePriority,bO=r.unstable_UserBlockingPriority,$y=r.unstable_NormalPriority,RO=r.unstable_IdlePriority,Pp=null,_s=null;function PO(u){if(_s&&typeof _s.onCommitFiberRoot=="function")try{_s.onCommitFiberRoot(Pp,u,void 0,(u.current.flags&128)===128)}catch{}}function IO(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var As=typeof Object.is=="function"?Object.is:IO,zs=null,Ip=!1,ex=!1;function ME(u){zs===null?zs=[u]:zs.push(u)}function BO(u){Ip=!0,ME(u)}function Ss(){if(!ex&&zs!==null){ex=!0;var u=0,d=Vt;try{var y=zs;for(Vt=1;u<y.length;u++){var w=y[u];do w=w(!0);while(w!==null)}zs=null,Ip=!1}catch(E){throw zs!==null&&(zs=zs.slice(u+1)),Yy(Zy,Ss),E}finally{Vt=d,ex=!1}}return null}var LO=a.ReactCurrentBatchConfig;function Bp(u,d){if(As(u,d))return!0;if(typeof u!="object"||u===null||typeof d!="object"||d===null)return!1;var y=Object.keys(u),w=Object.keys(d);if(y.length!==w.length)return!1;for(w=0;w<y.length;w++){var E=y[w];if(!Gt.call(d,E)||!As(u[E],d[E]))return!1}return!0}function DO(u){switch(u.tag){case 5:return ut(u.type);case 16:return ut("Lazy");case 13:return ut("Suspense");case 19:return ut("SuspenseList");case 0:case 2:case 15:return u=ct(u.type,!1),u;case 11:return u=ct(u.type.render,!1),u;case 1:return u=ct(u.type,!0),u;default:return""}}function Kr(u,d){if(u&&u.defaultProps){d=s({},d),u=u.defaultProps;for(var y in u)d[y]===void 0&&(d[y]=u[y]);return d}return d}var Lp=An(null),Dp=null,pc=null,tx=null;function nx(){tx=pc=Dp=null}function EE(u,d,y){Ue?(ke(Lp,d._currentValue),d._currentValue=y):(ke(Lp,d._currentValue2),d._currentValue2=y)}function ix(u){var d=Lp.current;lt(Lp),Ue?u._currentValue=d:u._currentValue2=d}function rx(u,d,y){for(;u!==null;){var w=u.alternate;if((u.childLanes&d)!==d?(u.childLanes|=d,w!==null&&(w.childLanes|=d)):w!==null&&(w.childLanes&d)!==d&&(w.childLanes|=d),u===y)break;u=u.return}}function mc(u,d){Dp=u,tx=pc=null,u=u.dependencies,u!==null&&u.firstContext!==null&&(u.lanes&d&&(rr=!0),u.firstContext=null)}function Ar(u){var d=Ue?u._currentValue:u._currentValue2;if(tx!==u)if(u={context:u,memoizedValue:d,next:null},pc===null){if(Dp===null)throw Error(o(308));pc=u,Dp.dependencies={lanes:0,firstContext:u}}else pc=pc.next=u;return d}var ws=null,Po=!1;function sx(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function CE(u,d){u=u.updateQueue,d.updateQueue===u&&(d.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function Hs(u,d){return{eventTime:u,lane:d,tag:0,payload:null,callback:null,next:null}}function Io(u,d){var y=u.updateQueue;y!==null&&(y=y.shared,Dn!==null&&u.mode&1&&!(Pt&2)?(u=y.interleaved,u===null?(d.next=d,ws===null?ws=[y]:ws.push(y)):(d.next=u.next,u.next=d),y.interleaved=d):(u=y.pending,u===null?d.next=d:(d.next=u.next,u.next=d),y.pending=d))}function Np(u,d,y){if(d=d.updateQueue,d!==null&&(d=d.shared,(y&4194240)!==0)){var w=d.lanes;w&=u.pendingLanes,y|=w,d.lanes=y,Qy(u,y)}}function TE(u,d){var y=u.updateQueue,w=u.alternate;if(w!==null&&(w=w.updateQueue,y===w)){var E=null,I=null;if(y=y.firstBaseUpdate,y!==null){do{var G={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};I===null?E=I=G:I=I.next=G,y=y.next}while(y!==null);I===null?E=I=d:I=I.next=d}else E=I=d;y={baseState:w.baseState,firstBaseUpdate:E,lastBaseUpdate:I,shared:w.shared,effects:w.effects},u.updateQueue=y;return}u=y.lastBaseUpdate,u===null?y.firstBaseUpdate=d:u.next=d,y.lastBaseUpdate=d}function Fp(u,d,y,w){var E=u.updateQueue;Po=!1;var I=E.firstBaseUpdate,G=E.lastBaseUpdate,ee=E.shared.pending;if(ee!==null){E.shared.pending=null;var fe=ee,Ie=fe.next;fe.next=null,G===null?I=Ie:G.next=Ie,G=fe;var Ye=u.alternate;Ye!==null&&(Ye=Ye.updateQueue,ee=Ye.lastBaseUpdate,ee!==G&&(ee===null?Ye.firstBaseUpdate=Ie:ee.next=Ie,Ye.lastBaseUpdate=fe))}if(I!==null){var wt=E.baseState;G=0,Ye=Ie=fe=null,ee=I;do{var ht=ee.lane,Yt=ee.eventTime;if((w&ht)===ht){Ye!==null&&(Ye=Ye.next={eventTime:Yt,lane:0,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null});e:{var ot=u,gi=ee;switch(ht=d,Yt=y,gi.tag){case 1:if(ot=gi.payload,typeof ot=="function"){wt=ot.call(Yt,wt,ht);break e}wt=ot;break e;case 3:ot.flags=ot.flags&-65537|128;case 0:if(ot=gi.payload,ht=typeof ot=="function"?ot.call(Yt,wt,ht):ot,ht==null)break e;wt=s({},wt,ht);break e;case 2:Po=!0}}ee.callback!==null&&ee.lane!==0&&(u.flags|=64,ht=E.effects,ht===null?E.effects=[ee]:ht.push(ee))}else Yt={eventTime:Yt,lane:ht,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},Ye===null?(Ie=Ye=Yt,fe=wt):Ye=Ye.next=Yt,G|=ht;if(ee=ee.next,ee===null){if(ee=E.shared.pending,ee===null)break;ht=ee,ee=ht.next,ht.next=null,E.lastBaseUpdate=ht,E.shared.pending=null}}while(!0);if(Ye===null&&(fe=wt),E.baseState=fe,E.firstBaseUpdate=Ie,E.lastBaseUpdate=Ye,d=E.shared.interleaved,d!==null){E=d;do G|=E.lane,E=E.next;while(E!==d)}else I===null&&(E.shared.lanes=0);Mc|=G,u.lanes=G,u.memoizedState=wt}}function bE(u,d,y){if(u=d.effects,d.effects=null,u!==null)for(d=0;d<u.length;d++){var w=u[d],E=w.callback;if(E!==null){if(w.callback=null,w=y,typeof E!="function")throw Error(o(191,E));E.call(w)}}}var RE=new i.Component().refs;function ox(u,d,y,w){d=u.memoizedState,y=y(w,d),y=y==null?d:s({},d,y),u.memoizedState=y,u.lanes===0&&(u.updateQueue.baseState=y)}var kp={isMounted:function(u){return(u=u._reactInternals)?R(u)===u:!1},enqueueSetState:function(u,d,y){u=u._reactInternals;var w=Bi(),E=Do(u),I=Hs(w,E);I.payload=d,y!=null&&(I.callback=y),Io(u,I),d=Cr(u,E,w),d!==null&&Np(d,u,E)},enqueueReplaceState:function(u,d,y){u=u._reactInternals;var w=Bi(),E=Do(u),I=Hs(w,E);I.tag=1,I.payload=d,y!=null&&(I.callback=y),Io(u,I),d=Cr(u,E,w),d!==null&&Np(d,u,E)},enqueueForceUpdate:function(u,d){u=u._reactInternals;var y=Bi(),w=Do(u),E=Hs(y,w);E.tag=2,d!=null&&(E.callback=d),Io(u,E),d=Cr(u,w,y),d!==null&&Np(d,u,w)}};function PE(u,d,y,w,E,I,G){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(w,I,G):d.prototype&&d.prototype.isPureReactComponent?!Bp(y,w)||!Bp(E,I):!0}function IE(u,d,y){var w=!1,E=en,I=d.contextType;return typeof I=="object"&&I!==null?I=Ar(I):(E=Qn(d)?Gi:vt.current,w=d.contextTypes,I=(w=w!=null)?Ln(u,E):en),d=new d(y,I),u.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=kp,u.stateNode=d,d._reactInternals=u,w&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=E,u.__reactInternalMemoizedMaskedChildContext=I),d}function BE(u,d,y,w){u=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(y,w),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(y,w),d.state!==u&&kp.enqueueReplaceState(d,d.state,null)}function ax(u,d,y,w){var E=u.stateNode;E.props=y,E.state=u.memoizedState,E.refs=RE,sx(u);var I=d.contextType;typeof I=="object"&&I!==null?E.context=Ar(I):(I=Qn(d)?Gi:vt.current,E.context=Ln(u,I)),E.state=u.memoizedState,I=d.getDerivedStateFromProps,typeof I=="function"&&(ox(u,d,I,y),E.state=u.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(d=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),d!==E.state&&kp.enqueueReplaceState(E,E.state,null),Fp(u,y,E,w),E.state=u.memoizedState),typeof E.componentDidMount=="function"&&(u.flags|=4194308)}var gc=[],vc=0,Op=null,Up=0,Sr=[],wr=0,La=null,Gs=1,Vs="";function Da(u,d){gc[vc++]=Up,gc[vc++]=Op,Op=u,Up=d}function LE(u,d,y){Sr[wr++]=Gs,Sr[wr++]=Vs,Sr[wr++]=La,La=u;var w=Gs;u=Vs;var E=32-tr(w)-1;w&=~(1<<E),y+=1;var I=32-tr(d)+E;if(30<I){var G=E-E%5;I=(w&(1<<G)-1).toString(32),w>>=G,E-=G,Gs=1<<32-tr(d)+E|y<<E|w,Vs=I+u}else Gs=1<<I|y<<E|w,Vs=u}function lx(u){u.return!==null&&(Da(u,1),LE(u,1,0))}function cx(u){for(;u===Op;)Op=gc[--vc],gc[vc]=null,Up=gc[--vc],gc[vc]=null;for(;u===La;)La=Sr[--wr],Sr[wr]=null,Vs=Sr[--wr],Sr[wr]=null,Gs=Sr[--wr],Sr[wr]=null}var nr=null,ir=null,hn=!1,wd=!1,qr=null;function DE(u,d){var y=Tr(5,null,null,0);y.elementType="DELETED",y.stateNode=d,y.return=u,d=u.deletions,d===null?(u.deletions=[y],u.flags|=16):d.push(y)}function NE(u,d){switch(u.tag){case 5:return d=wp(d,u.type,u.pendingProps),d!==null?(u.stateNode=d,nr=u,ir=dc(d),!0):!1;case 6:return d=Us(d,u.pendingProps),d!==null?(u.stateNode=d,nr=u,ir=null,!0):!1;case 13:if(d=xd(d),d!==null){var y=La!==null?{id:Gs,overflow:Vs}:null;return u.memoizedState={dehydrated:d,treeContext:y,retryLane:1073741824},y=Tr(18,null,null,0),y.stateNode=d,y.return=u,u.child=y,nr=u,ir=null,!0}return!1;default:return!1}}function ux(u){return(u.mode&1)!==0&&(u.flags&128)===0}function dx(u){if(hn){var d=ir;if(d){var y=d;if(!NE(u,d)){if(ux(u))throw Error(o(418));d=Ro(y);var w=nr;d&&NE(u,d)?DE(w,y):(u.flags=u.flags&-4097|2,hn=!1,nr=u)}}else{if(ux(u))throw Error(o(418));u.flags=u.flags&-4097|2,hn=!1,nr=u}}}function FE(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;nr=u}function Md(u){if(!ye||u!==nr)return!1;if(!hn)return FE(u),hn=!0,!1;if(u.tag!==3&&(u.tag!==5||Le(u.type)&&!ce(u.type,u.memoizedProps))){var d=ir;if(d){if(ux(u)){for(u=ir;u;)u=Ro(u);throw Error(o(418))}for(;d;)DE(u,d),d=Ro(d)}}if(FE(u),u.tag===13){if(!ye)throw Error(o(316));if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));ir=O(u)}else ir=nr?Ro(u.stateNode):null;return!0}function yc(){ye&&(ir=nr=null,wd=hn=!1)}function hx(u){qr===null?qr=[u]:qr.push(u)}function Ed(u,d,y){if(u=y.ref,u!==null&&typeof u!="function"&&typeof u!="object"){if(y._owner){if(y=y._owner,y){if(y.tag!==1)throw Error(o(309));var w=y.stateNode}if(!w)throw Error(o(147,u));var E=w,I=""+u;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===I?d.ref:(d=function(G){var ee=E.refs;ee===RE&&(ee=E.refs={}),G===null?delete ee[I]:ee[I]=G},d._stringRef=I,d)}if(typeof u!="string")throw Error(o(284));if(!y._owner)throw Error(o(290,u))}return u}function zp(u,d){throw u=Object.prototype.toString.call(d),Error(o(31,u==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":u))}function kE(u){var d=u._init;return d(u._payload)}function OE(u){function d(oe,ie){if(u){var de=oe.deletions;de===null?(oe.deletions=[ie],oe.flags|=16):de.push(ie)}}function y(oe,ie){if(!u)return null;for(;ie!==null;)d(oe,ie),ie=ie.sibling;return null}function w(oe,ie){for(oe=new Map;ie!==null;)ie.key!==null?oe.set(ie.key,ie):oe.set(ie.index,ie),ie=ie.sibling;return oe}function E(oe,ie){return oe=Fo(oe,ie),oe.index=0,oe.sibling=null,oe}function I(oe,ie,de){return oe.index=de,u?(de=oe.alternate,de!==null?(de=de.index,de<ie?(oe.flags|=2,ie):de):(oe.flags|=2,ie)):(oe.flags|=1048576,ie)}function G(oe){return u&&oe.alternate===null&&(oe.flags|=2),oe}function ee(oe,ie,de,Xe){return ie===null||ie.tag!==6?(ie=qx(de,oe.mode,Xe),ie.return=oe,ie):(ie=E(ie,de),ie.return=oe,ie)}function fe(oe,ie,de,Xe){var st=de.type;return st===h?Ye(oe,ie,de.props.children,Xe,de.key):ie!==null&&(ie.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===_&&kE(st)===ie.type)?(Xe=E(ie,de.props),Xe.ref=Ed(oe,ie,de),Xe.return=oe,Xe):(Xe=vm(de.type,de.key,de.props,null,oe.mode,Xe),Xe.ref=Ed(oe,ie,de),Xe.return=oe,Xe)}function Ie(oe,ie,de,Xe){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==de.containerInfo||ie.stateNode.implementation!==de.implementation?(ie=Qx(de,oe.mode,Xe),ie.return=oe,ie):(ie=E(ie,de.children||[]),ie.return=oe,ie)}function Ye(oe,ie,de,Xe,st){return ie===null||ie.tag!==7?(ie=Ha(de,oe.mode,Xe,st),ie.return=oe,ie):(ie=E(ie,de),ie.return=oe,ie)}function wt(oe,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number")return ie=qx(""+ie,oe.mode,de),ie.return=oe,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case l:return de=vm(ie.type,ie.key,ie.props,null,oe.mode,de),de.ref=Ed(oe,null,ie),de.return=oe,de;case c:return ie=Qx(ie,oe.mode,de),ie.return=oe,ie;case _:var Xe=ie._init;return wt(oe,Xe(ie._payload),de)}if(j(ie)||C(ie))return ie=Ha(ie,oe.mode,de,null),ie.return=oe,ie;zp(oe,ie)}return null}function ht(oe,ie,de,Xe){var st=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number")return st!==null?null:ee(oe,ie,""+de,Xe);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case l:return de.key===st?fe(oe,ie,de,Xe):null;case c:return de.key===st?Ie(oe,ie,de,Xe):null;case _:return st=de._init,ht(oe,ie,st(de._payload),Xe)}if(j(de)||C(de))return st!==null?null:Ye(oe,ie,de,Xe,null);zp(oe,de)}return null}function Yt(oe,ie,de,Xe,st){if(typeof Xe=="string"&&Xe!==""||typeof Xe=="number")return oe=oe.get(de)||null,ee(ie,oe,""+Xe,st);if(typeof Xe=="object"&&Xe!==null){switch(Xe.$$typeof){case l:return oe=oe.get(Xe.key===null?de:Xe.key)||null,fe(ie,oe,Xe,st);case c:return oe=oe.get(Xe.key===null?de:Xe.key)||null,Ie(ie,oe,Xe,st);case _:var bt=Xe._init;return Yt(oe,ie,de,bt(Xe._payload),st)}if(j(Xe)||C(Xe))return oe=oe.get(de)||null,Ye(ie,oe,Xe,st,null);zp(ie,Xe)}return null}function ot(oe,ie,de,Xe){for(var st=null,bt=null,Mt=ie,jt=ie=0,$n=null;Mt!==null&&jt<de.length;jt++){Mt.index>jt?($n=Mt,Mt=null):$n=Mt.sibling;var Wt=ht(oe,Mt,de[jt],Xe);if(Wt===null){Mt===null&&(Mt=$n);break}u&&Mt&&Wt.alternate===null&&d(oe,Mt),ie=I(Wt,ie,jt),bt===null?st=Wt:bt.sibling=Wt,bt=Wt,Mt=$n}if(jt===de.length)return y(oe,Mt),hn&&Da(oe,jt),st;if(Mt===null){for(;jt<de.length;jt++)Mt=wt(oe,de[jt],Xe),Mt!==null&&(ie=I(Mt,ie,jt),bt===null?st=Mt:bt.sibling=Mt,bt=Mt);return hn&&Da(oe,jt),st}for(Mt=w(oe,Mt);jt<de.length;jt++)$n=Yt(Mt,oe,jt,de[jt],Xe),$n!==null&&(u&&$n.alternate!==null&&Mt.delete($n.key===null?jt:$n.key),ie=I($n,ie,jt),bt===null?st=$n:bt.sibling=$n,bt=$n);return u&&Mt.forEach(function(ko){return d(oe,ko)}),hn&&Da(oe,jt),st}function gi(oe,ie,de,Xe){var st=C(de);if(typeof st!="function")throw Error(o(150));if(de=st.call(de),de==null)throw Error(o(151));for(var bt=st=null,Mt=ie,jt=ie=0,$n=null,Wt=de.next();Mt!==null&&!Wt.done;jt++,Wt=de.next()){Mt.index>jt?($n=Mt,Mt=null):$n=Mt.sibling;var ko=ht(oe,Mt,Wt.value,Xe);if(ko===null){Mt===null&&(Mt=$n);break}u&&Mt&&ko.alternate===null&&d(oe,Mt),ie=I(ko,ie,jt),bt===null?st=ko:bt.sibling=ko,bt=ko,Mt=$n}if(Wt.done)return y(oe,Mt),hn&&Da(oe,jt),st;if(Mt===null){for(;!Wt.done;jt++,Wt=de.next())Wt=wt(oe,Wt.value,Xe),Wt!==null&&(ie=I(Wt,ie,jt),bt===null?st=Wt:bt.sibling=Wt,bt=Wt);return hn&&Da(oe,jt),st}for(Mt=w(oe,Mt);!Wt.done;jt++,Wt=de.next())Wt=Yt(Mt,oe,jt,Wt.value,Xe),Wt!==null&&(u&&Wt.alternate!==null&&Mt.delete(Wt.key===null?jt:Wt.key),ie=I(Wt,ie,jt),bt===null?st=Wt:bt.sibling=Wt,bt=Wt);return u&&Mt.forEach(function(uU){return d(oe,uU)}),hn&&Da(oe,jt),st}function br(oe,ie,de,Xe){if(typeof de=="object"&&de!==null&&de.type===h&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case l:e:{for(var st=de.key,bt=ie;bt!==null;){if(bt.key===st){if(st=de.type,st===h){if(bt.tag===7){y(oe,bt.sibling),ie=E(bt,de.props.children),ie.return=oe,oe=ie;break e}}else if(bt.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===_&&kE(st)===bt.type){y(oe,bt.sibling),ie=E(bt,de.props),ie.ref=Ed(oe,bt,de),ie.return=oe,oe=ie;break e}y(oe,bt);break}else d(oe,bt);bt=bt.sibling}de.type===h?(ie=Ha(de.props.children,oe.mode,Xe,de.key),ie.return=oe,oe=ie):(Xe=vm(de.type,de.key,de.props,null,oe.mode,Xe),Xe.ref=Ed(oe,ie,de),Xe.return=oe,oe=Xe)}return G(oe);case c:e:{for(bt=de.key;ie!==null;){if(ie.key===bt)if(ie.tag===4&&ie.stateNode.containerInfo===de.containerInfo&&ie.stateNode.implementation===de.implementation){y(oe,ie.sibling),ie=E(ie,de.children||[]),ie.return=oe,oe=ie;break e}else{y(oe,ie);break}else d(oe,ie);ie=ie.sibling}ie=Qx(de,oe.mode,Xe),ie.return=oe,oe=ie}return G(oe);case _:return bt=de._init,br(oe,ie,bt(de._payload),Xe)}if(j(de))return ot(oe,ie,de,Xe);if(C(de))return gi(oe,ie,de,Xe);zp(oe,de)}return typeof de=="string"&&de!==""||typeof de=="number"?(de=""+de,ie!==null&&ie.tag===6?(y(oe,ie.sibling),ie=E(ie,de),ie.return=oe,oe=ie):(y(oe,ie),ie=qx(de,oe.mode,Xe),ie.return=oe,oe=ie),G(oe)):y(oe,ie)}return br}var xc=OE(!0),UE=OE(!1),Cd={},Mr=An(Cd),Td=An(Cd),_c=An(Cd);function Ms(u){if(u===Cd)throw Error(o(174));return u}function fx(u,d){ke(_c,d),ke(Td,u),ke(Mr,Cd),u=H(d),lt(Mr),ke(Mr,u)}function Ac(){lt(Mr),lt(Td),lt(_c)}function zE(u){var d=Ms(_c.current),y=Ms(Mr.current);d=D(y,u.type,d),y!==d&&(ke(Td,u),ke(Mr,d))}function px(u){Td.current===u&&(lt(Mr),lt(Td))}var pn=An(0);function Hp(u){for(var d=u;d!==null;){if(d.tag===13){var y=d.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||_d(y)||cc(y)))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if(d.flags&128)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var mx=[];function gx(){for(var u=0;u<mx.length;u++){var d=mx[u];Ue?d._workInProgressVersionPrimary=null:d._workInProgressVersionSecondary=null}mx.length=0}var Gp=a.ReactCurrentDispatcher,Er=a.ReactCurrentBatchConfig,Sc=0,Sn=null,fi=null,Zn=null,Vp=!1,bd=!1,Rd=0,NO=0;function pi(){throw Error(o(321))}function vx(u,d){if(d===null)return!1;for(var y=0;y<d.length&&y<u.length;y++)if(!As(u[y],d[y]))return!1;return!0}function yx(u,d,y,w,E,I){if(Sc=I,Sn=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,Gp.current=u===null||u.memoizedState===null?UO:zO,u=y(w,E),bd){I=0;do{if(bd=!1,Rd=0,25<=I)throw Error(o(301));I+=1,Zn=fi=null,d.updateQueue=null,Gp.current=HO,u=y(w,E)}while(bd)}if(Gp.current=Kp,d=fi!==null&&fi.next!==null,Sc=0,Zn=fi=Sn=null,Vp=!1,d)throw Error(o(300));return u}function xx(){var u=Rd!==0;return Rd=0,u}function js(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zn===null?Sn.memoizedState=Zn=u:Zn=Zn.next=u,Zn}function Es(){if(fi===null){var u=Sn.alternate;u=u!==null?u.memoizedState:null}else u=fi.next;var d=Zn===null?Sn.memoizedState:Zn.next;if(d!==null)Zn=d,fi=u;else{if(u===null)throw Error(o(310));fi=u,u={memoizedState:fi.memoizedState,baseState:fi.baseState,baseQueue:fi.baseQueue,queue:fi.queue,next:null},Zn===null?Sn.memoizedState=Zn=u:Zn=Zn.next=u}return Zn}function Na(u,d){return typeof d=="function"?d(u):d}function jp(u){var d=Es(),y=d.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=u;var w=fi,E=w.baseQueue,I=y.pending;if(I!==null){if(E!==null){var G=E.next;E.next=I.next,I.next=G}w.baseQueue=E=I,y.pending=null}if(E!==null){I=E.next,w=w.baseState;var ee=G=null,fe=null,Ie=I;do{var Ye=Ie.lane;if((Sc&Ye)===Ye)fe!==null&&(fe=fe.next={lane:0,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null}),w=Ie.hasEagerState?Ie.eagerState:u(w,Ie.action);else{var wt={lane:Ye,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null};fe===null?(ee=fe=wt,G=w):fe=fe.next=wt,Sn.lanes|=Ye,Mc|=Ye}Ie=Ie.next}while(Ie!==null&&Ie!==I);fe===null?G=w:fe.next=ee,As(w,d.memoizedState)||(rr=!0),d.memoizedState=w,d.baseState=G,d.baseQueue=fe,y.lastRenderedState=w}if(u=y.interleaved,u!==null){E=u;do I=E.lane,Sn.lanes|=I,Mc|=I,E=E.next;while(E!==u)}else E===null&&(y.lanes=0);return[d.memoizedState,y.dispatch]}function Wp(u){var d=Es(),y=d.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=u;var w=y.dispatch,E=y.pending,I=d.memoizedState;if(E!==null){y.pending=null;var G=E=E.next;do I=u(I,G.action),G=G.next;while(G!==E);As(I,d.memoizedState)||(rr=!0),d.memoizedState=I,d.baseQueue===null&&(d.baseState=I),y.lastRenderedState=I}return[I,w]}function HE(){}function GE(u,d){var y=Sn,w=Es(),E=d(),I=!As(w.memoizedState,E);if(I&&(w.memoizedState=E,rr=!0),w=w.queue,Id(WE.bind(null,y,w,u),[u]),w.getSnapshot!==d||I||Zn!==null&&Zn.memoizedState.tag&1){if(y.flags|=2048,Pd(9,jE.bind(null,y,w,E,d),void 0,null),Dn===null)throw Error(o(349));Sc&30||VE(y,d,E)}return E}function VE(u,d,y){u.flags|=16384,u={getSnapshot:d,value:y},d=Sn.updateQueue,d===null?(d={lastEffect:null,stores:null},Sn.updateQueue=d,d.stores=[u]):(y=d.stores,y===null?d.stores=[u]:y.push(u))}function jE(u,d,y,w){d.value=y,d.getSnapshot=w,XE(d)&&Cr(u,1,-1)}function WE(u,d,y){return y(function(){XE(d)&&Cr(u,1,-1)})}function XE(u){var d=u.getSnapshot;u=u.value;try{var y=d();return!As(u,y)}catch{return!0}}function _x(u){var d=js();return typeof u=="function"&&(u=u()),d.memoizedState=d.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:u},d.queue=u,u=u.dispatch=OO.bind(null,Sn,u),[d.memoizedState,u]}function Pd(u,d,y,w){return u={tag:u,create:d,destroy:y,deps:w,next:null},d=Sn.updateQueue,d===null?(d={lastEffect:null,stores:null},Sn.updateQueue=d,d.lastEffect=u.next=u):(y=d.lastEffect,y===null?d.lastEffect=u.next=u:(w=y.next,y.next=u,u.next=w,d.lastEffect=u)),u}function JE(){return Es().memoizedState}function Xp(u,d,y,w){var E=js();Sn.flags|=u,E.memoizedState=Pd(1|d,y,void 0,w===void 0?null:w)}function Jp(u,d,y,w){var E=Es();w=w===void 0?null:w;var I=void 0;if(fi!==null){var G=fi.memoizedState;if(I=G.destroy,w!==null&&vx(w,G.deps)){E.memoizedState=Pd(d,y,I,w);return}}Sn.flags|=u,E.memoizedState=Pd(1|d,y,I,w)}function Ax(u,d){return Xp(8390656,8,u,d)}function Id(u,d){return Jp(2048,8,u,d)}function KE(u,d){return Jp(4,2,u,d)}function qE(u,d){return Jp(4,4,u,d)}function QE(u,d){if(typeof d=="function")return u=u(),d(u),function(){d(null)};if(d!=null)return u=u(),d.current=u,function(){d.current=null}}function YE(u,d,y){return y=y!=null?y.concat([u]):null,Jp(4,4,QE.bind(null,d,u),y)}function Sx(){}function ZE(u,d){var y=Es();d=d===void 0?null:d;var w=y.memoizedState;return w!==null&&d!==null&&vx(d,w[1])?w[0]:(y.memoizedState=[u,d],u)}function $E(u,d){var y=Es();d=d===void 0?null:d;var w=y.memoizedState;return w!==null&&d!==null&&vx(d,w[1])?w[0]:(u=u(),y.memoizedState=[u,d],u)}function FO(u,d){var y=Vt;Vt=y!==0&&4>y?y:4,u(!0);var w=Er.transition;Er.transition={};try{u(!1),d()}finally{Vt=y,Er.transition=w}}function eC(){return Es().memoizedState}function kO(u,d,y){var w=Do(u);y={lane:w,action:y,hasEagerState:!1,eagerState:null,next:null},tC(u)?nC(d,y):(iC(u,d,y),y=Bi(),u=Cr(u,w,y),u!==null&&rC(u,d,w))}function OO(u,d,y){var w=Do(u),E={lane:w,action:y,hasEagerState:!1,eagerState:null,next:null};if(tC(u))nC(d,E);else{iC(u,d,E);var I=u.alternate;if(u.lanes===0&&(I===null||I.lanes===0)&&(I=d.lastRenderedReducer,I!==null))try{var G=d.lastRenderedState,ee=I(G,y);if(E.hasEagerState=!0,E.eagerState=ee,As(ee,G))return}catch{}finally{}y=Bi(),u=Cr(u,w,y),u!==null&&rC(u,d,w)}}function tC(u){var d=u.alternate;return u===Sn||d!==null&&d===Sn}function nC(u,d){bd=Vp=!0;var y=u.pending;y===null?d.next=d:(d.next=y.next,y.next=d),u.pending=d}function iC(u,d,y){Dn!==null&&u.mode&1&&!(Pt&2)?(u=d.interleaved,u===null?(y.next=y,ws===null?ws=[d]:ws.push(d)):(y.next=u.next,u.next=y),d.interleaved=y):(u=d.pending,u===null?y.next=y:(y.next=u.next,u.next=y),d.pending=y)}function rC(u,d,y){if(y&4194240){var w=d.lanes;w&=u.pendingLanes,y|=w,d.lanes=y,Qy(u,y)}}var Kp={readContext:Ar,useCallback:pi,useContext:pi,useEffect:pi,useImperativeHandle:pi,useInsertionEffect:pi,useLayoutEffect:pi,useMemo:pi,useReducer:pi,useRef:pi,useState:pi,useDebugValue:pi,useDeferredValue:pi,useTransition:pi,useMutableSource:pi,useSyncExternalStore:pi,useId:pi,unstable_isNewReconciler:!1},UO={readContext:Ar,useCallback:function(u,d){return js().memoizedState=[u,d===void 0?null:d],u},useContext:Ar,useEffect:Ax,useImperativeHandle:function(u,d,y){return y=y!=null?y.concat([u]):null,Xp(4194308,4,QE.bind(null,d,u),y)},useLayoutEffect:function(u,d){return Xp(4194308,4,u,d)},useInsertionEffect:function(u,d){return Xp(4,2,u,d)},useMemo:function(u,d){var y=js();return d=d===void 0?null:d,u=u(),y.memoizedState=[u,d],u},useReducer:function(u,d,y){var w=js();return d=y!==void 0?y(d):d,w.memoizedState=w.baseState=d,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:d},w.queue=u,u=u.dispatch=kO.bind(null,Sn,u),[w.memoizedState,u]},useRef:function(u){var d=js();return u={current:u},d.memoizedState=u},useState:_x,useDebugValue:Sx,useDeferredValue:function(u){var d=_x(u),y=d[0],w=d[1];return Ax(function(){var E=Er.transition;Er.transition={};try{w(u)}finally{Er.transition=E}},[u]),y},useTransition:function(){var u=_x(!1),d=u[0];return u=FO.bind(null,u[1]),js().memoizedState=u,[d,u]},useMutableSource:function(){},useSyncExternalStore:function(u,d,y){var w=Sn,E=js();if(hn){if(y===void 0)throw Error(o(407));y=y()}else{if(y=d(),Dn===null)throw Error(o(349));Sc&30||VE(w,d,y)}E.memoizedState=y;var I={value:y,getSnapshot:d};return E.queue=I,Ax(WE.bind(null,w,I,u),[u]),w.flags|=2048,Pd(9,jE.bind(null,w,I,y,d),void 0,null),y},useId:function(){var u=js(),d=Dn.identifierPrefix;if(hn){var y=Vs,w=Gs;y=(w&~(1<<32-tr(w)-1)).toString(32)+y,d=":"+d+"R"+y,y=Rd++,0<y&&(d+="H"+y.toString(32)),d+=":"}else y=NO++,d=":"+d+"r"+y.toString(32)+":";return u.memoizedState=d},unstable_isNewReconciler:!1},zO={readContext:Ar,useCallback:ZE,useContext:Ar,useEffect:Id,useImperativeHandle:YE,useInsertionEffect:KE,useLayoutEffect:qE,useMemo:$E,useReducer:jp,useRef:JE,useState:function(){return jp(Na)},useDebugValue:Sx,useDeferredValue:function(u){var d=jp(Na),y=d[0],w=d[1];return Id(function(){var E=Er.transition;Er.transition={};try{w(u)}finally{Er.transition=E}},[u]),y},useTransition:function(){var u=jp(Na)[0],d=Es().memoizedState;return[u,d]},useMutableSource:HE,useSyncExternalStore:GE,useId:eC,unstable_isNewReconciler:!1},HO={readContext:Ar,useCallback:ZE,useContext:Ar,useEffect:Id,useImperativeHandle:YE,useInsertionEffect:KE,useLayoutEffect:qE,useMemo:$E,useReducer:Wp,useRef:JE,useState:function(){return Wp(Na)},useDebugValue:Sx,useDeferredValue:function(u){var d=Wp(Na),y=d[0],w=d[1];return Id(function(){var E=Er.transition;Er.transition={};try{w(u)}finally{Er.transition=E}},[u]),y},useTransition:function(){var u=Wp(Na)[0],d=Es().memoizedState;return[u,d]},useMutableSource:HE,useSyncExternalStore:GE,useId:eC,unstable_isNewReconciler:!1};function wx(u,d){try{var y="",w=d;do y+=DO(w),w=w.return;while(w);var E=y}catch(I){E=`
3936Error generating stack: `+I.message+`
3937`+I.stack}return{value:u,source:d,stack:E}}function Mx(u,d){try{console.error(d.value)}catch(y){setTimeout(function(){throw y})}}var GO=typeof WeakMap=="function"?WeakMap:Map;function sC(u,d,y){y=Hs(-1,y),y.tag=3,y.payload={element:null};var w=d.value;return y.callback=function(){um||(um=!0,Gx=w),Mx(u,d)},y}function oC(u,d,y){y=Hs(-1,y),y.tag=3;var w=u.type.getDerivedStateFromError;if(typeof w=="function"){var E=d.value;y.payload=function(){return w(E)},y.callback=function(){Mx(u,d)}}var I=u.stateNode;return I!==null&&typeof I.componentDidCatch=="function"&&(y.callback=function(){Mx(u,d),typeof w!="function"&&(Bo===null?Bo=new Set([this]):Bo.add(this));var G=d.stack;this.componentDidCatch(d.value,{componentStack:G!==null?G:""})}),y}function aC(u,d,y){var w=u.pingCache;if(w===null){w=u.pingCache=new GO;var E=new Set;w.set(d,E)}else E=w.get(d),E===void 0&&(E=new Set,w.set(d,E));E.has(y)||(E.add(y),u=nU.bind(null,u,d,y),d.then(u,u))}function lC(u){do{var d;if((d=u.tag===13)&&(d=u.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return u;u=u.return}while(u!==null);return null}function cC(u,d,y,w,E){return u.mode&1?(u.flags|=65536,u.lanes=E,u):(u===d?u.flags|=65536:(u.flags|=128,y.flags|=131072,y.flags&=-52805,y.tag===1&&(y.alternate===null?y.tag=17:(d=Hs(-1,1),d.tag=2,Io(y,d))),y.lanes|=1),u)}function Cs(u){u.flags|=4}function uC(u,d){if(u!==null&&u.child===d.child)return!0;if(d.flags&16)return!1;for(u=d.child;u!==null;){if(u.flags&12854||u.subtreeFlags&12854)return!1;u=u.sibling}return!0}var Bd,Ld,qp,Qp;if(Be)Bd=function(u,d){for(var y=d.child;y!==null;){if(y.tag===5||y.tag===6)ue(u,y.stateNode);else if(y.tag!==4&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===d)break;for(;y.sibling===null;){if(y.return===null||y.return===d)return;y=y.return}y.sibling.return=y.return,y=y.sibling}},Ld=function(){},qp=function(u,d,y,w,E){if(u=u.memoizedProps,u!==w){var I=d.stateNode,G=Ms(Mr.current);y=te(I,y,u,w,E,G),(d.updateQueue=y)&&Cs(d)}},Qp=function(u,d,y,w){y!==w&&Cs(d)};else if(U){Bd=function(u,d,y,w){for(var E=d.child;E!==null;){if(E.tag===5){var I=E.stateNode;y&&w&&(I=Kn(I,E.type,E.memoizedProps,E)),ue(u,I)}else if(E.tag===6)I=E.stateNode,y&&w&&(I=qn(I,E.memoizedProps,E)),ue(u,I);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)I=E.child,I!==null&&(I.return=E),Bd(u,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===d)break;for(;E.sibling===null;){if(E.return===null||E.return===d)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};var dC=function(u,d,y,w){for(var E=d.child;E!==null;){if(E.tag===5){var I=E.stateNode;y&&w&&(I=Kn(I,E.type,E.memoizedProps,E)),zt(u,I)}else if(E.tag===6)I=E.stateNode,y&&w&&(I=qn(I,E.memoizedProps,E)),zt(u,I);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)I=E.child,I!==null&&(I.return=E),dC(u,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===d)break;for(;E.sibling===null;){if(E.return===null||E.return===d)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};Ld=function(u,d){var y=d.stateNode;if(!uC(u,d)){u=y.containerInfo;var w=_t(u);dC(w,d,!1,!1),y.pendingChildren=w,Cs(d),an(u,w)}},qp=function(u,d,y,w,E){var I=u.stateNode,G=u.memoizedProps;if((u=uC(u,d))&&G===w)d.stateNode=I;else{var ee=d.stateNode,fe=Ms(Mr.current),Ie=null;G!==w&&(Ie=te(ee,y,G,w,E,fe)),u&&Ie===null?d.stateNode=I:(I=dt(I,Ie,y,G,w,d,u,ee),Ae(I,y,w,E,fe)&&Cs(d),d.stateNode=I,u?Cs(d):Bd(I,d,!1,!1))}},Qp=function(u,d,y,w){y!==w?(u=Ms(_c.current),y=Ms(Mr.current),d.stateNode=xe(w,u,y,d),Cs(d)):d.stateNode=u.stateNode}}else Ld=function(){},qp=function(){},Qp=function(){};function Dd(u,d){if(!hn)switch(u.tailMode){case"hidden":d=u.tail;for(var y=null;d!==null;)d.alternate!==null&&(y=d),d=d.sibling;y===null?u.tail=null:y.sibling=null;break;case"collapsed":y=u.tail;for(var w=null;y!==null;)y.alternate!==null&&(w=y),y=y.sibling;w===null?d||u.tail===null?u.tail=null:u.tail.sibling=null:w.sibling=null}}function mi(u){var d=u.alternate!==null&&u.alternate.child===u.child,y=0,w=0;if(d)for(var E=u.child;E!==null;)y|=E.lanes|E.childLanes,w|=E.subtreeFlags&14680064,w|=E.flags&14680064,E.return=u,E=E.sibling;else for(E=u.child;E!==null;)y|=E.lanes|E.childLanes,w|=E.subtreeFlags,w|=E.flags,E.return=u,E=E.sibling;return u.subtreeFlags|=w,u.childLanes=y,d}function VO(u,d,y){var w=d.pendingProps;switch(cx(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mi(d),null;case 1:return Qn(d.type)&&ln(),mi(d),null;case 3:return w=d.stateNode,Ac(),lt(tn),lt(vt),gx(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),(u===null||u.child===null)&&(Md(d)?Cs(d):u===null||u.memoizedState.isDehydrated&&!(d.flags&256)||(d.flags|=1024,qr!==null&&(Wx(qr),qr=null))),Ld(u,d),mi(d),null;case 5:px(d),y=Ms(_c.current);var E=d.type;if(u!==null&&d.stateNode!=null)qp(u,d,E,w,y),u.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!w){if(d.stateNode===null)throw Error(o(166));return mi(d),null}if(u=Ms(Mr.current),Md(d)){if(!ye)throw Error(o(175));u=Wy(d.stateNode,d.type,d.memoizedProps,y,u,d,!wd),d.updateQueue=u,u!==null&&Cs(d)}else{var I=$(E,w,y,u,d);Bd(I,d,!1,!1),d.stateNode=I,Ae(I,E,w,y,u)&&Cs(d)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return mi(d),null;case 6:if(u&&d.stateNode!=null)Qp(u,d,u.memoizedProps,w);else{if(typeof w!="string"&&d.stateNode===null)throw Error(o(166));if(u=Ms(_c.current),y=Ms(Mr.current),Md(d)){if(!ye)throw Error(o(176));if(u=d.stateNode,w=d.memoizedProps,(y=Xy(u,w,d,!wd))&&(E=nr,E!==null))switch(I=(E.mode&1)!==0,E.tag){case 3:Je(E.stateNode.containerInfo,u,w,I);break;case 5:tt(E.type,E.memoizedProps,E.stateNode,u,w,I)}y&&Cs(d)}else d.stateNode=xe(w,u,y,d)}return mi(d),null;case 13:if(lt(pn),w=d.memoizedState,hn&&ir!==null&&d.mode&1&&!(d.flags&128)){for(u=ir;u;)u=Ro(u);return yc(),d.flags|=98560,d}if(w!==null&&w.dehydrated!==null){if(w=Md(d),u===null){if(!w)throw Error(o(318));if(!ye)throw Error(o(344));if(u=d.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));Jy(u,d)}else yc(),!(d.flags&128)&&(d.memoizedState=null),d.flags|=4;return mi(d),null}return qr!==null&&(Wx(qr),qr=null),d.flags&128?(d.lanes=y,d):(w=w!==null,y=!1,u===null?Md(d):y=u.memoizedState!==null,w&&!y&&(d.child.flags|=8192,d.mode&1&&(u===null||pn.current&1?Hn===0&&(Hn=3):Jx())),d.updateQueue!==null&&(d.flags|=4),mi(d),null);case 4:return Ac(),Ld(u,d),u===null&&Ne(d.stateNode.containerInfo),mi(d),null;case 10:return ix(d.type._context),mi(d),null;case 17:return Qn(d.type)&&ln(),mi(d),null;case 19:if(lt(pn),E=d.memoizedState,E===null)return mi(d),null;if(w=(d.flags&128)!==0,I=E.rendering,I===null)if(w)Dd(E,!1);else{if(Hn!==0||u!==null&&u.flags&128)for(u=d.child;u!==null;){if(I=Hp(u),I!==null){for(d.flags|=128,Dd(E,!1),u=I.updateQueue,u!==null&&(d.updateQueue=u,d.flags|=4),d.subtreeFlags=0,u=y,w=d.child;w!==null;)y=w,E=u,y.flags&=14680066,I=y.alternate,I===null?(y.childLanes=0,y.lanes=E,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=I.childLanes,y.lanes=I.lanes,y.child=I.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=I.memoizedProps,y.memoizedState=I.memoizedState,y.updateQueue=I.updateQueue,y.type=I.type,E=I.dependencies,y.dependencies=E===null?null:{lanes:E.lanes,firstContext:E.firstContext}),w=w.sibling;return ke(pn,pn.current&1|2),d.child}u=u.sibling}E.tail!==null&&Yn()>Hx&&(d.flags|=128,w=!0,Dd(E,!1),d.lanes=4194304)}else{if(!w)if(u=Hp(I),u!==null){if(d.flags|=128,w=!0,u=u.updateQueue,u!==null&&(d.updateQueue=u,d.flags|=4),Dd(E,!0),E.tail===null&&E.tailMode==="hidden"&&!I.alternate&&!hn)return mi(d),null}else 2*Yn()-E.renderingStartTime>Hx&&y!==1073741824&&(d.flags|=128,w=!0,Dd(E,!1),d.lanes=4194304);E.isBackwards?(I.sibling=d.child,d.child=I):(u=E.last,u!==null?u.sibling=I:d.child=I,E.last=I)}return E.tail!==null?(d=E.tail,E.rendering=d,E.tail=d.sibling,E.renderingStartTime=Yn(),d.sibling=null,u=pn.current,ke(pn,w?u&1|2:u&1),d):(mi(d),null);case 22:case 23:return Xx(),w=d.memoizedState!==null,u!==null&&u.memoizedState!==null!==w&&(d.flags|=8192),w&&d.mode&1?sr&1073741824&&(mi(d),Be&&d.subtreeFlags&6&&(d.flags|=8192)):mi(d),null;case 24:return null;case 25:return null}throw Error(o(156,d.tag))}var jO=a.ReactCurrentOwner,rr=!1;function Ii(u,d,y,w){d.child=u===null?UE(d,null,y,w):xc(d,u.child,y,w)}function hC(u,d,y,w,E){y=y.render;var I=d.ref;return mc(d,E),w=yx(u,d,y,w,I,E),y=xx(),u!==null&&!rr?(d.updateQueue=u.updateQueue,d.flags&=-2053,u.lanes&=~E,Ws(u,d,E)):(hn&&y&&lx(d),d.flags|=1,Ii(u,d,w,E),d.child)}function fC(u,d,y,w,E){if(u===null){var I=y.type;return typeof I=="function"&&!Kx(I)&&I.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(d.tag=15,d.type=I,pC(u,d,I,w,E)):(u=vm(y.type,null,w,d,d.mode,E),u.ref=d.ref,u.return=d,d.child=u)}if(I=u.child,!(u.lanes&E)){var G=I.memoizedProps;if(y=y.compare,y=y!==null?y:Bp,y(G,w)&&u.ref===d.ref)return Ws(u,d,E)}return d.flags|=1,u=Fo(I,w),u.ref=d.ref,u.return=d,d.child=u}function pC(u,d,y,w,E){if(u!==null&&Bp(u.memoizedProps,w)&&u.ref===d.ref)if(rr=!1,(u.lanes&E)!==0)u.flags&131072&&(rr=!0);else return d.lanes=u.lanes,Ws(u,d,E);return Ex(u,d,y,w,E)}function mC(u,d,y){var w=d.pendingProps,E=w.children,I=u!==null?u.memoizedState:null;if(w.mode==="hidden")if(!(d.mode&1))d.memoizedState={baseLanes:0,cachePool:null},ke(wc,sr),sr|=y;else if(y&1073741824)d.memoizedState={baseLanes:0,cachePool:null},w=I!==null?I.baseLanes:y,ke(wc,sr),sr|=w;else return u=I!==null?I.baseLanes|y:y,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:u,cachePool:null},d.updateQueue=null,ke(wc,sr),sr|=u,null;else I!==null?(w=I.baseLanes|y,d.memoizedState=null):w=y,ke(wc,sr),sr|=w;return Ii(u,d,E,y),d.child}function gC(u,d){var y=d.ref;(u===null&&y!==null||u!==null&&u.ref!==y)&&(d.flags|=512,d.flags|=2097152)}function Ex(u,d,y,w,E){var I=Qn(y)?Gi:vt.current;return I=Ln(d,I),mc(d,E),y=yx(u,d,y,w,I,E),w=xx(),u!==null&&!rr?(d.updateQueue=u.updateQueue,d.flags&=-2053,u.lanes&=~E,Ws(u,d,E)):(hn&&w&&lx(d),d.flags|=1,Ii(u,d,y,E),d.child)}function vC(u,d,y,w,E){if(Qn(y)){var I=!0;ri(d)}else I=!1;if(mc(d,E),d.stateNode===null)u!==null&&(u.alternate=null,d.alternate=null,d.flags|=2),IE(d,y,w),ax(d,y,w,E),w=!0;else if(u===null){var G=d.stateNode,ee=d.memoizedProps;G.props=ee;var fe=G.context,Ie=y.contextType;typeof Ie=="object"&&Ie!==null?Ie=Ar(Ie):(Ie=Qn(y)?Gi:vt.current,Ie=Ln(d,Ie));var Ye=y.getDerivedStateFromProps,wt=typeof Ye=="function"||typeof G.getSnapshotBeforeUpdate=="function";wt||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(ee!==w||fe!==Ie)&&BE(d,G,w,Ie),Po=!1;var ht=d.memoizedState;G.state=ht,Fp(d,w,G,E),fe=d.memoizedState,ee!==w||ht!==fe||tn.current||Po?(typeof Ye=="function"&&(ox(d,y,Ye,w),fe=d.memoizedState),(ee=Po||PE(d,y,ee,w,ht,fe,Ie))?(wt||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount()),typeof G.componentDidMount=="function"&&(d.flags|=4194308)):(typeof G.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=w,d.memoizedState=fe),G.props=w,G.state=fe,G.context=Ie,w=ee):(typeof G.componentDidMount=="function"&&(d.flags|=4194308),w=!1)}else{G=d.stateNode,CE(u,d),ee=d.memoizedProps,Ie=d.type===d.elementType?ee:Kr(d.type,ee),G.props=Ie,wt=d.pendingProps,ht=G.context,fe=y.contextType,typeof fe=="object"&&fe!==null?fe=Ar(fe):(fe=Qn(y)?Gi:vt.current,fe=Ln(d,fe));var Yt=y.getDerivedStateFromProps;(Ye=typeof Yt=="function"||typeof G.getSnapshotBeforeUpdate=="function")||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(ee!==wt||ht!==fe)&&BE(d,G,w,fe),Po=!1,ht=d.memoizedState,G.state=ht,Fp(d,w,G,E);var ot=d.memoizedState;ee!==wt||ht!==ot||tn.current||Po?(typeof Yt=="function"&&(ox(d,y,Yt,w),ot=d.memoizedState),(Ie=Po||PE(d,y,Ie,w,ht,ot,fe)||!1)?(Ye||typeof G.UNSAFE_componentWillUpdate!="function"&&typeof G.componentWillUpdate!="function"||(typeof G.componentWillUpdate=="function"&&G.componentWillUpdate(w,ot,fe),typeof G.UNSAFE_componentWillUpdate=="function"&&G.UNSAFE_componentWillUpdate(w,ot,fe)),typeof G.componentDidUpdate=="function"&&(d.flags|=4),typeof G.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof G.componentDidUpdate!="function"||ee===u.memoizedProps&&ht===u.memoizedState||(d.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||ee===u.memoizedProps&&ht===u.memoizedState||(d.flags|=1024),d.memoizedProps=w,d.memoizedState=ot),G.props=w,G.state=ot,G.context=fe,w=Ie):(typeof G.componentDidUpdate!="function"||ee===u.memoizedProps&&ht===u.memoizedState||(d.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||ee===u.memoizedProps&&ht===u.memoizedState||(d.flags|=1024),w=!1)}return Cx(u,d,y,w,I,E)}function Cx(u,d,y,w,E,I){gC(u,d);var G=(d.flags&128)!==0;if(!w&&!G)return E&&fc(d,y,!1),Ws(u,d,I);w=d.stateNode,jO.current=d;var ee=G&&typeof y.getDerivedStateFromError!="function"?null:w.render();return d.flags|=1,u!==null&&G?(d.child=xc(d,u.child,null,I),d.child=xc(d,null,ee,I)):Ii(u,d,ee,I),d.memoizedState=w.state,E&&fc(d,y,!0),d.child}function yC(u){var d=u.stateNode;d.pendingContext?Jr(u,d.pendingContext,d.pendingContext!==d.context):d.context&&Jr(u,d.context,!1),fx(u,d.containerInfo)}function xC(u,d,y,w,E){return yc(),hx(E),d.flags|=256,Ii(u,d,y,w),d.child}var Yp={dehydrated:null,treeContext:null,retryLane:0};function Zp(u){return{baseLanes:u,cachePool:null}}function _C(u,d,y){var w=d.pendingProps,E=pn.current,I=!1,G=(d.flags&128)!==0,ee;if((ee=G)||(ee=u!==null&&u.memoizedState===null?!1:(E&2)!==0),ee?(I=!0,d.flags&=-129):(u===null||u.memoizedState!==null)&&(E|=1),ke(pn,E&1),u===null)return dx(d),u=d.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?(d.mode&1?cc(u)?d.lanes=8:d.lanes=1073741824:d.lanes=1,null):(E=w.children,u=w.fallback,I?(w=d.mode,I=d.child,E={mode:"hidden",children:E},!(w&1)&&I!==null?(I.childLanes=0,I.pendingProps=E):I=ym(E,w,0,null),u=Ha(u,w,y,null),I.return=d,u.return=d,I.sibling=u,d.child=I,d.child.memoizedState=Zp(y),d.memoizedState=Yp,u):Tx(d,E));if(E=u.memoizedState,E!==null){if(ee=E.dehydrated,ee!==null){if(G)return d.flags&256?(d.flags&=-257,$p(u,d,y,Error(o(422)))):d.memoizedState!==null?(d.child=u.child,d.flags|=128,null):(I=w.fallback,E=d.mode,w=ym({mode:"visible",children:w.children},E,0,null),I=Ha(I,E,y,null),I.flags|=2,w.return=d,I.return=d,w.sibling=I,d.child=w,d.mode&1&&xc(d,u.child,null,y),d.child.memoizedState=Zp(y),d.memoizedState=Yp,I);if(!(d.mode&1))d=$p(u,d,y,null);else if(cc(ee))d=$p(u,d,y,Error(o(419)));else if(w=(y&u.childLanes)!==0,rr||w){if(w=Dn,w!==null){switch(y&-y){case 4:I=2;break;case 16:I=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:I=32;break;case 536870912:I=268435456;break;default:I=0}w=I&(w.suspendedLanes|y)?0:I,w!==0&&w!==E.retryLane&&(E.retryLane=w,Cr(u,w,-1))}Jx(),d=$p(u,d,y,Error(o(421)))}else _d(ee)?(d.flags|=128,d.child=u.child,d=iU.bind(null,u),uc(ee,d),d=null):(y=E.treeContext,ye&&(ir=Ep(ee),nr=d,hn=!0,qr=null,wd=!1,y!==null&&(Sr[wr++]=Gs,Sr[wr++]=Vs,Sr[wr++]=La,Gs=y.id,Vs=y.overflow,La=d)),d=Tx(d,d.pendingProps.children),d.flags|=4096);return d}return I?(w=SC(u,d,w.children,w.fallback,y),I=d.child,E=u.child.memoizedState,I.memoizedState=E===null?Zp(y):{baseLanes:E.baseLanes|y,cachePool:null},I.childLanes=u.childLanes&~y,d.memoizedState=Yp,w):(y=AC(u,d,w.children,y),d.memoizedState=null,y)}return I?(w=SC(u,d,w.children,w.fallback,y),I=d.child,E=u.child.memoizedState,I.memoizedState=E===null?Zp(y):{baseLanes:E.baseLanes|y,cachePool:null},I.childLanes=u.childLanes&~y,d.memoizedState=Yp,w):(y=AC(u,d,w.children,y),d.memoizedState=null,y)}function Tx(u,d){return d=ym({mode:"visible",children:d},u.mode,0,null),d.return=u,u.child=d}function AC(u,d,y,w){var E=u.child;return u=E.sibling,y=Fo(E,{mode:"visible",children:y}),!(d.mode&1)&&(y.lanes=w),y.return=d,y.sibling=null,u!==null&&(w=d.deletions,w===null?(d.deletions=[u],d.flags|=16):w.push(u)),d.child=y}function SC(u,d,y,w,E){var I=d.mode;u=u.child;var G=u.sibling,ee={mode:"hidden",children:y};return!(I&1)&&d.child!==u?(y=d.child,y.childLanes=0,y.pendingProps=ee,d.deletions=null):(y=Fo(u,ee),y.subtreeFlags=u.subtreeFlags&14680064),G!==null?w=Fo(G,w):(w=Ha(w,I,E,null),w.flags|=2),w.return=d,y.return=d,y.sibling=w,d.child=y,w}function $p(u,d,y,w){return w!==null&&hx(w),xc(d,u.child,null,y),u=Tx(d,d.pendingProps.children),u.flags|=2,d.memoizedState=null,u}function wC(u,d,y){u.lanes|=d;var w=u.alternate;w!==null&&(w.lanes|=d),rx(u.return,d,y)}function bx(u,d,y,w,E){var I=u.memoizedState;I===null?u.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:w,tail:y,tailMode:E}:(I.isBackwards=d,I.rendering=null,I.renderingStartTime=0,I.last=w,I.tail=y,I.tailMode=E)}function MC(u,d,y){var w=d.pendingProps,E=w.revealOrder,I=w.tail;if(Ii(u,d,w.children,y),w=pn.current,w&2)w=w&1|2,d.flags|=128;else{if(u!==null&&u.flags&128)e:for(u=d.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&wC(u,y,d);else if(u.tag===19)wC(u,y,d);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===d)break e;for(;u.sibling===null;){if(u.return===null||u.return===d)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}w&=1}if(ke(pn,w),!(d.mode&1))d.memoizedState=null;else switch(E){case"forwards":for(y=d.child,E=null;y!==null;)u=y.alternate,u!==null&&Hp(u)===null&&(E=y),y=y.sibling;y=E,y===null?(E=d.child,d.child=null):(E=y.sibling,y.sibling=null),bx(d,!1,E,y,I);break;case"backwards":for(y=null,E=d.child,d.child=null;E!==null;){if(u=E.alternate,u!==null&&Hp(u)===null){d.child=E;break}u=E.sibling,E.sibling=y,y=E,E=u}bx(d,!0,y,null,I);break;case"together":bx(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function Ws(u,d,y){if(u!==null&&(d.dependencies=u.dependencies),Mc|=d.lanes,!(y&d.childLanes))return null;if(u!==null&&d.child!==u.child)throw Error(o(153));if(d.child!==null){for(u=d.child,y=Fo(u,u.pendingProps),d.child=y,y.return=d;u.sibling!==null;)u=u.sibling,y=y.sibling=Fo(u,u.pendingProps),y.return=d;y.sibling=null}return d.child}function WO(u,d,y){switch(d.tag){case 3:yC(d),yc();break;case 5:zE(d);break;case 1:Qn(d.type)&&ri(d);break;case 4:fx(d,d.stateNode.containerInfo);break;case 10:EE(d,d.type._context,d.memoizedProps.value);break;case 13:var w=d.memoizedState;if(w!==null)return w.dehydrated!==null?(ke(pn,pn.current&1),d.flags|=128,null):y&d.child.childLanes?_C(u,d,y):(ke(pn,pn.current&1),u=Ws(u,d,y),u!==null?u.sibling:null);ke(pn,pn.current&1);break;case 19:if(w=(y&d.childLanes)!==0,u.flags&128){if(w)return MC(u,d,y);d.flags|=128}var E=d.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ke(pn,pn.current),w)break;return null;case 22:case 23:return d.lanes=0,mC(u,d,y)}return Ws(u,d,y)}function XO(u,d){switch(cx(d),d.tag){case 1:return Qn(d.type)&&ln(),u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 3:return Ac(),lt(tn),lt(vt),gx(),u=d.flags,u&65536&&!(u&128)?(d.flags=u&-65537|128,d):null;case 5:return px(d),null;case 13:if(lt(pn),u=d.memoizedState,u!==null&&u.dehydrated!==null){if(d.alternate===null)throw Error(o(340));yc()}return u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 19:return lt(pn),null;case 4:return Ac(),null;case 10:return ix(d.type._context),null;case 22:case 23:return Xx(),null;case 24:return null;default:return null}}var em=!1,Fa=!1,JO=typeof WeakSet=="function"?WeakSet:Set,Ge=null;function tm(u,d){var y=u.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(w){Wi(u,d,w)}else y.current=null}function Rx(u,d,y){try{y()}catch(w){Wi(u,d,w)}}var EC=!1;function KO(u,d){for(X(u.containerInfo),Ge=d;Ge!==null;)if(u=Ge,d=u.child,(u.subtreeFlags&1028)!==0&&d!==null)d.return=u,Ge=d;else for(;Ge!==null;){u=Ge;try{var y=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,E=y.memoizedState,I=u.stateNode,G=I.getSnapshotBeforeUpdate(u.elementType===u.type?w:Kr(u.type,w),E);I.__reactInternalSnapshotBeforeUpdate=G}break;case 3:Be&&Fe(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ee){Wi(u,u.return,ee)}if(d=u.sibling,d!==null){d.return=u.return,Ge=d;break}Ge=u.return}return y=EC,EC=!1,y}function ka(u,d,y){var w=d.updateQueue;if(w=w!==null?w.lastEffect:null,w!==null){var E=w=w.next;do{if((E.tag&u)===u){var I=E.destroy;E.destroy=void 0,I!==void 0&&Rx(d,y,I)}E=E.next}while(E!==w)}}function Nd(u,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var y=d=d.next;do{if((y.tag&u)===u){var w=y.create;y.destroy=w()}y=y.next}while(y!==d)}}function Px(u){var d=u.ref;if(d!==null){var y=u.stateNode;switch(u.tag){case 5:u=Z(y);break;default:u=y}typeof d=="function"?d(u):d.current=u}}function CC(u,d,y){if(_s&&typeof _s.onCommitFiberUnmount=="function")try{_s.onCommitFiberUnmount(Pp,d)}catch{}switch(d.tag){case 0:case 11:case 14:case 15:if(u=d.updateQueue,u!==null&&(u=u.lastEffect,u!==null)){var w=u=u.next;do{var E=w,I=E.destroy;E=E.tag,I!==void 0&&(E&2||E&4)&&Rx(d,y,I),w=w.next}while(w!==u)}break;case 1:if(tm(d,y),u=d.stateNode,typeof u.componentWillUnmount=="function")try{u.props=d.memoizedProps,u.state=d.memoizedState,u.componentWillUnmount()}catch(G){Wi(d,y,G)}break;case 5:tm(d,y);break;case 4:Be?BC(u,d,y):U&&U&&(d=d.stateNode.containerInfo,y=_t(d),Rt(d,y))}}function TC(u,d,y){for(var w=d;;)if(CC(u,w,y),w.child===null||Be&&w.tag===4){if(w===d)break;for(;w.sibling===null;){if(w.return===null||w.return===d)return;w=w.return}w.sibling.return=w.return,w=w.sibling}else w.child.return=w,w=w.child}function bC(u){var d=u.alternate;d!==null&&(u.alternate=null,bC(d)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(d=u.stateNode,d!==null&&Ze(d)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function RC(u){return u.tag===5||u.tag===3||u.tag===4}function PC(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||RC(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function IC(u){if(Be){e:{for(var d=u.return;d!==null;){if(RC(d))break e;d=d.return}throw Error(o(160))}var y=d;switch(y.tag){case 5:d=y.stateNode,y.flags&32&&(Ve(d),y.flags&=-33),y=PC(u),Bx(u,y,d);break;case 3:case 4:d=y.stateNode.containerInfo,y=PC(u),Ix(u,y,d);break;default:throw Error(o(161))}}}function Ix(u,d,y){var w=u.tag;if(w===5||w===6)u=u.stateNode,d?qe(y,u,d):xt(y,u);else if(w!==4&&(u=u.child,u!==null))for(Ix(u,d,y),u=u.sibling;u!==null;)Ix(u,d,y),u=u.sibling}function Bx(u,d,y){var w=u.tag;if(w===5||w===6)u=u.stateNode,d?ft(y,u,d):Ke(y,u);else if(w!==4&&(u=u.child,u!==null))for(Bx(u,d,y),u=u.sibling;u!==null;)Bx(u,d,y),u=u.sibling}function BC(u,d,y){for(var w=d,E=!1,I,G;;){if(!E){E=w.return;e:for(;;){if(E===null)throw Error(o(160));switch(I=E.stateNode,E.tag){case 5:G=!1;break e;case 3:I=I.containerInfo,G=!0;break e;case 4:I=I.containerInfo,G=!0;break e}E=E.return}E=!0}if(w.tag===5||w.tag===6)TC(u,w,y),G?me(I,w.stateNode):Q(I,w.stateNode);else if(w.tag===18)G?re(I,w.stateNode):le(I,w.stateNode);else if(w.tag===4){if(w.child!==null){I=w.stateNode.containerInfo,G=!0,w.child.return=w,w=w.child;continue}}else if(CC(u,w,y),w.child!==null){w.child.return=w,w=w.child;continue}if(w===d)break;for(;w.sibling===null;){if(w.return===null||w.return===d)return;w=w.return,w.tag===4&&(E=!1)}w.sibling.return=w.return,w=w.sibling}}function Lx(u,d){if(Be){switch(d.tag){case 0:case 11:case 14:case 15:ka(3,d,d.return),Nd(3,d),ka(5,d,d.return);return;case 1:return;case 5:var y=d.stateNode;if(y!=null){var w=d.memoizedProps;u=u!==null?u.memoizedProps:w;var E=d.type,I=d.updateQueue;d.updateQueue=null,I!==null&&It(y,I,E,u,w,d)}return;case 6:if(d.stateNode===null)throw Error(o(162));y=d.memoizedProps,Re(d.stateNode,u!==null?u.memoizedProps:y,y);return;case 3:ye&&u!==null&&u.memoizedState.isDehydrated&&ne(d.stateNode.containerInfo);return;case 12:return;case 13:nm(d);return;case 19:nm(d);return;case 17:return}throw Error(o(163))}switch(d.tag){case 0:case 11:case 14:case 15:ka(3,d,d.return),Nd(3,d),ka(5,d,d.return);return;case 12:return;case 13:nm(d);return;case 19:nm(d);return;case 3:ye&&u!==null&&u.memoizedState.isDehydrated&&ne(d.stateNode.containerInfo);break;case 22:case 23:return}e:if(U){switch(d.tag){case 1:case 5:case 6:break e;case 3:case 4:d=d.stateNode,Rt(d.containerInfo,d.pendingChildren);break e}throw Error(o(163))}}function nm(u){var d=u.updateQueue;if(d!==null){u.updateQueue=null;var y=u.stateNode;y===null&&(y=u.stateNode=new JO),d.forEach(function(w){var E=rU.bind(null,u,w);y.has(w)||(y.add(w),w.then(E,E))})}}function qO(u,d){for(Ge=d;Ge!==null;){d=Ge;var y=d.deletions;if(y!==null)for(var w=0;w<y.length;w++){var E=y[w];try{var I=u;Be?BC(I,E,d):TC(I,E,d);var G=E.alternate;G!==null&&(G.return=null),E.return=null}catch(st){Wi(E,d,st)}}if(y=d.child,d.subtreeFlags&12854&&y!==null)y.return=d,Ge=y;else for(;Ge!==null;){d=Ge;try{var ee=d.flags;if(ee&32&&Be&&Ve(d.stateNode),ee&512){var fe=d.alternate;if(fe!==null){var Ie=fe.ref;Ie!==null&&(typeof Ie=="function"?Ie(null):Ie.current=null)}}if(ee&8192)switch(d.tag){case 13:if(d.memoizedState!==null){var Ye=d.alternate;(Ye===null||Ye.memoizedState===null)&&(zx=Yn())}break;case 22:var wt=d.memoizedState!==null,ht=d.alternate,Yt=ht!==null&&ht.memoizedState!==null;if(y=d,Be){e:if(w=y,E=wt,I=null,Be)for(var ot=w;;){if(ot.tag===5){if(I===null){I=ot;var gi=ot.stateNode;E?K(gi):pe(ot.stateNode,ot.memoizedProps)}}else if(ot.tag===6){if(I===null){var br=ot.stateNode;E?Ce(br):ve(br,ot.memoizedProps)}}else if((ot.tag!==22&&ot.tag!==23||ot.memoizedState===null||ot===w)&&ot.child!==null){ot.child.return=ot,ot=ot.child;continue}if(ot===w)break;for(;ot.sibling===null;){if(ot.return===null||ot.return===w)break e;I===ot&&(I=null),ot=ot.return}I===ot&&(I=null),ot.sibling.return=ot.return,ot=ot.sibling}}if(wt&&!Yt&&y.mode&1){Ge=y;for(var oe=y.child;oe!==null;){for(y=Ge=oe;Ge!==null;){w=Ge;var ie=w.child;switch(w.tag){case 0:case 11:case 14:case 15:ka(4,w,w.return);break;case 1:tm(w,w.return);var de=w.stateNode;if(typeof de.componentWillUnmount=="function"){var Xe=w.return;try{de.props=w.memoizedProps,de.state=w.memoizedState,de.componentWillUnmount()}catch(st){Wi(w,Xe,st)}}break;case 5:tm(w,w.return);break;case 22:if(w.memoizedState!==null){NC(y);continue}}ie!==null?(ie.return=w,Ge=ie):NC(y)}oe=oe.sibling}}}switch(ee&4102){case 2:IC(d),d.flags&=-3;break;case 6:IC(d),d.flags&=-3,Lx(d.alternate,d);break;case 4096:d.flags&=-4097;break;case 4100:d.flags&=-4097,Lx(d.alternate,d);break;case 4:Lx(d.alternate,d)}}catch(st){Wi(d,d.return,st)}if(y=d.sibling,y!==null){y.return=d.return,Ge=y;break}Ge=d.return}}}function QO(u,d,y){Ge=u,LC(u)}function LC(u,d,y){for(var w=(u.mode&1)!==0;Ge!==null;){var E=Ge,I=E.child;if(E.tag===22&&w){var G=E.memoizedState!==null||em;if(!G){var ee=E.alternate,fe=ee!==null&&ee.memoizedState!==null||Fa;ee=em;var Ie=Fa;if(em=G,(Fa=fe)&&!Ie)for(Ge=E;Ge!==null;)G=Ge,fe=G.child,G.tag===22&&G.memoizedState!==null?FC(E):fe!==null?(fe.return=G,Ge=fe):FC(E);for(;I!==null;)Ge=I,LC(I),I=I.sibling;Ge=E,em=ee,Fa=Ie}DC(u)}else E.subtreeFlags&8772&&I!==null?(I.return=E,Ge=I):DC(u)}}function DC(u){for(;Ge!==null;){var d=Ge;if(d.flags&8772){var y=d.alternate;try{if(d.flags&8772)switch(d.tag){case 0:case 11:case 15:Fa||Nd(5,d);break;case 1:var w=d.stateNode;if(d.flags&4&&!Fa)if(y===null)w.componentDidMount();else{var E=d.elementType===d.type?y.memoizedProps:Kr(d.type,y.memoizedProps);w.componentDidUpdate(E,y.memoizedState,w.__reactInternalSnapshotBeforeUpdate)}var I=d.updateQueue;I!==null&&bE(d,I,w);break;case 3:var G=d.updateQueue;if(G!==null){if(y=null,d.child!==null)switch(d.child.tag){case 5:y=Z(d.child.stateNode);break;case 1:y=d.child.stateNode}bE(d,G,y)}break;case 5:var ee=d.stateNode;y===null&&d.flags&4&&We(ee,d.type,d.memoizedProps,d);break;case 6:break;case 4:break;case 12:break;case 13:if(ye&&d.memoizedState===null){var fe=d.alternate;if(fe!==null){var Ie=fe.memoizedState;if(Ie!==null){var Ye=Ie.dehydrated;Ye!==null&&ae(Ye)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(o(163))}Fa||d.flags&512&&Px(d)}catch(wt){Wi(d,d.return,wt)}}if(d===u){Ge=null;break}if(y=d.sibling,y!==null){y.return=d.return,Ge=y;break}Ge=d.return}}function NC(u){for(;Ge!==null;){var d=Ge;if(d===u){Ge=null;break}var y=d.sibling;if(y!==null){y.return=d.return,Ge=y;break}Ge=d.return}}function FC(u){for(;Ge!==null;){var d=Ge;try{switch(d.tag){case 0:case 11:case 15:var y=d.return;try{Nd(4,d)}catch(fe){Wi(d,y,fe)}break;case 1:var w=d.stateNode;if(typeof w.componentDidMount=="function"){var E=d.return;try{w.componentDidMount()}catch(fe){Wi(d,E,fe)}}var I=d.return;try{Px(d)}catch(fe){Wi(d,I,fe)}break;case 5:var G=d.return;try{Px(d)}catch(fe){Wi(d,G,fe)}}}catch(fe){Wi(d,d.return,fe)}if(d===u){Ge=null;break}var ee=d.sibling;if(ee!==null){ee.return=d.return,Ge=ee;break}Ge=d.return}}var im=0,rm=1,sm=2,om=3,am=4;if(typeof Symbol=="function"&&Symbol.for){var Fd=Symbol.for;im=Fd("selector.component"),rm=Fd("selector.has_pseudo_class"),sm=Fd("selector.role"),om=Fd("selector.test_id"),am=Fd("selector.text")}function Dx(u){var d=Te(u);if(d!=null){if(typeof d.memoizedProps["data-testname"]!="string")throw Error(o(364));return d}if(u=N(u),u===null)throw Error(o(362));return u.stateNode.current}function Nx(u,d){switch(d.$$typeof){case im:if(u.type===d.value)return!0;break;case rm:e:{d=d.value,u=[u,0];for(var y=0;y<u.length;){var w=u[y++],E=u[y++],I=d[E];if(w.tag!==5||!we(w)){for(;I!=null&&Nx(w,I);)E++,I=d[E];if(E===d.length){d=!0;break e}else for(w=w.child;w!==null;)u.push(w,E),w=w.sibling}}d=!1}return d;case sm:if(u.tag===5&&Ee(u.stateNode,d.value))return!0;break;case am:if((u.tag===5||u.tag===6)&&(u=Me(u),u!==null&&0<=u.indexOf(d.value)))return!0;break;case om:if(u.tag===5&&(u=u.memoizedProps["data-testname"],typeof u=="string"&&u.toLowerCase()===d.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Fx(u){switch(u.$$typeof){case im:return"<"+(P(u.value)||"Unknown")+">";case rm:return":has("+(Fx(u)||"")+")";case sm:return'[role="'+u.value+'"]';case am:return'"'+u.value+'"';case om:return'[data-testname="'+u.value+'"]';default:throw Error(o(365))}}function kC(u,d){var y=[];u=[u,0];for(var w=0;w<u.length;){var E=u[w++],I=u[w++],G=d[I];if(E.tag!==5||!we(E)){for(;G!=null&&Nx(E,G);)I++,G=d[I];if(I===d.length)y.push(E);else for(E=E.child;E!==null;)u.push(E,I),E=E.sibling}}return y}function kx(u,d){if(!V)throw Error(o(363));u=Dx(u),u=kC(u,d),d=[],u=Array.from(u);for(var y=0;y<u.length;){var w=u[y++];if(w.tag===5)we(w)||d.push(w.stateNode);else for(w=w.child;w!==null;)u.push(w),w=w.sibling}return d}var YO=Math.ceil,lm=a.ReactCurrentDispatcher,Ox=a.ReactCurrentOwner,Rn=a.ReactCurrentBatchConfig,Pt=0,Dn=null,Nn=null,si=0,sr=0,wc=An(0),Hn=0,kd=null,Mc=0,cm=0,Ux=0,Od=null,Vi=null,zx=0,Hx=1/0;function Ec(){Hx=Yn()+500}var um=!1,Gx=null,Bo=null,dm=!1,Lo=null,hm=0,Ud=0,Vx=null,fm=-1,pm=0;function Bi(){return Pt&6?Yn():fm!==-1?fm:fm=Yn()}function Do(u){return u.mode&1?Pt&2&&si!==0?si&-si:LO.transition!==null?(pm===0&&(u=Tp,Tp<<=1,!(Tp&4194240)&&(Tp=64),pm=u),pm):(u=Vt,u!==0?u:ge()):1}function Cr(u,d,y){if(50<Ud)throw Ud=0,Vx=null,Error(o(185));var w=mm(u,d);return w===null?null:(Sd(w,d,y),(!(Pt&2)||w!==Dn)&&(w===Dn&&(!(Pt&2)&&(cm|=d),Hn===4&&No(w,si)),ji(w,y),d===1&&Pt===0&&!(u.mode&1)&&(Ec(),Ip&&Ss())),w)}function mm(u,d){u.lanes|=d;var y=u.alternate;for(y!==null&&(y.lanes|=d),y=u,u=u.return;u!==null;)u.childLanes|=d,y=u.alternate,y!==null&&(y.childLanes|=d),y=u,u=u.return;return y.tag===3?y.stateNode:null}function ji(u,d){var y=u.callbackNode;MO(u,d);var w=Rp(u,u===Dn?si:0);if(w===0)y!==null&&wE(y),u.callbackNode=null,u.callbackPriority=0;else if(d=w&-w,u.callbackPriority!==d){if(y!=null&&wE(y),d===1)u.tag===0?BO(UC.bind(null,u)):ME(UC.bind(null,u)),Oe?je(function(){Pt===0&&Ss()}):Yy(Zy,Ss),y=null;else{switch(SE(w)){case 1:y=Zy;break;case 4:y=bO;break;case 16:y=$y;break;case 536870912:y=RO;break;default:y=$y}y=KC(y,OC.bind(null,u))}u.callbackPriority=d,u.callbackNode=y}}function OC(u,d){if(fm=-1,pm=0,Pt&6)throw Error(o(327));var y=u.callbackNode;if(za()&&u.callbackNode!==y)return null;var w=Rp(u,u===Dn?si:0);if(w===0)return null;if(w&30||w&u.expiredLanes||d)d=gm(u,w);else{d=w;var E=Pt;Pt|=2;var I=GC();(Dn!==u||si!==d)&&(Ec(),Oa(u,d));do try{eU();break}catch(ee){HC(u,ee)}while(!0);nx(),lm.current=I,Pt=E,Nn!==null?d=0:(Dn=null,si=0,d=Hn)}if(d!==0){if(d===2&&(E=Ky(u),E!==0&&(w=E,d=jx(u,E))),d===1)throw y=kd,Oa(u,0),No(u,w),ji(u,Yn()),y;if(d===6)No(u,w);else{if(E=u.current.alternate,!(w&30)&&!ZO(E)&&(d=gm(u,w),d===2&&(I=Ky(u),I!==0&&(w=I,d=jx(u,I))),d===1))throw y=kd,Oa(u,0),No(u,w),ji(u,Yn()),y;switch(u.finishedWork=E,u.finishedLanes=w,d){case 0:case 1:throw Error(o(345));case 2:Ua(u,Vi);break;case 3:if(No(u,w),(w&130023424)===w&&(d=zx+500-Yn(),10<d)){if(Rp(u,0)!==0)break;if(E=u.suspendedLanes,(E&w)!==w){Bi(),u.pingedLanes|=u.suspendedLanes&E;break}u.timeoutHandle=_e(Ua.bind(null,u,Vi),d);break}Ua(u,Vi);break;case 4:if(No(u,w),(w&4194240)===w)break;for(d=u.eventTimes,E=-1;0<w;){var G=31-tr(w);I=1<<G,G=d[G],G>E&&(E=G),w&=~I}if(w=E,w=Yn()-w,w=(120>w?120:480>w?480:1080>w?1080:1920>w?1920:3e3>w?3e3:4320>w?4320:1960*YO(w/1960))-w,10<w){u.timeoutHandle=_e(Ua.bind(null,u,Vi),w);break}Ua(u,Vi);break;case 5:Ua(u,Vi);break;default:throw Error(o(329))}}}return ji(u,Yn()),u.callbackNode===y?OC.bind(null,u):null}function jx(u,d){var y=Od;return u.current.memoizedState.isDehydrated&&(Oa(u,d).flags|=256),u=gm(u,d),u!==2&&(d=Vi,Vi=y,d!==null&&Wx(d)),u}function Wx(u){Vi===null?Vi=u:Vi.push.apply(Vi,u)}function ZO(u){for(var d=u;;){if(d.flags&16384){var y=d.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var w=0;w<y.length;w++){var E=y[w],I=E.getSnapshot;E=E.value;try{if(!As(I(),E))return!1}catch{return!1}}}if(y=d.child,d.subtreeFlags&16384&&y!==null)y.return=d,d=y;else{if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function No(u,d){for(d&=~Ux,d&=~cm,u.suspendedLanes|=d,u.pingedLanes&=~d,u=u.expirationTimes;0<d;){var y=31-tr(d),w=1<<y;u[y]=-1,d&=~w}}function UC(u){if(Pt&6)throw Error(o(327));za();var d=Rp(u,0);if(!(d&1))return ji(u,Yn()),null;var y=gm(u,d);if(u.tag!==0&&y===2){var w=Ky(u);w!==0&&(d=w,y=jx(u,w))}if(y===1)throw y=kd,Oa(u,0),No(u,d),ji(u,Yn()),y;if(y===6)throw Error(o(345));return u.finishedWork=u.current.alternate,u.finishedLanes=d,Ua(u,Vi),ji(u,Yn()),null}function zC(u){Lo!==null&&Lo.tag===0&&!(Pt&6)&&za();var d=Pt;Pt|=1;var y=Rn.transition,w=Vt;try{if(Rn.transition=null,Vt=1,u)return u()}finally{Vt=w,Rn.transition=y,Pt=d,!(Pt&6)&&Ss()}}function Xx(){sr=wc.current,lt(wc)}function Oa(u,d){u.finishedWork=null,u.finishedLanes=0;var y=u.timeoutHandle;if(y!==it&&(u.timeoutHandle=it,De(y)),Nn!==null)for(y=Nn.return;y!==null;){var w=y;switch(cx(w),w.tag){case 1:w=w.type.childContextTypes,w!=null&&ln();break;case 3:Ac(),lt(tn),lt(vt),gx();break;case 5:px(w);break;case 4:Ac();break;case 13:lt(pn);break;case 19:lt(pn);break;case 10:ix(w.type._context);break;case 22:case 23:Xx()}y=y.return}if(Dn=u,Nn=u=Fo(u.current,null),si=sr=d,Hn=0,kd=null,Ux=cm=Mc=0,Vi=Od=null,ws!==null){for(d=0;d<ws.length;d++)if(y=ws[d],w=y.interleaved,w!==null){y.interleaved=null;var E=w.next,I=y.pending;if(I!==null){var G=I.next;I.next=E,w.next=G}y.pending=w}ws=null}return u}function HC(u,d){do{var y=Nn;try{if(nx(),Gp.current=Kp,Vp){for(var w=Sn.memoizedState;w!==null;){var E=w.queue;E!==null&&(E.pending=null),w=w.next}Vp=!1}if(Sc=0,Zn=fi=Sn=null,bd=!1,Rd=0,Ox.current=null,y===null||y.return===null){Hn=1,kd=d,Nn=null;break}e:{var I=u,G=y.return,ee=y,fe=d;if(d=si,ee.flags|=32768,fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var Ie=fe,Ye=ee,wt=Ye.tag;if(!(Ye.mode&1)&&(wt===0||wt===11||wt===15)){var ht=Ye.alternate;ht?(Ye.updateQueue=ht.updateQueue,Ye.memoizedState=ht.memoizedState,Ye.lanes=ht.lanes):(Ye.updateQueue=null,Ye.memoizedState=null)}var Yt=lC(G);if(Yt!==null){Yt.flags&=-257,cC(Yt,G,ee,I,d),Yt.mode&1&&aC(I,Ie,d),d=Yt,fe=Ie;var ot=d.updateQueue;if(ot===null){var gi=new Set;gi.add(fe),d.updateQueue=gi}else ot.add(fe);break e}else{if(!(d&1)){aC(I,Ie,d),Jx();break e}fe=Error(o(426))}}else if(hn&&ee.mode&1){var br=lC(G);if(br!==null){!(br.flags&65536)&&(br.flags|=256),cC(br,G,ee,I,d),hx(fe);break e}}I=fe,Hn!==4&&(Hn=2),Od===null?Od=[I]:Od.push(I),fe=wx(fe,ee),ee=G;do{switch(ee.tag){case 3:ee.flags|=65536,d&=-d,ee.lanes|=d;var oe=sC(ee,fe,d);TE(ee,oe);break e;case 1:I=fe;var ie=ee.type,de=ee.stateNode;if(!(ee.flags&128)&&(typeof ie.getDerivedStateFromError=="function"||de!==null&&typeof de.componentDidCatch=="function"&&(Bo===null||!Bo.has(de)))){ee.flags|=65536,d&=-d,ee.lanes|=d;var Xe=oC(ee,I,d);TE(ee,Xe);break e}}ee=ee.return}while(ee!==null)}jC(y)}catch(st){d=st,Nn===y&&y!==null&&(Nn=y=y.return);continue}break}while(!0)}function GC(){var u=lm.current;return lm.current=Kp,u===null?Kp:u}function Jx(){(Hn===0||Hn===3||Hn===2)&&(Hn=4),Dn===null||!(Mc&268435455)&&!(cm&268435455)||No(Dn,si)}function gm(u,d){var y=Pt;Pt|=2;var w=GC();Dn===u&&si===d||Oa(u,d);do try{$O();break}catch(E){HC(u,E)}while(!0);if(nx(),Pt=y,lm.current=w,Nn!==null)throw Error(o(261));return Dn=null,si=0,Hn}function $O(){for(;Nn!==null;)VC(Nn)}function eU(){for(;Nn!==null&&!CO();)VC(Nn)}function VC(u){var d=JC(u.alternate,u,sr);u.memoizedProps=u.pendingProps,d===null?jC(u):Nn=d,Ox.current=null}function jC(u){var d=u;do{var y=d.alternate;if(u=d.return,d.flags&32768){if(y=XO(y,d),y!==null){y.flags&=32767,Nn=y;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{Hn=6,Nn=null;return}}else if(y=VO(y,d,sr),y!==null){Nn=y;return}if(d=d.sibling,d!==null){Nn=d;return}Nn=d=u}while(d!==null);Hn===0&&(Hn=5)}function Ua(u,d){var y=Vt,w=Rn.transition;try{Rn.transition=null,Vt=1,tU(u,d,y)}finally{Rn.transition=w,Vt=y}return null}function tU(u,d,y){do za();while(Lo!==null);if(Pt&6)throw Error(o(327));var w=u.finishedWork,E=u.finishedLanes;if(w===null)return null;if(u.finishedWork=null,u.finishedLanes=0,w===u.current)throw Error(o(177));u.callbackNode=null,u.callbackPriority=0;var I=w.lanes|w.childLanes;if(EO(u,I),u===Dn&&(Nn=Dn=null,si=0),!(w.subtreeFlags&2064)&&!(w.flags&2064)||dm||(dm=!0,KC($y,function(){return za(),null})),I=(w.flags&15990)!==0,w.subtreeFlags&15990||I){I=Rn.transition,Rn.transition=null;var G=Vt;Vt=1;var ee=Pt;Pt|=4,Ox.current=null,KO(u,w),qO(u,w),J(u.containerInfo),u.current=w,QO(w),TO(),Pt=ee,Vt=G,Rn.transition=I}else u.current=w;if(dm&&(dm=!1,Lo=u,hm=E),I=u.pendingLanes,I===0&&(Bo=null),PO(w.stateNode),ji(u,Yn()),d!==null)for(y=u.onRecoverableError,w=0;w<d.length;w++)y(d[w]);if(um)throw um=!1,u=Gx,Gx=null,u;return hm&1&&u.tag!==0&&za(),I=u.pendingLanes,I&1?u===Vx?Ud++:(Ud=0,Vx=u):Ud=0,Ss(),null}function za(){if(Lo!==null){var u=SE(hm),d=Rn.transition,y=Vt;try{if(Rn.transition=null,Vt=16>u?16:u,Lo===null)var w=!1;else{if(u=Lo,Lo=null,hm=0,Pt&6)throw Error(o(331));var E=Pt;for(Pt|=4,Ge=u.current;Ge!==null;){var I=Ge,G=I.child;if(Ge.flags&16){var ee=I.deletions;if(ee!==null){for(var fe=0;fe<ee.length;fe++){var Ie=ee[fe];for(Ge=Ie;Ge!==null;){var Ye=Ge;switch(Ye.tag){case 0:case 11:case 15:ka(8,Ye,I)}var wt=Ye.child;if(wt!==null)wt.return=Ye,Ge=wt;else for(;Ge!==null;){Ye=Ge;var ht=Ye.sibling,Yt=Ye.return;if(bC(Ye),Ye===Ie){Ge=null;break}if(ht!==null){ht.return=Yt,Ge=ht;break}Ge=Yt}}}var ot=I.alternate;if(ot!==null){var gi=ot.child;if(gi!==null){ot.child=null;do{var br=gi.sibling;gi.sibling=null,gi=br}while(gi!==null)}}Ge=I}}if(I.subtreeFlags&2064&&G!==null)G.return=I,Ge=G;else e:for(;Ge!==null;){if(I=Ge,I.flags&2048)switch(I.tag){case 0:case 11:case 15:ka(9,I,I.return)}var oe=I.sibling;if(oe!==null){oe.return=I.return,Ge=oe;break e}Ge=I.return}}var ie=u.current;for(Ge=ie;Ge!==null;){G=Ge;var de=G.child;if(G.subtreeFlags&2064&&de!==null)de.return=G,Ge=de;else e:for(G=ie;Ge!==null;){if(ee=Ge,ee.flags&2048)try{switch(ee.tag){case 0:case 11:case 15:Nd(9,ee)}}catch(st){Wi(ee,ee.return,st)}if(ee===G){Ge=null;break e}var Xe=ee.sibling;if(Xe!==null){Xe.return=ee.return,Ge=Xe;break e}Ge=ee.return}}if(Pt=E,Ss(),_s&&typeof _s.onPostCommitFiberRoot=="function")try{_s.onPostCommitFiberRoot(Pp,u)}catch{}w=!0}return w}finally{Vt=y,Rn.transition=d}}return!1}function WC(u,d,y){d=wx(y,d),d=sC(u,d,1),Io(u,d),d=Bi(),u=mm(u,1),u!==null&&(Sd(u,1,d),ji(u,d))}function Wi(u,d,y){if(u.tag===3)WC(u,u,y);else for(;d!==null;){if(d.tag===3){WC(d,u,y);break}else if(d.tag===1){var w=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(Bo===null||!Bo.has(w))){u=wx(y,u),u=oC(d,u,1),Io(d,u),u=Bi(),d=mm(d,1),d!==null&&(Sd(d,1,u),ji(d,u));break}}d=d.return}}function nU(u,d,y){var w=u.pingCache;w!==null&&w.delete(d),d=Bi(),u.pingedLanes|=u.suspendedLanes&y,Dn===u&&(si&y)===y&&(Hn===4||Hn===3&&(si&130023424)===si&&500>Yn()-zx?Oa(u,0):Ux|=y),ji(u,d)}function XC(u,d){d===0&&(u.mode&1?(d=bp,bp<<=1,!(bp&130023424)&&(bp=4194304)):d=1);var y=Bi();u=mm(u,d),u!==null&&(Sd(u,d,y),ji(u,y))}function iU(u){var d=u.memoizedState,y=0;d!==null&&(y=d.retryLane),XC(u,y)}function rU(u,d){var y=0;switch(u.tag){case 13:var w=u.stateNode,E=u.memoizedState;E!==null&&(y=E.retryLane);break;case 19:w=u.stateNode;break;default:throw Error(o(314))}w!==null&&w.delete(d),XC(u,y)}var JC;JC=function(u,d,y){if(u!==null)if(u.memoizedProps!==d.pendingProps||tn.current)rr=!0;else{if(!(u.lanes&y)&&!(d.flags&128))return rr=!1,WO(u,d,y);rr=!!(u.flags&131072)}else rr=!1,hn&&d.flags&1048576&&LE(d,Up,d.index);switch(d.lanes=0,d.tag){case 2:var w=d.type;u!==null&&(u.alternate=null,d.alternate=null,d.flags|=2),u=d.pendingProps;var E=Ln(d,vt.current);mc(d,y),E=yx(null,d,w,u,E,y);var I=xx();return d.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,Qn(w)?(I=!0,ri(d)):I=!1,d.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,sx(d),E.updater=kp,d.stateNode=E,E._reactInternals=d,ax(d,w,u,y),d=Cx(null,d,w,!0,I,y)):(d.tag=0,hn&&I&&lx(d),Ii(null,d,E,y),d=d.child),d;case 16:w=d.elementType;e:{switch(u!==null&&(u.alternate=null,d.alternate=null,d.flags|=2),u=d.pendingProps,E=w._init,w=E(w._payload),d.type=w,E=d.tag=oU(w),u=Kr(w,u),E){case 0:d=Ex(null,d,w,u,y);break e;case 1:d=vC(null,d,w,u,y);break e;case 11:d=hC(null,d,w,u,y);break e;case 14:d=fC(null,d,w,Kr(w.type,u),y);break e}throw Error(o(306,w,""))}return d;case 0:return w=d.type,E=d.pendingProps,E=d.elementType===w?E:Kr(w,E),Ex(u,d,w,E,y);case 1:return w=d.type,E=d.pendingProps,E=d.elementType===w?E:Kr(w,E),vC(u,d,w,E,y);case 3:e:{if(yC(d),u===null)throw Error(o(387));w=d.pendingProps,I=d.memoizedState,E=I.element,CE(u,d),Fp(d,w,null,y);var G=d.memoizedState;if(w=G.element,ye&&I.isDehydrated)if(I={element:w,isDehydrated:!1,cache:G.cache,transitions:G.transitions},d.updateQueue.baseState=I,d.memoizedState=I,d.flags&256){E=Error(o(423)),d=xC(u,d,w,y,E);break e}else if(w!==E){E=Error(o(424)),d=xC(u,d,w,y,E);break e}else for(ye&&(ir=Mp(d.stateNode.containerInfo),nr=d,hn=!0,qr=null,wd=!1),y=UE(d,null,w,y),d.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(yc(),w===E){d=Ws(u,d,y);break e}Ii(u,d,w,y)}d=d.child}return d;case 5:return zE(d),u===null&&dx(d),w=d.type,E=d.pendingProps,I=u!==null?u.memoizedProps:null,G=E.children,ce(w,E)?G=null:I!==null&&ce(w,I)&&(d.flags|=32),gC(u,d),Ii(u,d,G,y),d.child;case 6:return u===null&&dx(d),null;case 13:return _C(u,d,y);case 4:return fx(d,d.stateNode.containerInfo),w=d.pendingProps,u===null?d.child=xc(d,null,w,y):Ii(u,d,w,y),d.child;case 11:return w=d.type,E=d.pendingProps,E=d.elementType===w?E:Kr(w,E),hC(u,d,w,E,y);case 7:return Ii(u,d,d.pendingProps,y),d.child;case 8:return Ii(u,d,d.pendingProps.children,y),d.child;case 12:return Ii(u,d,d.pendingProps.children,y),d.child;case 10:e:{if(w=d.type._context,E=d.pendingProps,I=d.memoizedProps,G=E.value,EE(d,w,G),I!==null)if(As(I.value,G)){if(I.children===E.children&&!tn.current){d=Ws(u,d,y);break e}}else for(I=d.child,I!==null&&(I.return=d);I!==null;){var ee=I.dependencies;if(ee!==null){G=I.child;for(var fe=ee.firstContext;fe!==null;){if(fe.context===w){if(I.tag===1){fe=Hs(-1,y&-y),fe.tag=2;var Ie=I.updateQueue;if(Ie!==null){Ie=Ie.shared;var Ye=Ie.pending;Ye===null?fe.next=fe:(fe.next=Ye.next,Ye.next=fe),Ie.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),rx(I.return,y,d),ee.lanes|=y;break}fe=fe.next}}else if(I.tag===10)G=I.type===d.type?null:I.child;else if(I.tag===18){if(G=I.return,G===null)throw Error(o(341));G.lanes|=y,ee=G.alternate,ee!==null&&(ee.lanes|=y),rx(G,y,d),G=I.sibling}else G=I.child;if(G!==null)G.return=I;else for(G=I;G!==null;){if(G===d){G=null;break}if(I=G.sibling,I!==null){I.return=G.return,G=I;break}G=G.return}I=G}Ii(u,d,E.children,y),d=d.child}return d;case 9:return E=d.type,w=d.pendingProps.children,mc(d,y),E=Ar(E),w=w(E),d.flags|=1,Ii(u,d,w,y),d.child;case 14:return w=d.type,E=Kr(w,d.pendingProps),E=Kr(w.type,E),fC(u,d,w,E,y);case 15:return pC(u,d,d.type,d.pendingProps,y);case 17:return w=d.type,E=d.pendingProps,E=d.elementType===w?E:Kr(w,E),u!==null&&(u.alternate=null,d.alternate=null,d.flags|=2),d.tag=1,Qn(w)?(u=!0,ri(d)):u=!1,mc(d,y),IE(d,w,E),ax(d,w,E,y),Cx(null,d,w,!0,u,y);case 19:return MC(u,d,y);case 22:return mC(u,d,y)}throw Error(o(156,d.tag))};function KC(u,d){return Yy(u,d)}function sU(u,d,y,w){this.tag=u,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(u,d,y,w){return new sU(u,d,y,w)}function Kx(u){return u=u.prototype,!(!u||!u.isReactComponent)}function oU(u){if(typeof u=="function")return Kx(u)?1:0;if(u!=null){if(u=u.$$typeof,u===S)return 11;if(u===x)return 14}return 2}function Fo(u,d){var y=u.alternate;return y===null?(y=Tr(u.tag,d,u.key,u.mode),y.elementType=u.elementType,y.type=u.type,y.stateNode=u.stateNode,y.alternate=u,u.alternate=y):(y.pendingProps=d,y.type=u.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=u.flags&14680064,y.childLanes=u.childLanes,y.lanes=u.lanes,y.child=u.child,y.memoizedProps=u.memoizedProps,y.memoizedState=u.memoizedState,y.updateQueue=u.updateQueue,d=u.dependencies,y.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},y.sibling=u.sibling,y.index=u.index,y.ref=u.ref,y}function vm(u,d,y,w,E,I){var G=2;if(w=u,typeof u=="function")Kx(u)&&(G=1);else if(typeof u=="string")G=5;else e:switch(u){case h:return Ha(y.children,E,I,d);case f:G=8,E|=8;break;case p:return u=Tr(12,y,d,E|2),u.elementType=p,u.lanes=I,u;case A:return u=Tr(13,y,d,E),u.elementType=A,u.lanes=I,u;case g:return u=Tr(19,y,d,E),u.elementType=g,u.lanes=I,u;case M:return ym(y,E,I,d);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case m:G=10;break e;case v:G=9;break e;case S:G=11;break e;case x:G=14;break e;case _:G=16,w=null;break e}throw Error(o(130,u==null?u:typeof u,""))}return d=Tr(G,y,d,E),d.elementType=u,d.type=w,d.lanes=I,d}function Ha(u,d,y,w){return u=Tr(7,u,w,d),u.lanes=y,u}function ym(u,d,y,w){return u=Tr(22,u,w,d),u.elementType=M,u.lanes=y,u.stateNode={},u}function qx(u,d,y){return u=Tr(6,u,null,d),u.lanes=y,u}function Qx(u,d,y){return d=Tr(4,u.children!==null?u.children:[],u.key,d),d.lanes=y,d.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},d}function aU(u,d,y,w,E){this.tag=d,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=it,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qy(0),this.expirationTimes=qy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qy(0),this.identifierPrefix=w,this.onRecoverableError=E,ye&&(this.mutableSourceEagerHydrationData=null)}function qC(u,d,y,w,E,I,G,ee,fe){return u=new aU(u,d,y,ee,fe),d===1?(d=1,I===!0&&(d|=8)):d=0,I=Tr(3,null,null,d),u.current=I,I.stateNode=u,I.memoizedState={element:w,isDehydrated:y,cache:null,transitions:null},sx(I),u}function QC(u){if(!u)return en;u=u._reactInternals;e:{if(R(u)!==u||u.tag!==1)throw Error(o(170));var d=u;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(Qn(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(o(171))}if(u.tag===1){var y=u.type;if(Qn(y))return hc(u,y,d)}return d}function YC(u){var d=u._reactInternals;if(d===void 0)throw typeof u.render=="function"?Error(o(188)):(u=Object.keys(u).join(","),Error(o(268,u)));return u=W(d),u===null?null:u.stateNode}function ZC(u,d){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var y=u.retryLane;u.retryLane=y!==0&&y<d?y:d}}function Yx(u,d){ZC(u,d),(u=u.alternate)&&ZC(u,d)}function lU(u){return u=W(u),u===null?null:u.stateNode}function cU(){return null}return n.attemptContinuousHydration=function(u){if(u.tag===13){var d=Bi();Cr(u,134217728,d),Yx(u,134217728)}},n.attemptHydrationAtCurrentPriority=function(u){if(u.tag===13){var d=Bi(),y=Do(u);Cr(u,y,d),Yx(u,y)}},n.attemptSynchronousHydration=function(u){switch(u.tag){case 3:var d=u.stateNode;if(d.current.memoizedState.isDehydrated){var y=Ad(d.pendingLanes);y!==0&&(Qy(d,y|1),ji(d,Yn()),!(Pt&6)&&(Ec(),Ss()))}break;case 13:var w=Bi();zC(function(){return Cr(u,1,w)}),Yx(u,1)}},n.batchedUpdates=function(u,d){var y=Pt;Pt|=1;try{return u(d)}finally{Pt=y,Pt===0&&(Ec(),Ip&&Ss())}},n.createComponentSelector=function(u){return{$$typeof:im,value:u}},n.createContainer=function(u,d,y,w,E,I,G){return qC(u,d,!1,null,y,w,E,I,G)},n.createHasPseudoClassSelector=function(u){return{$$typeof:rm,value:u}},n.createHydrationContainer=function(u,d,y,w,E,I,G,ee,fe){return u=qC(y,w,!0,u,E,I,G,ee,fe),u.context=QC(null),y=u.current,w=Bi(),E=Do(y),I=Hs(w,E),I.callback=d??null,Io(y,I),u.current.lanes=E,Sd(u,E,w),ji(u,w),u},n.createPortal=function(u,d,y){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:w==null?null:""+w,children:u,containerInfo:d,implementation:y}},n.createRoleSelector=function(u){return{$$typeof:sm,value:u}},n.createTestNameSelector=function(u){return{$$typeof:om,value:u}},n.createTextSelector=function(u){return{$$typeof:am,value:u}},n.deferredUpdates=function(u){var d=Vt,y=Rn.transition;try{return Rn.transition=null,Vt=16,u()}finally{Vt=d,Rn.transition=y}},n.discreteUpdates=function(u,d,y,w,E){var I=Vt,G=Rn.transition;try{return Rn.transition=null,Vt=1,u(d,y,w,E)}finally{Vt=I,Rn.transition=G,Pt===0&&Ec()}},n.findAllNodes=kx,n.findBoundingRects=function(u,d){if(!V)throw Error(o(363));d=kx(u,d),u=[];for(var y=0;y<d.length;y++)u.push(se(d[y]));for(d=u.length-1;0<d;d--){y=u[d];for(var w=y.x,E=w+y.width,I=y.y,G=I+y.height,ee=d-1;0<=ee;ee--)if(d!==ee){var fe=u[ee],Ie=fe.x,Ye=Ie+fe.width,wt=fe.y,ht=wt+fe.height;if(w>=Ie&&I>=wt&&E<=Ye&&G<=ht){u.splice(d,1);break}else if(w!==Ie||y.width!==fe.width||ht<I||wt>G){if(!(I!==wt||y.height!==fe.height||Ye<w||Ie>E)){Ie>w&&(fe.width+=Ie-w,fe.x=w),Ye<E&&(fe.width=E-Ie),u.splice(d,1);break}}else{wt>I&&(fe.height+=wt-I,fe.y=I),ht<G&&(fe.height=G-wt),u.splice(d,1);break}}}return u},n.findHostInstance=YC,n.findHostInstanceWithNoPortals=function(u){return u=L(u),u=u!==null?q(u):null,u===null?null:u.stateNode},n.findHostInstanceWithWarning=function(u){return YC(u)},n.flushControlled=function(u){var d=Pt;Pt|=1;var y=Rn.transition,w=Vt;try{Rn.transition=null,Vt=1,u()}finally{Vt=w,Rn.transition=y,Pt=d,Pt===0&&(Ec(),Ss())}},n.flushPassiveEffects=za,n.flushSync=zC,n.focusWithin=function(u,d){if(!V)throw Error(o(363));for(u=Dx(u),d=kC(u,d),d=Array.from(d),u=0;u<d.length;){var y=d[u++];if(!we(y)){if(y.tag===5&&rt(y.stateNode))return!0;for(y=y.child;y!==null;)d.push(y),y=y.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Vt},n.getFindAllNodesFailureDescription=function(u,d){if(!V)throw Error(o(363));var y=0,w=[];u=[Dx(u),0];for(var E=0;E<u.length;){var I=u[E++],G=u[E++],ee=d[G];if((I.tag!==5||!we(I))&&(Nx(I,ee)&&(w.push(Fx(ee)),G++,G>y&&(y=G)),G<d.length))for(I=I.child;I!==null;)u.push(I,G),I=I.sibling}if(y<d.length){for(u=[];y<d.length;y++)u.push(Fx(d[y]));return`findAllNodes was able to match part of the selector:
3938  `+(w.join(" > ")+`
3939
3940No matching component was found for:
3941  `)+u.join(" > ")}return null},n.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return Z(u.child.stateNode);default:return u.child.stateNode}},n.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:lU,findFiberByHostInstance:u.findFiberByHostInstance||cU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled||!d.supportsFiber)u=!0;else{try{Pp=d.inject(u),_s=d}catch{}u=!!d.checkDCE}}return u},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(u,d,y,w){if(!V)throw Error(o(363));u=kx(u,d);var E=Pe(u,y,w).disconnect;return{disconnect:function(){E()}}},n.registerMutableSourceForHydration=function(u,d){var y=d._getVersion;y=y(d._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[d,y]:u.mutableSourceEagerHydrationData.push(d,y)},n.runWithPriority=function(u,d){var y=Vt;try{return Vt=u,d()}finally{Vt=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(u,d,y,w){var E=d.current,I=Bi(),G=Do(E);return y=QC(y),d.context===null?d.context=y:d.pendingContext=y,d=Hs(I,G),d.payload={element:u},w=w===void 0?null:w,w!==null&&(d.callback=w),Io(E,d),u=Cr(E,G,I),u!==null&&Np(u,E,G),G},n};tk.exports=Uq;var zq=tk.exports;const Hq=Wf(zq),Gq=t=>typeof t=="object"&&typeof t.then=="function",Ml=[];function rk(t,e,n=(i,r)=>i===r){if(t===e)return!0;if(!t||!e)return!1;const i=t.length;if(e.length!==i)return!1;for(let r=0;r<i;r++)if(!n(t[r],e[r]))return!1;return!0}function sk(t,e=null,n=!1,i={}){e===null&&(e=[t]);for(const s of Ml)if(rk(e,s.keys,s.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(s,"error"))throw s.error;if(Object.prototype.hasOwnProperty.call(s,"response"))return i.lifespan&&i.lifespan>0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!n)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=Ml.indexOf(r);s!==-1&&Ml.splice(s,1)},promise:(Gq(t)?t:t(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(Ml.push(r),!n)throw r.promise}const Vq=(t,e,n)=>sk(t,e,!1,n),jq=(t,e,n)=>void sk(t,e,!0,n),Wq=t=>{if(t===void 0||t.length===0)Ml.splice(0,Ml.length);else{const e=Ml.find(n=>rk(t,n.keys,n.equal));e&&e.remove()}},lE={},cE=t=>void Object.assign(lE,t);function Xq(t,e){function n(h,{args:f=[],attach:p,...m},v){let S=`${h[0].toUpperCase()}${h.slice(1)}`,A;if(h==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;A=eu(g,{type:h,root:v,attach:p,primitive:!0})}else{const g=lE[S];if(!g)throw new Error(`R3F: ${S} 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(f))throw new Error("R3F: The args prop must be an array!");A=eu(new g(...f),{type:h,root:v,attach:p,memoizedProps:{args:f}})}return A.__r3f.attach===void 0&&(A instanceof St?A.__r3f.attach="geometry":A instanceof zn&&(A.__r3f.attach="material")),S!=="inject"&&T1(A,m),A}function i(h,f){let p=!1;if(f){var m,v;(m=f.__r3f)!=null&&m.attach?C1(h,f,f.__r3f.attach):f.isObject3D&&h.isObject3D&&(h.add(f),p=!0),p||(v=h.__r3f)==null||v.objects.push(f),f.__r3f||eu(f,{}),f.__r3f.parent=h,wS(f),tu(f)}}function r(h,f,p){let m=!1;if(f){var v,S;if((v=f.__r3f)!=null&&v.attach)C1(h,f,f.__r3f.attach);else if(f.isObject3D&&h.isObject3D){f.parent=h,f.dispatchEvent({type:"added"}),h.dispatchEvent({type:"childadded",child:f});const A=h.children.filter(x=>x!==f),g=A.indexOf(p);h.children=[...A.slice(0,g),f,...A.slice(g)],m=!0}m||(S=h.__r3f)==null||S.objects.push(f),f.__r3f||eu(f,{}),f.__r3f.parent=h,wS(f),tu(f)}}function s(h,f,p=!1){h&&[...h].forEach(m=>o(f,m,p))}function o(h,f,p){if(f){var m,v,S;if(f.__r3f&&(f.__r3f.parent=null),(m=h.__r3f)!=null&&m.objects&&(h.__r3f.objects=h.__r3f.objects.filter(M=>M!==f)),(v=f.__r3f)!=null&&v.attach)yP(h,f,f.__r3f.attach);else if(f.isObject3D&&h.isObject3D){var A;h.remove(f),(A=f.__r3f)!=null&&A.root&&tQ(s0(f),f)}const x=(S=f.__r3f)==null?void 0:S.primitive,_=!x&&(p===void 0?f.dispose!==null:p);if(!x){var g;s((g=f.__r3f)==null?void 0:g.objects,f,_),s(f.children,f,_)}if(delete f.__r3f,_&&f.dispose&&f.type!=="Scene"){const M=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?AS.unstable_scheduleCallback(AS.unstable_IdlePriority,M):M()}tu(h)}}function a(h,f,p,m){var v;const S=(v=h.__r3f)==null?void 0:v.parent;if(!S)return;const A=n(f,p,h.__r3f.root);if(h.children){for(const g of h.children)g.__r3f&&i(A,g);h.children=h.children.filter(g=>!g.__r3f)}h.__r3f.objects.forEach(g=>i(A,g)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(S,h),A.parent&&(A.__r3f.autoRemovedBeforeAppend=!0),i(S,A),A.raycast&&A.__r3f.eventCount&&s0(A).getState().internal.interaction.push(A),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=A,g.ref&&(typeof g.ref=="function"?g.ref(A):g.ref.current=A))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:Hq({createInstance:n,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,f)=>{if(!f)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,f))},removeChildFromContainer:(h,f)=>{f&&o(h.getState().scene,f)},insertInContainerBefore:(h,f,p)=>{if(!f||!p)return;const m=h.getState().scene;m.__r3f&&r(m,f,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var f;return!!((f=h==null?void 0:h.__r3f)!=null?f:{}).handlers},prepareUpdate(h,f,p,m){var v;if(((v=h==null?void 0:h.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==h)return[!0];{const{args:A=[],children:g,...x}=m,{args:_=[],children:M,...b}=p;if(!Array.isArray(A))throw new Error("R3F: the args prop must be an array!");if(A.some((P,B)=>P!==_[B]))return[!0];const C=hk(h,x,b,!0);return C.changes.length?[!1,C]:null}},commitUpdate(h,[f,p],m,v,S,A){f?a(h,m,S,A):T1(h,p)},commitMount(h,f,p,m){var v;const S=(v=h.__r3f)!=null?v:{};h.raycast&&S.handlers&&S.eventCount&&s0(h).getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>eu(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var f;const{attach:p,parent:m}=(f=h.__r3f)!=null?f:{};p&&m&&yP(m,h,p),h.isObject3D&&(h.visible=!1),tu(h)},unhideInstance(h,f){var p;const{attach:m,parent:v}=(p=h.__r3f)!=null?p:{};m&&v&&C1(v,h,m),(h.isObject3D&&f.visible==null||f.visible)&&(h.visible=!0),tu(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():wu.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&sn.fun(performance.now)?performance.now:sn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:sn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:sn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:T1}}var pP,mP;const E1=t=>"colorSpace"in t||"outputColorSpace"in t,ok=()=>{var t;return(t=lE.ColorManagement)!=null?t:null},ak=t=>t&&t.isOrthographicCamera,Jq=t=>t&&t.hasOwnProperty("current"),yp=typeof window<"u"&&((pP=window.document)!=null&&pP.createElement||((mP=window.navigator)==null?void 0:mP.product)==="ReactNative")?z.useLayoutEffect:z.useEffect;function lk(t){const e=z.useRef(t);return yp(()=>void(e.current=t),[t]),e}function Kq({set:t}){return yp(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class ck extends z.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}ck.getDerivedStateFromError=()=>({error:!0});const uk="__default",gP=new Map,qq=t=>t&&!!t.memoized&&!!t.changes;function dk(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const lh=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function s0(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const sn={obj:t=>t===Object(t)&&!sn.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:i="reference",strict:r=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(sn.str(t)||sn.num(t)||sn.boo(t))return t===e;const s=sn.obj(t);if(s&&i==="reference")return t===e;const o=sn.arr(t);if(o&&n==="reference")return t===e;if((o||s)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(s&&n==="shallow"&&i==="shallow"){for(a in r?e:t)if(!sn.equ(t[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:t)if(t[a]!==e[a])return!1;if(sn.und(a)){if(o&&t.length===0&&e.length===0||s&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function Qq(t){const e={nodes:{},materials:{}};return t&&t.traverse(n=>{n.name&&(e.nodes[n.name]=n),n.material&&!e.materials[n.material.name]&&(e.materials[n.material.name]=n.material)}),e}function Yq(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function eu(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function SS(t,e){let n=t;if(e.includes("-")){const i=e.split("-"),r=i.pop();return n=i.reduce((s,o)=>s[o],t),{target:n,key:r}}else return{target:n,key:e}}const vP=/-\d+$/;function C1(t,e,n){if(sn.str(n)){if(vP.test(n)){const s=n.replace(vP,""),{target:o,key:a}=SS(t,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=SS(t,n);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=n(t,e)}function yP(t,e,n){var i,r;if(sn.str(n)){const{target:s,key:o}=SS(t,n),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(t,e);(r=e.__r3f)==null||delete r.previousAttach}function hk(t,{children:e,key:n,ref:i,...r},{children:s,key:o,ref:a,...l}={},c=!1){const h=t.__r3f,f=Object.entries(r),p=[];if(c){const v=Object.keys(l);for(let S=0;S<v.length;S++)r.hasOwnProperty(v[S])||f.unshift([v[S],uk+"remove"])}f.forEach(([v,S])=>{var A;if((A=t.__r3f)!=null&&A.primitive&&v==="object"||sn.equ(S,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return p.push([v,S,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),p.push([v,S,!1,g]);for(const x in r){const _=r[x];x.startsWith(`${v}-`)&&p.push([x,_,!1,x.split("-")])}});const m={...r};return h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.args&&(m.args=h.memoizedProps.args),h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.attach&&(m.attach=h.memoizedProps.attach),{memoized:m,changes:p}}const Zq=typeof process<"u"&&!1;function T1(t,e){var n;const i=t.__r3f,r=i==null?void 0:i.root,s=r==null||r.getState==null?void 0:r.getState(),{memoized:o,changes:a}=qq(e)?e:hk(t,e),l=i==null?void 0:i.eventCount;t.__r3f&&(t.__r3f.memoizedProps=o);for(let h=0;h<a.length;h++){let[f,p,m,v]=a[h];if(E1(t)){const x="srgb",_="srgb-linear";f==="encoding"?(f="colorSpace",p=p===3001?x:_):f==="outputEncoding"&&(f="outputColorSpace",p=p===3001?x:_)}let S=t,A=S[f];if(v.length&&(A=v.reduce((g,x)=>g[x],t),!(A&&A.set))){const[g,...x]=v.reverse();S=x.reverse().reduce((_,M)=>_[M],t),f=g}if(p===uk+"remove")if(S.constructor){let g=gP.get(S.constructor);g||(g=new S.constructor,gP.set(S.constructor,g)),p=g[f]}else p=0;if(m&&i)p?i.handlers[f]=p:delete i.handlers[f],i.eventCount=Object.keys(i.handlers).length;else if(A&&A.set&&(A.copy||A instanceof Nl)){if(Array.isArray(p))A.fromArray?A.fromArray(p):A.set(...p);else if(A.copy&&p&&p.constructor&&(Zq?A.constructor.name===p.constructor.name:A.constructor===p.constructor))A.copy(p);else if(p!==void 0){const g=A instanceof ze;!g&&A.setScalar?A.setScalar(p):A instanceof Nl&&p instanceof Nl?A.mask=p.mask:A.set(p),!ok()&&s&&!s.linear&&g&&A.convertSRGBToLinear()}}else if(S[f]=p,S[f]instanceof Zt&&S[f].format===Ci&&S[f].type===fs&&s){const g=S[f];E1(g)&&E1(s.gl)?g.colorSpace=s.gl.outputColorSpace:g.encoding=s.gl.outputEncoding}tu(t)}if(i&&i.parent&&t.raycast&&l!==i.eventCount){const h=s0(t).getState().internal,f=h.interaction.indexOf(t);f>-1&&h.interaction.splice(f,1),i.eventCount&&h.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&wS(t),t}function tu(t){var e,n;const i=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();i&&i.internal.frames===0&&i.invalidate()}function wS(t){t.onUpdate==null||t.onUpdate(t)}function $q(t,e){t.manual||(ak(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function Bg(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function eQ(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return wu.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return wu.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return wu.ContinuousEventPriority;default:return wu.DefaultEventPriority}}function fk(t,e,n,i){const r=n.get(e);r&&(n.delete(e),n.size===0&&(t.delete(i),r.target.releasePointerCapture(i)))}function tQ(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(i=>i!==e),n.initialHits=n.initialHits.filter(i=>i!==e),n.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&n.hovered.delete(r)}),n.capturedMap.forEach((i,r)=>{fk(n.capturedMap,e,i,r)})}function nQ(t){function e(l){const{internal:c}=t.getState(),h=l.offsetX-c.initialClick[0],f=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(h*h+f*f))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(h=>{var f;return(f=c.__r3f)==null?void 0:f.handlers["onPointer"+h]}))}function i(l,c){const h=t.getState(),f=new Set,p=[],m=c?c(h.internal.interaction):h.internal.interaction;for(let g=0;g<m.length;g++){const x=lh(m[g]);x&&(x.raycaster.camera=void 0)}h.previousRoot||h.events.compute==null||h.events.compute(l,h);function v(g){const x=lh(g);if(!x||!x.events.enabled||x.raycaster.camera===null)return[];if(x.raycaster.camera===void 0){var _;x.events.compute==null||x.events.compute(l,x,(_=x.previousRoot)==null?void 0:_.getState()),x.raycaster.camera===void 0&&(x.raycaster.camera=null)}return x.raycaster.camera?x.raycaster.intersectObject(g,!0):[]}let S=m.flatMap(v).sort((g,x)=>{const _=lh(g.object),M=lh(x.object);return!_||!M?g.distance-x.distance:M.events.priority-_.events.priority||g.distance-x.distance}).filter(g=>{const x=Bg(g);return f.has(x)?!1:(f.add(x),!0)});h.events.filter&&(S=h.events.filter(S,h));for(const g of S){let x=g.object;for(;x;){var A;(A=x.__r3f)!=null&&A.eventCount&&p.push({...g,eventObject:x}),x=x.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let g of h.internal.capturedMap.get(l.pointerId).values())f.has(Bg(g.intersection))||p.push(g.intersection);return p}function r(l,c,h,f){const p=t.getState();if(l.length){const m={stopped:!1};for(const v of l){const S=lh(v.object)||p,{raycaster:A,pointer:g,camera:x,internal:_}=S,M=new k(g.x,g.y,0).unproject(x),b=T=>{var L,W;return(L=(W=_.capturedMap.get(T))==null?void 0:W.has(v.eventObject))!=null?L:!1},C=T=>{const L={intersection:v,target:c.target};_.capturedMap.has(T)?_.capturedMap.get(T).set(v.eventObject,L):_.capturedMap.set(T,new Map([[v.eventObject,L]])),c.target.setPointerCapture(T)},P=T=>{const L=_.capturedMap.get(T);L&&fk(_.capturedMap,v.eventObject,L,T)};let B={};for(let T in c){let L=c[T];typeof L!="function"&&(B[T]=L)}let R={...v,...B,pointer:g,intersections:l,stopped:m.stopped,delta:h,unprojectedPoint:M,ray:A.ray,camera:x,stopPropagation(){const T="pointerId"in c&&_.capturedMap.get(c.pointerId);if((!T||T.has(v.eventObject))&&(R.stopped=m.stopped=!0,_.hovered.size&&Array.from(_.hovered.values()).find(L=>L.eventObject===v.eventObject))){const L=l.slice(0,l.indexOf(v));s([...L,v])}},target:{hasPointerCapture:b,setPointerCapture:C,releasePointerCapture:P},currentTarget:{hasPointerCapture:b,setPointerCapture:C,releasePointerCapture:P},nativeEvent:c};if(f(R),m.stopped===!0)break}}return l}function s(l){const{internal:c}=t.getState();for(const h of c.hovered.values())if(!l.length||!l.find(f=>f.object===h.object&&f.index===h.index&&f.instanceId===h.instanceId)){const p=h.eventObject.__r3f,m=p==null?void 0:p.handlers;if(c.hovered.delete(Bg(h)),p!=null&&p.eventCount){const v={...h,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function o(l,c){for(let h=0;h<c.length;h++){const f=c[h].__r3f;f==null||f.handlers.onPointerMissed==null||f.handlers.onPointerMissed(l)}}function a(l){switch(l){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return c=>{const{internal:h}=t.getState();"pointerId"in c&&h.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(c.pointerId)&&(h.capturedMap.delete(c.pointerId),s([]))})}}return function(h){const{onPointerMissed:f,internal:p}=t.getState();p.lastEvent.current=h;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",A=i(h,m?n:void 0),g=v?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=A.map(_=>_.eventObject)),v&&!A.length&&g<=2&&(o(h,p.interaction),f&&f(h)),m&&s(A);function x(_){const M=_.eventObject,b=M.__r3f,C=b==null?void 0:b.handlers;if(b!=null&&b.eventCount)if(m){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const P=Bg(_),B=p.hovered.get(P);B?B.stopped&&_.stopPropagation():(p.hovered.set(P,_),C.onPointerOver==null||C.onPointerOver(_),C.onPointerEnter==null||C.onPointerEnter(_))}C.onPointerMove==null||C.onPointerMove(_)}else{const P=C[l];P?(!v||p.initialHits.includes(M))&&(o(h,p.interaction.filter(B=>!p.initialHits.includes(B))),P(_)):v&&p.initialHits.includes(M)&&o(h,p.interaction.filter(B=>!p.initialHits.includes(B)))}}r(A,h,g,x)}}return{handlePointer:a}}const pk=t=>!!(t!=null&&t.render),mk=z.createContext(null),iQ=(t,e)=>{const n=ek((a,l)=>{const c=new k,h=new k,f=new k;function p(g=l().camera,x=h,_=l().size){const{width:M,height:b,top:C,left:P}=_,B=M/b;x instanceof k?f.copy(x):f.set(...x);const R=g.getWorldPosition(c).distanceTo(f);if(ak(g))return{width:M/g.zoom,height:b/g.zoom,top:C,left:P,factor:1,distance:R,aspect:B};{const T=g.fov*Math.PI/180,L=2*Math.tan(T/2)*R,W=L*(M/b);return{width:W,height:L,top:C,left:P,factor:M/W,distance:R,aspect:B}}}let m;const v=g=>a(x=>({performance:{...x.performance,current:g}})),S=new he;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)=>t(l(),g),advance:(g,x)=>e(g,x,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new iE,pointer:S,mouse:S,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&&v(g.performance.min),m=setTimeout(()=>v(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(x=>({...x,events:{...x.events,...g}})),setSize:(g,x,_,M,b)=>{const C=l().camera,P={width:g,height:x,top:M||0,left:b||0,updateStyle:_};a(B=>({size:P,viewport:{...B.viewport,...p(C,h,P)}}))},setDpr:g=>a(x=>{const _=dk(g);return{viewport:{...x.viewport,dpr:_,initialDpr:x.viewport.initialDpr||_}}}),setFrameloop:(g="always")=>{const x=l().clock;x.stop(),x.elapsedTime=0,g!=="never"&&(x.start(),x.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:z.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,x,_)=>{const M=l().internal;return M.priority=M.priority+(x>0?1:0),M.subscribers.push({ref:g,priority:x,store:_}),M.subscribers=M.subscribers.sort((b,C)=>b.priority-C.priority),()=>{const b=l().internal;b!=null&&b.subscribers&&(b.priority=b.priority-(x>0?1:0),b.subscribers=b.subscribers.filter(C=>C.ref!==g))}}}}}),i=n.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:h,set:f}=n.getState();if(l.width!==r.width||l.height!==r.height||c.dpr!==s){var p;r=l,s=c.dpr,$q(a,l),h.setPixelRatio(c.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(l.width,l.height,m)}a!==o&&(o=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let Lg,rQ=new Set,sQ=new Set,oQ=new Set;function b1(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function ch(t,e){switch(t){case"before":return b1(rQ,e);case"after":return b1(sQ,e);case"tail":return b1(oQ,e)}}let R1,P1;function I1(t,e,n){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(i=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),R1=e.internal.subscribers,Lg=0;Lg<R1.length;Lg++)P1=R1[Lg],P1.ref.current(P1.store.getState(),i,n);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 aQ(t){let e=!1,n=!1,i,r,s;function o(c){r=requestAnimationFrame(o),e=!0,i=0,ch("before",c),n=!0;for(const f of t.values()){var h;s=f.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((h=s.gl.xr)!=null&&h.isPresenting)&&(i+=I1(c,s))}if(n=!1,ch("after",c),i===0)return ch("tail",c),e=!1,cancelAnimationFrame(r)}function a(c,h=1){var f;if(!c)return t.forEach(p=>a(p.store.getState(),h));(f=c.gl.xr)!=null&&f.isPresenting||!c.internal.active||c.frameloop==="never"||(h>1?c.internal.frames=Math.min(60,c.internal.frames+h):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,h=!0,f,p){if(h&&ch("before",c),f)I1(c,f,p);else for(const m of t.values())I1(c,m.store.getState());h&&ch("after",c)}return{loop:o,invalidate:a,advance:l}}function gk(){const t=z.useContext(mk);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function cr(t=n=>n,e){return gk()(t,e)}function lc(t,e=0){const n=gk(),i=n.getState().internal.subscribe,r=lk(t);return yp(()=>i(r,e,n),[e,i,n]),null}const xP=new WeakMap;function vk(t,e){return function(n,...i){let r=xP.get(n);return r||(r=new n,xP.set(n,r)),t&&t(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,Qq(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function Ba(t,e,n,i){const r=Array.isArray(e)?e:[e],s=Vq(vk(n,i),[t,...r],{equal:sn.equ});return Array.isArray(e)?s:s[0]}Ba.preload=function(t,e,n){const i=Array.isArray(e)?e:[e];return jq(vk(n),[t,...i])};Ba.clear=function(t,e){const n=Array.isArray(e)?e:[e];return Wq([t,...n])};const ed=new Map,{invalidate:_P,advance:AP}=aQ(ed),{reconciler:Mv,applyProps:qc}=Xq(ed,eQ),Qc={objects:"shallow",strict:!1},lQ=(t,e)=>{const n=typeof t=="function"?t(e):t;return pk(n)?n:new hF({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function cQ(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=n}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:i,height:r,top:s,left:o}=t.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function uQ(t){const e=ed.get(t),n=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||iQ(_P,AP),o=n||Mv.createContainer(s,wu.ConcurrentRoot,null,!1,null,"",r,null);e||ed.set(t,{fiber:o,store:s});let a,l=!1,c;return{configure(h={}){let{gl:f,size:p,scene:m,events:v,onCreated:S,shadows:A=!1,linear:g=!1,flat:x=!1,legacy:_=!1,orthographic:M=!1,frameloop:b="always",dpr:C=[1,2],performance:P,raycaster:B,camera:R,onPointerMissed:T}=h,L=s.getState(),W=L.gl;L.gl||L.set({gl:W=lQ(f,t)});let Y=L.raycaster;Y||L.set({raycaster:Y=new YF});const{params:q,...j}=B||{};if(sn.equ(j,Y,Qc)||qc(Y,{...j}),sn.equ(q,Y.params,Qc)||qc(Y,{params:{...Y.params,...q}}),!L.camera||L.camera===c&&!sn.equ(c,R,Qc)){c=R;const J=R instanceof ap,$=J?R:M?new Hr(0,0,0,0,.1,1e3):new un(75,0,.1,1e3);J||($.position.z=5,R&&(qc($,R),("aspect"in R||"left"in R||"right"in R||"bottom"in R||"top"in R)&&($.manual=!0,$.updateProjectionMatrix())),!L.camera&&!(R!=null&&R.rotation)&&$.lookAt(0,0,0)),L.set({camera:$}),Y.camera=$}if(!L.scene){let J;m instanceof xv?J=m:(J=new xv,m&&qc(J,m)),L.set({scene:eu(J)})}if(!L.xr){var Z;const J=(Ae,te)=>{const ce=s.getState();ce.frameloop!=="never"&&AP(Ae,!0,ce,te)},$=()=>{const Ae=s.getState();Ae.gl.xr.enabled=Ae.gl.xr.isPresenting,Ae.gl.xr.setAnimationLoop(Ae.gl.xr.isPresenting?J:null),Ae.gl.xr.isPresenting||_P(Ae)},ue={connect(){const Ae=s.getState().gl;Ae.xr.addEventListener("sessionstart",$),Ae.xr.addEventListener("sessionend",$)},disconnect(){const Ae=s.getState().gl;Ae.xr.removeEventListener("sessionstart",$),Ae.xr.removeEventListener("sessionend",$)}};typeof((Z=W.xr)==null?void 0:Z.addEventListener)=="function"&&ue.connect(),L.set({xr:ue})}if(W.shadowMap){const J=W.shadowMap.enabled,$=W.shadowMap.type;if(W.shadowMap.enabled=!!A,sn.boo(A))W.shadowMap.type=Gh;else if(sn.str(A)){var H;const ue={basic:rN,percentage:sy,soft:Gh,variance:is};W.shadowMap.type=(H=ue[A])!=null?H:Gh}else sn.obj(A)&&Object.assign(W.shadowMap,A);(J!==W.shadowMap.enabled||$!==W.shadowMap.type)&&(W.shadowMap.needsUpdate=!0)}const D=ok();D&&("enabled"in D?D.enabled=!_:"legacyMode"in D&&(D.legacyMode=_)),l||qc(W,{outputEncoding:g?3e3:3001,toneMapping:x?Ds:hM}),L.legacy!==_&&L.set(()=>({legacy:_})),L.linear!==g&&L.set(()=>({linear:g})),L.flat!==x&&L.set(()=>({flat:x})),f&&!sn.fun(f)&&!pk(f)&&!sn.equ(f,W,Qc)&&qc(W,f),v&&!L.events.handlers&&L.set({events:v(s)});const X=cQ(t,p);return sn.equ(X,L.size,Qc)||L.setSize(X.width,X.height,X.updateStyle,X.top,X.left),C&&L.viewport.dpr!==dk(C)&&L.setDpr(C),L.frameloop!==b&&L.setFrameloop(b),L.onPointerMissed||L.set({onPointerMissed:T}),P&&!sn.equ(P,L.performance,Qc)&&L.set(J=>({performance:{...J.performance,...P}})),a=S,l=!0,this},render(h){return l||this.configure(),Mv.updateContainer(F.jsx(dQ,{store:s,children:h,onCreated:a,rootElement:t}),o,null,()=>{}),s},unmount(){yk(t)}}}function dQ({store:t,children:e,onCreated:n,rootElement:i}){return yp(()=>{const r=t.getState();r.set(s=>({internal:{...s.internal,active:!0}})),n&&n(r),t.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),F.jsx(mk.Provider,{value:t,children:e})}function yk(t,e){const n=ed.get(t),i=n==null?void 0:n.fiber;if(i){const r=n==null?void 0:n.store.getState();r&&(r.internal.active=!1),Mv.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),Yq(r),ed.delete(t)}catch{}},500)})}}Mv.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:z.version});function MS(t,e,n){var i,r,s,o,a;e==null&&(e=100);function l(){var h=Date.now()-o;h<e&&h>=0?i=setTimeout(l,e-h):(i=null,n||(a=t.apply(s,r),s=r=null))}var c=function(){s=this,r=arguments,o=Date.now();var h=n&&!i;return i||(i=setTimeout(l,e)),h&&(a=t.apply(s,r),s=r=null),a};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(a=t.apply(s,r),s=r=null,clearTimeout(i),i=null)},c}MS.debounce=MS;var hQ=MS;const SP=Wf(hQ);function fQ(t){let{debounce:e,scroll:n,polyfill:i,offsetSize:r}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=z.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=z.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),c=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,f=z.useRef(!1);z.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[p,m,v]=z.useMemo(()=>{const x=()=>{if(!l.current.element)return;const{left:_,top:M,width:b,height:C,bottom:P,right:B,x:R,y:T}=l.current.element.getBoundingClientRect(),L={left:_,top:M,width:b,height:C,bottom:P,right:B,x:R,y:T};l.current.element instanceof HTMLElement&&r&&(L.height=l.current.element.offsetHeight,L.width=l.current.element.offsetWidth),Object.freeze(L),f.current&&!vQ(l.current.lastBounds,L)&&a(l.current.lastBounds=L)};return[x,h?SP(x,h):x,c?SP(x,c):x]},[a,r,c,h]);function S(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function A(){l.current.element&&(l.current.resizeObserver=new s(v),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(x=>x.addEventListener("scroll",v,{capture:!0,passive:!0})))}const g=x=>{!x||x===l.current.element||(S(),l.current.element=x,l.current.scrollContainers=xk(x),A())};return mQ(v,!!n),pQ(m),z.useEffect(()=>{S(),A()},[n,v,m]),z.useEffect(()=>S,[]),[g,o,p]}function pQ(t){z.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function mQ(t,e){z.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function xk(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:i,overflowY:r}=window.getComputedStyle(t);return[n,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...xk(t.parentElement)]}const gQ=["x","y","top","bottom","left","right","width","height"],vQ=(t,e)=>gQ.every(n=>t[n]===e[n]);var yQ=Object.defineProperty,xQ=Object.defineProperties,_Q=Object.getOwnPropertyDescriptors,wP=Object.getOwnPropertySymbols,AQ=Object.prototype.hasOwnProperty,SQ=Object.prototype.propertyIsEnumerable,MP=(t,e,n)=>e in t?yQ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EP=(t,e)=>{for(var n in e||(e={}))AQ.call(e,n)&&MP(t,n,e[n]);if(wP)for(var n of wP(e))SQ.call(e,n)&&MP(t,n,e[n]);return t},wQ=(t,e)=>xQ(t,_Q(e)),CP,TP;typeof window<"u"&&((CP=window.document)!=null&&CP.createElement||((TP=window.navigator)==null?void 0:TP.product)==="ReactNative")?z.useLayoutEffect:z.useEffect;function _k(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=t.child;for(;i;){const r=_k(i,e,n);if(r)return r;i=i.sibling}}function Ak(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const bP=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=bP;return}return bP.apply(this,arguments)};const uE=Ak(z.createContext(null));class Sk extends z.Component{render(){return z.createElement(uE.Provider,{value:this._reactInternals},this.props.children)}}function MQ(){const t=z.useContext(uE);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=z.useId();return z.useMemo(()=>{for(const i of[t,t==null?void 0:t.alternate]){if(!i)continue;const r=_k(i,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[t,e])}function EQ(){const t=MQ(),[e]=z.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const r=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;r&&r!==uE&&!e.has(r)&&e.set(r,z.useContext(Ak(r)))}n=n.return}return e}function CQ(){const t=EQ();return z.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>z.createElement(e,null,z.createElement(n.Provider,wQ(EP({},i),{value:t.get(n)}))),e=>z.createElement(Sk,EP({},e))),[t])}const B1={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 TQ(t){const{handlePointer:e}=nQ(t);return{priority:1,enabled:!0,compute(n,i,r){i.pointer.set(n.offsetX/i.size.width*2-1,-(n.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(B1).reduce((n,i)=>({...n,[i]:e(i)}),{}),update:()=>{var n;const{events:i,internal:r}=t.getState();(n=r.lastEvent)!=null&&n.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:n=>{var i;const{set:r,events:s}=t.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:n}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,c]=B1[o];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:i}=t.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=B1[s];i.connected.removeEventListener(a,o)}}),n(s=>({events:{...s.events,connected:void 0}}))}}}}const bQ=z.forwardRef(function({children:e,fallback:n,resize:i,style:r,gl:s,events:o=TQ,eventSource:a,eventPrefix:l,shadows:c,linear:h,flat:f,legacy:p,orthographic:m,frameloop:v,dpr:S,performance:A,raycaster:g,camera:x,scene:_,onPointerMissed:M,onCreated:b,...C},P){z.useMemo(()=>cE(Fq),[]);const B=CQ(),[R,T]=fQ({scroll:!0,debounce:{scroll:50,resize:0},...i}),L=z.useRef(null),W=z.useRef(null);z.useImperativeHandle(P,()=>L.current);const Y=lk(M),[q,j]=z.useState(!1),[Z,H]=z.useState(!1);if(q)throw q;if(Z)throw Z;const D=z.useRef(null);yp(()=>{const J=L.current;T.width>0&&T.height>0&&J&&(D.current||(D.current=uQ(J)),D.current.configure({gl:s,events:o,shadows:c,linear:h,flat:f,legacy:p,orthographic:m,frameloop:v,dpr:S,performance:A,raycaster:g,camera:x,scene:_,size:T,onPointerMissed:(...$)=>Y.current==null?void 0:Y.current(...$),onCreated:$=>{$.events.connect==null||$.events.connect(a?Jq(a)?a.current:a:W.current),l&&$.setEvents({compute:(ue,Ae)=>{const te=ue[l+"X"],ce=ue[l+"Y"];Ae.pointer.set(te/Ae.size.width*2-1,-(ce/Ae.size.height)*2+1),Ae.raycaster.setFromCamera(Ae.pointer,Ae.camera)}}),b==null||b($)}}),D.current.render(F.jsx(B,{children:F.jsx(ck,{set:H,children:F.jsx(z.Suspense,{fallback:F.jsx(Kq,{set:j}),children:e})})})))}),z.useEffect(()=>{const J=L.current;if(J)return()=>yk(J)},[]);const X=a?"none":"auto";return F.jsx("div",{ref:W,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:X,...r},...C,children:F.jsx("div",{ref:R,style:{width:"100%",height:"100%"},children:F.jsx("canvas",{ref:L,style:{display:"block"},children:n})})})}),Ev=z.forwardRef(function(e,n){return F.jsx(Sk,{children:F.jsx(bQ,{...e,ref:n})})});function Co(){return Co=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Co.apply(null,arguments)}const xp=new k,dE=new k,RQ=new k,RP=new he;function PQ(t,e,n){const i=xp.setFromMatrixPosition(t.matrixWorld);i.project(e);const r=n.width/2,s=n.height/2;return[i.x*r+r,-(i.y*s)+s]}function IQ(t,e){const n=xp.setFromMatrixPosition(t.matrixWorld),i=dE.setFromMatrixPosition(e.matrixWorld),r=n.sub(i),s=e.getWorldDirection(RQ);return r.angleTo(s)>Math.PI/2}function BQ(t,e,n,i){const r=xp.setFromMatrixPosition(t.matrixWorld),s=r.clone();s.project(e),RP.set(s.x,s.y),n.setFromCamera(RP,e);const o=n.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(n.ray.origin)<a}return!0}function LQ(t,e){if(e instanceof Hr)return e.zoom;if(e instanceof un){const n=xp.setFromMatrixPosition(t.matrixWorld),i=dE.setFromMatrixPosition(e.matrixWorld),r=e.fov*Math.PI/180,s=n.distanceTo(i);return 1/(2*Math.tan(r/2)*s)}else return 1}function DQ(t,e,n){if(e instanceof un||e instanceof Hr){const i=xp.setFromMatrixPosition(t.matrixWorld),r=dE.setFromMatrixPosition(e.matrixWorld),s=i.distanceTo(r),o=(n[1]-n[0])/(e.far-e.near),a=n[1]-o*e.far;return Math.round(o*s+a)}}const ES=t=>Math.abs(t)<1e-10?0:t;function wk(t,e,n=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=ES(e[r]*t.elements[r])+(r!==15?",":")");return n+i}const NQ=(t=>e=>wk(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),FQ=(t=>(e,n)=>wk(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]);function kQ(t){return t&&typeof t=="object"&&"current"in t}const OQ=z.forwardRef(({children:t,eps:e=.001,style:n,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:h=!1,occlude:f,onOcclude:p,castShadow:m,receiveShadow:v,material:S,geometry:A,zIndexRange:g=[16777271,0],calculatePosition:x=PQ,as:_="div",wrapperClass:M,pointerEvents:b="auto",...C},P)=>{const{gl:B,camera:R,scene:T,size:L,raycaster:W,events:Y,viewport:q}=cr(),[j]=z.useState(()=>document.createElement(_)),Z=z.useRef(),H=z.useRef(null),D=z.useRef(0),X=z.useRef([0,0]),J=z.useRef(null),$=z.useRef(null),ue=(a==null?void 0:a.current)||Y.connected||B.domElement.parentNode,Ae=z.useRef(null),te=z.useRef(!1),ce=z.useMemo(()=>f&&f!=="blending"||Array.isArray(f)&&f.length&&kQ(f[0]),[f]);z.useLayoutEffect(()=>{const Ue=B.domElement;f&&f==="blending"?(Ue.style.zIndex=`${Math.floor(g[0]/2)}`,Ue.style.position="absolute",Ue.style.pointerEvents="none"):(Ue.style.zIndex=null,Ue.style.position=null,Ue.style.pointerEvents=null)},[f]),z.useLayoutEffect(()=>{if(H.current){const Ue=Z.current=lL(j);if(T.updateMatrixWorld(),h)j.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Be=x(H.current,R,L);j.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Be[0]}px,${Be[1]}px,0);transform-origin:0 0;`}return ue&&(r?ue.prepend(j):ue.appendChild(j)),()=>{ue&&ue.removeChild(j),Ue.unmount()}}},[ue,h]),z.useLayoutEffect(()=>{M&&(j.className=M)},[M]);const xe=z.useMemo(()=>h?{position:"absolute",top:0,left:0,width:L.width,height:L.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-L.height/2,left:-L.width/2,width:L.width,height:L.height},...n},[n,s,o,L,h]),_e=z.useMemo(()=>({position:"absolute",pointerEvents:b}),[b]);z.useLayoutEffect(()=>{if(te.current=!1,h){var Ue;(Ue=Z.current)==null||Ue.render(z.createElement("div",{ref:J,style:xe},z.createElement("div",{ref:$,style:_e},z.createElement("div",{ref:P,className:i,style:n,children:t}))))}else{var Be;(Be=Z.current)==null||Be.render(z.createElement("div",{ref:P,style:xe,className:i,children:t}))}});const De=z.useRef(!0);lc(Ue=>{if(H.current){R.updateMatrixWorld(),H.current.updateWorldMatrix(!0,!1);const Be=h?X.current:x(H.current,R,L);if(h||Math.abs(D.current-R.zoom)>e||Math.abs(X.current[0]-Be[0])>e||Math.abs(X.current[1]-Be[1])>e){const U=IQ(H.current,R);let ye=!1;ce&&(Array.isArray(f)?ye=f.map(Ze=>Ze.current):f!=="blending"&&(ye=[T]));const Te=De.current;if(ye){const Ze=BQ(H.current,R,W,ye);De.current=Ze&&!U}else De.current=!U;Te!==De.current&&(p?p(!De.current):j.style.display=De.current?"block":"none");const Ne=Math.floor(g[0]/2),ge=f?ce?[g[0],Ne]:[Ne-1,0]:g;if(j.style.zIndex=`${DQ(H.current,R,ge)}`,h){const[Ze,Oe]=[L.width/2,L.height/2],je=R.projectionMatrix.elements[5]*Oe,{isOrthographicCamera:V,top:N,left:se,bottom:Me,right:we}=R,Ee=NQ(R.matrixWorldInverse),rt=V?`scale(${je})translate(${ES(-(we+se)/2)}px,${ES((N+Me)/2)}px)`:`translateZ(${je}px)`;let Pe=H.current.matrixWorld;c&&(Pe=R.matrixWorldInverse.clone().transpose().copyPosition(Pe).scale(H.current.scale),Pe.elements[3]=Pe.elements[7]=Pe.elements[11]=0,Pe.elements[15]=1),j.style.width=L.width+"px",j.style.height=L.height+"px",j.style.perspective=V?"":`${je}px`,J.current&&$.current&&(J.current.style.transform=`${rt}${Ee}translate(${Ze}px,${Oe}px)`,$.current.style.transform=FQ(Pe,1/((l||10)/400)))}else{const Ze=l===void 0?1:LQ(H.current,R)*l;j.style.transform=`translate3d(${Be[0]}px,${Be[1]}px,0) scale(${Ze})`}X.current=Be,D.current=R.zoom}}if(!ce&&Ae.current&&!te.current)if(h){if(J.current){const Be=J.current.children[0];if(Be!=null&&Be.clientWidth&&Be!=null&&Be.clientHeight){const{isOrthographicCamera:U}=R;if(U||A)C.scale&&(Array.isArray(C.scale)?C.scale instanceof k?Ae.current.scale.copy(C.scale.clone().divideScalar(1)):Ae.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):Ae.current.scale.setScalar(1/C.scale));else{const ye=(l||10)/400,Te=Be.clientWidth*ye,Ne=Be.clientHeight*ye;Ae.current.scale.set(Te,Ne,1)}te.current=!0}}}else{const Be=j.children[0];if(Be!=null&&Be.clientWidth&&Be!=null&&Be.clientHeight){const U=1/q.factor,ye=Be.clientWidth*U,Te=Be.clientHeight*U;Ae.current.scale.set(ye,Te,1),te.current=!0}Ae.current.lookAt(Ue.camera.position)}});const it=z.useMemo(()=>({vertexShader:h?void 0:`
3942          /*
3943            This shader is from the THREE's SpriteMaterial.
3944            We need to turn the backing plane into a Sprite
3945            (make it always face the camera) if "transfrom"
3946            is false.
3947          */
3948          #include <common>
3949
3950          void main() {
3951            vec2 center = vec2(0., 1.);
3952            float rotation = 0.0;
3953
3954            // This is somewhat arbitrary, but it seems to work well
3955            // Need to figure out how to derive this dynamically if it even matters
3956            float size = 0.03;
3957
3958            vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
3959            vec2 scale;
3960            scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
3961            scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
3962
3963            bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3964            if ( isPerspective ) scale *= - mvPosition.z;
3965
3966            vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
3967            vec2 rotatedPosition;
3968            rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3969            rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3970            mvPosition.xy += rotatedPosition;
3971
3972            gl_Position = projectionMatrix * mvPosition;
3973          }
3974      `,fragmentShader:`
3975        void main() {
3976          gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
3977        }
3978      `}),[h]);return z.createElement("group",Co({},C,{ref:H}),f&&!ce&&z.createElement("mesh",{castShadow:m,receiveShadow:v,ref:Ae},A||z.createElement("planeGeometry",null),S||z.createElement("shaderMaterial",{side:Or,vertexShader:it.vertexShader,fragmentShader:it.fragmentShader})))});let uh=0;const UQ=ek(t=>(Su.onStart=(e,n,i)=>{t({active:!0,item:e,loaded:n,total:i,progress:(n-uh)/(i-uh)*100}
3978)},Su.onLoad=()=>{t({active:!1})},Su.onError=e=>t(n=>({errors:[...n.errors,e]})),Su.onProgress=(e,n,i)=>{n===i&&(uh=i),t({active:!0,item:e,loaded:n,total:i,progress:(n-uh)/(i-uh)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function Du(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function PP(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function IP(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?PP(Object(n),!0).forEach(function(i){Du(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):PP(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function CS(t,e){return CS=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},CS(t,e)}function zQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function TS(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function HQ(t,e){if(t){if(typeof t=="string")return TS(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TS(t,e)}}function GQ(t){if(Array.isArray(t))return TS(t)}function VQ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3979In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WQ(t){return GQ(t)||VQ(t)||HQ(t)||jQ()}new he;new he;function XQ(t,e,n){return Math.max(e,Math.min(n,t))}function JQ(t,e){return XQ(t-Math.floor(t/e)*e,0,e)}function KQ(t,e){var n=JQ(e-t,Math.PI*2);return n>Math.PI&&(n-=Math.PI*2),n}function hE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ir=function t(e,n,i){var r=this;hE(this,t),Du(this,"dot2",function(s,o){return r.x*s+r.y*o}),Du(this,"dot3",function(s,o,a){return r.x*s+r.y*o+r.z*a}),this.x=e,this.y=n,this.z=i},qQ=[new Ir(1,1,0),new Ir(-1,1,0),new Ir(1,-1,0),new Ir(-1,-1,0),new Ir(1,0,1),new Ir(-1,0,1),new Ir(1,0,-1),new Ir(-1,0,-1),new Ir(0,1,1),new Ir(0,-1,1),new Ir(0,1,-1),new Ir(0,-1,-1)],BP=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],LP=new Array(512),DP=new Array(512),QQ=function(e){e>0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var n=0;n<256;n++){var i;n&1?i=BP[n]^e&255:i=BP[n]^e>>8&255,LP[n]=LP[n+256]=i,DP[n]=DP[n+256]=qQ[i%12]}};QQ(0);function YQ(t){if(typeof t=="number")t=Math.abs(t);else if(typeof t=="string"){var e=t;t=0;for(var n=0;n<e.length;n++)t=(t+(n+1)*(e.charCodeAt(n)%96))%2147483647}return t===0&&(t=311),t}function NP(t){var e=YQ(t);return function(){var n=e*48271%2147483647;return e=n,n/2147483647}}var ZQ=function t(e){var n=this;hE(this,t),Du(this,"seed",0),Du(this,"init",function(i){n.seed=i,n.value=NP(i)}),Du(this,"value",NP(this.seed)),this.init(e)},$Q=new ZQ(Math.random()),eY={radius:1,center:[0,0,0]};function tY(t,e){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$Q,i=IP(IP({},eY),e),r=i.radius,s=i.center,o=0;o<t.length;o+=3){var a=Math.pow(n.value(),.3333333333333333),l=n.value()*2-1,c=n.value()*2-1,h=n.value()*2-1,f=Math.sqrt(l*l+c*c+h*h);l=a*l/f,c=a*c/f,h=a*h/f,t[o]=l*r+s[0],t[o+1]=c*r+s[1],t[o+2]=h*r+s[2]}return t}var nY=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.01,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/(2*Math.PI);return i/Math.atan(1/n)*Math.atan(Math.sin(2*Math.PI*e*r)/n)},Mk=function(e){return 1/(1+e+.48*e*e+.235*e*e*e)},iY=function(e){return e},rY={in:function(e){return 1-Math.cos(e*Math.PI/2)},out:function(e){return Math.sin(e*Math.PI/2)},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},sY={in:function(e){return e*e*e},out:function(e){return 1-Math.pow(1-e,3)},inOut:function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}},oY={in:function(e){return e*e*e*e*e},out:function(e){return 1-Math.pow(1-e,5)},inOut:function(e){return e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2}},aY={in:function(e){return 1-Math.sqrt(1-Math.pow(e,2))},out:function(e){return Math.sqrt(1-Math.pow(e-1,2))},inOut:function(e){return e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2}},lY={in:function(e){return e*e*e*e},out:function(e){return 1- --e*e*e*e},inOut:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e}},cY={in:function(e){return e===0?0:Math.pow(2,10*e-10)},out:function(e){return e===1?1:1-Math.pow(2,-10*e)},inOut:function(e){return e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2}};function Wn(t,e,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.01,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:1/0,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:Mk,a=arguments.length>7&&arguments[7]!==void 0?arguments[7]:.001,l="velocity_"+e;if(t.__damp===void 0&&(t.__damp={}),t.__damp[l]===void 0&&(t.__damp[l]=0),Math.abs(t[e]-n)<=a)return t[e]=n,!1;i=Math.max(1e-4,i);var c=2/i,h=o(c*r),f=t[e]-n,p=n,m=s*i;f=Math.min(Math.max(f,-m),m),n=t[e]-f;var v=(t.__damp[l]+c*f)*r;t.__damp[l]=(t.__damp[l]-c*v)*h;var S=n+(f+v)*h;return p-t[e]>0==S>p&&(S=p,t.__damp[l]=(S-p)/r),t[e]=S,!0}var uY=function(e){return e&&e.isCamera},dY=function(e){return e&&e.isLight},dh=new k,FP=new xn,kP=new xn,hh=new at,L1=new k;function hY(t,e,n,i,r,s,o){typeof e=="number"?dh.setScalar(e):Array.isArray(e)?dh.set(e[0],e[1],e[2]):dh.copy(e);var a=t.parent;t.updateWorldMatrix(!0,!1),L1.setFromMatrixPosition(t.matrixWorld),uY(t)||dY(t)?hh.lookAt(L1,dh,t.up):hh.lookAt(dh,L1,t.up),Cv(t.quaternion,kP.setFromRotationMatrix(hh),n,i,r,s,o),a&&(hh.extractRotation(a.matrixWorld),FP.setFromRotationMatrix(hh),Cv(t.quaternion,kP.copy(t.quaternion).premultiply(FP.invert()),n,i,r,s,o))}function Nu(t,e,n,i,r,s,o,a){return Wn(t,e,t[e]+KQ(t[e],n),i,r,s,o,a)}var fh=new he,OP,UP;function fY(t,e,n,i,r,s,o){return typeof e=="number"?fh.setScalar(e):Array.isArray(e)?fh.set(e[0],e[1]):fh.copy(e),OP=Wn(t,"x",fh.x,n,i,r,s,o),UP=Wn(t,"y",fh.y,n,i,r,s,o),OP||UP}var Yc=new k,zP,HP,GP;function bS(t,e,n,i,r,s,o){return typeof e=="number"?Yc.setScalar(e):Array.isArray(e)?Yc.set(e[0],e[1],e[2]):Yc.copy(e),zP=Wn(t,"x",Yc.x,n,i,r,s,o),HP=Wn(t,"y",Yc.y,n,i,r,s,o),GP=Wn(t,"z",Yc.z,n,i,r,s,o),zP||HP||GP}var tl=new Ut,VP,jP,WP,XP;function pY(t,e,n,i,r,s,o){return typeof e=="number"?tl.setScalar(e):Array.isArray(e)?tl.set(e[0],e[1],e[2],e[3]):tl.copy(e),VP=Wn(t,"x",tl.x,n,i,r,s,o),jP=Wn(t,"y",tl.y,n,i,r,s,o),WP=Wn(t,"z",tl.z,n,i,r,s,o),XP=Wn(t,"w",tl.w,n,i,r,s,o),VP||jP||WP||XP}var ph=new er,JP,KP,qP;function mY(t,e,n,i,r,s,o){return Array.isArray(e)?ph.set(e[0],e[1],e[2],e[3]):ph.copy(e),JP=Nu(t,"x",ph.x,n,i,r,s,o),KP=Nu(t,"y",ph.y,n,i,r,s,o),qP=Nu(t,"z",ph.z,n,i,r,s,o),JP||KP||qP}var Zc=new ze,QP,YP,ZP;function gY(t,e,n,i,r,s,o){return e instanceof ze?Zc.copy(e):Array.isArray(e)?Zc.setRGB(e[0],e[1],e[2]):Zc.set(e),QP=Wn(t,"r",Zc.r,n,i,r,s,o),YP=Wn(t,"g",Zc.g,n,i,r,s,o),ZP=Wn(t,"b",Zc.b,n,i,r,s,o),QP||YP||ZP}var es=new xn,Zs=new Ut,$P=new Ut,mh=new Ut,eI,tI,nI,iI;function Cv(t,e,n,i,r,s,o){var a=t;Array.isArray(e)?es.set(e[0],e[1],e[2],e[3]):es.copy(e);var l=t.dot(es)>0?1:-1;return es.x*=l,es.y*=l,es.z*=l,es.w*=l,eI=Wn(t,"x",es.x,n,i,r,s,o),tI=Wn(t,"y",es.y,n,i,r,s,o),nI=Wn(t,"z",es.z,n,i,r,s,o),iI=Wn(t,"w",es.w,n,i,r,s,o),Zs.set(t.x,t.y,t.z,t.w).normalize(),$P.set(a.__damp.velocity_x,a.__damp.velocity_y,a.__damp.velocity_z,a.__damp.velocity_w),mh.copy(Zs).multiplyScalar($P.dot(Zs)/Zs.dot(Zs)),a.__damp.velocity_x-=mh.x,a.__damp.velocity_y-=mh.y,a.__damp.velocity_z-=mh.z,a.__damp.velocity_w-=mh.w,t.set(Zs.x,Zs.y,Zs.z,Zs.w),eI||tI||nI||iI}var gh=new wv,rI,sI,oI;function vY(t,e,n,i,r,s,o){return Array.isArray(e)?gh.set(e[0],e[1],e[2]):gh.copy(e),rI=Wn(t,"radius",gh.radius,n,i,r,s,o),sI=Nu(t,"phi",gh.phi,n,i,r,s,o),oI=Nu(t,"theta",gh.theta,n,i,r,s,o),rI||sI||oI}var Dg=new at,aI=new k,lI=new xn,cI=new k,uI,dI,hI;function yY(t,e,n,i,r,s,o){var a=t;return a.__damp===void 0&&(a.__damp={position:new k,rotation:new xn,scale:new k},t.decompose(a.__damp.position,a.__damp.rotation,a.__damp.scale)),Array.isArray(e)?Dg.set.apply(Dg,WQ(e)):Dg.copy(e),Dg.decompose(aI,lI,cI),uI=bS(a.__damp.position,aI,n,i,r,s,o),dI=Cv(a.__damp.rotation,lI,n,i,r,s,o),hI=bS(a.__damp.scale,cI,n,i,r,s,o),t.compose(a.__damp.position,a.__damp.rotation,a.__damp.scale),uI||dI||hI}var Ek=Object.freeze({__proto__:null,rsqw:nY,exp:Mk,linear:iY,sine:rY,cubic:sY,quint:oY,cir
3979c:aY,quart:lY,expo:cY,damp:Wn,dampLookAt:hY,dampAngle:Nu,damp2:fY,damp3:bS,damp4:pY,dampE:mY,dampC:gY,dampQ:Cv,dampS:vY,dampM:yY});function xY(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&CS(t,e)}function Tv(t){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(t)}function _Y(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function AY(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Y(t)}function SY(t){var e=zQ();return function(){var i=Tv(t),r;if(e){var s=Tv(this).constructor;r=Reflect.construct(i,arguments,s)}else r=i.apply(this,arguments);return AY(this,r)}}var wY=function(t){xY(n,t);var e=SY(n);function n(){var i,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:2,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.2,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:16;hE(this,n),i=e.call(this),i.parameters={width:r,height:s,radius:o,segments:a};for(var l=r/2-o,c=s/2-o,h=o/r,f=(r-o)/r,p=o/s,m=(s-o)/s,v=[l,c,0,-l,c,0,-l,-c,0,l,-c,0],S=[f,m,h,m,h,p,f,p],A=[3*(a+1)+3,3*(a+1)+4,a+4,a+5,2*(a+1)+4,2,1,2*(a+1)+3,3,4*(a+1)+3,4,0],g=[A[0],A[1],A[2],A[0],A[2],A[3],A[4],A[5],A[6],A[4],A[6],A[7],A[8],A[9],A[10],A[8],A[10],A[11]],x,_,M,b,C,P,B,R,T=0;T<4;T++){b=T<1||T>2?l:-l,C=T<2?c:-c,P=T<1||T>2?f:h,B=T<2?m:p;for(var L=0;L<=a;L++)x=Math.PI/2*(T+L/a),_=Math.cos(x),M=Math.sin(x),v.push(b+o*_,C+o*M,0),S.push(P+h*_,B+p*M),L<a&&(R=(a+1)*T+L+4,g.push(T,R,R+1))}return i.setIndex(new Nt(new Uint32Array(g),1)),i.setAttribute("position",new Nt(new Float32Array(v),3)),i.setAttribute("uv",new Nt(new Float32Array(S),2)),i}return n}(St);function MY(t){for(var e=[],n=0;n<t.attributes.position.array.length/3;n++){var i=t.attributes.position.array[n*3+0],r=t.attributes.position.array[n*3+1],s=t.attributes.position.array[n*3+2];e.push(Math.atan2(i,s)/Math.PI*.5+.5,r/Math.PI*.5+.5)}return t.attributes.uv&&delete t.attributes.uv,t.setAttribute("uv",new et(e,2)),t.attributes.uv.needsUpdate=!0,t}function EY(t){for(var e=[],n=[],i=0;i<t.attributes.position.array.length/3;i++){var r=t.attributes.position.array[i*3+0],s=t.attributes.position.array[i*3+1],o=t.attributes.position.array[i*3+2];n.push(new k(r,s,o))}for(var a=n.map(fI),l=0;l<a.length/3;l++)for(var c=new Ki(n[l*3+0],n[l*3+1],n[l*3+2]),h=c.getNormal(new k),f=0;f<3;f++){var p=a[l*3+f];if(p.theta===0&&(p.phi===0||p.phi===Math.PI)){var m=p.phi===0?l*3+1:l*3+0;p={r:p.r,phi:p.phi,theta:a[m].theta}}p.theta===Math.PI&&fI(h).theta<Math.PI/2&&(p.theta=-Math.PI);var v=CY(p);e.push(1-v.x,1-v.y)}return t.attributes.uv&&delete t.attributes.uv,t.setAttribute("uv",new et(e,2)),t.attributes.uv.needsUpdate=!0,t}function fI(t){var e=Math.sqrt(t.x*t.x+t.z*t.z+t.y*t.y);return{r:e,phi:Math.acos(t.y/e),theta:Math.atan2(t.z,t.x)}}function CY(t){return{y:t.phi/Math.PI,x:(t.theta+Math.PI)/(2*Math.PI)}}function TY(t){t.computeBoundingBox();var e=t.boundingBox.getSize(new k),n=Math.min(e.x,e.y,e.z),i=new Ra(n,n,n),r=new bn(i);r.rotation.set(0,0,0),r.updateWorldMatrix(!0,!1);var s=r.matrix.clone().invert(),o=new ui(new k(-n/2,-n/2,-n/2),new k(n/2,n/2,n/2));return bY(t,s,o,n),t.attributes.uv.needsUpdate=!0,t}function bY(t,e,n,i){var r=[];r.length=2*t.attributes.position.array.length/3;
3979var s=function(ce,xe,_e){ce.applyMatrix4(e),xe.applyMatrix4(e),_e.applyMatrix4(e);var De=new k;De.crossVectors(xe.clone().sub(ce),xe.clone().sub(_e)).normalize(),De.x=Math.abs(De.x),De.y=Math.abs(De.y),De.z=Math.abs(De.z);var it=new he,Ue=new he,Be=new he;return De.y>De.x&&De.y>De.z?(it.x=(ce.x-n.min.x)/i,it.y=(n.max.z-ce.z)/i,Ue.x=(xe.x-n.min.x)/i,Ue.y=(n.max.z-xe.z)/i,Be.x=(_e.x-n.min.x)/i,Be.y=(n.max.z-_e.z)/i):De.x>De.y&&De.x>De.z?(it.x=(ce.z-n.min.z)/i,it.y=(ce.y-n.min.y)/i,Ue.x=(xe.z-n.min.z)/i,Ue.y=(xe.y-n.min.y)/i,Be.x=(_e.z-n.min.z)/i,Be.y=(_e.y-n.min.y)/i):De.z>De.y&&De.z>De.x&&(it.x=(ce.x-n.min.x)/i,it.y=(ce.y-n.min.y)/i,Ue.x=(xe.x-n.min.x)/i,Ue.y=(xe.y-n.min.y)/i,Be.x=(_e.x-n.min.x)/i,Be.y=(_e.y-n.min.y)/i),{uv0:it,uv1:Ue,uv2:Be}};if(t.index)for(var o=0;o<t.index.array.length;o+=3){var a=t.index.array[o],l=t.index.array[o+1],c=t.index.array[o+2],h=t.attributes.position.array[3*a],f=t.attributes.position.array[3*a+1],p=t.attributes.position.array[3*a+2],m=t.attributes.position.array[3*l],v=t.attributes.position.array[3*l+1],S=t.attributes.position.array[3*l+2],A=t.attributes.position.array[3*c],g=t.attributes.position.array[3*c+1],x=t.attributes.position.array[3*c+2],_=new k(h,f,p),M=new k(m,v,S),b=new k(A,g,x),C=s(_,M,b);r[2*a]=C.uv0.x,r[2*a+1]=C.uv0.y,r[2*l]=C.uv1.x,r[2*l+1]=C.uv1.y,r[2*c]=C.uv2.x,r[2*c+1]=C.uv2.y}else for(var P=0;P<t.attributes.position.array.length;P+=9){var B=t.attributes.position.array[P],R=t.attributes.position.array[P+1],T=t.attributes.position.array[P+2],L=t.attributes.position.array[P+3],W=t.attributes.position.array[P+4],Y=t.attributes.position.array[P+5],q=t.attributes.position.array[P+6],j=t.attributes.position.array[P+7],Z=t.attributes.position.array[P+8],H=new k(B,R,T),D=new k(L,W,Y),X=new k(q,j,Z),J=s(H,D,X),$=P/3,ue=$+1,Ae=$+2;r[2*$]=J.uv0.x,r[2*$+1]=J.uv0.y,r[2*ue]=J.uv1.x,r[2*ue+1]=J.uv1.y,r[2*Ae]=J.uv2.x,r[2*Ae+1]=J.uv2.y}t.attributes.uv&&delete t.attributes.uv,t.setAttribute("uv",new et(r,2))}var Ck=Object.freeze({__proto__:null,RoundedPlaneGeometry:wY,applyCylindricalUV:MY,applySphereUV:EY,applyBoxUV:TY});const RY=parseInt(ld.replace(/\D+/g,""));function pI(t,e){if(e===GN)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===yv||e===wM){let n=t.getIndex();if(n===null){const o=[],a=t.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)o.push(l);t.setIndex(o),n=t.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t}const i=n.count-2,r=[];if(n)if(e===yv)for(let o=1;o<=i;o++)r.push(n.getX(0)),r.push(n.getX(o)),r.push(n.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(r.push(n.getX(o)),r.push(n.getX(o+1)),r.push(n.getX(o+2))):(r.push(n.getX(o+2)),r.push(n.getX(o+1)),r.push(n.getX(o)));r.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=t.clone();return s.setIndex(r),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t}var PY=Object.defineProperty,IY=(t,e,n)=>e in t?PY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yt=(t,e,n)=>(IY(t,typeof e!="symbol"?e+"":e,n),n);const Ng=new rc,mI=new no,BY=Math.cos(70*(Math.PI/180)),gI=(t,e)=>(t%e+e)%e;let LY=class extends Os{constructor(e,n){super(),yt(this,"object"),yt(this,"domElement"),yt(this,"enabled",!0),yt(this,"target",new k),yt(this,"minDistance",0),yt(this,"maxDistance",1/0),yt(this,"minZoom",0),yt(this,"maxZoom",1/0),yt(this,"minPolarAngle",0),yt(this,"maxPolarAngle",Math.PI),yt(this,"minAzimuthAngle",-1/0),yt(this,"maxAzimuthAngle",1/0),yt(this,"enableDamping",!1),yt(this,"dampingFactor",.05),yt(this,"enableZoom",!0),yt(this,"zoomSpeed",1),yt(this,"enableRotate",!0),yt(this,"rotateSpeed",1),yt(this,"enablePan",!0),yt(this,"panSpeed",1),yt(this,"screenSpacePanning",!0),yt(this,"keyPanSpeed",7),yt(this,"zoomToCursor",!1),yt(this,"autoRotate",!1),yt(this,"autoRotateSpeed",2),yt(this,"reverseOrbit",!1),yt(this,"reverseHorizontalOrbit",!1),yt(this,"reverseVerticalOrbit",!1),yt(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),yt(this,"mouseButtons",{LEFT:cl.ROTATE,MIDDLE:cl.DOLLY,RIGHT:cl.PAN}),yt(this,"touches",{ONE:ul.ROTATE,TWO:ul.DOLLY_PAN}),yt(this,"target0"),yt(this,"position0"),yt(this,"zoom0"),yt(this,"_domElementKeyEvents",null),yt(this,"getPolarAngle"),yt(this,"getAzimuthalAngle"),yt(this,"setPolarAngle"),yt(this,"setAzimuthalAngle"),yt(this,"getDistance"),yt(this,"listenToKeyEvents"),yt(this,"stopListenToKeyEvents"),yt(this,"saveState"),yt(this,"reset"),yt(this,"update"),yt(this,"connect"),yt(this,"dispose"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=Q=>{let me=gI(Q,2*Math.PI),Ve=h.phi;Ve<0&&(Ve+=2*Math.PI),me<0&&(me+=2*Math.PI);let K=Math.abs(me-Ve);2*Math.PI-K<K&&(me<Ve?me+=2*Math.PI:Ve+=2*Math.PI),f.phi=me-Ve,i.update()},this.setAzimuthalAngle=Q=>{let me=gI(Q,2*Math.PI),Ve=h.theta;Ve<0&&(Ve+=2*Math.PI),me<0&&(me+=2*Math.PI);let K=Math.abs(me-Ve);2*Math.PI-K<K&&(me<Ve?me+=2*Math.PI:Ve+=2*Math.PI),f.theta=me-Ve,i.update()},this.getDistance=()=>i.object.position.distanceTo(i.target),this.listenToKeyEvents=Q=>{Q.addEventListener("keydown",Pe),this._domElementKeyEvents=Q},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Pe),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const Q=new k,me=new k(0,1,0),Ve=new xn().setFromUnitVectors(e.up,me),K=Ve.clone().invert(),Ce=new k,pe=new xn,ve=2*Math.PI;return function(){const dt=i.object.position;Ve.setFromUnitVectors(e.up,me),K.copy(Ve).invert(),Q.copy(dt).sub(i.target),Q.applyQuaternion(Ve),h.setFromVector3(Q),i.autoRotate&&l===a.NONE&&q(W()),i.enableDamping?(h.theta+=f.theta*i.dampingFactor,h.phi+=f.phi*i.dampingFactor):(h.theta+=f.theta,h.phi+=f.phi);let _t=i.minAzimuthAngle,zt=i.maxAzimuthAngle;isFinite(_t)&&isFinite(zt)&&(_t<-Math.PI?_t+=ve:_t>Math.PI&&(_t-=ve),zt<-Math.PI?zt+=ve:zt>Math.PI&&(zt-=ve),_t<=zt?h.theta=Math.max(_t,Math.min(zt,h.theta)):h.theta=h.theta>(_t+zt)/2?Math.max(_t,h.theta):Math.min(zt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&R||i.object.isOrthographicCamera?h.radius=ue(h.radius):h.radius=ue(h.radius*p),Q.setFromSpherical(h),Q.applyQuaternion(K),dt.copy(i.target).add(Q),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(f.theta*=1-i.dampingFactor,f.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(f.set(0,0,0),m.set(0,0,0));let an=!1;if(i.zoomToCursor&&R){let Rt=null;if(i.object instanceof un&&i.object.isPerspectiveCamera){const Kn=Q.length();Rt=ue(Kn*p);const qn=Kn-Rt;i.object.position.addScaledVector(P,qn),i.object.updateMatrixWorld()}
3979else if(i.object.isOrthographicCamera){const Kn=new k(B.x,B.y,0);Kn.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),an=!0;const qn=new k(B.x,B.y,0);qn.unproject(i.object),i.object.position.sub(qn).add(Kn),i.object.updateMatrixWorld(),Rt=Q.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Rt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Rt).add(i.object.position):(Ng.origin.copy(i.object.position),Ng.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Ng.direction))<BY?e.lookAt(i.target):(mI.setFromNormalAndCoplanarPoint(i.object.up,i.target),Ng.intersectPlane(mI,i.target))))}else i.object instanceof Hr&&i.object.isOrthographicCamera&&(an=p!==1,an&&(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix()));return p=1,R=!1,an||Ce.distanceToSquared(i.object.position)>c||8*(1-pe.dot(i.object.quaternion))>c?(i.dispatchEvent(r),Ce.copy(i.object.position),pe.copy(i.object.quaternion),an=!1,!0):!1}})(),this.connect=Q=>{Q===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=Q,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Re),i.domElement.addEventListener("pointerdown",N),i.domElement.addEventListener("pointercancel",Me),i.domElement.addEventListener("wheel",rt)},this.dispose=()=>{var Q,me,Ve,K,Ce,pe;i.domElement&&(i.domElement.style.touchAction="auto"),(Q=i.domElement)==null||Q.removeEventListener("contextmenu",Re),(me=i.domElement)==null||me.removeEventListener("pointerdown",N),(Ve=i.domElement)==null||Ve.removeEventListener("pointercancel",Me),(K=i.domElement)==null||K.removeEventListener("wheel",rt),(Ce=i.domElement)==null||Ce.ownerDocument.removeEventListener("pointermove",se),(pe=i.domElement)==null||pe.ownerDocument.removeEventListener("pointerup",Me),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",Pe)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const c=1e-6,h=new wv,f=new wv;let p=1;const m=new k,v=new he,S=new he,A=new he,g=new he,x=new he,_=new he,M=new he,b=new he,C=new he,P=new k,B=new he;let R=!1;const T=[],L={};function W(){return 2*Math.PI/60/60*i.autoRotateSpeed}function Y(){return Math.pow(.95,i.zoomSpeed)}function q(Q){i.reverseOrbit||i.reverseHorizontalOrbit?f.theta+=Q:f.theta-=Q}function j(Q){i.reverseOrbit||i.reverseVerticalOrbit?f.phi+=Q:f.phi-=Q}const Z=(()=>{const Q=new k;return function(Ve,K){Q.setFromMatrixColumn(K,0),Q.multiplyScalar(-Ve),m.add(Q)}})(),H=(()=>{const Q=new k;return function(Ve,K){i.screenSpacePanning===!0?Q.setFromMatrixColumn(K,1):(Q.setFromMatrixColumn(K,0),Q.crossVectors(i.object.up,Q)),Q.multiplyScalar(Ve),m.add(Q)}})(),D=(()=>{const Q=new k;return function(Ve,K){const Ce=i.domElement;if(Ce&&i.object instanceof un&&i.object.isPerspectiveCamera){const pe=i.object.position;Q.copy(pe).sub(i.target);let ve=Q.length();ve*=Math.tan(i.object.fov/2*Math.PI/180),Z(2*Ve*ve/Ce.clientHeight,i.object.matrix),H(2*K*ve/Ce.clientHeight,i.object.matrix)}else Ce&&i.object instanceof Hr&&i.object.isOrthographicCamera?(Z(Ve*(i.object.right-i.object.left)/i.object.zoom/Ce.clientWidth,i.object.matrix),H(K*(i.object.top-i.object.bottom)/i.object.zoom/Ce.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function X(Q){i.object instanceof un&&i.object.isPerspectiveCamera||i.object instanceof Hr&&i.object.isOrthographicCamera?p/=Q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function J(Q){i.object instanceof un&&i.object.isPerspectiveCamera||i.object instanceof Hr&&i.object.isOrthographicCamera?p*=Q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}
3979function $(Q){if(!i.zoomToCursor||!i.domElement)return;R=!0;const me=i.domElement.getBoundingClientRect(),Ve=Q.clientX-me.left,K=Q.clientY-me.top,Ce=me.width,pe=me.height;B.x=Ve/Ce*2-1,B.y=-(K/pe)*2+1,P.set(B.x,B.y,1).unproject(i.object).sub(i.object.position).normalize()}function ue(Q){return Math.max(i.minDistance,Math.min(i.maxDistance,Q))}function Ae(Q){v.set(Q.clientX,Q.clientY)}function te(Q){$(Q),M.set(Q.clientX,Q.clientY)}function ce(Q){g.set(Q.clientX,Q.clientY)}function xe(Q){S.set(Q.clientX,Q.clientY),A.subVectors(S,v).multiplyScalar(i.rotateSpeed);const me=i.domElement;me&&(q(2*Math.PI*A.x/me.clientHeight),j(2*Math.PI*A.y/me.clientHeight)),v.copy(S),i.update()}function _e(Q){b.set(Q.clientX,Q.clientY),C.subVectors(b,M),C.y>0?X(Y()):C.y<0&&J(Y()),M.copy(b),i.update()}function De(Q){x.set(Q.clientX,Q.clientY),_.subVectors(x,g).multiplyScalar(i.panSpeed),D(_.x,_.y),g.copy(x),i.update()}function it(Q){$(Q),Q.deltaY<0?J(Y()):Q.deltaY>0&&X(Y()),i.update()}function Ue(Q){let me=!1;switch(Q.code){case i.keys.UP:D(0,i.keyPanSpeed),me=!0;break;case i.keys.BOTTOM:D(0,-i.keyPanSpeed),me=!0;break;case i.keys.LEFT:D(i.keyPanSpeed,0),me=!0;break;case i.keys.RIGHT:D(-i.keyPanSpeed,0),me=!0;break}me&&(Q.preventDefault(),i.update())}function Be(){if(T.length==1)v.set(T[0].pageX,T[0].pageY);else{const Q=.5*(T[0].pageX+T[1].pageX),me=.5*(T[0].pageY+T[1].pageY);
3979v.set(Q,me)}}function U(){if(T.length==1)g.set(T[0].pageX,T[0].pageY);else{const Q=.5*(T[0].pageX+T[1].pageX),me=.5*(T[0].pageY+T[1].pageY);g.set(Q,me)}}function ye(){const Q=T[0].pageX-T[1].pageX,me=T[0].pageY-T[1].pageY,Ve=Math.sqrt(Q*Q+me*me);M.set(0,Ve)}function Te(){i.enableZoom&&ye(),i.enablePan&&U()}function Ne(){i.enableZoom&&ye(),i.enableRotate&&Be()}function ge(Q){if(T.length==1)S.set(Q.pageX,Q.pageY);else{const Ve=qe(Q),K=.5*(Q.pageX+Ve.x),Ce=.5*(Q.pageY+Ve.y);S.set(K,Ce)}A.subVectors(S,v).multiplyScalar(i.rotateSpeed);const me=i.domElement;me&&(q(2*Math.PI*A.x/me.clientHeight),j(2*Math.PI*A.y/me.clientHeight)),v.copy(S)}function Ze(Q){if(T.length==1)x.set(Q.pageX,Q.pageY);else{const me=qe(Q),Ve=.5*(Q.pageX+me.x),K=.5*(Q.pageY+me.y);x.set(Ve,K)}_.subVectors(x,g).multiplyScalar(i.panSpeed),D(_.x,_.y),g.copy(x)}function Oe(Q){const me=qe(Q),Ve=Q.pageX-me.x,K=Q.pageY-me.y,Ce=Math.sqrt(Ve*Ve+K*K);b.set(0,Ce),C.set(0,Math.pow(b.y/M.y,i.zoomSpeed)),X(C.y),M.copy(b)}function je(Q){i.enableZoom&&Oe(Q),i.enablePan&&Ze(Q)}function V(Q){i.enableZoom&&Oe(Q),i.enableRotate&&ge(Q)}function N(Q){var me,Ve;i.enabled!==!1&&(T.length===0&&((me=i.domElement)==null||me.ownerDocument.addEventListener("pointermove",se),(Ve=i.domElement)==null||Ve.ownerDocument.addEventListener("pointerup",Me)),We(Q),Q.pointerType==="touch"?Ke(Q):we(Q))}function se(Q){i.enabled!==!1&&(Q.pointerType==="touch"?xt(Q):Ee(Q))}function Me(Q){var me,Ve,K;It(Q),T.length===0&&((me=i.domElement)==null||me.releasePointerCapture(Q.pointerId),(Ve=i.domElement)==null||Ve.ownerDocument.removeEventListener("pointermove",se),(K=i.domElement)==null||K.ownerDocument.removeEventListener("pointerup",Me)),i.dispatchEvent(o),l=a.NONE}function we(Q){let me;switch(Q.button){case 0:me=i.mouseButtons.LEFT;break;case 1:me=i.mouseButtons.MIDDLE;break;case 2:me=i.mouseButtons.RIGHT;break;default:me=-1}switch(me){case cl.DOLLY:if(i.enableZoom===!1)return;te(Q),l=a.DOLLY;break;case cl.ROTATE:if(Q.ctrlKey||Q.metaKey||Q.shiftKey){if(i.enablePan===!1)return;ce(Q),l=a.PAN}else{if(i.enableRotate===!1)return;Ae(Q),l=a.ROTATE}break;case cl.PAN:if(Q.ctrlKey||Q.metaKey||Q.shiftKey){if(i.enableRotate===!1)return;Ae(Q),l=a.ROTATE}else{if(i.enablePan===!1)return;ce(Q),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Ee(Q){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;xe(Q);break;case a.DOLLY:if(i.enableZoom===!1)return;_e(Q);break;case a.PAN:if(i.enablePan===!1)return;De(Q);break}}function rt(Q){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(Q.preventDefault(),i.dispatchEvent(s),it(Q),i.dispatchEvent(o))}function Pe(Q){i.enabled===!1||i.enablePan===!1||Ue(Q)}function Ke(Q){switch(ft(Q),T.length){case 1:switch(i.touches.ONE){case ul.ROTATE:if(i.enableRotate===!1)return;Be(),l=a.TOUCH_ROTATE;break;case ul.PAN:if(i.enablePan===!1)return;U(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case ul.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Te(),l=a.TOUCH_DOLLY_PAN;break;case ul.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ne(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function xt(Q){switch(ft(Q),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;ge(Q),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ze(Q),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;je(Q),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;V(Q),i.update();break;default:l=a.NONE}}function Re(Q){i.enabled!==!1&&Q.preventDefault()}function We(Q){T.push(Q)}function It(Q){delete L[Q.pointerId];for(let me=0;me<T.length;me++)if(T[me].pointerId==Q.pointerId){T.splice(me,1);return}}function ft(Q){let me=L[Q.pointerId];me===void 0&&(me=new he,L[Q.pointerId]=me),me.set(Q.pageX,Q.pageY)}function qe(Q){const me=Q.pointerId===T[0].pointerId?T[1]:T[0];return L[me.pointerId]}n!==void 0&&this.connect(n),this.update()}};function bv(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let e="";for(let n=0,i=t.length;n<i;n++)e+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(e))}catch{return e}}const El="srgb",vo="srgb-linear",vI=3001,DY=3e3;class fE extends Pi{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(n){return new UY(n)}),this.register(function(n){return new zY(n)}),this.register(function(n){return new qY(n)}),this.register(function(n){return new QY(n)}),this.register(function(n){return new YY(n)}),this.register(function(n){return new GY(n)}),this.register(function(n){return new VY(n)}),this.register(function(n){return new jY(n)}),this.register(function(n){return new WY(n)}),this.register(function(n){return new OY(n)}),this.register(function(n){return new XY(n)}),this.register(function(n){return new HY(n)}),this.register(function(n){return new KY(n)}),this.register(function(n){return new JY(n)}),this.register(function(n){return new FY(n)}),this.register(function(n){return new ZY(n)}),this.register(function(n){return new $Y(n)})}load(e,n,i,r){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const c=ma.extractUrlBase(e);o=ma.resolveURL(c,this.path)}else o=ma.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 yr(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{
vendor: 5,110 bytes, line 3979
3979s.parse(c,o,function(h){n(h),s.manager.itemEnd(e)},a)}catch(h){a(h)}},i,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,n,i,r){let s;const o={},a={};if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(bv(new Uint8Array(e.slice(0,4)))===Tk){try{o[Bt.KHR_BINARY_GLTF]=new eZ(e)}catch(h){r&&r(h);return}s=JSON.parse(o[Bt.KHR_BINARY_GLTF].content)}else s=JSON.parse(bv(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 fZ(s,{path:n||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 h=this.pluginCallbacks[c](l);h.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[h.name]=h,o[h.name]=!0}if(s.extensionsUsed)for(let c=0;c<s.extensionsUsed.length;++c){const h=s.extensionsUsed[c],f=s.extensionsRequired||[];switch(h){case Bt.KHR_MATERIALS_UNLIT:o[h]=new kY;break;case Bt.KHR_DRACO_MESH_COMPRESSION:o[h]=new tZ(s,this.dracoLoader);break;case Bt.KHR_TEXTURE_TRANSFORM:o[h]=new nZ;break;case Bt.KHR_MESH_QUANTIZATION:o[h]=new iZ;break;default:f.indexOf(h)>=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(i,r)}parseAsync(e,n){const i=this;return new Promise(function(r,s){i.parse(e,n,r,s)})}}function NY(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Bt={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 FY{constructor(e){this.parser=e,this.name=Bt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let i=0,r=n.length;i<r;i++){const s=n[i];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 n=this.parser,i="light:"+e;let r=n.cache.get(i);if(r)return r;const s=n.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const h=new ze(16777215);l.color!==void 0&&h.setRGB(l.color[0],l.color[1],l.color[2],vo);const f=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new tE(h),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new eE(h),c.distance=f;break;case"spot":c=new $M(h),c.distance=f,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,eo(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=n.createUniqueName(l.name||"light_"+e),r=Promise.resolve(c),n.cache.add(i,r),r}getDependency(e,n){if(e==="light")return this._loadLight(n)}createNodeAttachment(e){const n=this,i=this.parser,s=i.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return i._getNodeRef(n.cache,a,l)})}}class kY{constructor(){this.name=Bt.KHR_MATERIALS_UNLIT}getMaterialType(){return hr}extendParams(e,n,i){const r=[];e.color=new ze(1,1,1),e.opacity=1;const s=n.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;
vendor: 9,531 bytes, line 3979
3979e.color.setRGB(o[0],o[1],o[2],vo),e.opacity=o[3]}s.baseColorTexture!==void 0&&r.push(i.assignTexture(e,"map",s.baseColorTexture,El))}return Promise.all(r)}}class OY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,n){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&&(n.emissiveIntensity=s),Promise.resolve()}}class UY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.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&&(n.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(i.assignTexture(n,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(n.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(i.assignTexture(n,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(i.assignTexture(n,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;n.clearcoatNormalScale=new he(a,a)}return Promise.all(s)}}class zY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_DISPERSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return n.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class HY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.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&&(n.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(i.assignTexture(n,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(n.iridescenceIOR=o.iridescenceIor),n.iridescenceThicknessRange===void 0&&(n.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(n.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(n.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(i.assignTexture(n,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class GY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_SHEEN}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];n.sheenColor=new ze(0,0,0),n.sheenRoughness=0,n.sheen=1;const o=r.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;n.sheenColor.setRGB(a[0],a[1],a[2],vo)}return o.sheenRoughnessFactor!==void 0&&(n.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(i.assignTexture(n,"sheenColorMap",o.sheenColorTexture,El)),o.sheenRoughnessTexture!==void 0&&s.push(i.assignTexture(n,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class VY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.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&&(n.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(i.assignTexture(n,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class jY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_VOLUME}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];n.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(i.assignTexture(n,"thicknessMap",o.thicknessTexture)),n.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return n.attenuationColor=new ze().setRGB(a[0],a[1],a[2],vo),Promise.all(s)}}class WY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_IOR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return n.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class XY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];n.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(i.assignTexture(n,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return n.specularColor=new ze().setRGB(a[0],a[1],a[2],vo),o.specularColorTexture!==void 0&&s.push(i.assignTexture(n,"specularColorMap",o.specularColorTexture,El)),Promise.all(s)}}class JY{constructor(e){this.parser=e,this.name=Bt.EXT_MATERIALS_BUMP}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return n.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(i.assignTexture(n,"bumpMap",o.bumpTexture)),Promise.all(s)}}class KY{constructor(e){this.parser=e,this.name=Bt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Xr}extendMaterialParams(e,n){const i=this.parser,r=i.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&&(n.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(n.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(i.assignTexture(n,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class qY{constructor(e){this.parser=e,this.name=Bt.KHR_TEXTURE_BASISU}loadTexture(e){const n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const s=r.extensions[this.name],o=n.options.ktx2Loader;if(!o){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,s.source,o)}}class QY{constructor(e){this.parser=e,this.name=Bt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[n])return null;const o=s.extensions[n],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class YY{constructor(e){this.parser=e,this.name=Bt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[n])return null;const o=s.extensions[n],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
3979FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class ZY{constructor(e){this.name=Bt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,i=n.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(n.extensionsRequired&&n.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,h=r.count,f=r.byteStride,p=new Uint8Array(a,l,c);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,f,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(h*f);return o.decodeGltfBuffer(new Uint8Array(m),h,f,p,r.mode,r.filter),m})})}else return null}}class $Y{constructor(e){this.name=Bt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,i=n.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=n.meshes[i.mesh];for(const c of r.primitives)if(c.mode!==Lr.TRIANGLES&&c.mode!==Lr.TRIANGLE_STRIP&&c.mode!==Lr.TRIANGLE_FAN&&c.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(h=>(l[c]=h,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const h=c.pop(),f=h.isGroup?h.children:[h],p=c[0].count,m=[];for(const v of f){const S=new at,A=new k,g=new xn,x=new k(1,1,1),_=new UM(v.geometry,v.material,p);for(let M=0;M<p;M++)l.TRANSLATION&&A.fromBufferAttribute(l.TRANSLATION,M),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,M),l.SCALE&&x.fromBufferAttribute(l.SCALE,M),_.setMatrixAt(M,S.compose(A,g,x));for(const M in l)if(M==="_COLOR_0"){const b=l[M];_.instanceColor=new Jl(b.array,b.itemSize,b.normalized)}else M!=="TRANSLATION"&&M!=="ROTATION"&&M!=="SCALE"&&v.geometry.setAttribute(M,l[M]);kt.prototype.copy.call(_,v),this.parser.assignFinalMaterial(_),m.push(_)}return h.isGroup?(h.clear(),h.add(...m),h):m[0]}))}}const Tk="glTF",vh=12,yI={JSON:1313821514,BIN:5130562};class eZ{constructor(e){this.name=Bt.KHR_BINARY_GLTF,this.content=null,this.body=null;const n=new DataView(e,0,vh);if(this.header={magic:bv(new Uint8Array(e.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==Tk)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-vh,r=new DataView(e,vh);let s=0;for(;s<i;){const o=r.getUint32(s,!0);s+=4;const a=r.getUint32(s,!0);if(s+=4,a===yI.JSON){const l=new Uint8Array(e,vh+s,o);this.content=bv(l)}else if(a===yI.BIN){const l=vh+s;this.body=e.slice(l,l+o)}s+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class tZ{constructor(e,n){if(!n)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Bt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=n,this.dracoLoader.preload()}decodePrimitive(e,n){const i=this.json,r=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},c={};for(const h in o){const f=RS[h]||h.toLowerCase();a[f]=o[h]}for(const h in e.attributes){const f=RS[h]||h.toLowerCase();if(o[h]!==void 0){const p=i.accessors[e.attributes[h]],m=Fu[p.componentType];c[f]=m.name,l[f]=p.normalized===!0}}return n.getDependency("bufferView",s).then(function(h){return new Promise(function(f,p){r.decodeDracoFile(h,function(m){for(const v in m.attributes){const S=m.attributes[v],A=l[v];A!==void 0&&(S.normalized=A)}f(m)},a,c,vo,p)})})}}class nZ{constructor(){this.name=Bt.KHR_TEXTURE_TRANSFORM}extendTexture(e,n){return(n.texCoord===void 0||n.texCoord===e.channel)&&n.offset===void 0&&n.rotation===void 0&&n.scale===void 0||(e=e.clone(),n.texCoord!==void 0&&(e.channel=n.texCoord),n.offset!==void 0&&e.offset.fromArray(n.offset),n.rotation!==void 0&&(e.rotation=n.rotation),n.scale!==void 0&&e.repeat.fromArray(n.scale),e.needsUpdate=!0),e}}class iZ{constructor(){this.name=Bt.KHR_MESH_QUANTIZATION}}class bk extends pd{constructor(e,n,i,r){super(e,n,i,r)}copySampleValue_(e){const n=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)n[o]=i[s+o];return n}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,h=r-n,f=(i-n)/h,p=f*f,m=p*f,v=e*c,S=v-c,A=-2*m+3*p,g=m-p,x=1-A,_=g-p+f;for(let M=0;M!==a;M++){const b=o[S+M+a],C=o[S+M+l]*h,P=o[v+M+a],B=o[v+M]*h;s[M]=x*b+_*C+A*P+g*B}return s}}const rZ=new xn;class sZ extends bk{interpolate_(e,n,i,r){const s=super.interpolate_(e,n,i,r);return rZ.fromArray(s).normalize().toArray(s),s}}const Lr={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Fu={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},xI={9728:jn,9729:Tn,9984:ay,9985:Iu,9986:xl,9987:zr},_I={33071:dr,33648:Ju,10497:Aa},D1={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},RS={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...RY>=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"},Jo={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},oZ={CUBICSPLINE:void 0,LINEAR:Qu,STEP:qu},N1={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function aZ(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new gp({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:ks})),t.DefaultMaterial}function nl(t,e,n){for(const i in n.extensions)t[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=n.extensions[i])}function eo(t,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(t.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function lZ(t,e,n){let i=!1,r=!1,s=!1;for(let c=0,h=e.length;c<h;c++){const f=e[c];if(f.POSITION!==void 0&&(i=!0),f.NORMAL!==void 0&&(r=!0),f.COLOR_0!==void 0&&(s=!0),i&&r&&s)break}if(!i&&!r&&!s)return Promise.resolve(t);const o=[],a=[],l=[];for(let c=0,h=e.length;c<h;c++){const f=e[c];if(i){const p=f.POSITION!==void 0?n.getDependency("accessor",f.POSITION):t.attributes.position;o.push(p)}if(r){const p=f.NORMAL!==void 0?n.getDependency("accessor",f.NORMAL):t.attributes.normal;a.push(p)}if(s){const p=f.COLOR_0!==void 0?n.getDependency("accessor",f.COLOR_0):t.attributes.color;l.push(p)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(c){const h=c[0],f=c[1],p=c[2];return i&&(t.morphAttributes.position=h),r&&(t.morphAttributes.normal=f),s&&(t.morphAttributes.color=p),t.morphTargetsRelative=!0,t})}function cZ(t,e){if(t.updateMorphTargets(),e.weights!==void 0)for(let n=0,i=e.weights.length;n<i;n++)t.morphTargetInfluences[n]=e.weights[n];if(e.extras&&Array.isArray(e.extras.targetNames)){const n=e.extras.targetNames;if(t.morphTargetInfluences.length===n.length){t.morphTargetDictionary={};for(let i=0,r=n.length;i<r;i++)t.morphTargetDictionary[n[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function uZ(t){let e;const n=t.extensions&&t.extensions[Bt.KHR_DRACO_MESH_COMPRESSION];if(n?e="draco:"+n.bufferView+":"+n.indices+":"+F1(n.attributes):e=t.indices+":"+F1(t.attributes)+":"+t.mode,t.targets!==void 0)for(let i=0,r=t.targets.length;i<r;i++)e+=":"+F1(t.targets[i]);return e}function F1(t){let e="";const n=Object.keys(t).sort();for(let i=0,r=n.length;i<r;i++)e+=n[i]+":"+t[n[i]]+";";return e}function PS(t){switch(t){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 dZ(t){return t.search(/\.jpe?g($|\?)/i)>0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}
vendor: 26,034 bytes, lines 3979-3980
3979const hZ=new at;class fZ{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new NY,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 i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!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"||i||r&&s<98?this.textureLoader=new vp(this.options.manager):this.textureLoader=new JF(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new yr(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,n){const i=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()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.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:i,userData:{}};return nl(s,a,r),eo(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=n.length;r<s;r++){const o=n[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&&(i[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,n){n!==void 0&&(e.refs[n]===void 0&&(e.refs[n]=e.uses[n]=0),e.refs[n]++)}_getNodeRef(e,n,i){if(e.refs[n]<=1)return i;const r=i.clone(),s=(o,a)=>{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[c,h]of o.children.entries())s(h,a.children[c])};return s(i,r),r.name+="_instance_"+e.uses[n]++,r}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let i=0;i<n.length;i++){const r=e(n[i]);if(r)return r}return null}_invokeAll(e){const n=Object.values(this.plugins);n.unshift(this);const i=[];for(let r=0;r<n.length;r++){const s=e(n[r]);s&&i.push(s)}return i}getDependency(e,n){const i=e+":"+n;let r=this.cache.get(i);if(!r){switch(e){case"scene":r=this.loadScene(n);break;case"node":r=this._invokeOne(function(s){return s.loadNode&&s.loadNode(n)});break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(n)});break;case"accessor":r=this.loadAccessor(n);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(n)});break;case"buffer":r=this.loadBuffer(n);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(n)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(n)});break;case"skin":r=this.loadSkin(n);break;case"animation":r=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(n)});break;case"camera":r=this.loadCamera(n);break;default:if(r=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,n)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(i,r)}return r}getDependencies(e){let n=this.cache.get(e);if(!n){const i=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];n=Promise.all(r.map(function(s,o){return i.getDependency(e,o)})),this.cache.add(e,n)}return n}loadBuffer(e){const n=this.json.buffers[e],i=this.fileLoader;if(n.type&&n.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(n.uri===void 0&&e===0)return Promise.resolve(this.extensions[Bt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){i.load(ma.resolveURL(n.uri,r.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+n.uri+'".'))})})}loadBufferView(e){const n=this.json.bufferViews[e];return this.getDependency("buffer",n.buffer).then(function(i){const r=n.byteLength||0,s=n.byteOffset||0;return i.slice(s,s+r)})}loadAccessor(e){const n=this,i=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=D1[r.type],a=Fu[r.componentType],l=r.normalized===!0,c=new a(r.count*o);return Promise.resolve(new Nt(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=D1[r.type],c=Fu[r.componentType],h=c.BYTES_PER_ELEMENT,f=h*l,p=r.byteOffset||0,m=r.bufferView!==void 0?i.bufferViews[r.bufferView].byteStride:void 0,v=r.normalized===!0;let S,A;if(m&&m!==f){const g=Math.floor(p/m),x="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let _=n.cache.get(x);_||(S=new c(a,g*m,r.count*m/h),_=new up(S,m/h),n.cache.add(x,_)),A=new Sa(_,l,p%m/h,v)}else a===null?S=new c(r.count*l):S=new c(a,p,r.count*l),A=new Nt(S,l,v);if(r.sparse!==void 0){const g=D1.SCALAR,x=Fu[r.sparse.indices.componentType],_=r.sparse.indices.byteOffset||0,M=r.sparse.values.byteOffset||0,b=new x(o[1],_,r.sparse.count*g),C=new c(o[2],M,r.sparse.count*l);a!==null&&(A=new Nt(A.array.slice(),A.itemSize,A.normalized));for(let P=0,B=b.length;P<B;P++){const R=b[P];if(A.setX(R,C[P*l]),l>=2&&A.setY(R,C[P*l+1]),l>=3&&A.setZ(R,C[P*l+2]),l>=4&&A.setW(R,C[P*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return A})}loadTexture(e){const n=this.json,i=this.options,s=n.textures[e].source,o=n.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,n,i){const r=this,s=this.json,o=s.textures[e],a=s.images[n],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,i).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return h.magFilter=xI[p.magFilter]||Tn,h.minFilter=xI[p.minFilter]||zr,h.wrapS=_I[p.wrapS]||Aa,h.wrapT=_I[p.wrapT]||Aa,r.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(f){c=!0;const p=new Blob([f],{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 h=Promise.resolve(l).then(function(f){return new Promise(function(p,m){let v=p;n.isImageBitmapLoader===!0&&(v=function(S){const A=new Zt(S);A.needsUpdate=!0,p(A)}),n.load(ma.resolveURL(f,s.path),v,void 0,m)})}).then(function(f){return c===!0&&a.revokeObjectURL(l),eo(f,o),f.userData.mimeType=o.mimeType||dZ(o.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=h,h}assignTexture(e,n,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Bt.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Bt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&(typeof r=="number"&&(r=r===vI?El:vo),"colorSpace"in o?o.colorSpace=r:o.encoding=r===El?vI:DY),e[n]=o,o})}assignFinalMaterial(e){const n=e.geometry;let i=e.material;const r=n.attributes.tangent===void 0,s=n.attributes.color!==void 0,o=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new hp,zn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new Ri,zn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.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(i))),i=l}e.material=i}getMaterialType(){return gp}loadMaterial(e){const n=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},c=[];if(l[Bt.KHR_MATERIALS_UNLIT]){const f=r[Bt.KHR_MATERIALS_UNLIT];o=f.getMaterialType(),c.push(f.extendParams(a,s,n))}else{const f=s.pbrMetallicRoughness||{};if(a.color=new ze(1,1,1),a.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],vo),a.opacity=p[3]}f.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",f.baseColorTexture,El)),a.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,a.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",f.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",f.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=Or);const h=s.alphaMode||N1.OPAQUE;if(h===N1.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===N1.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==hr&&(c.push(n.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new he(1,1),s.normalTexture.scale!==void 0)){const f=s.normalTexture.scale;a.normalScale.set(f,f)}if(s.occlusionTexture!==void 0&&o!==hr&&(c.push(n.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==hr){const f=s.emissiveFactor;a.emissive=new ze().setRGB(f[0],f[1],f[2],vo)}return s.emissiveTexture!==void 0&&o!==hr&&c.push(n.assignTexture(a,"emissiveMap",s.emissiveTexture,El)),Promise.all(c).then(function(){const f=new o(a);return s.name&&(f.name=s.name),eo(f,s),n.associations.set(f,{materials:e}),s.extensions&&nl(r,f,s),f})}createUniqueName(e){const n=Ot.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Bt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return AI(l,a,n)})}const o=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],h=uZ(c),f=r[h];if(f)o.push(f.promise);else{let p;c.extensions&&c.extensions[Bt.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=AI(new St,c,n),r[h]={primitive:c,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const n=this,i=this.json,r=this.extensions,s=i.meshes[e],o=s.primitives,a=[];for(let l=0,c=o.length;l<c;l++){const h=o[l].material===void 0?aZ(this.cache):this.getDependency("material",o[l].material);a.push(h)}return a.push(n.loadGeometries(o)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),h=l[l.length-1],f=[];for(let m=0,v=h.length;m<v;m++){const S=h[m],A=o[m];let g;const x=c[m];if(A.mode===Lr.TRIANGLES||A.mode===Lr.TRIANGLE_STRIP||A.mode===Lr.TRIANGLE_FAN||A.mode===void 0)g=s.isSkinnedMesh===!0?new OM(S,x):new bn(S,x),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),A.mode===Lr.TRIANGLE_STRIP?g.geometry=pI(g.geometry,wM):A.mode===Lr.TRIANGLE_FAN&&(g.geometry=pI(g.geometry,yv));else if(A.mode===Lr.LINES)g=new ms(S,x);else if(A.mode===Lr.LINE_STRIP)g=new Eo(S,x);else if(A.mode===Lr.LINE_LOOP)g=new zM(S,x);else if(A.mode===Lr.POINTS)g=new HM(S,x);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+A.mode);Object.keys(g.geometry.morphAttributes).length>0&&cZ(g,s),g.name=n.createUniqueName(s.name||"mesh_"+e),eo(g,s),A.extensions&&nl(r,g,A),n.assignFinalMaterial(g),f.push(g)}for(let m=0,v=f.length;m<v;m++)n.associations.set(f[m],{meshes:e,primitives:m});if(f.length===1)return s.extensions&&nl(r,f[0],s),f[0];const p=new lo;s.extensions&&nl(r,p,s),n.associations.set(p,{meshes:e});for(let m=0,v=f.length;m<v;m++)p.add(f[m]);return p})}loadCamera(e){let n;const i=this.json.cameras[e],r=i[i.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?n=new un(CM.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):i.type==="orthographic"&&(n=new Hr(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),i.name&&(n.name=this.createUniqueName(i.name)),eo(n,i),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],i=[];for(let r=0,s=n.joints.length;r<s;r++)i.push(this._loadNodeShallow(n.joints[r]));return n.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",n.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(r){const s=r.pop(),o=r,a=[],l=[];for(let c=0,h=o.length;c<h;c++){const f=o[c];if(f){a.push(f);const p=new at;s!==null&&p.fromArray(s.array,c*16),l.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',n.joints[c])}return new dp(a,l)})}loadAnimation(e){const n=this.json,i=this,r=n.animations[e],s=r.name?r.name:"animation_"+e,o=[],a=[],l=[],c=[],h=[];for(let f=0,p=r.channels.length;f<p;f++){const m=r.channels[f],v=r.samplers[m.sampler],S=m.target,A=S.node,g=r.parameters!==void 0?r.parameters[v.input]:v.input,x=r.parameters!==void 0?r.parameters[v.output]:v.output;S.node!==void 0&&(o.push(this.getDependency("node",A)),a.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",x)),c.push(v),h.push(S))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(h)]).then(function(f){const p=f[0],m=f[1],v=f[2],S=f[3],A=f[4],g=[];for(let x=0,_=p.length;x<_;x++){const M=p[x],b=m[x],C=v[x],P=S[x],B=A[x];if(M===void 0)continue;M.updateMatrix&&M.updateMatrix();const R=i._createAnimationTracks(M,b,C,P,B);if(R)for(let T=0;T<R.length;T++)g.push(R[T])}return new $u(s,void 0,g)})}createNodeMesh(e){const n=this.json,i=this,r=n.nodes[e];return r.mesh===void 0?null:i.getDependency("mesh",r.mesh).then(function(s){const o=i._getNodeRef(i.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 n=this.json,i=this,r=n.nodes[e],s=i._loadNodeShallow(e),o=[],a=r.children||[];for(let c=0,h=a.length;c<h;c++)o.push(i.getDependency("node",a[c]));const l=r.skin===void 0?Promise.resolve(null):i.getDependency("skin",r.skin);return Promise.all([s,Promise.all(o),l]).then(function(c){const h=c[0],f=c[1],p=c[2];p!==null&&h.traverse(function(m){m.isSkinnedMesh&&m.bind(p,hZ)});for(let m=0,v=f.length;m<v;m++)h.add(f[m]);return h})}_loadNodeShallow(e){const n=this.json,i=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=n.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 h;if(s.isBone===!0?h=new _y:c.length>1?h=new lo:c.length===1?h=c[0]:h=new kt,h!==c[0])for(let f=0,p=c.length;f<p;f++)h.add(c[f]);if(s.name&&(h.userData.name=s.name,h.name=o),eo(h,s),s.extensions&&nl(i,h,s),s.matrix!==void 0){const f=new at;f.fromArray(s.matrix),h.applyMatrix4(f)}else s.translation!==void 0&&h.position.fromArray(s.translation),s.rotation!==void 0&&h.quaternion.fromArray(s.rotation),s.scale!==void 0&&h.scale.fromArray(s.scale);return r.associations.has(h)||r.associations.set(h,{}),r.associations.get(h).nodes=e,h}),this.nodeCache[e]}loadScene(e){const n=this.extensions,i=this.json.scenes[e],r=this,s=new lo;i.name&&(s.name=r.createUniqueName(i.name)),eo(s,i),i.extensions&&nl(n,s,i);const o=i.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 h=0,f=l.length;h<f;h++)s.add(l[h]);const c=h=>{const f=new Map;for(const[p,m]of r.associations)(p instanceof zn||p instanceof Zt)&&f.set(p,m);return h.traverse(p=>{const m=r.associations.get(p);m!=null&&f.set(p,m)}),f};return r.associations=c(s),s})}_createAnimationTracks(e,n,i,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];Jo[s.path]===Jo.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let c;switch(Jo[s.path]){case Jo.weights:c=ql;break;case Jo.rotation:c=Ql;break;case Jo.position:case Jo.scale:c=Yl;break;default:switch(i.itemSize){case 1:c=ql;break;case 2:case 3:default:c=Yl;break}break}const h=r.interpolation!==void 0?oZ[r.interpolation]:Qu,f=this._getArrayFromAccessor(i);for(let p=0,m=l.length;p<m;p++){const v=new c(l[p]+"."+Jo[s.path],n.array,f,h);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(v),o.push(v)}return o}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const i=PS(n.constructor),r=new Float32Array(n.length);for(let s=0,o=n.length;s<o;s++)r[s]=n[s]*i;n=r}return n}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(i){const r=this instanceof Ql?sZ:bk;return new r(this.times,this.values,this.getValueSize()/3,i)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function pZ(t,e,n){const i=e.attributes,r=new ui;if(i.POSITION!==void 0){const a=n.json.accessors[i.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(r.set(new k(l[0],l[1],l[2]),new k(c[0],c[1],c[2])),a.normalized){const h=PS(Fu[a.componentType]);r.min.multiplyScalar(h),r.max.multiplyScalar(h)}}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 k,l=new k;for(let c=0,h=s.length;c<h;c++){const f=s[c];if(f.POSITION!==void 0){const p=n.json.accessors[f.POSITION],m=p.min,v=p.max;if(m!==void 0&&v!==void 0){if(l.setX(Math.max(Math.abs(m[0]),Math.abs(v[0]))),l.setY(Math.max(Math.abs(m[1]),Math.abs(v[1]))),l.setZ(Math.max(Math.abs(m[2]),Math.abs(v[2]))),p.normalized){const S=PS(Fu[p.componentType]);l.multiplyScalar(S)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(a)}t.boundingBox=r;const o=new di;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,t.boundingSphere=o}function AI(t,e,n){const i=e.attributes,r=[];function s(o,a){return n.getDependency("accessor",o).then(function(l){t.setAttribute(a,l)})}for(const o in i){const a=RS[o]||o.toLowerCase();a in t.attributes||r.push(s(i[o],a))}if(e.indices!==void 0&&!t.index){const o=n.getDependency("accessor",e.indices).then(function(a){t.setIndex(a)});r.push(o)}return eo(t,e),pZ(t,e,n),Promise.all(r).then(function(){return e.targets!==void 0?lZ(t,e.targets,n):t})}const k1=new WeakMap;class mZ extends Pi{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,n,i,r){const s=new yr(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};this.decodeGeometry(o,a).then(n).catch(r)},i,r)}decodeDracoFile(e,n,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(n)}decodeGeometry(e,n){for(const l in n.attributeTypes){const c=n.attributeTypes[l];c.BYTES_PER_ELEMENT!==void 0&&(n.attributeTypes[l]=c.name)}const i=JSON.stringify(n);if(k1.has(e)){const l=k1.get(e);if(l.key===i)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,h)=>{r._callbacks[s]={resolve:c,reject:h},r.postMessage({type:"decode",id:s,taskConfig:n,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),k1.set(e,{key:i,promise:a}),a}_createGeometry(e){const n=new St;e.index&&n.setIndex(new Nt(e.index.array,1));for(let i=0;i<e.attributes.length;i++){const r=e.attributes[i],s=r.name,o=r.array,a=r.itemSize;n.setAttribute(s,new Nt(o,a))}return n}_loadLibrary(e,n){const i=new yr(this.manager);return i.setPath(this.decoderPath),i.setResponseType(n),i.setWithCredentials(this.withCredentials),new Promise((r,s)=>{i.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",n=[];return e?n.push(this._loadLibrary("draco_decoder.js","text")):(n.push(this._loadLibrary("draco_wasm_wrapper.js","text")),n.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(n).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=gZ.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(`
3980`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,n){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 i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=n,i._taskLoad+=n,i})}_releaseTask(e,n){e._taskLoad-=e._taskCosts[n],delete e._callbacks[n],delete e._taskCosts[n]}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 gZ(){let t,e;onmessage=function(o){const a=o.data;switch(a.type){case"init":t=a.decoderConfig,e=new Promise(function(h){t.onModuleLoaded=function(f){h({draco:f})},DracoDecoderModule(t)});break;case"decode":const l=a.buffer,c=a.taskConfig;e.then(h=>{const f=h.draco,p=new f.Decoder,m=new f.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const v=n(f,p,m,c),S=v.attributes.map(A=>A.array.buffer);v.index&&S.push(v.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:v},S)}catch(v){console.error(v),self.postMessage({type:"error",id:a.id,error:v.message})}finally{f.destroy(m),f.destroy(p)}});break}};function n(o,a,l,c){const h=c.attributeIDs,f=c.attributeTypes;let p,m;const v=a.GetEncodedGeometryType(l);if(v===o.TRIANGULAR_MESH)p=new o.Mesh,m=a.DecodeBufferToMesh(l,p);else if(v===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 S={index:null,attributes:[]};for(const A in h){const g=self[f[A]];let x,_;if(c.useUniqueIDs)_=h[A],x=a.GetAttributeByUniqueId(p,_);else{if(_=a.GetAttributeId(p,o[h[A]]),_===-1)continue;x=a.GetAttribute(p,_)}S.attributes.push(r(o,a,p,A,g,x))}return v===o.TRIANGULAR_MESH&&(S.index=i(o,a,p)),o.destroy(p),S}function i(o,a,l){const h=l.num_faces()*3,f=h*4,p=o._malloc(f);a.GetTrianglesUInt32Array(l,f,p);const m=new Uint32Array(o.HEAPF32.buffer,p,h).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,c,h,f){const p=f.num_components(),v=l.num_points()*p,S=v*h.BYTES_PER_ELEMENT,A=s(o,h),g=o._malloc(S);a.GetAttributeDataArrayForAllPoints(l,f,A,S,g);const x=new h(o.HEAPF32.buffer,g,v).slice();return o._free(g),{name:c,array:x,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}}}let Fg;const O1=()=>{if(Fg)return Fg;
3980const t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIA
3980LAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/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
3980XAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/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",n=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]),i=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=t;WebAssembly.validate(n)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(f=>{s=f.instance,s.exports.__wasm_call_ctors()});function a(f){const p=new Uint8Array(f.length);for(let v=0;v<f.length;++v){const S=f.charCodeAt(v);p[v]=S>96?S-71:S>64?S-65:S>47?S+4:S>46?63:62}let m=0;for(let v=0;v<f.length;++v)p[m++]=p[v]<60?i[p[v]]:(p[v]-60)*64+p[++v];return p.buffer.slice(0,m)}function l(f,p,m,v,S,A){const g=s.exports.sbrk,x=m+3&-4,_=g(x*v),M=g(S.length),b=new Uint8Array(s.exports.memory.buffer);b.set(S,M);const C=f(_,m,v,M,S.length);if(C===0&&A&&A(_,x,v),p.set(b.subarray(_,_+m*v)),g(_-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"},h={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return Fg={ready:o,supported:!0,decodeVertexBuffer(f,p,m,v,S){l(s.exports.meshopt_decodeVertexBuffer,f,p,m,v,s.exports[c[S]])},decodeIndexBuffer(f,p,m,v){l(s.exports.meshopt_decodeIndexBuffer,f,p,m,v)},decodeIndexSequence(f,p,m,v){l(s.exports.meshopt_decodeIndexSequence,f,p,m,v)},decodeGltfBuffer(f,p,m,v,S,A){l(s.exports[h[S]],f,p,m,v,s.exports[c[A]])}},Fg};function Rk(t,e,n,i){const r=class extends Wr{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((l,[c,h])=>{const f=PM.clone({[c]:{value:h}});return{...l,...f}},{}),vertexShader:e,fragmentShader:n}),this.key="",a.forEach(([l])=>Object.defineProperty(this,l,{get:()=>this.uniforms[l].value,set:c=>this.uniforms[l].value=c})),Object.assign(this,o)}};return r.key=CM.generateUUID(),r}const U1=t=>t===Object(t)&&!Array.isArray(t)&&typeof t!="function";function ky(t,e){const n=cr(s=>s.gl),i=Ba(vp,U1(t)?Object.values(t):t);return z.useLayoutEffect(()=>{e==null||e(i)},[e]),z.useEffect(()=>{if("initTexture"in n){let s=[];Array.isArray(i)?s=i:i instanceof Zt?s=[i]:U1(i)&&(s=Object.values(i)),s.forEac
3980h(o=>{o instanceof Zt&&n.initTexture(o)})}},[n,i]),z.useMemo(()=>{if(U1(t)){const s={};let o=0;for(const a in t)s[a]=i[o++];return s}else return i},[t,i])}ky.preload=t=>Ba.preload(vp,t);ky.clear=t=>Ba.clear(vp,t);const vZ=()=>parseInt(ld.replace(/\D+/g,"")),Pk=vZ();let kg=null,Ik="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function Bk(t,e,n){return i=>{n&&n(i),t&&(kg||(kg=new mZ),kg.setDecoderPath(typeof t=="string"?t:Ik),i.setDRACOLoader(kg)),e&&i.setMeshoptDecoder(typeof O1=="function"?O1():O1)}}function Oy(t,e=!0,n=!0,i){return Ba(fE,t,Bk(e,n,i))}Oy.preload=(t,e=!0,n=!0,i)=>Ba.preload(fE,t,Bk(e,n,i));Oy.clear=t=>Ba.clear(fE,t);Oy.setDecoderPath=t=>{Ik=t};const yZ=z.forwardRef(({makeDefault:t,camera:e,regress:n,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...c},h)=>{const f=cr(C=>C.invalidate),p=cr(C=>C.camera),m=cr(C=>C.gl),v=cr(C=>C.events),S=cr(C=>C.setEvents),A=cr(C=>C.set),g=cr(C=>C.get),x=cr(C=>C.performance),_=e||p,M=i||v.connected||m.domElement,b=z.useMemo(()=>new LY(_),[_]);return lc(()=>{b.enabled&&b.update()},-1),z.useEffect(()=>(s&&b.connect(s===!0?M:s),b.connect(M),()=>void b.dispose()),[s,M,n,b,f]),z.useEffect(()=>{const C=R=>{f(),n&&x.regress(),o&&o(R)},P=R=>{a&&a(R)},B=R=>{l&&l(R)};return b.addEventListener("change",C),b.addEventListener("start",P),b.addEventListener("end",B),()=>{b.removeEventListener("start",P),b.removeEventListener("end",B),b.removeEventListener("change",C)}},[o,a,l,b,f,S]),z.useEffect(()=>{if(t){const C=g().controls;return A({controls:b}),()=>A({controls:C})}},[t,b]),z.createElement("primitive",Co({ref:h,object:b,enableDamping:r},c))});var Lk={exports:{}},xZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_Z=xZ,AZ=_Z;function Dk(){}function Nk(){}Nk.resetWarningCache=Dk;var SZ=function(){function t(i,r,s,o,a,l){if(l!==AZ){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Nk,resetWarningCache:Dk};return n.PropTypes=n,n};Lk.exports=SZ();var Fk=Lk.exports;const z1=Pk>=154?"opaque_fragment":"output_fragment";class wZ extends hp{constructor(e){super(e),this.onBeforeCompile=(n,i)=>{const{isWebGL2:r}=i.capabilities;n.fragmentShader=n.fragmentShader.replace(`#include <${z1}>`,`
3981        ${r?`#include <${z1}>`:`#extension GL_OES_standard_derivatives : enable
3982#include <${z1}>`}
3983      vec2 cxy = 2.0 * gl_PointCoord - 1.0;
3984      float r = dot(cxy, cxy);
3985      float delta = fwidth(r);     
3986      float mask = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r);
3987      gl_FragColor = vec4(gl_FragColor.rgb, mask * gl_FragColor.a );
3988      #include <tonemapping_fragment>
3989      #include <${Pk>=154?"colorspace_fragment":"encodings_fragment"}>
3990      `)}}}const MZ=z.forwardRef((t,e)=>{const[n]=z.useState(()=>new wZ(null));return z.createElement("primitive",Co({},t,{object:n,ref:e,attach:"material"}))});let il,yh;const EZ=z.createContext(null),SI=new at,wI=new k,CZ=z.forwardRef(({children:t,range:e,limit:n=1e3,...i},r)=>{const s=z.useRef(null);z.useImperativeHandle(r,()=>s.current,[]);const[o,a]=z.useState([]),[[l,c,h]]=z.useState(()=>[new Float32Array(n*3),Float32Array.from({length:n*3},()=>1),Float32Array.from({length:n},()=>1)]);z.useEffect(()=>{s.current.geometry.attributes.position.needsUpdate=!0}),lc(()=>{for(s.current.updateMatrix(),s.current.updateMatrixWorld(),SI.copy(s.current.matrixWorld).invert(),s.current.geometry.drawRange.count=Math.min(n,e!==void 0?e:n,o.length),il=0;il<o.length;il++)yh=o[il].current,yh.getWorldPosition(wI).applyMatrix4(SI),wI.toArray(l,il*3),s.current.geometry.attributes.position.needsUpdate=!0,yh.matrixWorldNeedsUpdate=!0,yh.color.toArray(c,il*3),s.current.geometry.attributes.color.needsUpdate=!0,h.set([yh.size],il),s.current.geometry.attributes.size.needsUpdate=!0});const f=z.useMemo(()=>({getParent:()=>s,subscribe:p=>(a(m=>[...m,p]),()=>a(m=>m.filter(v=>v.current!==p.current)))}),[]);return z.createElement("points",Co({userData:{instances:o},matrixAutoUpdate:!1,ref:s,raycast:()=>null},i),z.createElement("bufferGeometry",null,z.createElement("bufferAttribute",{attach:"attributes-position",count:l.length/3,array:l,itemSize:3,usage:Ll}),z.createElement("bufferAttribute",{attach:"attributes-color",count:c.length/3,array:c,itemSize:3,usage:Ll}),z.createElement("bufferAttribute",{attach:"attributes-size",count:h.length,array:h,itemSize:1,usage:Ll})),z.createElement(EZ.Provider,{value:f},t))}),TZ=z.forwardRef(({children:t,positions:e,colors:n,sizes:i,stride:r=3,...s},o)=>{const a=z.useRef(null);return z.useImperativeHandle(o,()=>a.current,[]),lc(()=>{const l=a.current.geometry.attributes;
3990l.position.needsUpdate=!0,n&&(l.color.needsUpdate=!0),i&&(l.size.needsUpdate=!0)}),z.createElement("points",Co({ref:a},s),z.createElement("bufferGeometry",null,z.createElement("bufferAttribute",{attach:"attributes-position",count:e.length/r,array:e,itemSize:r,usage:Ll}),n&&z.createElement("bufferAttribute",{attach:"attributes-color",count:n.length/r,array:n,itemSize:3,usage:Ll}),i&&z.createElement("bufferAttribute",{attach:"attributes-size",count:i.length/r,array:i,itemSize:1,usage:Ll})),t)}),bZ=z.forwardRef((t,e)=>t.positions instanceof Float32Array?z.createElement(TZ,Co({},t,{ref:e})):z.createElement(CZ,Co({},t,{ref:e})));function kk({all:t,scene:e,camera:n}){const i=cr(({gl:o})=>o),r=cr(({camera:o})=>o),s=cr(({scene:o})=>o);return z.useLayoutEffect(()=>{const o=[];t&&(e||s).traverse(c=>{c.visible===!1&&(o.push(c),c.visible=!0)}),i.compile(e||s,n||r);const a=new BM(128);new IM(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(c=>c.visible=!1)},[]),null}const RZ=()=>{const{progress:t}=UQ();return F.jsxs(OQ,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[F.jsx("span",{className:"canvas-loader"}),F.jsxs("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[t.toFixed(2),"%"]})]})},PZ=()=>{const t=Oy("./models/planet/scene.gltf");return F.jsx("primitive",{object:t.scene,scale:2.5,"position-y":0,"rotation-y":0})},IZ=()=>F.jsx(Ev,{shadows:!0,frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},camera:{fov:45,near:.1,far:200,position:[-4,3,6]},children:F.jsxs(z.Suspense,{fallback:F.jsx(RZ,{}),children:[F.jsx(yZ,{autoRotate:!0,enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),F.jsx(PZ,{}),F.jsx(kk,{all:!0})]})}),BZ=({starCount:t,...e})=>{const n=z.useRef(),i=tY(new Float32Array(t*3),{radius:1.2});return lc((r,s)=>{n.current&&(n.current.rotation.x-=s/10,n.current.rotation.y-=s/15)}),F.jsx("group",{rotation:[0,0,Math.PI/4],children:F.jsx(bZ,{ref:n,positions:i,stride:3,frustumCulled:!0,...e,children:F.jsx(MZ,{transparent:!0,color:"#f272c8",size:.002,sizeAttenuation:!0,depthWrite:!1})},t)})},md=()=>{const[t,e]=z.useState(3500);return z.useEffect(()=>{const n=()=>{const i=window.innerWidth;let r;i>=1200?r=4e3:i>=768?r=2e3:r=1500,e(r)};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),F.jsx("div",{className:"w-full h-auto fixed inset-0 z-[-1]",children:F.jsxs(Ev,{camera:{position:[0,0,1]},children:[F.jsx(z.Suspense,{fallback:null,children:F.jsx(BZ,{starCount:t})}),F.jsx(kk,{all:!0})]})})};var Ok={};function LZ(t){if(typeof window>"u")return;const e=document.createElement("style");return e.setAttribute("type","text/css"),e.innerHTML=t,document.head.appendChild(e),t}Object.defineProperty(Ok,"__esModule",{value:!0});var Mn=z;function DZ(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Ko=DZ(Mn);LZ(`.rfm-marquee-container {
3991  overflow-x: hidden;
3992  display: flex;
3993  flex-direction: row;
3994  position: relative;
3995  width: var(--width);
3996  transform: var(--transform);
3997}
3998.rfm-marquee-container:hover div {
3999  animation-play-state: var(--pause-on-hover);
4000}
4001.rfm-marquee-container:active div {
4002  animation-play-state: var(--pause-on-click);
4003}
4004
4005.rfm-overlay {
4006  position: absolute;
4007  width: 100%;
4008  height: 100%;
4009}
4010.rfm-overlay::before, .rfm-overlay::after {
4011  background: linear-gradient(to right, var(--gradient-color), rgba(255, 255, 255, 0));
4012  content: "";
4013  height: 100%;
4014  position: absolute;
4015  width: var(--gradient-width);
4016  z-index: 2;
4017  pointer-events: none;
4018  touch-action: none;
4019}
4020.rfm-overlay::after {
4021  right: 0;
4022  top: 0;
4023  transform: rotateZ(180deg);
4024}
4025.rfm-overlay::before {
4026  left: 0;
4027  top: 0;
4028}
4029
4030.rfm-marquee {
4031  flex: 0 0 auto;
4032  min-width: var(--min-width);
4033  z-index: 1;
4034  display: flex;
4035  flex-direction: row;
4036  align-items: center;
4037  animation: scroll var(--duration) linear var(--delay) var(--iteration-count);
4038  animation-play-state: var(--play);
4039  animation-delay: var(--delay);
4040  animation-direction: var(--direction);
4041}
4042@keyframes scroll {
4043  0% {
4044    transform: translateX(0%);
4045  }
4046  100% {
4047    transform: translateX(-100%);
4048  }
4049}
4050
4051.rfm-initial-child-container {
4052  flex: 0 0 auto;
4053  display: flex;
4054  min-width: auto;
4055  flex-direction: row;
4056  align-items: center;
4057}
4058
4059.rfm-child {
4060  transform: var(--transform);
4061}`);const NZ=Mn.forwardRef(function({style:e={},className:n="",autoFill:i=!1,play:r=!0,pauseOnHover:s=!1,pauseOnClick:o=!1,direction:a="left",speed:l=50,delay:c=0,loop:h=0,gradient:f=!1,gradientColor:p="white",gradientWidth:m=200,onFinish:v,onCycleComplete:S,onMount:A,children:g},x){const[_,M]=Mn.useState(0),[b,C]=Mn.useState(0),[P,B]=Mn.useState(1),[R,T]=Mn.useState(!1),L=Mn.useRef(null),W=x||L,Y=Mn.useRef(null),q=Mn.useCallback(()=>
4061{if(Y.current&&W.current){const $=W.current.getBoundingClientRect(),ue=Y.current.getBoundingClientRect();let Ae=$.width,te=ue.width;(a==="up"||a==="down")&&(Ae=$.height,te=ue.height),B(i&&Ae&&te&&te<Ae?Math.ceil(Ae/te):1),M(Ae),C(te)}},[i,W,a]);Mn.useEffect(()=>{if(R&&(q(),Y.current&&W.current)){const $=new ResizeObserver(()=>q());return $.observe(W.current),$.observe(Y.current),()=>{$&&$.disconnect()}}},[q,W,R]),Mn.useEffect(()=>{q()},[q,g]),Mn.useEffect(()=>{T(!0)},[]),Mn.useEffect(()=>{typeof A=="function"&&A()},[]);const j=Mn.useMemo(()=>i?b*P/l:b<_?_/l:b/l,[i,_,b,P,l]),Z=Mn.useMemo(()=>Object.assign(Object.assign({},e),{"--pause-on-hover":!r||s?"paused":"running","--pause-on-click":!r||s&&!o||o?"paused":"running","--width":a==="up"||a==="down"?"100vh":"100%","--transform":a==="up"?"rotate(-90deg)":a==="down"?"rotate(90deg)":"none"}),[e,r,s,o,a]),H=Mn.useMemo(()=>({"--gradient-color":p,"--gradient-width":typeof m=="number"?`${m}px`:m}),[p,m]),D=Mn.useMemo(()=>({"--play":r?"running":"paused","--direction":a==="left"?"normal":"reverse","--duration":`${j}s`,"--delay":`${c}s`,"--iteration-count":h?`${h}`:"infinite","--min-width":i?"auto":"100%"}),[r,a,j,c,h,i]),X=Mn.useMemo(()=>({"--transform":a==="up"?"rotate(90deg)":a==="down"?"rotate(-90deg)":"none"}),[a]),J=Mn.useCallback($=>[...Array(Number.isFinite($)&&$>=0?$:0)].map((ue,Ae)=>Ko.default.createElement(Mn.Fragment,{key:Ae},Mn.Children.map(g,te=>Ko.default.createElement("div",{style:X,className:"rfm-child"},te)))),[X,g]);return R?Ko.default.createElement("div",{ref:W,style:Z,className:"rfm-marquee-container "+n},f&&Ko.default.createElement("div",{style:H,className:"rfm-overlay"}),Ko.default.createElement("div",{className:"rfm-marquee",style:D,onAnimationIteration:S,onAnimationEnd:v},Ko.default.createElement("div",{className:"rfm-initial-child-container",ref:Y},Mn.Children.map(g,$=>Ko.default.createElement("div",{style:X,className:"rfm-child"},$))),J(P-1)),Ko.default.createElement("div",{className:"rfm-marquee",style:D},J(P))):null});Ok.default=NZ;const FZ=({org_story:t,onClickFunction:e})=>F.jsxs("div",{className:"expcard animated-expcard",children:[F.jsx("div",{className:"expcard-bg",children:F.jsx("p",{children:"ॐ भूर्भुवः स्वः, तत्सवितुर्वरेण्यं, भर्गो देवस्य धीमहि, धियो यो नः प्रचोदयात् ॥ ॐ त्र्य॑म्बकं यजामहे सु॒गन्धिं॑ पुष्टि॒वर्ध॑नम् । उ॒र्वा॒रु॒कमि॑व॒ बन्ध॑नान् मृ॒त्योर्मु॑क्षीय॒ माऽमृता॑॑त् ।। ॐ देवी शैल्पुत्र्यै स्वाहा ।। ॐ देवी ब्रह्म्चरिण्यै नमः ।। ॐ देवी चन्द्रघन्टायै नमः ।। ॐ देवी कूष्माण्डायै नमः ।। ॐ देवी कात्यायन्यै नमः ।। ॐ देवी कालरात्र्यै नमः ।। ॐ देवी महागौर्यै नमः ।। ॐ देवी सिद्धिदात्र्यै नमः ।। ॐ महादेव्यै च विद्महे विष्णु पत्न्यै च धीमहि, तन्नो लक्ष्मीः प्रचोदयात्।"})}),F.jsx("div",{className:"expcard-cta",onClick:()=>e(t),children:F.jsx("p",{children:"Tap to read"})}),F.jsxs("div",{className:"expcard-fg",children:[F.jsx("p",{className:"expcard-fg-title",children:t.role}),F.jsx("p",{className:"expcard-fg-desc",dangerouslySetInnerHTML:{__html:t==null?void 0:t.title}}),F.jsxs("div",{className:"expcard-logo",children:[F.jsx("img",{src:`/images/exp_logos/${t.logo_name}`,alt:`${t.orgname}`}),F.jsx("p",{children:t.orgname})]})]})]}),kZ="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='32'%20cy='32'%20r='32'%20fill='white'%20/%3e%3cpath%20d='M33.1313%2050H45.3221V36.9004H33.1313V50Z'%20fill='black'%20/%3e%3cpath%20d='M51.2768%2032.137C53.7819%2032.137%2055.8129%2029.9376%2055.8129%2027.2246C55.8129%2024.5116%2053.7819%2022.3123%2051.2768%2022.3123C48.7714%2022.3123%2046.7406%2024.5116%2046.7406%2027.2246C46.7406%2029.9376%2048.7714%2032.137%2051.2768%2032.137Z'%20fill='black'%20/%3e%3cpath%20d='M49.7159%2025.7356H24.0583V28.5639H49.7159V25.7356Z'%20fill='black'%20/%3e%3cpath%20d='M10%2018V36.3097H27.4358V18H10Z'%20fill='black'%20/%3e%3c/svg%3e",OZ="/assets/qbraid-BohKQElz.png",UZ="/assets/pyqasm_full-s9owG-qc.svg",zZ="/assets/quantify-BeCEb0mh.svg",HZ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAED0lEQVR4nOzdPW4TWxjH4bmOjS2bCBaAFFo2gERJjUSB2AY1G0CsgY4NwDZYAj01DXRQQK4swozzcT8y8/6Zif08cmEnjH0CP2YmyZnj+elpA+VmYw+A/SQsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWETMB27/8WPz6lWfDV+/bu7fH/jiQb2/rv3z7Fnz/Pm1txoa1qdPzfv3fTZ8+XLgK2d9/tzz69o/Dx702cqhkAhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJi6HwsepjNmuPj7uF63dy6dXZ/uWxWq+5Td+929zebZv77n2u1OvfHruX27e55/o+HD/u8irAqPX7cvHnTPdzNYkgKN5GwKt27N+n51n+Sc6xKu7uoAyesSsvl2COYDGFVOqizqH8nrEoOhS1hVVqvxx7BZAir0u5Ppw6csCo5x2oJq9LR0dgjmAxhVfrxY+wRTMbQsH7+LBoI+2VoWN++FQ2E/eJQSISwiBBWpS9fxh7BZAiLCPOxKn34cMUH/3PG5oUJpVeaz7fPc8Fi0Ww23cM7d87uTGFSobAqvX27vU3K7lzn3d+Rr9fbLi9//HKdT59ub9clrD33/fv29svXr32e4eSkT1jOsYgQFhHCIkJYRAiLCGERISwihEWEsIgQFhHCIkJYRAiLCGERISwizMeqNJudzY+b/f4Pu1p1l0f/+mxrdwWRxaJbhvTo6Nw6W8tlNwF1sehm5+0qWYxkdzLqrkeP+jybsCo9edK8ezf2IKbBobCS9bFawiJCWJVGvzZmOoRVyYp+LWFVsqJfS1hECKuS7wpbQ8NyVsGV7LEqtdenI6xK13q7tv0mrEqXF4Q5WMKqZDnulrAq2WO1hFXJr3RawqokrJawKv3TXLkDJKxKftzQGu1vot+b7nNT2GNVunJC+mESViXnWC1hESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRVyXWFLWERISwihEXE0Il+JyfNixdFY7lpNptuyujxsWu/zvnr9HTsIbCPHAqJEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIiwhhESEsIoRFhLCIEBYRwiJCWEQIi4i/AwAA//88YjUSLz7C9wAAAABJRU5ErkJggg==",GZ="/assets/clifft-RtRAmUPN.png",VZ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAA3CAYAAABKB8k/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8
4061L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAMNklEQVRoBe1ZeYxdVRn/zrnLW2btzHRKLS1qAg3BViNJ0biEGoIEISVgTYgJgprwj4k2hj80knlVIaKJxn80RiEmLgGMRKSJ/whFdkwUaG1TSklLp6XbLG9m3nL34+933ruz9E1Fpq9xSb/Mfefec8/5zu9bz3fuiFykixq4qIH/aQ2os9GfemLwlqKe+2nRTy9xS57ROlXSu05k/X0iA7dhuIfL4MJUhftkRqT+OzET35No6ojMnTQS1DLRTnsYGksYbjKR8qAjvaPgMrxZZOhb6LhBxCnjZdQaZwipITL1kMj4N0TCTJIkMyZMVRh7++ph/5cuuWXy5dZgTM1v8rZ3Y3Dww4OFCZOmNzeaqfI8TzlpXSR9UaT/ejF6BNATLNjEFYtx+kWpkqj4gLjqgJR6HUmDTOIA8i1SD8H3DUEH6z1xSny4WaT3djEu+GVVy4sYDLir4CWRo1+BHErCIJDZqUyFTV2frRfvunT7zDM5VrZ68QPvKxXJ3JJ6SpT7ZhKJmp6MTJr1Q8vTIrWnsAK0Yy0QQ6jjIhkE8TZAkx9DryfKcWRgRAkaO4o8DQzm+8A7rCGUI0atEiltBfg1mA8LpicwKm3xpTCzfxQJ6hLHWqYmjFGYXyw6LxSK6jXgW4J5yQMXowrc2K1rR+0vYdEA+GozMwKLgPHDopKjWBT3GayAxVR2DFMw0NssyodvKC3aVeIXwAqKtizR+kVoS9PtsIA/gvEb7TuVkl8NFxQCvrSkzP4J6zkyW52TBN2+B5unev+xM/01GWvxzH87BDA7RZ1qeHGa6Sm6uaPhLI1Y0gj+HmCxcD+QhZiPy8BPkpPABP914B8ufFkDLXxHu3jNUCGRD57ZigYijlODmAdrJqfQ2eJnyC94VSSakCTUUF5GSxqaMkpMde6KK6KxnRi+iDoE4PuegWKSZnR8EKyeQtlRiIUTdIV/B7+5FngumE5Ac3ADISgICdQWJ37YWgIAGAbEHliP0ilYLZvCI64MfKgUA/cJnsc6swAftiyIkKAejMmCMz95OlcJmVnqEIAmevvttViwgPTThoBpcYiFU2gspgVgcoFA1DzBG8QHERqqve037QXyZl4Y+xrCktIzGD+LG/Cy/MArfh39SALtpMRhNrClkG6/qtIhAA3bQcP+pkzLm+n8aKyexHjKeHMELRbVveDMbARhCESvbQmRASEnEvE86vYS7LcCDOAGwZVN4mKLbMbMluI5acL/PaTOpGU1okdqdd1CsrPNZnHTYYExvE3W/NIkSQMWaLkDJzCGJUNqSaGaBBq3mmYww/wMQqZVgl+aJDh1gSgAKcN8+r0NXqqaQiOAKUDWsGzsenjTmoJ9xdSTSqWSc8CbFnUIwO6Z8aszyA1kVoV2koFvW3wA3Mrb1
4061D4EsBsQYkPRpTCZl9UyObUpt0T+3roLfR6CKwoA8NhTWvHQ9v32WE5FIpVEORhoZGzMrpBzXkZdsNOuE39LETl18gApbkjMKDarpAxcBB6B04UoZ8ogRkve3Enbi6NjgWwff0CWEeKJrshEYDdG8mFCCKAoagBjwQp/uLPao7QLLoF+UqcFICEshRLCrWb0eTsLv1yUbmQFgKltKqXW6ToMZADIQTJv2KmcfhZxDIm+n1IAWoLWpACIJfA3iD4rI4ZpINRKRdpxsCgon28flhPAvlAmUXIMt5HT0oKhUlL7Q80hdxO41Rx9makQbmQLIFoFdNZCts/WFogjvQ7jWT7wghIsH8xPT+JKrKvSZbG0wT5EVo16A5sDCCyWcO6wQD4gCeKTkH6WJUHLjogBSGWDN0EJIfR78qJk2BcYmM6a1lgLFK86iNrAFu1cgjnQNoN4voQAj4SWVe118IrDgdB1ZCJUmpHfQR0C5CO8kkcBTlADpAxY0wg/FCJC7WIXw8ZFojUSWEEPtwBiyBIXopy2j8wwR5fAjHEE6xGhQjZPwDN62/JPIiiF42EEekCSquODpb7T6Omgcwow0r/ldDNWB6wywYhtTMb0kHgc15H24gDEgE6hIHcVwGGHJSACWEx8Zi1EjTgUgHED9+GOTIePD+GiAPhLKHGLsJlmcahfXb3tDM3VQcsKgOlKbX06MZn/iKP1JAOJFIZG0hggErhjtAcLU4N9AAN3SqAg1jhF+LdCtDMecs1zsoagCuh6UMRpvEjoQpiv+9EiFlhjIbAj6CLCOnRluA5NcMTvKf8ad+2wILMFWlYAQLSDR8vrdhlxHi4VlIHyUmyO0gRWa4XwYMsK7mpoFH4dwwWYVfo2o3wkeKq8TdaMsF4BQpSvxFgogC6Ds4ToASB+Hdeb6Ee0zkFJGAoyvWUVpJn/4MBndrzCmKZQbY7zzbIC5G/VjYfCam3tvXHi7yoXUemDQa2ambhOK8CNmi8DNCxb+ADAoF5mtarR9kHLtEKepQ0EcoCq70OAhX6O80YwD8LQcuFfbRvMKgpgXKAa6FFplBR/sSoKHlCqki0HnjjPKQAnmIroyz5/dDqsjdyVGv/BnrI0ijizzCDbBdMI63gPzo/PAxRcoQRwzEgBgtNbZQtTHN8gCLpZdni4d+FuIVzHgd8XITQ3rvBZTD9gGhPKzOJVuQCn7FFTaVZ44MevXLNDtiN/QPsEuxyd80U+eMF0Rk0+pj6Ng8qXw0BuLfkQsWyQeHqMN7DOOH2f1OIjiOv7oJaq1A6+KNUjuIV3Zchewxt7pbThaggDl+nZBOsdhvGeT6PqaZ1NBYq1XTM0UcGX3wSB+9Do55LncuDn0j4xvqMAHLQghMixx2S4V8tW15XbglB93CuYS30klUCNwJ0/Ap1PK2XGJZw4Js1JqM7BrgoDlEeL4g+uRWi8Dz6OztkXVQG1UNTEcSOSt4ol82S9IX/AkeLZ1dt44Fi6Lp+Xo39LgHziYkHME1Ju9soQDo/XekV9E+rvT6VxtjpI10ItnsTVQxLVkASRcTBPCv0aHnQ5Dmw1KbinxS04b2WxftIk4RPTzfSFNb7Mqq22oGKkQumdAZvjWNy+KwHyiWebtgJPGpvedJVUT31HyhtuQsrUtYMvSfUw8LddaGhjQcrvvQbBOtOU2uRvZfXQfWpgzxH4gM0sZ/PM13qn9pxB/K8m0id5cVHzqDg8p6qhvXuldt1dWbKeOTvD+RxvqR/iw8HWbuM6zqL3/0C+OX63GtxzmOdvJgqulfPk/X+Ecg0aU12Vnd72Ru05bcZ/VciOPypo/Sx8VRszfftfUOn6FC0ff75gV2SB5RalBtmv1EBVuf64LiKy0xTbGT5rpLFRRRRwXumNSkWxorIaX47Pu+3rmgBLFnZKDdEAbLfsthsp7NjKQS1uaUWx1567pOmqAAtu4eCMWGqZBMtZ67CMxiez1uqVJSDO56GrAswDUSgnmH5INpDRssTI/K5p3vIm2/ymG20rDnjKYd2AciEn6/Qo5DS+EXaZuirAvAtp7LT4iLuE+NVOuzbQl/Sf50NXBZjHYlSi8vPAfCeVr1GQd5cujACaZSnPBAtgFWsKW1Qs9HXj7sIIkHo+qgsE8AJEY3i69eBH3aWuCpBvZkiX2G1xcLAC2GKO4JGFXJuadkqla1J0VYAFVDgAQwASorltCAYxT/ygnfa3Kz8XSAB+AjzLW/j1oR0VY2PIV12iCyGAMhnOKvZ/BYRs/Qiti7Nh1t7duoQebLouQO3w99eggFufRqinWcm1/vBxBx+842Tj7spuF58X/rsswA0MF8Aa7es/b5eSP5pGPr8kgFgD4SN6s2DgVVdee+eO6zmuYiqorxfnqZVZBZ/Qzo8IHECR9/lxQX3W87fskHRDKY32tuChqOO/kbIYrbqsX7yJb8f7VQ1FxTMVTsKo+ey1AihtB13BTLs4DmZwh2jfVVu84Z67TeHyO1TvrW4yE5gzu+9RGf6Tw4rCxIl4fZfK8LU/xOejhpj64zXT3Pfz+hnnZ/0f3PM6jnaWz0pQrDgGWkfBnSo6dMMX3LWXPSJDd35RDX7dxXdeM/Pad1WGD7VK4yMWPhcq/N84mjssc//4Ef4VMGzUwD29euiOr/W8Z/j3weEbbyBw/FNiRVhWZIFcY2bq3k+IOrhLitv6xd2ShSee1LN775do+jiyKEMCHzrnqYT/YzelNHq59G66XwrDmzNJd2upPX00zD56XXH0q2/kfOenXLy5qIGLGvj/18A/AV0vltlox2NWAAAAAElFTkSuQmCC",jZ=[{id:7,orgname:"Goodspace AI",logo_name:"goodspace.png",role:"Software Development Engineer",title:"I am a core full-stack engineer building 12+ AI-powered products end-to-end across our web, AI and B2B sales platforms.",story:`
4062        <h2><strong>Work:</strong> Core Tech Team</h2>
4063        <p>
4064          Core full-stack engineer shipping across the entire platform - the customer-facing Webapp (Next.js 16 + Vite monorepo, React 19, TypeScript), the Node.js + Express backend (MySQL + MongoDB + PostgreSQL/pgvector + OpenSearch + Redis), a real-time AI engine (Socket.io + Gemini), the internal Admin/CRM, and <strong>boss</strong>, our autonomous B2B sales platform (Go + Python + Next.js). ~2,200 commits across 6 repos: 12+ sub-products end-to-end, AI/LLM infra, payments, multi-tenant systems, performance and security.
4065        </p>
4066
4067        <h2 className="underline">🧑‍💼 Hirer Products</h2>
4068        <ul>
4069          <li><strong>Multi-Team Org System &amp; RBAC</strong>: Orgs → teams → members hierarchy with role-based access, invite/join-approval workflows, admin-gated actions, and a public career-page feed serving each company's live jobs.</li>
4070          <li><strong>Razorpay Payments &amp; Subscriptions</strong>: 14+ payment flows (add-ons, job boost, assisted hiring, GCoins, hosted payment links) plus recurring subscription autopay with webhook-primary activation, HMAC-SHA256 signature verification and idempotent grants.</li>
4071          <li><strong>AI Interviewer</strong>: Real-time voice interviewer on Gemini 2.5 Flash native audio over Socket.io - bidirectional PCM streaming, session resumption (handle + <code>goAway</code>), context-window compression and tool-calling that drives the screening-question flow.</li>
4072          <li><strong>OAuth System</strong>: Google OAuth 2.0 server-side flow for both hirer and job-seeker, CSRF state validation, JWT + HTTP-only cookies and multi-user-type routing (with header-token fallback for native apps).</li>
4073          <li><strong>Hirer Onboarding</strong>: Multi-step AI-assisted onboarding (company details → candidate preferences → first job post → plan), with LLM-generated company bios and a websocket-driven onboarding chat.</li>
4074        </ul>
4075
4076        <h2 className="underline">🎯 Job Seeker Products</h2>
4077        <ul>
4078          <li><strong>
4078AI Resume Scanner (ATS)</strong>: 11-section ATS analysis on Gemini 2.5 Flash with constrained JSON decoding, prompt-injection sanitization and 32k-token output; free scan + paid in-depth report.</li>
4079          <li><strong>AI Resume Builder</strong>: Section-based builder with 5 templates, live preview and LLM-rewritten summaries/bullets, exported to PDF via a concurrency-capped, self-recycling Puppeteer service.</li>
4080          <li><strong>AI Cover Letter Generator</strong>: Generates tailored cover letters from a parsed resume + job description, with AI section improvements and templated PDF export.</li>
4081          <li><strong>AI Mock Interviewer</strong>: Practice interviews on the same Gemini native-audio engine with rate-limited sockets, per-competency scored feedback and a GCS-stored completion certificate.</li>
4082          <li><strong>AI Career Counsellor</strong>: Voice career-guidance flow (CV → AI conversation → career roadmap + job suggestions) using Azure Speech TTS and realtime continuous transcription.</li>
4083          <li><strong>Lumi - AI Chatbot</strong>: Assistant on Gemini 3 Flash with tool-calling (<code>search_jobs</code>, <code>analyze_resume</code>, mock questions), a rolling-summary context-compression pattern (~85% token cut) and an isolated socket that survives remounts for session continuity.</li>
4084          <li><strong>AI Headshot Generator</strong>: Professional headshots generated from a resume upload, reusing the resume-parser pipeline (with phone auto-fill), credit/subscription gated.</li>
4085          <li><strong>Refer &amp; Earn</strong>: Shareable per-job referral links with full funnel tracking (joined → applied → shortlisted → hired), a rewards wallet, withdrawals and opaque tokens preventing ID enumeration.</li>
4086          <li><strong>Subscription Model</strong>: PRO / GOLD recurring plans on Razorpay <code>subscription_id</code>, per-product credit allocation, PRO→GOLD upgrade modelled as a subscription change, and cancel/renewal handling.</li>
4087        </ul>
4088
4089        <h2 className="underline">🛠️ Goodspace Admin (Internal CRM / Ops)</h2>
4090        <ul>
4091          <li><strong>HIRE360 Mandate Management</strong>: Full job-mandate lifecycle with a closed interview sub-stage taxonomy tracking candidates from screening to final round.</li>
4092          <li><strong>Sales Pipeline &amp; Revenue Dashboard</strong>: Opportunity pipeline, stage breakdown, revenue analytics, call logs and commission/incentive (platform &amp; success fee) tracking.</li>
4093          <li><strong>CSM Dashboard</strong>: Interview boards with candidate progression, mandate-issue flags and interview scheduling via the Skribby transcription bot.</li>
4094          <li><strong>Payments &amp; Invoicing</strong>: Payment-link creation + history, proforma invoices with IGST/CGST tax computation, and manual gateway reconciliation.</li>
4095          <li><strong>GOODex Candidate Search</strong>: Service-to-service proxy to a vector candidate DB for similarity search, plus S3 hirer creation from leads - secured with <code>X-On-Behalf-Of-User-Id</code> + service auth token so credentials never reach the browser.</li>
4096          <li><strong>Job Candidates &amp; Direct Apply</strong>: Apply on behalf of seekers, masked-resume generation (PII redaction) and application status tracking.</li>
4097          <li><strong>KPI Analytics &amp; Interview Monitoring</strong>: Revenue/talent-insight dashboards (Sankey flows, Goodness Score) and stuck-interview detection with bottleneck analysis - powered by AWS Bedrock Nova (multi-region failover) for OCR/extraction and observed via SignOz.</li>
4098        </ul>
4099
4100        <h2 className="underline">📈 boss - Autonomous B2B Sales Platform</h2>
4101        <p>Go 1.24 backend + Python (FastAPI + LangGraph) agent service + Next.js 15 frontend on MongoDB + Redis/Asynq - an end-to-end lead-gen and outreach engine.</p>
4102        <ul>
4103          <li><strong>Apollo Two-Pass Ingestion</strong>: Score-first / spend-second pipeline: cheap ICP enrichment + scoring gate before paid phone reveal; per-company dedup, multi-geo, per-org thresholds and per-org cost/ROI accounting to stop wasted credits.</li>
4104          <li><strong>Python AI Agent Service</strong>: 8 LangGraph agents (ICP scorer, initial outreach, follow-up, inbound-reply, voice, research, summarization, monitoring) behind an LLM factory over Bedrock Nova / Gemini / Azure with cross-region failover.</li>
4105          <li><strong>Multi-Channel Outreach</strong>: Email (Resend + SES, Message-ID stamping that survives SES rewrite, DB-backed sender-inbox pool, RFC 8058 unsubscribe), Gmail inbound via domain-wide delegation, WhatsApp (Gallabox) and Voice (ElevenLabs Convai + Deepgram fallback).</li>
4106          <li><strong>Cadence &amp; ++Looping Handoff</strong>: 8-touch day-structured LLM follow-ups with a backend-owned loop-in state machine that hands stalled leads to salespeople and blocks agent replies post-handoff.</li>
4107          <li><strong>Inbound-Reply Intelligence</strong>: Thread-level sentiment from intent, RFC 3834 autoresponder suppression, negative-close gating and a self-outreach guard against extracting fields from our own mail.</li>
4108          <li><strong>Meeting Scheduling &amp; Multi-Tenancy</strong>: Books Google Meet demos inside the reply loop with a round-robin salesperson pool; <code>org_id</code> tenant injection at every boundary, compound sparse indexes (COLLSCAN → IXSCAN) and index-builds moved off the startup critical path.</li>
4109        </ul>
4110
4111        <h2 className="underline">⚙️ Cross-Cutting Engineering</h2>
4112        <ul>
4113          <li><strong>Platform migration</strong>: React/JS → Next.js + TypeScript monorepo (<code>apps/vite</code> + <code>apps/next</code> + <code>packages/shared</code>); ~25 pages to App Router (SSG/SSR/ISR) with nginx proxy + blue/green deploys; dozens of pages into Lighthouse green-zone.</li>
4114          <li><strong>
4114LLM infrastructure</strong>: Led migration from Azure OpenAI → Google Gemini behind a centralized <code>llmService.js</code> (constrained decoding, tiered models, 30s cooldown rate-limiting, OpenTelemetry spans); AI Mock Interview stabilized to V5 (Gemini Live resumption, LiveKit removal).</li>
4115          <li><strong>Performance</strong>: Killed N+1 queries (JOINs + <code>Promise.all</code>), took the admin dashboard API from O(4N+1) to O(1) (10s → 800ms), tuned React Query caching, and added cursor-based pagination; raised AHREFS SEO health 55% via a single canonical URL builder + JSON-LD.</li>
4116          <li><strong>Security</strong>: Parameterized SQL, WebSocket rate-limiting for DoS, DOMPurify before <code>dangerouslySetInnerHTML</code>, PII log stripping, OAuth <code>?token=</code> leak prevention and non-root containers; SignOz-driven production bug-fix sprints across Redis lock races, KNN timeouts and resume extraction.</li>
4117        </ul>
4118      `},{id:6,orgname:"",logo_name:"gsoc_asyncapi.png",role:"Open Source Contributor & GSoC Mentor",title:"I contribute to the AsyncAPI Initiative: as a maintainer and TSC member, a Google Summer of Code 2024 mentee, and a GSoC 2025 mentor.",story:`
4119        <p>
4120          AsyncAPI is an open-source initiative improving the state of Event-Driven Architecture (EDA), a suite of tools for documentation, code and model generation, and event management. I've contributed <a href="https://github.com/search?q=is%3Apr+author%3Aashmitjsg+org%3Aasyncapi+&type=pullrequests" target="_blank">38+ merged pull requests</a> across the Initiative (Website, Modelina and more), growing from contributor to maintainer, TSC member, GSoC mentee and now mentor. <a href="https://engineeringwithashmit.hashnode.dev/series/gsoc24" target="_blank">Read my full GSoC journey →</a>
4121        </p>
4122
4123        <h2 className="underline">🌱 Open Source Contributions (pre-GSoC)</h2>
4124        <p>
4125          Eight months of contribution before being selected for GSoC earned me maintainer and Technical Steering Committee (TSC) roles. Highlights:
4126        </p>
4127        <ul>
4128          <li>Redesigned and rebuilt the <strong>Modelina Playground</strong>, and migrated the <strong>Modelina website</strong> from class-based to functional React components.</li>
4129          <li>Helped migrate the <strong>AsyncAPI Website</strong> codebase from JavaScript to <strong>TypeScript + Next.js</strong>.</li>
4130          <li>Became a maintainer of the Modelina Website and a <strong>TSC member</strong>, all before formal GSoC selection.</li>
4131        </ul>
4132
4133        <h2 className="underline">🚀 GSoC 2024 - Mentee · AsyncAPI Website UI Kit</h2>
4134        <p>
4135          <a href="https://summerofcode.withgoogle.com/archive/2024/projects/S49Gon9W" target="_blank">Project</a>: built a comprehensive, documented <strong>UI Kit</strong> as the single source of truth for the website's components, killing visual inconsistency and duplicate styling across a non-modular codebase.
4136        </p>
4137        <ul>
4138          <li>Set up <strong>Storybook v8</strong> with auto-generated docs and integrated <strong>Chromatic</strong> visual testing via GitHub Actions CI on every push, co-locating stories with components. (<a href="https://engineeringwithashmit.hashnode.dev/integrating-storybook-and-chromatic-to-asyncapi-website" target="_blank">write-up</a>)</li>
4139          <li>Built reusable React + TypeScript + Tailwind components on Atomic Design principles: typography, icons, logos, colors, buttons, tags, avatars, toggles, checkboxes, inputs, accordions, blog cards and loaders. (<a href="https://engineeringwithashmit.hashnode.dev/asyncapi-website-ui-kit-development" target="_blank">project deep-dive</a>)</li>
4140          <li>Shipped <strong>12 merged PRs</strong> over the summer with full component docs and accessibility + visual testing. (<a href="https://engineeringwithashmit.hashnode.dev/wrapping-up-gsoc-2024" target="_blank">wrap-up</a>)</li>
4141        </ul>
4142
4143        <h2 className="underline">🔧 Beyond GSoC: Ongoing Contributions</h2>
4144        <p>
4145          Outside the GSoC scope, I've kept shipping across the Initiative before, during and after the program:
4146        </p>
4147        <ul>
4148          <li>Created the initial <strong>Modelina CLI</strong> for the model-codegen tool, and refactored <strong>spec-json-schemas</strong> to enable schema reuse across spec versions.</li>
4149          <li>Drove a large batch of the <strong>AsyncAPI Website JavaScript → TypeScript migration</strong> (docs, tools, community, editor and sponsor components).</li>
4150          <li>Appointed an AsyncAPI Website <strong>code triager</strong> after GSoC 2024.</li>
4151          <li>Built <strong>i18n support for smaller screens</strong> (2025) and a <strong>featured-blog label with Slack-channel integration</strong> (2025) on the website.</li>
4152        </ul>
4153
4154        <h2 className="underline">🧑‍🏫 GSoC 2025 - Mentor · Website Redesign & Redevelopment</h2>
4155        <p>
4156          Mentored on the <a href="https://summerofcode.withgoogle.com/archive/2025/projects/dVEjdU4X" target="_blank">Redesign and Redevelopment of the AsyncAPI Initiative website</a>
4156, guiding a GSoC contributor through architecture, design-system adoption and review, paying forward the mentorship I received a year earlier.
4157        </p>
4158      `},{id:9,orgname:"log0",logo_name:"log0.svg",role:"Side Project",title:"log0 is my long-term side project: an open-source platform that turns tens of thousands of noisy logs into a few actionable, owned incidents.",story:`
4159        <h2><strong>log0</strong>: From 10,000 logs to one incident.</h2>
4160        <p>
4161          log0 is an open-source, multi-tenant log-intelligence and incident platform I design and build solo. It ingests logs from distributed services, deterministically fingerprints and clusters errors so thousands of duplicates collapse into a single incident, generates an AI root-cause summary, and routes ownership to Slack with assign/ack/resolve actions, killing alert fatigue and unclear ownership in microservice teams. <a href="https://log0.vercel.app/" target="_blank">Site</a> · <a href="https://log0.vercel.app/docs" target="_blank">Docs</a>.
4162        </p>
4163        <ul>
4164          <li>
4165            <strong>Backend Services</strong>: an event-driven backbone of 7 <strong>Java 25 + Spring Boot 4</strong> microservices (ingestion-gateway, normalization, clustering, incident, auth, ai, notification) wired over <strong>Apache Kafka</strong>. Async ingestion returns <code>202</code>; SHA-256 fingerprinting drives clustering; an incident state machine (NEW → ASSIGNED → ACKED → RESOLVED) runs on <strong>PostgreSQL</strong>, while high-volume logs land in <strong>ClickHouse</strong>. Multi-tenant + API-key auth at every boundary.
4166          </li>
4167          <li>
4168            <strong>Console</strong>: a <strong>Next.js 16</strong> (App Router, React 19) operator dashboard for incidents, logs, API keys, users and workspace settings, with React Query live updates, Zustand state, Recharts analytics, shadcn/Radix UI and JWT cookie auth.
4169          </li>
4170          <li>
4171            <strong>Docs Site</strong>: a <strong>Fumadocs</strong> (MDX) documentation portal covering architecture, LLD/UML and async API contracts, with Mermaid diagrams, Flexsearch and an "Ask AI" assistant (AI SDK + OpenRouter).
4172          </li>
4173          <li>
4174            <strong>Marketing Website</strong>: a Next.js landing page (problem → solution → features) sharing the docs codebase, deployed on Vercel.
4175          </li>
4176          <li>
4177            <strong>charfield</strong>: while building the site I wrote <strong>44 procedural ASCII canvas field animations</strong> (galaxy, black hole, entanglement, Lorenz, Ising, and more). Needing them across repos, I extracted them into <a href="https://www.npmjs.com/package/charfield" target="_blank">charfield</a>, an npm package with a shadcn-style copy-in CLI (<code>npx charfield add &lt;name&gt;</code>) so the React + Canvas2D + TypeScript source lands in your project with zero runtime dependency. Built with tsup; interactive <a href="https://charfield.vercel.app/" target="_blank">playground</a>.
4178          </li>
4179        </ul>
4180      `},{id:8,orgname:"Quantum Open Source",logo_name:"open_source/qiskit.png",role:"Open Source Developer",title:"I build and contribute to open-source quantum computing: simulators, SDKs, and games that teach quantum concepts by playing.",story:`
4181        <p>
4182          Beyond company work, I contribute to the open-source quantum ecosystem, from low-level C++ simulators and Python SDKs to a game engine that puts real quantum circuits inside playable games. I've landed merged PRs into <strong>qBraid</strong> and <strong>QuEST</strong>, with further contributions across <strong>Unitary Foundation</strong> and <strong>Quantify</strong>.
4183        </p>
4184
4185        <h2 className="underline">⚛️ Quantum SDKs &amp; Simulators</h2>
4186        <ul>
4187          <li>
4188            <strong><a href="https://github.com/qBraid/qBraid" target="_blank">qBraid</a></strong> (platform-agnostic quantum runtime): added <a href="https://github.com/qBraid/qBraid/pull/1208" target="_blank">PyTKET interop</a> (Cirq ↔ PyTKET, PyTKET → PyQIR) and an <a href="https://github.com/qBraid/qBraid/pull/1203" target="_blank">OpenQASM 3 → pyQuil converter</a>.
4189          </li>
4190          <li>
4191            <strong><a href="https://github.com/qBraid/pyqasm" target="_blank">pyQasm</a></strong> (OpenQASM 3 semantic analyzer): <a href="https://github.com/qBraid/pyqasm/pull/106" target="_blank">refactored the gate-map core</a> and <a href="https://github.com/qBraid/pyqasm/pull/317" target="_blank">fixed a <code>dt</code> duration-unit mapping bug</a>.
4192          </li>
4193          <li>
4194            <strong><a href="https://github.com/QuEST-Kit/QuEST" target="_blank">QuEST</a></strong> (multithreaded, distributed, GPU-accelerated C++ simulator): added <a href="https://github.com/QuEST-Kit/QuEST/pull/780" target="_blank">Qureg checkpointing via ADIOS2</a>.
4195          </li>
4196          <li>
4197            <strong><a href="https://github.com/unitaryfoundation/clifft" target="_blank">Clifft</a></strong> (fast exact near-Clifford simulation, C++): proposed a <a href="https://github.com/unitaryfoundation/clifft/pull/120" target="_blank">
4197minimal Qiskit backend provider</a> and <a href="https://github.com/unitaryfoundation/clifft-qiskit" target="_blank">release automation for Clifft-Qiskit</a>.
4198          </li>
4199          <li>
4200            <strong><a href="https://gitlab.com/quantify-os/quantify" target="_blank">Quantify</a></strong> (open-source quantum measurement &amp; control framework): fixed <a href="https://gitlab.com/quantify-os/quantify/-/merge_requests/199" target="_blank">MeasurementControl</a> to preserve the declared acquisition-channel order in its output.
4201          </li>
4202        </ul>
4203
4204        <h2 className="underline">🎮 Quantum Game Engine &amp; Games</h2>
4205        <ul>
4206          <li>
4207            Built <strong><a href="https://github.com/ashmitjsg/Quantum-Circuit-Game-Engine" target="_blank">QCGE</a></strong> (<a href="https://qcge.vercel.app/" target="_blank">Quantum Circuit Game Engine</a>), an MIT-licensed Python library that drops real quantum circuits into Pygame via a self-simulating <code>QuantumCircuitGrid</code>. Pluggable backends, real Qiskit on de
4207sktop and a pure-Python statevector simulator that runs in the browser via WebAssembly (pygbag). Published on <a href="https://pypi.org/project/qcge/" target="_blank">PyPI</a>.
4208          </li>
4209          <li>
4210            <strong><a href="https://ashmitjsg.itch.io/quantavania" target="_blank">QuantaVania</a></strong>: a 2D action-adventure platformer where the quantum circuit <em>is</em> your weapon, teaching superposition, entanglement, measurement and QUBO/TSP annealing through combat (damage requires measuring states orthogonal to the enemy's). Includes a level editor. Won the Special Prize at the Quantum Games Hackathon 2023. (<a href="https://github.com/ashmitjsg/QuantaVania" target="_blank">repo</a>)
4211          </li>
4212          <li>
4213            <strong><a href="https://ashmitjsg.itch.io/quantum-breakout" target="_blank">Quantum Breakout</a></strong>: a quantum take on Atari Breakout where you program a 3-qubit circuit to position the paddle as a superposition that collapses on measurement, across 5 levels (X gate, Hadamard, measurement, phase/interference, entanglement). (<a href="https://github.com/ashmitjsg/Quantum-Breakout" target="_blank">repo</a>)
4214          </li>
4215          <li>
4216            Contributed <strong>Quantum Breakout</strong> to <a href="https://github.com/Quantum-Universal-Education/Quantum-Universal-Education.github.io/pull/61" target="_blank">Quantum Universal Education</a> as an open educational game (<a href="https://github.com/Quantum-Universal-Education/Quantum-Universal-Education.github.io/issues/54" target="_blank">
4216closes #54</a>).
4217          </li>
4218        </ul>
4219
4220        <div style="display:flex;flex-wrap:wrap;gap:24px;align-items:center;justify-content:center;margin-top:28px;">
4221          <img src="${OZ}" alt="qBraid" style="height:34px;width:auto;padding:0;" />
4222          <img src="${UZ}" alt="pyQasm" style="height:34px;width:auto;padding:0;" />
4223          <img src="${VZ}" alt="QuEST" style="height:34px;width:auto;padding:0;" />
4224          <img src="${GZ}" alt="Clifft" style="height:34px;width:auto;padding:0;" />
4225          <img src="${HZ}" alt="Unitary Foundation" style="height:34px;width:auto;padding:0;" />
4226          <img src="${zZ}" alt="Quantify" style="height:34px;width:auto;padding:0;" />
4227          <img src="${kZ}" alt="QCGE" style="height:34px;width:auto;padding:0;" />
4228        </div>
4229      `},{id:5,orgname:"Creed & Bear",logo_name:"creedandbear.png",role:"Quantum Computing Intern",title:`
4230      <ul>
4231        <li>✨ Optimising Power Distribution Network at the TCS Quantum Challenge 2023</li>
4232        <li>✨ Quantum Blockchain</li>
4233      </ul>
4234    `,story:`
4235        <h2 className="underline">✨ Optimising Power Distribution Network at the TCS Quantum Challenge 2023</h2>
4236        <p>
4237          The efficient delivery of electricity and other energy forms to various consumers is critical, and the energy distribution sector plays a pivotal role in achieving this. However, distribution grid networks often suffer from inefficiencies, leading to substantial energy losses during transmission, distribution, and the voltage step-down process for end users.
4238        </p>
4239        <p>
4240          Optimizing energy transmission networks requires minimizing these energy losses while guaranteeing customer satisfaction through strategic power routing. This complex optimization problem involves a multitude of factors, including the varying energy demands of customers (load profiles), capacity limitations at different network points (nodal capacities), and energy losses incurred during transmission and distribution. As the size and complexity of these networks increase, the number of variables involved grows exponentially, posing a significant challenge to traditional computational methods.
4241        </p>
4242        <p>
4243          We participated in the four-month-long TCS Quantum Challenge 2023, where we explored the potential of quantum computing to address this optimization problem. We proposed a hybrid quantum algorithm to optimize power distribution networks, leveraging several decomposition techniques to transform the problem into several QUBOs which can be solved using existing quantum algorithms like VQE and QAOA.
4244        </p>
4245        <h2 className="underline">✨ Effect of Quantum Computing on Blockchain</h2>
4246        <p>
4247          Blockchain technology has revolutionized decentralized systems, offering unprecedented levels of security and anonymity. However, the rapid advancement of quantum computing poses a significant threat to this established paradigm. We examined vulnerabilities of existing blockchain cryptography, focusing on Grover's algorithm's potential to impact hash functions and 
4247Shor's algorithm's ability to break existing cryptography systems.
4248        </p>
4249        <p>
4250          Furthermore, we analysed the economic consequences of these vulnerabilities using a simple bond pricing framework. It examined how Grover's attack could accelerate monetary expansion and how Shor's attack could potentially devalue cryptocurrencies to zero. We also explored post-quantum cryptography (PQC) as a potential solution proposed by various researchers.
4251        </p>
4252      `},{id:4,orgname:"QWorld",logo_name:"qworld.png",role:"QIntern & Quantum Software Developer At QCourse 551-1",title:`
4253      <ul>
4254        <li>✨ Optimizing QUBO Relaxation Parameter Via Learning Solver Surrogate</li>
4255        <li>✨ Implementing Hybrid Quantum Neural Network</li>
4256      </ul>
4257    `,story:`
4258        <h2 className="underline">✨ Quantum Software Developer with QCourse 551-1 and Classiq</h2>
4259        <p>
4260          Quantum Neural Networks involve combining classical neural networks with the advantage of quantum information to create more efficient algorithms. The goal of this project is to understand how we can utilize the quantum capabilities to create quantum layers. We will create a hybrid network consisting of both classical and quantum layers to classify the MNIST dataset.
4261        </p>
4262        <h2 className="underline">✨ QIntern</h2>
4263        <p>
4264          I Researched and developed an application for Optimizing QUBO Relaxation Parameter Via Learning Solver Surrogate.
4265        </p> 
4266        <ul>
4267          <li>
4268              Created a Pipeline to read and analyze data from the TSPLIB dataset. 
4269          </li>
4270          <li>
4271            Implemented QUBO formulation of TSP using PyQubo.
4272          </li>
4273          <li>
4274            Used D-wave neal to solve instances from TSPLIB and Study the relation between relaxation parameters, the problem instance, feasibility, and the objective energy.
4275          </li>
4276          <li>
4277            Explored different ways to select the range of parameters for each instance based on the feasibility of the solutions returned by the solver.
4278          </li>
4279          <li>
4280            Generating a training dataset for a surrogate model consisting of 300 instances and 30,000 parameter values, taking an approximate compute time of 180 hours to generate.
4281          </li>
4282          <li>
4283            Explored feature extraction methods for TSP and VRP instances, such as using Graph Convolutional Neural Networks and Reinforcement Learning.
4284          </li>
4285        </ul>
4286      `},{id:3,orgname:"New York University Abu Dhabi",logo_name:"nyuad.png",role:"Quantum Hackathon Participant",title:"Entered into the world of opportunities, starting with exploring the molecular interaction using quantum computing.",story:`
4287        <ul>
4288          <li>
4289            The 11th NYUAD International Hackathon was focused on one of the most promising technologies of our time, Quantum Computing (QC). Quantum computing is a rapidly emerging technology that harnesses the laws of quantum mechanics to solve problems too complex for classical computers. 
4290          </li>
4291          <li>
4292            Me along with my team developed <a href="https://github.com/ashmitjsg/NYUAD-2023/tree/main/QCrop" target="_blank">QCrop</a>, An application that uses Quantum Computing for Simulating Molecular Engineering for Fertilizer Design. We used Variational Quantum Eigen solver and Error Mitigation Techniques to calculate the Energy Landscape of molecules used for fertilizer manufacture. We aimed to reduce the energy consumption of the fertilizer manufacturing process and the toxicity of fertilizers.
4293          </li>
4294          <li>
4295            In free time I wandered around the streets and Masjids of Abu Dhabi with the friends I met their. Thanks to El Amine Cherrat, Akash Kant, Abbas Hassasfar, Ahmed Jaafari, Harshit Gupta, Meriam Mkadmi, Nouhaila Innan, Padmapriya Mohan, Priya Aswani, Rohan Mitra, Swaraj Purohit, Utkarsh Azad, Vardaan Sahgal, Walid Al-Eisawi, and Walid El Maouaki for making my those four days memorable and enjoying.
4296          </li>
4297        </ul>
4298      `},{id:2,orgname:"Team Abraxas",logo_name:"abraxas.png",role:"Community Manager and Technical Executive",title:"Brewed my first react website, developed a quantum game and experienced how hard is leading a team and how easy it seams from outside.",story:`
4299        <ul>
4300          <li>
4301            Built the space themed <a href="https://abraxas-2023.vercel.app/" target="_blank">website for Team Abraxas</a> to celebrate the dedication of all the students with whose collabrative effort the physics department participated in Nimbus, the annual techfest of NITH, for the first time.
4302          </li>
4303          <li>
4304            Developed <a href="https://github.com/ashmitjsg/Quantum-Breakout" target="_blank">Quantum Breakout</a>, a game for helping school students and college freshmen learn Qubit State Simulation using Quantum Gates which is the first step of learning and designing Quantum Algorithms. This game was showcased at the Nimbus 2023 organised at National Institute of Technology Hamirpur.
4305          </li>
4306        </ul>
4307      `},{id:1,orgname:"Microsoft Learn Student Ambassador",logo_name:"mlsa.png",role:"Tech Community Manager and Event Organizer",title:"Cracked my first dream role and began a never ending journey of giving back to the tech community, which planted the seed of a love for te
4307chnology in me when I was young.",story:`
4308        <ul>
4309          <li>
4310            Organizing Microsoft Learn Ambassador Challenges and Workshops for Students at the National Institute of Technology Hamirpur.
4311          </li>
4312          <li>
4313            Introducing students to Microsoft technology and assisting them in getting started.
4314          </li>
4315          <li>
4316            Learning how to tell story as a developer and engage audience to actively use my product. 
4317          </li>
4318          <li>
4319            Giving back to tech community by creating video tutorial and blogs about tech concepts which I found hard to use as a beginner.
4320          </li>
4321        </ul>
4322      `}];var IS={exports:{}},Zl={},BS={exports:{}},ys={},LS={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;/*!
4323 * Adapted from jQuery UI core
4324 *
4325 * http://jqueryui.com
4326 *
4327 * Copyright 2014 jQuery Foundation and other contributors
4328 * Released under the MIT license.
4329 * http://jquery.org/license
4330 *
4331 * http://api.jqueryui.com/category/ui-core/
4332 */var n="none",i="contents",r=/input|select|textarea|button|object|iframe/;function s(f,p){return p.getPropertyValue("overflow")!=="visible"||f.scrollWidth<=0&&f.scrollHeight<=0}function o(f){var p=f.offsetWidth<=0&&f.offsetHeight<=0;if(p&&!f.innerHTML)return!0;try{var m=window.getComputedStyle(f),v=m.getPropertyValue("display");return p?v!==i&&s(f,m):v===n}catch{return console.warn("Failed to inspect element style"),!1}}function a(f){for(var p=f,m=f.getRootNode&&f.getRootNode();p&&p!==document.body;){if(m&&p===m&&(p=m.host.parentNode),o(p))return!1;p=p.parentNode}return!0}function l(f,p){var m=f.nodeName.toLowerCase(),v=r.test(m)&&!f.disabled||m==="a"&&f.href||p;return v&&a(f)}function c(f){var p=f.getAttribute("tabindex");p===null&&(p=void 0);var m=isNaN(p);return(m||p>=0)&&l(f,!m)}function h(f){var p=[].slice.call(f.querySelectorAll("*"),0).reduce(function(m,v){return m.concat(v.shadowRoot?h(v.shadowRoot):[v])},[]);return p.filter(c)}t.exports=e.default})(LS,LS.exports);var Uk=LS.exports;Object.defineProperty(ys,"__esModule",{value:!0});ys.resetState=KZ;ys.log=qZ;ys.handleBlur=zf;ys.handleFocus=Hf;ys.markForFocusLater=QZ;ys.returnFocus=YZ;ys.popWithoutFocus=ZZ;ys.setupScopedFocus=$Z;ys.teardownScopedFocus=e$;var WZ=Uk,XZ=JZ(WZ);function JZ(t){return t&&t.__esModule?t:{default:t}}var td=[],Mu=null,DS=!1;function KZ(){td=[]}function qZ(){}function zf(){DS=!0}function Hf(){if(DS){if(DS=!1,!Mu)return;setTimeout(function(){if(!Mu.contains(document.activeElement)){var t=(0,XZ.default)(Mu)[0]||Mu;t.focus()}},0)}}function QZ(){td.push(document.activeElement)}function YZ(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=null;try{td.length!==0&&(e=td.pop(),e.focus({preventScroll:t}));return}catch{console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}}function ZZ(){td.length>0&&td.pop()}function $Z(t){Mu=t,window.addEventListener?(window.addEventListener("blur",zf,!1),document.addEventListener("focus",Hf,!0)):(window.attachEvent("onBlur",zf),document.attachEvent("onFocus",Hf))}function e$(){Mu=null,window.addEventListener?(window.removeEventListener("blur",zf),document.removeEventListener("focus",Hf)):(window.detachEvent("onBlur",zf),document.detachEvent("onFocus",Hf))}var NS={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=Uk,i=r(n);function r(a){return a&&a.__esModule?a:{default:a}}function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return a.activeElement.shadowRoot?s(a.activeElement.shadowRoot):a.activeElement}function o(a,l){var c=(0,i.default)(a);if(!c.length){l.preventDefault();return}var h=void 0,f=l.shiftKey,p=c[0],m=c[c.length-1],v=s();if(a===v){if(!f)return;h=m}if(m===v&&!f&&(h=p),p===v&&f&&(h=m),h){l.preventDefault(),h.focus();return}var S=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),A=S!=null&&S[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(A){var g=c.indexOf(v);if(g>-1&&(g+=f?-1:1),h=c[g],typeof h>"u"){l.preventDefault(),h=f?m:p,h.focus();return}l.preventDefault(),h.focus()}}t.exports=e.default}
4332)(NS,NS.exports);var t$=NS.exports,xs={},n$=function(){},i$=n$,ds={},zk={exports:{}};/*!
4333  Copyright (c) 2015 Jed Watson.
4334  Based on code that is Copyright 2013-2015, Facebook, Inc.
4335  All rights reserved.
4336*/(function(t){(function(){var e=!!(typeof window<"u"&&window.document&&window.document.createElement),n={canUseDOM:e,canUseWorkers:typeof Worker<"u",canUseEventListeners:e&&!!(window.addEventListener||window.attachEvent),canUseViewport:e&&!!window.screen};t.exports?t.exports=n:window.ExecutionEnvironment=n})()})(zk);var r$=zk.exports;Object.defineProperty(ds,"__esModule",{value:!0});ds.canUseDOM=ds.SafeNodeList=ds.SafeHTMLCollection=void 0;var s$=r$,o$=a$(s$);function a$(t){return t&&t.__esModule?t:{default:t}}var Uy=o$.default,l$=Uy.canUseDOM?window.HTMLElement:{};ds.SafeHTMLCollection=Uy.canUseDOM?window.HTMLCollection:{};ds.SafeNodeList=Uy.canUseDOM?window.NodeList:{};ds.canUseDOM=Uy.canUseDOM;ds.default=l$;Object.defineProperty(xs,"__esModule",{value:!0});xs.resetState=f$;xs.log=p$;xs.assertNodeList=Hk;xs.setElement=m$;xs.validateElement=pE;xs.hide=g$;xs.show=v$;xs.documentNotReadyOrSSRTesting=y$;var c$=i$,u$=h$(c$),d$=ds;function h$(t){return t&&t.__esModule?t:{default:t}}var Nr=null;function f$(){Nr&&(Nr.removeAttribute?Nr.removeAttribute("aria-hidden"):Nr.length!=null?Nr.forEach(function(t){return t.removeAttribute("aria-hidden")}):document.querySelectorAll(Nr).forEach(function(t){return t.removeAttribute("aria-hidden")})),Nr=null}function p$(){}function Hk(t,e){if(!t||!t.length)throw new Error("react-modal: No elements were found for selector "+e+".")}function m$(t){var e=t;if(typeof e=="string"&&d$.canUseDOM){var n=document.querySelectorAll(e);Hk(n,e),e=n}return Nr=e||Nr,Nr}function pE(t){var e=t||Nr;return e?Array.isArray(e)||e instanceof HTMLCollection||e instanceof NodeList?e:[e]:((0,u$.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function g$(t){var e=!0,n=!1,i=void 0;try{for(var r=pE(t)[Symbol.iterator](),s;!(e=(s=r.next()).done);e=!0){var o=s.value;o.setAttribute("aria-hidden","true")}}catch(a){n=!0,i=a}finally{try{!e&&r.return&&r.return()}finally{if(n)throw i}}}function v$(t){var e=!0,n=!1,i=void 0;try{for(var r=pE(t)[Symbol.iterator](),s;!(e=(s=r.next()).done);e=!0){var o=s.value;o.removeAttribute("aria-hidden")}}catch(a){n=!0,i=a}finally{try{!e&&r.return&&r.return()}finally{if(n)throw i}}}function y$(){Nr=null}var gd={};Object.defineProperty(gd,"__esModule",{value:!0});gd.resetState=x$;gd.log=_$;var Yh={},Zh={};function MI(t,e){t.classList.remove(e)}function x$(){var t=document.getElementsByTagName("html")[0];for(var e in Yh)MI(t,Yh[e]);var n=document.body;for(var i in Zh)MI(n,Zh[i]);Yh={},Zh={}}function _$(){}var A$=function(e,n){return e[n]||(e[n]=0),e[n]+=1,n},S$=function(e,n){return e[n]&&(e[n]-=1),n},w$=function(e,n,i){i.forEach(function(r){A$(n,r),e.add(r)})},M$=function(e,n,i){i.forEach(function(r){S$(n,r),n[r]===0&&e.remove(r)})};gd.add=function(e,n){return w$(e.classList,e.nodeName.toLowerCase()=="html"?Yh:Zh,n.split(" "))};gd.remove=function(e,n){return M$(e.classList,e.nodeName.toLowerCase()=="html"?Yh:Zh,n.split(" "))};var vd={};Object.defineProperty(vd,"__esModule",{value:!0});vd.log=C$;vd.resetState=T$;function E$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Gk=function t(){var e=this;E$(this,t),this.register=function(n){e.openInstances.indexOf(n)===-1&&(e.openInstances.push(n),e.emit("register"))},this.deregister=function(n){var i=e.openInstances.indexOf(n);i!==-1&&(e.openInstances.splice(i,1),e.emit("deregister"))},this.subscribe=function(n){e.subscribers.push(n)},this.emit=function(n){e.subscribers.forEach(function(i){return i(n,e.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},Rv=new Gk;function C$(){console.log("portalOpenInstances ----------"),console.log(Rv.openInstances.length),Rv.openInstances.forEac
4336h(function(t){return console.log(t)}),console.log("end portalOpenInstances ----------")}function T$(){Rv=new Gk}vd.default=Rv;var mE={};Object.defineProperty(mE,"__esModule",{value:!0});mE.resetState=I$;mE.log=B$;var b$=vd,R$=P$(b$);function P$(t){return t&&t.__esModule?t:{default:t}}var Si=void 0,rs=void 0,kl=[];function I$(){for(var t=[Si,rs],e=0;e<t.length;e++){var n=t[e];n&&n.parentNode&&n.parentNode.removeChild(n)}Si=rs=null,kl=[]}function B$(){console.log("bodyTrap ----------"),console.log(kl.length);for(var t=[Si,rs],e=0;e<t.length;e++){var n=t[e],i=n||{};console.log(i.nodeName,i.className,i.id)}console.log("edn bodyTrap ----------")}function EI(){kl.length!==0&&kl[kl.length-1].focusContent()}function L$(t,e){!Si&&!rs&&(Si=document.createElement("div"),Si.setAttribute("data-react-modal-body-trap",""),Si.style.position="absolute",Si.style.opacity="0",Si.setAttribute("tabindex","0"),Si.addEventListener("focus",EI),rs=Si.cloneNode(),rs.addEventListener("focus",EI)),kl=e,kl.length>0?(document.body.firstChild!==Si&&document.body.insertBefore(Si,document.body.firstChild),document.body.lastChild!==rs&&document.body.appendChild(rs)):(Si.parentElement&&Si.parentElement.removeChild(Si),rs.parentElement&&rs.parentElement.removeChild(rs))}R$.default.subscribe(L$);(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(q){for(var j=1;j<arguments.length;j++){var Z=arguments[j];for(var H in Z)Object.prototype.hasOwnProperty.call(Z,H)&&(q[H]=Z[H])}return q},i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},r=function(){function q(j,Z){for(var H=0;H<Z.length;H++){var D=Z[H];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(j,D.key,D)}}return function(j,Z,H){return Z&&q(j.prototype,Z),H&&q(j,H),j}}(),s=z,o=Fk,a=b(o),l=ys,c=M(l),h=t$,f=b(h),p=xs,m=M(p),v=gd,S=M(v),A=ds,g=b(A),x=vd,_=b(x);function M(q){if(q&&q.__esModule)return q;var j={};if(q!=null)for(var Z in q)Object.prototype.hasOwnProperty.call(q,Z)&&(j[Z]=q[Z]);return j.default=q,j}
vendor: 7,047 bytes, line 4336
4336function b(q){return q&&q.__esModule?q:{default:q}}function C(q,j){if(!(q instanceof j))throw new TypeError("Cannot call a class as a function")}function P(q,j){if(!q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:q}function B(q,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);q.prototype=Object.create(j&&j.prototype,{constructor:{value:q,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(q,j):q.__proto__=j)}var R={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},T=function(j){return j.code==="Tab"||j.keyCode===9},L=function(j){return j.code==="Escape"||j.keyCode===27},W=0,Y=function(q){B(j,q);function j(Z){C(this,j);var H=P(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,Z));return H.setOverlayRef=function(D){H.overlay=D,H.props.overlayRef&&H.props.overlayRef(D)},H.setContentRef=function(D){H.content=D,H.props.contentRef&&H.props.contentRef(D)},H.afterClose=function(){var D=H.props,X=D.appElement,J=D.ariaHideApp,$=D.htmlOpenClassName,ue=D.bodyOpenClassName,Ae=D.parentSelector,te=Ae&&Ae().ownerDocument||document;ue&&S.remove(te.body,ue),$&&S.remove(te.getElementsByTagName("html")[0],$),J&&W>0&&(W-=1,W===0&&m.show(X)),H.props.shouldFocusAfterRender&&(H.props.shouldReturnFocusAfterClose?(c.returnFocus(H.props.preventScroll),c.teardownScopedFocus()):c.popWithoutFocus()),H.props.onAfterClose&&H.props.onAfterClose(),_.default.deregister(H)},H.open=function(){H.beforeOpen(),H.state.afterOpen&&H.state.beforeClose?(clearTimeout(H.closeTimer),H.setState({beforeClose:!1})):(H.props.shouldFocusAfterRender&&(c.setupScopedFocus(H.node),c.markForFocusLater()),H.setState({isOpen:!0},function(){H.openAnimationFrame=requestAnimationFrame(function(){H.setState({afterOpen:!0}),H.props.isOpen&&H.props.onAfterOpen&&H.props.onAfterOpen({overlayEl:H.overlay,contentEl:H.content})})}))},H.close=function(){H.props.closeTimeoutMS>0?H.closeWithTimeout():H.closeWithoutTimeout()},H.focusContent=function(){return H.content&&!H.contentHasFocus()&&H.content.focus({preventScroll:!0})},H.closeWithTimeout=function(){var D=Date.now()+H.props.closeTimeoutMS;H.setState({beforeClose:!0,closesAt:D},function(){H.closeTimer=setTimeout(H.closeWithoutTimeout,H.state.closesAt-Date.now())})},H.closeWithoutTimeout=function(){H.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},H.afterClose)},H.handleKeyDown=function(D){T(D)&&(0,f.default)(H.content,D),H.props.shouldCloseOnEsc&&L(D)&&(D.stopPropagation(),H.requestClose(D))},H.handleOverlayOnClick=function(D){H.shouldClose===null&&(H.shouldClose=!0),H.shouldClose&&H.props.shouldCloseOnOverlayClick&&(H.ownerHandlesClose()?H.requestClose(D):H.focusContent()),H.shouldClose=null},H.handleContentOnMouseUp=function(){H.shouldClose=!1},H.handleOverlayOnMouseDown=function(D){!H.props.shouldCloseOnOverlayClick&&D.target==H.overlay&&D.preventDefault()},H.handleContentOnClick=function(){H.shouldClose=!1},H.handleContentOnMouseDown=function(){H.shouldClose=!1},H.requestClose=function(D){return H.ownerHandlesClose()&&H.props.onRequestClose(D)},H.ownerHandlesClose=function(){return H.props.onRequestClose},H.shouldBeClosed=function(){return!H.state.isOpen&&!H.state.beforeClose},H.contentHasFocus=function(){return document.activeElement===H.content||H.content.contains(document.activeElement)},H.buildClassName=function(D,X){var J=(typeof X>"u"?"undefined":i(X))==="object"?X:{base:R[D],afterOpen:R[D]+"--after-open",beforeClose:R[D]+"--before-close"},$=J.base;return H.state.afterOpen&&($=$+" "+J.afterOpen),H.state.beforeClose&&($=$+" "+J.beforeClose),typeof X=="string"&&X?$+" "+X:$},H.attributesFromObject=function(D,X){return Object.keys(X).reduce(function(J,$){return J[D+"-"+$]=X[$],J},{})},H.state={afterOpen:!1,beforeClose:!1},H.shouldClose=null,H.moveFromContentToOverlay=null,H}return r(j,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(H,D){this.props.isOpen&&!H.isOpen?this.open():!this.props.isOpen&&H.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!D.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var H=this.props,D=H.appElement,X=H.ariaHideApp,J=H.htmlOpenClassName,$=H.bodyOpenClassName,ue=H.parentSelector,Ae=ue&&ue().ownerDocument||document;$&&S.add(Ae.body,$),J&&S.add(Ae.getElementsByTagName("html")[0],J),X&&(W+=1,m.hide(D)),_.default.register(this)}},{key:"render",value:function(){var H=this.props,D=H.id,X=H.className,J=H.overlayClassName,$=H.defaultStyles,ue=H.children,Ae=X?{}:$.content,te=J?{}:$.overlay;if(this.shouldBeClosed())return null;var ce={ref:this.setOverlayRef,className:this.buildClassName("overlay",J),style:n({},te,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},xe=n({id:D,ref:this.setContentRef,style:n({},Ae,this.props.style.content),className:this.buildClassName("content",X),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),_e=this.props.contentElement(xe,ue);return this.props.overlayElement(ce,_e)}}]),j}(s.Component);Y.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},Y.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(g.default),a.default.instanceOf(A.SafeHTMLCollection),a.default.instanceOf(A.SafeNodeList),a.default.arrayOf(a.default.instanceOf(g.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},e.default=Y,t.exports=e.default}
vendor: 4,905 bytes, lines 4336-4344
4336)(BS,BS.exports);var D$=BS.exports;function Vk(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function jk(t){function e(n){var i=this.constructor.getDerivedStateFromProps(t,n);return i??null}this.setState(e.bind(this))}function Wk(t,e){try{var n=this.props,i=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,i)}finally{this.props=n,this.state=i}}Vk.__suppressDeprecationWarning=!0;jk.__suppressDeprecationWarning=!0;Wk.__suppressDeprecationWarning=!0;function N$(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return t;var n=null,i=null,r=null;if(typeof e.componentWillMount=="function"?n="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?i="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(i="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?r="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(r="UNSAFE_componentWillUpdate"),n!==null||i!==null||r!==null){var s=t.displayName||t.name,o=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
4337
4338`+s+" uses "+o+" but also contains the following legacy lifecycles:"+(n!==null?`
4339  `+n:"")+(i!==null?`
4340  `+i:"")+(r!==null?`
4341  `+r:"")+`
4342
4343The above lifecycles should be removed. Learn more about this warning here:
4344https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(e.componentWillMount=Vk,e.componentWillReceiveProps=jk),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=Wk;var a=e.componentDidUpdate;e.componentDidUpdate=function(c,h,f){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;a.call(this,c,h,p)}}return t}const F$=Object.freeze(Object.defineProperty({__proto__:null,polyfill:N$},Symbol.toStringTag,{value:"Module"})),k$=pU(F$);Object.defineProperty(Zl,"__esModule",{value:!0});Zl.bodyOpenClassName=Zl.portalClassName=void 0;var CI=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},O$=function(){function t(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Xk=z,Pv=_p(Xk),U$=aL,Iv=_p(U$),z$=Fk,At=_p(z$),H$=D$,TI=_p(H$),G$=xs,V$=W$(G$),ra=ds,bI=_p(ra),j$=k$;function W$(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function _p(t){return t&&t.__esModule?t:{default:t}}function X$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RI(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function J$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var K$=Zl.portalClassName="ReactModalPortal",q$=Zl.bodyOpenClassName="ReactModal__Body--open",fl=ra.canUseDOM&&Iv.default.createPortal!==void 0,PI=function(e){return document.createElement(e)},II=function(){return fl?Iv.default.createPortal:Iv.default.unstable_renderSubtreeIntoContainer};function Og(t){return t()}var Ap=function(t){J$(e,t);function e(){var n,i,r,s;X$(this,e);for(var o=arguments.length,a=Array(o),l=0;l<o;l++)a[l]=arguments[l];return s=(i=(r=RI(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),r),r.removePortal=function(){!fl&&Iv.default.unmountComponentAtNode(r.node);var c=Og(r.props.parentSelector);c&&c.contains(r.node)?c.removeChild(r.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},r.portalRef=function(c){r.portal=c},r.renderPortal=function(c){var h=II(),f=h(r,Pv.default.createElement(TI.default,CI({defaultStyles:e.defaultStyles},c)),r.node);r.portalRef(f)},i),RI(r,s)}
vendor: 4,213 bytes, line 4344
4344return O$(e,[{key:"componentDidMount",value:function(){if(ra.canUseDOM){fl||(this.node=PI("div")),this.node.className=this.props.portalClassName;var i=Og(this.props.parentSelector);i.appendChild(this.node),!fl&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(i){var r=Og(i.parentSelector),s=Og(this.props.parentSelector);return{prevParent:r,nextParent:s}}},{key:"componentDidUpdate",value:function(i,r,s){if(ra.canUseDOM){var o=this.props,a=o.isOpen,l=o.portalClassName;i.portalClassName!==l&&(this.node.className=l);var c=s.prevParent,h=s.nextParent;h!==c&&(c.removeChild(this.node),h.appendChild(this.node)),!(!i.isOpen&&!a)&&!fl&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!ra.canUseDOM||!this.node||!this.portal)){var i=this.portal.state,r=Date.now(),s=i.isOpen&&this.props.closeTimeoutMS&&(i.closesAt||r+this.props.closeTimeoutMS);s?(i.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,s-r)):this.removePortal()}}},{key:"render",value:function(){if(!ra.canUseDOM||!fl)return null;!this.node&&fl&&(this.node=PI("div"));var i=II();return i(Pv.default.createElement(TI.default,CI({ref:this.portalRef,defaultStyles:e.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(i){V$.setElement(i)}}]),e}(Xk.Component);Ap.propTypes={isOpen:At.default.bool.isRequired,style:At.default.shape({content:At.default.object,overlay:At.default.object}),portalClassName:At.default.string,bodyOpenClassName:At.default.string,htmlOpenClassName:At.default.string,className:At.default.oneOfType([At.default.string,At.default.shape({base:At.default.string.isRequired,afterOpen:At.default.string.isRequired,beforeClose:At.default.string.isRequired})]),overlayClassName:At.default.oneOfType([At.default.string,At.default.shape({base:At.default.string.isRequired,afterOpen:At.default.string.isRequired,beforeClose:At.default.string.isRequired})]),appElement:At.default.oneOfType([At.default.instanceOf(bI.default),At.default.instanceOf(ra.SafeHTMLCollection),At.default.instanceOf(ra.SafeNodeList),At.default.arrayOf(At.default.instanceOf(bI.default))]),onAfterOpen:At.default.func,onRequestClose:At.default.func,closeTimeoutMS:At.default.number,ariaHideApp:At.default.bool,shouldFocusAfterRender:At.default.bool,shouldCloseOnOverlayClick:At.default.bool,shouldReturnFocusAfterClose:At.default.bool,preventScroll:At.default.bool,parentSelector:At.default.func,aria:At.default.object,data:At.default.object,role:At.default.string,contentLabel:At.default.string,shouldCloseOnEsc:At.default.bool,overlayRef:At.default.func,contentRef:At.default.func,id:At.default.string,overlayElement:At.default.func,contentElement:At.default.func};Ap.defaultProps={isOpen:!1,portalClassName:K$,bodyOpenClassName:q$,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,n){return Pv.default.createElement("div",e,n)},contentElement:function(e,n){return Pv.default.createElement("div",e,n)}};Ap.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}};(0,j$.polyfill)(Ap);Zl.default=Ap;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=Zl,i=r(n);function r(s){return s&&s.__esModule?s:{default:s}}e.default=i.default,t.exports=e.default})(IS,IS.exports);var Q$=IS.exports;const Jk=Wf(Q$),Y$=({story:t,isOpen:e,onRequestClose:n})=>t?F.jsxs(Jk,{isOpen:e,onRequestClose:n,ariaHideApp:!1,contentLabel:`${t==null?void 0:t.role}`,className:"w-[80%] h-[70%] md:w-[60%] md:h-[60%] lg:h-[50%] border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] backdrop-blur-[2rem] p-6 xl:px-40 rounded-xl fixed top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 overflow-y-scroll text-white",overlayClassName:"w-screen h-screen fixed bottom-0 
4344justify-center items-center text-white",children:[F.jsx("div",{className:"cursor-pointer absolute z-9 top-4 right-4",onClick:n,children:F.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M19 4.99994L5 18.9999",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("path",{d:"M5 4.99994L19 18.9999",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),F.jsxs("div",{className:"w-full h-full flex flex-col justify-between items-center",children:[F.jsx("h2",{className:"text-xl text-center pb-4",children:t==null?void 0:t.role}),F.jsx("div",{dangerouslySetInnerHTML:{__html:t==null?void 0:t.story},className:"story-content font-light"}),F.jsxs("div",{className:"w-fit h-[60px] flex justify-center items-center gap-2 py-4",children:[F.jsx("img",{src:`/images/exp_logos/${t.logo_name}`,alt:`${t.orgname}`,className:"h-[40px] w-auto object-contain"}),F.jsx("p",{className:"text-[1rem] font-light",children:t.orgname})]})]})]}):null,BI=[{name:"AsyncAPI",logo:"/images/exp_logos/open_source/asyncapi.png",link:"https://github.com/asyncapi/"},{name:"Uptane",logo:"/images/exp_logos/open_source/uptane.png",link:"https://github.com/uptane/"},{name:"Abraxas",logo:"/images/exp_logos/abraxas.png",link:"https://abraxas-2023.vercel.app/"},{name:"Qiskit",logo:"/images/exp_logos/open_source/qiskit.png",link:"https://github.com/Qiskit"},{name:"Symmer",logo:"/images/exp_logos/open_source/symmer.png",link:"https://github.com/UCL-CCS/symmer"}],Z$=()=>{const{ref:t}=ZD("Experience",.3),[e,n]=z.useState(!1),[i,r]=z.useState(null),[s,o]=z.useState(0);z.useEffect(()=>{const c=setInterval(()=>{o(h=>(h+1)%BI.length)},3e3);return()=>clearInterval(c)},[s,BI.length]);const a=c=>{r(c),n(!0)},l=()=>{r(null),n(!1)};return F.jsxs("section",{ref:t,id:"experience",className:"w-screen min-h-screen flex flex-col justify-start items-center py-24 scroll-mt-24 overflow-hidden",children:[F.jsx(Uw,{title:"Experience",oneliner:"Read what I learned through my work at various organizations."}),F.jsx("div",{id:"exp_stories",className:"w-full md:w-[90%] lg:w-[80%] xl:w-[90%] h-full flex justify-center items-center flex-wrap gap-10 lg:gap-20 py-20",children:jZ.map(c=>F.jsx(FZ,{org_story:c,onClickFunction:a},c.id))}),F.jsx(Y$,{story:i,isOpen:e,onRequestClose:l})]})},$$=[{id:0,name:"IBM Qiskit Advocate Adcanced",src:"ibm_qiskit_advocate_advanced.png",link:"https://www.credly.com/badges/e7be6186-8625-4339-8139-de728e526e0f/public_url"},{id:1,name:"IBM Certified Associate Developer - Quantum Computation using Qiskit v0.2X",src:"ibmq_associate_developer.png",link:"https://www.credly.com/badges/cdc0b4bf-9344-4826-b72b-37c923f4ac63/public_url"},{id:2,name:"Microsoft Learn Student Ambassadors Cloud Skills Challenge Event Host",src:"mlsa_clod_skills_challenge_host.png",link:"https://www.credly.com/badges/a8d556a8-e1ca-4078-87be-389a2b291047/public_url"},{id:3,name:"IBM Introduction to Cloud Computing",src:"ibm_intro_to_cloud_comp.png",link:"https://www.credly.com/badges/079c8105-0ba8-40b2-93f0-074ce7e3ed84/public_url"},{id:4,name:"IBM DevOps Essentials",src:"ibm_devops_essential.png",link:"https://www.credly.com/badges/a5dc00ab-d470-4df2-822e-365ea35f975f/public_url"},{id:5,name:"IBM Enterprise Design Thinking Practitioner",src:"ibm_enterprise_design_thinking_practitioner.png",link:"https://www.credly.com/badges/c50d16b7-494d-4a17-b3a8-f4a874871038/public_url"},{id:6,name:"Hacktoberfest 2022 - Level 4",src:"hacltoberfest_level4_2022.webp",link:"https://www.holopin.io/@devilkillerag"}],eee=()=>F.jsxs("section",{id:"badges",className:"w-screen min-h-screen flex flex-col justify-start items-center py-24 scroll-mt-24 overflow-hidden",children:[F.jsx(Uw,{title:"Badges",oneliner:"Explore my trove of earned badges – a testament to my remarkable journey and achievements!"}),F.jsx("div",{className:"w-full md:w-[90%] lg:w-[80%] xl:w-[70%] h-full flex justify-center items-center flex-wrap gap-10 lg:gap-20 py-20",children:$$.map(t=>F.jsx("a",{href:t.link,target:"_blank",children:F.jsx("img",{src:`/images/badges/${t.src}`,alt:t.name,className:"w-32 h-32 sm:w-56 sm:h-56 oject-cover"})},t.id))})]});function tee(){const{hash:t}=Zf();return z.useEffect(()=>{if(!t)return;const e=t.replace("#",""),n=setTimeout(()=>{var i;(i=document.getElementById(e))==null||i.scrollIntoView({behavior:"smooth"})},100);return()=>clearTimeout(n)},[t]),F.jsxs(F.Fragment,{children:[F.jsx(ip,{}),F.jsx(kV,{}),F.jsx(Qz,{}),F.jsx(Z$,{}),F.jsx(eee,{}),F.jsx(md,{}),F.jsxs("footer",{className:"w-[90%] pb-10 pt-6 flex flex-col sm:flex-row justify-center items-center",children:["Made with 🌕 material by  ",F.jsx("a",{href:nn.linkedin,target:"_blank",className:"underline hover:no-underline",children:"Ashmit JaiSarita Gupta"})]})]})}const nee=({setCurrentSection:t,timeOfLastClick:e})=>{const{ref:n}=ry({sectionName:"#cv_about",setCurrentCVSection:t,timeOfLastClickOnCVSection:e});return F.jsxs("section",{ref:n,id:"cv_about","aria-label":"About me",className:"section scroll-mt-28",children:[F.jsx("h2",{className:"text-sm font-bold uppercase tracking-widest text-slate-200 lg:sr-only py-5 lg:py-0",children:"About"}),F.jsxs("div",{className:"text-slate-400 text-base tracking-wide font-normal",children:[F.jsx("p",{className:"mb-4 text-ju
4344stify",children:"I was first introduced to CS in 5th-grade at my school, where I was taught coding in Logo, MS-Office in 6th and 7th grades, and QBasic in 8th. Until this point in my journey, CS seemed to be a burden for me. The turning point came when I first wrote 'Hello-World' in Java in 9th-class. It was first when I saw an interesting application of coding."}),F.jsxs("p",{className:"mb-4 text-justify",children:["Fast-forward to today, I am a full-stack Software Development Engineer building AI products, SaaS platforms and event-driven backend services. I work as a core engineer at ",F.jsx("a",{className:"text-slate-200 hover:text-purple-500 focus-visible:text-purple-500",href:"https://goodspace.ai/",target:"_blank",rel:"noreferrer",children:"Goodspace AI"}),", and on the side I build ",F.jsx("a",{className:"text-slate-200 hover:text-purple-500 focus-visible:text-purple-500",href:"https://log0.vercel.app/",target:"_blank",rel:"noreferrer",children:"log0"}),", my open-source log-intelligence and incident platform. I also mentor at Google Summer of Code and serve on the Technical Steering Committee of the ",F.jsx("a",{className:"text-slate-200 hover:text-purple-500 focus-visible:text-purple-500",href:"https://www.asyncapi.com/",target:"_blank",rel:"noreferrer",children:"AsyncAPI Initiative"}),", while contributing to the open-source quantum ecosystem."]}),F.jsx("p",{className:"mb-4 text-justify",children:"In my free time, I usually play video games. These days I am playing BGMI, GTA SA, GTA VC, and Clash of Clans."}),F.jsxs("p",{className:"mb-4 text-justify",children:["When I'm not at the computer, I'm usually exploring Himalayas, manage ",F.jsx("span",{className:"text-slate-200 lg:cursor-[url('/assets/abraxas.png'),_pointer]",children:"Physteo"}),", the physics society of our college or record podcasts and videos related to tech."]})]})]})},iee=[{id:1,name:"National Institute of Technology Hamirpur",degree:"Bachelor of Technology in Engineering Physics",location:"Hamirpur, Himachal Pradesh",startDate:"Dec. 2021",endDate:"July 2025",links:[{title:"NITH",link:"https://nith.ac.in/"}]},{id:2,name:"Jyoti Niketan School",degree:"Primary and Secondary Education",location:"Azamgarh, Uttar Pradesh",startDate:"April 2006",endDate:"June 2020",links:[]}],zy=({title:t,link:e,colorLevel:n=300})=>F.jsx("div",{children:F.jsxs(jl,{to:e,target:"_blank",className:`flex justify-center items-center content-center hover:text-purple-${n} font-medium`,children:[F.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"mr-1 h-3 w-3","aria-hidden":"true",children:[F.jsx("path",{d:"M12.232 4.232a2.5 2.5 0 013.536 3.536l-1.225 1.224a.75.75 0 001.061 1.06l1.224-1.224a4 4 0 00-5.656-5.656l-3 3a4 4 0 00.225 5.865.75.75 0 00.977-1.138 2.5 2.5 0 01-.142-3.667l3-3z"}),F.jsx("path",{d:"M11.603 7.963a.75.75 0 00-.977 1.138 2.5 2.5 0 01.142 3.667l-3 3a2.5 2.5 0 01-3.536-3.536l1.225-1.224a.75.75 0 00-1.061-1.06l-1.224 1.224a4 4 0 105.656 5.656l3-3a4 4 0 00-.225-5.865z"})]}),t]})}),ree=({setCurrentSection:t,timeOfLastClick:e})=>{const{ref:n}=ry({sectionName:"#cv_education",setCurrentCVSection:t,timeOfLastClickOnCVSection:e});return F.jsx("section",{ref:n,id:"cv_education","aria-label":"My Education",className:"section scroll-mt-16 pt-8",children:iee.map(i=>F.jsxs("div",{className:"py-5 flex justify-start gap-2",children:[F.jsxs("div",{className:"text-sm text-slate-400 w-1/3",children:[i.startDate,i.endDate?` - ${i.endDate}`:""]}),F.jsxs("div",{className:"w-2/3",children:[F.jsx("h3",{className:"text-slate-100 text-lg",children:i.name}),F.jsx("h4",{className:"text-slate-300 text-base",children:i.degree}),F.jsx("h5",{className:"text-slate-400 text-base",children:i.location}),F.jsx("ul",{className:"flex justify-start items-start gap-8 font-light",children:i.links.length!==0&&i.links.map(r=>F.jsx("li",{className:"",children:F.jsx(zy,{title:r.title,link:r.link})},r.title))})]})]},i.id))})},see=[{id:10,company:"Goodspace AI",role:"Software Development Engineer",location:"Noida, India",description:"Core full-stack engineer shipping 12+ AI-powered products end-to-e
4344nd - across the customer web platform, a real-time AI interview engine, the internal CRM, and an autonomous B2B sales platform - spanning frontend, backend, LLM infrastructure, payments and multi-tenant systems.",tags:["Next.js","React.js","TypeScript","Redux","Tailwind CSS","Node.js","Express.js","Go","Python","MongoDB","PostgreSQL","Socket.io","Gemini / LLMs","AI Agents","Razorpay","Google Cloud","SEO"],startDate:"May 2025",endDate:"Present",mainLink:{title:"Goodspace AI",link:"https://goodspace.ai/"},otherLinks:[]},{id:9,company:"Google Summer of Code | AsyncAPI Initiative",role:"GSoC 2024 Mentee & GSoC 2025 Mentor",location:"",description:"As a GSoC 2024 mentee I built a UI Kit for the AsyncAPI website using Storybook, Chromatic, Next.js and TypeScript (12 merged PRs). As a GSoC 2025 mentor I am guiding a contributor through the redesign and redevelopment of the AsyncAPI Initiative website.",tags:["UI Kit","Next.js","Tailwind CSS","TypeScript","Storybook","Chromatic","Mentorship"],startDate:"May 2024",endDate:"Sept. 2025",mainLink:{title:"GSoC 2024 Project",link:"https://summerofcode.withgoogle.com/archive/2024/projects/S49Gon9W"},otherLinks:[{title:"GSoC 2025 Project",link:"https://summerofcode.withgoogle.com/archive/2025/projects/dVEjdU4X"},{title:"Repository",link:"https://github.com/asyncapi/website"},{title:"My AsyncAPI PRs",link:"https://github.com/search?q=is%3Apr+author%3Aashmitjsg+org%3Aasyncapi+&type=pullrequests"},{title:"GSoC Journey Blog",link:"https://engineeringwithashmit.hashnode.dev/gsoc"}]},{id:8,company:"Creed and Bear",role:"Quantum Computing Intern",location:"Dubai (Remote)",description:"I worked on the Optimization of the Power Distribution Network at the three-month TCS Quantum Challenge 2023. I researched and wrote a review paper on the Effect of Quantum Computing on Blockchain, and developed software for portfolio optimization using quantum computing.",tags:["Quantum Computing"],startDate:"Jan. 2024",endDate:"Aug. 2024",mainLink:{title:"Creed & Bear",link:"https://creedandbear.com/"},otherLinks:[]},{id:7,company:"AsyncAPI Initiative",role:"Technical Steering Committee Member & Open Source Contributor",location:"",description:"I have developed the Modelina Playground, Modelina CLI, and Modelina Website. I helped in the migration of the AsyncAPI website from JavaScript to TypeScript. I am a Technical Steering Committee (TSC) Member, a Maintainer, and a regular contributor at the AsynCAPI Initiative.",tags:["TypeScript","Next.js","Tailwind CSS","Storybook"],startDate:"May 2024",endDate:"Present",mainLink:{title:"AsyncAPI",link:"https://www.asyncapi.com/"},otherLinks:[{title:"AsyncAPI GitHub",link:"https://github.com/asyncapi"},{title:"TSC",link:"https://www.asyncapi.com/community/tsc"},{title:"Modelina",link:"https://modelina.org"}]},{id:6,company:"Quantum AI Foundation",role:"Quantum Games Hackathon 2023",location:"",description:"We developed QuantaVania, a 2D action-adventure platformer quantum game that enables players to learn quantum computing. We won the Special Prize for Sanrto/Onyx Category for using our game to demonstrate Logistics Optimisation using QUBO and quantum computing software libraries like DWave Ocean SDK, and Qiskit.",tags:["Quantum Computing","Qiskit","DWave Ocean SDK","Pygame"],startDate:"October 2023",endDate:"",mainLink:{title:"Quantum Games Hackathon 2023",link:"https://www.qaif.org/contests/quantum-games-hackathon"},otherLinks:[]},{id:5,company:"QWorld",role:"Quantum Software Developer with Classiq (QCourse 551-1)",location:"",description:"Quantum Neural Networks involve combining classical neural networks with the advantage of quantum information to create more efficient algorithms. The goal of this project is to understand how we can utilize the quantum capabilities to create quantum layers. We will create a hybrid network consisting of both classical and quantum layers to classify the MNIST dataset.",tags:["Quantum Computing","Classiq","PyTorch"],startDate:"Sept. 2023",endDate:"Jan. 2024",mainLink:{title:"QCourse 551-1",link:"https://qworld.net/qcourse551-1/"},otherLinks:[]},{id:4,company:"IBM Qiskit",role:"Qiskit Advocate",location:"",description:"IBM Certified Associate Developer (Quantum Computation using Qiskit v0.2X). Contributing to Qiskit, organising workshops, and working on Qiskit Projects.",tags:["Quantum Computing","Community Management"],startDate:"August 2023",endDate:"Present",mainLink:{title:"Qiskit Advocate Website",link:"https://qiskit.org/advocates"},otherLinks:[]},{id:3,company:"QWorld",role:"Research Intern",location:"",description:"Optimizing logistics using quantum computing. Solving Vehicle Routing Problem using VQE, Surrogate Optimisation and their variants.",tags:["Quantum Computing","Logistics Optimization"],startDate:"July 2023",endDate:"Aug. 2023",mainLink:{title:"QWorld Website",link:"https://qworld.net/qintern-2023/"},otherLinks:[]},{id:2,company:"UnitaryHACK 2023",role:"Participant",location:"Unitary Fund",description:"Fixed Bugs in Qiskit Braket Provider and wrote documentation for Symmer Codebase. ",tags:[],startDate:"May 2023",endDate:"June 2023",mainLink:{title:"UnitaryHack 2023 Result Dashboard",link:"https://unitaryhack.dev/hackers/devilkiller-ag/"},otherLinks:[]},{id:1,company:"11th NYUAD International Hackathon For Social Good",role:"Participant",location:"New York University Abu Dhabi",description:"Attended workshops on QBronze and QSilver. Built an application to use Quantum Computing for Simulating Molecular Engineering for Fertilizer Design.",tags:[],startDate:"April 2023",endDate:"",mainLink:{title:"NYUAD Hackathon Website",link:"https://sites.nyuad.nyu.edu/hackathon/"},otherLinks:[{title:"Repository",link:"https://github.com/ashmitjsg/NYUAD-2023/tree/main/QCrop"},{title:"QCrop",link:"https://qcrop.vercel.app/"}]},{id:0,company:"Microsoft Learn Student Ambassador",role:"Alpha MLSA",location:"",description:"Completed the Technical Onboarding Process and learned about Git, GitHub, and Static Web Apps. Reached Alpha Milestone by completing Microsoft Learn Learning Path on Quantum Computing. Conducted a Microsoft Student Ambassadors Azure AI Challenge at my department with 24 attendees.",tags:[],startDate:"Oct. 2022",endDate:"Oct. 2024",mainLink:{title:"MLSA Profile of Ashmit JaiSarita Gupta",link:"https://studentambassadors.microsoft.com/en-US/studentambassadors/profile/5712f83a-b4c5-4033-b77a-a5ce2bbd6ea3"},otherLinks:[]}],gE=({tag:t,bgcolor:e="bg-purple-400/20"})=>{const n=e;return F.jsx("div",{className:`w-fit h-8 rounded-full flex items-center ${n} px-3 py-1 text-xs font-medium leading-5 text-purple-300`,children:t})},oee=({setCurrentSection:t,timeOfLastClick:e})=>{const{ref:n}=ry({sectionName:"#cv_experience",setCurrentCVSection:t,timeOfLastClickOnCVSection:e});return F.jsx("section",{ref:n,id:"cv_experience","aria-label":"My Experience",className:"section scroll-mt-16 pt-8",children:see.map(i=>F.jsxs("div",{className:"py-5 flex justify-start gap-2",children:[F.jsxs("div",{className:"text-sm text-slate-400 w-1/3",children:[i.startDate,i.endDate?` - ${i.endDate}`:""]}),F.jsxs("div",{className:"w-2/3",children:[F.jsx("h3",{className:"text-slate-100 text-lg",children:F.jsxs(jl,{to:i.mainLink.link,target:"_blank",className:"hover:underline underline-offset-2 group/link",children:[i.role," ∙ ",i.company,F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"inline-block h-4 w-4 shrink-0 transition-transform group-hover/link:-translate-y-1 group-hover/link:translate-x-1 group-focus-visible/link:-translate-y-1 group-focus-visible/link:translate-x-1 motion-reduce:transition-none ml-1 translate-y-
4344px","aria-hidden":"true",children:F.jsx("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"})})]})}),F.jsx("h4",{className:"text-slate-300 text-base",children:i.description}),F.jsx("ul",{className:"flex justify-start items-start gap-2 font-light flex-wrap py-2",children:i.tags.length!==0&&i.tags.map(r=>F.jsx("li",{className:"",children:F.jsx(gE,{tag:r})},r))}),F.jsx("ul",{className:"flex justify-start items-start gap-8 font-light",children:i.otherLinks.length!==0&&i.otherLinks.map(r=>F.jsx("li",{className:"",children:F.jsx(zy,{title:r.title,link:r.link})},r.title))})]})]},i.id))})},Kk=[{id:15,name:"log0: From 10,000 logs to one incident",description:"log0 is an open-source, multi-tenant log-intelligence and incident platform that turns tens of thousands of noisy logs into a few actionable, owned incidents. An event-driven backbone of 7 Java + Spring Boot microservices over Apache Kafka ingests logs asynchronously, deterministically fingerprints and clusters errors via SHA-256 so duplicates collapse into a single incident, generates an AI root-cause summary, and routes ownership to Slack with assign, acknowledge and resolve actions. High-volume logs are stored in ClickHouse while the incident state machine runs on PostgreSQL, fronted by a Next.js operator console and a Fumadocs documentation site.",coverImage:"log0Cover.png",backgroundImage:"log0Background.png",techstacks:["Java","Spring Boot","Apache Kafka","ClickHouse","PostgreSQL","Next.js","TypeScript","Docker"],links:[{title:"Website",link:"https://log0.vercel.app/"},{title:"Documentation",link:"https://log0.vercel.app/docs"}],startDate:"Jan 2026",endDate:""},{id:14,name:"charfield: ASCII Canvas Field Animations",description:"charfield is an npm package of 44 procedural, interactive ASCII canvas field animations (galaxy, black hole, entanglement, Lorenz, Ising and more) that I originally built for my log0 website and then extracted for reuse across repos. It ships a shadcn-style copy-in CLI (npx charfield add <name>) that copies the React + Canvas2D + TypeScript source straight into your project with zero runtime dependency, plus an interactive playground to preview every field.",coverImage:"charfieldCover.png",backgroundImage:"charfieldBackground.png",techstacks:["React","TypeScript","HTML5 Canvas","Node.js","tsup","Next.js"],links:[{title:"npm Package",link:"https://www.npmjs.com/package/charfield"},{title:"Live Playground",link:"https://charfield.vercel.app/"},{title:"GitHub Repository",link:"https://github.com/ashmitjsg/charfield"}],startDate:"Jun 2026",endDate:""},{id:13,name:"Engineering With Ashmit",description:"Engineering With Ashmit is an Express.js application for sharing my blogs with complete server-side rendering and dynamic content delivery. It has RESTful APIs for managing blogs, user authentication, and dynamic content delivery following MVC pattern. It uses EJS templating engines and Flowbite to create server-side rendered UI, MongoDB to store application Data and Marked.js to convert markdown to HTML for blog content.",coverImage:"EngineeringWithAshmitCover.png",backgroundImage:"EngineeringWithAshmitBackground.png",techstacks:["Node.js","Express.js","Mongo DB","EJS","Tailwind CSS","Flowbite"],links:[{title:"Engineering With Ashmit",link:"https://engineeringwithashmit.ashmit.dev/"},{title:"Codebase",link:"https://github.com/ashmitjsg/EngineeringWithAshmit"},{title:"Docker Image",link:"https://hub.docker.com/r/devilkillerag/engineeringwithashmit"}],startDate:"Jan 2025",endDate:""},{id:12,name:"AsyncAPI Website UI Kit Development",description:"As a GSoC mentee, I contributed to the AsyncAPI Initiative by developing a comprehensive UI Kit for their website. Using Storybook v8, Next.js v14, and TypeScript, I built reusable, modular UI components that enhance visual consistency across the site. My work focused on improving efficiency and reducing redundancy in UI design, enabling developers to quickly access and integrate cohesive elements.",coverImage:"AsyncAPIStorybookCover.png",backgroundImage:"AsyncAPIStorybookBackgroun
4344d.png",techstacks:["Next.js","Tailwind CSS","TypeScript","Storybook"],links:[{title:"AsyncAPI Website",link:"https://www.asyncapi.com/"},{title:"Codebase",link:"https://github.com/asyncapi/website"},{title:"Project Reports",link:"https://engineeringwithashmit.hashnode.dev/series/gsoc24"},{title:"My Contributions",link:"https://github.com/asyncapi/website/pulls?q=is%3Apr+is%3Aclosed+author%3Aashmitjsg+label%3Agsoc"}],startDate:"May 2024",endDate:"Aug 2024"},{id:11,name:"Migration of the AsyncAPI Website from JavaScript to TypeScript and Next.js",description:"This project focused on migrating the AsyncAPI website from JavaScript and Next.js v12 to TypeScript and Next.js v14, enhancing scalability, performance, and developer experience. The migration introduced TypeScript's static typing, improving code maintainability and reducing errors while enabling better autocompletion. Additionally, we refactored components within the Next.js framework, optimized testing by reducing reliance on Cypress, and implemented comprehensive JSDoc documentation for clearer code structure. The project also included a streamlined directory structure for documentation and blog content, as well as improved code formatting using Prettier and ESLint, ensuring a more consistent and maintainable codebase.",coverImage:"AsyncAPIWebsiteCover.png",backgroundImage:"AsyncAPIWebsiteBackground.png",techstacks:["React","Tailwind CSS","TypeScript"],links:[{title:"AsyncAPI Website",link:"https://www.asyncapi.com/"},{title:"Codebase",link:"https://github.com/asyncapi/website"},{title:"Project Report",link:"https://www.asyncapi.com/blog/asyncapi-website-migration"},{title:"My Contributions",link:"https://github.com/asyncapi/website/pulls?q=is%3Apr+is%3Aclosed+author%3Aashmitjsg+-label%3Agsoc"}],startDate:"Feb 2024",endDate:"May 2024"},{id:10,name:"Revamp Modelina Website UI and Codebase",description:"Modelina is an open-source library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents. This project involved building an interactive playground that allows users to experiment with the tool directly on the website, eliminating the need for local configuration and enhancing user engagement. The website was redeveloped based on a new design proposal, and the codebase was migrated from class-based React components to functional components to improve readability, performance, and adhere to modern React standards.",coverImage:"ModelinaCover.png",backgroundImage:"ModelinaBackground.png",techstacks:["React","Tailwind CSS","TypeScript"],links:[{title:"Modelina Website",link:"https://modelina.org/"},{title:"Modelina Playground",link:"https://modelina.org/playground"},{title:"Modelina Codebase",link:"https://github.com/asyncapi/modelina/"},{title:"My Contributions",link:"https://github.com/asyncapi/modelina/pulls?q=is%3Apr+is%3Aclosed+author%3Aashmitjsg"}],startDate:"Oct 2023",endDate:"Apr 2024"},{id:9,name:"QCGE: Quantum Circuit Game Engine",description:"This is a Quantum Circuit Game Engine for integrating Quantum Circuits into your Pygame-based quantum game. You can use it simply by creating an object of the QuantumCircuitGrid class stored in the quantum_circuit.py file. You can install it using the command: pip install qcge",coverImage:"QCGECover.png",backgroundImage:"QCGEBackground.png",techstacks:["Pygame","Qiskit Terra","Numpy"],links:[{title:"Website",link:"https://qcge.vercel.app/"},{title:"PyPI Package Page",link:"https://pypi.org/project/qcge/"},{title:"GitHub Repository",link:"https://github.com/ashmitjsg/Quantum-Circuit-Game-Engine"}],startDate:"Oct 2023",endDate:""},{id:8,name:"QuantaVania: A 2D action-adventure platformer quantum game",description:"QuantaVania is an action-adventure 2D platformer game with the potential to evolve into an open-world sandbox game in which players can learn quantum computing from the ground up while playing, design their own game level and share it with others in the quantum community via our web platform, and mine qubits, quantum gates and power-ups. This project was developed during Quantum Games Hackathon 2023 where it won the Special Prize for Sanrto/Onyx Category for using our game to demonstrate Logistics Optimisation using QUBO and quantum computing software libraries like DWave Ocean SDK, and Qiskit.",coverImage:"QuantaVaniaCover.png",backgroundImage:"QuantaVaniaBackgroun
4344d.png",techstacks:["Python","PyGame","Qiskit","DWave Ocean SDK"],links:[{title:"Play on itch.io",link:"https://ashmitjsg.itch.io/quantavania"},{title:"Repository: QuantaVania",link:"https://github.com/ashmitjsg/QuantaVania"},{title:"Video Demo of the Game",link:"https://youtu.be/hiG8MVEmIc8"}],startDate:"Sept 2023",endDate:"Oct 2023"},{id:6,name:"AskItOut: Doubt Sharing Website for Educational Institutions",description:"AskItOut is a doubt sharing website for educational institutions where students can post their questions to be answered as soon as possible by their seniors and teachers who are experts in the field.",coverImage:"AskItOutCover.png",backgroundImage:"AskItOutBackground.png",techstacks:["ReactJs","TailwindCSS","TipTap","Node.js","Express.js","MongoDb"],links:[{title:"Repository",link:"https://github.com/ashmitjsg/AskItOut"},{title:"AskItOut",link:"https://askitout.vercel.app/"}],startDate:"Feb 2023",endDate:"May 2023"},{id:5,name:"QCrop",description:"An application to use Quantum Computing for Simulating Molecular Engineering for Fertilizer Design. Used Variational Quantum Eigensolver and Error Mitigation Techniques to calculate the Energy Landscape of different molecules.",coverImage:"QcropCover.jpg",backgroundImage:"QcropBackground.png",techstacks:["Qiskit","React","Python"],links:[{title:"Repository",link:"https://github.com/ashmitjsg/NYUAD-2023/tree/main/QCrop"}],startDate:"April 2023",endDate:""},{id:4,name:"Quantum Breakout",description:"Created a Quantum version of classical Breakout Game for helping school students to easily learn the Qubit Manipulation using different Quantum Gates.",coverImage:"QuantumBreakoutCover.png",backgroundImage:"QuantumBreakoutBackground.png",techstacks:["Pygame","Qiskit","Python"],links:[{title:"Play on itch.io",link:"https://ashmitjsg.itch.io/quantum-breakout"},{title:"Repository",link:"https://github.com/ashmitjsg/Quantum-Breakout"},{title:"Video Demo of the Game",link:"https://youtu.be/jnlsQTBWw98"}],startDate:"March 2023",endDate:""},{id:3,name:"Unravel Quantum: Collection of Demos to Quantum Algorithms [In Progress...]",description:"Unravel Quantum is a collection of demos for all of the fundamental quantum computing algorithms that I studied when I started my journey in the field of quantum computing. I noticed that there is a lack of quantum algorithm demos on the internet, which makes it difficult for beginners (like I felt when I was a beginner) to get started with quantum algorithms. In my spare time, I'm rewriting all of the algorithms and attempting to make a generalized demo for them.",coverImage:"UnravelQuantumCover.png",backgroundImage:"UnravelQuantumBackgroun
4344d.png",techstacks:["Streamlit","Qiskit","Python","Quantum Computing"],links:[{title:"Unravel Quantum",link:"https://unravelquantum.streamlit.app/"},{title:"Repository",link:"https://github.com/ashmitjsg/UnravelQuantum"}],startDate:"Aug 2023",endDate:""},{id:2,name:"Team Abraxas Website",description:"Developed the official website of Team Abraxas at the annual tech-fest of NIT Hamirpur: Nimbus 2023",coverImage:"AbraxasCover.png",backgroundImage:"AbraxasBackground.png",techstacks:["Figma","ReactJs","react-three-fiber","react-three-drei"],links:[{title:"Team Abraxas Website",link:"https://abraxas-2023.vercel.app/"},{title:"Repository",link:"https://github.com/TeamAbraxas/AbraxasWeb23"}],startDate:"March 2023",endDate:"April 2023"},{id:0,name:"Siya's Quantum Odyssey",description:"Created a web game based on the basics of Quantum Computing to demonstrate quantum interference and quantum superposition of qubits. Integrated Alan AI voice assistant to communicate with the user and start different parts of the game. Won the Best Beginner's Hack Title for this project at Electrothon 4.0 in 2022.",coverImage:"SiyasQuantumOdysseyCover.png",backgroundImage:"SiyasQuantumOdysseyBackground.png",techstacks:["HTML5 Canvas","Javascript"],links:[{title:"Devfolio",link:"https://devfolio.co/projects/siyas-quantum-oddessy-5d5c"},{title:"Repository",link:"https://github.com/ashmitjsg/Siya-s-Quantum-Oddyssey"},{title:"Website",link:"https://siyasquantumoddyssey.vercel.app/"}],startDate:"February 2022",endDate:""}],aee=({setCurrentSection:t,timeOfLastClick:e})=>{const{ref:n}=ry({sectionName:"#cv_projects",threshold:.3,setCurrentCVSection:t,timeOfLastClickOnCVSection:e});return F.jsx("section",{ref:n,id:"cv_projects","aria-label":"My Projects",className:"section scroll-mt-16 scroll pt-8",children:Kk.map(i=>F.jsxs("div",{className:"py-5 flex justify-start gap-2",children:[F.jsxs("div",{className:"text-sm text-slate-400 w-1/3",children:[i.startDate,i.endDate?` - ${i.endDate}`:""]}),F.jsxs("div",{className:"w-2/3",children:[F.jsx("h3",{className:"text-slate-100 text-lg",children:i.name}),F.jsx("h4",{className:"text-slate-300 text-base",children:i.description}),F.jsx("ul",{className:"flex justify-start items-start gap-2 font-light flex-wrap py-2",children:i.techstacks.length!==0&&i.techstacks.map(r=>F.jsx("li",{className:"",children:F.jsx(gE,{tag:r})},r))}),F.jsx("ul",{className:"flex flex-wrap justify-start items-start gap-8 font-light",children:i.links.length!==0&&i.links.map(r=>F.jsx("li",{className:"",children:F.jsx(zy,{title:r.title,link:r.link})},r.title))})]})]},i.id))})},lee="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='rgb(148%20163%20184%20/%201)'%20class='h-6%20w-6'%20aria-hidden='true'%3e%3cpath%20d='M8%200C3.58%200%200%203.58%200%208c0%203.54%202.29%206.53%205.47%207.59.4.07.55-.17.55-.38%200-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01%201.08.58%201.23.82.72%201.21%201.87.87%202.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95%200-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12%200%200%20.67-.21%202.2.82.64-.18%201.32-.27%202-.27.68%200%201.36.09%202%20.27%201.53-1.04%202.2-.82%202.2-.82.44%201.1.16%201.92.08%202.12.51.56.82%201.27.82%202.15%200%203.07-1.87%203.75-3.65%203.95.29.25.54.73.54%201.48%200%201.07-.01%201.93-.01%202.2%200%20.21.15.46.55.38A8.013%208.013%200%200016%208c0-4.42-3.58-8-8-8z'%3e%3c/path%3e%3c/svg%3e",cee="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='rgb(148%20163%20184%20/%201)'%20class='h-6%20w-6'%20aria-hidden='true'%3e%3cpath%20d='M20.5%202h-17A1.5%201.5%200%20002%203.5v17A1.5%201.5%200%20003.5%2022h17a1.5%201.5%200%20001.5-1.5v-17A1.5%201.5%200%200020.5%202zM8%2019H5v-9h3zM6.5%208.25A1.75%201.75%200%20118.3%206.5a1.78%201.78%200%2001-1.8%201.75zM19%2019h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74%201.74%200%200013%2014.19a.66.66%200%20000%20.14V19h-3v-9h2.9v1.3a3.11%203.11%200%20012.7-1.4c1.55%200%203.36.86%203.36%203.66z'%3e%3c/path%3e%3c/svg%3e",uee="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20248%20204'%20fill='rgb(148%20163%20184%20/%201)'%20class='h-6%20w-6'%20aria-hidden='true'%3e%3cpath%20id='white_background'%20d='M221.95,51.29c0.15,2.17,0.15,4.34,0.15,6.53c0,66.73-50.8,143.69-143.69,143.69v-0.04%20C50.97,201.51,24.1,193.65,1,178.83c3.99,0.48,8,0.72,12.02,0.73c22.74,0.02,44.83-7.61,62.72-21.66%20c-21.61-0.41-40.56-14.5-47.18-35.07c7.57,1.46,15.37,1.16,22.8-0.87C27.8,117.2,10.85,96.5,10.85,72.46c0-0.22,0-0.43,0-0.64%20c7.02,3.91,14.88,6.08,22.92,6.32C11.58,63.31,4.74,33.79,18.14,10.71c25.64,31.55,63.47,50.73,104.08,52.76%20c-4.07-17.54,1.49-35.92,14.61-48.25c20.34-19.12,52.33-18.14,71.45,2.19c11.31-2.23,22.15-6.38,32.07-12.26%20c-3.77,11.69-11.66,21.62-22.2,27.93c10.01-1.18,19.79-3.86,29-7.95C240.37,35.29,231.83,44.14,221.95,51.29z'%3e%3c/path%3e%3c/svg%3e",dee="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201000%201000'%20fill='rgb(148%20163%20184%20/%201)'%20class='h-6%20w-6'%20aria-hidden='true'%3e%3cpath%20d='M295.42,6c-53.2,2.51-89.53,11-121.29,23.48-32.87,12.81-60.73,30-88.45,57.82S40.89,143,28.17,175.92c-12.31,31.83-20.65,68.19-23,121.42S2.3,367.68,2.56,503.46,3.42,656.26,6,709.6c2.54,53.19,11,89.51,23.48,121.28,12.83,32.87,30,60.72,57.83,88.45S143,964.09,176,976.83c31.8,12.29,68.17,20.67,121.39,23s70.35,2.87,206.09,2.61,152.83-.86,206.16-3.39S799.1,988,830.88,975.58c32.87-12.86,60.74-30,88.45-57.84S964.1,862,976.81,829.06c12.32-31.8,20.69-68.17,23-121.35,2.33-53.37,2.88-70.41,2.62-206.17s-.87-152.78-3.4-206.1-11-89.53-23.47-121.32c-12.85-32.87-30-60.7-57.82-88.45S862,40.87,829.07,28.19c-31.82-12.31-68.17-20.7-121.39-23S637.33,2.3,501.54,2.56,348.75,3.4,295.42,6m5.84,903.88c-48.75-2.12-75.22-10.22-92.86-17-23.36-9-40-19.88-57.58-37.29s-28.38-34.11-37.5-57.42c-6.85-17.64-15.1-44.08-17.38-92.83-2.48-52.69-3-68.51-3.29-202s.22-149.29,2.53-202c2.08-48.71,10.23-75.21,17-92.84,9-23.39,19.84-40,37.29-57.57s34.1-28.39,57.43-37.51c17.62-6.88,44.06-15.06,92.79-17.38,52.73-2.5,68.53-3,202-3.29s149.31.21,202.06,2.53c48.71,2.12,75.22,10.19,92.83,17,23.37,9,40,19.81,57.57,37.29s28.4,34.07,37.52,57.45c6.89,17.57,15.07,44,17.37,92.76,2.51,52.73,3.08,68.54,3.32,202s-.23,149.31-2.54,202c-2.13,48.75-10.21,75.23-17,92.89-9,23.35-19.85,40-37.31,57.56s-34.09,28.38-57.43,37.5c-17.6,6.87-44.07,15.07-92.76,17.39-52.73,2.48-68.53,3-202.05,3.29s-149.27-.25-202-2.53m407.6-674.61a60,60,0,1,0,59.88-60.1,60,60,0,0,0-59.88,60.1M245.77,503c.28,141.8,115.44,256.49,257.21,256.22S759.52,643.8,759.25,502,643.79,245.48,502,245.76,245.5,361.22,245.77,503m90.06-.18a166.67,166.67,0,1,1,167,166.34,166.65,166.65,0,0,1-167-166.34'%3e%3c/path%3e%3c/svg%3e",hee="data:image/svg+xml,%3csvg%20class='h-6%20w-6'%20viewBox='0%200%2024%2024'%20fill='rgb(148%20163%20184%20/%201)'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20strokeWidth='0'%3e%3c/g%3e%3cg%20id='SVGRepo_tracerCarrier'%20strokeLinecap='round'%20strokeLinejoin='round'%3e%3c/g%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%20id='style=linear'%3e%3cg%20id='email'%3e%3cpath%20id='vector'%20d='M17%2020.5H7C4%2020.5%202%2019%202%2015.5V8.5C2%205%204%203.5%207%203.5H17C20%203.5%2022%205%2022%208.5V15.5C22%2019%2020%2020.5%2017%2020.5Z'%20stroke='%23000000'%2
43440strokeWidth='1.5'%20strokeMiterlimit='10'%20strokeLinecap='round'%20strokeLinejoin='round'%3e%3c/path%3e%3cpath%20id='vector_2'%20d='M18.7698%207.7688L13.2228%2012.0551C12.5025%2012.6116%2011.4973%2012.6116%2010.777%2012.0551L5.22998%207.7688'%20stroke='%23000000'%20strokeWidth='1.5'%20strokeLinecap='round'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",fee="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='rgb(148%20163%20184%20/%201)'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20strokeWidth='0'%3e%3c/g%3e%3cg%20id='SVGRepo_tracerCarrier'%20strokeLinecap='round'%20strokeLinejoin='round'%3e%3c/g%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20fill-rule='evenodd'%20clipRule='evenodd'%20d='M20%201C21.6569%201%2023%202.34315%2023%204V20C23%2021.6569%2021.6569%2023%2020%2023H4C2.34315%2023%201%2021.6569%201%2020V4C1%202.34315%202.34315%201%204%201H20ZM20%203C20.5523%203%2021%203.44772%2021%204V20C21%2020.5523%2020.5523%2021%2020%2021H15V13.9999H17.0762C17.5066%2013.9999%2017.8887%2013.7245%2018.0249%2013.3161L18.4679%2011.9871C18.6298%2011.5014%2018.2683%2010.9999%2017.7564%2010.9999H15V8.99992C15%208.49992%2015.5%207.99992%2016%207.99992H18C18.5523%207.99992%2019%207.5522%2019%206.99992V6.31393C19%205.99091%2018.7937%205.7013%2018.4813%205.61887C17.1705%205.27295%2016%205.27295%2016%205.27295C13.5%205.27295%2012%206.99992%2012%208.49992V10.9999H10C9.44772%2010.9999%209%2011.4476%209%2011.9999V12.9999C9%2013.5522%209.44771%2013.9999%2010%2013.9999H12V21H4C3.44772%2021%203%2020.5523%203%2020V4C3%203.44772%203.44772%203%204%203H20Z'%20fill='rgb(148%20163%20184%20/%201)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",pee="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20strokeWidth='0'%3e%3c/g%3e%3cg%20id='SVGRepo_tracerCarrier'%20strokeLinecap='round'%20strokeLinejoin='round'%3e%3c/g%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20fill-rule='evenodd'%20clipRule='evenodd'%20d='M4.7596%202.41255C5.21156%201.27671%206.83902%201.33597%207.20715%202.5017L8.94344%207.99997H15.0566L16.7929%202.5017C17.161%201.33598%2018.7885%201.2767%2019.2405%202.41255L21.7145%208.63025L22.6709%2011.0338C22.9812%2011.8135%2022.7716%2012.7041%2022.1462%2013.2637L12.6668%2021.7452C12.2872%2022.0849%2011.7129%2022.0849%2011.3332%2021.7452L1.85387%2013.2637C1.22844%2012.7041%201.0189%2011.8135%201.32917%2011.0338L2.28554%208.63025L4.7596%202.41255ZM14.425%209.99996H9.57502L12%2017.6792L14.425%209.99996ZM9.94774%2017.8219L7.47767%209.99996H3.89304L3.18746%2011.7732L9.94774%2017.8219ZM4.68885%207.99997H6.84609L5.89157%204.97733L4.68885%207.99997ZM14.0523%2017.8219L16.5224%209.99996H20.107L20.8126%2011.7732L14.0523%2017.8219ZM19.3112%207.99997H17.154L18.1085%204.97733L19.3112%207.99997Z'%20fill='rgb(148%20163%20184%20/%201)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",mee="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20strokeWidth='0'%3e%3c/g%3e%3cg%20id='SVGRepo_tracerCarrier'%20strokeLinecap='round'%20strokeLinejoin='round'%3e%3c/g%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20fill-rule='evenodd'%20clipRule='evenodd'%20d='M12%2023C18.0751%2023%2023%2018.0751%2023%2012C23%205.92487%2018.0751%201%2012%201C5.92487%201%201%205.92487%201%2012C1%2018.0751%205.92487%2023%2012%2023ZM5.14386%2017.8201C3.81099%2016.2515%203.00683%2014.2197%203.00683%2012L3.00683%2011.9978C6.61307%2011.9618%209.57567%2011.4838%2012.2422%2010.5779C12.4668%2011.0605%2012.6847%2011.5534%2012.8956%2012.0564C12.5555%2012.1691%2012.221%2012.2949%2011.8918%2012.4335C9.24177%2013.5489%207.00538%2015.4612%205.14386%2017.8201ZM6.60614%2019.1967C8.10884%2020.3248%209.97636%2020.9932%2012%2020.9932C13.2188%2020.9932%2014.3809%2020.7507%2015.4409%2020.3114C14.9668%2018.0368%2014.352%2015.907%2013.6265%2013.9217C13.3003%2014.0264%2012.9807%2014.1451%2012.6677%2014.2768C10.356%2015.2499%208.33843%2016.9649%206.60614%2019.1967ZM15.5924%2013.4765C16.2479%2015.3019%2016.8129%2017.2399%2017.267%2019.2902C19.048%2018.0013%2020.338%2016.0757%2020.8032%2013.8473C18.9143%2013.3589%2017.1821%2013.2604%2015.5924%2013.4765ZM14.8575%2011.5662C16.754%2011.2412%2018.7996%2011.3067%2020.9917%2011.8332C20.9578%209.97415%2020.3599%208.25291%2019.3619%206.8334C17.6358%208.0531%2015.9276%209.06168%2014.1111%209.85398C14.3687%2010.4121%2014.6177%2010.9829%2014.8575%2011.5662ZM11.3457%208.76846C8.99734%209.53429%206.39047%209.94463%203.2312%209.9948C3.85725%207.24565%205.74294%204.97565%208.24906%203.82401C9.34941%205.31262%2010.3933%206.96064%2011.3457%208.76846ZM13.2302%208.05623C14.8876%207.34152%2016.4466%206.43089%2018.0282%205.32624C16.4333%203.88469%2014.3192%203.00683%2012%203.00683C11.4014%203.00683%2010.8165%203.06531%2010.2506%203.17688C11.3103%204.66337%2012.3129%206.28992%2013.2302%208.05623Z'%20fill='rgb(148%20163%20184%20/%201)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",gee=[{name:"Email",link:nn.email},{name:"GitHub",link:"/github"},{name:"GitLab",link:"/gitlab"},{name:"LinkedIn",link:"/linkedin"},{name:"Twitter",link:"/twitter"},{name:"Dribbble",link:"/dribbble"},{name:"Instagram",link:"/instagram"},{name:"Facebook",link:"/facebook"}
4344],LI=()=>F.jsxs("div",{className:"flex flex-col gap-4",children:[F.jsx("ul",{id:"cv_socials",className:"ml-1 mt-8 flex items-center","aria-label":"Social media",children:gee.map(t=>F.jsxs("li",{className:"mr-5 text-xs hover:animate-bounce",children:[F.jsx("span",{className:"sr-only",children:t.name}),F.jsx(jl,{to:t.link,className:"block hover:text-slate-200",target:"_blank",rel:"noreferrer",children:F.jsx("img",{src:t.name==="Email"&&hee||t.name==="GitHub"&&lee||t.name==="LinkedIn"&&cee||t.name==="Twitter"&&uee||t.name==="Instagram"&&dee||t.name==="Facebook"&&fee||t.name==="GitLab"&&pee||t.name==="Dribbble"&&mee,alt:t.name,width:24,height:24})})]},t.name))}),F.jsxs("div",{className:"text-md font-light text-slate-400 flex gap-4 items-center content-center",children:[F.jsx(jl,{to:"/contact",className:"hover:underline",children:"Are you convinced to contact me now ?"}),F.jsx("svg",{className:"fill-slate-400 animate-horizontal-oscillate",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",children:F.jsx("path",{d:"M21.883 12l-7.527 6.235.644.765 9-7.521-9-7.479-.645.764 7.529 6.236h-21.884v1h21.883z"})})]})]}),vee=[{name:"About",id:"#cv_about"},{name:"Education",id:"#cv_education"},{name:"Experience",id:"#cv_experience"},{name:"Projects",id:"#cv_projects"}],yee=()=>{const[t,e]=z.useState("#cv_about"),[n,i]=z.useState(0);return F.jsxs("main",{className:"mx-auto min-h-screen max-w-screen-xl px-6 pt-4 pb-12 md:px-12 md:py-20 lg:px-24 lg:py-0",children:[F.jsx(ip,{}),F.jsxs("div",{className:"w-full h-full mt-16 lg:flex lg:justify-between lg:gap-4",children:[F.jsx("div",{className:"relative",children:F.jsx("div",{id:"cv_head",className:"lg:fixed lg:top-0 lg:flex lg:max-h-screen lg:h-full lg:w-1/2 lg:flex-col lg:justify-between lg:py-14",children:F.jsxs("div",{className:"lg:sticky lg:top-0 lg:flex lg:max-h-screen lg:h-full lg:w-1/2 lg:flex-col lg:justify-between lg:py-10",children:[F.jsxs("div",{children:[F.jsx("h1",{className:"text-3xl font-bold tracking-tight text-slate-200 sm:text-5xl",children:F.jsxs("a",{href:"/",children:["Ashmit ",F.jsx("span",{className:"hidden sm:inline",children:"JaiSarita "}),"Gupta"]})}),F.jsx("h2",{className:"mt-3 text-lg font-medium tracking-tight text-slate-300 sm:text-xl",children:"Software Development Engineer"}),F.jsx("p",{className:"mt-4 lg:max-w-xs leading-normal text-slate-400",children:"Crafting accessible web and quantum computing experiences for all."}),F.jsxs("div",{className:"mt-3 flex justify-start items-center gap-2",children:[F.jsxs("a",{href:`${sS}/pdfs/CV_Ashmit_JaiSarita_Gupta.pdf`,download:!0,className:"group bg-white text-black px-7 py-3 flex justify-center items-center gap-3 rounded-full hover:bg-gray-200 active:scale-95 transition",children:[" CV ",F.jsx(rS,{className:"opacity-70 group-hover:translate-y-[1px] transition"})]}),F.jsxs("a",{href:`${sS}/pdfs/Resume_Ashmit_JaiSarita_Gupta.pdf`,download:!0,className:"group bg-white text-black px-7 py-3 flex justify-center items-center gap-3 rounded-full hover:bg-gray-200 active:scale-95 transition",children:[" Resume ",F.jsx(rS,{className:"opacity-70 group-hover:translate-y-[1px] transition"})]})]}),F.jsx("nav",{id:"cv_sections",className:"nav hidden lg:block","aria-label":"In-page jump links",children:F.jsx("ul",{className:"mt-16 w-max",children:vee.map(r=>F.jsx("li",{children:F.jsxs(jl,{className:"group flex items-center py-3",to:r.id,onClick:()=>{e(r.id),i(Date.now())},children:[F.jsx("span",{className:ls("nav-indicator mr-4 h-px w-8 bg-slate-600 transition-all group-hover:w-16 group-hover:bg-slate-200 group-focus-visible:w-16 group-focus-visible:bg-slate-200 motion-reduce:transition-none",{"w-16 bg-slate-200":t===r.id})}),F.jsx("span",{className:ls("nav-text text-xs font-bold uppercase tracking-widest text-slate-500 group-hover:text-slate-200 group-focus-visible:text-slate-200",{"text-white":t===r.id}),children:r.name})]})},r.id))})})]}),F.jsx("div",{className:"hidden lg:block",children:F.jsx(LI,{})})]})})}),F.jsxs("div",{id:"cv_main",className:"pt-5 lg:pt-24 lg:w-1/2 lg:py-14",children:[F.jsx(nee,{setCurrentSection:e,timeOfLastClick:n}),F.jsx(ree,{setCurrentSection:e,timeOfLastClick:n}),F.jsx(oee,{setCurrentSection:e,timeOfLastClick:n}),F.jsx(aee,{setCurrentSection:e,timeOfLastClick:n})]}),F.jsx("div",{className:"block lg:hidden",children:F.jsx(LI,{})})]}),F.jsxs("footer",{className:"w-[90%] pb-10 pt-6 flex flex-col sm:flex-row justify-center items-center",children:["Made with 🌕 material by  ",F.jsx("a",{href:nn.linkedin,target:"_blank",className:"underline hover:no-underline",children:"Ashmit JaiSarita Gupta"})]}),F.jsx(md,{})]})};class Sp{constructor(e=0,n="Network Error"){this.status=e,this.text=n}}const xee=()=>{if(!(typeof localStorage>"u"))return{get:t=>Promise.resolve(localStorage.getItem(t)),set:(t,e)=>Promise.resolve(localStorage.setItem(t,e)),remove:t=>Promise.resolve(localStorage.removeItem(t))}},li={origin:"https://api.emailjs.com",blockHeadless:!1,storageProvider:xee()},vE=t=>t?typeof t=="string"?{publicKey:t}:t.toString()==="[object Object]"?t:{}:{},_ee=(t,e="https://api.emailjs.com")=>{if(!t)return;const n=vE(t);li.publicKey=n.publicKey,li.blockHeadless=n.blockHeadless,li.storageProvider=n.storageProvider,li.blockList=n.blockList,li.limitRate=n.limitRate,li.origin=n.origin||e},qk=async(t,e,n={})=>{const i=await fetch(li.origin+t,{method:"POST",headers:n,body:e}),r=await i.text(),s=new Sp(i.status,r);if(i.ok)return s;throw s},Qk=(t,e,n)=>{if(!t||typeof t!="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";
4344if(!n||typeof n!="string")throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates"},Aee=t=>{if(t&&t.toString()!=="[object Object]")throw"The template params have to be the object. Visit https://www.emailjs.com/docs/sdk/send/"},Yk=t=>t.webdriver||!t.languages||t.languages.length===0,Zk=()=>new Sp(451,"Unavailable For Headless Browser"),See=(t,e)=>{if(!Array.isArray(t))throw"The BlockList list has to be an array";if(typeof e!="string")throw"The BlockList watchVariable has to be a string"},wee=t=>{var e;return!((e=t.list)!=null&&e.length)||!t.watchVariable},Mee=(t,e)=>t instanceof FormData?t.get(e):t[e],$k=(t,e)=>{if(wee(t))return!1;See(t.list,t.watchVariable);const n=Mee(e,t.watchVariable);return typeof n!="string"?!1:t.list.includes(n)},eO=()=>new Sp(403,"Forbidden"),Eee=(t,e)=>{if(typeof t!="number"||t<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"},Cee=async(t,e,n)=>{const i=Number(await n.get(t)||0);return e-Date.now()+i},tO=async(t,e,n)=>{if(!e.throttle||!n)return!1;Eee(e.throttle,e.id);const i=e.id||t;return await Cee(i,e.throttle,n)>0?!0:(await n.set(i,Date.now().toString()),!1)},nO=()=>new Sp(429,"Too Many Requests"),Tee=async(t,e,n,i)=>{const r=vE(i),s=r.publicKey||li.publicKey,o=r.blockHeadless||li.blockHeadless,a=r.storageProvider||li.storageProvider,l={...li.blockList,...r.blockList},c={...li.limitRate,...r.limitRate};return o&&Yk(navigator)?Promise.reject(Zk()):(Qk(s,t,e),Aee(n),n&&$k(l,n)?Promise.reject(eO()):await tO(location.pathname,c,a)?Promise.reject(nO()):qk("/api/v1.0/email/send",JSON.stringify({lib_version:"4.4.1",user_id:s,service_id:t,template_id:e,template_params:n}),{"Content-type":"application/json"}))},bee=t=>{if(!t||t.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of the form"},Ree=t=>typeof t=="string"?document.querySelector(t):t,Pee=async(t,e,n,i)=>{const r=vE(i),s=r.publicKey||li.publicKey,o=r.blockHeadless||li.blockHeadless,a=li.storageProvider||r.storageProvider,l={...li.blockList,...r.blockList},c={...li.limitRate,...r.limitRate};if(o&&Yk(navigator))return Promise.reject(Zk());const h=Ree(n);Qk(s,t,e),bee(h);const f=new FormData(h);return $k(l,f)?Promise.reject(eO()):await tO(location.pathname,c,a)?Promise.reject(nO()):(f.append("lib_version","4.4.1"),f.append("service_id",t),f.append("template_id",e),f.append("user_id",s),qk("/api/v1.0/email/send-form",f))},Iee={init:_ee,send:Tee,sendForm:Pee,EmailJSResponseStatus:Sp},Gf=t=>typeof t=="number"&&!isNaN(t),Ol=t=>typeof t=="string",fr=t=>typeof t=="function",o0=t=>Ol(t)||fr(t)?t:null,FS=t=>z.isValidElement(t)||Ol(t)||fr(t)||Gf(t);function Bee(t,e,n){n===void 0&&(n=300);const{scrollHeight:i,style:r}=t;requestAnimationFrame(()=>{r.minHeight="initial",r.height=i+"px",r.transition=`all ${n}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(e,n)})})}function Hy(t){let{enter:e,exit:n,appendPosition:i=!1,collapse:r=!0,collapseDuration:s=300}=t;return function(o){let{children:a,position:l,preventExitTransition:c,done:h,nodeRef:f,isIn:p,playToast:m}=o;const v=i?`${e}--${l}`:e,S=i?`${n}--${l}`:n,A=z.useRef(0);return z.useLayoutEffect(()=>{const g=f.current,x=v.split(" "),_=M=>{M.target===f.current&&(m(),g.removeEventListener("animationend",_),g.removeEventListener("animationcancel",_),A.current===0&&M.type!=="animationcancel"&&g.classList.remove(...x))};g.classList.add(...x),g.addEventListener("animationend",_),g.addEventListener("animationcancel",_)}
4344,[]),z.useEffect(()=>{const g=f.current,x=()=>{g.removeEventListener("animationend",x),r?Bee(g,h,s):h()};p||(c?x():(A.current=1,g.className+=` ${S}`,g.addEventListener("animationend",x)))},[p]),Ft.createElement(Ft.Fragment,null,a)}}function DI(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const ki=new Map;let Vf=[];const kS=new Set,Lee=t=>kS.forEach(e=>e(t)),iO=()=>ki.size>0;function rO(t,e){var n;if(e)return!((n=ki.get(e))==null||!n.isToastActive(t));let i=!1;return ki.forEach(r=>{r.isToastActive(t)&&(i=!0)}),i}function sO(t,e){FS(t)&&(iO()||Vf.push({content:t,options:e}),ki.forEach(n=>{n.buildToast(t,e)}))}function NI(t,e){ki.forEach(n=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===n.id&&n.toggle(t,e==null?void 0:e.id):n.toggle(t,e==null?void 0:e.id)})}function Dee(t){const{subscribe:e,getSnapshot:n,setProps:i}=z.useRef(function(s){const o=s.containerId||1;return{subscribe(a){const l=function(h,f,p){let m=1,v=0,S=[],A=[],g=[],x=f;const _=new Map,M=new Set,b=()=>{g=Array.from(_.values()),M.forEach(B=>B())},C=B=>{A=B==null?[]:A.filter(R=>R!==B),b()},P=B=>{const{toastId:R,onOpen:T,updateId:L,children:W}=B.props,Y=L==null;B.staleId&&_.delete(B.staleId),_.set(R,B),A=[...A,B.props.toastId].filter(q=>q!==B.staleId),b(),p(DI(B,Y?"added":"updated")),Y&&fr(T)&&T(z.isValidElement(W)&&W.props)};return{id:h,props:x,observe:B=>(M.add(B),()=>M.delete(B)),toggle:(B,R)=>{_.forEach(T=>{R!=null&&R!==T.props.toastId||fr(T.toggle)&&T.toggle(B)})},removeToast:C,toasts:_,clearQueue:()=>{v-=S.length,S=[]},buildToast:(B,R)=>{if((ue=>{let{containerId:Ae,toastId:te,updateId:ce}=ue;const xe=Ae?Ae!==h:h!==1,_e=_.has(te)&&ce==null;return xe||_e})(R))return;const{toastId:T,updateId:L,data:W,staleId:Y,delay:q}=R,j=()=>{C(T)},Z=L==null;Z&&v++;const H={...x,style:x.toastStyle,key:m++,...Object.fromEntries(Object.entries(R).filter(ue=>{let[Ae,te]=ue;return te!=null})),toastId:T,updateId:L,data:W,closeToast:j,isIn:!1,className:o0(R.className||x.toastClassName),bodyClassName:o0(R.bodyClassName||x.bodyClassName),progressClassName:o0(R.progressClassName||x.progressClassName),autoClose:!R.isLoading&&(D=R.autoClose,X=x.autoClose,D===!1||Gf(D)&&D>0?D:X),deleteToast(){const ue=_.get(T),{onClose:Ae,children:te}=ue.props;fr(Ae)&&Ae(z.isValidElement(te)&&te.props),p(DI(ue,"removed")),_.delete(T),v--,v<0&&(v=0),S.length>0?P(S.shift()):b()}};var D,X;H.closeButton=x.closeButton,R.closeButton===!1||FS(R.closeButton)?H.closeButton=R.closeButton:R.closeButton===!0&&(H.closeButton=!FS(x.closeButton)||x.closeButton);let J=B;z.isValidElement(B)&&!Ol(B.type)?J=z.cloneElement(B,{closeToast:j,toastProps:H,data:W}):fr(B)&&(J=B({closeToast:j,toastProps:H,data:W}));const $={content:J,props:H,staleId:Y};x.limit&&x.limit>0&&v>x.limit&&Z?S.push($):Gf(q)?setTimeout(()=>{P($)},q):P($)},setProps(B){x=B},setToggle:(B,R)=>{_.get(B).toggle=R},isToastActive:B=>A.some(R=>R===B),getSnapshot:()=>x.newestOnTop?g.reverse():g}}(o,s,Lee);ki.set(o,l);const c=l.observe(a);return Vf.forEach(h=>sO(h.content,h.options)),Vf=[],()=>{c(),ki.delete(o)}},setProps(a){var l;(l=ki.get(o))==null||l.setProps(a)},getSnapshot(){var a;return(a=ki.get(o))==null?void 0:a.getSnapshot()}}}(t)).current;i(t);const r=z.useSyncExternalStore(e,n,n);return{getToastToRender:function(s){if(!r)return[];const o=new Map;return r.forEach(a=>{const{position:l}=a.props;o.has(l)||o.set(l,[]),o.get(l).push(a)}),Array.from(o,a=>s(a[0],a[1]))},isToastActive:rO,count:r==null?void 0:r.length}}function Nee(t){const[e,n]=z.useState(!1),[i,r]=z.useState(!1),s=z.useRef(null),o=z.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:c,onClick:h,closeOnClick:f}=t;var p,m;function v(){n(!0)}function S(){n(!1)}function A(_){const M=s.current;o.canDrag&&M&&(o.didMove=!0,e&&S(),o.delta=t.draggableDirection==="x"?_.clientX-o.start:_.clientY-o.start,o.start!==_.clientX&&(o.canCloseOnClick=!1),M.style.transform=`translate3d(${t.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,M.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",g);const _=s.current;if(o.canDrag&&o.didMove&&_){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return r(!0),t.closeToast(),void t.collapseAll();_.style.transition="transform 0.2s, opacity 0.2s",_.style.removeProperty("transform"),_.style.removeProperty("opacity")}}(m=ki.get((p={id:t.toastId,containerId:t.containerId,fn:n}).containerId||1))==null||m.setToggle(p.id,p.fn),z.useEffect(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||S(),window.addEventListener("focus",v),window.addEventListener("blur",S),()=>{window.removeEventListener("focus",v),window.removeEventListener("blur",S)}},[t.pauseOnFocusLoss]);const x={onPointerDown:function(_){if(t.draggable===!0||t.draggable===_.pointerType){o.didMove=!1,document.addEventListener("pointermove",A),document.addEventListener("pointerup",g);const M=s.current;o.canCloseOnClick=!0,o.canDrag=!0,M.style.transition="none",t.draggableDirection==="x"?(o.start=_.clientX,o.removalDistance=M.offsetWidth*(t.draggablePercent/100)):(o.start=_.clientY,o.removalDistance=M.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(_){const{top:M,bottom:b,left:C,right:P}=s.current.getBoundingClientRect();_.nativeEvent.type!=="touchend"&&t.pauseOnHover&&_.clientX>=C&&_.clientX<=P&&_.clientY>
4344=M&&_.clientY<=b?S():v()}};return a&&l&&(x.onMouseEnter=S,t.stacked||(x.onMouseLeave=v)),f&&(x.onClick=_=>{h&&h(_),o.canCloseOnClick&&c()}),{playToast:v,pauseToast:S,isRunning:e,preventExitTransition:i,toastRef:s,eventHandlers:x}}function Fee(t){let{delay:e,isRunning:n,closeToast:i,type:r="default",hide:s,className:o,style:a,controlledProgress:l,progress:c,rtl:h,isIn:f,theme:p}=t;const m=s||l&&c===0,v={...a,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};l&&(v.transform=`scaleX(${c})`);const S=ls("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":h}),A=fr(o)?o({rtl:h,type:r,defaultClassName:S}):ls(S,o),g={[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{f&&i()}};return Ft.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},Ft.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${r}`}),Ft.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:A,style:v,...g}))}let kee=1;const oO=()=>""+kee++;function Oee(t){return t&&(Ol(t.toastId)||Gf(t.toastId))?t.toastId:oO()}function $h(t,e){return sO(t,e),e.toastId}function Bv(t,e){return{...e,type:e&&e.type||t,toastId:Oee(e)}}function Ug(t){return(e,n)=>$h(e,Bv(t,n))}function Jt(t,e){return $h(t,Bv("default",e))}Jt.loading=(t,e)=>$h(t,Bv("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Jt.promise=function(t,e,n){let i,{pending:r,error:s,success:o}=e;r&&(i=Ol(r)?Jt.loading(r,n):Jt.loading(r.render,{...n,...r}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(h,f,p)=>{if(f==null)return void Jt.dismiss(i);const m={type:h,...a,...n,data:p},v=Ol(f)?{render:f}:f;return i?Jt.update(i,{...m,...v}):Jt(v.render,{...m,...v}),p},c=fr(t)?t():t;return c.then(h=>l("success",o,h)).catch(h=>l("error",s,h)),c},Jt.success=Ug("success"),Jt.info=Ug("info"),Jt.error=Ug("error"),Jt.warning=Ug("warning"),Jt.warn=Jt.warning,Jt.dark=(t,e)=>$h(t,Bv("default",{theme:"dark",...e})),Jt.dismiss=function(t){(function(e){var n;if(iO()){if(e==null||Ol(n=e)||Gf(n))ki.forEach(i=>{i.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const i=ki.get(e.containerId);i?i.removeToast(e.id):ki.forEach(r=>{r.removeToast(e.id)})}}else Vf=Vf.filter(i=>e!=null&&i.options.toastId!==e)})(t)},Jt.clearWaitingQueue=function(t){t===void 0&&(t={}),ki.forEach(e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()})},Jt.isActive=rO,Jt.update=function(t,e){e===void 0&&(e={});const n=((i,r)=>{var s;let{containerId:o}=r;return(s=ki.get(o||1))==null?void 0:s.toasts.get(i)})(t,e);if(n){const{props:i,content:r}=n,s={delay:100,...i,...e,toastId:e.toastId||t,updateId:oO()};s.toastId!==t&&(s.staleId=t);const o=s.render||r;delete s.render,$h(o,s)}},Jt.done=t=>{Jt.update(t,{progress:1})},Jt.onChange=function(t){return kS.add(t),()=>{kS.delete(t)}},Jt.play=t=>NI(!0,t),Jt.pause=t=>NI(!1,t);const Uee=typeof window<"u"?z.useLayoutEffect:z.useEffect,zg=t=>{let{theme:e,type:n,isLoading:i,...r}=t;return Ft.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},H1={info:function(t){return Ft.createElement(zg,{...t},Ft.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return Ft.createElement(zg,{...t},Ft.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return Ft.createElement(zg,{...t},Ft.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return Ft.createElement(zg,{...t},Ft.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Ft.createElement("div",{className:"Toastify__spinner"})}},zee=t=>{const{isRunning:e,preventExitTransition:n,toastRef:i,eventHandlers:r,playToast:s}=Nee(t),{closeButton:o,children:a,autoClose:l,onClick:c,type:h,hideProgressBar:f,closeToast:p,transition:m,position:v,className:S,style:A,bodyClassName:g,bodyStyle:x,progressClassName:_,progressStyle:M,updateId:b,role:C,progress:P,rtl:B,toastId:R,deleteToast:T,isIn:L,isLoading:W,closeOnClick:Y,theme:q}
4344=t,j=ls("Toastify__toast",`Toastify__toast-theme--${q}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":B},{"Toastify__toast--close-on-click":Y}),Z=fr(S)?S({rtl:B,position:v,type:h,defaultClassName:j}):ls(j,S),H=function($){let{theme:ue,type:Ae,isLoading:te,icon:ce}=$,xe=null;const _e={theme:ue,type:Ae};return ce===!1||(fr(ce)?xe=ce({..._e,isLoading:te}):z.isValidElement(ce)?xe=z.cloneElement(ce,_e):te?xe=H1.spinner():(De=>De in H1)(Ae)&&(xe=H1[Ae](_e))),xe}(t),D=!!P||!l,X={closeToast:p,type:h,theme:q};let J=null;return o===!1||(J=fr(o)?o(X):z.isValidElement(o)?z.cloneElement(o,X):function($){let{closeToast:ue,theme:Ae,ariaLabel:te="close"}=$;return Ft.createElement("button",{className:`Toastify__close-button Toastify__close-button--${Ae}`,type:"button",onClick:ce=>{ce.stopPropagation(),ue(ce)},"aria-label":te},Ft.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Ft.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(X)),Ft.createElement(m,{isIn:L,done:T,position:v,preventExitTransition:n,nodeRef:i,playToast:s},Ft.createElement("div",{id:R,onClick:c,"data-in":L,className:Z,...r,style:A,ref:i},Ft.createElement("div",{...L&&{role:C},className:fr(g)?g({type:h}):ls("Toastify__toast-body",g),style:x},H!=null&&Ft.createElement("div",{className:ls("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!W})},H),Ft.createElement("div",null,a)),J,Ft.createElement(Fee,{...b&&!D?{key:`pb-${b}`}:{},rtl:B,theme:q,delay:l,isRunning:e,isIn:L,closeToast:p,hide:f,type:h,style:M,className:_,controlledProgress:D,progress:P||0})))},Gy=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},Hee=Hy(Gy("bounce",!0));Hy(Gy("slide",!0));Hy(Gy("zoom"));Hy(Gy("flip"));const Gee={position:"top-right",transition:Hee,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Vee(t){let e={...Gee,...t};const n=t.stacked,[i,r]=z.useState(!0),s=z.useRef(null),{getToastToRender:o,isToastActive:a,count:l}=Dee(e),{className:c,style:h,rtl:f,containerId:p}=e;function m(S){const A=ls("Toastify__toast-container",`Toastify__toast-container--${S}`,{"Toastify__toast-container--rtl":f});return fr(c)?c({position:S,rtl:f,defaultClassName:A}):ls(A,o0(c))}function v(){n&&(r(!0),Jt.play())}return Uee(()=>{if(n){var S;const A=s.current.querySelectorAll('[data-in="true"]'),g=12,x=(S=e.position)==null?void 0:S.includes("top");let _=0,M=0;Array.from(A).reverse().forEach((b,C)=>{const P=b;P.classList.add("Toastify__toast--stacked"),C>0&&(P.dataset.collapsed=`${i}`),P.dataset.pos||(P.dataset.pos=x?"top":"bot");const B=_*(i?.2:1)+(i?0:g*C);P.style.setProperty("--y",`${x?B:-1*B}px`),P.style.setProperty("--g",`${g}`),P.style.setProperty("--s",""+(1-(i?M:0))),_+=P.offsetHeight,M+=.025})}},[i,l,n]),Ft.createElement("div",{ref:s,className:"Toastify",id:p,onMouseEnter:()=>{n&&(r(!1),Jt.pause())},onMouseLeave:v},o((S,A)=>{const g=A.length?{...h}:{...h,pointerEvents:"none"};return Ft.createElement("div",{className:m(S),style:g,key:`container-${S}`},A.map(x=>{let{content:_,props:M}=x;return Ft.createElement(zee,{...M,stacked:n,collapseAll:v,isIn:a(M.toastId,M.containerId),style:M.style,key:`toast-${M.key}`},_)}))}))}const jee=()=>{const t=z.useRef(),[e,n]=z.useState({name:"",email:"",message:""}),[i,r]=z.useState(!1),s=a=>{const{target:l}=a,{name:c,value:h}=l;n({...e,[c]:h})},o=a=>{if(a.preventDefault(),r(!0),e.name===""){Jt.warn("Please Enter your name!",{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"});return}if(e.email===""){Jt.warn("Please Enter your email!",{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"});return}if(e.message===""){Jt.warn("Please Enter your message!",{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"});return}Iee.send(Hh.emailjsServiceId,Hh.emailjsTemplateId,{from_name:e.name,to_name:"Ashmit JaiSarita Gupta",from_email:e.email,to_email:"[email protected]",message:e.message},Hh.emailjsPublicKey).then(()=>
4344{r(!1),Jt.success("🤩 Thank you. I will get back to you as soon as possible!",{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"}),n({name:"",email:"",message:""})},l=>{r(!1),console.error(l),alert("Ahh, something went wrong. Please try again."),Jt.error("💀 Ahh, something went wrong. Please try again.",{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"})})};return F.jsxs("section",{className:"w-full h-full pb-10 sm:flex sm:flex-col sm:justify-center sm:items-center lg:inline",children:[F.jsx(Vee,{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"dark"}),F.jsx(ip,{}),F.jsxs("main",{className:"w-full h-full sm:h-[90%] md:h-[98%] lg:h-full py-32 sm:pt-44 md:pt-56 lg:pt-0 flex flex-col lg:flex-row justify-center items-center lg:justify-between lg:items-end gap-10 lg:gap-6 lg:px-20 overflow-hidden",children:[F.jsxs(Pl.div,{className:"border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] backdrop-blur-[0.5rem] w-[84vw] h-[84vh] lg:w-[40%] lg:h-[85%] px-4 py-4 md:px-10 rounded-2xl",children:[F.jsx("p",{className:"text-[14px] text-secondary uppercase tracking-wider",children:"Get in touch"}),F.jsx("h3",{className:"text-white font-black text-[30px] xs:text-[40px] sm:text-[50px] md:text-[30px]",children:"Contact"}),F.jsxs("p",{className:"text-sm font-light",children:["You can also mail me at ",F.jsx("a",{href:"mailto:[email protected]",className:"underline hover:text-gray-300 hover:no-decoration",children:"[email protected]"})]}),F.jsxs("form",{ref:t,onSubmit:o,className:"mt-5 flex flex-col gap-3 md:gap-2 lg:gap-2",children:[F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-white text-base font-medium mb-4",children:"Your Name"}),F.jsx("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-transparent border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] py-2 px-3 md:px-6 text-sm placeholder:text-secondary text-white rounded-lg outline-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-white text-base font-medium mb-4",children:"Your email"}),F.jsx("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-transparent border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] py-2 px-3 md:px-6 text-sm placeholder:text-secondary text-white rounded-lg outline-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-white text-base font-medium mb-4",children:"Your Message"}),F.jsx("textarea",{rows:6,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-transparent border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] py-2 px-3 md:px-6 text-sm placeholder:text-secondary text-white rounded-lg outline-none font-medium"})]}),F.jsx("button",{type:"submit",className:"cursor-pointer hover:bg-white hover:text-black transition duration-500 ease-in-out border border-white border-opacity-40 bg-opacity-80 text-white text-sm w-fit px-3 md:px-7 py-2 md:py-3 flex justify-center items-center gap-2 rounded-full active:scale-95",children:i?"Sending...":"Send"})]})]}),F.jsx(Pl.div,{className:"hidden lg:block lg:w-[60%] lg:h-[85%]",children:F.jsx(IZ,{})})]}),F.jsxs("footer",{className:"w-[90%] pb-10 pt-6 flex flex-col sm:flex-row justify-center items-center",children:["Made with 🌕 material by ",F.jsx("a",{href:nn.linkedin,target:"_blank",className:"underline hover:no-underline",children:"Ashmit JaiSarita Gupta"})]}),F.jsx(md,{})]})};class ku extends Error{constructor(n,i){const r=`${ku.extractMessage(n)}: ${JSON.stringify({response:n,request:i})}`;super(r);Cc(this,"response");Cc(this,"request");Object.setPrototypeOf(this,ku.prototype),this.response=n,this.request=i,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ku)}static extractMessage(n){var i,r;return((r=(i=n.errors)==null?void 0:i[0])==null?void 0:r.message)??`GraphQL Error (Code: ${String(n.status)})`}}const FI=t=>t.toUpperCase(),G1=t=>typeof t=="function"?t():t,aO=(t,e)=>t.map((n,i)=>[n,e[i]]),$c=t=>{let e={};return t instanceof Headers?e=Wee(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):t&&(e=t),e},Wee=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},Xee=t=>{try{const e=t();return Jee(e)?e.catch(n=>kI(n)):e}catch(e){return kI(e)}},kI=t=>t instanceof Error?t:new Error(String(t)),Jee=t=>typeof t=="object"&&t!==null&&"then"in t&&typeof t.then=="function"&&"catch"in t&&typeof t.catch=="function"&&"finally"in t&&typeof t.finally=="function",yE=t=>{throw new Error(`Unhandled case: ${String(t)}`)},a0=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Kee=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},qee=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0};function l0(t,e){if(!!!t)throw new Error(e)}function Qee(t){return typeof t=="object"&&t!==null}function Yee(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const Zee=/\r\n|[\n\r]/g;function OS(t,e){let n=0,i=1;for(const r of t.body.matchAll(Zee)){if(typeof r.index=="number"||Yee(!1),r.index>
vendor: 10,669 bytes, lines 4344-4352
4344=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function $ee(t){return lO(t.source,OS(t.source,t.start))}function lO(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,s=t.locationOffset.line-1,o=e.line+s,a=e.line===1?n:0,l=e.column+a,c=`${t.name}:${o}:${l}
4345`,h=i.split(/\r\n|[\n\r]/g),f=h[r];if(f.length>120){const p=Math.floor(l/80),m=l%80,v=[];for(let S=0;S<f.length;S+=80)v.push(f.slice(S,S+80));return c+OI([[`${o} |`,v[0]],...v.slice(1,p+1).map(S=>["|",S]),["|","^".padStart(m)],["|",v[p+1]]])}return c+OI([[`${o-1} |`,h[r-1]],[`${o} |`,f],["|","^".padStart(l)],[`${o+1} |`,h[r+1]]])}function OI(t){const e=t.filter(([i,r])=>r!==void 0),n=Math.max(...e.map(([i])=>i.length));return e.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
4346`)}function ete(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class xE extends Error{constructor(e,...n){var i,r,s;const{nodes:o,source:a,positions:l,path:c,originalError:h,extensions:f}=ete(n);super(e),this.name="GraphQLError",this.path=c??void 0,this.originalError=h??void 0,this.nodes=UI(Array.isArray(o)?o:o?[o]:void 0);const p=UI((i=this.nodes)===null||i===void 0?void 0:i.map(v=>v.loc).filter(v=>v!=null));this.source=a??(p==null||(r=p[0])===null||r===void 0?void 0:r.source),this.positions=l??(p==null?void 0:p.map(v=>v.start)),this.locations=l&&a?l.map(v=>OS(a,v)):p==null?void 0:p.map(v=>OS(v.source,v.start));const m=Qee(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=f??m)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,xE):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
4347
4348`+$ee(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
4349
4350`+lO(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function UI(t){return t===void 0||t.length===0?void 0:t}function ni(t,e,n){return new xE(`Syntax Error: ${n}`,{source:t,positions:[e]})}class tte{constructor(e,n,i){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class cO{constructor(e,n,i,r,s,o){this.kind=e,this.start=n,this.end=i,this.line=r,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const uO={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},nte=new Set(Object.keys(uO));function zI(t){const e=t==null?void 0:t.kind;return typeof e=="string"&&nte.has(e)}var Cl;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Cl||(Cl={}));var US;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(US||(US={}));var mt;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(mt||(mt={}));function zS(t){return t===9||t===32}function jf(t){return t>=48&&t<=57}function dO(t){return t>=97&&t<=122||t>=65&&t<=90}function hO(t){return dO(t)||t===95}function ite(t){return dO(t)||jf(t)||t===95}function rte(t){var e;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let o=0;o<t.length;++o){var s;const a=t[o],l=ste(a);l!==a.length&&(i=(s=i)!==null&&s!==void 0?s:o,r=o,o!==0&&l<n&&(n=l))}return t.map((o,a)=>a===0?o:o.slice(n)).slice((e=i)!==null&&e!==void 0?e:0,r+1)}function ste(t){let e=0;for(;e<t.length&&zS(t.charCodeAt(e));)++e;return e}function ote(t,e){const n=t.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=i.length===1,s=i.length>1&&i.slice(1).every(m=>m.length===0||zS(m.charCodeAt(0))),o=n.endsWith('\\"""'),a=t.endsWith('"')&&!o,l=t.endsWith("\\"),c=a||l,h=!r||t.length>70||c||s||o;let f="";const p=r&&zS(t.charCodeAt(0));return(h&&!p||s)&&(f+=`
4351`),f+=n,(h||c)&&(f+=`
4352`),'"""'+f+'"""'}var Se;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(Se||(Se={}));class ate{constructor(e){const n=new cO(Se.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Se.EOF)do if(e.next)e=e.next;else{const n=cte(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===Se.COMMENT);return e}}function lte(t){return t===Se.BANG||t===Se.DOLLAR||t===Se.AMP||t===Se.PAREN_L||t===Se.PAREN_R||t===Se.SPREAD||t===Se.COLON||t===Se.EQUALS||t===Se.AT||t===Se.BRACKET_L||t===Se.BRACKET_R||t===Se.BRACE_L||t===Se.PIPE||t===Se.BRACE_R}function yd(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Vy(t,e){return fO(t.charCodeAt(e))&&pO(t.charCodeAt(e+1))}function fO(t){return t>=55296&&t<=56319}function pO(t){return t>=56320&&t<=57343}function $l(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return Se.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function kn(t,e,n,i,r){const s=t.line,o=1+n-t.lineStart;return new cO(e,n,i,s,o,r)}function cte(t,e){const n=t.source.body,i=n.length;let r=e;for(;r<i;){const s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++t.line,t.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++t.line,t.lineStart=r;continue;case 35:return ute(t,r);case 33:return kn(t,Se.BANG,r,r+1);case 36:return kn(t,Se.DOLLAR,r,r+1);case 38:return kn(t,Se.AMP,r,r+1);case 40:return kn(t,Se.PAREN_L,r,r+1);case 41:return kn(t,Se.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return kn(t,Se.SPREAD,r,r+3);break;case 58:return kn(t,Se.COLON,r,r+1);case 61:return kn(t,Se.EQUALS,r,r+1);case 64:return kn(t,Se.AT,r,r+1);case 91:return kn(t,Se.BRACKET_L,r,r+1);case 93:return kn(t,Se.BRACKET_R,r,r+1);case 123:return kn(t,Se.BRACE_L,r,r+1);case 124:return kn(t,Se.PIPE,r,r+1);case 125:return kn(t,Se.BRACE_R,r,r+1);
vendor: 4,863 bytes, lines 4352-4354
4352case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?gte(t,r):hte(t,r)}if(jf(s)||s===45)return dte(t,r,s);if(hO(s))return vte(t,r);throw ni(t.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:yd(s)||Vy(n,r)?`Unexpected character: ${$l(t,r)}.`:`Invalid character: ${$l(t,r)}.`)}return kn(t,Se.EOF,i,i)}function ute(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(s===10||s===13)break;if(yd(s))++r;else if(Vy(n,r))r+=2;else break}return kn(t,Se.COMMENT,e,r,n.slice(e+1,r))}function dte(t,e,n){const i=t.source.body;let r=e,s=n,o=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),jf(s))throw ni(t.source,r,`Invalid number, unexpected digit after 0: ${$l(t,r)}.`)}else r=V1(t,r,s),s=i.charCodeAt(r);if(s===46&&(o=!0,s=i.charCodeAt(++r),r=V1(t,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(o=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=V1(t,r,s),s=i.charCodeAt(r)),s===46||hO(s))throw ni(t.source,r,`Invalid number, expected digit but got: ${$l(t,r)}.`);return kn(t,o?Se.FLOAT:Se.INT,e,r,i.slice(e,r))}function V1(t,e,n){if(!jf(n))throw ni(t.source,e,`Invalid number, expected digit but got: ${$l(t,e)}.`);const i=t.source.body;let r=e+1;for(;jf(i.charCodeAt(r));)++r;return r}function hte(t,e){const n=t.source.body,i=n.length;let r=e+1,s=r,o="";for(;r<i;){const a=n.charCodeAt(r);if(a===34)return o+=n.slice(s,r),kn(t,Se.STRING,e,r+1,o);if(a===92){o+=n.slice(s,r);const l=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?fte(t,r):pte(t,r):mte(t,r);o+=l.value,r+=l.size,s=r;continue}if(a===10||a===13)break;if(yd(a))++r;else if(Vy(n,r))r+=2;else throw ni(t.source,r,`Invalid character within String: ${$l(t,r)}.`)}throw ni(t.source,r,"Unterminated string.")}function fte(t,e){const n=t.source.body;let i=0,r=3;for(;r<12;){const s=n.charCodeAt(e+r++);if(s===125){if(r<5||!yd(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|Th(s),i<0)break}throw ni(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+r)}".`)}function pte(t,e){const n=t.source.body,i=HI(n,e+2);if(yd(i))return{value:String.fromCodePoint(i),size:6};if(fO(i)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const r=HI(n,e+8);if(pO(r))return{value:String.fromCodePoint(i,r),size:12}}throw ni(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function HI(t,e){return Th(t.charCodeAt(e))<<12|Th(t.charCodeAt(e+1))<<8|Th(t.charCodeAt(e+2))<<4|Th(t.charCodeAt(e+3))}function Th(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function mte(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
4353`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw ni(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function gte(t,e){const n=t.source.body,i=n.length;let r=t.lineStart,s=e+3,o=s,a="";const l=[];for(;s<i;){const c=n.charCodeAt(s);if(c===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),l.push(a);const h=kn(t,Se.BLOCK_STRING,e,s+3,rte(l).join(`
4354`));return t.line+=l.length-1,t.lineStart=r,h}if(c===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(c===10||c===13){a+=n.slice(o,s),l.push(a),c===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,r=s;continue}if(yd(c))++s;else if(Vy(n,s))s+=2;else throw ni(t.source,s,`Invalid character within String: ${$l(t,s)}.`)}throw ni(t.source,s,"Unterminated string.")}function vte(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(ite(s))++r;else break}return kn(t,Se.NAME,e,r,n.slice(e,r))}const yte=10,mO=2;function _E(t){return jy(t,[])}function jy(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return xte(t,e);default:return String(t)}}function xte(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(_te(t)){const i=t.toJSON();if(i!==t)return typeof i=="string"?i:jy(i,n)}else if(Array.isArray(t))return Ste(t,n);return Ate(t,n)}function _te(t){return typeof t.toJSON=="function"}function Ate(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>mO?"["+wte(t)+"]":"{ "+n.map(([r,s])=>r+": "+jy(s,e)).join(", ")+" }"}function Ste(t,e){if(t.length===0)return"[]";if(e.length>mO)return"[Array]";const n=Math.min(yte,t.length),i=t.length-n,r=[];for(let s=0;s<n;++s)r.push(jy(t[s],e));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function wte(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");
vendor: 20,658 bytes, lines 4354-4367
4354if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const Mte=globalThis.process&&!0,Ete=Mte?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var i;const r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(r===s){const o=_E(e);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
4355
4356Ensure that there is only one instance of "graphql" in the node_modules
4357directory. If different versions of "graphql" are the dependencies of other
4358relied on modules, use "resolutions" to ensure only one version is installed.
4359
4360https://yarnpkg.com/en/docs/selective-version-resolutions
4361
4362Duplicate "graphql" modules cannot be used at the same time since different
4363versions may have different capabilities and behavior. The data from one
4364version used in the function from another could produce confusing and
4365spurious results.`)}}return!1};class gO{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||l0(!1,`Body must be a string. Received: ${_E(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||l0(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||l0(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Cte(t){return Ete(t,gO)}function Tte(t,e){return new bte(t,e).parseDocument()}class bte{constructor(e,n={}){const i=Cte(e)?e:new gO(e);this._lexer=new ate(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(Se.NAME);return this.node(e,{kind:mt.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:mt.DOCUMENT,definitions:this.many(Se.SOF,this.parseDefinition,Se.EOF)})}parseDefinition(){if(this.peek(Se.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===Se.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw ni(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Se.BRACE_L))return this.node(e,{kind:mt.OPERATION_DEFINITION,operation:Cl.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(Se.NAME)&&(i=this.parseName()),this.node(e,{kind:mt.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Se.NAME);switch(e.value){case"query":return Cl.QUERY;case"mutation":return Cl.MUTATION;case"subscription":return Cl.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Se.PAREN_L,this.parseVariableDefinition,Se.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:mt.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Se.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Se.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Se.DOLLAR),this.node(e,{kind:mt.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:mt.SELECTION_SET,selections:this.many(Se.BRACE_L,this.parseSelection,Se.BRACE_R)})}parseSelection(){return this.peek(Se.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(Se.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:mt.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Se.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Se.PAREN_L,n,Se.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(Se.COLON),this.node(n,{kind:mt.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Se.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(Se.NAME)?this.node(e,{kind:mt.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:mt.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:mt.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:mt.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case Se.BRACKET_L:return this.parseList(e);case Se.BRACE_L:return this.parseObject(e);case Se.INT:return this.advanceLexer(),this.node(n,{kind:mt.INT,value:n.value});case Se.FLOAT:return this.advanceLexer(),this.node(n,{kind:mt.FLOAT,value:n.value});case Se.STRING:case Se.BLOCK_STRING:return this.parseStringLiteral();case Se.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:mt.BOOLEAN,value:!0});case"false":return this.node(n,{kind:mt.BOOLEAN,value:!1});case"null":return this.node(n,{kind:mt.NULL});default:return this.node(n,{kind:mt.ENUM,value:n.value})}case Se.DOLLAR:if(e)if(this.expectToken(Se.DOLLAR),this._lexer.token.kind===Se.NAME){const i=this._lexer.token.value;throw ni(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:mt.STRING,value:e.value,block:e.kind===Se.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:mt.LIST,values:this.any(Se.BRACKET_L,n,Se.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:mt.OBJECT,fields:this.any(Se.BRACE_L,n,Se.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(Se.COLON),this.node(n,{kind:mt.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(Se.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(Se.AT),this.node(n,{kind:mt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(Se.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(Se.BRACKET_R),n=this.node(e,{kind:mt.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(Se.BANG)?this.node(e,{kind:mt.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:mt.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Se.STRING)||this.peek(Se.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(Se.BRACE_L,this.parseOperationTypeDefinition,Se.BRACE_R);return this.node(e,{kind:mt.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(Se.COLON);const i=this.parseNamedType();return this.node(e,{kind:mt.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:mt.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:mt.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Se.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Se.BRACE_L,this.parseFieldDefinition,Se.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Se.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:mt.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(Se.PAREN_L,this.parseInputValueDef,Se.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(Se.COLON);const r=this.parseTypeReference();let s;this.expectOptionalToken(Se.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:mt.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:mt.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(e,{kind:mt.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(Se.EQUALS)?this.delimitedMany(Se.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(e,{kind:mt.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(Se.BRACE_L,this.parseEnumValueDefinition,Se.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:mt.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ni(this._lexer.source,this._lexer.token.start,`${Hg(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(e,{kind:mt.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(Se.BRACE_L,this.parseInputValueDef,Se.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Se.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(Se.BRACE_L,this.parseOperationTypeDefinition,Se.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:mt.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:mt.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:mt.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:mt.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:mt.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:mt.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:mt.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Se.AT);const i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:mt.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Se.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(US,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new tte(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw ni(this._lexer.source,n.start,`Expected ${vO(e)}, found ${Hg(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===Se.NAME&&n.value===e)this.advanceLexer();else throw ni(this._lexer.source,n.start,`Expected "${e}", found ${Hg(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===Se.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e??this._lexer.token;return ni(this._lexer.source,n.start,`Unexpected ${Hg(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==Se.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw ni(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function Hg(t){const e=t.value;return vO(t.kind)+(e!=null?` "${e}"`:"")}function vO(t){return lte(t)?`"${t}"`:t}function Rte(t){return`"${t.replace(Pte,Ite)}"`}const Pte=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Ite(t){return Bte[t.charCodeAt(0)]}const Bte=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Lte=Object.freeze({});function Dte(t,e,n=uO){const i=new Map;for(const g of Object.values(mt))i.set(g,Nte(e,g));let r,s=Array.isArray(t),o=[t],a=-1,l=[],c=t,h,f;const p=[],m=[];do{a++;const g=a===o.length,x=g&&l.length!==0;if(g){if(h=m.length===0?void 0:p[p.length-1],c=f,f=m.pop(),x)if(s){c=c.slice();let M=0;for(const[b,C]of l){const P=b-M;C===null?(c.splice(P,1),M++):c[P]=C}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[M,b]of l)c[M]=b}a=r.index,o=r.keys,l=r.edits,s=r.inArray,r=r.prev}else if(f){if(h=s?a:o[a],c=f[h],c==null)continue;p.push(h)}let _;if(!Array.isArray(c)){var v,S;zI(c)||l0(!1,`Invalid AST Node: ${_E(c)}.`);const M=g?(v=i.get(c.kind))===null||v===void 0?void 0:v.leave:(S=i.get(c.kind))===null||S===void 0?void 0:S.enter;if(_=M==null?void 0:M.call(e,c,h,f,p,m),_===Lte)break;if(_===!1){if(!g){p.pop();continue}}else if(_!==void 0&&(l.push([h,_]),!g))if(zI(_))c=_;else{p.pop();continue}}if(_===void 0&&x&&l.push([h,c]),g)p.pop();else{var A;r={inArray:s,index:a,keys:o,edits:l,prev:r},s=Array.isArray(c),o=s?c:(A=n[c.kind])!==null&&A!==void 0?A:[],a=-1,l=[],f&&m.push(f),f=c}}while(r!==void 0);return l.length!==0?l[l.length-1][1]:t}function Nte(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function Fte(t){return Dte(t,Ote)}const kte=80,Ote={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>nt(t.definitions,`
4366
4367`)},OperationDefinition:{leave(t){const e=Dt("(",nt(t.variableDefinitions,", "),")"),n=nt([t.operation,nt([t.name,e]),nt
vendor: 1,025 bytes, lines 4367-4370
4367(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:i})=>t+": "+e+Dt(" = ",n)+Dt(" ",nt(i," "))},SelectionSet:{leave:({selections:t})=>ts(t)},Field:{leave({alias:t,name:e,arguments:n,directives:i,selectionSet:r}){const s=Dt("",t,": ")+e;let o=s+Dt("(",nt(n,", "),")");return o.length>kte&&(o=s+Dt(`(
4368`,c0(nt(n,`
4369`)),`
4370)`)),nt([o,nt(i," "),r]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+Dt(" ",nt(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>nt(["...",Dt("on ",t),nt(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:i,selectionSet:r})=>`fragment ${t}${Dt("(",nt(n,", "),")")} on ${e} ${Dt("",nt(i," ")," ")}`+r},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?ote(t):Rte(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"}
4370,NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+nt(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+nt(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+Dt("(",nt(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>Dt("",t,`
4371`)+nt(["schema",nt(e," "),ts(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>Dt("",t,`
4372`)+nt(["scalar",e,nt(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>Dt("",t,`
4373`)+nt(["type",e,Dt("implements ",nt(n," & ")),nt(i," "),ts(r)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:i,directives:r})=>Dt("",t,`
4374`)+e+(GI(n)?Dt(`(
4375`,c0(nt(n,`
4376`)),`
4377)`):Dt("(",nt(n,", "),")"))+": "+i+Dt(" ",nt(r," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:i,directives:r})=>Dt("",t,`
4378`)+nt([e+": "+n,Dt("= ",i),nt(r," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>Dt("",t,`
4379`)+nt(["interface",e,Dt("implements ",nt(n," & ")),nt(i," "),ts(r)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:i})=>Dt("",t,`
4380`)+nt(["union",e,nt(n," "),Dt("= ",nt(i," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:i})=>Dt("",t,`
4381`)+nt(["enum",e,nt(n," "),ts(i)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>Dt("",t,`
4382`)+nt([e,nt(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:i})=>Dt("",t,`
4383`)+nt(["input",e,nt(n," "),ts(i)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:i,locations:r})=>Dt("",t,`
4384`)+"directive @"+e+(GI(n)?Dt(`(
4385`,c0(nt(n,`
4386`)),`
4387)`):Dt("(",nt(n,", "),")"))+(i?" repeatable":"")+" on "+nt(r," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>nt(["extend schema",nt(t," "),ts(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>nt(["extend scalar",t,nt(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>nt(["extend type",t,Dt("implements ",nt(e," & ")),nt(n," "),ts(i)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>nt(["extend interface",t,Dt("implements ",nt(e," & ")),nt(n," "),ts(i)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>nt(["extend union",t,nt(e," "),Dt("= ",nt(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>nt(["extend enum",t,nt(e," "),ts(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>nt(["extend input",t,nt(e," "),ts(n)]," ")}};function nt(t,e=""){var n;return(n=t==null?void 0:t.filter(i=>i).join(e))!==null&&n!==void 0?n:""}function ts(t){return Dt(`{
4388`,c0(nt(t,`
4389`)),`
4390}`)}function Dt(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function c0(t){return Dt("  ",t.replace(/\n/g,`
4391  `))}function GI(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
4392`)))!==null&&e!==void 0?e:!1}const VI="Accept",HS="Content-Type",GS="application/json",yO="application/graphql-response+json",jI=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Ute=t=>{const e=t.toLowerCase();return e.includes(yO)||e.includes(GS)},WI=t=>{try{if(Array.isArray(t))return{_tag:"Batch",executionResults:t.map(XI)};if(a0(t))return{_tag:"Single",executionResult:XI(t)};throw new Error(`Invalid execution result: result is not object or array. 
4393Got:
4394${String(t)}`)}catch(e){return e}},XI=t=>{if(typeof t!="object"||t===null)throw new Error("Invalid execution result: result is not object");let e,n,i;if("errors"in t){if(!a0(t.errors)&&!Array.isArray(t.errors))throw new Error("Invalid execution result: errors is not plain object OR array");e=t.errors}if("data"in t){if(!a0(t.data)&&t.data!==null)throw new Error("Invalid execution result: data is not plain object");n=t.data}if("extensions"in t){if(!a0(t.extensions))throw new Error("Invalid execution result: extensions is not plain object");i=t.extensions}return{data:n,errors:e,extensions:i}},zte=t=>t._tag==="Batch"?t.executionResults.some(JI):JI(t.executionResult),JI=t=>Array.isArray(t.errors)?t.errors.length>0:!!t.errors,xO=t=>typeof t=="object"&&t!==null&&"kind"in t&&t.kind===mt.OPERATION_DEFINITION,Hte=t=>{var i;let e;const n=t.definitions.filter(xO);return n.length===1&&(e=(i=n[0].name)==null?void 0:i.value),e},Gte=t=>{let e=!1;const n=t.definitions.filter(xO);return n.length===1&&(e=n[0].operation===Cl.MUTATION),e},j1=(t,e)=>{const n=typeof t=="string"?t:Fte(t);let i=!1,r;if(e)return{expression:n,isMutation:i,operationName:r};const s=Xee(()=>typeof t=="string"?Tte(t):t);return s instanceof Error?{expression:n,isMutation:i,operationName:r}:(r=Hte(s),i=Gte(s),{expression:n,operationName:r,isMutation:i})},AE=JSON,W1=async t=>{const e={...t,method:t.request._tag==="Single"?t.request.document.isMutation?"POST":FI(t.method??"post"):t.request.hasMutations?"POST":FI(t.method??"post"),fetchOptions:{...t.fetchOptions,errorPolicy:t.fetchOptions.errorPolicy??"none"}},i=await jte(e.method)(e);if(!i.ok)return new ku({status:i.status,headers:i.headers},{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables});const r=await Vte(i,t.fetchOptions.jsonSerializer??AE);if(r instanceof Error)throw r;const s={status:i.status,headers:i.headers};if(zte(r)&&e.fetchOptions.errorPolicy==="none"){const o=r._tag==="Batch"?{...r.executionResults,...s}:{...r.executionResult,...s};return new ku(o,{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables})}switch(r._tag){case"Single":return{...s,...KI(e)(r.executionResult)};case"Batch":return{...s,data:r.executionResults.map(KI(e))};default:yE(r)}},KI=t=>e=>({extensions:e.extensions,data:e.data,errors:t.fetchOptions.errorPolicy==="all"?e.errors:void 0}),Vte=async(t,e)=>{const n=t.headers.get(HS),i=await t.text();return n&&Ute(n)?WI(e.parse(i)):WI(i)},jte=t=>async e=>{const n=new Headers(e.headers);let i=null,r;n.has(VI)||n.set(VI,[yO,GS].join(", ")),t==="POST"?(r=(e.fetchOptions.jsonSerializer??AE).stringify(Wte(e)),typeof r=="string"&&!n.has(HS)&&n.set(HS,GS)):i=Xte(e);const s={method:t,headers:n,body:r,...e.fetchOptions};let o=new URL(e.url),a=s;if(e.middleware){const c=await Promise.resolve(e.middleware({...s,url:e.url,operationName:e.request._tag==="Single"?e.request.document.operationName:void 0,variables:e.request.variables})),{url:h,...f}=c;o=new URL(h),a=f}
4394return i&&i.forEach((c,h)=>{o.searchParams.append(h,c)}),await(e.fetch??fetch)(o,a)},Wte=t=>{switch(t.request._tag){case"Single":return{query:t.request.document.expression,variables:t.request.variables,operationName:t.request.document.operationName};case"Batch":return aO(t.request.query,t.request.variables??[]).map(([e,n])=>({query:e,variables:n}));default:throw yE(t.request)}},Xte=t=>{var i;const e=t.fetchOptions.jsonSerializer??AE,n=new URLSearchParams;switch(t.request._tag){case"Single":return n.append("query",jI(t.request.document.expression)),t.request.variables&&n.append("variables",e.stringify(t.request.variables)),t.request.document.operationName&&n.append("operationName",t.request.document.operationName),n;case"Batch":{const r=((i=t.request.variables)==null?void 0:i.map(a=>e.stringify(a)))??[],s=t.request.query.map(jI),o=aO(s,r).map(([a,l])=>({query:a,variables:l}));return n.append("query",e.stringify(o)),n}default:throw yE(t.request)}};class Jte{constructor(e,n={}){Cc(this,"url");Cc(this,"requestConfig");Cc(this,"rawRequest",async(...e)=>{const[n,i,r]=e,s=qee(n,i,r),{headers:o,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:h,excludeOperationName:f,...p}=this.requestConfig,{url:m}=this;s.signal!==void 0&&(p.signal=s.signal);const v=j1(s.query,f),S=await W1({url:m,request:{_tag:"Single",document:v,variables:s.variables},headers:{...$c(G1(o)),...$c(s.requestHeaders)},fetch:a,method:l,fetchOptions:p,middleware:c});if(h&&await h(S,{operationName:v.operationName,variables:i,url:this.url}),S instanceof Error)throw S;return S});this.url=e,this.requestConfig=n}async request(e,...n){const[i,r]=n,s=Kte(e,i,r),{headers:o,fetch:a=globalThis.fetch,method:l="POST",requestMiddleware:c,responseMiddleware:h,excludeOperationName:f,...p}=this.requestConfig,{url:m}=this;s.signal!==void 0&&(p.signal=s.signal);const v=j1(s.document,f),S=await W1({url:m,request:{_tag:"Single",document:v,variables:s.variables},headers:{...$c(G1(o)),...$c(s.requestHeaders)},fetch:a,method:l,fetchOptions:p,middleware:c});if(h&&await h(S,{operationName:v.operationName,variables:s.variables,url:this.url}),S instanceof Error)throw S;return S.data}async batchRequests(e,n){const i=Kee(e,n),{headers:r,excludeOperationName:s,...o}=this.requestConfig;i.signal!==void 0&&(o.signal=i.signal);const a=i.documents.map(({document:p})=>j1(p,s)),l=a.map(({expression:p})=>p),c=a.some(({isMutation:p})=>p),h=i.documents.map(({variables:p})=>p),f=await W1({url:this.url,request:{_tag:"Batch",operationName:void 0,query:l,hasMutations:c,variables:h},headers:{...$c(G1(r)),...$c(i.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:o,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(f,{operationName:void 0,variables:h,url:this.url}),f instanceof Error)throw f;return f.data}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const Kte=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},qte=(t,...e)=>t.reduce((n,i,r)=>`${n}${i}${r in e?String(e[r]):""}`,""),Qte=new Jte(Hh.GraphqlContentApi),Yte=`
4395createdAt
4396  datePublished
4397  id
4398  postEmoji
4399  publishedAt
4400  slug
4401  title
4402  content {
4403    html
4404  }
4405  updatedAt
4406  coverPhoto {
4407    publishedAt
4408    createdAt
4409    id
4410    url
4411  }
4412  shortDescription
4413  category
4414  }
4415`,Zte=qte`
4416  {
4417    posts {
4418      ${Yte}
4419  }
4420`,$te=({post:t})=>F.jsxs("div",{className:"border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] backdrop-blur-[0.5rem] p-6 rounded-2xl flex justify-content items-center cursor-pointer hover:bg-[#ffffff08]",children:[F.jsxs("div",{className:"flex-[0.8]",children:[F.jsx("h3",{className:"text-base font-medium",children:t==null?void 0:t.title}),F.jsx("p",{className:"hidden sm:block text-sm font-light px-2 pt-2",children:t==null?void 0:t.shortDescription})]}),F.jsx("div",{className:"flex-[0.2] flex justify-center items-center w-full h-full",children:F.jsx("div",{className:"w-[60px] h-[60px] rounded-full border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] backdrop-blur-[0.5rem] flex justify-center items-center text-4xl",children:F.jsx("span",{className:"custom-bounce",children:t.postEmoji?t.postEmoji:"🐱"})})})]});var _O={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
4421 * Prism: Lightweight, robust, elegant syntax highlighting
4422 *
vendor: 6,937 bytes, lines 4423-4427
4423 * @license MIT <https://opensource.org/licenses/MIT>
4424 * @author Lea Verou <https://lea.verou.me>
4425 * @namespace
4426 * @public
4427 */var n=function(i){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},a={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function x(_){return _ instanceof l?new l(_.type,x(_.content),_.alias):Array.isArray(_)?_.map(x):_.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(x){return Object.prototype.toString.call(x).slice(8,-1)},objId:function(x){return x.__id||Object.defineProperty(x,"__id",{value:++s}),x.__id},clone:function x(_,M){M=M||{};var b,C;switch(a.util.type(_)){case"Object":if(C=a.util.objId(_),M[C])return M[C];b={},M[C]=b;for(var P in _)_.hasOwnProperty(P)&&(b[P]=x(_[P],M));return b;case"Array":return C=a.util.objId(_),M[C]?M[C]:(b=[],M[C]=b,_.forEach(function(B,R){b[R]=x(B,M)}),b);default:return _}},getLanguage:function(x){for(;x;){var _=r.exec(x.className);if(_)return _[1].toLowerCase();x=x.parentElement}return"none"},setLanguage:function(x,_){x.className=x.className.replace(RegExp(r,"gi"),""),x.classList.add("language-"+_)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(b){var x=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(b.stack)||[])[1];if(x){var _=document.getElementsByTagName("script");for(var M in _)if(_[M].src==x)return _[M]}return null}},isActive:function(x,_,M){for(var b="no-"+_;x;){var C=x.classList;if(C.contains(_))return!0;if(C.contains(b))return!1;x=x.parentElement}return!!M}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(x,_){var M=a.util.clone(a.languages[x]);for(var b in _)M[b]=_[b];return M},insertBefore:function(x,_,M,b){b=b||a.languages;var C=b[x],P={};for(var B in C)if(C.hasOwnProperty(B)){if(B==_)for(var R in M)M.hasOwnProperty(R)&&(P[R]=M[R]);M.hasOwnProperty(B)||(P[B]=C[B])}var T=b[x];return b[x]=P,a.languages.DFS(a.languages,function(L,W){W===T&&L!=x&&(this[L]=P)}),P},DFS:function x(_,M,b,C){C=C||{};var P=a.util.objId;for(var B in _)if(_.hasOwnProperty(B)){M.call(_,B,_[B],b||B);var R=_[B],T=a.util.type(R);T==="Object"&&!C[P(R)]?(C[P(R)]=!0,x(R,M,null,C)):T==="Array"&&!C[P(R)]&&(C[P(R)]=!0,x(R,M,B,C))}}},plugins:{},highlightAll:function(x,_){a.highlightAllUnder(document,x,_)},highlightAllUnder:function(x,_,M){var b={callback:M,container:x,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",b),b.elements=Array.prototype.slice.apply(b.container.querySelectorAll(b.selector)),a.hooks.run("before-all-elements-highlight",b);for(var C=0,P;P=b.elements[C++];)a.highlightElement(P,_===!0,b.callback)},highlightElement:function(x,_,M){var b=a.util.getLanguage(x),C=a.languages[b];a.util.setLanguage(x,b);var P=x.parentElement;P&&P.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(P,b);var B=x.textContent,R={element:x,language:b,grammar:C,code:B};function T(W){R.highlightedCode=W,a.hooks.run("before-insert",R),R.element.innerHTML=R.highlightedCode,a.hooks.run("after-highlight",R),a.hooks.run("complete",R),M&&M.call(R.element)}if(a.hooks.run("before-sanity-check",R),P=R.element.parentElement,P&&P.nodeName.toLowerCase()==="pre"&&!P.hasAttribute("tabindex")&&P.setAttribute("tabindex","0"),!R.code){a.hooks.run("complete",R),M&&M.call(R.element);return}if(a.hooks.run("before-highlight",R),!R.grammar){T(a.util.encode(R.code));return}if(_&&i.Worker){var L=new Worker(a.filename);L.onmessage=function(W){T(W.data)},L.postMessage(JSON.stringify({language:R.language,code:R.code,immediateClose:!0}))}else T(a.highlight(R.code,R.grammar,R.language))},highlight:function(x,_,M){var b={code:x,grammar:_,language:M};if(a.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=a.tokenize(b.code,b.grammar),a.hooks.run("after-tokenize",b),l.stringify(a.util.encode(b.tokens),b.language)},tokenize:function(x,_){var M=_.rest;if(M){for(var b in M)_[b]=M[b];delete _.rest}var C=new f;return p(C,C.head,x),h(x,C,_,C.head,0),v(C)},hooks:{all:{},add:function(x,_){var M=a.hooks.all;M[x]=M[x]||[],M[x].push(_)},run:function(x,_){var M=a.hooks.all[x];if(!(!M||!M.length))for(var b=0,C;C=M[b++];)C(_)}},Token:l};i.Prism=a;function l(x,_,M,b){this.type=x,this.content=_,this.alias=M,this.length=(b||"").length|0}l.stringify=function x(_,M){if(typeof _=="string")return _;if(Array.isArray(_)){var b="";return _.forEach(function(T){b+=x(T,M)}),b}var C={type:_.type,content:x(_.content,M),tag:"span",classes:["token",_.type],attributes:{},language:M},P=_.alias;P&&(Array.isArray(P)?Array.prototype.push.apply(C.classes,P):C.classes.push(P)),a.hooks.run("wrap",C);var B="";for(var R in C.attributes)B+=" "+R+'="'+(C.attributes[R]||"").replace(/"/g,"&quot;")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+B+">"+C.content+"</"+C.tag+">"};function c(x,_,M,b){x.lastIndex=_;var C=x.exec(M);if(C&&b&&C[1]){var P=C[1].length;C.index+=P,C[0]=C[0].slice(P)}return C}function h(x,_,M,b,C,P){for(var B in M)if(!(!M.hasOwnProperty(B)||!M[B])){var R=M[B];R=Array.isArray(R)?R:[R];for(var T=0;T<R.length;++T){if(P&&P.cause==B+","+T)return;var L=R[T],W=L.inside,Y=!!L.lookbehind,q=!!L.greedy,j=L.alias;if(q&&!L.pattern.global){var Z=L.pattern.toString().match(/[imsuy]*$/)[0];L.pattern=RegExp(L.pattern.source,Z+"g")}for(var H=L.pattern||L,D=b.next,X=C;D!==_.tail&&!(P&&X>=P.reach);X+=D.value.length,D=D.next){var J=D.value;if(_.length>x.length)return;if(!(J instanceof l)){var $=1,ue;if(q){if(ue=c(H,X,x,Y),!ue||ue.index>=x.length)break;var xe=ue.index,Ae=ue.index+ue[0].length,te=X;for(te+=D.value.length;xe>=te;)D=D.next,te+=D.value.length;if(te-=D.value.length,X=te,D.value instanceof l)continue;for(var ce=D;ce!==_.tail&&(te<Ae||typeof ce.value=="string");ce=ce.next)$++,te+=ce.value.length;$--,J=x.slice(X,te),ue.index-=X}else if(ue=c(H,0,J,Y),!ue)continue;var xe=ue.index,_e=ue[0],De=J.slice(0,xe),it=J.slice(xe+_e.length),Ue=X+J.length;P&&Ue>P.reach&&(P.reach=Ue);var Be=D.prev;De&&(Be=p(_,Be,De),X+=De.length),m(_,Be,$);var U=new l(B,W?a.tokenize(_e,W):_e,j,_e);if(D=p(_,Be,U),it&&p(_,D,it),$>1){var ye={cause:B+","+T,reach:Ue};h(x,_,M,D.prev,X,ye),P&&ye.reach>P.reach&&(P.reach=ye.reach)}}}}}}function f(){var x={value:null,prev:null,next:null},_={value:null,prev:x,next:null};x.next=_,this.head=x,this.tail=_,this.length=0}function p(x,_,M){var b=_.next,C={value:M,prev:_,next:b};return _.next=C,b.prev=C,x.length++,C}function m(x,_,M){for(var b=_.next,C=0;C<M&&b!==x.tail;C++)b=b.next;_.next=b,b.prev=_,x.length-=C}function v(x){for(var _=[],M=x.head.next;M!==x.tail;)_.push(M.value),M=M.next;return _}if(!i.document)return i.addEventListener&&(a.disableWorkerMessageHandler||i.addEventListener("message",function(x){var _=JSON.parse(x.data),M=_.language,b=_.code,C=_.immediateClose;
vendor: 13,182 bytes, lines 4427-4428
4427i.postMessage(a.highlight(b,a.languages[M],M)),C&&i.close()},!1)),a;var S=a.util.currentScript();S&&(a.filename=S.src,S.hasAttribute("data-manual")&&(a.manual=!0));function A(){a.manual||a.highlightAll()}if(!a.manual){var g=document.readyState;g==="loading"||g==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",A):window.requestAnimationFrame?window.requestAnimationFrame(A):window.setTimeout(A,16)}return a}(e);t.exports&&(t.exports=n),typeof $C<"u"&&($C.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,s){var o={};o["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[s]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};a["language-"+s]={pattern:/[\s\S]+/,inside:n.languages[s]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(i,r){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:n.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(i){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var s=i.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",r=function(S,A){return"✖ Error "+S+" while fetching file: "+A},s="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",c="loaded",h="failed",f="pre[data-src]:not(["+a+'="'+c+'"]):not(['+a+'="'+l+'"])';function p(S,A,g){var x=new XMLHttpRequest;x.open("GET",S,!0),x.onreadystatechange=function(){x.readyState==4&&(x.status<400&&x.responseText?A(x.responseText):x.status>=400?g(r(x.status,x.statusText)):g(s))},x.send(null)}function m(S){var A=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S||"");if(A){var g=Number(A[1]),x=A[2],_=A[3];return x?_?[g,Number(_)]:[g,void 0]:[g,g]}}n.hooks.add("before-highlightall",function(S){S.selector+=", "+f}),n.hooks.add("before-sanity-check",function(S){var A=S.element;if(A.matches(f)){S.code="",A.setAttribute(a,l);var g=A.appendChild(document.createElement("CODE"));g.textContent=i;var x=A.getAttribute("data-src"),_=S.language;if(_==="none"){var M=(/\.(\w+)$/.exec(x)||[,"none"])[1];_=o[M]||M}n.util.setLanguage(g,_),n.util.setLanguage(A,_);var b=n.plugins.autoloader;b&&b.loadLanguages(_),p(x,function(C){A.setAttribute(a,c);var P=m(A.getAttribute("data-range"));if(P){var B=C.split(/\r\n?|\n/g),R=P[0],T=P[1]==null?B.length:P[1];R<0&&(R+=B.length),R=Math.max(0,Math.min(R-1,B.length)),T<0&&(T+=B.length),T=Math.max(0,Math.min(T,B.length)),C=B.slice(R,T).join(`
4428`),A.hasAttribute("data-start")||A.setAttribute("data-start",String(R+1))}g.textContent=C,n.highlightElement(g)},function(C){A.setAttribute(a,h),g.textContent=C})}}),n.plugins.fileHighlight={highlight:function(A){for(var g=(A||document).querySelectorAll(f),x=0,_;_=g[x++];)n.highlightElement(_)}};var v=!1;n.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(_O);var ene=_O.exports;const tne=Wf(ene);Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?
4428:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;const nne=t=>{const e=new Date(t);if(isNaN(e.getTime()))return"Invalid Date";const n=e.getDate(),i=e.getMonth(),r=e.getFullYear(),s=l=>{if(l>=11&&l<=13)return"th";switch(l%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},o=["January","February","March","April","May","June","July","August","September","October","November","December"];return`${n}${s(n)} ${o[i]}, ${r}`},ine=({post:t,isOpen:e,onRequestClose:n})=>{var i;return t?(z.useEffect(()=>{tne.highlightAll()},[e]),F.jsxs(Jk,{isOpen:e,onRequestClose:n,contentLabel:`${t==null?void 0:t.t
4428itle}`,className:"w-[80%] h-[85vh] border border-white border-opacity-40 bg-opacity-80 shadow-lg shadow-black[0.03] backdrop-blur-[2rem] p-6 xl:px-60 rounded-t-xl fixed bottom-0 left-1/2 -translate-x-1/2 overflow-y-scroll text-white",overlayClassName:"w-screen h-screen fixed bottom-0 justify-center items-center text-white",children:[F.jsx("div",{className:"cursor-pointer absolute z-9 top-4 right-4",onClick:n,children:F.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F.jsx("path",{d:"M19 4.99994L5 18.9999",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("path",{d:"M5 4.99994L19 18.9999",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),F.jsx("h2",{className:"text-3xl text-center pb-4",children:t==null?void 0:t.title}),(t==null?void 0:t.coverPhoto)&&F.jsx("div",{children:F.jsx("img",{src:t==null?void 0:t.coverPhoto.url,alt:"",className:"w-full h-auto px-[1rem] py-[2rem]"})}),F.jsxs("div",{className:"w-full flex justify-center items-center gap-3",children:[F.jsx("img",{src:"/images/author.jpg",alt:"Ashmit JaiSarita Gupta",className:"w-8 h-8 rounded-full"}),F.jsxs("p",{children:[" ",t==null?void 0:t.category," ",t!=null&&t.category?" ● ":""," ",nne(t==null?void 0:t.datePublished)]})]}),F.jsx("div",{dangerouslySetInnerHTML:{__html:(i=t==null?void 0:t.content)==null?void 0:i.html},className:"post-content font-light"})]})):null},rne=()=>{const[t,e]=z.useState([]),[n,i]=z.useState(!1),[r,s]=z.useState(null);z.useEffect(()=>{Qte.request(Zte).then(l=>{const c=l.posts.sort((h,f)=>new Date(f.datePublished)-new Date(h.datePublished));e(c)})},[]);const o=l=>{s(l),i(!0)},a=()=>{s(null),i(!1)};return F.jsxs("main",{className:"w-full h-full pt-10 sm:pt-20 md:pt-32 flex flex-col justify-start items-center text-white lg:gap-10",children:[F.jsx(ip,{}),F.jsxs("section",{className:"w-[60%] h-[25vh] md:h-[30vh] flex flex-col justify-start md:justify-center items-center",children:[F.jsx("h1",{className:"text-4xl sm:text-4xl md:text-7xl lg:text-9xl font-semibold py-4 whitespace-nowrap",children:"Notes."}),F.jsx("h2",{className:"text-sm sm:text-base md:text-lg md:text-3xl sm:py-2 text-center",children:"Some thoughts, reflections, & notes on design and development, along with some latest work in progress."})]}),F.jsx("section",{className:"w-[80%] lg:w-[60%] h-[full] flex flex-col justify-start items-center gap-6",children:t==null?void 0:t.map(l=>F.jsx("div",{onClick:()=>o(l),className:"w-full",children:F.jsx($te,{post:l})},l==null?void 0:l.id))}),F.jsx(ine,{post:r,isOpen:n,onRequestClose:a}),F.jsxs("footer",{className:"w-[90%] pb-10 pt-6 flex flex-col sm:flex-row justify-center items-center",children:["Made with 🌕 material by  ",F.jsx("a",{href:nn.linkedin,target:"_blank",className:"underline hover:no-underline",children:"Ashmit JaiSarita Gupta"})]}),F.jsx(md,{})]})},sne=Rk({effectFactor:1.2,dispFactor:0,tex:void 0,tex2:void 0,disp:void 0},` 
4429    varying vec2 vUv;
4430
4431    void main() {
4432      vUv = uv;
4433      gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
4434    }`,`
4435    varying vec2 vUv;
4436    uniform sampler2D tex;
4437    uniform sampler2D tex2;
4438    uniform sampler2D disp;
4439    uniform float dispFactor;
4440    uniform float effectFactor;
4441
4442    vec4 gammaCorrection(vec4 color) {
4443      return vec4(pow(color.rgb, vec3(1.0 / 2.2)), color.a);
4444    }
4445
4446    void main() {
4447      vec2 uv = vUv;
4448      vec4 disp = texture2D(disp, uv);
4449      vec2 distortedPosition = vec2(uv.x + dispFactor * (disp.r*effectFactor), uv.y);
4450      vec2 distortedPosition2 = vec2(uv.x - (1.0 - dispFactor) * (disp.r*effectFactor), uv.y);
4451      vec4 _texture = texture2D(tex, distortedPosition);
4452      vec4 _texture2 = texture2D(tex2, distortedPosition2);
4453      vec4 finalTexture = mix(_texture, _texture2, dispFactor);
4454      finalTexture = gammaCorrection(finalTexture);
4455      gl_FragColor = finalTexture;
4456    }`);cE({ImageFadeMaterialDisplacement:sne,RoundedPlaneGeometry:Ck.RoundedPlaneGeometry});const one=({aspectRatio:t,coverImage:e,backgroundImage:n,displacementTexture:i,...r})=>{const s=z.useRef(),[o,a,l]=ky([`/images/projects/${e}`,`/images/projects/${n}`,`/textures/displacement/${i}`]),[c,h]=z.useState(!1);return lc((f,p)=>{Ek.damp(s.current,"dispFactor",c?1:0,.4,p)}),F.jsxs("mesh",{...r,onPointerOver:f=>h(!0),onPointerOut:f=>h(!1),children:[F.jsx("roundedPlaneGeometry",{args:t}),F.jsx("imageFadeMaterialDisplacement",{ref:s,tex:o,tex2:a,disp:l,toneMapped:!1})]})},ane=Rk({effectFactor:1.2,dispFactor:0,tex:void 0,tex2:void 0},` 
4457    varying vec2 vUv;
4458
4459    void main() {
4460      vUv = uv;
4461      gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
4462    }`,`
4463    varying vec2 vUv;
4464    uniform sampler2D tex;
4465    uniform sampler2D tex2;
4466    uniform float dispFactor;
4467    uniform float effectFactor;
4468
4469    float rand(vec2 n) {
4470      return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
4471    }
4472
4473    float noise(vec2 p){
4474      vec2 ip = floor(p);
4475      vec2 u = fract(p);
4476      u = u*u*(3.0-2.0*u);
4477
4478      float res = mix(
4479        mix(rand(ip),rand(ip+vec2(1.0,0.0)),u.x),
4480        mix(rand(ip+vec2(0.0,1.0)),rand(ip+vec2(1.0,1.0)),u.x),u.y);
4481      return res*res;
4482    }
4483
4484    vec4 gammaCorrection(vec4 color) {
4485      return vec4(pow(color.rgb, vec3(1.0 / 2.2)), color.a);
4486    }
4487
4488    void main() {
4489      vec2 uv = vUv;
4490      float noiseFactor = noise(gl_FragCoord.xy * 0.4);
4491      vec2 distortedPosition = vec2(uv.x + dispFactor * (noiseFactor), uv.y);
4492      vec2 distortedPosition2 = vec2(uv.x - (1.0 - dispFactor) * (noiseFactor), uv.y);
4493      vec4 _texture = texture2D(tex, distortedPosition);
4494      vec4 _texture2 = texture2D(tex2, distortedPosition2);
4495      vec4 finalTexture = mix(_texture, _texture2, dispFactor);
4496      finalTexture = gammaCorrection(finalTexture);
4497      gl_FragColor = finalTexture;
4498    }`);cE({ImageFadeMaterial:ane,RoundedPlaneGeometry:Ck.RoundedPlaneGeometry});const lne=({aspectRatio:t,coverImage:e,backgroundImage:n,...i})=>{const r=z.useRef(),[s,o]=ky([`/images/projects/${e}`,`/images/projects/${n}`]),[a,l]=z.useState(!1);return lc((c,h)=>{Ek.damp(r.current,"dispFactor",a?1:0,.4,h)}),F.jsxs("mesh",{...i,onPointerOver:c=>l(!0),onPointerOut:c=>l(!1),children:[F.jsx("roundedPlaneGeometry",{args:t}),F.jsx("imageFadeMaterial",{ref:r,tex:s,tex2:o,toneMapped:!1})]})},cne=()=>F.jsx("section",{className:"w-[80%] h-[full] py-20 xl:py-0 xl:pb-20 flex flex-col justify-start items-center gap-16 xl:gap-6",children:Kk.map((t,e)=>F.jsxs("article",{className:`min-h-[460px] xl:h-[400px] flex flex-col gap-4 xl:gap-10 justify-between items-center ${e%2===0?"xl:flex-row-reverse":"xl:flex-row"}`,children:[F.jsx("div",{className:"w-[300px] h-[168px] sm:w-[580px] sm:h-[327px] flex-1 flex justify-center items-center",children:e%2===0?F.jsx(Ev,{children:F.jsx(lne,{aspectRatio:[16/1.2,9/1.2],coverImage:t==null?void 0:t.coverImage,backgroundImage:t==null?void 0:t.backgroundImage})}):F.jsx(Ev,{children:F.jsx(one,{aspectRatio:[16/1.2,9/1.2],coverImage:t==null?void 0:t.coverImage,backgroundImage:t==null?void 0:t.backgroundImage,displacementTexture:"waveDisplacementTexture.jpg"})})}),F.jsxs("div",{className:"flex-1 h-full px-2 xl:py-12 flex flex-col justify-start xl:justify-center",children:[F.jsx("h3",{className:"text-slate-100 text-3xl font-bold",children:t.name}),F.jsx("div",{dangerouslySetInnerHTML:{__html:t==null?void 0:t.description}}),F.jsx("ul",{className:"flex justify-start items-start gap-2 font-light flex-wrap py-2",children:t.techstacks.length!==0&&t.techstacks.map(n=>F.jsx("li",{className:"",children:F.jsx(gE,{tag:n})},n))}),F.jsx("ul",{className:"flex flex-wrap justify-start items-start gap-x-8 gap-y-2 font-light",children:t.links.length!==0&&t.links.map(n=>F.jsx("li",{className:"",children:F.jsx(zy,{title:n.title,link:n.link})},n.title))})]})]},t.id))}),une=()=>F.jsxs("main",{className:"w-full h-full pt-10 sm:pt-20 md:pt-32 flex flex-col justify-start items-center text-white lg:gap-10",children:[F.jsx(ip,{}),F.jsxs("section",{className:"w-[60%] h-[25vh] md:h-[30vh] flex flex-col justify-start md:justify-center items-center",children:[F.jsx("h1",{className:"text-4xl sm:text-4xl md:text-7xl lg:text-9xl font-semibold py-4 whitespace-nowrap",children:"Projects Archives."}),F.jsx("h2",{className:"text-sm sm:text-base md:text-lg md:text-3xl sm:py-2 text-center",children:"Discover my handiwork – a collection of projects born from online tutorials and documentations, where I've sprinkled a dash of my existing know-how to create a harmonious blend of learning and innovation."})]}),F.jsx(cne,{}),F.jsxs("footer",{className:"w-[90%] pb-10 flex flex-col sm:flex-row justify-center items-center",children:["Made with 🌕 material by ",F.jsx("a",{href:nn.linkedin,target:"_blank",className:"underline hover:no-underline",children:"Ashmit JaiSarita Gupta"})]}),F.jsx(md,{})]}),dne=({name:t,url:e,emoji:n})=>(z.useEffect(()=>{window.location.href=e},[]),F.jsxs("div",{className:"h-screen w-full flex flex-col items-center justify-between py-10",children:[F.jsxs("div",{className:"text-[30px] sm:text-[40px] md:text-[50px] lg:text-[60px] inline py-[30%] lg:py-[15%] text-center",children:["Taking you to Ashmit's ",F.jsx("br",{})," ",t," ",F.jsx("p",{className:"inline animate-bounce",children:n})]}),F.jsx(md,{}),F.jsxs("footer",{className:"w-[90%] pb-10 pt-6 flex flex-col sm:flex-row justify-center items-center",children:["Made with 🌕 material by  ",F.jsx("a",{href:nn.linkedin,target:"_blank",className:"underline hover:no-underline",children:"Ashmit JaiSarita Gupta"})]})]}));function hne(){return F.jsx(F.Fragment,{children:F.jsx(Xz,{children:F.jsxs(Uz,{children:[F.jsx(ol,{exact:!0,path:"/",element:F.jsx(tee,{})}),F.jsx(ol,{exact:!0,path:"/resume",element:F.jsx(yee,{})}),F.jsx(ol,{exact:!0,path:"/contact",element:F.jsx(jee,{})}),F.jsx(ol,{exact:!0,path:"/notes",element:F.jsx(rne,{})}),F.jsx(ol,{exact:!0,path:"/projects",element:F.jsx(une,{})}),FV.map(({path:t,name:e,emoji:n,url:i})=>F.jsx(ol,{path:t,element:F.jsx(dne,{name:e,emoji:n,url:i})},t))]})})})}const fne=z.createContext(null),pne=({children:t})=>{const[e,n]=z.useState(!1),[i,r]=z.useState(!1),[s,o]=z.useState(!1);return F.jsx(fne.Provider,{value:{play:e,setPlay:n,end:i,setEnd:r,hasScroll:s,setHasScroll:o},children:t})};X1.createRoot(document.getElementById("root")).render(F.jsx(wV,{children:F.jsxs(pne,{children:[F.jsx(hne,{}),F.jsx(Q5,{})]})}));

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.