vendor: 4,510 bytes, lines 1-17
1function g3(n,t){for(var e=0;e<t.length;e++){const s=t[e];if(typeof s!="string"&&!Array.isArray(s)){for(const r in s)if(r!=="default"&&!(r in n)){const l=Object.getOwnPropertyDescriptor(s,r);l&&Object.defineProperty(n,r,l.get?l:{enumerable:!0,get:()=>s[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function e(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(r){if(r.ep)return;r.ep=!0;const l=e(r);fetch(r.href,l)}})();function jM(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nm={exports:{}},vc={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and 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 R1;function x3(){if(R1)return vc;R1=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(s,r,l){var u=null;if(l!==void 0&&(u=""+l),r.key!==void 0&&(u=""+r.key),"key"in r){l={};for(var f in r)f!=="key"&&(l[f]=r[f])}else l=r;return r=l.ref,{$$typeof:n,type:s,key:u,ref:r!==void 0?r:null,props:l}}return vc.Fragment=t,vc.jsx=e,vc.jsxs=e,vc}var D1;function v3(){return D1||(D1=1,nm.exports=x3()),nm.exports}var y=v3(),im={exports:{}},yc={},sm={exports:{}},am={};/** 10 * @license React 11 * scheduler.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and 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 N1;function y3(){return N1||(N1=1,(function(n){function t(I,V){var k=I.length;I.push(V);t:for(;0<k;){var gt=k-1>>>1,xt=I[gt];if(0<r(xt,V))I[gt]=V,I[k]=xt,k=gt;else break t}}function e(I){return I.length===0?null:I[0]}function s(I){if(I.length===0)return null;var V=I[0],k=I.pop();if(k!==V){I[0]=k;t:for(var gt=0,xt=I.length,B=xt>>>1;gt<B;){var at=2*(gt+1)-1,nt=I[at],pt=at+1,Et=I[pt];if(0>r(nt,k))pt<xt&&0>r(Et,nt)?(I[gt]=Et,I[pt]=k,gt=pt):(I[gt]=nt,I[at]=k,gt=at);else if(pt<xt&&0>r(Et,k))I[gt]=Et,I[pt]=k,gt=pt;else break t}}return V}function r(I,V){var k=I.sortIndex-V.sortIndex;return k!==0?k:I.id-V.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var h=[],d=[],g=1,m=null,v=3,_=!1,M=!1,T=!1,S=!1,b=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function P(I){for(var V=e(d);V!==null;){if(V.callback===null)s(d);else if(V.startTime<=I)s(d),V.sortIndex=V.expirationTime,t(h,V);else break;V=e(d)}}function U(I){if(T=!1,P(I),!M)if(e(h)!==null)M=!0,F||(F=!0,Q());else{var V=e(d);V!==null&&ot(U,V.startTime-I)}}var F=!1,L=-1,z=5,w=-1;function O(){return S?!0:!(n.unstable_now()-w<z)}function j(){if(S=!1,F){var I=n.unstable_now();w=I;var V=!0;try{t:{M=!1,T&&(T=!1,R(L),L=-1),_=!0;var k=v;try{e:{for(P(I),m=e(h);m!==null&&!(m.expirationTime>I&&O());){var gt=m.callback;if(typeof gt=="function"){m.callback=null,v=m.priorityLevel;var xt=gt(m.expirationTime<=I);if(I=n.unstable_now(),typeof xt=="function"){m.callback=xt,P(I),V=!0;break e}m===e(h)&&s(h),P(I)}else s(h);m=e(h)}if(m!==null)V=!0;else{var B=e(d);B!==null&&ot(U,B.startTime-I),V=!1}}break t}finally{m=null,v=k,_=!1}V=void 0}}finally{V?Q():F=!1}}}var Q;if(typeof C=="function")Q=function(){C(j)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,rt=Z.port2;Z.port1.onmessage=j,Q=function(){rt.postMessage(null)}}else Q=function(){b(j,0)};function ot(I,V){L=b(function(){I(n.unstable_now())},V)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(I){I.
vendor: 18,548 bytes, lines 17-43
17callback=null},n.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<I?Math.floor(1e3/I):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(I){switch(v){case 1:case 2:case 3:var V=3;break;default:V=v}var k=v;v=V;try{return I()}finally{v=k}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(I,V){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var k=v;v=I;try{return V()}finally{v=k}},n.unstable_scheduleCallback=function(I,V,k){var gt=n.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?gt+k:gt):k=gt,I){case 1:var xt=-1;break;case 2:xt=250;break;case 5:xt=1073741823;break;case 4:xt=1e4;break;default:xt=5e3}return xt=k+xt,I={id:g++,callback:V,priorityLevel:I,startTime:k,expirationTime:xt,sortIndex:-1},k>gt?(I.sortIndex=k,t(d,I),e(h)===null&&I===e(d)&&(T?(R(L),L=-1):T=!0,ot(U,k-gt))):(I.sortIndex=xt,t(h,I),M||_||(M=!0,F||(F=!0,Q()))),I},n.unstable_shouldYield=O,n.unstable_wrapCallback=function(I){var V=v;return function(){var k=v;v=V;try{return I.apply(this,arguments)}finally{v=k}}}})(am)),am}var L1;function _3(){return L1||(L1=1,sm.exports=y3()),sm.exports}var rm={exports:{}},me={};/** 18 * @license React 19 * react.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and 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 */var P1;function b3(){if(P1)return me;P1=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),v=Symbol.iterator;function _(B){return B===null||typeof B!="object"?null:(B=v&&B[v]||B["@@iterator"],typeof B=="function"?B:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,S={};function b(B,at,nt){this.props=B,this.context=at,this.refs=S,this.updater=nt||M}b.prototype.isReactComponent={},b.prototype.setState=function(B,at){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,at,"setState")},b.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function R(){}R.prototype=b.prototype;function C(B,at,nt){this.props=B,this.context=at,this.refs=S,this.updater=nt||M}var P=C.prototype=new R;P.constructor=C,T(P,b.prototype),P.isPureReactComponent=!0;var U=Array.isArray;function F(){}var L={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function w(B,at,nt){var pt=nt.ref;return{$$typeof:n,type:B,key:at,ref:pt!==void 0?pt:null,props:nt}}function O(B,at){return w(B.type,at,B.props)}function j(B){return typeof B=="object"&&B!==null&&B.$$typeof===n}function Q(B){var at={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(nt){return at[nt]})}var Z=/\/+/g;function rt(B,at){return typeof B=="object"&&B!==null&&B.key!=null?Q(""+B.key):at.toString(36)}function ot(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(F,F):(B.status="pending",B.then(function(at){B.status==="pending"&&(B.status="fulfilled",B.value=at)},function(at){B.status==="pending"&&(B.status="rejected",B.reason=at)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function I(B,at,nt,pt,Et){var J=typeof B;(J==="undefined"||J==="boolean")&&(B=null);var it=!1;if(B===null)it=!0;else switch(J){case"bigint":case"string":case"number":it=!0;break;case"object":switch(B.$$typeof){case n:case t:it=!0;break;case g:return it=B._init,I(it(B._payload),at,nt,pt,Et)}}if(it)return Et=Et(B),it=pt===""?"."+rt(B,0):pt,U(Et)?(nt="",it!=null&&(nt=it.replace(Z,"$&/")+"/"),I(Et,at,nt,"",function(Ut){return Ut})):Et!=null&&(j(Et)&&(Et=O(Et,nt+(Et.key==null||B&&B.key===Et.key?"":(""+Et.key).replace(Z,"$&/")+"/")+it)),at.push(Et)),1;it=0;var bt=pt===""?".":pt+":";if(U(B))for(var Ot=0;Ot<B.length;Ot++)pt=B[Ot],J=bt+rt(pt,Ot),it+=I(pt,at,nt,J,Et);else if(Ot=_(B),typeof Ot=="function")for(B=Ot.call(B),Ot=0;!(pt=B.next()).done;)pt=pt.value,J=bt+rt(pt,Ot++),it+=I(pt,at,nt,J,Et);else if(J==="object"){if(typeof B.then=="function")return I(ot(B),at,nt,pt,Et);throw at=String(B),Error("Objects are not valid as a React child (found: "+(at==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":at)+"). If you meant to render a collection of children, use an array instead.")}return it}function V(B,at,nt){if(B==null)return B;var pt=[],Et=0;return I(B,pt,"","",function(J){return at.call(nt,J,Et++)}),pt}function k(B){if(B._status===-1){var at=B._result;at=at(),at.then(function(nt){(B._status===0||B._status===-1)&&(B._status=1,B._result=nt)},function(nt){(B._status===0||B._status===-1)&&(B._status=2,B._result=nt)}),B._status===-1&&(B._status=0,B._result=at)}if(B._status===1)return B._result.default;throw B._result}var gt=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var at=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(at))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},xt={map:V,forEach:function(B,at,nt){V(B,function(){at.apply(this,arguments)},nt)},count:function(B){var at=0;return V(B,function(){at++}),at},toArray:function(B){return V(B,function(at){return at})||[]},only:function(B){if(!j(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return me.Activity=m,me.Children=xt,me.Component=b,me.Fragment=e,me.Profiler=r,me.PureComponent=C,me.StrictMode=s,me.Suspense=h,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,me.__COMPILER_RUNTIME={__proto__:null,c:function(B){return L.H.useMemoCache(B)}},me.cache=function(B){return function(){return B.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(B,at,nt){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var pt=T({},B.props),Et=B.key;if(at!=null)for(J in at.key!==void 0&&(Et=""+at.key),at)!z.call(at,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&at.ref===void 0||(pt[J]=at[J]);var J=arguments.length-2;if(J===1)pt.children=nt;else if(1<J){for(var it=Array(J),bt=0;bt<J;bt++)it[bt]=arguments[bt+2];pt.children=it}return w(B.type,Et,pt)},me.createContext=function(B){return B={$$typeof:u,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:l,_context:B},B},me.createElement=function(B,at,nt){var pt,Et={},J=null;if(at!=null)for(pt in at.key!==void 0&&(J=""+at.key),at)z.call(at,pt)&&pt!=="key"&&pt!=="__self"&&pt!=="__source"&&(Et[pt]=at[pt]);var it=arguments.length-2;if(it===1)Et.children=nt;else if(1<it){for(var bt=Array(it),Ot=0;Ot<it;Ot++)bt[Ot]=arguments[Ot+2];Et.children=bt}if(B&&B.defaultProps)for(pt in it=B.defaultProps,it)Et[pt]===void 0&&(Et[pt]=it[pt]);return w(B,J,Et)},me.createRef=function(){return{current:null}},me.forwardRef=function(B){return{$$typeof:f,render:B}},me.isValidElement=j,me.lazy=function(B){return{$$typeof:g,_payload:{_status:-1,_result:B},_init:k}},me.memo=function(B,at){return{$$typeof:d,type:B,compare:at===void 0?null:at}},me.startTransition=function(B){var at=L.T,nt={};L.T=nt;try{var pt=B(),Et=L.S;Et!==null&&Et(nt,pt),typeof pt=="object"&&pt!==null&&typeof pt.then=="function"&&pt.then(F,gt)}catch(J){gt(J)}finally{at!==null&&nt.types!==null&&(at.types=nt.types),L.T=at}},me.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},me.use=function(B){return L.H.use(B)},me.useActionState=function(B,at,nt){return L.H.useActionState(B,at,nt)},me.useCallback=function(B,at){return L.H.useCallback(B,at)},me.useContext=function(B){return L.H.useContext(B)},me.useDebugValue=function(){},me.useDeferredValue=function(B,at){return L.H.useDeferredValue(B,at)},me.useEffect=function(B,at){return L.H.useEffect(B,at)},me.useEffectEvent=function(B){return L.H.useEffectEvent(B)},me.useId=function(){return L.H.useId()},me.useImperativeHandle=function(B,at,nt){return L.H.useImperativeHandle(B,at,nt)},me.useInsertionEffect=function(B,at){return L.H.useInsertionEffect(B,at)},me.useLayoutEffect=function(B,at){return L.H.useLayoutEffect(B,at)},me.useMemo=function(B,at){return L.H.useMemo(B,at)},me.useOptimistic=function(B,at){return L.H.useOptimistic(B,at)},me.useReducer=function(B,at,nt){return L.H.useReducer(B,at,nt)},me.useRef=function(B){return L.H.useRef(B)},me.useState=function(B){return L.H.useState(B)},me.useSyncExternalStore=function(B,at,nt){return L.H.useSyncExternalStore(B,at,nt)},me.useTransition=function(){return L.H.useTransition()},me.version="19.2.1",me}var U1;function Pd(){return U1||(U1=1,rm.exports=b3()),rm.exports}var om={exports:{}},Jn={};/** 26 * @license React 27 * react-dom.production.js 28 * 29 * Copyright (c) Meta Platforms, Inc. and 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 O1;function S3(){if(O1)return Jn;O1=1;var n=Pd();function t(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e(){}var s={d:{f:e,r:function(){throw Error(t(522))},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},r=Symbol.for("react.portal");function l(h,d,g){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:m==null?null:""+m,children:h,containerInfo:d,implementation:g}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Jn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Jn.createPortal=function(h,d){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return l(h,d,null,g)},Jn.flushSync=function(h){var d=u.T,g=s.p;try{if(u.T=null,s.p=2,h)return h()}finally{u.T=d,s.p=g,s.d.f()}},Jn.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,s.d.C(h,d))},Jn.prefetchDNS=function(h){typeof h=="string"&&s.d.D(h)},Jn.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var g=d.as,m=f(g,d.crossOrigin),v=typeof d.integrity=="string"?d.integrity:void 0,_=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;g==="style"?s.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:v,fetchPriority:_}):g==="script"&&s.d.X(h,{crossOrigin:m,integrity:v,fetchPriority:_,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Jn.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var g=f(d.as,d.crossOrigin);s.d.M(h,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&s.d.M(h)},Jn.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var g=d.as,m=f(g,d.crossOrigin);s.d.L(h,g,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Jn.preloadModule=function(h,d){if(typeof h=="string")if(d){var g=f(d.as,d.crossOrigin);s.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else s.d.m(h)},Jn.requestFormReset=function(h){s.d.r(h)},Jn.unstable_batchedUpdates=function(h,d){return h(d)},Jn.useFormState=function(h,d,g){return u.H.useFormState(h,d,g)},Jn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Jn.version="19.2.1",Jn}var F1;function WM(){if(F1)return om.exports;F1=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),om.exports=S3(),om.exports}/** 34 * @license React 35 * react-dom-client.production.js 36 * 37 * Copyright (c) Meta Platforms, Inc. and affiliates. 38 * 39 * This source code is licensed under the MIT license found in the 40 * LICENSE file in the root directory of this source tree. 41 */var I1;function M3(){if(I1)return yc;I1=1;var n=_3(),t=Pd(),e=WM();function s(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function l(i){var a=i,o=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(o=a.return),i=a.return;while(i)}return a.tag===3?o:null}function u(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function f(i){if(i.tag===31){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function h(i){if(l(i)!==i)throw Error(s(188))}function d(i){var a=i.alternate;if(!a){if(a=l(i),a===null)throw Error(s(188));return a!==i?null:i}for(var o=i,c=a;;){var p=o.return;if(p===null)break;var x=p.alternate;if(x===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===o)return h(p),i;if(x===c)return h(p),a;x=x.sibling}throw Error(s(188))}if(o.return!==c.return)o=p,c=x;else{for(var E=!1,D=p.child;D;){if(D===o){E=!0,o=p,c=x;break}if(D===c){E=!0,c=p,o=x;break}D=D.sibling}if(!E){for(D=x.child;D;){if(D===o){E=!0,o=x,c=p;break}if(D===c){E=!0,c=x,o=p;break}D=D.sibling}if(!E)throw Error(s(189))}}if(o.alternate!==c)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?i:a}function g(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=g(i),a!==null)return a;i=i.sibling}return null}var m=Object.assign,v=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),C=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function Q(i){return i===null||typeof i!="object"?null:(i=j&&i[j]||i["@@iterator"],typeof i=="function"?i:null)}var Z=Symbol.for("react.client.reference");function rt(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===Z?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case T:return"Fragment";case b:return"Profiler";case S:return"StrictMode";case U:return"Suspense";case F:return"SuspenseList";case w:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case M:return"Portal";case C:return i.displayName||"Context";case R:return(i._context.displayName||"Context")+".Consumer";case P:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case L:return a=i.displayName||null,a!==null?a:rt(i.type)||"Memo";case z:a=i._payload,i=i._init;try{return rt(i(a))}catch{}}return null}var ot=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k={pending:!1,data:null,method:null,action:null},gt=[],xt=-1;function B(i){return{current:i}}function at(i){0>xt||(i.current=gt[xt],gt[xt]=null,xt--)}function nt(i,a){xt++,gt[xt]=i.current,i.current=a}var pt=B(null),Et=B(null),J=B(null),it=B(null);function bt(i,a){switch(nt(J,a),nt(Et,i),nt(pt,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?J_(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=J_(a),i=$_(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}at(pt),nt(pt,i)}function Ot(){at(pt),at(Et),at(J)}function Ut(i){i.memoizedState!==null&&nt(it,i);var a=pt.current,o=$_(a,i.type);a!==o&&(nt(Et,i),nt(pt,o))}function ae(i){Et.current===i&&(at(pt),at(Et)),it.current===i&&(at(it),pc._currentValue=k)}var Ce,ge;function ye(i){if(Ce===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Ce=a&&a[1]||"",ge=-1<o.stack.indexOf(` 42 at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return` 43`+Ce+i+ge}var Ie=!1;function de(i,a){if(!i||Ie)return"";Ie=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var Mt=function(){throw Error()};if(Object.defineProperty(Mt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Mt,[])}catch(mt){var dt=mt}Reflect.construct(i,[],Mt)}else{try{Mt.call()}catch(mt){dt=mt}i.call(Mt.prototype)}}else{try{throw Error()}catch(mt){dt=mt}(Mt=i())&&typeof Mt.catch=="function"&&Mt.catch(function(){})}}
vendor: 8,837 bytes, lines 43-48
43catch(mt){if(mt&&dt&&typeof mt.stack=="string")return[mt.stack,dt.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=c.DetermineComponentFrameRoot(),E=x[0],D=x[1];if(E&&D){var W=E.split(` 44`),ct=D.split(` 45`);for(p=c=0;c<W.length&&!W[c].includes("DetermineComponentFrameRoot");)c++;for(;p<ct.length&&!ct[p].includes("DetermineComponentFrameRoot");)p++;if(c===W.length||p===ct.length)for(c=W.length-1,p=ct.length-1;1<=c&&0<=p&&W[c]!==ct[p];)p--;for(;1<=c&&0<=p;c--,p--)if(W[c]!==ct[p]){if(c!==1||p!==1)do if(c--,p--,0>p||W[c]!==ct[p]){var _t=` 46`+W[c].replace(" at new "," at ");return i.displayName&&_t.includes("<anonymous>")&&(_t=_t.replace("<anonymous>",i.displayName)),_t}while(1<=c&&0<=p);break}}}finally{Ie=!1,Error.prepareStackTrace=o}return(o=i?i.displayName||i.name:"")?ye(o):""}function Ke(i,a){switch(i.tag){case 26:case 27:case 5:return ye(i.type);case 16:return ye("Lazy");case 13:return i.child!==a&&a!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return de(i.type,!1);case 11:return de(i.type.render,!1);case 1:return de(i.type,!0);case 31:return ye("Activity");default:return""}}function X(i){try{var a="",o=null;do a+=Ke(i,o),o=i,i=i.return;while(i);return a}catch(c){return` 47Error generating stack: `+c.message+` 48`+c.stack}}var Pe=Object.prototype.hasOwnProperty,Re=n.unstable_scheduleCallback,Be=n.unstable_cancelCallback,Ht=n.unstable_shouldYield,H=n.unstable_requestPaint,A=n.unstable_now,K=n.unstable_getCurrentPriorityLevel,yt=n.unstable_ImmediatePriority,Tt=n.unstable_UserBlockingPriority,vt=n.unstable_NormalPriority,qt=n.unstable_LowPriority,Nt=n.unstable_IdlePriority,Wt=n.log,ne=n.unstable_setDisableYieldValue,Ct=null,Rt=null;function Gt(i){if(typeof Wt=="function"&&ne(i),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(Ct,i)}catch{}}var zt=Math.clz32?Math.clz32:Y,Lt=Math.log,he=Math.LN2;function Y(i){return i>>>=0,i===0?32:31-(Lt(i)/he|0)|0}var Ft=256,Dt=262144,Bt=4194304;function At(i){var a=i&42;if(a!==0)return a;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function ut(i,a,o){var c=i.pendingLanes;if(c===0)return 0;var p=0,x=i.suspendedLanes,E=i.pingedLanes;i=i.warmLanes;var D=c&134217727;return D!==0?(c=D&~x,c!==0?p=At(c):(E&=D,E!==0?p=At(E):o||(o=D&~i,o!==0&&(p=At(o))))):(D=c&~x,D!==0?p=At(D):E!==0?p=At(E):o||(o=c&~i,o!==0&&(p=At(o)))),p===0?0:a!==0&&a!==p&&(a&x)===0&&(x=p&-p,o=a&-a,x>=o||x===32&&(o&4194048)!==0)?a:p}function wt(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Qt(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xe(){var i=Bt;return Bt<<=1,(Bt&62914560)===0&&(Bt=4194304),i}function Ee(i){for(var a=[],o=0;31>o;o++)a.push(i);return a}function Ue(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function cn(i,a,o,c,p,x){var E=i.pendingLanes;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=o,i.entangledLanes&=o,i.errorRecoveryDisabledLanes&=o,i.shellSuspendCounter=0;var D=i.entanglements,W=i.expirationTimes,ct=i.hiddenUpdates;for(o=E&~o;0<o;){var _t=31-zt(o),Mt=1<<_t;D[_t]=0,W[_t]=-1;var dt=ct[_t];if(dt!==null)for(ct[_t]=null,_t=0;_t<dt.length;_t++){var mt=dt[_t];mt!==null&&(mt.lane&=-536870913)}o&=~Mt}c!==0&&Ls(i,c,0),x!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=x&~(E&~a))}function Ls(i,a,o){i.pendingLanes|=a,i.suspendedLanes&=~a;var c=31-zt(a);i.entangledLanes|=a,i.entanglements[c]=i.entanglements[c]|1073741824|o&261930}function Bn(i,a){var o=i.entangledLanes|=a;for(i=i.entanglements;o;){var c=31-zt(o),p=1<<c;p&a|i[c]&a&&(i[c]|=a),o&=~p}}function On(i,a){var o=a&-a;return o=(o&42)!==0?1:va(o),(o&(i.suspendedLanes|a))!==0?0:o}function va(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function li(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Qr(){var i=V.p;return i!==0?i:(i=window.event,i===void 0?32:S1(i.type))}function fs(i,a){var o=V.p;try{return V.p=i,a()}finally{V.p=o}}var Ui=Math.random().toString(36).slice(2),bn="__reactFiber$"+Ui,Vn="__reactProps$"+Ui,Qi="__reactContainer$"+Ui,Jr="__reactEvents$"+Ui,$r="__reactListeners$"+Ui,cu="__reactHandles$"+Ui,Rl="__reactResources$"+Ui,cr="__reactMarker$"+Ui;function Dl(i){delete i[bn],delete i[Vn],delete i[Jr],delete i[$r],delete i[cu]}function ya(i){var a=i[bn];if(a)return a;for(var o=i.parentNode;o;){if(a=o[Qi]||o[bn]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(i=r1(i);i!==null;){if(o=i[bn])return o;i=r1(i)}return a}i=o,o=i.parentNode}return null}function _a(i){if(i=i[bn]||i[Qi]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function ur(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(s(33))}function ba(i){var a=i[Rl];return a||(a=i[Rl]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function N(i){i[cr]=!0}var $=new Set,ht={};function ft(i,a){st(i,a),st(i+"Capture",a)}function st(i,a){for(ht[i]=a,i=0;i<a.length;i++)$.add(a[i])}var It=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jt={},Vt={};function Xt(i){return Pe.call(Vt,i)?!0:Pe.call(jt,i)?!1:It.test(i)?Vt[i]=!0:(jt[i]=!0,!1)}function Jt(i,a,o){if(Xt(a))if(o===null)i.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+o)}}function se(i,a,o){if(o===null)i.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+o)}}function $t(i,a,o,c){if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttributeNS(a,o,""+c)}}function re(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ke(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function un(i,a,o){var c=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return p.call(this)},set:function(E){o=""+E,x.call(this,E)}}),Object.defineProperty(i,a,{enumerable:c.enumerable}),{getValue:function(){return o},setValue:function(E){o=""+E},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function sn(i){if(!i._valueTracker){var a=ke(i)?"checked":"value";i._valueTracker=un(i,a,""+i[a])}}function We(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return i&&(c=ke(i)?i.checked?"true":"false":i.value),i=c,i!==o?(a.setValue(i),!0):!1}function ee(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Ge=/[\n"\\]/g;function pe(i){return i.replace(Ge,function(a){return"\\"+a.charCo
vendor: 4,418 bytes, line 48
48deAt(0).toString(16)+" "})}function Hn(i,a,o,c,p,x,E,D){i.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?i.type=E:i.removeAttribute("type"),a!=null?E==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+re(a)):i.value!==""+re(a)&&(i.value=""+re(a)):E!=="submit"&&E!=="reset"||i.removeAttribute("value"),a!=null?kn(i,E,re(a)):o!=null?kn(i,E,re(o)):c!=null&&i.removeAttribute("value"),p==null&&x!=null&&(i.defaultChecked=!!x),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?i.name=""+re(D):i.removeAttribute("name")}function Ps(i,a,o,c,p,x,E,D){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.type=x),a!=null||o!=null){if(!(x!=="submit"&&x!=="reset"||a!=null)){sn(i);return}o=o!=null?""+re(o):"",a=a!=null?""+re(a):o,D||a===i.value||(i.value=a),i.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,i.checked=D?i.checked:!!c,i.defaultChecked=!!c,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(i.name=E),sn(i)}function kn(i,a,o){a==="number"&&ee(i.ownerDocument)===i||i.defaultValue===""+o||(i.defaultValue=""+o)}function Oi(i,a,o,c){if(i=i.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<i.length;o++)p=a.hasOwnProperty("$"+i[o].value),i[o].selected!==p&&(i[o].selected=p),p&&c&&(i[o].defaultSelected=!0)}else{for(o=""+re(o),a=null,p=0;p<i.length;p++){if(i[p].value===o){i[p].selected=!0,c&&(i[p].defaultSelected=!0);return}a!==null||i[p].disabled||(a=i[p])}a!==null&&(a.selected=!0)}}function Xe(i,a,o){if(a!=null&&(a=""+re(a),a!==i.value&&(i.value=a),o==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=o!=null?""+re(o):""}function Gn(i,a,o,c){if(a==null){if(c!=null){if(o!=null)throw Error(s(92));if(ot(c)){if(1<c.length)throw Error(s(93));c=c[0]}o=c}o==null&&(o=""),a=o}o=re(a),i.defaultValue=o,c=i.textContent,c===o&&c!==""&&c!==null&&(i.value=c),sn(i)}function Cn(i,a){if(a){var o=i.firstChild;if(o&&o===i.lastChild&&o.nodeType===3){o.nodeValue=a;return}}i.textContent=a}var jn=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Wn(i,a,o){var c=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?c?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":c?i.setProperty(a,o):typeof o!="number"||o===0||jn.has(a)?a==="float"?i.cssFloat=o:i[a]=(""+o).trim():i[a]=o+"px"}function to(i,a,o){if(a!=null&&typeof a!="object")throw Error(s(62));if(i=i.style,o!=null){for(var c in o)!o.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?i.setProperty(c,""):c==="float"?i.cssFloat="":i[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&o[p]!==c&&Wn(i,p,c)}else for(var x in a)a.hasOwnProperty(x)&&Wn(i,x,a[x])}function Ji(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var dA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function uu(i){return hA.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Us(){}var $d=null;function th(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var eo=null,no=null;function Qx(i){var a=_a(i);if(a&&(i=a.stateNode)){var o=i[Vn]||null;t:switch(i=a.stateNode,a.type){case"input":if(Hn(i,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=i;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+pe(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var c=o[a];if(c!==i&&c.form===i.form){var p=c[Vn]||null;if(!p)throw Error(s(90));Hn(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)c=o[a],c.form===i.form&&We(c)}break t;case"textarea":Xe(i,o.value,o.defaultValue);break t;case"select":a=o.value,a!=null&&Oi(i,!!o.multiple,a,!1)}}}var eh=!1;function Jx(i,a,o){if(eh)return i(a,o);eh=!0;try{var c=i(a);return c}finally{if(eh=!1,(eo!==null||no!==null)&&(Qu(),eo&&(a=eo,i=no,no=eo=null,Qx(a),i)))for(a=0;a<i.length;a++)Qx(i[a])}}function Nl(i,a){var o=i.stateNode;if(o===null)return null;var c=o[Vn]||null;if(c===null)return null;o=c[a];t:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(i=i.type,c=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!c;break t;default:i=!1}if(i)return null;if(o&&typeof o!="function")throw Error(s(231,a,typeof o));return o}var Os=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nh=!1;if(Os)try{var Ll={};Object.defineProperty(Ll,"passive",{get:function(){nh=!0}}),window.addEventListener("test",Ll,Ll),window.removeEventListener("test",Ll,Ll)}catch{nh=!1}var Sa=null,ih=null,fu=null;function $x(){if(fu)return fu;var i,a=ih,o=a.length,c,p="value"in Sa?Sa.value:Sa.textContent,x=p.length;for(i=0;i<o&&a[i]===p[i];i++);var E=o-i;for(c=1;c<=E&&a[o-c]===p[x-c];c++);return fu=p.slice(i,1<c?1-c:void 0)}function du(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function hu(){return!0}function tv(){return!1}function ci(i){function a(o,c,p,x,E){this._reactName=o,this._targetInst=p,this.type=c,this.nativeEvent=x,this.target=E,this.currentTarget=null;for(var D in i)i.hasOwnProperty(D)&&(o=i[D],this[D]=o?o(x):x[D]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?hu:tv,this.isPropagationStopped=tv,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=hu)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=hu)},persist:function(){},isPersistent:hu}),a}var fr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pu=ci(fr),Pl=m({},fr,{view:0,detail:0}),pA=ci(Pl),sh,ah,Ul,mu=m({},Pl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ul&&(Ul&&i.type==="mousemove"?(sh=i.screenX-Ul.screenX,ah=i.screenY-Ul.screenY):ah=sh=0,Ul=i),sh)},movementY:function(i){return"movementY"in i?i.movementY:ah}}),ev=ci(mu),mA=m({},mu,{dataTransfer:0}),gA=ci(mA),xA=m({},Pl,{relatedTarget:0}),rh=ci(xA),vA=m({},fr,{animationName:0,elapsedTime:0,pseudoElement:0}),yA=ci(vA),_A=m({},fr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),bA=ci(_A),SA=m({},fr,{data:0}),nv=ci(SA),MA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EA={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"},TA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AA(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=TA[i])?!!a[i]:!1}function oh(){return AA}var wA=m({},Pl,{key:function(i){if(i.key){var a=MA[i.key]||i.key;if(a!=="Unidentified")return a}
vendor: 4,492 bytes, line 48
48return i.type==="keypress"?(i=du(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?EA[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oh,charCode:function(i){return i.type==="keypress"?du(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?du(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),CA=ci(wA),RA=m({},mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),iv=ci(RA),DA=m({},Pl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oh}),NA=ci(DA),LA=m({},fr,{propertyName:0,elapsedTime:0,pseudoElement:0}),PA=ci(LA),UA=m({},mu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),OA=ci(UA),FA=m({},fr,{newState:0,oldState:0}),IA=ci(FA),zA=[9,13,27,32],lh=Os&&"CompositionEvent"in window,Ol=null;Os&&"documentMode"in document&&(Ol=document.documentMode);var BA=Os&&"TextEvent"in window&&!Ol,sv=Os&&(!lh||Ol&&8<Ol&&11>=Ol),av=" ",rv=!1;function ov(i,a){switch(i){case"keyup":return zA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lv(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var io=!1;function VA(i,a){switch(i){case"compositionend":return lv(a);case"keypress":return a.which!==32?null:(rv=!0,av);case"textInput":return i=a.data,i===av&&rv?null:i;default:return null}}function HA(i,a){if(io)return i==="compositionend"||!lh&&ov(i,a)?(i=$x(),fu=ih=Sa=null,io=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return sv&&a.locale!=="ko"?null:a.data;default:return null}}var kA={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 cv(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!kA[i.type]:a==="textarea"}function uv(i,a,o,c){eo?no?no.push(c):no=[c]:eo=c,a=af(a,"onChange"),0<a.length&&(o=new pu("onChange","change",null,o,c),i.push({event:o,listeners:a}))}var Fl=null,Il=null;function GA(i){X_(i,0)}function gu(i){var a=ur(i);if(We(a))return i}function fv(i,a){if(i==="change")return a}var dv=!1;if(Os){var ch;if(Os){var uh="oninput"in document;if(!uh){var hv=document.createElement("div");hv.setAttribute("oninput","return;"),uh=typeof hv.oninput=="function"}ch=uh}else ch=!1;dv=ch&&(!document.documentMode||9<document.documentMode)}function pv(){Fl&&(Fl.detachEvent("onpropertychange",mv),Il=Fl=null)}function mv(i){if(i.propertyName==="value"&&gu(Il)){var a=[];uv(a,Il,i,th(i)),Jx(GA,a)}}function jA(i,a,o){i==="focusin"?(pv(),Fl=a,Il=o,Fl.attachEvent("onpropertychange",mv)):i==="focusout"&&pv()}function WA(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return gu(Il)}function XA(i,a){if(i==="click")return gu(a)}function YA(i,a){if(i==="input"||i==="change")return gu(a)}function qA(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var _i=typeof Object.is=="function"?Object.is:qA;function zl(i,a){if(_i(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var o=Object.keys(i),c=Object.keys(a);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var p=o[c];if(!Pe.call(a,p)||!_i(i[p],a[p]))return!1}return!0}function gv(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function xv(i,a){var o=gv(i);i=0;for(var c;o;){if(o.nodeType===3){if(c=i+o.textContent.length,i<=a&&c>=a)return{node:o,offset:a-i};i=c}t:{for(;o;){if(o.nextSibling){o=o.nextSibling;break t}o=o.parentNode}o=void 0}o=gv(o)}}function vv(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?vv(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function yv(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=ee(i.document);a instanceof i.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}
vendor: 22,291 bytes, line 48
48if(o)i=a.contentWindow;else break;a=ee(i.document)}return a}function fh(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var ZA=Os&&"documentMode"in document&&11>=document.documentMode,so=null,dh=null,Bl=null,hh=!1;function _v(i,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;hh||so==null||so!==ee(c)||(c=so,"selectionStart"in c&&fh(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Bl&&zl(Bl,c)||(Bl=c,c=af(dh,"onSelect"),0<c.length&&(a=new pu("onSelect","select",null,a,o),i.push({event:a,listeners:c}),a.target=so)))}function dr(i,a){var o={};return o[i.toLowerCase()]=a.toLowerCase(),o["Webkit"+i]="webkit"+a,o["Moz"+i]="moz"+a,o}var ao={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},ph={},bv={};Os&&(bv=document.createElement("div").style,"AnimationEvent"in window||(delete ao.animationend.animation,delete ao.animationiteration.animation,delete ao.animationstart.animation),"TransitionEvent"in window||delete ao.transitionend.transition);function hr(i){if(ph[i])return ph[i];if(!ao[i])return i;var a=ao[i],o;for(o in a)if(a.hasOwnProperty(o)&&o in bv)return ph[i]=a[o];return i}var Sv=hr("animationend"),Mv=hr("animationiteration"),Ev=hr("animationstart"),KA=hr("transitionrun"),QA=hr("transitionstart"),JA=hr("transitioncancel"),Tv=hr("transitionend"),Av=new Map,mh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mh.push("scrollEnd");function $i(i,a){Av.set(i,a),ft(a,[i])}var xu=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Fi=[],ro=0,gh=0;function vu(){for(var i=ro,a=gh=ro=0;a<i;){var o=Fi[a];Fi[a++]=null;var c=Fi[a];Fi[a++]=null;var p=Fi[a];Fi[a++]=null;var x=Fi[a];if(Fi[a++]=null,c!==null&&p!==null){var E=c.pending;E===null?p.next=p:(p.next=E.next,E.next=p),c.pending=p}x!==0&&wv(o,p,x)}}function yu(i,a,o,c){Fi[ro++]=i,Fi[ro++]=a,Fi[ro++]=o,Fi[ro++]=c,gh|=c,i.lanes|=c,i=i.alternate,i!==null&&(i.lanes|=c)}function xh(i,a,o,c){return yu(i,a,o,c),_u(i)}function pr(i,a){return yu(i,null,null,a),_u(i)}function wv(i,a,o){i.lanes|=o;var c=i.alternate;c!==null&&(c.lanes|=o);for(var p=!1,x=i.return;x!==null;)x.childLanes|=o,c=x.alternate,c!==null&&(c.childLanes|=o),x.tag===22&&(i=x.stateNode,i===null||i._visibility&1||(p=!0)),i=x,x=x.return;return i.tag===3?(x=i.stateNode,p&&a!==null&&(p=31-zt(o),i=x.hiddenUpdates,c=i[p],c===null?i[p]=[a]:c.push(a),a.lane=o|536870912),x):null}function _u(i){if(50<oc)throw oc=0,Ap=null,Error(s(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var oo={};function $A(i,a,o,c){this.tag=i,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bi(i,a,o,c){return new $A(i,a,o,c)}function vh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Fs(i,a){var o=i.alternate;return o===null?(o=bi(i.tag,a,i.key,i.mode),o.elementType=i.elementType,o.type=i.type,o.stateNode=i.stateNode,o.alternate=i,i.alternate=o):(o.pendingProps=a,o.type=i.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=i.flags&65011712,o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,a=i.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=i.sibling,o.index=i.index,o.ref=i.ref,o.refCleanup=i.refCleanup,o}function Cv(i,a){i.flags&=65011714;var o=i.alternate;return o===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,a=o.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function bu(i,a,o,c,p,x){var E=0;if(c=i,typeof i=="function")vh(i)&&(E=1);else if(typeof i=="string")E=s3(i,o,pt.current)?26:i==="html"||i==="head"||i==="body"?27:5;else t:switch(i){case w:return i=bi(31,o,a,p),i.elementType=w,i.lanes=x,i;case T:return mr(o.children,p,x,a);case S:E=8,p|=24;break;case b:return i=bi(12,o,a,p|2),i.elementType=b,i.lanes=x,i;case U:return i=bi(13,o,a,p),i.elementType=U,i.lanes=x,i;case F:return i=bi(19,o,a,p),i.elementType=F,i.lanes=x,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C:E=10;break t;case R:E=9;break t;case P:E=11;break t;case L:E=14;break t;case z:E=16,c=null;break t}E=29,o=Error(s(130,i===null?"null":typeof i,"")),c=null}return a=bi(E,o,a,p),a.elementType=i,a.type=c,a.lanes=x,a}function mr(i,a,o,c){return i=bi(7,i,c,a),i.lanes=o,i}function yh(i,a,o){return i=bi(6,i,null,a),i.lanes=o,i}function Rv(i){var a=bi(18,null,null,0);return a.stateNode=i,a}function _h(i,a,o){return a=bi(4,i.children!==null?i.children:[],i.key,a),a.lanes=o,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var Dv=new WeakMap;function Ii(i,a){if(typeof i=="object"&&i!==null){var o=Dv.get(i);return o!==void 0?o:(a={value:i,source:a,stack:X(a)},Dv.set(i,a),a)}return{value:i,source:a,stack:X(a)}}var lo=[],co=0,Su=null,Vl=0,zi=[],Bi=0,Ma=null,ds=1,hs="";function Is(i,a){lo[co++]=Vl,lo[co++]=Su,Su=i,Vl=a}function Nv(i,a,o){zi[Bi++]=ds,zi[Bi++]=hs,zi[Bi++]=Ma,Ma=i;var c=ds;i=hs;var p=32-zt(c)-1;c&=~(1<<p),o+=1;var x=32-zt(a)+p;if(30<x){var E=p-p%5;x=(c&(1<<E)-1).toString(32),c>>=E,p-=E,ds=1<<32-zt(a)+p|o<<p|c,hs=x+i}else ds=1<<x|o<<p|c,hs=i}function bh(i){i.return!==null&&(Is(i,1),Nv(i,1,0))}function Sh(i){for(;i===Su;)Su=lo[--co],lo[co]=null,Vl=lo[--co],lo[co]=null;for(;i===Ma;)Ma=zi[--Bi],zi[Bi]=null,hs=zi[--Bi],zi[Bi]=null,ds=zi[--Bi],zi[Bi]=null}function Lv(i,a){zi[Bi++]=ds,zi[Bi++]=hs,zi[Bi++]=Ma,ds=a.id,hs=a.overflow,Ma=i}var Xn=null,rn=null,Le=!1,Ea=null,Vi=!1,Mh=Error(s(519));function Ta(i){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hl(Ii(a,i)),Mh}function Pv(i){var a=i.stateNode,o=i.type,c=i.memoizedProps;switch(a[bn]=i,a[Vn]=c,o){case"dialog":Ae("cancel",a),Ae("close",a);break;case"iframe":case"object":case"embed":Ae("load",a);break;case"video":case"audio":for(o=0;o<cc.length;o++)Ae(cc[o],a);break;case"source":Ae("error",a);break;case"img":case"image":case"link":Ae("error",a),Ae("load",a);break;case"details":Ae("toggle",a);break;case"input":Ae("invalid",a),Ps(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ae("invalid",a);break;case"textarea":Ae("invalid",a),Gn(a,c.value,c.defaultValue,c.children)}o=c.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||c.suppressHydrationWarning===!0||K_(a.textContent,o)?(c.popover!=null&&(Ae("beforetoggle",a),Ae("toggle",a)),c.onScroll!=null&&Ae("scroll",a),c.onScrollEnd!=null&&Ae("scrollend",a),c.onClick!=null&&(a.onclick=Us),a=!0):a=!1,a||Ta(i,!0)}function Uv(i){for(Xn=i.return;Xn;)switch(Xn.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:Xn=Xn.return}}function uo(i){if(i!==Xn)return!1;if(!Le)return Uv(i),Le=!0,!1;var a=i.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=i.type,o=!(o!=="form"&&o!=="button")||Hp(i.type,i.memoizedProps)),o=!o),o&&rn&&Ta(i),Uv(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));rn=a1(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));rn=a1(i)}else a===27?(a=rn,Ba(i.type)?(i=Xp,Xp=null,rn=i):rn=a):rn=Xn?ki(i.stateNode.nextSibling):null;return!0}function gr(){rn=Xn=null,Le=!1}function Eh(){var i=Ea;return i!==null&&(hi===null?hi=i:hi.push.apply(hi,i),Ea=null),i}function Hl(i){Ea===null?Ea=[i]:Ea.push(i)}var Th=B(null),xr=null,zs=null;function Aa(i,a,o){nt(Th,a._currentValue),a._currentValue=o}function Bs(i){i._currentValue=Th.current,at(Th)}function Ah(i,a,o){for(;i!==null;){var c=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),i===o)break;i=i.return}}function wh(i,a,o,c){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var x=p.dependencies;if(x!==null){var E=p.child;x=x.firstContext;t:for(;x!==null;){var D=x;x=p;for(var W=0;W<a.length;W++)if(D.context===a[W]){x.lanes|=o,D=x.alternate,D!==null&&(D.lanes|=o),Ah(x.return,o,i),c||(E=null);break t}x=D.next}}else if(p.tag===18){if(E=p.return,E===null)throw Error(s(341));E.lanes|=o,x=E.alternate,x!==null&&(x.lanes|=o),Ah(E,o,i),E=null}else E=p.child;if(E!==null)E.return=p;else for(E=p;E!==null;){if(E===i){E=null;break}if(p=E.sibling,p!==null){p.return=E.return,E=p;break}E=E.return}p=E}}function fo(i,a,o,c){i=null;for(var p=a,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var E=p.alternate;if(E===null)throw Error(s(387));if(E=E.memoizedProps,E!==null){var D=p.type;_i(p.pendingProps.value,E.value)||(i!==null?i.push(D):i=[D])}}else if(p===it.current){if(E=p.alternate,E===null)throw Error(s(387));E.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(pc):i=[pc])}p=p.return}i!==null&&wh(a,i,o,c),a.flags|=262144}function Mu(i){for(i=i.firstContext;i!==null;){if(!_i(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function vr(i){xr=i,zs=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Yn(i){return Ov(xr,i)}function Eu(i,a){return xr===null&&vr(i),Ov(i,a)}function Ov(i,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},zs===null){if(i===null)throw Error(s(308));zs=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else zs=zs.next=a;return o}var tw=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(o,c){i.push(c)}};this.abort=function(){a.aborted=!0,i.forEach(function(o){return o()})}},ew=n.unstable_scheduleCallback,nw=n.unstable_NormalPriority,Sn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ch(){return{controller:new tw,data:new Map,refCount:0}}function kl(i){i.refCount--,i.refCount===0&&ew(nw,function(){i.controller.abort()})}var Gl=null,Rh=0,ho=0,po=null;function iw(i,a){if(Gl===null){var o=Gl=[];Rh=0,ho=Lp(),po={status:"pending",value:void 0,then:function(c){o.push(c)}}}return Rh++,a.then(Fv,Fv),a}function Fv(){if(--Rh===0&&Gl!==null){po!==null&&(po.status="fulfilled");var i=Gl;Gl=null,ho=0,po=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function sw(i,a){var o=[],c={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return i.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),c}var Iv=I.S;I.S=function(i,a){__=A(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&iw(i,a),Iv!==null&&Iv(i,a)};var yr=B(null);function Dh(){var i=yr.current;return i!==null?i:nn.pooledCache}function Tu(i,a){a===null?nt(yr,yr.current):nt(yr,a.pool)}function zv(){var i=Dh();return i===null?null:{parent:Sn._currentValue,pool:i}}var mo=Error(s(460)),Nh=Error(s(474)),Au=Error(s(542)),wu={then:function(){}};function Bv(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Vv(i,a,o){switch(o=i[o],o===void 0?i.push(a):o!==a&&(a.then(Us,Us),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,kv(i),i;default:if(typeof a.status=="string")a.then(Us,Us);else{if(i=nn,i!==null&&100<i.shellSuspendCounter)throw Error(s(482));i=a,i.status="pending",i.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,kv(i),i}throw br=a,mo}}function _r(i){try{var a=i._init;return a(i._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(br=o,mo):o}}var br=null;function Hv(){if(br===null)throw Error(s(459));var i=br;return br=null,i}function kv(i){if(i===mo||i===Au)throw Error(s(483))}var go=null,jl=0;function Cu(i){var a=jl;return jl+=1,go===null&&(go=[]),Vv(go,i,a)}function Wl(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function Ru(i,a){throw a.$$typeof===v?Error(s(525)):(i=Object.prototype.toString.call(a),Error(s(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function Gv(i){function a(tt,q){if(i){var lt=tt.deletions;lt===null?(tt.deletions=[q],tt.flags|=16):lt.push(q)}}function o(tt,q){if(!i)return null;for(;q!==null;)a(tt,q),q=q.sibling;return null}function c(tt){for(var q=new Map;tt!==null;)tt.key!==null?q.set(tt.key,tt):q.set(tt.index,tt),tt=tt.sibling;return q}function p(tt,q){return tt=Fs(tt,q),tt.index=0,tt.sibling=null,tt}function x(tt,q,lt){return tt.index=lt,i?(lt=tt.alternate,lt!==null?(lt=lt.index,lt<q?(tt.flags|=67108866,q):lt):(tt.flags|=67108866,q)):(tt.flags|=1048576,q)}function E(tt){return i&&tt.alternate===null&&(tt.flags|=67108866),tt}function D(tt,q,lt,St){return q===null||q.tag!==6?(q=yh(lt,tt.mode,St),q.return=tt,q):(q=p(q,lt),q.return=tt,q)}function W(tt,q,lt,St){var ie=lt.type;return ie===T?_t(tt,q,lt.props.children,St,lt.key):q!==null&&(q.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===z&&_r(ie)===q.type)?(q=p(q,lt.props),Wl(q,lt),q.return=tt,q):(q=bu(lt.type,lt.key,lt.props,null,tt.mode,St),Wl(q,lt),q.return=tt,q)}function ct(tt,q,lt,St){return q===null||q.tag!==4||q.stateNode.containerInfo!==lt.containerInfo||q.stateNode.implementation!==lt.implementation?(q=_h(lt,tt.mode,St),q.return=tt,q):(q=p(q,lt.children||[]),q.return=tt,q)}function _t(tt,q,lt,St,ie){return q===null||q.tag!==7?(q=mr(lt,tt.mode,St,ie),q.return=tt,q):(q=p(q,lt),q.return=tt,q)}function Mt(tt,q,lt){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=yh(""+q,tt.mode,lt),q.return=tt,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return lt=bu(q.type,q.key,q.props,null,tt.mode,lt),Wl(lt,q),lt.return=tt,lt;case M:return q=_h(q,tt.mode,lt),q.return=tt,q;case z:return q=_r(q),Mt(tt,q,lt)}if(ot(q)||Q(q))return q=mr(q,tt.mode,lt,null),q.return=tt,q;if(typeof q.then=="function")return Mt(tt,Cu(q),lt);if(q.$$typeof===C)return Mt(tt,Eu(tt,q),lt);Ru(tt,q)}return null}function dt(tt,q,lt,St){var ie=q!==null?q.key:null;if(typeof lt=="string"&<!==""||typeof lt=="number"||typeof lt=="bigint")return ie!==null?null:D(tt,q,""+lt,St);if(typeof lt=="object"&<!==null){switch(lt.$$typeof){case _:return lt.key===ie?W(tt,q,lt,St):null;case M:return lt.key===ie?ct(tt,q,lt,St):null;case z:return lt=_r(lt),dt(tt,q,lt,St)}if(ot(lt)||Q(lt))return ie!==null?null:_t(tt,q,lt,St,null);if(typeof lt.then=="function")return dt(tt,q,Cu(lt),St);if(lt.$$typeof===C)return dt(tt,q,Eu(tt,lt),St);Ru(tt,lt)}return null}function mt(tt,q,lt,St,ie){if(typeof St=="string"&&St!==""||typeof St=="number"||typeof St=="bigint")return tt=tt.get(lt)||null,D(q,tt,""+St,ie);if(typeof St=="object"&&St!==null){switch(St.$$typeof){case _:return tt=tt.get(St.key===null?lt:St.key)||null,W(q,tt,St,ie);case M:return tt=tt.get(St.key===null?lt:St.key)||null,ct(q,tt,St,ie);case z:return St=_r(St),mt(tt,q,lt,St,ie)}if(ot(St)||Q(St))return tt=tt.get(lt)||null,_t(q,tt,St,ie,null);if(typeof St.then=="function")return mt(tt,q,lt,Cu(St),ie);if(St.$$typeof===C)return mt(tt,q,lt,Eu(q,St),ie);Ru(q,St)}return null}function Yt(tt,q,lt,St){for(var ie=null,Ve=null,te=q,_e=q=0,Ne=null;te!==null&&_e<lt.length;_e++){te.index>_e?(Ne=te,te=null):Ne=te.sibling;var He=dt(tt,te,lt[_e],St);if(He===null){te===null&&(te=Ne);break}i&&te&&He.alternate===null&&a(tt,te),q=x(He,q,_e),Ve===null?ie=He:Ve.sibling=He,Ve=He,te=Ne}if(_e===lt.length)return o(tt,te),Le&&Is(tt,_e),ie;if(te===null){for(;_e<lt.length;_e++)te=Mt(tt,lt[_e],St),te!==null&&(q=x(te,q,_e),Ve===null?ie=te:Ve.sibling=te,Ve=te);return Le&&Is(tt,_e),ie}for(te=c(te);_e<lt.length;_e++)Ne=mt(te,tt,_e,lt[_e],St),Ne!==null&&(i&&Ne.alternate!==null&&te.delete(Ne.key===null?_e:Ne.key),q=x(Ne,q,_e),Ve===null?ie=Ne:Ve.sibling=Ne,Ve=Ne);return i&&te.forEach(function(ja){return a(tt,ja)}),Le&&Is(tt,_e),ie}function oe(tt,q,lt,St){if(lt==null)throw Error(s(151));for(var ie=null,Ve=null,te=q,_e=q=0,Ne=null,He=lt.next();te!==null&&!He.done;_e++,He=lt.next()){te.index>_e?(Ne=te,te=null):Ne=te.sibling;var ja=dt(tt,te,He.value,St);if(ja===null){te===null&&(te=Ne);break}i&&te&&ja.alternate===null&&a(tt,te),q=x(ja,q,_e),Ve===null?ie=ja:Ve.sibling=ja,Ve=ja,te=Ne}if(He.done)return o(tt,te),Le&&Is(tt,_e),ie;if(te===null){for(;!He.done;_e++,He=lt.next())He=Mt(tt,He.value,St),He!==null&&(q=x(He,q,_e),Ve===null?ie=He:Ve.sibling=He,Ve=He);return Le&&Is(tt,_e),ie}for(te=c(te);!He.done;_e++,He=lt.next())He=mt(te,tt,_e,He.value,St),He!==null&&(i&&He.alternate!==null&&te.delete(He.key===null?_e:He.key),q=x(He,q,_e),Ve===null?ie=He:Ve.sibling=He,Ve=He);return i&&te.forEach(function(m3){return a(tt,m3)}),Le&&Is(tt,_e),ie}function $e(tt,q,lt,St){if(typeof lt=="object"&<!==null&<.type===T&<.key===null&&(lt=lt.props.children),typeof lt=="object"&<!==null){switch(lt.$$typeof){case _:t:{for(var ie=lt.key;q!==null;){if(q.key===ie){if(ie=lt.type,ie===T){if(q.tag===7){o(tt,q.sibling),St=p(q,lt.props.children),St.return=tt,tt=St;break t}}else if(q.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===z&&_r(ie)===q.type){o(tt,q.sibling),St=p(q,lt.props),Wl(St,lt),St.return=tt,tt=St;break t}o(tt,q);break}else a(tt,q);q=q.sibling}lt.type===T?(St=mr(lt.props.children,tt.mode,St,lt.key),St.return=tt,tt=St):(St=bu(lt.type,lt.key,lt.props,null,tt.mode,St),Wl(St,lt),St.return=tt,tt=St)}return E(tt);case M:t:{for(ie=lt.key;q!==null;){if(q.key===ie)if(q.tag===4&&q.stateNode.containerInfo===lt.containerInfo&&q.stateNode.implementation===lt.implementation){o(tt,q.sibling),St=p(q,lt.children||[]),St.return=tt,tt=St;break t}else{o(tt,q);break}else a(tt,q);q=q.sibling}St=_h(lt,tt.mode,St),St.return=tt,tt=St}return E(tt);case z:return lt=_r(lt),$e(tt,q,lt,St)}if(ot(lt))return Yt(tt,q,lt,St);if(Q(lt)){if(ie=Q(lt),typeof ie!="function")throw Error(s(150));return lt=ie.call(lt),oe(tt,q,lt,St)}if(typeof lt.then=="function")return $e(tt,q,Cu(lt),St);if(lt.$$typeof===C)return $e(tt,q,Eu(tt,lt),St);Ru(tt,lt)}return typeof lt=="string"&<!==""||typeof lt=="number"||typeof lt=="bigint"?(lt=""+lt,q!==null&&q.tag===6?(o(tt,q.sibling),St=p(q,lt),St.return=tt,tt=St):(o(tt,q),St=yh(lt,tt.mode,St),St.return=tt,tt=St),E(tt)):o(tt,q)}return function(tt,q,lt,St){try{jl=0;var ie=$e(tt,q,lt,St);return go=null,ie}catch(te){if(te===mo||te===Au)throw te;var Ve=bi(29,te,null,tt.mode);return Ve.lanes=St,Ve.return=tt,Ve}finally{}}}var Sr=Gv(!0),jv=Gv(!1),wa=!1;function Lh(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ph(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ca(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ra(i,a,o){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,(je&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=_u(i),wv(i,null,o),a}return yu(i,c,a,o),_u(i)}function Xl(i,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var c=a.lanes;c&=i.pendingLanes,o|=c,a.lanes=o,Bn(i,o)}}function Uh(i,a){var o=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var p=null,x=null;if(o=o.firstBaseUpdate,o!==null){do{var E={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};x===null?p=x=E:x=x.next=E,o=o.next}while(o!==null);x===null?p=x=a:x=x.next=a}else p=x=a;o={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:c.shared,callbacks:c.callbacks},i.updateQueue=o;return}i=o.lastBaseUpdate,i===null?o.firstBaseUpdate=a:i.next=a,o.lastBaseUpdate=a}var Oh=!1;function Yl(){if(Oh){var i=po;if(i!==null)throw i}}function ql(i,a,o,c){Oh=!1;var p=i.updateQueue;wa=!1;var x=p.firstBaseUpdate,E=p.lastBaseUpdate,D=p.shared.pending;if(D!==null){p.shared.pending=null;var W=D,ct=W.next;W.next=null,E===null?x=ct:E.next=ct,E=W;var _t=i.alternate;_t!==null&&(_t=_t.updateQueue,D=_t.lastBaseUpdate,D!==E&&(D===null?_t.firstBaseUpdate=ct:D.next=ct,_t.lastBaseUpdate=W))}if(x!==null){var Mt=p.baseState;E=0,_t=ct=W=null,D=x;do{var dt=D.lane&-536870913,mt=dt!==D.lane;
vendor: 6,089 bytes, line 48
48if(mt?(De&dt)===dt:(c&dt)===dt){dt!==0&&dt===ho&&(Oh=!0),_t!==null&&(_t=_t.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});t:{var Yt=i,oe=D;dt=a;var $e=o;switch(oe.tag){case 1:if(Yt=oe.payload,typeof Yt=="function"){Mt=Yt.call($e,Mt,dt);break t}Mt=Yt;break t;case 3:Yt.flags=Yt.flags&-65537|128;case 0:if(Yt=oe.payload,dt=typeof Yt=="function"?Yt.call($e,Mt,dt):Yt,dt==null)break t;Mt=m({},Mt,dt);break t;case 2:wa=!0}}dt=D.callback,dt!==null&&(i.flags|=64,mt&&(i.flags|=8192),mt=p.callbacks,mt===null?p.callbacks=[dt]:mt.push(dt))}else mt={lane:dt,tag:D.tag,payload:D.payload,callback:D.callback,next:null},_t===null?(ct=_t=mt,W=Mt):_t=_t.next=mt,E|=dt;if(D=D.next,D===null){if(D=p.shared.pending,D===null)break;mt=D,D=mt.next,mt.next=null,p.lastBaseUpdate=mt,p.shared.pending=null}}while(!0);_t===null&&(W=Mt),p.baseState=W,p.firstBaseUpdate=ct,p.lastBaseUpdate=_t,x===null&&(p.shared.lanes=0),Ua|=E,i.lanes=E,i.memoizedState=Mt}}function Wv(i,a){if(typeof i!="function")throw Error(s(191,i));i.call(a)}function Xv(i,a){var o=i.callbacks;if(o!==null)for(i.callbacks=null,i=0;i<o.length;i++)Wv(o[i],a)}var xo=B(null),Du=B(0);function Yv(i,a){i=qs,nt(Du,i),nt(xo,a),qs=i|a.baseLanes}function Fh(){nt(Du,qs),nt(xo,xo.current)}function Ih(){qs=Du.current,at(xo),at(Du)}var Si=B(null),Hi=null;function Da(i){var a=i.alternate;nt(vn,vn.current&1),nt(Si,i),Hi===null&&(a===null||xo.current!==null||a.memoizedState!==null)&&(Hi=i)}function zh(i){nt(vn,vn.current),nt(Si,i),Hi===null&&(Hi=i)}function qv(i){i.tag===22?(nt(vn,vn.current),nt(Si,i),Hi===null&&(Hi=i)):Na()}function Na(){nt(vn,vn.current),nt(Si,Si.current)}function Mi(i){at(Si),Hi===i&&(Hi=null),at(vn)}var vn=B(0);function Nu(i){for(var a=i;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||jp(o)||Wp(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Vs=0,ve=null,Qe=null,Mn=null,Lu=!1,vo=!1,Mr=!1,Pu=0,Zl=0,yo=null,aw=0;function pn(){throw Error(s(321))}function Bh(i,a){if(a===null)return!1;for(var o=0;o<a.length&&o<i.length;o++)if(!_i(i[o],a[o]))return!1;return!0}function Vh(i,a,o,c,p,x){return Vs=x,ve=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=i===null||i.memoizedState===null?Ny:ep,Mr=!1,x=o(c,p),Mr=!1,vo&&(x=Kv(a,o,c,p)),Zv(i),x}function Zv(i){I.H=Jl;var a=Qe!==null&&Qe.next!==null;if(Vs=0,Mn=Qe=ve=null,Lu=!1,Zl=0,yo=null,a)throw Error(s(300));i===null||En||(i=i.dependencies,i!==null&&Mu(i)&&(En=!0))}function Kv(i,a,o,c){ve=i;var p=0;do{if(vo&&(yo=null),Zl=0,vo=!1,25<=p)throw Error(s(301));if(p+=1,Mn=Qe=null,i.updateQueue!=null){var x=i.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}I.H=Ly,x=a(o,c)}while(vo);return x}function rw(){var i=I.H,a=i.useState()[0];return a=typeof a.then=="function"?Kl(a):a,i=i.useState()[0],(Qe!==null?Qe.memoizedState:null)!==i&&(ve.flags|=1024),a}function Hh(){var i=Pu!==0;return Pu=0,i}function kh(i,a,o){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~o}function Gh(i){if(Lu){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Lu=!1}Vs=0,Mn=Qe=ve=null,vo=!1,Zl=Pu=0,yo=null}function si(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mn===null?ve.memoizedState=Mn=i:Mn=Mn.next=i,Mn}function yn(){if(Qe===null){var i=ve.alternate;i=i!==null?i.memoizedState:null}else i=Qe.next;var a=Mn===null?ve.memoizedState:Mn.next;if(a!==null)Mn=a,Qe=i;else{if(i===null)throw ve.alternate===null?Error(s(467)):Error(s(310));Qe=i,i={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},Mn===null?ve.memoizedState=Mn=i:Mn=Mn.next=i}return Mn}function Uu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kl(i){var a=Zl;return Zl+=1,yo===null&&(yo=[]),i=Vv(yo,i,a),a=ve,(Mn===null?a.memoizedState:Mn.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?Ny:ep),i}function Ou(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Kl(i);if(i.$$typeof===C)return Yn(i)}throw Error(s(438,String(i)))}function jh(i){var a=null,o=ve.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var c=ve.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=Uu(),ve.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(i),c=0;c<i;c++)o[c]=O;return a.index++,o}function Hs(i,a){return typeof a=="function"?a(i):a}function Fu(i){var a=yn();return Wh(a,Qe,i)}function Wh(i,a,o){var c=i.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=o;var p=i.baseQueue,x=c.pending;if(x!==null){if(p!==null){var E=p.next;p.next=x.next,x.next=E}a.baseQueue=p=x,c.pending=null}if(x=i.baseState,p===null)i.memoizedState=x;else{a=p.next;var D=E=null,W=null,ct=a,_t=!1;do{var Mt=ct.lane&-536870913;if(Mt!==ct.lane?(De&Mt)===Mt:(Vs&Mt)===Mt){var dt=ct.revertLane;if(dt===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null}),Mt===ho&&(_t=!0);else if((Vs&dt)===dt){ct=ct.next,dt===ho&&(_t=!0);continue}else Mt={lane:0,revertLane:ct.revertLane,gesture:null,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},W===null?(D=W=Mt,E=x):W=W.next=Mt,ve.lanes|=dt,Ua|=dt;Mt=ct.action,Mr&&o(x,Mt),x=ct.hasEagerState?ct.eagerState:o(x,Mt)}else dt={lane:Mt,revertLane:ct.revertLane,gesture:ct.gesture,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},W===null?(D=W=dt,E=x):W=W.next=dt,ve.lanes|=Mt,Ua|=Mt;ct=ct.next}
vendor: 13,810 bytes, line 48
48while(ct!==null&&ct!==a);if(W===null?E=x:W.next=D,!_i(x,i.memoizedState)&&(En=!0,_t&&(o=po,o!==null)))throw o;i.memoizedState=x,i.baseState=E,i.baseQueue=W,c.lastRenderedState=x}return p===null&&(c.lanes=0),[i.memoizedState,c.dispatch]}function Xh(i){var a=yn(),o=a.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=i;var c=o.dispatch,p=o.pending,x=a.memoizedState;if(p!==null){o.pending=null;var E=p=p.next;do x=i(x,E.action),E=E.next;while(E!==p);_i(x,a.memoizedState)||(En=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),o.lastRenderedState=x}return[x,c]}function Qv(i,a,o){var c=ve,p=yn(),x=Le;if(x){if(o===void 0)throw Error(s(407));o=o()}else o=a();var E=!_i((Qe||p).memoizedState,o);if(E&&(p.memoizedState=o,En=!0),p=p.queue,Zh(ty.bind(null,c,p,i),[i]),p.getSnapshot!==a||E||Mn!==null&&Mn.memoizedState.tag&1){if(c.flags|=2048,_o(9,{destroy:void 0},$v.bind(null,c,p,o,a),null),nn===null)throw Error(s(349));x||(Vs&127)!==0||Jv(c,a,o)}return o}function Jv(i,a,o){i.flags|=16384,i={getSnapshot:a,value:o},a=ve.updateQueue,a===null?(a=Uu(),ve.updateQueue=a,a.stores=[i]):(o=a.stores,o===null?a.stores=[i]:o.push(i))}function $v(i,a,o,c){a.value=o,a.getSnapshot=c,ey(a)&&ny(i)}function ty(i,a,o){return o(function(){ey(a)&&ny(i)})}function ey(i){var a=i.getSnapshot;i=i.value;try{var o=a();return!_i(i,o)}catch{return!0}}function ny(i){var a=pr(i,2);a!==null&&pi(a,i,2)}function Yh(i){var a=si();if(typeof i=="function"){var o=i;if(i=o(),Mr){Gt(!0);try{o()}finally{Gt(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:i},a}function iy(i,a,o,c){return i.baseState=o,Wh(i,Qe,typeof c=="function"?c:Hs)}function ow(i,a,o,c,p){if(Bu(i))throw Error(s(485));if(i=a.action,i!==null){var x={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){x.listeners.push(E)}};I.T!==null?o(!0):x.isTransition=!1,c(x),o=a.pending,o===null?(x.next=a.pending=x,sy(a,x)):(x.next=o.next,a.pending=o.next=x)}}function sy(i,a){var o=a.action,c=a.payload,p=i.state;if(a.isTransition){var x=I.T,E={};I.T=E;try{var D=o(p,c),W=I.S;W!==null&&W(E,D),ay(i,a,D)}catch(ct){qh(i,a,ct)}finally{x!==null&&E.types!==null&&(x.types=E.types),I.T=x}}else try{x=o(p,c),ay(i,a,x)}catch(ct){qh(i,a,ct)}}function ay(i,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){ry(i,a,c)},function(c){return qh(i,a,c)}):ry(i,a,o)}function ry(i,a,o){a.status="fulfilled",a.value=o,oy(a),i.state=o,a=i.pending,a!==null&&(o=a.next,o===a?i.pending=null:(o=o.next,a.next=o,sy(i,o)))}function qh(i,a,o){var c=i.pending;if(i.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=o,oy(a),a=a.next;while(a!==c)}i.action=null}function oy(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function ly(i,a){return a}function cy(i,a){if(Le){var o=nn.formState;if(o!==null){t:{var c=ve;if(Le){if(rn){e:{for(var p=rn,x=Vi;p.nodeType!==8;){if(!x){p=null;break e}if(p=ki(p.nextSibling),p===null){p=null;break e}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){rn=ki(p.nextSibling),c=p.data==="F!";break t}}Ta(c)}c=!1}c&&(a=o[0])}}return o=si(),o.memoizedState=o.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ly,lastRenderedState:a},o.queue=c,o=Cy.bind(null,ve,c),c.dispatch=o,c=Yh(!1),x=tp.bind(null,ve,!1,c.queue),c=si(),p={state:a,dispatch:null,action:i,pending:null},c.queue=p,o=ow.bind(null,ve,p,x,o),p.dispatch=o,c.memoizedState=i,[a,o,!1]}function uy(i){var a=yn();return fy(a,Qe,i)}function fy(i,a,o){if(a=Wh(i,a,ly)[0],i=Fu(Hs)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Kl(a)}catch(E){throw E===mo?Au:E}else c=a;a=yn();var p=a.queue,x=p.dispatch;return o!==a.memoizedState&&(ve.flags|=2048,_o(9,{destroy:void 0},lw.bind(null,p,o),null)),[c,x,i]}function lw(i,a){i.action=a}function dy(i){var a=yn(),o=Qe;if(o!==null)return fy(a,o,i);yn(),a=a.memoizedState,o=yn();var c=o.queue.dispatch;return o.memoizedState=i,[a,c,!1]}function _o(i,a,o,c){return i={tag:i,create:o,deps:c,inst:a,next:null},a=ve.updateQueue,a===null&&(a=Uu(),ve.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=i.next=i:(c=o.next,o.next=i,i.next=c,a.lastEffect=i),i}function hy(){return yn().memoizedState}function Iu(i,a,o,c){var p=si();ve.flags|=i,p.memoizedState=_o(1|a,{destroy:void 0},o,c===void 0?null:c)}function zu(i,a,o,c){var p=yn();c=c===void 0?null:c;var x=p.memoizedState.inst;Qe!==null&&c!==null&&Bh(c,Qe.memoizedState.deps)?p.memoizedState=_o(a,x,o,c):(ve.flags|=i,p.memoizedState=_o(1|a,x,o,c))}function py(i,a){Iu(8390656,8,i,a)}function Zh(i,a){zu(2048,8,i,a)}function cw(i){ve.flags|=4;var a=ve.updateQueue;if(a===null)a=Uu(),ve.updateQueue=a,a.events=[i];else{var o=a.events;o===null?a.events=[i]:o.push(i)}}function my(i){var a=yn().memoizedState;return cw({ref:a,nextImpl:i}),function(){if((je&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function gy(i,a){return zu(4,2,i,a)}function xy(i,a){return zu(4,4,i,a)}function vy(i,a){if(typeof a=="function"){i=i();var o=a(i);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function yy(i,a,o){o=o!=null?o.concat([i]):null,zu(4,4,vy.bind(null,a,i),o)}function Kh(){}function _y(i,a){var o=yn();a=a===void 0?null:a;var c=o.memoizedState;return a!==null&&Bh(a,c[1])?c[0]:(o.memoizedState=[i,a],i)}function by(i,a){var o=yn();a=a===void 0?null:a;var c=o.memoizedState;if(a!==null&&Bh(a,c[1]))return c[0];if(c=i(),Mr){Gt(!0);try{i()}finally{Gt(!1)}}return o.memoizedState=[c,a],c}function Qh(i,a,o){return o===void 0||(Vs&1073741824)!==0&&(De&261930)===0?i.memoizedState=a:(i.memoizedState=o,i=S_(),ve.lanes|=i,Ua|=i,o)}function Sy(i,a,o,c){return _i(o,a)?o:xo.current!==null?(i=Qh(i,o,c),_i(i,a)||(En=!0),i):(Vs&42)===0||(Vs&1073741824)!==0&&(De&261930)===0?(En=!0,i.memoizedState=o):(i=S_(),ve.lanes|=i,Ua|=i,a)}function My(i,a,o,c,p){var x=V.p;V.p=x!==0&&8>x?x:8;var E=I.T,D={};I.T=D,tp(i,!1,a,o);try{var W=p(),ct=I.S;if(ct!==null&&ct(D,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var _t=sw(W,c);Ql(i,a,_t,Ai(i))}else Ql(i,a,c,Ai(i))}catch(Mt){Ql(i,a,{then:function(){},status:"rejected",reason:Mt},Ai())}finally{V.p=x,E!==null&&D.types!==null&&(E.types=D.types),I.T=E}}function uw(){}function Jh(i,a,o,c){if(i.tag!==5)throw Error(s(476));var p=Ey(i).queue;My(i,p,a,k,o===null?uw:function(){return Ty(i),o(c)})}function Ey(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:k},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:o},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function Ty(i){var a=Ey(i);a.next===null&&(a=i.alternate.memoizedState),Ql(i,a.next.queue,{},Ai())}function $h(){return Yn(pc)}function Ay(){return yn().memoizedState}function wy(){return yn().memoizedState}function fw(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var o=Ai();i=Ca(o);var c=Ra(a,i,o);c!==null&&(pi(c,a,o),Xl(c,a,o)),a={cache:Ch()},i.payload=a;return}a=a.return}}function dw(i,a,o){var c=Ai();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Bu(i)?Ry(a,o):(o=xh(i,a,o,c),o!==null&&(pi(o,i,c),Dy(o,a,c)))}function Cy(i,a,o){var c=Ai();Ql(i,a,o,c)}function Ql(i,a,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Bu(i))Ry(a,p);else{var x=i.alternate;if(i.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var E=a.lastRenderedState,D=x(E,o);if(p.hasEagerState=!0,p.eagerState=D,_i(D,E))return yu(i,a,p,0),nn===null&&vu(),!1}catch{}finally{}if(o=xh(i,a,p,c),o!==null)return pi(o,i,c),Dy(o,a,c),!0}return!1}function tp(i,a,o,c){if(c={lane:2,revertLane:Lp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Bu(i)){if(a)throw Error(s(479))}else a=xh(i,o,c,2),a!==null&&pi(a,i,2)}function Bu(i){var a=i.alternate;return i===ve||a!==null&&a===ve}function Ry(i,a){vo=Lu=!0;var o=i.pending;o===null?a.next=a:(a.next=o.next,o.next=a),i.pending=a}function Dy(i,a,o){if((o&4194048)!==0){var c=a.lanes;c&=i.pendingLanes,o|=c,a.lanes=o,Bn(i,o)}}var Jl={readContext:Yn,use:Ou,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useInsertionEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useSyncExternalStore:pn,useId:pn,useHostTransitionStatus:pn,useFormState:pn,useActionState:pn,useOptimistic:pn,useMemoCache:pn,useCacheRefresh:pn};Jl.useEffectEvent=pn;var Ny={readContext:Yn,use:Ou,useCallback:function(i,a){return si().memoizedState=[i,a===void 0?null:a],i},useContext:Yn,useEffect:py,useImperativeHandle:function(i,a,o){o=o!=null?o.concat([i]):null,Iu(4194308,4,vy.bind(null,a,i),o)},useLayoutEffect:function(i,a){return Iu(4194308,4,i,a)},useInsertionEffect:function(i,a){Iu(4,2,i,a)},useMemo:function(i,a){var o=si();a=a===void 0?null:a;var c=i();if(Mr){Gt(!0);try{i()}finally{Gt(!1)}}return o.memoizedState=[c,a],c},useReducer:function(i,a,o){var c=si();if(o!==void 0){var p=o(a);if(Mr){Gt(!0);try{o(a)}finally{Gt(!1)}}}else p=a;return c.memoizedState=c.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},c.queue=i,i=i.dispatch=dw.bind(null,ve,i),[c.memoizedState,i]},useRef:function(i){var a=si();return i={current:i},a.memoizedState=i},useState:function(i){i=Yh(i);var a=i.queue,o=Cy.bind(null,ve,a);return a.dispatch=o,[i.memoizedState,o]},useDebugValue:Kh,useDeferredValue:function(i,a){var o=si();return Qh(o,i,a)},useTransition:function(){var i=Yh(!1);return i=My.bind(null,ve,i.queue,!0,!1),si().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,o){var c=ve,p=si();if(Le){if(o===void 0)throw Error(s(407));o=o()}else{if(o=a(),nn===null)throw Error(s(349));(De&127)!==0||Jv(c,a,o)}p.memoizedState=o;var x={value:o,getSnapshot:a};return p.queue=x,py(ty.bind(null,c,x,i),[i]),c.flags|=2048,_o(9,{destroy:void 0},$v.bind(null,c,x,o,a),null),o},useId:function(){var i=si(),a=nn.identifierPrefix;if(Le){var o=hs,c=ds;o=(c&~(1<<32-zt(c)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Pu++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=aw++,a="_"+a+"r_"+o.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:$h,useFormState:cy,useActionState:cy,useOptimistic:function(i){var a=si();a.memoizedState=a.baseState=i;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=tp.bind(null,ve,!0,o),o.dispatch=a,[i,a]},useMemoCache:jh,useCacheRefresh:function(){return si().memoizedState=fw.bind(null,ve)},useEffectEvent:function(i){var a=si(),o={impl:i};return a.memoizedState=o,function(){if((je&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}},ep={readContext:Yn,use:Ou,useCallback:_y,useContext:Yn,useEffect:Zh,useImperativeHandle:yy,useInsertionEffect:gy,useLayoutEffect:xy,useMemo:by,useReducer:Fu,useRef:hy,useState:function(){return Fu(Hs)},useDebugValue:Kh,useDeferredValue:function(i,a){var o=yn();return Sy(o,Qe.memoizedState,i,a)},useTransition:function(){var i=Fu(Hs)[0],a=yn().memoizedState;return[typeof i=="boolean"?i:Kl(i),a]},useSyncExternalStore:Qv,useId:Ay,useHostTransitionStatus:$h,useFormState:uy,useActionState:uy,useOptimistic:function(i,a){var o=yn();return iy(o,Qe,i,a)},useMemoCache:jh,useCacheRefresh:wy};ep.useEffectEvent=my;var Ly={readContext:Yn,use:Ou,useCallback:_y,useContext:Yn,useEffect:Zh,useImperativeHandle:yy,useInsertionEffect:gy,useLayoutEffect:xy,useMemo:by,useReducer:Xh,useRef:hy,useState:function(){return Xh(Hs)},useDebugValue:Kh,useDeferredValue:function(i,a){var o=yn();return Qe===null?Qh(o,i,a):Sy(o,Qe.memoizedState,i,a)},useTransition:function(){var i=Xh(Hs)[0],a=yn().memoizedState;return[typeof i=="boolean"?i:Kl(i),a]},useSyncExternalStore:Qv,useId:Ay,useHostTransitionStatus:$h,useFormState:dy,useActionState:dy,useOptimistic:function(i,a){var o=yn();return Qe!==null?iy(o,Qe,i,a):(o.baseState=i,[i,o.queue.dispatch])},useMemoCache:jh,useCacheRefresh:wy};Ly.useEffectEvent=my;function np(i,a,o,c){a=i.memoizedState,o=o(c,a),o=o==null?a:m({},a,o),i.memoizedState=o,i.lanes===0&&(i.updateQueue.baseState=o)}var ip={enqueueSetState:function(i,a,o){i=i._reactInternals;var c=Ai(),p=Ca(c);p.payload=a,o!=null&&(p.callback=o),a=Ra(i,p,c),a!==null&&(pi(a,i,c),Xl(a,i,c))},enqueueReplaceState:function(i,a,o){i=i._reactInternals;var c=Ai(),p=Ca(c);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ra(i,p,c),a!==null&&(pi(a,i,c),Xl(a,i,c))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var o=Ai(),c=Ca(o);c.tag=2,a!=null&&(c.callback=a),a=Ra(i,c,o),a!==null&&(pi(a,i,o),Xl(a,i,o))}};function Py(i,a,o,c,p,x,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,x,E):a.prototype&&a.prototype.isPureReactComponent?!zl(o,c)||!zl(p,x):!0}function Uy(i,a,o,c){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,c),a.state!==i&&ip.enqueueReplaceState(a,a.state,null)}function Er(i,a){var o=a;if("ref"in a){o={};for(var c in a)c!=="ref"&&(o[c]=a[c])}if(i=i.defaultProps){o===a&&(o=m({},o));for(var p in i)o[p]===void 0&&(o[p]=i[p])}return o}function Oy(i){xu(i)}function Fy(i){console.error(i)}function Iy(i){xu(i)}function Vu(i,a){try{var o=i.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function zy(i,a,o){try{var c=i.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}
vendor: 25,562 bytes, line 48
48catch(p){setTimeout(function(){throw p})}}function sp(i,a,o){return o=Ca(o),o.tag=3,o.payload={element:null},o.callback=function(){Vu(i,a)},o}function By(i){return i=Ca(i),i.tag=3,i}function Vy(i,a,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var x=c.value;i.payload=function(){return p(x)},i.callback=function(){zy(a,o,c)}}var E=o.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(i.callback=function(){zy(a,o,c),typeof p!="function"&&(Oa===null?Oa=new Set([this]):Oa.add(this));var D=c.stack;this.componentDidCatch(c.value,{componentStack:D!==null?D:""})})}function hw(i,a,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=o.alternate,a!==null&&fo(a,o,p,!0),o=Si.current,o!==null){switch(o.tag){case 31:case 13:return Hi===null?Ju():o.alternate===null&&mn===0&&(mn=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===wu?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([c]):a.add(c),Rp(i,c,p)),!1;case 22:return o.flags|=65536,c===wu?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([c]):o.add(c)),Rp(i,c,p)),!1}throw Error(s(435,o.tag))}return Rp(i,c,p),Ju(),!1}if(Le)return a=Si.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Mh&&(i=Error(s(422),{cause:c}),Hl(Ii(i,o)))):(c!==Mh&&(a=Error(s(423),{cause:c}),Hl(Ii(a,o))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,c=Ii(c,o),p=sp(i.stateNode,c,p),Uh(i,p),mn!==4&&(mn=2)),!1;var x=Error(s(520),{cause:c});if(x=Ii(x,o),rc===null?rc=[x]:rc.push(x),mn!==4&&(mn=2),a===null)return!0;c=Ii(c,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,i=p&-p,o.lanes|=i,i=sp(o.stateNode,c,i),Uh(o,i),!1;case 1:if(a=o.type,x=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Oa===null||!Oa.has(x))))return o.flags|=65536,p&=-p,o.lanes|=p,p=By(p),Vy(p,i,o,c),Uh(o,p),!1}o=o.return}while(o!==null);return!1}var ap=Error(s(461)),En=!1;function qn(i,a,o,c){a.child=i===null?jv(a,null,o,c):Sr(a,i.child,o,c)}function Hy(i,a,o,c,p){o=o.render;var x=a.ref;if("ref"in c){var E={};for(var D in c)D!=="ref"&&(E[D]=c[D])}else E=c;return vr(a),c=Vh(i,a,o,E,x,p),D=Hh(),i!==null&&!En?(kh(i,a,p),ks(i,a,p)):(Le&&D&&bh(a),a.flags|=1,qn(i,a,c,p),a.child)}function ky(i,a,o,c,p){if(i===null){var x=o.type;return typeof x=="function"&&!vh(x)&&x.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=x,Gy(i,a,x,c,p)):(i=bu(o.type,null,c,a,a.mode,p),i.ref=a.ref,i.return=a,a.child=i)}if(x=i.child,!hp(i,p)){var E=x.memoizedProps;if(o=o.compare,o=o!==null?o:zl,o(E,c)&&i.ref===a.ref)return ks(i,a,p)}return a.flags|=1,i=Fs(x,c),i.ref=a.ref,i.return=a,a.child=i}function Gy(i,a,o,c,p){if(i!==null){var x=i.memoizedProps;if(zl(x,c)&&i.ref===a.ref)if(En=!1,a.pendingProps=c=x,hp(i,p))(i.flags&131072)!==0&&(En=!0);else return a.lanes=i.lanes,ks(i,a,p)}return rp(i,a,o,c,p)}function jy(i,a,o,c){var p=c.children,x=i!==null?i.memoizedState:null;if(i===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(x=x!==null?x.baseLanes|o:o,i!==null){for(c=a.child=i.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~x}else c=0,a.child=null;return Wy(i,a,x,o,c)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&Tu(a,x!==null?x.cachePool:null),x!==null?Yv(a,x):Fh(),qv(a);else return c=a.lanes=536870912,Wy(i,a,x!==null?x.baseLanes|o:o,o,c)}else x!==null?(Tu(a,x.cachePool),Yv(a,x),Na(),a.memoizedState=null):(i!==null&&Tu(a,null),Fh(),Na());return qn(i,a,p,o),a.child}function $l(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Wy(i,a,o,c,p){var x=Dh();return x=x===null?null:{parent:Sn._currentValue,pool:x},a.memoizedState={baseLanes:o,cachePool:x},i!==null&&Tu(a,null),Fh(),qv(a),i!==null&&fo(i,a,c,!0),a.childLanes=p,null}function Hu(i,a){return a=Gu({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function Xy(i,a,o){return Sr(a,i.child,null,o),i=Hu(a,a.pendingProps),i.flags|=2,Mi(a),a.memoizedState=null,i}function pw(i,a,o){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(Le){if(c.mode==="hidden")return i=Hu(a,c),a.lanes=536870912,$l(null,i);if(zh(a),(i=rn)?(i=s1(i,Vi),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Ma!==null?{id:ds,overflow:hs}:null,retryLane:536870912,hydrationErrors:null},o=Rv(i),o.return=a,a.child=o,Xn=a,rn=null)):i=null,i===null)throw Ta(a);return a.lanes=536870912,null}return Hu(a,c)}var x=i.memoizedState;if(x!==null){var E=x.dehydrated;if(zh(a),p)if(a.flags&256)a.flags&=-257,a=Xy(i,a,o);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(s(558));else if(En||fo(i,a,o,!1),p=(o&i.childLanes)!==0,En||p){if(c=nn,c!==null&&(E=On(c,o),E!==0&&E!==x.retryLane))throw x.retryLane=E,pr(i,E),pi(c,i,E),ap;Ju(),a=Xy(i,a,o)}else i=x.treeContext,rn=ki(E.nextSibling),Xn=a,Le=!0,Ea=null,Vi=!1,i!==null&&Lv(a,i),a=Hu(a,c),a.flags|=4096;return a}return i=Fs(i.child,{mode:c.mode,children:c.children}),i.ref=a.ref,a.child=i,i.return=a,i}function ku(i,a){var o=a.ref;if(o===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(s(284));(i===null||i.ref!==o)&&(a.flags|=4194816)}}function rp(i,a,o,c,p){return vr(a),o=Vh(i,a,o,c,void 0,p),c=Hh(),i!==null&&!En?(kh(i,a,p),ks(i,a,p)):(Le&&c&&bh(a),a.flags|=1,qn(i,a,o,p),a.child)}function Yy(i,a,o,c,p,x){return vr(a),a.updateQueue=null,o=Kv(a,c,o,p),Zv(i),c=Hh(),i!==null&&!En?(kh(i,a,x),ks(i,a,x)):(Le&&c&&bh(a),a.flags|=1,qn(i,a,o,x),a.child)}function qy(i,a,o,c,p){if(vr(a),a.stateNode===null){var x=oo,E=o.contextType;typeof E=="object"&&E!==null&&(x=Yn(E)),x=new o(c,x),a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=ip,a.stateNode=x,x._reactInternals=a,x=a.stateNode,x.props=c,x.state=a.memoizedState,x.refs={},Lh(a),E=o.contextType,x.context=typeof E=="object"&&E!==null?Yn(E):oo,x.state=a.memoizedState,E=o.getDerivedStateFromProps,typeof E=="function"&&(np(a,o,E,c),x.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(E=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),E!==x.state&&ip.enqueueReplaceState(x,x.state,null),ql(a,c,x,p),Yl(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(i===null){x=a.stateNode;var D=a.memoizedProps,W=Er(o,D);x.props=W;var ct=x.context,_t=o.contextType;E=oo,typeof _t=="object"&&_t!==null&&(E=Yn(_t));var Mt=o.getDerivedStateFromProps;_t=typeof Mt=="function"||typeof x.getSnapshotBeforeUpdate=="function",D=a.pendingProps!==D,_t||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(D||ct!==E)&&Uy(a,x,c,E),wa=!1;var dt=a.memoizedState;x.state=dt,ql(a,c,x,p),Yl(),ct=a.memoizedState,D||dt!==ct||wa?(typeof Mt=="function"&&(np(a,o,Mt,c),ct=a.memoizedState),(W=wa||Py(a,o,W,c,dt,ct,E))?(_t||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(a.flags|=4194308)):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=ct),x.props=c,x.state=ct,x.context=E,c=W):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{x=a.stateNode,Ph(i,a),E=a.memoizedProps,_t=Er(o,E),x.props=_t,Mt=a.pendingProps,dt=x.context,ct=o.contextType,W=oo,typeof ct=="object"&&ct!==null&&(W=Yn(ct)),D=o.getDerivedStateFromProps,(ct=typeof D=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(E!==Mt||dt!==W)&&Uy(a,x,c,W),wa=!1,dt=a.memoizedState,x.state=dt,ql(a,c,x,p),Yl();var mt=a.memoizedState;E!==Mt||dt!==mt||wa||i!==null&&i.dependencies!==null&&Mu(i.dependencies)?(typeof D=="function"&&(np(a,o,D,c),mt=a.memoizedState),(_t=wa||Py(a,o,_t,c,dt,mt,W)||i!==null&&i.dependencies!==null&&Mu(i.dependencies))?(ct||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,mt,W),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,mt,W)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||E===i.memoizedProps&&dt===i.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&dt===i.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=mt),x.props=c,x.state=mt,x.context=W,c=_t):(typeof x.componentDidUpdate!="function"||E===i.memoizedProps&&dt===i.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&dt===i.memoizedState||(a.flags|=1024),c=!1)}return x=c,ku(i,a),c=(a.flags&128)!==0,x||c?(x=a.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:x.render(),a.flags|=1,i!==null&&c?(a.child=Sr(a,i.child,null,p),a.child=Sr(a,null,o,p)):qn(i,a,o,p),a.memoizedState=x.state,i=a.child):i=ks(i,a,p),i}function Zy(i,a,o,c){return gr(),a.flags|=256,qn(i,a,o,c),a.child}var op={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lp(i){return{baseLanes:i,cachePool:zv()}}function cp(i,a,o){return i=i!==null?i.childLanes&~o:0,a&&(i|=Ti),i}function Ky(i,a,o){var c=a.pendingProps,p=!1,x=(a.flags&128)!==0,E;if((E=x)||(E=i!==null&&i.memoizedState===null?!1:(vn.current&2)!==0),E&&(p=!0,a.flags&=-129),E=(a.flags&32)!==0,a.flags&=-33,i===null){if(Le){if(p?Da(a):Na(),(i=rn)?(i=s1(i,Vi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Ma!==null?{id:ds,overflow:hs}:null,retryLane:536870912,hydrationErrors:null},o=Rv(i),o.return=a,a.child=o,Xn=a,rn=null)):i=null,i===null)throw Ta(a);return Wp(i)?a.lanes=32:a.lanes=536870912,null}var D=c.children;return c=c.fallback,p?(Na(),p=a.mode,D=Gu({mode:"hidden",children:D},p),c=mr(c,p,o,null),D.return=a,c.return=a,D.sibling=c,a.child=D,c=a.child,c.memoizedState=lp(o),c.childLanes=cp(i,E,o),a.memoizedState=op,$l(null,c)):(Da(a),up(a,D))}var W=i.memoizedState;if(W!==null&&(D=W.dehydrated,D!==null)){if(x)a.flags&256?(Da(a),a.flags&=-257,a=fp(i,a,o)):a.memoizedState!==null?(Na(),a.child=i.child,a.flags|=128,a=null):(Na(),D=c.fallback,p=a.mode,c=Gu({mode:"visible",children:c.children},p),D=mr(D,p,o,null),D.flags|=2,c.return=a,D.return=a,c.sibling=D,a.child=c,Sr(a,i.child,null,o),c=a.child,c.memoizedState=lp(o),c.childLanes=cp(i,E,o),a.memoizedState=op,a=$l(null,c));else if(Da(a),Wp(D)){if(E=D.nextSibling&&D.nextSibling.dataset,E)var ct=E.dgst;E=ct,c=Error(s(419)),c.stack="",c.digest=E,Hl({value:c,source:null,stack:null}),a=fp(i,a,o)}else if(En||fo(i,a,o,!1),E=(o&i.childLanes)!==0,En||E){if(E=nn,E!==null&&(c=On(E,o),c!==0&&c!==W.retryLane))throw W.retryLane=c,pr(i,c),pi(E,i,c),ap;jp(D)||Ju(),a=fp(i,a,o)}else jp(D)?(a.flags|=192,a.child=i.child,a=null):(i=W.treeContext,rn=ki(D.nextSibling),Xn=a,Le=!0,Ea=null,Vi=!1,i!==null&&Lv(a,i),a=up(a,c.children),a.flags|=4096);return a}return p?(Na(),D=c.fallback,p=a.mode,W=i.child,ct=W.sibling,c=Fs(W,{mode:"hidden",children:c.children}),c.subtreeFlags=W.subtreeFlags&65011712,ct!==null?D=Fs(ct,D):(D=mr(D,p,o,null),D.flags|=2),D.return=a,c.return=a,c.sibling=D,a.child=c,$l(null,c),c=a.child,D=i.child.memoizedState,D===null?D=lp(o):(p=D.cachePool,p!==null?(W=Sn._currentValue,p=p.parent!==W?{parent:W,pool:W}:p):p=zv(),D={baseLanes:D.baseLanes|o,cachePool:p}),c.memoizedState=D,c.childLanes=cp(i,E,o),a.memoizedState=op,$l(i.child,c)):(Da(a),o=i.child,i=o.sibling,o=Fs(o,{mode:"visible",children:c.children}),o.return=a,o.sibling=null,i!==null&&(E=a.deletions,E===null?(a.deletions=[i],a.flags|=16):E.push(i)),a.child=o,a.memoizedState=null,o)}function up(i,a){return a=Gu({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function Gu(i,a){return i=bi(22,i,null,a),i.lanes=0,i}function fp(i,a,o){return Sr(a,i.child,null,o),i=up(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function Qy(i,a,o){i.lanes|=a;var c=i.alternate;c!==null&&(c.lanes|=a),Ah(i.return,a,o)}function dp(i,a,o,c,p,x){var E=i.memoizedState;E===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p,treeForkCount:x}:(E.isBackwards=a,E.rendering=null,E.renderingStartTime=0,E.last=c,E.tail=o,E.tailMode=p,E.treeForkCount=x)}function Jy(i,a,o){var c=a.pendingProps,p=c.revealOrder,x=c.tail;c=c.children;var E=vn.current,D=(E&2)!==0;if(D?(E=E&1|2,a.flags|=128):E&=1,nt(vn,E),qn(i,a,c,o),c=Le?Vl:0,!D&&i!==null&&(i.flags&128)!==0)t:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Qy(i,o,a);else if(i.tag===19)Qy(i,o,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break t;for(;i.sibling===null;){if(i.return===null||i.return===a)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)i=o.alternate,i!==null&&Nu(i)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),dp(a,!1,p,o,x,c);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(i=p.alternate,i!==null&&Nu(i)===null){a.child=p;break}i=p.sibling,p.sibling=o,o=p,p=i}dp(a,!0,o,null,x,c);break;case"together":dp(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function ks(i,a,o){if(i!==null&&(a.dependencies=i.dependencies),Ua|=a.lanes,(o&a.childLanes)===0)if(i!==null){if(fo(i,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(s(153));if(a.child!==null){for(i=a.child,o=Fs(i,i.pendingProps),a.child=o,o.return=a;i.sibling!==null;)i=i.sibling,o=o.sibling=Fs(i,i.pendingProps),o.return=a;o.sibling=null}return a.child}function hp(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&Mu(i)))}function mw(i,a,o){switch(a.tag){case 3:bt(a,a.stateNode.containerInfo),Aa(a,Sn,i.memoizedState.cache),gr();break;case 27:case 5:Ut(a);break;case 4:bt(a,a.stateNode.containerInfo);break;case 10:Aa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,zh(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(Da(a),a.flags|=128,null):(o&a.child.childLanes)!==0?Ky(i,a,o):(Da(a),i=ks(i,a,o),i!==null?i.sibling:null);Da(a);break;case 19:var p=(i.flags&128)!==0;if(c=(o&a.childLanes)!==0,c||(fo(i,a,o,!1),c=(o&a.childLanes)!==0),p){if(c)return Jy(i,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),nt(vn,vn.current),c)break;return null;case 22:return a.lanes=0,jy(i,a,o,a.pendingProps);case 24:Aa(a,Sn,i.memoizedState.cache)}return ks(i,a,o)}function $y(i,a,o){if(i!==null)if(i.memoizedProps!==a.pendingProps)En=!0;else{if(!hp(i,o)&&(a.flags&128)===0)return En=!1,mw(i,a,o);En=(i.flags&131072)!==0}else En=!1,Le&&(a.flags&1048576)!==0&&Nv(a,Vl,a.index);switch(a.lanes=0,a.tag){case 16:t:{var c=a.pendingProps;if(i=_r(a.elementType),a.type=i,typeof i=="function")vh(i)?(c=Er(i,c),a.tag=1,a=qy(null,a,i,c,o)):(a.tag=0,a=rp(null,a,i,c,o));else{if(i!=null){var p=i.$$typeof;if(p===P){a.tag=11,a=Hy(null,a,i,c,o);break t}else if(p===L){a.tag=14,a=ky(null,a,i,c,o);break t}}throw a=rt(i)||i,Error(s(306,a,""))}}return a;case 0:return rp(i,a,a.type,a.pendingProps,o);case 1:return c=a.type,p=Er(c,a.pendingProps),qy(i,a,c,p,o);case 3:t:{if(bt(a,a.stateNode.containerInfo),i===null)throw Error(s(387));c=a.pendingProps;var x=a.memoizedState;p=x.element,Ph(i,a),ql(a,c,null,o);var E=a.memoizedState;if(c=E.cache,Aa(a,Sn,c),c!==x.cache&&wh(a,[Sn],o,!0),Yl(),c=E.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:E.cache},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){a=Zy(i,a,c,o);break t}else if(c!==p){p=Ii(Error(s(424)),a),Hl(p),a=Zy(i,a,c,o);break t}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(rn=ki(i.firstChild),Xn=a,Le=!0,Ea=null,Vi=!0,o=jv(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(gr(),c===p){a=ks(i,a,o);break t}qn(i,a,c,o)}a=a.child}return a;case 26:return ku(i,a),i===null?(o=u1(a.type,null,a.pendingProps,null))?a.memoizedState=o:Le||(o=a.type,i=a.pendingProps,c=rf(J.current).createElement(o),c[bn]=a,c[Vn]=i,Zn(c,o,i),N(c),a.stateNode=c):a.memoizedState=u1(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return Ut(a),i===null&&Le&&(c=a.stateNode=o1(a.type,a.pendingProps,J.current),Xn=a,Vi=!0,p=rn,Ba(a.type)?(Xp=p,rn=ki(c.firstChild)):rn=p),qn(i,a,a.pendingProps.children,o),ku(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&Le&&((p=c=rn)&&(c=Ww(c,a.type,a.pendingProps,Vi),c!==null?(a.stateNode=c,Xn=a,rn=ki(c.firstChild),Vi=!1,p=!0):p=!1),p||Ta(a)),Ut(a),p=a.type,x=a.pendingProps,E=i!==null?i.memoizedProps:null,c=x.children,Hp(p,x)?c=null:E!==null&&Hp(p,E)&&(a.flags|=32),a.memoizedState!==null&&(p=Vh(i,a,rw,null,null,o),pc._currentValue=p),ku(i,a),qn(i,a,c,o),a.child;case 6:return i===null&&Le&&((i=o=rn)&&(o=Xw(o,a.pendingProps,Vi),o!==null?(a.stateNode=o,Xn=a,rn=null,i=!0):i=!1),i||Ta(a)),null;case 13:return Ky(i,a,o);case 4:return bt(a,a.stateNode.containerInfo),c=a.pendingProps,i===null?a.child=Sr(a,null,c,o):qn(i,a,c,o),a.child;case 11:return Hy(i,a,a.type,a.pendingProps,o);case 7:return qn(i,a,a.pendingProps,o),a.child;case 8:return qn(i,a,a.pendingProps.children,o),a.child;case 12:return qn(i,a,a.pendingProps.children,o),a.child;case 10:return c=a.pendingProps,Aa(a,a.type,c.value),qn(i,a,c.children,o),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,vr(a),p=Yn(p),c=c(p),a.flags|=1,qn(i,a,c,o),a.child;case 14:return ky(i,a,a.type,a.pendingProps,o);case 15:return Gy(i,a,a.type,a.pendingProps,o);case 19:return Jy(i,a,o);case 31:return pw(i,a,o);case 22:return jy(i,a,o,a.pendingProps);case 24:return vr(a),c=Yn(Sn),i===null?(p=Dh(),p===null&&(p=nn,x=Ch(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=o),p=x),a.memoizedState={parent:c,cache:p},Lh(a),Aa(a,Sn,p)):((i.lanes&o)!==0&&(Ph(i,a),ql(a,null,null,o),Yl()),p=i.memoizedState,x=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Aa(a,Sn,c)):(c=x.cache,Aa(a,Sn,c),c!==p.cache&&wh(a,[Sn],o,!0))),qn(i,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function Gs(i){i.flags|=4}function pp(i,a,o,c,p){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(p&335544128)===p)if(i.stateNode.complete)i.flags|=8192;else if(A_())i.flags|=8192;else throw br=wu,Nh}else i.flags&=-16777217}function t_(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!m1(a))if(A_())i.flags|=8192;else throw br=wu,Nh}function ju(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?xe():536870912,i.lanes|=a,Eo|=a)}function tc(i,a){if(!Le)switch(i.tailMode){case"hidden":a=i.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?i.tail=null:o.sibling=null;break;case"collapsed":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null}}function on(i){var a=i.alternate!==null&&i.alternate.child===i.child,o=0,c=0;if(a)for(var p=i.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=c,i.childLanes=o,a}function gw(i,a,o){var c=a.pendingProps;switch(Sh(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(a),null;case 1:return on(a),null;case 3:return o=a.stateNode,c=null,i!==null&&(c=i.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Bs(Sn),Ot(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(i===null||i.child===null)&&(uo(a)?Gs(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Eh())),on(a),null;case 26:var p=a.type,x=a.memoizedState;return i===null?(Gs(a),x!==null?(on(a),t_(a,x)):(on(a),pp(a,p,null,c,o))):x?x!==i.memoizedState?(Gs(a),on(a),t_(a,x)):(on(a),a.flags&=-16777217):(i=i.memoizedProps,i!==c&&Gs(a),on(a),pp(a,p,i,c,o)),null;case 27:if(ae(a),o=J.current,p=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==c&&Gs(a);else{if(!c){if(a.stateNode===null)throw Error(s(166));return on(a),null}i=pt.current,uo(a)?Pv(a):(i=o1(p,c,o),a.stateNode=i,Gs(a))}return on(a),null;case 5:if(ae(a),p=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==c&&Gs(a);else{if(!c){if(a.stateNode===null)throw Error(s(166));return on(a),null}if(x=pt.current,uo(a))Pv(a);else{var E=rf(J.current);switch(x){case 1:x=E.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:x=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":x=E.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":x=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":x=E.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof c.is=="string"?E.createElement("select",{is:c.is}):E.createElement("select"),c.multiple?x.multiple=!0:c.size&&(x.size=c.size);break;default:x=typeof c.is=="string"?E.createElement(p,{is:c.is}):E.createElement(p)}}x[bn]=a,x[Vn]=c;t:for(E=a.child;E!==null;){if(E.tag===5||E.tag===6)x.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===a)break t;for(;E.sibling===null;){if(E.return===null||E.return===a)break t;E=E.return}E.sibling.return=E.return,E=E.sibling}a.stateNode=x;t:switch(Zn(x,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&Gs(a)}}return on(a),pp(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,o),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==c&&Gs(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(s(166));if(i=J.current,uo(a)){if(i=a.stateNode,o=a.memoizedProps,c=null,p=Xn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}i[bn]=a,i=!!(i.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||K_(i.nodeValue,o)),i||Ta(a,!0)}else i=rf(i).createTextNode(c),i[bn]=a,a.stateNode=i}return on(a),null;case 31:if(o=a.memoizedState,i===null||i.memoizedState!==null){if(c=uo(a),o!==null){if(i===null){if(!c)throw Error(s(318));if(i=a.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(557));i[bn]=a}else gr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;on(a),i=!1}else o=Eh(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=o),i=!0;if(!i)return a.flags&256?(Mi(a),a):(Mi(a),null);if((a.flags&128)!==0)throw Error(s(558))}return on(a),null;case 13:if(c=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=uo(a),c!==null&&c.dehydrated!==null){if(i===null){if(!p)throw Error(s(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[bn]=a}else gr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;on(a),p=!1}else p=Eh(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Mi(a),a):(Mi(a),null)}return Mi(a),(a.flags&128)!==0?(a.lanes=o,a):(o=c!==null,i=i!==null&&i.memoizedState!==null,o&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),x=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(x=c.memoizedState.cachePool.pool),x!==p&&(c.flags|=2048)),o!==i&&o&&(a.child.flags|=8192),ju(a,a.updateQueue),on(a),null);case 4:return Ot(),i===null&&Fp(a.stateNode.containerInfo),on(a),null;case 10:return Bs(a.type),on(a),null;case 19:if(at(vn),c=a.memoizedState,c===null)return on(a),null;if(p=(a.flags&128)!==0,x=c.rendering,x===null)if(p)tc(c,!1);else{if(mn!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(x=Nu(i),x!==null){for(a.flags|=128,tc(c,!1),i=x.updateQueue,a.updateQueue=i,ju(a,i),a.subtreeFlags=0,i=o,o=a.child;o!==null;)Cv(o,i),o=o.sibling;return nt(vn,vn.current&1|2),Le&&Is(a,c.treeForkCount),a.child}i=i.sibling}c.tail!==null&&A()>Zu&&(a.flags|=128,p=!0,tc(c,!1),a.lanes=4194304)}else{if(!p)if(i=Nu(x),i!==null){if(a.flags|=128,p=!0,i=i.updateQueue,a.updateQueue=i,ju(a,i),tc(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!Le)return on(a),null}else 2*A()-c.renderingStartTime>Zu&&o!==536870912&&(a.flags|=128,p=!0,tc(c,!1),a.lanes=4194304);c.isBackwards?(x.sibling=a.child,a.child=x):(i=c.last,i!==null?i.sibling=x:a.child=x,c.last=x)}return c.tail!==null?(i=c.tail,c.rendering=i,c.tail=i.sibling,c.renderingStartTime=A(),i.sibling=null,o=v
vendor: 13,686 bytes, line 48
48n.current,nt(vn,p?o&1|2:o&1),Le&&Is(a,c.treeForkCount),i):(on(a),null);case 22:case 23:return Mi(a),Ih(),c=a.memoizedState!==null,i!==null?i.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(o&536870912)!==0&&(a.flags&128)===0&&(on(a),a.subtreeFlags&6&&(a.flags|=8192)):on(a),o=a.updateQueue,o!==null&&ju(a,o.retryQueue),o=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048),i!==null&&at(yr),null;case 24:return o=null,i!==null&&(o=i.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Bs(Sn),on(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function xw(i,a){switch(Sh(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return Bs(Sn),Ot(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return ae(a),null;case 31:if(a.memoizedState!==null){if(Mi(a),a.alternate===null)throw Error(s(340));gr()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(Mi(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(s(340));gr()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return at(vn),null;case 4:return Ot(),null;case 10:return Bs(a.type),null;case 22:case 23:return Mi(a),Ih(),i!==null&&at(yr),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return Bs(Sn),null;case 25:return null;default:return null}}function e_(i,a){switch(Sh(a),a.tag){case 3:Bs(Sn),Ot();break;case 26:case 27:case 5:ae(a);break;case 4:Ot();break;case 31:a.memoizedState!==null&&Mi(a);break;case 13:Mi(a);break;case 19:at(vn);break;case 10:Bs(a.type);break;case 22:case 23:Mi(a),Ih(),i!==null&&at(yr);break;case 24:Bs(Sn)}}function ec(i,a){try{var o=a.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var p=c.next;o=p;do{if((o.tag&i)===i){c=void 0;var x=o.create,E=o.inst;c=x(),E.destroy=c}o=o.next}while(o!==p)}}catch(D){qe(a,a.return,D)}}function La(i,a,o){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var x=p.next;c=x;do{if((c.tag&i)===i){var E=c.inst,D=E.destroy;if(D!==void 0){E.destroy=void 0,p=a;var W=o,ct=D;try{ct()}catch(_t){qe(p,W,_t)}}}c=c.next}while(c!==x)}}catch(_t){qe(a,a.return,_t)}}function n_(i){var a=i.updateQueue;if(a!==null){var o=i.stateNode;try{Xv(a,o)}catch(c){qe(i,i.return,c)}}}function i_(i,a,o){o.props=Er(i.type,i.memoizedProps),o.state=i.memoizedState;try{o.componentWillUnmount()}catch(c){qe(i,a,c)}}function nc(i,a){try{var o=i.ref;if(o!==null){switch(i.tag){case 26:case 27:case 5:var c=i.stateNode;break;case 30:c=i.stateNode;break;default:c=i.stateNode}typeof o=="function"?i.refCleanup=o(c):o.current=c}}catch(p){qe(i,a,p)}}function ps(i,a){var o=i.ref,c=i.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(p){qe(i,a,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){qe(i,a,p)}else o.current=null}function s_(i){var a=i.type,o=i.memoizedProps,c=i.stateNode;try{t:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&c.focus();break t;case"img":o.src?c.src=o.src:o.srcSet&&(c.srcset=o.srcSet)}}catch(p){qe(i,i.return,p)}}function mp(i,a,o){try{var c=i.stateNode;Bw(c,i.type,o,a),c[Vn]=a}catch(p){qe(i,i.return,p)}}function a_(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ba(i.type)||i.tag===4}function gp(i){t:for(;;){for(;i.sibling===null;){if(i.return===null||a_(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ba(i.type)||i.flags&2||i.child===null||i.tag===4)continue t;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function xp(i,a,o){var c=i.tag;if(c===5||c===6)i=i.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(i,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(i),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Us));else if(c!==4&&(c===27&&Ba(i.type)&&(o=i.stateNode,a=null),i=i.child,i!==null))for(xp(i,a,o),i=i.sibling;i!==null;)xp(i,a,o),i=i.sibling}function Wu(i,a,o){var c=i.tag;if(c===5||c===6)i=i.stateNode,a?o.insertBefore(i,a):o.appendChild(i);else if(c!==4&&(c===27&&Ba(i.type)&&(o=i.stateNode),i=i.child,i!==null))for(Wu(i,a,o),i=i.sibling;i!==null;)Wu(i,a,o),i=i.sibling}function r_(i){var a=i.stateNode,o=i.memoizedProps;try{for(var c=i.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Zn(a,c,o),a[bn]=i,a[Vn]=o}catch(x){qe(i,i.return,x)}}var js=!1,Tn=!1,vp=!1,o_=typeof WeakSet=="function"?WeakSet:Set,Fn=null;function vw(i,a){if(i=i.containerInfo,Bp=hf,i=yv(i),fh(i)){if("selectionStart"in i)var o={start:i.selectionStart,end:i.selectionEnd};else t:{o=(o=i.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var p=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{o.nodeType,x.nodeType}catch{o=null;break t}var E=0,D=-1,W=-1,ct=0,_t=0,Mt=i,dt=null;e:for(;;){for(var mt;Mt!==o||p!==0&&Mt.nodeType!==3||(D=E+p),Mt!==x||c!==0&&Mt.nodeType!==3||(W=E+c),Mt.nodeType===3&&(E+=Mt.nodeValue.length),(mt=Mt.firstChild)!==null;)dt=Mt,Mt=mt;for(;;){if(Mt===i)break e;if(dt===o&&++ct===p&&(D=E),dt===x&&++_t===c&&(W=E),(mt=Mt.nextSibling)!==null)break;Mt=dt,dt=Mt.parentNode}Mt=mt}o=D===-1||W===-1?null:{start:D,end:W}}else o=null}o=o||{start:0,end:0}}else o=null;for(Vp={focusedElem:i,selectionRange:o},hf=!1,Fn=a;Fn!==null;)if(a=Fn,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,Fn=i;else for(;Fn!==null;){switch(a=Fn,x=a.alternate,i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(o=0;o<i.length;o++)p=i[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&x!==null){i=void 0,o=a,p=x.memoizedProps,x=x.memoizedState,c=o.stateNode;try{var Yt=Er(o.type,p);i=c.getSnapshotBeforeUpdate(Yt,x),c.__reactInternalSnapshotBeforeUpdate=i}catch(oe){qe(o,o.return,oe)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,o=i.nodeType,o===9)Gp(i);else if(o===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Gp(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(s(163))}if(i=a.sibling,i!==null){i.return=a.return,Fn=i;break}Fn=a.return}}function l_(i,a,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:Xs(i,o),c&4&&ec(5,o);break;case 1:if(Xs(i,o),c&4)if(i=o.stateNode,a===null)try{i.componentDidMount()}catch(E){qe(o,o.return,E)}else{var p=Er(o.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(p,a,i.__reactInternalSnapshotBeforeUpdate)}catch(E){qe(o,o.return,E)}}c&64&&n_(o),c&512&&nc(o,o.return);break;case 3:if(Xs(i,o),c&64&&(i=o.updateQueue,i!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Xv(i,a)}catch(E){qe(o,o.return,E)}}break;case 27:a===null&&c&4&&r_(o);case 26:case 5:Xs(i,o),a===null&&c&4&&s_(o),c&512&&nc(o,o.return);break;case 12:Xs(i,o);break;case 31:Xs(i,o),c&4&&f_(i,o);break;case 13:Xs(i,o),c&4&&d_(i,o),c&64&&(i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(o=ww.bind(null,o),Yw(i,o))));break;case 22:if(c=o.memoizedState!==null||js,!c){a=a!==null&&a.memoizedState!==null||Tn,p=js;var x=Tn;js=c,(Tn=a)&&!x?Ys(i,o,(o.subtreeFlags&8772)!==0):Xs(i,o),js=p,Tn=x}break;case 30:break;default:Xs(i,o)}}function c_(i){var a=i.alternate;a!==null&&(i.alternate=null,c_(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Dl(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var fn=null,ui=!1;function Ws(i,a,o){for(o=o.child;o!==null;)u_(i,a,o),o=o.sibling}function u_(i,a,o){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Ct,o)}catch{}switch(o.tag){case 26:Tn||ps(o,a),Ws(i,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Tn||ps(o,a);var c=fn,p=ui;Ba(o.type)&&(fn=o.stateNode,ui=!1),Ws(i,a,o),fc(o.stateNode),fn=c,ui=p;break;case 5:Tn||ps(o,a);case 6:if(c=fn,p=ui,fn=null,Ws(i,a,o),fn=c,ui=p,fn!==null)if(ui)try{(fn.nodeType===9?fn.body:fn.nodeName==="HTML"?fn.ownerDocument.body:fn).removeChild(o.stateNode)}catch(x){qe(o,a,x)}else try{fn.removeChild(o.stateNode)}catch(x){qe(o,a,x)}break;case 18:fn!==null&&(ui?(i=fn,n1(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,o.stateNode),Lo(i)):n1(fn,o.stateNode));break;case 4:c=fn,p=ui,fn=o.stateNode.containerInfo,ui=!0,Ws(i,a,o),fn=c,ui=p;break;case 0:case 11:case 14:case 15:La(2,o,a),Tn||La(4,o,a),Ws(i,a,o);break;case 1:Tn||(ps(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"&&i_(o,a,c)),Ws(i,a,o);break;case 21:Ws(i,a,o);break;case 22:Tn=(c=Tn)||o.memoizedState!==null,Ws(i,a,o),Tn=c;break;default:Ws(i,a,o)}}function f_(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Lo(i)}catch(o){qe(a,a.return,o)}}}function d_(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Lo(i)}catch(o){qe(a,a.return,o)}}function yw(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new o_),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new o_),a;default:throw Error(s(435,i.tag))}}function Xu(i,a){var o=yw(i);a.forEach(function(c){if(!o.has(c)){o.add(c);var p=Cw.bind(null,i,c);c.then(p,p)}})}function fi(i,a){var o=a.deletions;if(o!==null)for(var c=0;c<o.length;c++){var p=o[c],x=i,E=a,D=E;t:for(;D!==null;){switch(D.tag){case 27:if(Ba(D.type)){fn=D.stateNode,ui=!1;break t}break;case 5:fn=D.stateNode,ui=!1;break t;case 3:case 4:fn=D.stateNode.containerInfo,ui=!0;break t}D=D.return}if(fn===null)throw Error(s(160));u_(x,E,p),fn=null,ui=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)h_(a,i),a=a.sibling}var ts=null;function h_(i,a){var o=i.alternate,c=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:fi(a,i),di(i),c&4&&(La(3,i,i.return),ec(3,i),La(5,i,i.return));break;case 1:fi(a,i),di(i),c&512&&(Tn||o===null||ps(o,o.return)),c&64&&js&&(i=i.updateQueue,i!==null&&(c=i.callbacks,c!==null&&(o=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=o===null?c:o.concat(c))));break;case 26:var p=ts;if(fi(a,i),di(i),c&512&&(Tn||o===null||ps(o,o.return)),c&4){var x=o!==null?o.memoizedState:null;if(c=i.memoizedState,o===null)if(c===null)if(i.stateNode===null){t:{c=i.type,o=i.memoizedProps,p=p.ownerDocument||p;e:switch(c){case"title":x=p.getElementsByTagName("title")[0],(!x||x[cr]||x[bn]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(c),p.head.insertBefore(x,p.querySelector("head > title"))),Zn(x,c,o),x[bn]=i,N(x),c=x;break t;case"link":var E=h1("link","href",p).get(c+(o.href||""));if(E){for(var D=0;D<E.length;D++)if(x=E[D],x.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&x.getAttribute("rel")===(o.rel==null?null:o.rel)&&x.getAttribute("title")===(o.title==null?null:o.title)&&x.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){E.splice(D,1);break e}}x=p.createElement(c),Zn(x,c,o),p.head.appendChild(x);break;case"meta":if(E=h1("meta","content",p).get(c+(o.content||""))){for(D=0;D<E.length;D++)if(x=E[D],x.getAttribute("content")===(o.content==null?null:""+o.content)&&x.getAttribute("name")===(o.name==null?null:o.name)&&x.getAttribute("property")===(o.property==null?null:o.property)&&x.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&x.getAttribute("charset")===(o.charSet==null?null:o.charSet)){E.splice(D,1);break e}}x=p.createElement(c),Zn(x,c,o),p.head.appendChild(x);break;default:throw Error(s(468,c))}x[bn]=i,N(x),c=x}i.stateNode=c}else p1(p,i.type,i.stateNode);else i.stateNode=d1(p,c,i.memoizedProps);else x!==c?(x===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):x.count--,c===null?p1(p,i.type,i.stateNode):d1(p,c,i.memoizedProps)):c===null&&i.stateNode!==null&&mp(i,i.memoizedProps,o.memoizedProps)}break;case 27:fi(a,i),di(i),c&512&&(Tn||o===null||ps(o,o.return)),o!==null&&c&4&&mp(i,i.memoizedProps,o.memoizedProps);break;case 5:if(fi(a,i),di(i),c&512&&(Tn||o===null||ps(o,o.return)),i.flags&32){p=i.stateNode;try{Cn(p,"")}catch(Yt){qe(i,i.return,Yt)}}c&4&&i.stateNode!=null&&(p=i.memoizedProps,mp(i,p,o!==null?o.memoizedProps:p)),c&1024&&(vp=!0);break;case 6:if(fi(a,i),di(i),c&4){if(i.stateNode===null)throw Error(s(162));c=i.memoizedProps,o=i.stateNode;try{o.nodeValue=c}catch(Yt){qe(i,i.return,Yt)}}break;case 3:if(cf=null,p=ts,ts=of(a.containerInfo),fi(a,i),ts=p,di(i),c&4&&o!==null&&o.memoizedState.isDehydrated)try{Lo(a.containerInfo)}catch(Yt){qe(i,i.return,Yt)}vp&&(vp=!1,p_(i));break;case 4:c=ts,ts=of(i.stateNode.containerInfo),fi(a,i),di(i),ts=c;break;case 12:fi(a,i),di(i);break;case 31:fi(a,i),di(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Xu(i,c)));break;case 13:fi(a,i),di(i),i.child.flags&8192&&i.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(qu=A()),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Xu(i,c)));break;case 22:p=i.memoizedState!==null;var W=o!==null&&o.memoizedState!==null,ct=js,_t=Tn;if(js=ct||p,Tn=_t||W,fi(a,i),Tn=_t,js=ct,di(i),c&8192)t:for(a=i.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||W||js||Tn||Tr(i)),o=null,a=i;;
vendor: 10,781 bytes, line 48
48){if(a.tag===5||a.tag===26){if(o===null){W=o=a;try{if(x=W.stateNode,p)E=x.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{D=W.stateNode;var Mt=W.memoizedProps.style,dt=Mt!=null&&Mt.hasOwnProperty("display")?Mt.display:null;D.style.display=dt==null||typeof dt=="boolean"?"":(""+dt).trim()}}catch(Yt){qe(W,W.return,Yt)}}}else if(a.tag===6){if(o===null){W=a;try{W.stateNode.nodeValue=p?"":W.memoizedProps}catch(Yt){qe(W,W.return,Yt)}}}else if(a.tag===18){if(o===null){W=a;try{var mt=W.stateNode;p?i1(mt,!0):i1(W.stateNode,!1)}catch(Yt){qe(W,W.return,Yt)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break t;for(;a.sibling===null;){if(a.return===null||a.return===i)break t;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=i.updateQueue,c!==null&&(o=c.retryQueue,o!==null&&(c.retryQueue=null,Xu(i,o))));break;case 19:fi(a,i),di(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Xu(i,c)));break;case 30:break;case 21:break;default:fi(a,i),di(i)}}function di(i){var a=i.flags;if(a&2){try{for(var o,c=i.return;c!==null;){if(a_(c)){o=c;break}c=c.return}if(o==null)throw Error(s(160));switch(o.tag){case 27:var p=o.stateNode,x=gp(i);Wu(i,x,p);break;case 5:var E=o.stateNode;o.flags&32&&(Cn(E,""),o.flags&=-33);var D=gp(i);Wu(i,D,E);break;case 3:case 4:var W=o.stateNode.containerInfo,ct=gp(i);xp(i,ct,W);break;default:throw Error(s(161))}}catch(_t){qe(i,i.return,_t)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function p_(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;p_(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function Xs(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)l_(i,a.alternate,a),a=a.sibling}function Tr(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:La(4,a,a.return),Tr(a);break;case 1:ps(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&i_(a,a.return,o),Tr(a);break;case 27:fc(a.stateNode);case 26:case 5:ps(a,a.return),Tr(a);break;case 22:a.memoizedState===null&&Tr(a);break;case 30:Tr(a);break;default:Tr(a)}i=i.sibling}}function Ys(i,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=i,x=a,E=x.flags;switch(x.tag){case 0:case 11:case 15:Ys(p,x,o),ec(4,x);break;case 1:if(Ys(p,x,o),c=x,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(ct){qe(c,c.return,ct)}if(c=x,p=c.updateQueue,p!==null){var D=c.stateNode;try{var W=p.shared.hiddenCallbacks;if(W!==null)for(p.shared.hiddenCallbacks=null,p=0;p<W.length;p++)Wv(W[p],D)}catch(ct){qe(c,c.return,ct)}}o&&E&64&&n_(x),nc(x,x.return);break;case 27:r_(x);case 26:case 5:Ys(p,x,o),o&&c===null&&E&4&&s_(x),nc(x,x.return);break;case 12:Ys(p,x,o);break;case 31:Ys(p,x,o),o&&E&4&&f_(p,x);break;case 13:Ys(p,x,o),o&&E&4&&d_(p,x);break;case 22:x.memoizedState===null&&Ys(p,x,o),nc(x,x.return);break;case 30:break;default:Ys(p,x,o)}a=a.sibling}}function yp(i,a){var o=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==o&&(i!=null&&i.refCount++,o!=null&&kl(o))}function _p(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&kl(i))}function es(i,a,o,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)m_(i,a,o,c),a=a.sibling}function m_(i,a,o,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:es(i,a,o,c),p&2048&&ec(9,a);break;case 1:es(i,a,o,c);break;case 3:es(i,a,o,c),p&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&kl(i)));break;case 12:if(p&2048){es(i,a,o,c),i=a.stateNode;try{var x=a.memoizedProps,E=x.id,D=x.onPostCommit;typeof D=="function"&&D(E,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(W){qe(a,a.return,W)}}else es(i,a,o,c);break;case 31:es(i,a,o,c);break;case 13:es(i,a,o,c);break;case 23:break;case 22:x=a.stateNode,E=a.alternate,a.memoizedState!==null?x._visibility&2?es(i,a,o,c):ic(i,a):x._visibility&2?es(i,a,o,c):(x._visibility|=2,bo(i,a,o,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&yp(E,a);break;case 24:es(i,a,o,c),p&2048&&_p(a.alternate,a);break;default:es(i,a,o,c)}}function bo(i,a,o,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var x=i,E=a,D=o,W=c,ct=E.flags;switch(E.tag){case 0:case 11:case 15:bo(x,E,D,W,p),ec(8,E);break;case 23:break;case 22:var _t=E.stateNode;E.memoizedState!==null?_t._visibility&2?bo(x,E,D,W,p):ic(x,E):(_t._visibility|=2,bo(x,E,D,W,p)),p&&ct&2048&&yp(E.alternate,E);break;case 24:bo(x,E,D,W,p),p&&ct&2048&&_p(E.alternate,E);break;default:bo(x,E,D,W,p)}a=a.sibling}}function ic(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=i,c=a,p=c.flags;switch(c.tag){case 22:ic(o,c),p&2048&&yp(c.alternate,c);break;case 24:ic(o,c),p&2048&&_p(c.alternate,c);break;default:ic(o,c)}a=a.sibling}}var sc=8192;function So(i,a,o){if(i.subtreeFlags&sc)for(i=i.child;i!==null;)g_(i,a,o),i=i.sibling}function g_(i,a,o){switch(i.tag){case 26:So(i,a,o),i.flags&sc&&i.memoizedState!==null&&a3(o,ts,i.memoizedState,i.memoizedProps);break;case 5:So(i,a,o);break;case 3:case 4:var c=ts;ts=of(i.stateNode.containerInfo),So(i,a,o),ts=c;break;case 22:i.memoizedState===null&&(c=i.alternate,c!==null&&c.memoizedState!==null?(c=sc,sc=16777216,So(i,a,o),sc=c):So(i,a,o));break;default:So(i,a,o)}}function x_(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function ac(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];Fn=c,y_(c,i)}x_(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)v_(i),i=i.sibling}function v_(i){switch(i.tag){case 0:case 11:case 15:ac(i),i.flags&2048&&La(9,i,i.return);break;case 3:ac(i);break;case 12:ac(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Yu(i)):ac(i);break;default:ac(i)}}function Yu(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];Fn=c,y_(c,i)}x_(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:La(8,a,a.return),Yu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Yu(a));break;default:Yu(a)}i=i.sibling}}function y_(i,a){for(;Fn!==null;){var o=Fn;switch(o.tag){case 0:case 11:case 15:La(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var c=o.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:kl(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,Fn=c;else t:for(o=i;Fn!==null;){c=Fn;var p=c.sibling,x=c.return;if(c_(c),c===o){Fn=null;break t}if(p!==null){p.return=x,Fn=p;break t}Fn=x}}}var _w={getCacheForType:function(i){var a=Yn(Sn),o=a.data.get(i);return o===void 0&&(o=i(),a.data.set(i,o)),o},cacheSignal:function(){return Yn(Sn).controller.signal}},bw=typeof WeakMap=="function"?WeakMap:Map,je=0,nn=null,Te=null,De=0,Ye=0,Ei=null,Pa=!1,Mo=!1,bp=!1,qs=0,mn=0,Ua=0,Ar=0,Sp=0,Ti=0,Eo=0,rc=null,hi=null,Mp=!1,qu=0,__=0,Zu=1/0,Ku=null,Oa=null,Rn=0,Fa=null,To=null,Zs=0,Ep=0,Tp=null,b_=null,oc=0,Ap=null;function Ai(){return(je&2)!==0&&De!==0?De&-De:I.T!==null?Lp():Qr()}function S_(){if(Ti===0)if((De&536870912)===0||Le){var i=Dt;Dt<<=1,(Dt&3932160)===0&&(Dt=262144),Ti=i}else Ti=536870912;return i=Si.current,i!==null&&(i.flags|=32),Ti}function pi(i,a,o){(i===nn&&(Ye===2||Ye===9)||i.cancelPendingCommit!==null)&&(Ao(i,0),Ia(i,De,Ti,!1)),Ue(i,o),((je&2)===0||i!==nn)&&(i===nn&&((je&2)===0&&(Ar|=o),mn===4&&Ia(i,De,Ti,!1)),ms(i))}function M_(i,a,o){if((je&6)!==0)throw Error(s(327));var c=!o&&(a&127)===0&&(a&i.expiredLanes)===0||wt(i,a),p=c?Ew(i,a):Cp(i,a,!0),x=c;do{if(p===0){Mo&&!c&&Ia(i,a,0,!1);break}else{if(o=i.current.alternate,x&&!Sw(o)){p=Cp(i,a,!1),x=!1;continue}if(p===2){if(x=a,i.errorRecoveryDisabledLanes&x)var E=0;else E=i.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){a=E;t:{var D=i;p=rc;var W=D.current.memoizedState.isDehydrated;if(W&&(Ao(D,E).flags|=256),E=Cp(D,E,!1),E!==2){if(bp&&!W){D.errorRecoveryDisabledLanes|=x,Ar|=x,p=4;break t}x=hi,hi=p,x!==null&&(hi===null?hi=x:hi.push.apply(hi,x))}p=E}if(x=!1,p!==2)continue}}if(p===1){Ao(i,0),Ia(i,a,0,!0);break}t:{switch(c=i,x=p,x){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:Ia(c,a,Ti,!Pa);break t;case 2:hi=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(p=qu+300-A(),10<p)){if(Ia(c,a,Ti,!Pa),ut(c,0,!0)!==0)break t;Zs=a,c.timeoutHandle=t1(E_.bind(null,c,o,hi,Ku,Mp,a,Ti,Ar,Eo,Pa,x,"Throttled",-0,0),p);break t}E_(c,o,hi,Ku,Mp,a,Ti,Ar,Eo,Pa,x,null,-0,0)}}break}while(!0);ms(i)}function E_(i,a,o,c,p,x,E,D,W,ct,_t,Mt,dt,mt){if(i.timeoutHandle=-1,Mt=a.subtreeFlags,Mt&8192||(Mt&16785408)===16785408){Mt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Us},g_(a,x,Mt);var Yt=(x&62914560)===x?qu-A():(x&4194048)===x?__-A():0;if(Yt=r3(Mt,Yt),Yt!==null){Zs=x,i.cancelPendingCommit=Yt(L_.bind(null,i,a,x,o,c,p,E,D,W,_t,Mt,null,dt,mt)),Ia(i,x,E,!ct);return}}L_(i,a,x,o,c,p,E,D,W)}function Sw(i){for(var a=i;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var c=0;c<o.length;c++){var p=o[c],x=p.getSnapshot;p=p.value;try{if(!_i(x(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ia(i,a,o,c){a&=~Sp,a&=~Ar,i.suspendedLanes|=a,i.pingedLanes&=~a,c&&(i.warmLanes|=a),c=i.expirationTimes;for(var p=a;0<p;){var x=31-zt(p),E=1<<x;c[x]=-1,p&=~E}o!==0&&Ls(i,o,a)}function Qu(){return(je&6)===0?(lc(0),!1):!0}function wp(){if(Te!==null){if(Ye===0)var i=Te.return;else i=Te,zs=xr=null,Gh(i),go=null,jl=0,i=Te;for(;i!==null;)e_(i.alternate,i),i=i.return;Te=null}}function Ao(i,a){var o=i.timeoutHandle;o!==-1&&(i.timeoutHandle=-1,kw(o)),o=i.cancelPendingCommit,o!==null&&(i.cancelPendingCommit=null,o()),Zs=0,wp(),nn=i,Te=o=Fs(i.current,null),De=a,Ye=0,Ei=null,Pa=!1,Mo=wt(i,a),bp=!1,Eo=Ti=Sp=Ar=Ua=mn=0,hi=rc=null,Mp=!1,(a&8)!==0&&(a|=a&32);var c=i.entangledLanes;if(c!==0)for(i=i.entanglements,c&=a;0<c;){var p=31-zt(c),x=1<<p;a|=i[p],c&=~x}return qs=a,vu(),o}function T_(i,a){ve=null,I.H=Jl,a===mo||a===Au?(a=Hv(),Ye=3):a===Nh?(a=Hv(),Ye=4):Ye=a===ap?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Ei=a,Te===null&&(mn=1,Vu(i,Ii(a,i.current)))}
vendor: 11,236 bytes, line 48
48function A_(){var i=Si.current;return i===null?!0:(De&4194048)===De?Hi===null:(De&62914560)===De||(De&536870912)!==0?i===Hi:!1}function w_(){var i=I.H;return I.H=Jl,i===null?Jl:i}function C_(){var i=I.A;return I.A=_w,i}function Ju(){mn=4,Pa||(De&4194048)!==De&&Si.current!==null||(Mo=!0),(Ua&134217727)===0&&(Ar&134217727)===0||nn===null||Ia(nn,De,Ti,!1)}function Cp(i,a,o){var c=je;je|=2;var p=w_(),x=C_();(nn!==i||De!==a)&&(Ku=null,Ao(i,a)),a=!1;var E=mn;t:do try{if(Ye!==0&&Te!==null){var D=Te,W=Ei;switch(Ye){case 8:wp(),E=6;break t;case 3:case 2:case 9:case 6:Si.current===null&&(a=!0);var ct=Ye;if(Ye=0,Ei=null,wo(i,D,W,ct),o&&Mo){E=0;break t}break;default:ct=Ye,Ye=0,Ei=null,wo(i,D,W,ct)}}Mw(),E=mn;break}catch(_t){T_(i,_t)}while(!0);return a&&i.shellSuspendCounter++,zs=xr=null,je=c,I.H=p,I.A=x,Te===null&&(nn=null,De=0,vu()),E}function Mw(){for(;Te!==null;)R_(Te)}function Ew(i,a){var o=je;je|=2;var c=w_(),p=C_();nn!==i||De!==a?(Ku=null,Zu=A()+500,Ao(i,a)):Mo=wt(i,a);t:do try{if(Ye!==0&&Te!==null){a=Te;var x=Ei;e:switch(Ye){case 1:Ye=0,Ei=null,wo(i,a,x,1);break;case 2:case 9:if(Bv(x)){Ye=0,Ei=null,D_(a);break}a=function(){Ye!==2&&Ye!==9||nn!==i||(Ye=7),ms(i)},x.then(a,a);break t;case 3:Ye=7;break t;case 4:Ye=5;break t;case 7:Bv(x)?(Ye=0,Ei=null,D_(a)):(Ye=0,Ei=null,wo(i,a,x,7));break;case 5:var E=null;switch(Te.tag){case 26:E=Te.memoizedState;case 5:case 27:var D=Te;if(E?m1(E):D.stateNode.complete){Ye=0,Ei=null;var W=D.sibling;if(W!==null)Te=W;else{var ct=D.return;ct!==null?(Te=ct,$u(ct)):Te=null}break e}}Ye=0,Ei=null,wo(i,a,x,5);break;case 6:Ye=0,Ei=null,wo(i,a,x,6);break;case 8:wp(),mn=6;break t;default:throw Error(s(462))}}Tw();break}catch(_t){T_(i,_t)}while(!0);return zs=xr=null,I.H=c,I.A=p,je=o,Te!==null?0:(nn=null,De=0,vu(),mn)}function Tw(){for(;Te!==null&&!Ht();)R_(Te)}function R_(i){var a=$y(i.alternate,i,qs);i.memoizedProps=i.pendingProps,a===null?$u(i):Te=a}function D_(i){var a=i,o=a.alternate;switch(a.tag){case 15:case 0:a=Yy(o,a,a.pendingProps,a.type,void 0,De);break;case 11:a=Yy(o,a,a.pendingProps,a.type.render,a.ref,De);break;case 5:Gh(a);default:e_(o,a),a=Te=Cv(a,qs),a=$y(o,a,qs)}i.memoizedProps=i.pendingProps,a===null?$u(i):Te=a}function wo(i,a,o,c){zs=xr=null,Gh(a),go=null,jl=0;var p=a.return;try{if(hw(i,p,a,o,De)){mn=1,Vu(i,Ii(o,i.current)),Te=null;return}}catch(x){if(p!==null)throw Te=p,x;mn=1,Vu(i,Ii(o,i.current)),Te=null;return}a.flags&32768?(Le||c===1?i=!0:Mo||(De&536870912)!==0?i=!1:(Pa=i=!0,(c===2||c===9||c===3||c===6)&&(c=Si.current,c!==null&&c.tag===13&&(c.flags|=16384))),N_(a,i)):$u(a)}function $u(i){var a=i;do{if((a.flags&32768)!==0){N_(a,Pa);return}i=a.return;var o=gw(a.alternate,a,qs);if(o!==null){Te=o;return}if(a=a.sibling,a!==null){Te=a;return}Te=a=i}while(a!==null);mn===0&&(mn=5)}function N_(i,a){do{var o=xw(i.alternate,i);if(o!==null){o.flags&=32767,Te=o;return}if(o=i.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(i=i.sibling,i!==null)){Te=i;return}Te=i=o}while(i!==null);mn=6,Te=null}function L_(i,a,o,c,p,x,E,D,W){i.cancelPendingCommit=null;do tf();while(Rn!==0);if((je&6)!==0)throw Error(s(327));if(a!==null){if(a===i.current)throw Error(s(177));if(x=a.lanes|a.childLanes,x|=gh,cn(i,o,x,E,D,W),i===nn&&(Te=nn=null,De=0),To=a,Fa=i,Zs=o,Ep=x,Tp=p,b_=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,Rw(vt,function(){return I_(),null})):(i.callbackNode=null,i.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=I.T,I.T=null,p=V.p,V.p=2,E=je,je|=4;try{vw(i,a,o)}finally{je=E,V.p=p,I.T=c}}Rn=1,P_(),U_(),O_()}}function P_(){if(Rn===1){Rn=0;var i=Fa,a=To,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=I.T,I.T=null;var c=V.p;V.p=2;var p=je;je|=4;try{h_(a,i);var x=Vp,E=yv(i.containerInfo),D=x.focusedElem,W=x.selectionRange;if(E!==D&&D&&D.ownerDocument&&vv(D.ownerDocument.documentElement,D)){if(W!==null&&fh(D)){var ct=W.start,_t=W.end;if(_t===void 0&&(_t=ct),"selectionStart"in D)D.selectionStart=ct,D.selectionEnd=Math.min(_t,D.value.length);else{var Mt=D.ownerDocument||document,dt=Mt&&Mt.defaultView||window;if(dt.getSelection){var mt=dt.getSelection(),Yt=D.textContent.length,oe=Math.min(W.start,Yt),$e=W.end===void 0?oe:Math.min(W.end,Yt);!mt.extend&&oe>$e&&(E=$e,$e=oe,oe=E);var tt=xv(D,oe),q=xv(D,$e);if(tt&&q&&(mt.rangeCount!==1||mt.anchorNode!==tt.node||mt.anchorOffset!==tt.offset||mt.focusNode!==q.node||mt.focusOffset!==q.offset)){var lt=Mt.createRange();lt.setStart(tt.node,tt.offset),mt.removeAllRanges(),oe>$e?(mt.addRange(lt),mt.extend(q.node,q.offset)):(lt.setEnd(q.node,q.offset),mt.addRange(lt))}}}}for(Mt=[],mt=D;mt=mt.parentNode;)mt.nodeType===1&&Mt.push({element:mt,left:mt.scrollLeft,top:mt.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<Mt.length;D++){var St=Mt[D];St.element.scrollLeft=St.left,St.element.scrollTop=St.top}}hf=!!Bp,Vp=Bp=null}finally{je=p,V.p=c,I.T=o}}i.current=a,Rn=2}}function U_(){if(Rn===2){Rn=0;var i=Fa,a=To,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=I.T,I.T=null;var c=V.p;V.p=2;var p=je;je|=4;try{l_(i,a.alternate,a)}finally{je=p,V.p=c,I.T=o}}Rn=3}}function O_(){if(Rn===4||Rn===3){Rn=0,H();var i=Fa,a=To,o=Zs,c=b_;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Rn=5:(Rn=0,To=Fa=null,F_(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&(Oa=null),li(o),a=a.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Ct,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=I.T,p=V.p,V.p=2,I.T=null;try{for(var x=i.onRecoverableError,E=0;E<c.length;E++){var D=c[E];x(D.value,{componentStack:D.stack})}}finally{I.T=a,V.p=p}}(Zs&3)!==0&&tf(),ms(i),p=i.pendingLanes,(o&261930)!==0&&(p&42)!==0?i===Ap?oc++:(oc=0,Ap=i):oc=0,lc(0)}}function F_(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,kl(a)))}function tf(){return P_(),U_(),O_(),I_()}function I_(){if(Rn!==5)return!1;var i=Fa,a=Ep;Ep=0;var o=li(Zs),c=I.T,p=V.p;try{V.p=32>o?32:o,I.T=null,o=Tp,Tp=null;var x=Fa,E=Zs;if(Rn=0,To=Fa=null,Zs=0,(je&6)!==0)throw Error(s(331));var D=je;if(je|=4,v_(x.current),m_(x,x.current,E,o),je=D,lc(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Ct,x)}catch{}return!0}finally{V.p=p,I.T=c,F_(i,a)}}function z_(i,a,o){a=Ii(o,a),a=sp(i.stateNode,a,2),i=Ra(i,a,2),i!==null&&(Ue(i,2),ms(i))}function qe(i,a,o){if(i.tag===3)z_(i,i,o);else for(;a!==null;){if(a.tag===3){z_(a,i,o);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Oa===null||!Oa.has(c))){i=Ii(o,i),o=By(2),c=Ra(a,o,2),c!==null&&(Vy(o,c,a,i),Ue(c,2),ms(c));break}}a=a.return}}function Rp(i,a,o){var c=i.pingCache;if(c===null){c=i.pingCache=new bw;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(o)||(bp=!0,p.add(o),i=Aw.bind(null,i,a,o),a.then(i,i))}function Aw(i,a,o){var c=i.pingCache;c!==null&&c.delete(a),i.pingedLanes|=i.suspendedLanes&o,i.warmLanes&=~o,nn===i&&(De&o)===o&&(mn===4||mn===3&&(De&62914560)===De&&300>A()-qu?(je&2)===0&&Ao(i,0):Sp|=o,Eo===De&&(Eo=0)),ms(i)}function B_(i,a){a===0&&(a=xe()),i=pr(i,a),i!==null&&(Ue(i,a),ms(i))}function ww(i){var a=i.memoizedState,o=0;a!==null&&(o=a.retryLane),B_(i,o)}function Cw(i,a){var o=0;switch(i.tag){case 31:case 13:var c=i.stateNode,p=i.memoizedState;p!==null&&(o=p.retryLane);break;case 19:c=i.stateNode;break;case 22:c=i.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(a),B_(i,o)}function Rw(i,a){return Re(i,a)}var ef=null,Co=null,Dp=!1,nf=!1,Np=!1,za=0;function ms(i){i!==Co&&i.next===null&&(Co===null?ef=Co=i:Co=Co.next=i),nf=!0,Dp||(Dp=!0,Nw())}function lc(i,a){if(!Np&&nf){Np=!0;do for(var o=!1,c=ef;c!==null;){if(i!==0){var p=c.pendingLanes;if(p===0)var x=0;else{var E=c.suspendedLanes,D=c.pingedLanes;x=(1<<31-zt(42|i)+1)-1,x&=p&~(E&~D),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(o=!0,G_(c,x))}else x=De,x=ut(c,c===nn?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||wt(c,x)||(o=!0,G_(c,x));c=c.next}while(o);Np=!1}}function Dw(){V_()}function V_(){nf=Dp=!1;var i=0;za!==0&&Hw()&&(i=za);for(var a=A(),o=null,c=ef;c!==null;){var p=c.next,x=H_(c,a);x===0?(c.next=null,o===null?ef=p:o.next=p,p===null&&(Co=o)):(o=c,(i!==0||(x&3)!==0)&&(nf=!0)),c=p}Rn!==0&&Rn!==5||lc(i),za!==0&&(za=0)}function H_(i,a){for(var o=i.suspendedLanes,c=i.pingedLanes,p=i.expirationTimes,x=i.pendingLanes&-62914561;0<x;){var E=31-zt(x),D=1<<E,W=p[E];W===-1?((D&o)===0||(D&c)!==0)&&(p[E]=Qt(D,a)):W<=a&&(i.expiredLanes|=D),x&=~D}if(a=nn,o=De,o=ut(i,i===a?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c=i.callbackNode,o===0||i===a&&(Ye===2||Ye===9)||i.cancelPendingCommit!==null)return c!==null&&c!==null&&Be(c),i.callbackNode=null,i.callbackPriority=0;if((o&3)===0||wt(i,o)){if(a=o&-o,a===i.callbackPriority)return a;switch(c!==null&&Be(c),li(o)){case 2:case 8:o=Tt;break;case 32:o=vt;break;case 268435456:o=Nt;break;default:o=vt}return c=k_.bind(null,i),o=Re(o,c),i.callbackPriority=a,i.callbackNode=o,a}return c!==null&&c!==null&&Be(c),i.callbackPriority=2,i.callbackNode=null,2}function k_(i,a){if(Rn!==0&&Rn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var o=i.callbackNode;if(tf()&&i.callbackNode!==o)return null;var c=De;return c=ut(i,i===nn?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c===0?null:(M_(i,c,a),H_(i,A()),i.callbackNode!=null&&i.callbackNode===o?k_.bind(null,i):null)}function G_(i,a){if(tf())return null;M_(i,a,!0)}function Nw(){Gw(function(){(je&6)!==0?Re(yt,Dw):V_()})}function Lp(){if(za===0){var i=ho;i===0&&(i=Ft,Ft<<=1,(Ft&261888)===0&&(Ft=256)),za=i}return za}function j_(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:uu(""+i)}function W_(i,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,i.id&&o.setAttribute("form",i.id),a.parentNode.insertBefore(o,a),i=new FormData(i),o.parentNode.removeChild(o),i}function Lw(i,a,o,c,p){if(a==="submit"&&o&&o.stateNode===p){var x=j_((p[Vn]||null).action),E=c.submitter;E&&(a=(a=E[Vn]||null)?j_(a.formAction):E.getAttribute("formAction"),a!==null&&(x=a,E=null));var D=new pu("action","action",null,c,p);i.push({event:D,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(za!==0){var W=E?W_(p,E):new FormData(p);Jh(o,{pending:!0,data:W,method:p.method,action:x},null,W)}}else typeof x=="function"&&(D.preventDefault(),W=E?W_(p,E):new FormData(p),Jh(o,{pending:!0,data:W,method:p.method,action:x},x,W))},currentTarget:p}]})}}for(var Pp=0;Pp<mh.length;Pp++){var Up=mh[Pp],Pw=Up.toLowerCase(),Uw=Up[0].toUpperCase()+Up.slice(1);$i(Pw,"on"+Uw)}$i(Sv,"onAnimationEnd"),$i(Mv,"onAnimationIteration"),$i(Ev,"onAnimationStart"),$i("dblclick","onDoubleClick"),$i("focusin","onFocus"),$i("focusout","onBlur"),$i(KA,"onTransitionRun"),$i(QA,"onTransitionStart"),$i(JA,"onTransitionCancel"),$i(Tv,"onTransitionEnd"),st("onMouseEnter",["mouseout","mouseover"]),st("onMouseLeave",["mouseout","mouseover"]),st("onPointerEnter",["pointerout","pointerover"]),st("onPointerLeave",["pointerout","pointerover"]),ft("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ft("onSelect","focusout contextmenu dragend focu
48sin keydown keyup mousedown mouseup selectionchange".split(" ")),ft("onBeforeInput",["compositionend","keypress","textInput","paste"]),ft("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ft("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ft("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cc="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(" "),Ow=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cc));function X_(i,a){a=(a&4)!==0;for(var o=0;o<i.length;o++){var c=i[o],p=c.event;c=c.listeners;t:{var x=void 0;if(a)for(var E=c.length-1;0<=E;E--){var D=c[E],W=D.instance,ct=D.currentTarget;if(D=D.listener,W!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=ct;try{x(p)}catch(_t){xu(_t)}p.currentTarget=null,x=W}else for(E=0;E<c.length;E++){if(D=c[E],W=D.instance,ct=D.currentTarget,D=D.listener,W!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=ct;try{x(p)}catch(_t){xu(_t)}p.currentTarget=null,x=W}}}}function Ae(i,a){var o=a[Jr];o===void 0&&(o=a[Jr]=new Set);var c=i+"__bubble";o.has(c)||(Y_(a,i,2,!1),o.add(c))}function Op(i,a,o){var c=0;a&&(c|=4),Y_(o,i,c,a)}var sf="_reactListening"+Math.random().toString(36).slice(2);function Fp(i){if(!i[sf]){i[sf]=!0,$.forEach(function(o){o!=="selectionchange"&&(Ow.has(o)||Op(o,!1,i),Op(o,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[sf]||(a[sf]=!0,Op("selectionchange",!1,a))}}function Y_(i,a,o,c){switch(S1(a)){case 2:var p=c3;break;case 8:p=u3;break;default:p=Qp}o=p.bind(null,a,o,i),p=void 0,!nh||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?i.addEventListener(a,o,{capture:!0,passive:p}):i.addEventListener(a,o,!0):p!==void 0?i.addEventListener(a,o,{passive:p}):i.addEventListener(a,o,!1)}function Ip(i,a,o,c,p){var x=c;if((a&1)===0&&(a&2)===0&&c!==null)t:for(;;){if(c===null)return;var E=c.tag;if(E===3||E===4){var D=c.stateNode.containerInfo;if(D===p)break;if(E===4)for(E=c.return;E!==null;){var W=E.tag;if((W===3||W===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;D!==null;){if(E=ya(D),E===null)return;if(W=E.tag,W===5||W===6||W===26||W===27){c=x=E;continue t}D=D.parentNode}}c=c.return}Jx(function(){var ct=x,_t=th(o),Mt=[];t:{var dt=Av.get(i);if(dt!==void 0){var mt=pu,Yt=i;switch(i){case"keypress":if(du(o)===0)break t;case"keydown":case"keyup":mt=CA;break;case"focusin":Yt="focus",mt=rh;break;case"focusout":Yt="blur",mt=rh;break;case"beforeblur":case"afterblur":mt=rh;break;case"click":if(o.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":mt=ev;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":mt=gA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":mt=NA;break;case Sv:case Mv:case Ev:mt=yA;break;case Tv:mt=PA;break;case"scroll":case"scrollend":mt=pA;break;case"wheel":mt=OA;break;case"copy":case"cut":case"paste":mt=bA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":mt=iv;break;case"toggle":case"beforetoggle":mt=IA}var oe=(a&4)!==0,$e=!oe&&(i==="scroll"||i==="scrollend"),tt=oe?dt!==null?dt+"Capture":null:dt;oe=[];for(var q=ct,lt;q!==null;){var St=q;if(lt=St.stateNode,St=St.tag,St!==5&&St!==26&&St!==27||lt===null||tt===null||(St=Nl(q,tt),St!=null&&oe.push(uc(q,St,lt))),$e)break;q=q.return}0<oe.length&&(dt=new mt(dt,Yt,null,o,_t),Mt.push({event:dt,listeners:oe}))}}if((a&7)===0){t:{if(dt=i==="mouseover"||i==="pointerover",mt=i==="mouseout"||i==="pointerout",dt&&o!==$d&&(Yt=o.relatedTarget||o.fromElement)&&(ya(Yt)||Yt[Qi]))break t;if((mt||dt)&&(dt=_t.window===_t?_t:(dt=_t.ownerDocument)?dt.defaultView||dt.parentWindow:window,mt?(Yt=o.relatedTarget||o.toElement,mt=ct,Yt=Yt?ya(Yt):null,Yt!==null&&($e=l(Yt),oe=Yt.tag,Yt!==$e||oe!==5&&oe!==27&&oe!==6)&&(Yt=null)):(mt=null,Yt=ct),mt!==Yt)){if(oe=ev,St="onMouseLeave",tt="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(oe=iv,St="onPointerLeave",tt="onPointerEnter",q="pointer"),$e=mt==null?dt:ur(mt),lt=Yt==null?dt:ur(Yt),dt=new oe(St,q+"leave",mt,o,_t),dt.target=$e,dt.relatedTarget=lt,St=null,ya(_t)===ct&&(oe=new oe(tt,q+"enter",Yt,o,_t),oe.target=lt,oe.relatedTarget=$e,St=oe),$e=St,mt&&Yt)e:{for(oe=Fw,tt=mt,q=Yt,lt=0,St=tt;St;St=oe(St))lt++;St=0;for(var ie=q;ie;ie=oe(ie))St++;for(;0<lt-St;)tt=oe(tt),lt--;for(;0<St-lt;)q=oe(q),St--;for(;lt--;){if(tt===q||q!==null&&tt===q.alternate){oe=tt;break e}tt=oe(tt),q=oe(q)}oe=null}else oe=null;mt!==null&&q_(Mt,dt,mt,oe,!1),Yt!==null&&$e!==null&&q_(Mt,$e,Yt,oe,!0)}}t:{if(dt=ct?ur(ct):window,mt=dt.nodeName&&dt.nodeName.toLowerCase(),mt==="select"||mt==="input"&&dt.type==="file")var Ve=fv;else if(cv(dt))if(dv)Ve=YA;else{Ve=WA;var te=jA}else mt=dt.nodeName,!mt||mt.toLowerCase()!=="input"||dt.type!=="checkbox"&&dt.type!=="radio"?ct&&Ji(ct.elementType)&&(Ve=fv):Ve=XA;if(Ve&&(Ve=Ve(i,ct))){uv(Mt,Ve,o,_t);break t}te&&te(i,dt,ct),i==="focusout"&&ct&&dt.type==="number"&&ct.memoizedProps.value!=null&&kn(dt,"number",dt.value)}switch(te=ct?ur(ct):window,i){case"focusin":(cv(te)||te.contentEditable==="true")&&(so=te,dh=ct,Bl=null);break;case"focusout":Bl=dh=so=null;break;case"mousedown":hh=!0;break;case"contextmenu":case"mouseup":case"dragend":hh=!1,_v(Mt,o,_t);break;case"selectionchange":if(ZA)break;case"keydown":case"keyup":_v(Mt,o,_t)}var _e;if(lh)t:{switch(i){case"compositionstart":var Ne="onCompositionStart";break t;case"compositionend":Ne="onCompositionEnd";break t;case"compositionupdate":Ne="onCompositionUpdate";break t}Ne=void 0}else io?ov(i,o)&&(Ne="onCompositionEnd"):i==="keydown"&&o.keyCode===229&&(Ne="onCompositionStart");Ne&&(sv&&o.locale!=="ko"&&(io||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&io&&(_e=$x()):(Sa=_t,ih="value"in Sa?Sa.value:Sa.textContent,io=!0)),te=af(ct,Ne),0<te.length&&(Ne=new nv(Ne,i,null,o,_t),Mt.push({event:Ne,listeners:te}),_e?Ne.data=_e:(_e=lv(o),_e!==null&&(Ne.data=_e)))),(_e=BA?VA(i,o):HA(i,o))&&(Ne=af(ct,"onBeforeInput"),0<Ne.length&&(te=new nv("onBeforeInput","beforeinput",null,o,_t),Mt.push({event:te,listeners:Ne}
vendor: 6,712 bytes, lines 48-49
48),te.data=_e)),Lw(Mt,i,ct,o,_t)}X_(Mt,a)})}function uc(i,a,o){return{instance:i,listener:a,currentTarget:o}}function af(i,a){for(var o=a+"Capture",c=[];i!==null;){var p=i,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=Nl(i,o),p!=null&&c.unshift(uc(i,p,x)),p=Nl(i,a),p!=null&&c.push(uc(i,p,x))),i.tag===3)return c;i=i.return}return[]}function Fw(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function q_(i,a,o,c,p){for(var x=a._reactName,E=[];o!==null&&o!==c;){var D=o,W=D.alternate,ct=D.stateNode;if(D=D.tag,W!==null&&W===c)break;D!==5&&D!==26&&D!==27||ct===null||(W=ct,p?(ct=Nl(o,x),ct!=null&&E.unshift(uc(o,ct,W))):p||(ct=Nl(o,x),ct!=null&&E.push(uc(o,ct,W)))),o=o.return}E.length!==0&&i.push({event:a,listeners:E})}var Iw=/\r\n?/g,zw=/\u0000|\uFFFD/g;function Z_(i){return(typeof i=="string"?i:""+i).replace(Iw,` 49`).replace(zw,"")}function K_(i,a){return a=Z_(a),Z_(i)===a}function Je(i,a,o,c,p,x){switch(o){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Cn(i,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Cn(i,""+c);break;case"className":se(i,"class",c);break;case"tabIndex":se(i,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":se(i,o,c);break;case"style":to(i,c,x);break;case"data":if(a!=="object"){se(i,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||o!=="href")){i.removeAttribute(o);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(o);break}c=uu(""+c),i.setAttribute(o,c);break;case"action":case"formAction":if(typeof c=="function"){i.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(o==="formAction"?(a!=="input"&&Je(i,a,"name",p.name,p,null),Je(i,a,"formEncType",p.formEncType,p,null),Je(i,a,"formMethod",p.formMethod,p,null),Je(i,a,"formTarget",p.formTarget,p,null)):(Je(i,a,"encType",p.encType,p,null),Je(i,a,"method",p.method,p,null),Je(i,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(o);break}c=uu(""+c),i.setAttribute(o,c);break;case"onClick":c!=null&&(i.onclick=Us);break;case"onScroll":c!=null&&Ae("scroll",i);break;case"onScrollEnd":c!=null&&Ae("scrollend",i);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(s(60));i.innerHTML=o}}break;case"multiple":i.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":i.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){i.removeAttribute("xlink:href");break}o=uu(""+c),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(o,""+c):i.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(o,""):i.removeAttribute(o);break;case"capture":case"download":c===!0?i.setAttribute(o,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(o,c):i.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?i.setAttribute(o,c):i.removeAttribute(o);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?i.removeAttribute(o):i.setAttribute(o,c);break;case"popover":Ae("beforetoggle",i),Ae("toggle",i),Jt(i,"popover",c);break;case"xlinkActuate":$t(i,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":$t(i,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":$t(i,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":$t(i,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":$t(i,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":$t(i,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":$t(i,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":$t(i,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":$t(i,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Jt(i,"is",c);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=dA.get(o)||o,Jt(i,o,c))}}function zp(i,a,o,c,p,x){switch(o){case"style":to(i,c,x);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(s(60));i.innerHTML=o}}break;case"children":typeof c=="string"?Cn(i,c):(typeof c=="number"||typeof c=="bigint")&&Cn(i,""+c);break;case"onScroll":c!=null&&Ae("scroll",i);break;case"onScrollEnd":c!=null&&Ae("scrollend",i);break;case"onClick":c!=null&&(i.onclick=Us);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ht.hasOwnProperty(o))t:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),x=i[Vn]||null,x=x!=null?x[o]:null,typeof x=="function"&&i.removeEventListener(a,x,p),typeof c=="function")){typeof x!="function"&&x!==null&&(o in i?i[o]=null:i.hasAttribute(o)&&i.removeAttribute(o)),i.addEventListener(a,c,p);break t}o in i?i[o]=c:c===!0?i.setAttribute(o,""):Jt(i,o,c)}}}function Zn(i,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",i),Ae("load",i);var c=!1,p=!1,x;for(x in o)if(o.hasOwnProperty(x)){var E=o[x];if(E!=null)switch(x){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Je(i,a,x,E,o,null)}}
vendor: 10,081 bytes, line 49
49p&&Je(i,a,"srcSet",o.srcSet,o,null),c&&Je(i,a,"src",o.src,o,null);return;case"input":Ae("invalid",i);var D=x=E=p=null,W=null,ct=null;for(c in o)if(o.hasOwnProperty(c)){var _t=o[c];if(_t!=null)switch(c){case"name":p=_t;break;case"type":E=_t;break;case"checked":W=_t;break;case"defaultChecked":ct=_t;break;case"value":x=_t;break;case"defaultValue":D=_t;break;case"children":case"dangerouslySetInnerHTML":if(_t!=null)throw Error(s(137,a));break;default:Je(i,a,c,_t,o,null)}}Ps(i,x,D,W,ct,E,p,!1);return;case"select":Ae("invalid",i),c=E=x=null;for(p in o)if(o.hasOwnProperty(p)&&(D=o[p],D!=null))switch(p){case"value":x=D;break;case"defaultValue":E=D;break;case"multiple":c=D;default:Je(i,a,p,D,o,null)}a=x,o=E,i.multiple=!!c,a!=null?Oi(i,!!c,a,!1):o!=null&&Oi(i,!!c,o,!0);return;case"textarea":Ae("invalid",i),x=p=c=null;for(E in o)if(o.hasOwnProperty(E)&&(D=o[E],D!=null))switch(E){case"value":c=D;break;case"defaultValue":p=D;break;case"children":x=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(s(91));break;default:Je(i,a,E,D,o,null)}Gn(i,c,p,x);return;case"option":for(W in o)if(o.hasOwnProperty(W)&&(c=o[W],c!=null))switch(W){case"selected":i.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Je(i,a,W,c,o,null)}return;case"dialog":Ae("beforetoggle",i),Ae("toggle",i),Ae("cancel",i),Ae("close",i);break;case"iframe":case"object":Ae("load",i);break;case"video":case"audio":for(c=0;c<cc.length;c++)Ae(cc[c],i);break;case"image":Ae("error",i),Ae("load",i);break;case"details":Ae("toggle",i);break;case"embed":case"source":case"link":Ae("error",i),Ae("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ct in o)if(o.hasOwnProperty(ct)&&(c=o[ct],c!=null))switch(ct){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Je(i,a,ct,c,o,null)}return;default:if(Ji(a)){for(_t in o)o.hasOwnProperty(_t)&&(c=o[_t],c!==void 0&&zp(i,a,_t,c,o,void 0));return}}for(D in o)o.hasOwnProperty(D)&&(c=o[D],c!=null&&Je(i,a,D,c,o,null))}function Bw(i,a,o,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,E=null,D=null,W=null,ct=null,_t=null;for(mt in o){var Mt=o[mt];if(o.hasOwnProperty(mt)&&Mt!=null)switch(mt){case"checked":break;case"value":break;case"defaultValue":W=Mt;default:c.hasOwnProperty(mt)||Je(i,a,mt,null,c,Mt)}}for(var dt in c){var mt=c[dt];if(Mt=o[dt],c.hasOwnProperty(dt)&&(mt!=null||Mt!=null))switch(dt){case"type":x=mt;break;case"name":p=mt;break;case"checked":ct=mt;break;case"defaultChecked":_t=mt;break;case"value":E=mt;break;case"defaultValue":D=mt;break;case"children":case"dangerouslySetInnerHTML":if(mt!=null)throw Error(s(137,a));break;default:mt!==Mt&&Je(i,a,dt,mt,c,Mt)}}Hn(i,E,D,W,ct,_t,x,p);return;case"select":mt=E=D=dt=null;for(x in o)if(W=o[x],o.hasOwnProperty(x)&&W!=null)switch(x){case"value":break;case"multiple":mt=W;default:c.hasOwnProperty(x)||Je(i,a,x,null,c,W)}for(p in c)if(x=c[p],W=o[p],c.hasOwnProperty(p)&&(x!=null||W!=null))switch(p){case"value":dt=x;break;case"defaultValue":D=x;break;case"multiple":E=x;default:x!==W&&Je(i,a,p,x,c,W)}a=D,o=E,c=mt,dt!=null?Oi(i,!!o,dt,!1):!!c!=!!o&&(a!=null?Oi(i,!!o,a,!0):Oi(i,!!o,o?[]:"",!1));return;case"textarea":mt=dt=null;for(D in o)if(p=o[D],o.hasOwnProperty(D)&&p!=null&&!c.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Je(i,a,D,null,c,p)}for(E in c)if(p=c[E],x=o[E],c.hasOwnProperty(E)&&(p!=null||x!=null))switch(E){case"value":dt=p;break;case"defaultValue":mt=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==x&&Je(i,a,E,p,c,x)}Xe(i,dt,mt);return;case"option":for(var Yt in o)if(dt=o[Yt],o.hasOwnProperty(Yt)&&dt!=null&&!c.hasOwnProperty(Yt))switch(Yt){case"selected":i.selected=!1;break;default:Je(i,a,Yt,null,c,dt)}for(W in c)if(dt=c[W],mt=o[W],c.hasOwnProperty(W)&&dt!==mt&&(dt!=null||mt!=null))switch(W){case"selected":i.selected=dt&&typeof dt!="function"&&typeof dt!="symbol";break;default:Je(i,a,W,dt,c,mt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in o)dt=o[oe],o.hasOwnProperty(oe)&&dt!=null&&!c.hasOwnProperty(oe)&&Je(i,a,oe,null,c,dt);for(ct in c)if(dt=c[ct],mt=o[ct],c.hasOwnProperty(ct)&&dt!==mt&&(dt!=null||mt!=null))switch(ct){case"children":case"dangerouslySetInnerHTML":if(dt!=null)throw Error(s(137,a));break;default:Je(i,a,ct,dt,c,mt)}return;default:if(Ji(a)){for(var $e in o)dt=o[$e],o.hasOwnProperty($e)&&dt!==void 0&&!c.hasOwnProperty($e)&&zp(i,a,$e,void 0,c,dt);for(_t in c)dt=c[_t],mt=o[_t],!c.hasOwnProperty(_t)||dt===mt||dt===void 0&&mt===void 0||zp(i,a,_t,dt,c,mt);return}}for(var tt in o)dt=o[tt],o.hasOwnProperty(tt)&&dt!=null&&!c.hasOwnProperty(tt)&&Je(i,a,tt,null,c,dt);for(Mt in c)dt=c[Mt],mt=o[Mt],!c.hasOwnProperty(Mt)||dt===mt||dt==null&&mt==null||Je(i,a,Mt,dt,c,mt)}function Q_(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vw(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,o=performance.getEntriesByType("resource"),c=0;c<o.length;c++){var p=o[c],x=p.transferSize,E=p.initiatorType,D=p.duration;if(x&&D&&Q_(E)){for(E=0,D=p.responseEnd,c+=1;c<o.length;c++){var W=o[c],ct=W.startTime;if(ct>D)break;var _t=W.transferSize,Mt=W.initiatorType;_t&&Q_(Mt)&&(W=W.responseEnd,E+=_t*(W<D?1:(D-ct)/(W-ct)))}if(--c,a+=8*(x+E)/(p.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Bp=null,Vp=null;function rf(i){return i.nodeType===9?i:i.ownerDocument}function J_(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $_(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function Hp(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var kp=null;function Hw(){var i=window.event;return i&&i.type==="popstate"?i===kp?!1:(kp=i,!0):(kp=null,!1)}var t1=typeof setTimeout=="function"?setTimeout:void 0,kw=typeof clearTimeout=="function"?clearTimeout:void 0,e1=typeof Promise=="function"?Promise:void 0,Gw=typeof queueMicrotask=="function"?queueMicrotask:typeof e1<"u"?function(i){return e1.resolve(null).then(i).catch(jw)}:t1;function jw(i){setTimeout(function(){throw i})}function Ba(i){return i==="head"}function n1(i,a){var o=a,c=0;do{var p=o.nextSibling;if(i.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(c===0){i.removeChild(p),Lo(a);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")fc(i.ownerDocument.documentElement);else if(o==="head"){o=i.ownerDocument.head,fc(o);for(var x=o.firstChild;x;){var E=x.nextSibling,D=x.nodeName;x[cr]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&x.rel.toLowerCase()==="stylesheet"||o.removeChild(x),x=E}}else o==="body"&&fc(i.ownerDocument.body);o=p}while(o);Lo(a)}function i1(i,a){var o=i;i=0;do{var c=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(i===0)break;i--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||i++;o=c}while(o)}function Gp(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Gp(o),Dl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}i.removeChild(o)}}function Ww(i,a,o,c){for(;i.nodeType===1;){var p=o;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(c){if(!i[cr])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(x=i.getAttribute("rel"),x==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(x!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(x=i.getAttribute("src"),(x!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===x)return i}else return i;if(i=ki(i.nextSibling),i===null)break}return null}function Xw(i,a,o){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=ki(i.nextSibling),i===null))return null;return i}function s1(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=ki(i.nextSibling),i===null))return null;return i}function jp(i){return i.data==="$?"||i.data==="$~"}function Wp(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function Yw(i,a){var o=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||o.readyState!=="loading")a();else{var c=function(){a(),o.removeEventListener("DOMContentLoaded",c)};o.addEventListener("DOMContentLoaded",c),i._reactRetry=c}}function ki(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;
vendor: 8,808 bytes, line 49
49if(a==="/$"||a==="/&")return null}}return i}var Xp=null;function a1(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var o=i.data;if(o==="/$"||o==="/&"){if(a===0)return ki(i.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}i=i.nextSibling}return null}function r1(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var o=i.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return i;a--}else o!=="/$"&&o!=="/&"||a++}i=i.previousSibling}return null}function o1(i,a,o){switch(a=rf(o),i){case"html":if(i=a.documentElement,!i)throw Error(s(452));return i;case"head":if(i=a.head,!i)throw Error(s(453));return i;case"body":if(i=a.body,!i)throw Error(s(454));return i;default:throw Error(s(451))}}function fc(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Dl(i)}var Gi=new Map,l1=new Set;function of(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Ks=V.d;V.d={f:qw,r:Zw,D:Kw,C:Qw,L:Jw,m:$w,X:e3,S:t3,M:n3};function qw(){var i=Ks.f(),a=Qu();return i||a}function Zw(i){var a=_a(i);a!==null&&a.tag===5&&a.type==="form"?Ty(a):Ks.r(i)}var Ro=typeof document>"u"?null:document;function c1(i,a,o){var c=Ro;if(c&&typeof a=="string"&&a){var p=pe(a);p='link[rel="'+i+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),l1.has(p)||(l1.add(p),i={rel:i,crossOrigin:o,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Zn(a,"link",i),N(a),c.head.appendChild(a)))}}function Kw(i){Ks.D(i),c1("dns-prefetch",i,null)}function Qw(i,a){Ks.C(i,a),c1("preconnect",i,a)}function Jw(i,a,o){Ks.L(i,a,o);var c=Ro;if(c&&i&&a){var p='link[rel="preload"][as="'+pe(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+pe(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+pe(o.imageSizes)+'"]')):p+='[href="'+pe(i)+'"]';var x=p;switch(a){case"style":x=Do(i);break;case"script":x=No(i)}Gi.has(x)||(i=m({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:i,as:a},o),Gi.set(x,i),c.querySelector(p)!==null||a==="style"&&c.querySelector(dc(x))||a==="script"&&c.querySelector(hc(x))||(a=c.createElement("link"),Zn(a,"link",i),N(a),c.head.appendChild(a)))}}function $w(i,a){Ks.m(i,a);var o=Ro;if(o&&i){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+pe(c)+'"][href="'+pe(i)+'"]',x=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=No(i)}if(!Gi.has(x)&&(i=m({rel:"modulepreload",href:i},a),Gi.set(x,i),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(hc(x)))return}c=o.createElement("link"),Zn(c,"link",i),N(c),o.head.appendChild(c)}}}function t3(i,a,o){Ks.S(i,a,o);var c=Ro;if(c&&i){var p=ba(c).hoistableStyles,x=Do(i);a=a||"default";var E=p.get(x);if(!E){var D={loading:0,preload:null};if(E=c.querySelector(dc(x)))D.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":a},o),(o=Gi.get(x))&&Yp(i,o);var W=E=c.createElement("link");N(W),Zn(W,"link",i),W._p=new Promise(function(ct,_t){W.onload=ct,W.onerror=_t}),W.addEventListener("load",function(){D.loading|=1}),W.addEventListener("error",function(){D.loading|=2}),D.loading|=4,lf(E,a,c)}E={type:"stylesheet",instance:E,count:1,state:D},p.set(x,E)}}}function e3(i,a){Ks.X(i,a);var o=Ro;if(o&&i){var c=ba(o).hoistableScripts,p=No(i),x=c.get(p);x||(x=o.querySelector(hc(p)),x||(i=m({src:i,async:!0},a),(a=Gi.get(p))&&qp(i,a),x=o.createElement("script"),N(x),Zn(x,"link",i),o.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function n3(i,a){Ks.M(i,a);var o=Ro;if(o&&i){var c=ba(o).hoistableScripts,p=No(i),x=c.get(p);x||(x=o.querySelector(hc(p)),x||(i=m({src:i,async:!0,type:"module"},a),(a=Gi.get(p))&&qp(i,a),x=o.createElement("script"),N(x),Zn(x,"link",i),o.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function u1(i,a,o,c){var p=(p=J.current)?of(p):null;if(!p)throw Error(s(446));switch(i){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Do(o.href),o=ba(p).hoistableStyles,c=o.get(a),c||(c={type:"style",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){i=Do(o.href);var x=ba(p).hoistableStyles,E=x.get(i);if(E||(p=p.ownerDocument||p,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(i,E),(x=p.querySelector(dc(i)))&&!x._p&&(E.instance=x,E.state.loading=5),Gi.has(i)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Gi.set(i,o),x||i3(p,i,o,E.state))),a&&c===null)throw Error(s(528,""));return E}if(a&&c!==null)throw Error(s(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=No(o),o=ba(p).hoistableScripts,c=o.get(a),c||(c={type:"script",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,i))}}function Do(i){return'href="'+pe(i)+'"'}function dc(i){return'link[rel="stylesheet"]['+i+"]"}function f1(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function i3(i,a,o,c){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=i.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Zn(a,"link",o),N(a),i.head.appendChild(a))}function No(i){return'[src="'+pe(i)+'"]'}function hc(i){return"script[async]"+i}function d1(i,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var c=i.querySelector('style[data-href~="'+pe(o.href)+'"]');if(c)return a.instance=c,N(c),c;var p=m({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return c=(i.ownerDocument||i).createElement("style"),N(c),Zn(c,"style",p),lf(c,o.precedence,i),a.instance=c;case"stylesheet":p=Do(o.href);var x=i.querySelector(dc(p));if(x)return a.state.loading|=4,a.instance=x,N(x),x;c=f1(o),(p=Gi.get(p))&&Yp(c,p),x=(i.ownerDocument||i).createElement("link"),N(x);var E=x;return E._p=new Promise(function(D,W){E.onload=D,E.onerror=W}),Zn(x,"link",c),a.state.loading|=4,lf(x,o.precedence,i),a.instance=x;case"script":return x=No(o.src),(p=i.querySelector(hc(x)))?(a.instance=p,N(p),p):(c=o,(p=Gi.get(x))&&(c=m({},o),qp(c,p)),i=i.ownerDocument||i,p=i.createElement("script"),N(p),Zn(p,"link",c),i.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,lf(c,o.precedence,i));return a.instance}function lf(i,a,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,x=p,E=0;E<c.length;E++){var D=c[E];if(D.dataset.precedence===a)x=D;else if(x!==p)break}x?x.parentNode.insertBefore(i,x.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(i,a.firstChild))}function Yp(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function qp(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var cf=null;function h1(i,a,o){if(cf===null){var c=new Map,p=cf=new Map;p.set(o,c)}else p=cf,c=p.get(o),c||(c=new Map,p.set(o,c));if(c.has(i))return c;for(c.set(i,null),o=o.getElementsByTagName(i),p=0;p<o.length;p++){var x=o[p];if(!(x[cr]||x[bn]||i==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var E=x.getAttribute(a)||"";E=i+E;var D=c.get(E);D?D.push(x):c.set(E,[x])}}return c}function p1(i,a,o){i=i.ownerDocument||i,i.head.insertBefore(o,a==="title"?i.querySelector("head > title"):null)}function s3(i,a,o){if(o===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function m1(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function a3(i,a,o,c){if(o.type==="stylesheet"&&(typeof c.media!="str
49ing"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Do(c.href),x=a.querySelector(dc(p));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=uf.bind(i),a.then(i,i)),o.state.loading|=4,o.instance=x,N(x);return}x=a.ownerDocument||a,c=f1(c),(p=Gi.get(p))&&Yp(c,p),x=x.createElement("link"),N(x);var E=x;E._p=new Promise(function(D,W){E.onload=D,E.onerror=W}),Zn(x,"link",c),o.instance=x}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(i.count++,o=uf.bind(i),a.addEventListener("load",o),a.addEventListener("error",o))}}var Zp=0;function r3(i,a){return i.stylesheets&&i.count===0&&df(i,i.stylesheets),0<i.count||0<i.imgCount?function(o){var c=setTimeout(function(){if(i.stylesheets&&df(i,i.stylesheets),i.unsuspend){var x=i.unsuspend;i.unsuspend=null,x()}},6e4+a);0<i.imgBytes&&Zp===0&&(Zp=62500*Vw());var p=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&df(i,i.stylesheets),i.unsuspend)){var x=i.unsuspend;i.unsuspend=null,x()}},(i.imgBytes>Zp?50:800)+a);return i.unsuspend=o,function(){i.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function uf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)df(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var ff=null;function df(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,ff=new Map,a.forEach(o3,i),ff=null,uf.call(i))}function o3(i,a){if(!(a.state.loading&4)){var o=ff.get(i);if(o)var c=o.get(null);else{o=new Map,ff.set(i,o);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var E=p[x];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(o.set(E.dataset.precedence,E),c=E)}c&&o.set(null,c)}p=a.instance,E=p.getAttribute("data-precedence"),x=o.get(E)||c,x===c&&o.set(null,p),o.set(E,p),this.count++,c=uf.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),x?x.parentNode.insertBefore(p,x.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),a.state.loading|=4}}var pc={$$typeof:C,Provider:null,Consumer:null,_currentValue:k,_currentValue2:k,_threadCount:0};function l3(i,a,o,c,p,x,E,D,W){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ee(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ee(0),this.hiddenUpdates=Ee(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function g1(i,a,o,c,p,x,E,D,W,ct,_t,Mt){return i=new l3(i,a,o,E,W,ct,_t,Mt,D),a=1,x===!0&&(a|=24),x=bi(3,null,null,a),i.current=x,x.stateNode=i,a=Ch(),a.refCount++,i.pooledCache=a,a.refCount++,x.memoizedState={element:c,isDehydrated:o,cache:a},Lh(x),i}function x1(i){return i?(i=oo,i):oo}function v1(i,a,o,c,p,x){p=x1(p),c.context===null?c.context=p:c.pendingContext=p,c=Ca(a),c.payload={element:o},x=x===void 0?null:x,x!==null&&(c.callback=x),o=Ra(i,c,a),o!==null&&(pi(o,i,a),Xl(o,i,a))}function y1(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var o=i.retryLane;i.retryLane=o!==0&&o<a?o:a}}function Kp(i,a){y1(i,a),(i=i.alternate)&&y1(i,a)}function _1(i){if(i.tag===13||i.tag===31){var a=pr(i,67108864);a!==null&&pi(a,i,67108864),Kp(i,67108864)}}function b1(i){if(i.tag===13||i.tag===31){var a=Ai();a=va(a);var o=pr(i,a);o!==null&&pi(o,i,a),Kp(i,a)}}var hf=!0;function c3(i,a,o,c){var p=I.T;I.T=null;var x=V.p;try{V.p=2,Qp(i,a,o,c)}finally{V.p=x,I.T=p}}function u3(i,a,o,c){var p=I.T;I.T=null;var x=V.p;try{V.p=8,Qp(i,a,o,c)}finally{V.p=x,I.T=p}}function Qp(i,a,o,c){if(hf){var p=Jp(c);if(p===null)Ip(i,a,c,pf,o),M1(i,c);else if(d3(p,i,a,o,c))c.stopPropagation();else if(M1(i,c),a&4&&-1<f3.indexOf(i)){for(;p!==null;){var x=_a(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var E=At(x.pendingLanes);if(E!==0){var D=x;for(D.pendingLanes|=2,D.entangledLanes|=2;E;){var W=1<<31-zt(E);D.entanglements[1]|=W,E&=~W}ms(x),(je&6)===0&&(Zu=A()+500,lc(0))}}break;case 31:case 13:D=pr(x,2),D!==null&&pi(D,x,2),Qu(),Kp(x,2)}if(x=Jp(c),x===null&&Ip(i,a,c,pf,o),x===p)break;p=x}p!==null&&c.stopPropagation()}else Ip(i,a,c,null,o)}}function Jp(i){return i=th(i),$p(i)}var pf=null;function $p(i){if(pf=null,i=ya(i),i!==null){var a=l(i);if(a===null)i=null;else{var o=a.tag;if(o===13){if(i=u(a),i!==null)return i;i=null}else if(o===31){if(i=f(a),i!==null)return i;i=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return pf=i,null}function S1(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 5,404 bytes, line 49
49:case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(K()){case yt:return 2;case Tt:return 8;case vt:case qt:return 32;case Nt:return 268435456;default:return 32}default:return 32}}var tm=!1,Va=null,Ha=null,ka=null,mc=new Map,gc=new Map,Ga=[],f3="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function M1(i,a){switch(i){case"focusin":case"focusout":Va=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":ka=null;break;case"pointerover":case"pointerout":mc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":gc.delete(a.pointerId)}}function xc(i,a,o,c,p,x){return i===null||i.nativeEvent!==x?(i={blockedOn:a,domEventName:o,eventSystemFlags:c,nativeEvent:x,targetContainers:[p]},a!==null&&(a=_a(a),a!==null&&_1(a)),i):(i.eventSystemFlags|=c,a=i.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),i)}function d3(i,a,o,c,p){switch(a){case"focusin":return Va=xc(Va,i,a,o,c,p),!0;case"dragenter":return Ha=xc(Ha,i,a,o,c,p),!0;case"mouseover":return ka=xc(ka,i,a,o,c,p),!0;case"pointerover":var x=p.pointerId;return mc.set(x,xc(mc.get(x)||null,i,a,o,c,p)),!0;case"gotpointercapture":return x=p.pointerId,gc.set(x,xc(gc.get(x)||null,i,a,o,c,p)),!0}return!1}function E1(i){var a=ya(i.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=u(o),a!==null){i.blockedOn=a,fs(i.priority,function(){b1(o)});return}}else if(a===31){if(a=f(o),a!==null){i.blockedOn=a,fs(i.priority,function(){b1(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){i.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}i.blockedOn=null}function mf(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var o=Jp(i.nativeEvent);if(o===null){o=i.nativeEvent;var c=new o.constructor(o.type,o);$d=c,o.target.dispatchEvent(c),$d=null}else return a=_a(o),a!==null&&_1(a),i.blockedOn=o,!1;a.shift()}return!0}function T1(i,a,o){mf(i)&&o.delete(a)}function h3(){tm=!1,Va!==null&&mf(Va)&&(Va=null),Ha!==null&&mf(Ha)&&(Ha=null),ka!==null&&mf(ka)&&(ka=null),mc.forEach(T1),gc.forEach(T1)}function gf(i,a){i.blockedOn===a&&(i.blockedOn=null,tm||(tm=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,h3)))}var xf=null;function A1(i){xf!==i&&(xf=i,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){xf===i&&(xf=null);for(var a=0;a<i.length;a+=3){var o=i[a],c=i[a+1],p=i[a+2];if(typeof c!="function"){if($p(c||o)===null)continue;break}var x=_a(o);x!==null&&(i.splice(a,3),a-=3,Jh(x,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function Lo(i){function a(W){return gf(W,i)}Va!==null&&gf(Va,i),Ha!==null&&gf(Ha,i),ka!==null&&gf(ka,i),mc.forEach(a),gc.forEach(a);for(var o=0;o<Ga.length;o++){var c=Ga[o];c.blockedOn===i&&(c.blockedOn=null)}for(;0<Ga.length&&(o=Ga[0],o.blockedOn===null);)E1(o),o.blockedOn===null&&Ga.shift();if(o=(i.ownerDocument||i).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var p=o[c],x=o[c+1],E=p[Vn]||null;if(typeof x=="function")E||A1(o);else if(E){var D=null;if(x&&x.hasAttribute("formAction")){if(p=x,E=x[Vn]||null)D=E.formAction;else if($p(p)!==null)continue}else D=E.action;typeof D=="function"?o[c+1]=D:(o.splice(c,3),c-=3),A1(o)}}}function w1(){function i(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(E){return p=E})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(o,20)}function o(){if(!c&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){c=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function em(i){this._internalRoot=i}vf.prototype.render=em.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(s(409));var o=a.current,c=Ai();
vendor: 4,509 bytes, line 49
49v1(o,c,i,a,null,null)},vf.prototype.unmount=em.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;v1(i.current,2,null,i,null,null),Qu(),a[Qi]=null}};function vf(i){this._internalRoot=i}vf.prototype.unstable_scheduleHydration=function(i){if(i){var a=Qr();i={blockedOn:null,target:i,priority:a};for(var o=0;o<Ga.length&&a!==0&&a<Ga[o].priority;o++);Ga.splice(o,0,i),o===0&&E1(i)}};var C1=t.version;if(C1!=="19.2.1")throw Error(s(527,C1,"19.2.1"));V.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(s(188)):(i=Object.keys(i).join(","),Error(s(268,i)));return i=d(a),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var p3={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yf.isDisabled&&yf.supportsFiber)try{Ct=yf.inject(p3),Rt=yf}catch{}}return yc.createRoot=function(i,a){if(!r(i))throw Error(s(299));var o=!1,c="",p=Oy,x=Fy,E=Iy;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError)),a=g1(i,1,!1,null,null,o,c,null,p,x,E,w1),i[Qi]=a.current,Fp(i),new em(a)},yc.hydrateRoot=function(i,a,o){if(!r(i))throw Error(s(299));var c=!1,p="",x=Oy,E=Fy,D=Iy,W=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(E=o.onCaughtError),o.onRecoverableError!==void 0&&(D=o.onRecoverableError),o.formState!==void 0&&(W=o.formState)),a=g1(i,1,!0,a,o??null,c,p,W,x,E,D,w1),a.context=x1(null),o=a.current,c=Ai(),c=va(c),p=Ca(c),p.callback=null,Ra(o,p,c),o=c,a.current.lanes=o,Ue(a,o),ms(a),i[Qi]=a.current,Fp(i),new vf(a)},yc.version="19.2.1",yc}var z1;function E3(){if(z1)return im.exports;z1=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),im.exports=M3(),im.exports}var T3=E3(),G=Pd();const Pt=jM(G),A3=g3({__proto__:null,default:Pt},[G]);var w3=(n,t,e,s,r,l,u,f)=>{let h=document.documentElement,d=["light","dark"];function g(_){(Array.isArray(n)?n:[n]).forEach(M=>{let T=M==="class",S=T&&l?r.map(b=>l[b]||b):r;T?(h.classList.remove(...S),h.classList.add(l&&l[_]?l[_]:_)):h.setAttribute(M,_)}),m(_)}function m(_){f&&d.includes(_)&&(h.style.colorScheme=_)}function v(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)g(s);else try{let _=localStorage.getItem(t)||e,M=u&&_==="system"?v():_;g(M)}catch{}},C3=G.createContext(void 0),R3={setTheme:n=>{},themes:[]},D3=()=>{var n;return(n=G.useContext(C3))!=null?n:R3};G.memo(({forcedTheme:n,storageKey:t,attribute:e,enableSystem:s,enableColorScheme:r,defaultTheme:l,value:u,themes:f,nonce:h,scriptProps:d})=>{let g=JSON.stringify([e,t,l,n,f,u,s,r]).slice(1,-1);return G.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?h:"",dangerouslySetInnerHTML:{__html:`(${w3.toString()})(${g})`}})});var Hg=WM();const N3=jM(Hg);function L3(n){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",t.appendChild(e),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}const P3=n=>{switch(n){case"success":return F3;case"info":return z3;case"warning":return I3;case"error":return B3;default:return null}},U3=Array(12).fill(0),O3=({visible:n,className:t})=>Pt.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":n},Pt.createElement("div",{className:"sonner-spinner"},U3.map((e,s)=>Pt.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),F3=Pt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Pt.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),I3=Pt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
49currentColor",height:"20",width:"20"},Pt.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z3=Pt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Pt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),B3=Pt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Pt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),V3=Pt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Pt.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Pt.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),H3=()=>{const[n,t]=Pt.useState(document.hidden);return Pt.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),n};let d0=1;class k3{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;const{message:s,...r}=t,l=typeof t?.id=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:d0++,u=this.toasts.find(h=>h.id===l),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...t,id:l,title:s}),{...h,...t,id:l,dismissible:f,title:s}):h):this.addToast({title:s,...r,dismissible:f,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:t,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let l=s!==void 0,u;const f=r.then(async d=>{if(u=["resolve",d],Pt.isValidElement(d))l=!1,this.create({id:s,type:"default",message:d});else if(j3(d)&&!d.ok){l=!1;const m=typeof e.error=="function"?await e.error(`HTTP error! status: ${d.status}`):e.error,v=typeof e.description=="function"?await e.description(`HTTP error! status: ${d.status}`):e.description,M=typeof m=="object"&&!Pt.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:v,...M})}else if(d instanceof Error){l=!1;const m=typeof e.error=="function"?await e.error(d):e.error,v=typeof e.description=="function"?await e.description(d):e.description,M=typeof m=="object"&&!Pt.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:v,...M})}else if(e.success!==void 0){l=!1;const m=typeof e.success=="function"?await e.success(d):e.success,v=typeof e.description=="function"?await e.description(d):e.description,M=typeof m=="object"&&!Pt.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:v,...M})}}).catch(async d=>{if(u=["reject",d],e.error!==void 0){l=!1;const g=typeof e.error=="function"?await e.error(d):e.error,m=typeof e.description=="function"?await e.description(d):e.description,_=typeof g=="object"&&!Pt.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:m,..._})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),h=()=>new Promise((d,g)=>f.then(()=>u[0]==="reject"?g(u[1]):d(u[1])).catch(g));
vendor: 772 bytes, line 49
49return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(t,e)=>{const s=e?.id||d0++;return this.create({jsx:t(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const gi=new k3,G3=(n,t)=>{const e=t?.id||d0++;return gi.addToast({title:n,...t,id:e}),e},j3=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",W3=G3,X3=()=>gi.toasts,Y3=()=>gi.getActiveToasts(),lm=Object.assign(W3,{success:gi.success,info:gi.info,warning:gi.warning,error:gi.error,custom:gi.custom,message:gi.message,promise:gi.promise,dismiss:gi.dismiss,loading:gi.loading},{getHistory:X3,getToasts:Y3});L3
vendor: 14,873 bytes, line 49
49("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
vendor: 582 bytes, line 49
49_f(n){return n.label!==void 0}const q3=3,Z3="24px",K3="16px",B1=4e3,Q3=356,J3=14,$3=45,tC=200;function gs(...n){return n.filter(Boolean).join(" ")}function eC(n){const[t,e]=n.split("-"),s=[];return t&&s.push(t),e&&s.push(e),s}const nC=n=>{var t,e,s,r,l,u,f,h,d;const{invert:g,toast:m,unstyled:v,interacting:_,setHeights:M,visibleToasts:T,heights:S,index:b,toasts:R,expanded:C,removeToast:P,defaultRichColors:U,closeButton:F,style:L,cancelButtonStyle:z,actionButtonStyle:w,className:O="",descriptionClassName:j="",duration:Q,position:Z,gap:rt,expandByDefault:ot,classNames:I,icons:V,
vendor: 14,605 bytes, line 49
49closeButtonAriaLabel:k="Close toast"}=n,[gt,xt]=Pt.useState(null),[B,at]=Pt.useState(null),[nt,pt]=Pt.useState(!1),[Et,J]=Pt.useState(!1),[it,bt]=Pt.useState(!1),[Ot,Ut]=Pt.useState(!1),[ae,Ce]=Pt.useState(!1),[ge,ye]=Pt.useState(0),[Ie,de]=Pt.useState(0),Ke=Pt.useRef(m.duration||Q||B1),X=Pt.useRef(null),Pe=Pt.useRef(null),Re=b===0,Be=b+1<=T,Ht=m.type,H=m.dismissible!==!1,A=m.className||"",K=m.descriptionClassName||"",yt=Pt.useMemo(()=>S.findIndex(ut=>ut.toastId===m.id)||0,[S,m.id]),Tt=Pt.useMemo(()=>{var ut;return(ut=m.closeButton)!=null?ut:F},[m.closeButton,F]),vt=Pt.useMemo(()=>m.duration||Q||B1,[m.duration,Q]),qt=Pt.useRef(0),Nt=Pt.useRef(0),Wt=Pt.useRef(0),ne=Pt.useRef(null),[Ct,Rt]=Z.split("-"),Gt=Pt.useMemo(()=>S.reduce((ut,wt,Qt)=>Qt>=yt?ut:ut+wt.height,0),[S,yt]),zt=H3(),Lt=m.invert||g,he=Ht==="loading";Nt.current=Pt.useMemo(()=>yt*rt+Gt,[yt,Gt]),Pt.useEffect(()=>{Ke.current=vt},[vt]),Pt.useEffect(()=>{pt(!0)},[]),Pt.useEffect(()=>{const ut=Pe.current;if(ut){const wt=ut.getBoundingClientRect().height;return de(wt),M(Qt=>[{toastId:m.id,height:wt,position:m.position},...Qt]),()=>M(Qt=>Qt.filter(xe=>xe.toastId!==m.id))}},[M,m.id]),Pt.useLayoutEffect(()=>{if(!nt)return;const ut=Pe.current,wt=ut.style.height;ut.style.height="auto";const Qt=ut.getBoundingClientRect().height;ut.style.height=wt,de(Qt),M(xe=>xe.find(Ue=>Ue.toastId===m.id)?xe.map(Ue=>Ue.toastId===m.id?{...Ue,height:Qt}:Ue):[{toastId:m.id,height:Qt,position:m.position},...xe])},[nt,m.title,m.description,M,m.id,m.jsx,m.action,m.cancel]);const Y=Pt.useCallback(()=>{J(!0),ye(Nt.current),M(ut=>ut.filter(wt=>wt.toastId!==m.id)),setTimeout(()=>{P(m)},tC)},[m,P,M,Nt]);Pt.useEffect(()=>{if(m.promise&&Ht==="loading"||m.duration===1/0||m.type==="loading")return;let ut;return C||_||zt?(()=>{if(Wt.current<qt.current){const xe=new Date().getTime()-qt.current;Ke.current=Ke.current-xe}Wt.current=new Date().getTime()})():(()=>{Ke.current!==1/0&&(qt.current=new Date().getTime(),ut=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Y()},Ke.current))})(),()=>clearTimeout(ut)},[C,_,m,Ht,zt,Y]),Pt.useEffect(()=>{m.delete&&(Y(),m.onDismiss==null||m.onDismiss.call(m,m))},[Y,m.delete]);function Ft(){var ut;if(V?.loading){var wt;return Pt.createElement("div",{className:gs(I?.loader,m==null||(wt=m.classNames)==null?void 0:wt.loader,"sonner-loader"),"data-visible":Ht==="loading"},V.loading)}return Pt.createElement(O3,{className:gs(I?.loader,m==null||(ut=m.classNames)==null?void 0:ut.loader),visible:Ht==="loading"})}const Dt=m.icon||V?.[Ht]||P3(Ht);var Bt,At;return Pt.createElement("li",{tabIndex:0,ref:Pe,className:gs(O,A,I?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,I?.default,I?.[Ht],m==null||(e=m.classNames)==null?void 0:e[Ht]),"data-sonner-toast":"","data-rich-colors":(Bt=m.richColors)!=null?Bt:U,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":nt,"data-promise":!!m.promise,"data-swiped":ae,"data-removed":Et,"data-visible":Be,"data-y-position":Ct,"data-x-position":Rt,"data-index":b,"data-front":Re,"data-swiping":it,"data-dismissible":H,"data-type":Ht,"data-invert":Lt,"data-swipe-out":Ot,"data-swipe-direction":B,"data-expanded":!!(C||ot&&nt),"data-testid":m.testId,style:{"--index":b,"--toasts-before":b,"--z-index":R.length-b,"--offset":`${Et?ge:Nt.current}px`,"--initial-height":ot?"auto":`${Ie}px`,...L,...m.style},onDragEnd:()=>{bt(!1),xt(null),ne.current=null},onPointerDown:ut=>{ut.button!==2&&(he||!H||(X.current=new Date,ye(Nt.current),ut.target.setPointerCapture(ut.pointerId),ut.target.tagName!=="BUTTON"&&(bt(!0),ne.current={x:ut.clientX,y:ut.clientY})))},onPointerUp:()=>{var ut,wt,Qt;if(Ot||!H)return;ne.current=null;const xe=Number(((ut=Pe.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ee=Number(((wt=Pe.current)==null?void 0:wt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ue=new Date().getTime()-((Qt=X.current)==null?void 0:Qt.getTime()),cn=gt==="x"?xe:Ee,Ls=Math.abs(cn)/Ue;if(Math.abs(cn)>=$3||Ls>.11){ye(Nt.current),m.onDismiss==null||m.onDismiss.call(m,m),at(gt==="x"?xe>0?"right":"left":Ee>0?"down":"up"),Y(),Ut(!0);return}else{var Bn,On;(Bn=Pe.current)==null||Bn.style.setProperty("--swipe-amount-x","0px"),(On=Pe.current)==null||On.style.setProperty("--swipe-amount-y","0px")}Ce(!1),bt(!1),xt(null)},onPointerMove:ut=>{var wt,Qt,xe;if(!ne.current||!H||((wt=window.getSelection())==null?void 0:wt.toString().length)>0)return;const Ue=ut.clientY-ne.current.y,cn=ut.clientX-ne.current.x;var Ls;const Bn=(Ls=n.swipeDirections)!=null?Ls:eC(Z);!gt&&(Math.abs(cn)>1||Math.abs(Ue)>1)&&xt(Math.abs(cn)>Math.abs(Ue)?"x":"y");let On={x:0,y:0};const va=li=>1/(1.5+Math.abs(li)/20);if(gt==="y"){if(Bn.includes("top")||Bn.includes("bottom"))if(Bn.includes("top")&&Ue<0||Bn.includes("bottom")&&Ue>0)On.y=Ue;else{const li=Ue*va(Ue);On.y=Math.abs(li)<Math.abs(Ue)?li:Ue}}else if(gt==="x"&&(Bn.includes("left")||Bn.includes("right")))if(Bn.includes("left")&&cn<0||Bn.includes("right")&&cn>0)On.x=cn;else{const li=cn*va(cn);On.x=Math.abs(li)<Math.abs(cn)?li:cn}(Math.abs(On.x)>0||Math.abs(On.y)>0)&&Ce(!0),(Qt=Pe.current)==null||Qt.style.setProperty("--swipe-amount-x",`${On.x}px`),(xe=Pe.current)==null||xe.style.setProperty("--swipe-amount-y",`${On.y}px`)}},Tt&&!m.jsx&&Ht!=="loading"?Pt.createElement("button",{"aria-label":k,"data-disabled":he,"data-close-button":!0,onClick:he||!H?()=>{}:()=>{Y(),m.onDismiss==null||m.onDismiss.call(m,m)},className:gs(I?.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(At=V?.close)!=null?At:V3):null,(Ht||m.icon||m.promise)&&m.icon!==null&&(V?.[Ht]!==null||m.icon)?Pt.createElement("div",{"data-icon":"",className:gs(I?.icon,m==null||(r=m.classNames)==null?void 0:r.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Ft():null,m.type!=="loading"?Dt:null):null,Pt.createElement("div",{"data-content":"",className:gs(I?.content,m==null||(l=m.classNames)==null?void 0:l.content)},Pt.createElement("div",{"data-title":"",className:gs(I?.title,m==null||(u=m.classNames)==null?void 0:u.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?Pt.createElement("div",{"data-description":"",className:gs(j,K,I?.description,m==null||(f=m.classNames)==null?void 0:f.description)},typeof m.description=="function"?m.description():m.description):null),Pt.isValidElement(m.cancel)?m.cancel:m.cancel&&_f(m.cancel)?Pt.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||z,onClick:ut=>{_f(m.cancel)&&H&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,ut),Y())},className:gs(I?.cancelButton,m==null||(h=m.classNames)==null?void 0:h.cancelButton)},m.cancel.label):null,Pt.isValidElement(m.action)?m.action:m.action&&_f(m.action)?Pt.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||w,onClick:ut=>{_f(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,ut),!ut.defaultPrevented&&Y())},className:gs(I?.actionButton,m==null||(d=m.classNames)==null?void 0:d.actionButton)},m.action.label):null)};function V1(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function iC(n,t){const e={};return[n,t].forEach((s,r)=>{const l=r===1,u=l?"--mobile-offset":"--offset",f=l?K3:Z3;function h(d){["top","right","bottom","left"].forEach(g=>{e[`${u}-${g}`]=typeof d=="number"?`${d}px`:d})}typeof s=="number"||typeof s=="string"?h(s):typeof s=="object"?["top","right","bottom","left"].forEach(d=>{s[d]===void 0?e[`${u}-${d}`]=f:e[`${u}-${d}`]=typeof s[d]=="number"?`${s[d]}px`:s[d]}):h(f)}),e}const sC=Pt.forwardRef(function(t,e){const{id:s,invert:r,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:h,className:d,offset:g,mobileOffset:m,theme:v="light",richColors:_,duration:M,style:T,visibleToasts:S=q3,toastOptions:b,dir:R=V1(),gap:C=J3,icons:P,containerAriaLabel:U="Notifications"}=t,[F,L]=Pt.useState([]),z=Pt.useMemo(()=>s?F.filter(nt=>nt.toasterId===s):F.filter(nt=>!nt.toasterId),[F,s]),w=Pt.useMemo(()=>Array.from(new Set([l].concat(z.filter(nt=>nt.position).map(nt=>nt.position)))),[z,l]),[O,j]=Pt.useState([]),[Q,Z]=Pt.useState(!1),[rt,ot]=Pt.useState(!1),[I,V]=Pt.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=Pt.useRef(null),gt=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),xt=Pt.useRef(null),B=Pt.useRef(!1),at=Pt.useCallback(nt=>{L(pt=>{var Et;return(Et=pt.find(J=>J.id===nt.id))!=null&&Et.delete||gi.dismiss(nt.id),pt.filter(({id:J})=>J!==nt.id)})},[]);return Pt.useEffect(()=>gi.subscribe(nt=>{if(nt.dismiss){requestAnimationFrame(()=>{L(pt=>pt.map(Et=>Et.id===nt.id?{...Et,delete:!0}:Et))});return}setTimeout(()=>{N3.flushSync(()=>{L(pt=>{const Et=pt.findIndex(J=>J.id===nt.id);return Et!==-1?[...pt.slice(0,Et),{...pt[Et],...nt},...pt.slice(Et+1)]:[nt,...pt]})})})}),[F]),Pt.useEffect(()=>{if(v!=="system"){V(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const nt=window.matchMedia("(prefers-color-scheme: dark)");try{nt.addEventListener("change",({matches:pt})=>{V(pt?"dark":"light")})}catch{nt.addListener(({matches:Et})=>{try{V(Et?"dark":"light")}catch(J){console.error(J)}})}},[v]),Pt.useEffect(()=>{F.length<=1&&Z(!1)},[F]),Pt.useEffect(()=>{const nt=pt=>{var Et;if(u.every(bt=>pt[bt]||pt.code===bt)){var it;Z(!0),(it=k.current)==null||it.focus()}pt.code==="Escape"&&(document.activeElement===k.current||(Et=k.current)!=null&&Et.contains(document.activeElement))&&Z(!1)};return document.addEventListener("keydown",nt),()=>document.removeEventListener("keydown",nt)},[u]),Pt.useEffect(()=>{if(k.current)return()=>{xt.current&&(xt.current.focus({preventScroll:!0}),xt.current=null,B.current=!1)}},[k.current]),Pt.createElement("section",{ref:e,"aria-label":`${U} ${gt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},w.map((nt,pt)=>{var Et;const[J,it]=nt.split("-");return z.length?Pt.createElement("ol",{key:nt,dir:R==="auto"?V1():R,tabIndex:-1,ref:k,className:d,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":J,"data-x-position":it,style:{"--front-toast-height":`${((Et=O[0])==null?void 0:Et.height)||0}px`,"--width":`${Q3}px`,"--gap":`${C}px`,...T,...iC(g,m)},onBlur:bt=>{B.current&&!bt.currentTarget.contains(bt.relatedTarget)&&(B.current=!1,xt.current&&(xt.current.focus({preventScroll:!0}),xt.current=null))},onFocus:bt=>{bt.target instanceof HTMLElement&&bt.target.dataset.dismissible==="false"||B.current||(B.current=!0,xt.current=bt.relatedTarget)},onMouseEnter:()=>Z(!0),onMouseMove:()=>Z(!0),onMouseLeave:()=>{rt||Z(!1)},onDragEnd:()=>Z(!1),onPointerDown:bt=>{bt.target instanceof HTMLElement&&bt.target.dataset.dismissible==="false"||ot(!0)},onPointerUp:()=>ot(!1)},z.filter(bt=>!bt.position&&pt===0||bt.position===nt).map((bt,Ot)=>{var Ut,ae;return Pt.createElement(nC,{key:bt.id,icons:P,index:Ot,toast:bt,defaultRichColors:_,duration:(Ut=b?.duration)!=null?Ut:M,className:b?.className,descriptionClassName:b?.descriptionClassName,invert:r,visibleToasts:S,closeButton:(ae=b?.closeButton)!=null?ae:h,interacting:rt,position:nt,style:b?.style,unstyled:b?.unstyled,classNames:b?.classNames,cancelButtonStyle:b?.cancelButtonStyle,actionButtonStyle:b?.actionButtonStyle,closeButtonAriaLabel:b?.closeButtonAriaLabel,removeToast:at,toasts:z.filter(Ce=>Ce.position==bt.position),heights:O.filter(Ce=>Ce.position==bt.position),setHeights:j,expandByDefault:f,gap:C,expanded:Q,swipeDirections:t.swipeDirections})})):null}))}),aC=({...n})=>{const{theme:t="system"}=D3();return y.jsx(sC,{"data-loc":"client/src/components/ui/sonner.tsx:8",theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...n})};function aa(n,t,{checkForDefaultPrevented:e=!0}={}){return function(r){if(n?.(r),e===!1||!r.defaultPrevented)return t?.(r)}}function H1(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function XM(...n){return t=>{let e=!1;const s=n.map(r=>{const l=H1(r,t);return!e&&typeof l=="function"&&(e=!0),l});if(e)return()=>{for(let r=0;r<s.length;r++){const l=s[r];typeof l=="function"?l():H1(n[r],null)}}}}function qr(...n){return G.useCallback(XM(...n),n)}function YM(n,t=[]){let e=[];function s(l,u){const f=G.createContext(u),h=e.length;e=[...e,u];const d=m=>{const{scope:v,children:_,...M}=m,T=v?.[n]?.[h]||f,S=G.useMemo(()=>M,Object.values(M));return y.jsx(T.Provider,{value:S,children:_})};d.displayName=l+"Provider";function g(m,v){const _=v?.[n]?.[h]||f,M=G.useContext(_);if(M)return M;if(u!==void 0)return u;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[d,g]}const r=()=>{const l=e.map(u=>G.createContext(u));return function(f){const h=f?.[n]||l;return G.useMemo(()=>({[`__scope${n}`]:{...f,[n]:h}}),[f,h])}};return r.scopeName=n,[s,rC(r,...t)]}function rC(...n){const t=n[0];if(n.length===1)return t;const e=()=>{const s=n.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){const u=s.reduce((f,{useScope:h,scopeName:d})=>{const m=h(l)[`__scope${d}`];return{...f,...m}},{});return G.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return e.scopeName=t.scopeName,e}function qM(n){const t=lC(n),e=G.forwardRef((s,r)=>{const{children:l,...u}=s,f=G.Children.toArray(l),h=f.find(uC);if(h){const d=h.props.children,g=f.map(m=>m===h?G.Children.count(d)>1?G.Children.only(null):G.isValidElement(d)?d.props.children:null:m);return y.jsx(t,{...u,ref:r,children:G.isValidElement(d)?G.cloneElement(d,void 0,g):null})}return y.jsx(t,{...u,ref:r,children:l})});return e.displayName=`${n}.Slot`,e}var oC=qM("Slot");function lC(n){const t=G.forwardRef((e,s)=>{const{children:r,...l}=e;if(G.isValidElement(r)){const u=dC(r),f=fC(l,r.props);return r.type!==G.Fragment&&(f.ref=s?XM(s,u):u),G.cloneElement(r,f)}return G.Children.count(r)>1?G.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var ZM=Symbol("radix.slottable");function cC(n){const t=({children:e})=>y.jsx(y.Fragment,{children:e});return t.displayName=`${n}.Slottable`,t.__radixId=ZM,t}function uC(n){return G.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===ZM}function fC(n,t){const e={...t};for(const s in t){const r=n[s],l=t[s];/^on[A-Z]/.test(s)?r&&l?e[s]=(...f)=>{const h=l(...f);return r(...f),h}:r&&(e[s]=r):s==="style"?e[s]={...r,...l}
vendor: 4,573 bytes, line 49
49:s==="className"&&(e[s]=[r,l].filter(Boolean).join(" "))}return{...n,...e}}function dC(n){let t=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning;return e?n.ref:(t=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning,e?n.props.ref:n.props.ref||n.ref)}var hC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zr=hC.reduce((n,t)=>{const e=qM(`Primitive.${t}`),s=G.forwardRef((r,l)=>{const{asChild:u,...f}=r,h=u?e:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(h,{...f,ref:l})});return s.displayName=`Primitive.${t}`,{...n,[t]:s}},{});function pC(n,t){n&&Hg.flushSync(()=>n.dispatchEvent(t))}function Ud(n){const t=G.useRef(n);return G.useEffect(()=>{t.current=n}),G.useMemo(()=>(...e)=>t.current?.(...e),[])}function mC(n,t=globalThis?.document){const e=Ud(n);G.useEffect(()=>{const s=r=>{r.key==="Escape"&&e(r)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[e,t])}var gC="DismissableLayer",h0="dismissableLayer.update",xC="dismissableLayer.pointerDownOutside",vC="dismissableLayer.focusOutside",k1,KM=G.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),QM=G.forwardRef((n,t)=>{const{disableOutsidePointerEvents:e=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:l,onInteractOutside:u,onDismiss:f,...h}=n,d=G.useContext(KM),[g,m]=G.useState(null),v=g?.ownerDocument??globalThis?.document,[,_]=G.useState({}),M=qr(t,L=>m(L)),T=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=T.indexOf(S),R=g?T.indexOf(g):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,P=R>=b,U=bC(L=>{const z=L.target,w=[...d.branches].some(O=>O.contains(z));!P||w||(r?.(L),u?.(L),L.defaultPrevented||f?.())},v),F=SC(L=>{const z=L.target;[...d.branches].some(O=>O.contains(z))||(l?.(L),u?.(L),L.defaultPrevented||f?.())},v);return mC(L=>{R===d.layers.size-1&&(s?.(L),!L.defaultPrevented&&f&&(L.preventDefault(),f()))},v),G.useEffect(()=>{if(g)return e&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(k1=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(g)),d.layers.add(g),G1(),()=>{e&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=k1)}},[g,v,e,d]),G.useEffect(()=>()=>{g&&(d.layers.delete(g),d.layersWithOutsidePointerEventsDisabled.delete(g),G1())},[g,d]),G.useEffect(()=>{const L=()=>_({});return document.addEventListener(h0,L),()=>document.removeEventListener(h0,L)},[]),y.jsx(Zr.div,{...h,ref:M,style:{pointerEvents:C?P?"auto":"none":void 0,...n.style},onFocusCapture:aa(n.onFocusCapture,F.onFocusCapture),onBlurCapture:aa(n.onBlurCapture,F.onBlurCapture),onPointerDownCapture:aa(n.onPointerDownCapture,U.onPointerDownCapture)})});QM.displayName=gC;var yC="DismissableLayerBranch",_C=G.forwardRef((n,t)=>{const e=G.useContext(KM),s=G.useRef(null),r=qr(t,s);return G.useEffect(()=>{const l=s.current;if(l)return e.branches.add(l),()=>{e.branches.delete(l)}},[e.branches]),y.jsx(Zr.div,{...n,ref:r})});_C.displayName=yC;function bC(n,t=globalThis?.document){const e=Ud(n),s=G.useRef(!1),r=G.useRef(()=>{});return G.useEffect(()=>{const l=f=>{if(f.target&&!s.current){let h=function(){JM(xC,e,d,{discrete:!0})};const d={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=h,t.addEventListener("click",r.current,{once:!0})):h()}else t.removeEventListener("click",r.current);s.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",r.current)}},[t,e]),{onPointerDownCapture:()=>s.current=!0}}function SC(n,t=globalThis?.document){const e=Ud(n),s=G.useRef(!1);return G.useEffect(()=>{const r=l=>{l.target&&!s.current&&JM(vC,e,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,e]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function G1(){const n=new CustomEvent(h0);document.dispatchEvent(n)}function JM(n,t,e,{discrete:s}){const r=e.originalEvent.target,l=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:e});t&&r.addEventListener(n,t,{once:!0}),s?pC(r,l):r.dispatchEvent(l)}var Hc=globalThis?.document?G.useLayoutEffect:()=>{};const MC=["top","right","bottom","left"],ir=Math.min,Ri=Math.max,gd=Math.round,bf=Math.floor,Ms=n=>({x:n,y:n}
vendor: 16,134 bytes, line 49
49),EC={left:"right",right:"left",bottom:"top",top:"bottom"},TC={start:"end",end:"start"};function p0(n,t,e){return Ri(n,ir(t,e))}function ua(n,t){return typeof n=="function"?n(t):n}function fa(n){return n.split("-")[0]}function yl(n){return n.split("-")[1]}function kg(n){return n==="x"?"y":"x"}function Gg(n){return n==="y"?"height":"width"}const AC=new Set(["top","bottom"]);function _s(n){return AC.has(fa(n))?"y":"x"}function jg(n){return kg(_s(n))}function wC(n,t,e){e===void 0&&(e=!1);const s=yl(n),r=jg(n),l=Gg(r);let u=r==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=xd(u)),[u,xd(u)]}function CC(n){const t=xd(n);return[m0(n),t,m0(t)]}function m0(n){return n.replace(/start|end/g,t=>TC[t])}const j1=["left","right"],W1=["right","left"],RC=["top","bottom"],DC=["bottom","top"];function NC(n,t,e){switch(n){case"top":case"bottom":return e?t?W1:j1:t?j1:W1;case"left":case"right":return t?RC:DC;default:return[]}}function LC(n,t,e,s){const r=yl(n);let l=NC(fa(n),e==="start",s);return r&&(l=l.map(u=>u+"-"+r),t&&(l=l.concat(l.map(m0)))),l}function xd(n){return n.replace(/left|right|bottom|top/g,t=>EC[t])}function PC(n){return{top:0,right:0,bottom:0,left:0,...n}}function $M(n){return typeof n!="number"?PC(n):{top:n,right:n,bottom:n,left:n}}function vd(n){const{x:t,y:e,width:s,height:r}=n;return{width:s,height:r,top:e,left:t,right:t+s,bottom:e+r,x:t,y:e}}function X1(n,t,e){let{reference:s,floating:r}=n;const l=_s(t),u=jg(t),f=Gg(u),h=fa(t),d=l==="y",g=s.x+s.width/2-r.width/2,m=s.y+s.height/2-r.height/2,v=s[f]/2-r[f]/2;let _;switch(h){case"top":_={x:g,y:s.y-r.height};break;case"bottom":_={x:g,y:s.y+s.height};break;case"right":_={x:s.x+s.width,y:m};break;case"left":_={x:s.x-r.width,y:m};break;default:_={x:s.x,y:s.y}}switch(yl(t)){case"start":_[u]-=v*(e&&d?-1:1);break;case"end":_[u]+=v*(e&&d?-1:1);break}return _}const UC=async(n,t,e)=>{const{placement:s="bottom",strategy:r="absolute",middleware:l=[],platform:u}=e,f=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let d=await u.getElementRects({reference:n,floating:t,strategy:r}),{x:g,y:m}=X1(d,s,h),v=s,_={},M=0;for(let T=0;T<f.length;T++){const{name:S,fn:b}=f[T],{x:R,y:C,data:P,reset:U}=await b({x:g,y:m,initialPlacement:s,placement:v,strategy:r,middlewareData:_,rects:d,platform:u,elements:{reference:n,floating:t}});g=R??g,m=C??m,_={..._,[S]:{..._[S],...P}},U&&M<=50&&(M++,typeof U=="object"&&(U.placement&&(v=U.placement),U.rects&&(d=U.rects===!0?await u.getElementRects({reference:n,floating:t,strategy:r}):U.rects),{x:g,y:m}=X1(d,v,h)),T=-1)}return{x:g,y:m,placement:v,strategy:r,middlewareData:_}};async function kc(n,t){var e;t===void 0&&(t={});const{x:s,y:r,platform:l,rects:u,elements:f,strategy:h}=n,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:v=!1,padding:_=0}=ua(t,n),M=$M(_),S=f[v?m==="floating"?"reference":"floating":m],b=vd(await l.getClippingRect({element:(e=await(l.isElement==null?void 0:l.isElement(S)))==null||e?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:d,rootBoundary:g,strategy:h})),R=m==="floating"?{x:s,y:r,width:u.floating.width,height:u.floating.height}:u.reference,C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),P=await(l.isElement==null?void 0:l.isElement(C))?await(l.getScale==null?void 0:l.getScale(C))||{x:1,y:1}:{x:1,y:1},U=vd(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:R,offsetParent:C,strategy:h}):R);return{top:(b.top-U.top+M.top)/P.y,bottom:(U.bottom-b.bottom+M.bottom)/P.y,left:(b.left-U.left+M.left)/P.x,right:(U.right-b.right+M.right)/P.x}}const OC=n=>({name:"arrow",options:n,async fn(t){const{x:e,y:s,placement:r,rects:l,platform:u,elements:f,middlewareData:h}=t,{element:d,padding:g=0}=ua(n,t)||{};if(d==null)return{};const m=$M(g),v={x:e,y:s},_=jg(r),M=Gg(_),T=await u.getDimensions(d),S=_==="y",b=S?"top":"left",R=S?"bottom":"right",C=S?"clientHeight":"clientWidth",P=l.reference[M]+l.reference[_]-v[_]-l.floating[M],U=v[_]-l.reference[_],F=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d));let L=F?F[C]:0;(!L||!await(u.isElement==null?void 0:u.isElement(F)))&&(L=f.floating[C]||l.floating[M]);const z=P/2-U/2,w=L/2-T[M]/2-1,O=ir(m[b],w),j=ir(m[R],w),Q=O,Z=L-T[M]-j,rt=L/2-T[M]/2+z,ot=p0(Q,rt,Z),I=!h.arrow&&yl(r)!=null&&rt!==ot&&l.reference[M]/2-(rt<Q?O:j)-T[M]/2<0,V=I?rt<Q?rt-Q:rt-Z:0;return{[_]:v[_]+V,data:{[_]:ot,centerOffset:rt-ot-V,...I&&{alignmentOffset:V}},reset:I}}}),FC=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,s;const{placement:r,middlewareData:l,rects:u,initialPlacement:f,platform:h,elements:d}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:T=!0,...S}=ua(n,t);if((e=l.arrow)!=null&&e.alignmentOffset)return{};const b=fa(r),R=_s(f),C=fa(f)===f,P=await(h.isRTL==null?void 0:h.isRTL(d.floating)),U=v||(C||!T?[xd(f)]:CC(f)),F=M!=="none";!v&&F&&U.push(...LC(f,T,M,P));const L=[f,...U],z=await kc(t,S),w=[];let O=((s=l.flip)==null?void 0:s.overflows)||[];if(g&&w.push(z[b]),m){const rt=wC(r,u,P);w.push(z[rt[0]],z[rt[1]])}if(O=[...O,{placement:r,overflows:w}],!w.every(rt=>rt<=0)){var j,Q;const rt=(((j=l.flip)==null?void 0:j.index)||0)+1,ot=L[rt];if(ot&&(!(m==="alignment"?R!==_s(ot):!1)||O.every(k=>_s(k.placement)===R?k.overflows[0]>0:!0)))return{data:{index:rt,overflows:O},reset:{placement:ot}};let I=(Q=O.filter(V=>V.overflows[0]<=0).sort((V,k)=>V.overflows[1]-k.overflows[1])[0])==null?void 0:Q.placement;if(!I)switch(_){case"bestFit":{var Z;const V=(Z=O.filter(k=>{if(F){const gt=_s(k.placement);return gt===R||gt==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(gt=>gt>0).reduce((gt,xt)=>gt+xt,0)]).sort((k,gt)=>k[1]-gt[1])[0])==null?void 0:Z[0];V&&(I=V);break}case"initialPlacement":I=f;break}if(r!==I)return{reset:{placement:I}}}return{}}}};function Y1(n,t){return{top:n.top-t.height,right:n.right-t.width,bottom:n.bottom-t.height,left:n.left-t.width}}function q1(n){return MC.some(t=>n[t]>=0)}const IC=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(t){const{rects:e}=t,{strategy:s="referenceHidden",...r}=ua(n,t);switch(s){case"referenceHidden":{const l=await kc(t,{...r,elementContext:"reference"}),u=Y1(l,e.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:q1(u)}}}case"escaped":{const l=await kc(t,{...r,altBoundary:!0}),u=Y1(l,e.floating);return{data:{escapedOffsets:u,escaped:q1(u)}}}default:return{}}}}},tE=new Set(["left","top"]);async function zC(n,t){const{placement:e,platform:s,elements:r}=n,l=await(s.isRTL==null?void 0:s.isRTL(r.floating)),u=fa(e),f=yl(e),h=_s(e)==="y",d=tE.has(u)?-1:1,g=l&&h?-1:1,m=ua(t,n);let{mainAxis:v,crossAxis:_,alignmentAxis:M}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return f&&typeof M=="number"&&(_=f==="end"?M*-1:M),h?{x:_*g,y:v*d}:{x:v*d,y:_*g}}const BC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,s;const{x:r,y:l,placement:u,middlewareData:f}=t,h=await zC(t,n);return u===((e=f.offset)==null?void 0:e.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:r+h.x,y:l+h.y,data:{...h,placement:u}}}}},VC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:e,y:s,placement:r}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:f={fn:S=>{let{x:b,y:R}=S;return{x:b,y:R}}},...h}=ua(n,t),d={x:e,y:s},g=await kc(t,h),m=_s(fa(r)),v=kg(m);let _=d[v],M=d[m];if(l){const S=v==="y"?"top":"left",b=v==="y"?"bottom":"right",R=_+g[S],C=_-g[b];_=p0(R,_,C)}if(u){const S=m==="y"?"top":"left",b=m==="y"?"bottom":"right",R=M+g[S],C=M-g[b];M=p0(R,M,C)}const T=f.fn({...t,[v]:_,[m]:M});return{...T,data:{x:T.x-e,y:T.y-s,enabled:{[v]:l,[m]:u}}}}}},HC=function(n){return n===void 0&&(n={}),{options:n,fn(t){const{x:e,y:s,placement:r,rects:l,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:d=!0}=ua(n,t),g={x:e,y:s},m=_s(r),v=kg(m);let _=g[v],M=g[m];const T=ua(f,t),S=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(h){const C=v==="y"?"height":"width",P=l.reference[v]-l.floating[C]+S.mainAxis,U=l.reference[v]+l.reference[C]-S.mainAxis;_<P?_=P:_>U&&(_=U)}if(d){var b,R;const C=v==="y"?"width":"height",P=tE.has(fa(r)),U=l.reference[m]-l.floating[C]+(P&&((b=u.offset)==null?void 0:b[m])||0)+(P?0:S.crossAxis),F=l.reference[m]+l.reference[C]+(P?0:((R=u.offset)==null?void 0:R[m])||0)-(P?S.crossAxis:0);M<U?M=U:M>F&&(M=F)}return{[v]:_,[m]:M}}}},kC=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){var e,s;const{placement:r,rects:l,platform:u,elements:f}=t,{apply:h=()=>{},...d}=ua(n,t),g=await kc(t,d),m=fa(r),v=yl(r),_=_s(r)==="y",{width:M,height:T}=l.floating;let S,b;m==="top"||m==="bottom"?(S=m,b=v===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(b=m,S=v==="end"?"top":"bottom");const R=T-g.top-g.bottom,C=M-g.left-g.right,P=ir(T-g[S],R),U=ir(M-g[b],C),F=!t.middlewareData.shift;let L=P,z=U;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(z=C),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(L=R),F&&!v){const O=Ri(g.left,0),j=Ri(g.right,0),Q=Ri(g.top,0),Z=Ri(g.bottom,0);_?z=M-2*(O!==0||j!==0?O+j:Ri(g.left,g.right)):L=T-2*(Q!==0||Z!==0?Q+Z:Ri(g.top,g.bottom))}await h({...t,availableWidth:z,availableHeight:L});const w=await u.getDimensions(f.floating);return M!==w.width||T!==w.height?{reset:{rects:!0}}:{}}}};function Od(){return typeof window<"u"}function _l(n){return eE(n)?(n.nodeName||"").toLowerCase():"#document"}function Li(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Ns(n){var t;return(t=(eE(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function eE(n){return Od()?n instanceof Node||n instanceof Li(n).Node:!1}function cs(n){return Od()?n instanceof Element||n instanceof Li(n).Element:!1}function Cs(n){return Od()?n instanceof HTMLElement||n instanceof Li(n).HTMLElement:!1}function Z1(n){return!Od()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Li(n).ShadowRoot}const GC=new Set(["inline","contents"]);function eu(n){const{overflow:t,overflowX:e,overflowY:s,display:r}=us(n);return/auto|scroll|overlay|hidden|clip/.test(t+s+e)&&!GC.has(r)}const jC=new Set(["table","td","th"]);function WC(n){return jC.has(_l(n))}const XC=[":popover-open",":modal"];function Fd(n){return XC.some(t=>{try{return n.matches(t)}catch{return!1}})}const YC=["transform","translate","scale","rotate","perspective"],qC=["transform","translate","scale","rotate","perspective","filter"],ZC=["paint","layout","strict","content"];function Wg(n){const t=Xg(),e=cs(n)?us(n):n;return YC.some(s=>e[s]?e[s]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||qC.some(s=>(e.willChange||"").includes(s))||ZC.some(s=>(e.contain||"").includes(s))}function KC(n){let t=sr(n);for(;Cs(t)&&!ul(t);){if(Wg(t))return t;if(Fd(t))return null;t=sr(t)}return null}function Xg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const QC=new Set(["html","body","#document"]);function ul(n){return QC.has(_l(n))}function us(n){return Li(n).getComputedStyle(n)}function Id(n){return cs(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function sr(n){if(_l(n)==="html")return n;const t=n.assignedSlot||n.parentNode||Z1(n)&&n.host||Ns(n);return Z1(t)?t.host:t}function nE(n){const t=sr(n);return ul(t)?n.ownerDocument?n.ownerDocument.body:n.body:Cs(t)&&eu(t)?t:nE(t)}function Gc(n,t,e){var s;t===void 0&&(t=[]),e===void 0&&(e=!0);const r=nE(n),l=r===((s=n.ownerDocument)==null?void 0:s.body),u=Li(r);if(l){const f=g0(u);return t.concat(u,u.visualViewport||[],eu(r)?r:[],f&&e?Gc(f):[])}return t.concat(r,Gc(r,[],e))}function g0(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function iE(n){const t=us(n);let e=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const r=Cs(n),l=r?n.offsetWidth:e,u=r?n.offsetHeight:s,f=gd(e)!==l||gd(s)!==u;return f&&(e=l,s=u),{width:e,height:s,$:f}}function Yg(n){return cs(n)?n:n.contextElement}function al(n){const t=Yg(n);if(!Cs(t))return Ms(1);const e=t.getBoundingClientRect(),{width:s,height:r,$:l}=iE(t);let u=(l?gd(e.width):e.width)/s,f=(l?gd(e.height):e.height)/r;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const JC=Ms(0);function sE(n){const t=Li(n);return!Xg()||!t.visualViewport?JC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $C(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==Li(n)?!1:t}function Wr(n,t,e,s){t===void 0&&(t=!1),e===void 0&&(e=!1);const r=n.getBoundingClientRect(),l=Yg(n);let u=Ms(1);t&&(s?cs(s)&&(u=al(s)):u=al(n));const f=$C(l,e,s)?sE(l):Ms(0);let h=(r.left+f.x)/u.x,d=(r.top+f.y)/u.y,g=r.width/u.x,m=r.height/u.y;if(l){const v=Li(l),_=s&&cs(s)?Li(s):s;let M=v,T=g0(M);for(;T&&s&&_!==M;){const S=al(T),b=T.getBoundingClientRect(),R=us(T),C=b.left+(T.clientLeft+parseFloat(R.paddingLeft))*S.x,P=b.top+(T.clientTop+parseFloat(R.paddingTop))*S.y;h*=S.x,d*=S.y,g*=S.x,m*=S.y,h+=C,d+=P,M=Li(T),T=g0(M)}}return vd({width:g,height:m,x:h,y:d})}function zd(n,t){const e=Id(n).scrollLeft;return t?t.left+e:Wr(Ns(n)).left+e}function aE(n,t){const e=n.getBoundingClientRect(),s=e.left+t.scrollLeft-zd(n,e),r=e.top+t.scrollTop;return{x:s,y:r}}function tR(n){let{elements:t,rect:e,offsetParent:s,strategy:r}=n;const l=r==="fixed",u=Ns(s),f=t?Fd(t.floating):!1;if(s===u||f&&l)return e;let h={scrollLeft:0,scrollTop:0},d=Ms(1);const g=Ms(0),m=Cs(s);if((m||!m&&!l)&&((_l(s)!=="body"||eu(u))&&(h=Id(s)),Cs(s))){const _=Wr(s);d=al(s),g.x=_.x+s.clientLeft,g.y=_.y+s.clientTop}const v=u&&!m&&!l?aE(u,h):Ms(0);return{width:e.width*d.x,height:e.height*d.y,x:e.x*d.x-h.scrollLeft*d.x+g.x+v.x,y:e.y*d.y-h.scrollTop*d.y+g.y+v.y}}function eR(n){return Array.from(n.getClientRects())}function nR(n){const t=Ns(n),e=Id(n),s=n.ownerDocument.body,r=Ri(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),l=Ri(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-e.scrollLeft+zd(n);const f=-e.scrollTop;return us(s).direction==="rtl"&&(u+=Ri(t.clientWidth,s.clientWidth)-r),{width:r,height:l,x:u,y:f}}const K1=25;function iR(n,t){const e=Li(n),s=Ns(n),r=e.visualViewport;let l=s.clientWidth,u=s.clientHeight,f=0,h=0;if(r){l=r.width,u=r.height;const g=Xg();(!g||g&&t==="fixed")&&(f=r.offsetLeft,h=r.offsetTop)}const d=zd(s);if(d<=0){const g=s.ownerDocument,m=g.body,v=getComputedStyle(m),_=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,M=Math.abs(s.clientWidth-m.clientWidth-_);M<=K1&&(l-=M)}else d<=K1&&(l+=d);return{width:l,height:u,x:f,y:h}}const sR=new Set(["absolute","fixed"]);function aR(n,t){const e=Wr(n,!0,t==="fixed"),s=e.top+n.clientTop,r=e.left+n.clientLeft,l=Cs(n)?al(n):Ms(1),u=n.clientWidth*l.x,f=n.clientHeight*l.y,h=r*l.x,d=s*l.y;return{width:u,height:f,x:h,y:d}}function Q1(n,t,e){let s;if(t==="viewport")s=iR(n,e);else if(t==="document")s=nR(Ns(n));else if(cs(t))s=aR(t,e);else{const r=sE(n);s={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return vd(s)}function rE(n,t){const e=sr(n);return e===t||!cs(e)||ul(e)?!1:us(e).position==="fixed"||rE(e,t)}function rR(n,t){const e=t.get(n);if(e)return e;let s=Gc(n,[],!1).filter(f=>cs(f)&&_l(f)!=="body"),r=null;const l=us(n).position==="fixed";let u=l?sr(n):n;for(;cs(u)&&!ul(u);){const f=us(u),h=Wg(u);!h&&f.position==="fixed"&&(r=null),(l?!h&&!r:!h&&f.position==="static"&&!!r&&sR.has(r.position)||eu(u)&&!h&&rE(n,u))?s=s.filter(g=>g!==u):r=f,u=sr(u)}return t.set(n,s),s}function oR(n){let{element:t,boundary:e,rootBoundary:s,strategy:r}=n;const u=[...e==="clippingAncestors"?Fd(t)?[]:rR(t,this._c):[].concat(e),s],f=u[0],h=u.reduce((d,g)=>{const m=Q1(t,g,r);return d.top=Ri(m.top,d.top),d.right=ir(m.right,d.right),d.bottom=ir(m.bottom,d.bottom),d.left
vendor: 4,739 bytes, line 49
49=Ri(m.left,d.left),d},Q1(t,f,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function lR(n){const{width:t,height:e}=iE(n);return{width:t,height:e}}function cR(n,t,e){const s=Cs(t),r=Ns(t),l=e==="fixed",u=Wr(n,!0,l,t);let f={scrollLeft:0,scrollTop:0};const h=Ms(0);function d(){h.x=zd(r)}if(s||!s&&!l)if((_l(t)!=="body"||eu(r))&&(f=Id(t)),s){const _=Wr(t,!0,l,t);h.x=_.x+t.clientLeft,h.y=_.y+t.clientTop}else r&&d();l&&!s&&r&&d();const g=r&&!s&&!l?aE(r,f):Ms(0),m=u.left+f.scrollLeft-h.x-g.x,v=u.top+f.scrollTop-h.y-g.y;return{x:m,y:v,width:u.width,height:u.height}}function cm(n){return us(n).position==="static"}function J1(n,t){if(!Cs(n)||us(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return Ns(n)===e&&(e=e.ownerDocument.body),e}function oE(n,t){const e=Li(n);if(Fd(n))return e;if(!Cs(n)){let r=sr(n);for(;r&&!ul(r);){if(cs(r)&&!cm(r))return r;r=sr(r)}return e}let s=J1(n,t);for(;s&&WC(s)&&cm(s);)s=J1(s,t);return s&&ul(s)&&cm(s)&&!Wg(s)?e:s||KC(n)||e}const uR=async function(n){const t=this.getOffsetParent||oE,e=this.getDimensions,s=await e(n.floating);return{reference:cR(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function fR(n){return us(n).direction==="rtl"}const dR={convertOffsetParentRelativeRectToViewportRelativeRect:tR,getDocumentElement:Ns,getClippingRect:oR,getOffsetParent:oE,getElementRects:uR,getClientRects:eR,getDimensions:lR,getScale:al,isElement:cs,isRTL:fR};function lE(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function hR(n,t){let e=null,s;const r=Ns(n);function l(){var f;clearTimeout(s),(f=e)==null||f.disconnect(),e=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),l();const d=n.getBoundingClientRect(),{left:g,top:m,width:v,height:_}=d;if(f||t(),!v||!_)return;const M=bf(m),T=bf(r.clientWidth-(g+v)),S=bf(r.clientHeight-(m+_)),b=bf(g),C={rootMargin:-M+"px "+-T+"px "+-S+"px "+-b+"px",threshold:Ri(0,ir(1,h))||1};let P=!0;function U(F){const L=F[0].intersectionRatio;if(L!==h){if(!P)return u();L?u(!1,L):s=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!lE(d,n.getBoundingClientRect())&&u(),P=!1}try{e=new IntersectionObserver(U,{...C,root:r.ownerDocument})}catch{e=new IntersectionObserver(U,C)}e.observe(n)}return u(!0),l}function pR(n,t,e,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,d=Yg(n),g=r||l?[...d?Gc(d):[],...Gc(t)]:[];g.forEach(b=>{r&&b.addEventListener("scroll",e,{passive:!0}),l&&b.addEventListener("resize",e)});const m=d&&f?hR(d,e):null;let v=-1,_=null;u&&(_=new ResizeObserver(b=>{let[R]=b;R&&R.target===d&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=_)==null||C.observe(t)})),e()}),d&&!h&&_.observe(d),_.observe(t));let M,T=h?Wr(n):null;h&&S();function S(){const b=Wr(n);T&&!lE(T,b)&&e(),T=b,M=requestAnimationFrame(S)}return e(),()=>{var b;g.forEach(R=>{r&&R.removeEventListener("scroll",e),l&&R.removeEventListener("resize",e)}),m?.(),(b=_)==null||b.disconnect(),_=null,h&&cancelAnimationFrame(M)}}const mR=BC,gR=VC,xR=FC,vR=kC,yR=IC,$1=OC,_R=HC,bR=(n,t,e)=>{const s=new Map,r={platform:dR,...e},l={...r.platform,_c:s};return UC(n,t,{...r,platform:l})};var SR=typeof document<"u",MR=function(){},sd=SR?G.useLayoutEffect:MR;function yd(n,t){if(n===t)return!0;if(typeof n!=typeof t)return!1;if(typeof n=="function"&&n.toString()===t.toString())return!0;let e,s,r;if(n&&t&&typeof n=="object"){if(Array.isArray(n)){if(e=n.length,e!==t.length)return!1;for(s=e;s--!==0;)if(!yd(n[s],t[s]))return!1;return!0}if(r=Object.keys(n),e=r.length,e!==Object.keys(t).length)return!1;for(s=e;s--!==0;)if(!{}.hasOwnProperty.call(t,r[s]))return!1;for(s=e;s--!==0;){const l=r[s];if(!(l==="_owner"&&n.$$typeof)&&!yd(n[l],t[l]))return!1}return!0}return n!==n&&t!==t}function cE(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function tb(n,t){const e=cE(n);return Math.round(t*e)/e}function um(n){const t=G.useRef(n);return sd(()=>{t.current=n}),t}function ER(n){n===void 0&&(n={});const{placement:t="bottom",strategy:e="absolute",middleware:s=[],platform:r,elements:{reference:l,floating:u}={},transform:f=!0,whileElementsMounted:h,open:d}=n,[g,m]=G.useState({x:0,y:0,strategy:e,placement:t,middlewareData:{},isPositioned:!1}),[v,_]=G.useState(s);yd(v,s)||_(s);const[M,T]=G.useState(null),[S,b]=G.useState(null),R=G.useCallback(k=>{k!==F.current&&(F.current=k,T(k))},[]),C=G.useCallback(k=>{k!==L.current&&(L.current=k,b(k))},[]),P=l||M,U=u||S,F=G.useRef(null),L=G.useRef(null),z=G.useRef(g),w=h!=null,O=um(h),j=um(r),Q=um(d),Z=G.useCallback(()=>
vendor: 13,160 bytes, line 49
49{if(!F.current||!L.current)return;const k={placement:t,strategy:e,middleware:v};j.current&&(k.platform=j.current),bR(F.current,L.current,k).then(gt=>{const xt={...gt,isPositioned:Q.current!==!1};rt.current&&!yd(z.current,xt)&&(z.current=xt,Hg.flushSync(()=>{m(xt)}))})},[v,t,e,j,Q]);sd(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,m(k=>({...k,isPositioned:!1})))},[d]);const rt=G.useRef(!1);sd(()=>(rt.current=!0,()=>{rt.current=!1}),[]),sd(()=>{if(P&&(F.current=P),U&&(L.current=U),P&&U){if(O.current)return O.current(P,U,Z);Z()}},[P,U,Z,O,w]);const ot=G.useMemo(()=>({reference:F,floating:L,setReference:R,setFloating:C}),[R,C]),I=G.useMemo(()=>({reference:P,floating:U}),[P,U]),V=G.useMemo(()=>{const k={position:e,left:0,top:0};if(!I.floating)return k;const gt=tb(I.floating,g.x),xt=tb(I.floating,g.y);return f?{...k,transform:"translate("+gt+"px, "+xt+"px)",...cE(I.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:gt,top:xt}},[e,f,I.floating,g.x,g.y]);return G.useMemo(()=>({...g,update:Z,refs:ot,elements:I,floatingStyles:V}),[g,Z,ot,I,V])}const TR=n=>{function t(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:n,fn(e){const{element:s,padding:r}=typeof n=="function"?n(e):n;return s&&t(s)?s.current!=null?$1({element:s.current,padding:r}).fn(e):{}:s?$1({element:s,padding:r}).fn(e):{}}}},AR=(n,t)=>({...mR(n),options:[n,t]}),wR=(n,t)=>({...gR(n),options:[n,t]}),CR=(n,t)=>({..._R(n),options:[n,t]}),RR=(n,t)=>({...xR(n),options:[n,t]}),DR=(n,t)=>({...vR(n),options:[n,t]}),NR=(n,t)=>({...yR(n),options:[n,t]}),LR=(n,t)=>({...TR(n),options:[n,t]});var PR="Arrow",uE=G.forwardRef((n,t)=>{const{children:e,width:s=10,height:r=5,...l}=n;return y.jsx(Zr.svg,{...l,ref:t,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?e:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});uE.displayName=PR;var UR=uE;function OR(n){const[t,e]=G.useState(void 0);return Hc(()=>{if(n){e({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const l=r[0];let u,f;if("borderBoxSize"in l){const h=l.borderBoxSize,d=Array.isArray(h)?h[0]:h;u=d.inlineSize,f=d.blockSize}else u=n.offsetWidth,f=n.offsetHeight;e({width:u,height:f})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else e(void 0)},[n]),t}var fE="Popper",[dE,hE]=YM(fE),[L6,pE]=dE(fE),mE="PopperAnchor",gE=G.forwardRef((n,t)=>{const{__scopePopper:e,virtualRef:s,...r}=n,l=pE(mE,e),u=G.useRef(null),f=qr(t,u),h=G.useRef(null);return G.useEffect(()=>{const d=h.current;h.current=s?.current||u.current,d!==h.current&&l.onAnchorChange(h.current)}),s?null:y.jsx(Zr.div,{...r,ref:f})});gE.displayName=mE;var qg="PopperContent",[FR,IR]=dE(qg),xE=G.forwardRef((n,t)=>{const{__scopePopper:e,side:s="bottom",sideOffset:r=0,align:l="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:_="optimized",onPlaced:M,...T}=n,S=pE(qg,e),[b,R]=G.useState(null),C=qr(t,it=>R(it)),[P,U]=G.useState(null),F=OR(P),L=F?.width??0,z=F?.height??0,w=s+(l!=="center"?"-"+l:""),O=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},j=Array.isArray(d)?d:[d],Q=j.length>0,Z={padding:O,boundary:j.filter(BR),altBoundary:Q},{refs:rt,floatingStyles:ot,placement:I,isPositioned:V,middlewareData:k}=ER({strategy:"fixed",placement:w,whileElementsMounted:(...it)=>pR(...it,{animationFrame:_==="always"}),elements:{reference:S.anchor},middleware:[AR({mainAxis:r+z,alignmentAxis:u}),h&&wR({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?CR():void 0,...Z}),h&&RR({...Z}),DR({...Z,apply:({elements:it,rects:bt,availableWidth:Ot,availableHeight:Ut})=>{const{width:ae,height:Ce}=bt.reference,ge=it.floating.style;ge.setProperty("--radix-popper-available-width",`${Ot}px`),ge.setProperty("--radix-popper-available-height",`${Ut}px`),ge.setProperty("--radix-popper-anchor-width",`${ae}px`),ge.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),P&&LR({element:P,padding:f}),VR({arrowWidth:L,arrowHeight:z}),v&&NR({strategy:"referenceHidden",...Z})]}),[gt,xt]=_E(I),B=Ud(M);Hc(()=>{V&&B?.()},[V,B]);const at=k.arrow?.x,nt=k.arrow?.y,pt=k.arrow?.centerOffset!==0,[Et,J]=G.useState();return Hc(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),y.jsx("div",{ref:rt.setFloating,"data-radix-popper-content-wrapper":"",style:{...ot,transform:V?ot.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Et,"--radix-popper-transform-origin":[k.transformOrigin?.x,k.transformOrigin?.y].join(" "),...k.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:y.jsx(FR,{scope:e,placedSide:gt,onArrowChange:U,arrowX:at,arrowY:nt,shouldHideArrow:pt,children:y.jsx(Zr.div,{"data-side":gt,"data-align":xt,...T,ref:C,style:{...T.style,animation:V?void 0:"none"}})})})});xE.displayName=qg;var vE="PopperArrow",zR={top:"bottom",right:"left",bottom:"top",left:"right"},yE=G.forwardRef(function(t,e){const{__scopePopper:s,...r}=t,l=IR(vE,s),u=zR[l.placedSide];return y.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:y.jsx(UR,{...r,ref:e,style:{...r.style,display:"block"}})})});yE.displayName=vE;function BR(n){return n!==null}var VR=n=>({name:"transformOrigin",options:n,fn(t){const{placement:e,rects:s,middlewareData:r}=t,u=r.arrow?.centerOffset!==0,f=u?0:n.arrowWidth,h=u?0:n.arrowHeight,[d,g]=_E(e),m={start:"0%",center:"50%",end:"100%"}[g],v=(r.arrow?.x??0)+f/2,_=(r.arrow?.y??0)+h/2;let M="",T="";return d==="bottom"?(M=u?m:`${v}px`,T=`${-h}px`):d==="top"?(M=u?m:`${v}px`,T=`${s.floating.height+h}px`):d==="right"?(M=`${-h}px`,T=u?m:`${_}px`):d==="left"&&(M=`${s.floating.width+h}px`,T=u?m:`${_}px`),{data:{x:M,y:T}}}});function _E(n){const[t,e="center"]=n.split("-");return[t,e]}var HR=gE,kR=xE,GR=yE;function jR(n,t){return G.useReducer((e,s)=>t[e][s]??e,n)}var bE=n=>{const{present:t,children:e}=n,s=WR(t),r=typeof e=="function"?e({present:s.isPresent}):G.Children.only(e),l=qr(s.ref,XR(r));return typeof e=="function"||s.isPresent?G.cloneElement(r,{ref:l}):null};bE.displayName="Presence";function WR(n){const[t,e]=G.useState(),s=G.useRef(null),r=G.useRef(n),l=G.useRef("none"),u=n?"mounted":"unmounted",[f,h]=jR(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return G.useEffect(()=>{const d=Sf(s.current);l.current=f==="mounted"?d:"none"},[f]),Hc(()=>{const d=s.current,g=r.current;if(g!==n){const v=l.current,_=Sf(d);n?h("MOUNT"):_==="none"||d?.display==="none"?h("UNMOUNT"):h(g&&v!==_?"ANIMATION_OUT":"UNMOUNT"),r.current=n}},[n,h]),Hc(()=>{if(t){let d;const g=t.ownerDocument.defaultView??window,m=_=>{const T=Sf(s.current).includes(CSS.escape(_.animationName));if(_.target===t&&T&&(h("ANIMATION_END"),!r.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",d=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=_=>{_.target===t&&(l.current=Sf(s.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:G.useCallback(d=>{s.current=d?getComputedStyle(d):null,e(d)},[])}}function Sf(n){return n?.animationName||"none"}function XR(n){let t=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning;return e?n.ref:(t=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning,e?n.props.ref:n.props.ref||n.ref)}var YR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qR="VisuallyHidden",SE=G.forwardRef((n,t)=>y.jsx(Zr.span,{...n,ref:t,style:{...YR,...n.style}}));SE.displayName=qR;var ZR=SE,[Bd]=YM("Tooltip",[hE]),Zg=hE(),ME="TooltipProvider",KR=700,eb="tooltip.open",[QR,EE]=Bd(ME),TE=n=>{const{__scopeTooltip:t,delayDuration:e=KR,skipDelayDuration:s=300,disableHoverableContent:r=!1,children:l}=n,u=G.useRef(!0),f=G.useRef(!1),h=G.useRef(0);return G.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),y.jsx(QR,{scope:t,isOpenDelayedRef:u,delayDuration:e,onOpen:G.useCallback(()=>{window.clearTimeout(h.current),u.current=!1},[]),onClose:G.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,s)},[s]),isPointerInTransitRef:f,onPointerInTransitChange:G.useCallback(d=>{f.current=d},[]),disableHoverableContent:r,children:l})};TE.displayName=ME;var AE="Tooltip",[P6,Vd]=Bd(AE),x0="TooltipTrigger",JR=G.forwardRef((n,t)=>{const{__scopeTooltip:e,...s}=n,r=Vd(x0,e),l=EE(x0,e),u=Zg(e),f=G.useRef(null),h=qr(t,f,r.onTriggerChange),d=G.useRef(!1),g=G.useRef(!1),m=G.useCallback(()=>d.current=!1,[]);return G.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),y.jsx(HR,{asChild:!0,...u,children:y.jsx(Zr.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...s,ref:h,onPointerMove:aa(n.onPointerMove,v=>{v.pointerType!=="touch"&&!g.current&&!l.isPointerInTransitRef.current&&(r.onTriggerEnter(),g.current=!0)}),onPointerLeave:aa(n.onPointerLeave,()=>{r.onTriggerLeave(),g.current=!1}),onPointerDown:aa(n.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:aa(n.onFocus,()=>{d.current||r.onOpen()}),onBlur:aa(n.onBlur,r.onClose),onClick:aa(n.onClick,r.onClose)})})});JR.displayName=x0;var $R="TooltipPortal",[U6,tD]=Bd($R,{forceMount:void 0}),fl="TooltipContent",eD=G.forwardRef((n,t)=>{const e=tD(fl,n.__scopeTooltip),{forceMount:s=e.forceMount,side:r="top",...l}=n,u=Vd(fl,n.__scopeTooltip);return y.jsx(bE,{present:s||u.open,children:u.disableHoverableContent?y.jsx(wE,{side:r,...l,ref:t}):y.jsx(nD,{side:r,...l,ref:t})})}),nD=G.forwardRef((n,t)=>{const e=Vd(fl,n.__scopeTooltip),s=EE(fl,n.__scopeTooltip),r=G.useRef(null),l=qr(t,r),[u,f]=G.useState(null),{trigger:h,onClose:d}=e,g=r.current,{onPointerInTransitChange:m}=s,v=G.useCallback(()=>{f(null),m(!1)},[m]),_=G.useCallback((M,T)=>{const S=M.currentTarget,b={x:M.clientX,y:M.clientY},R=oD(b,S.getBoundingClientRect()),C=lD(b,R),P=cD(T.getBoundingClientRect()),U=fD([...C,...P]);f(U),m(!0)},[m]);return G.useEffect(()=>()=>v(),[v]),G.useEffect(()=>{if(h&&g){const M=S=>_(S,g),T=S=>_(S,h);return h.addEventListener("pointerleave",M),g.addEventListener("pointerleave",T),()=>{h.removeEventListener("pointerleave",M),g.removeEventListener("pointerleave",T)}}},[h,g,_,v]),G.useEffect(()=>{if(u){const M=T=>{const S=T.target,b={x:T.clientX,y:T.clientY},R=h?.contains(S)||g?.contains(S),C=!uD(b,u);R?v():C&&(v(),d())};return document.addEventListener("pointermove",M),()=>document.removeEventListener("pointermove",M)}},[h,g,u,d,v]),y.jsx(wE,{...n,ref:l})}),[iD,sD]=Bd(AE,{isInside:!1}),aD=cC("TooltipContent"),wE=G.forwardRef((n,t)=>{const{__scopeTooltip:e,children:s,"aria-label":r,onEscapeKeyDown:l,onPointerDownOutside:u,...f}=n,h=Vd(fl,e),d=Zg(e),{onClose:g}=h;return G.useEffect(()=>(document.addEventListener(eb,g),()=>document.removeEventListener(eb,g)),[g]),G.useEffect(()=>{if(h.trigger){const m=v=>{v.target?.contains(h.trigger)&&g()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[h.trigger,g]),y.jsx(QM,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:g,children:y.jsxs(kR,{"data-state":h.stateAttribute,...d,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(aD,{children:s}),y.jsx(iD,{scope:e,isInside:!0,children:y.jsx(ZR,{id:h.contentId,role:"tooltip",children:r||s})})]})})});eD.displayName=fl;var CE="TooltipArrow",rD=G.forwardRef((n,t)=>{const{__scopeTooltip:e,...s}=n,r=Zg(e);return sD(CE,e).isInside?null:y.jsx(GR,{...r,...s,ref:t})});rD.displayName=CE;function oD(n,t){const e=Math.abs(t.top-n.y),s=Math.abs(t.bottom-n.y),r=Math.abs(t.right-n.x),l=Math.abs(t.left-n.x);switch(Math.min(e,s,r,l)){case l:return"left";case r:return"right";case e:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function lD(n,t,e=5){const s=[];
vendor: 8,979 bytes, line 49
49switch(t){case"top":s.push({x:n.x-e,y:n.y+e},{x:n.x+e,y:n.y+e});break;case"bottom":s.push({x:n.x-e,y:n.y-e},{x:n.x+e,y:n.y-e});break;case"left":s.push({x:n.x+e,y:n.y-e},{x:n.x+e,y:n.y+e});break;case"right":s.push({x:n.x-e,y:n.y-e},{x:n.x-e,y:n.y+e});break}return s}function cD(n){const{top:t,right:e,bottom:s,left:r}=n;return[{x:r,y:t},{x:e,y:t},{x:e,y:s},{x:r,y:s}]}function uD(n,t){const{x:e,y:s}=n;let r=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const f=t[l],h=t[u],d=f.x,g=f.y,m=h.x,v=h.y;g>s!=v>s&&e<(m-d)*(s-g)/(v-g)+d&&(r=!r)}return r}function fD(n){const t=n.slice();return t.sort((e,s)=>e.x<s.x?-1:e.x>s.x?1:e.y<s.y?-1:e.y>s.y?1:0),dD(t)}function dD(n){if(n.length<=1)return n.slice();const t=[];for(let s=0;s<n.length;s++){const r=n[s];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(r.y-u.y)>=(l.y-u.y)*(r.x-u.x))t.pop();else break}t.push(r)}t.pop();const e=[];for(let s=n.length-1;s>=0;s--){const r=n[s];for(;e.length>=2;){const l=e[e.length-1],u=e[e.length-2];if((l.x-u.x)*(r.y-u.y)>=(l.y-u.y)*(r.x-u.x))e.pop();else break}e.push(r)}return e.pop(),t.length===1&&e.length===1&&t[0].x===e[0].x&&t[0].y===e[0].y?t:t.concat(e)}var hD=TE;function RE(n){var t,e,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(t=0;t<r;t++)n[t]&&(e=RE(n[t]))&&(s&&(s+=" "),s+=e)}else for(e in n)n[e]&&(s&&(s+=" "),s+=e);return s}function DE(){for(var n,t,e=0,s="",r=arguments.length;e<r;e++)(n=arguments[e])&&(t=RE(n))&&(s&&(s+=" "),s+=t);return s}const Kg="-",pD=n=>{const t=gD(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:u=>{const f=u.split(Kg);return f[0]===""&&f.length!==1&&f.shift(),NE(f,t)||mD(u)},getConflictingClassGroupIds:(u,f)=>{const h=e[u]||[];return f&&s[u]?[...h,...s[u]]:h}}},NE=(n,t)=>{if(n.length===0)return t.classGroupId;const e=n[0],s=t.nextPart.get(e),r=s?NE(n.slice(1),s):void 0;if(r)return r;if(t.validators.length===0)return;const l=n.join(Kg);return t.validators.find(({validator:u})=>u(l))?.classGroupId},nb=/^\[(.+)\]$/,mD=n=>{if(nb.test(n)){const t=nb.exec(n)[1],e=t?.substring(0,t.indexOf(":"));if(e)return"arbitrary.."+e}},gD=n=>{const{theme:t,classGroups:e}=n,s={nextPart:new Map,validators:[]};for(const r in e)v0(e[r],s,r,t);return s},v0=(n,t,e,s)=>{n.forEach(r=>{if(typeof r=="string"){const l=r===""?t:ib(t,r);l.classGroupId=e;return}if(typeof r=="function"){if(xD(r)){v0(r(s),t,e,s);return}t.validators.push({validator:r,classGroupId:e});return}Object.entries(r).forEach(([l,u])=>{v0(u,ib(t,l),e,s)})})},ib=(n,t)=>{let e=n;return t.split(Kg).forEach(s=>{e.nextPart.has(s)||e.nextPart.set(s,{nextPart:new Map,validators:[]}),e=e.nextPart.get(s)}),e},xD=n=>n.isThemeGetter,vD=n=>{if(n<1)return{get:()=>{},set:()=>{}};let t=0,e=new Map,s=new Map;const r=(l,u)=>{e.set(l,u),t++,t>n&&(t=0,s=e,e=new Map)};return{get(l){let u=e.get(l);if(u!==void 0)return u;if((u=s.get(l))!==void 0)return r(l,u),u},set(l,u){e.has(l)?e.set(l,u):r(l,u)}}},y0="!",_0=":",yD=_0.length,_D=n=>{const{prefix:t,experimentalParseClassName:e}=n;let s=r=>{const l=[];let u=0,f=0,h=0,d;for(let M=0;M<r.length;M++){let T=r[M];if(u===0&&f===0){if(T===_0){l.push(r.slice(h,M)),h=M+yD;continue}if(T==="/"){d=M;continue}}T==="["?u++:T==="]"?u--:T==="("?f++:T===")"&&f--}const g=l.length===0?r:r.substring(h),m=bD(g),v=m!==g,_=d&&d>h?d-h:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:_}};if(t){const r=t+_0,l=s;s=u=>u.startsWith(r)?l(u.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:u,maybePostfixModifierPosition:void 0}}if(e){const r=s;s=l=>e({className:l,parseClassName:r})}return s},bD=n=>n.endsWith(y0)?n.substring(0,n.length-1):n.startsWith(y0)?n.substring(1):n,SD=n=>{const t=Object.fromEntries(n.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let l=[];return s.forEach(u=>{u[0]==="["||t[u]?(r.push(...l.sort(),u),l=[]):l.push(u)}),r.push(...l.sort()),r}},MD=n=>({cache:vD(n.cacheSize),parseClassName:_D(n),sortModifiers:SD(n),...pD(n)}),ED=/\s+/,TD=(n,t)=>{const{parseClassName:e,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:l}=t,u=[],f=n.trim().split(ED);let h="";for(let d=f.length-1;d>=0;d-=1){const g=f[d],{isExternal:m,modifiers:v,hasImportantModifier:_,baseClassName:M,maybePostfixModifierPosition:T}=e(g);if(m){h=g+(h.length>0?" "+h:h);continue}let S=!!T,b=s(S?M.substring(0,T):M);if(!b){if(!S){h=g+(h.length>0?" "+h:h);continue}if(b=s(M),!b){h=g+(h.length>0?" "+h:h);continue}S=!1}const R=l(v).join(":"),C=_?R+y0:R,P=C+b;if(u.includes(P))continue;u.push(P);const U=r(b,S);for(let F=0;F<U.length;++F){const L=U[F];u.push(C+L)}h=g+(h.length>0?" "+h:h)}return h};function AD(){let n=0,t,e,s="";for(;n<arguments.length;)(t=arguments[n++])&&(e=LE(t))&&(s&&(s+=" "),s+=e);return s}const LE=n=>{if(typeof n=="string")return n;let t,e="";for(let s=0;s<n.length;s++)n[s]&&(t=LE(n[s]))&&(e&&(e+=" "),e+=t);return e};function wD(n,...t){let e,s,r,l=u;function u(h){const d=t.reduce((g,m)=>m(g),n());return e=MD(d),s=e.cache.get,r=e.cache.set,l=f,f(h)}function f(h){const d=s(h);if(d)return d;const g=TD(h,e);return r(h,g),g}return function(){return l(AD.apply(null,arguments))}}const Dn=n=>{const t=e=>e[n]||[];return t.isThemeGetter=!0,t},PE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,UE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,CD=/^\d+\/\d+$/,RD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ND=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Po=n=>CD.test(n),Me=n=>!!n&&!Number.isNaN(Number(n)),Wa=n=>!!n&&Number.isInteger(Number(n)),fm=n=>n.endsWith("%")&&Me(n.slice(0,-1)),Qs=n=>RD.test(n),UD=()=>!0,OD=n=>DD.test(n)&&!ND.test(n),OE=()=>!1,FD=n=>LD.test(n),ID=n=>PD.test(n),zD=n=>!Zt(n)&&!Kt(n),BD=n=>bl(n,zE,OE),Zt=n=>PE.test(n),wr=n=>bl(n,BE,OD),dm=n=>bl(n,jD,Me),sb=n=>bl(n,FE,OE),VD=n=>bl(n,IE,ID),Mf=n=>bl(n,VE,FD),Kt=n=>UE.test(n),_c=n=>Sl(n,BE),HD=n=>Sl(n,WD),ab=n=>Sl(n,FE),kD=n=>Sl(n,zE),GD=n=>Sl(n,IE),Ef=n=>Sl(n,VE,!0),bl=(n,t,e)=>{const s=PE.exec(n);return s?s[1]?t(s[1]):e(s[2]):!1},Sl=(n,t,e=!1)=>{const s=UE.exec(n);return s?s[1]?t(s[1]):e:!1},FE=n=>n==="position"||n==="percentage",IE=n=>n==="image"||n==="url",zE=n=>n==="length"||n==="size"||n==="bg-size",BE=n=>n==="length",jD=n=>n==="number",WD=n=>n==="family-name",VE=n=>n==="shadow",XD=()=>{const n=Dn("color"),t=Dn("font"),e=Dn("text"),s=Dn("font-weight"),r=Dn("tracking"),l=Dn("leading"),u=Dn("breakpoint"),f=Dn("container"),h=Dn("spacing"),d=Dn("radius"),g=Dn("shadow"),m=Dn("inset-shadow"),v=Dn("text-shadow"),_=Dn("drop-shadow"),M=Dn("blur"),T=Dn("perspective"),S=Dn("aspect"),b=Dn("ease"),R=Dn("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...P(),Kt,Zt],F=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],z=()=>[Kt,Zt,h],w=()=>[Po,"full","auto",...z()],O=()=>[Wa,"none","subgrid",Kt,Zt],j=()=>["auto",{span:["full",Wa,Kt,Zt]},Wa,Kt,Zt],Q=()=>[Wa,"auto",Kt,Zt],Z=()=>["auto","min","max","fr",Kt,Zt],rt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ot=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...z()],V=()=>[Po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],k=()=>[n,Kt,Zt],gt=()=>[...P(),ab,sb,{position:[Kt,Zt]}],xt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",kD,BD,{size:[Kt,Zt]}],at=()=>[fm,_c,wr],nt=()=>["","none","full",d,Kt,Zt],pt=()=>["",Me,_c,wr],Et=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],it=()=>[Me,fm,ab,sb],bt=()=>["","none",M,Kt,Zt],Ot=()=>["none",Me,Kt,Zt],Ut=()=>["none",Me,Kt,Zt],ae=()=>[Me,Kt,Zt],Ce=()=>[Po,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qs],breakpoint:[Qs],color:[UD],container:[Qs],"drop-shadow":[Qs],ease:["in","out","in-out"],font:[zD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qs],shadow:[Qs],spacing:["px",Me],text:[Qs],"text-shadow":[Qs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Po,Zt,Kt,S]}
vendor: 4,437 bytes, line 49
49],container:["container"],columns:[{columns:[Me,Zt,Kt,f]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:U()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Wa,"auto",Kt,Zt]}],basis:[{basis:[Po,"full","auto",f,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,Po,"auto","initial","none",Zt]}],grow:[{grow:["",Me,Kt,Zt]}],shrink:[{shrink:["",Me,Kt,Zt]}],order:[{order:[Wa,"first","last","none",Kt,Zt]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...rt(),"normal"]}],"justify-items":[{"justify-items":[...ot(),"normal"]}],"justify-self":[{"justify-self":["auto",...ot()]}],"align-content":[{content:["normal",...rt()]}],"align-items":[{items:[...ot(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ot(),{baseline:["","last"]}]}],"place-content":[{"place-content":rt()}],"place-items":[{"place-items":[...ot(),"baseline"]}],"place-self":[{"place-self":["auto",...ot()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[f,"screen",...V()]}],"min-w":[{"min-w":[f,"screen","none",...V()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",e,_c,wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Kt,dm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fm,Zt]}],"font-family":[{font:[HD,Zt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,Kt,Zt]}],"line-clamp":[{"line-clamp":[Me,"none",Kt,dm]}],leading:[{leading:[l,...z()]}],"list-image":[{"list-image":["none",Kt,Zt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Kt,Zt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Et(),"w
49avy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",Kt,wr]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Me,"auto",Kt,Zt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Kt,Zt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Kt,Zt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:gt()}],"bg-repeat":[{bg:xt()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wa,Kt,Zt],radial:["",Kt,Zt],conic:[Wa,Kt,Zt]},GD,VD]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:at()}],"gradient-via-pos":[{via:at()}],"gradient-to-pos":[{to:at()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:nt()}],"rounded-s":[{"rounded-s":nt()}],"rounded-e":[{"rounded-e":nt()}],"rounded-t":[{"rounded-t":nt()}],"rounded-r":[{"rounded-r":nt()}],"rounded-b":[{"rounded-b":nt()}],"rounded-l":[{"rounded-l":nt()}],"rounded-ss":[{"rounded-ss":nt()}],"rounded-se":[{"rounded-se":nt()}],"rounded-ee":[{"rounded-ee":nt()}],"rounded-es":[{"rounded-es":nt()}],"rounded-tl":[{"rounded-tl":nt()}],"rounded-tr":[{"rounded-tr":nt()}],"rounded-br":[{"rounded-br":nt()}],"rounded-bl":[{"rounded-bl":nt()}],"border-w":[{border:pt()}],"border-w-x":[{"border-x":pt()}],"border-w-y":[{"border-y":pt()}],"border-w-s":[{"border-s":pt()}],"border-w-e":[{"border-e":pt()}],"border-w-t":[{"border-t":pt()}],"border-w-r":[{"border-r":pt()}],"border-w-b":[{"border-b":pt()}],"border-w-l":[{"border-l":pt()}],"divide-x":[{"divide-x":pt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Et(),"hidden","none"]}],"divide-style":[{divide:[...Et(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Et(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,Kt,Zt]}],"outline-w":[{outline:["",Me,_c,wr]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",g,Ef,Mf]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",m,Ef,Mf]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:pt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Me,wr]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":pt()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",v,Ef,Mf]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Me,Kt,Zt]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":it()}],"mask-image-linear-to-pos":[{"mask-linear-to":it()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":it()}],"mask-image-t-to-pos":[{"mask-t-to":it()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":it()}],"mask-image-r-to-pos":[{"mask-r-to":it()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":it()}],"mask-image-b-to-pos":[{"mask-b-to":it()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":it()}],"mask-image-l-to-pos":[{"mask-l-to":it()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":it()}],"mask-image-x-to-pos":[{"mask-x-to":it()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":it()}],"mask-image-y-to-pos":[{"mask-y-to":it()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Kt,Zt]}],"mask-image-radial-from-pos":[{"mask-radial-from":it()}],"mask-image-radial-to-pos":[{"mask-radial-to":it()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":it()}],"mask-image-conic-to-pos":[{"mask-conic-to":it()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:gt()}],"mask-repeat":[{mask:xt()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Kt,Zt]}],filter:[{filter:["","none",Kt,Zt]}],blur:[{blur:bt()}],brightness:[{brightness:[Me,Kt,Zt]}],contrast:[{contrast:[Me,Kt,Zt]}],"drop-shadow":[{"drop-shadow":["","none",_,Ef,Mf]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",Me,Kt,Zt]}],"hue-rotate":[{"hue-rotate":[Me,Kt,Zt]}],invert:[{invert:["",Me,Kt,Zt]}],saturate:[{saturate:[Me,Kt,Zt]}],sepia:[{sepia:["",Me,Kt,Zt]}],"backdrop-filter":[{"backdrop-filter":["","none",Kt,Zt]}],"backdrop-blur":[{"backdrop-blur":bt()}],"backdrop-brightness":[{"backdrop-brightness":[Me,Kt,Zt]}],"backdrop-contrast":[{"backdrop-contrast":[Me,Kt,Zt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,Kt,Zt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,Kt,Zt]}],"backdrop-invert":[{"backdrop-invert":["",Me,Kt,Zt]}],"backdrop-opacity":[{"backdrop-opacity":[Me,Kt,Zt]}],"backdrop-saturate":[{"backdrop-saturate":[Me,Kt,Zt]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,Kt,Zt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Kt,Zt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",Kt,Zt]}],ease:[{ease:["linear","initial",b,Kt,Zt]}],delay:[{delay:[Me,Kt,Zt]}],animate:[{animate:["none",R,Kt,Zt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,Kt,Zt]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:Ot()}],"rotate-x":[{"rotate-x":Ot()}],"rotate-y":[{"rotate-y":Ot()}],"rotate-z":[{"rotate-z":Ot()}],scale:[{scale:Ut()}],"scale-x":[{"scale-x":Ut()}],"scale-y":[{"scale-y":Ut()}],"scale-z":[{"scale-z":Ut()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[Kt,Zt,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}
vendor: 4,912 bytes, line 49
49],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Kt,Zt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Kt,Zt]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[Me,_c,wr,dm]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},YD=wD(XD);function Hd(...n){return YD(DE(n))}function qD({delayDuration:n=0,...t}){return y.jsx(hD,{"data-loc":"client/src/components/ui/tooltip.tsx:11","data-slot":"tooltip-provider",delayDuration:n,...t})}const rb=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,ob=DE,ZD=(n,t)=>e=>{var s;if(t?.variants==null)return ob(n,e?.class,e?.className);const{variants:r,defaultVariants:l}=t,u=Object.keys(r).map(d=>{const g=e?.[d],m=l?.[d];if(g===null)return null;const v=rb(g)||rb(m);return r[d][v]}
vendor: 6,805 bytes, lines 49-108
49),f=e&&Object.entries(e).reduce((d,g)=>{let[m,v]=g;return v===void 0||(d[m]=v),d},{}),h=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,g)=>{let{class:m,className:v,..._}=g;return Object.entries(_).every(M=>{let[T,S]=M;return Array.isArray(S)?S.includes({...l,...f}[T]):{...l,...f}[T]===S})?[...d,m,v]:d},[]);return ob(n,u,h,e?.class,e?.className)},KD=ZD("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-transparent shadow-xs hover:bg-accent dark:bg-transparent dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function QD({className:n,variant:t,size:e,asChild:s=!1,...r}){const l=s?oC:"button";return y.jsx(l,{"data-loc":"client/src/components/ui/button.tsx:52","data-slot":"button",className:Hd(KD({variant:t,size:e,className:n})),...r})}function JD({className:n,...t}){return y.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:7","data-slot":"card",className:Hd("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...t})}function $D({className:n,...t}){return y.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:66","data-slot":"card-content",className:Hd("px-6",n),...t})}/** 50 * @license lucide-react v0.453.0 - ISC 51 * 52 * This source code is licensed under the ISC license. 53 * See the LICENSE file in the root directory of this source tree. 54 */const tN=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),HE=(...n)=>n.filter((t,e,s)=>!!t&&s.indexOf(t)===e).join(" ");/** 55 * @license lucide-react v0.453.0 - ISC 56 * 57 * This source code is licensed under the ISC license. 58 * See the LICENSE file in the root directory of this source tree. 59 */var eN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 60 * @license lucide-react v0.453.0 - ISC 61 * 62 * This source code is licensed under the ISC license. 63 * See the LICENSE file in the root directory of this source tree. 64 */const nN=G.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:e=2,absoluteStrokeWidth:s,className:r="",children:l,iconNode:u,...f},h)=>G.createElement("svg",{ref:h,...eN,width:t,height:t,stroke:n,strokeWidth:s?Number(e)*24/Number(t):e,className:HE("lucide",r),...f},[...u.map(([d,g])=>G.createElement(d,g)),...Array.isArray(l)?l:[l]]));/** 65 * @license lucide-react v0.453.0 - ISC 66 * 67 * This source code is licensed under the ISC license. 68 * See the LICENSE file in the root directory of this source tree. 69 */const Un=(n,t)=>{const e=G.forwardRef(({className:s,...r},l)=>G.createElement(nN,{ref:l,iconNode:t,className:HE(`lucide-${tN(n)}`,s),...r}));return e.displayName=`${n}`,e};/** 70 * @license lucide-react v0.453.0 - ISC 71 * 72 * This source code is licensed under the ISC license. 73 * See the LICENSE file in the root directory of this source tree. 74 */const iN=Un("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 75 * @license lucide-react v0.453.0 - ISC 76 * 77 * This source code is licensed under the ISC license. 78 * See the LICENSE file in the root directory of this source tree. 79 */const sN=Un("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** 80 * @license lucide-react v0.453.0 - ISC 81 * 82 * This source code is licensed under the ISC license. 83 * See the LICENSE file in the root directory of this source tree. 84 */const aN=Un("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** 85 * @license lucide-react v0.453.0 - ISC 86 * 87 * This source code is licensed under the ISC license. 88 * See the LICENSE file in the root directory of this source tree. 89 */const rN=Un("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 90 * @license lucide-react v0.453.0 - ISC 91 * 92 * This source code is licensed under the ISC license. 93 * See the LICENSE file in the root directory of this source tree. 94 */const oN=Un("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 95 * @license lucide-react v0.453.0 - ISC 96 * 97 * This source code is licensed under the ISC license. 98 * See the LICENSE file in the root directory of this source tree. 99 */const lb=Un("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 100 * @license lucide-react v0.453.0 - ISC 101 * 102 * This source code is licensed under the ISC license. 103 * See the LICENSE file in the root directory of this source tree. 104 */const cb=Un("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 105 * @license lucide-react v0.453.0 - ISC 106 * 107 * This source code is licensed under the ISC license. 108 * See the LICENSE file in the root directory of this source tree.
109 */const lN=Un("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 110 * @license lucide-react v0.453.0 - ISC 111 * 112 * This source code is licensed under the ISC license. 113 * See the LICENSE file in the root directory of this source tree. 114 */const cN=Un("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 115 * @license lucide-react v0.453.0 - ISC 116 * 117 * This source code is licensed under the ISC license. 118 * See the LICENSE file in the root directory of this source tree. 119 */const _d=Un("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 120 * @license lucide-react v0.453.0 - ISC 121 * 122 * This source code is licensed under the ISC license. 123 * See the LICENSE file in the root directory of this source tree. 124 */const uN=Un("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 125 * @license lucide-react v0.453.0 - ISC 126 * 127 * This source code is licensed under the ISC license. 128 * See the LICENSE file in the root directory of this source tree. 129 */const fN=Un("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 130 * @license lucide-react v0.453.0 - ISC 131 * 132 * This source code is licensed under the ISC license. 133 * See the LICENSE file in the root directory of this source tree. 134 */const ub=Un("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 135 * @license lucide-react v0.453.0 - ISC 136 * 137 * This source code is licensed under the ISC license. 138 * See the LICENSE file in the root directory of this source tree. 139 */const Qg=Un("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 140 * @license lucide-react v0.453.0 - ISC 141 * 142 * This source code is licensed under the ISC license. 143 * See the LICENSE file in the root directory of this source tree. 144 */const dN=Un("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 145 * @license lucide-react v0.453.0 - ISC 146 * 147 * This source code is licensed under the ISC license. 148 * See the LICENSE file in the root directory of this source tree. 149 */const hN=Un("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 150 * @license lucide-react v0.453.0 - ISC 151 * 152 * This source code is licensed under the ISC license. 153 * See the LICENSE file in the root directory of this source tree. 154 */const pN=Un("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 155 * @license lucide-react v0.453.0 - ISC 156 * 157 * This source code is licensed under the ISC license. 158 * See the LICENSE file in the root directory of this source tree. 159 */const mN=Un("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}
159],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** 160 * @license lucide-react v0.453.0 - ISC 161 * 162 * This source code is licensed under the ISC license. 163 * See the LICENSE file in the root directory of this source tree. 164 */const kE=Un("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function gN(n,t){if(n instanceof RegExp)return{keys:!1,pattern:n};var e,s,r,l,u=[],f="",h=n.split("/");for(h[0]||h.shift();r=h.shift();)e=r[0],e==="*"?(u.push(e),f+=r[1]==="?"?"(?:/(.*))?":"/(.*)"):e===":"?(s=r.indexOf("?",1),l=r.indexOf(".",1),u.push(r.substring(1,~s?s:~l?l:r.length)),f+=~s&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(f+=(~s?"?":"")+"\\"+r.substring(l))):f+="/"+r;return{keys:u,pattern:new RegExp("^"+f+(t?"(?=$|/)":"/?$"),"i")}}var hm={exports:{}},pm={};/** 165 * @license React 166 * use-sync-external-store-shim.production.js 167 * 168 * Copyright (c) Meta Platforms, Inc. and affiliates. 169 * 170 * This source code is licensed under the MIT license found in the 171 * LICENSE file in the root directory of this source tree. 172 */var fb;function xN(){if(fb)return pm;fb=1;var n=Pd();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var e=typeof Object.is=="function"?Object.is:t,s=n.useState,r=n.useEffect,l=n.useLayoutEffect,u=n.useDebugValue;function f(m,v){var _=v(),M=s({inst:{value:_,getSnapshot:v}}),T=M[0].inst,S=M[1];return l(function(){T.value=_,T.getSnapshot=v,h(T)&&S({inst:T})},[m,_,v]),r(function(){return h(T)&&S({inst:T}),m(function(){h(T)&&S({inst:T})})},[m]),u(_),_}function h(m){var v=m.getSnapshot;m=m.value;try{var _=v();return!e(m,_)}catch{return!0}}function d(m,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:f;return pm.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,pm}var db;function vN(){return db||(db=1,hm.exports=xN()),hm.exports}var yN=vN();const _N=A3.useInsertionEffect,bN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",SN=bN?G.useLayoutEffect:G.useEffect,MN=_N||SN,GE=n=>{const t=G.useRef([n,(...e)=>t[0](...e)]).current;return MN(()=>{t[0]=n}),t[1]},EN="popstate",Jg="pushState",$g="replaceState",TN="hashchange",hb=[EN,Jg,$g,TN],AN=n=>{for(const t of hb)addEventListener(t,n);return()=>{for(const t of hb)removeEventListener(t,n)}},jE=(n,t)=>yN.useSyncExternalStore(AN,n,t),wN=()=>location.search,CN=({ssrSearch:n=""}={})=>jE(wN,()=>n),pb=()=>location.pathname,RN=({ssrPath:n}={})=>jE(pb,n?()=>n:pb),DN=(n,{replace:t=!1,state:e=null}={})=>history[t?$g:Jg](e,"",n),NN=(n={})=>[RN(n),DN],mb=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[mb]>"u"){for(const n of[Jg,$g]){const t=history[n];history[n]=function(){const e=t.apply(this,arguments),s=new Event(n);return s.arguments=arguments,dispatchEvent(s),e}}Object.defineProperty(window,mb,{value:!0})}const LN=(n,t)=>t.toLowerCase().indexOf(n.toLowerCase())?"~"+t:t.slice(n.length)||"/",WE=(n="")=>n==="/"?"":n,PN=(n,t)=>n[0]==="~"?n.slice(1):WE(t)+n,UN=(n="",t)=>LN(gb(WE(n)),gb(t)),gb=n=>{try{return decodeURI(n)}catch{return n}},XE={hook:NN,searchHook:CN,parser:gN,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:n=>n},YE=G.createContext(XE),nu=()=>G.useContext(YE),qE={},ZE=G.createContext(qE),ON=()=>G.useContext(ZE),kd=n=>{const[t,e]=n.hook(n);return[UN(n.base,t),GE((s,r)=>e(PN(s,n.base),r))]},FN=()=>kd(nu()),KE=(n,t,e,s)=>{const{pattern:r,keys:l}=t instanceof RegExp?{keys:!1,pattern:t}:n(t||"*",s),u=r.exec(e)||[],[f,...h]=u;return f!==void 0?[!0,(()=>{const d=l!==!1?Object.fromEntries(l.map((m,v)=>[m,h[v]])):u.groups;let g={...h};return d&&Object.assign(g,d),g})(),...s?[f]:[]]:[!1,null]},IN=({children:n,...t})=>{const e=nu(),s=t.hook?XE:e;let r=s;const[l,u]=t.ssrPath?.split("?")??[];u&&(t.ssrSearch=u,t.ssrPath=l),t.hrefs=t.hrefs??t.hook?.hrefs;let f=G.useRef({}),h=f.current,d=h;for(let g in s){const m=g==="base"?s[g]+(t[g]||""):t[g]||s[g];h===d&&m!==d[g]&&(f.current=d={...d}),d[g]=m,(m!==s[g]||m!==r[g])&&(r=d)}return G.createElement(YE.Provider,{value:r,children:n})},xb=({children:n,component:t},e)=>t?G.createElement(t,{params:e}):typeof n=="function"?n(e):n,zN=n=>{let t=G.useRef(qE);const e=t.current;return t.current=Object.keys(n).length!==Object.keys(e).length||Object.entries(n).some(([s,r])=>r!==e[s])?n:e},Tf=({path:n,nest:t,match:e,...s})=>{const r=nu(),[l]=kd(r),[u,f,h]=e??KE(r.parser,n,l,t),d=zN({...ON(),...f});if(!u)return null;const g=h?G.createElement(IN,{base:h},xb(s,d)):xb(s,d);return G.createElement(ZE.Provider,{value:d,children:g})},b0=G.forwardRef((n,t)=>
172{const e=nu(),[s,r]=kd(e),{to:l="",href:u=l,onClick:f,asChild:h,children:d,className:g,replace:m,state:v,..._}=n,M=GE(S=>{S.ctrlKey||S.metaKey||S.altKey||S.shiftKey||S.button!==0||(f?.(S),S.defaultPrevented||(S.preventDefault(),r(u,n)))}),T=e.hrefs(u[0]==="~"?u.slice(1):e.base+u,e);return h&&G.isValidElement(d)?G.cloneElement(d,{onClick:M,href:T}):G.createElement("a",{..._,onClick:M,href:T,className:g?.call?g(s===u):g,children:d,ref:t})}),S0=n=>Array.isArray(n)?n.flatMap(t=>S0(t&&t.type===G.Fragment?t.props.children:t)):[n],BN=({children:n,location:t})=>{const e=nu(),[s]=kd(e);typeof window<"u"&&(window.__WOUTER_ROUTES__||(window.__WOUTER_ROUTES__=[]),S0(n).forEach(l=>{if(G.isValidElement(l)&&l.props.path){const u=l.props.path;window.__WOUTER_ROUTES__.includes(u)||window.__WOUTER_ROUTES__.push(u)}}));for(const r of S0(n)){let l=0;if(G.isValidElement(r)&&(l=KE(e.parser,r.props.path,t||s,r.props.nest))[0])return G.cloneElement(r,{match:l})}return null};function vb(){const[,n]=FN(),t=()=>{n("/")};return y.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:14",className:"min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100",children:y.jsx(JD,{"data-loc":"client/src/pages/NotFound.tsx:15",className:"w-full max-w-lg mx-4 shadow-lg border-0 bg-white/80 backdrop-blur-sm",children:y.jsxs($D,{"data-loc":"client/src/pages/NotFound.tsx:16",className:"pt-8 pb-8 text-center",children:[y.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:17",className:"flex justify-center mb-6",children:y.jsxs("div",{"data-loc":"client/src/pages/NotFound.tsx:18",className:"relative",children:[y.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:19",className:"absolute inset-0 bg-red-100 rounded-full animate-pulse"}),y.jsx(oN,{"data-loc":"client/src/pages/NotFound.tsx:20",className:"relative h-16 w-16 text-red-500"})]})}),y.jsx("h1",{"data-loc":"client/src/pages/NotFound.tsx:24",className:"text-4xl font-bold text-slate-900 mb-2",children:"404"}),y.jsx("h2",{"data-loc":"client/src/pages/NotFound.tsx:26",className:"text-xl font-semibold text-slate-700 mb-4",children:"Page Not Found"}),y.jsxs("p",{"data-loc":"client/src/pages/NotFound.tsx:30",className:"text-slate-600 mb-8 leading-relaxed",children:["Sorry, the page you are looking for doesn't exist.",y.jsx("br",{"data-loc":"client/src/pages/NotFound.tsx:32"}),"It may have been moved or deleted."]}),y.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:36",className:"flex flex-col sm:flex-row gap-3 justify-center",children:y.jsxs(QD,{"data-loc":"client/src/pages/NotFound.tsx:37",onClick:t,className:"bg-blue-600 hover:bg-blue-700 text-white px-6 py-2.5 rounded-lg transition-all duration-200 shadow-md hover:shadow-lg",children:[y.jsx(_d,{"data-loc":"client/src/pages/NotFound.tsx:41",className:"w-4 h-4 mr-2"}),"Go Home"]})})]})})})}class VN extends G.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}render(){return this.state.hasError?y.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:27",className:"flex items-center justify-center min-h-screen p-8 bg-background",children:y.jsxs("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:28",className:"flex flex-col items-center w-full max-w-2xl p-8",children:[y.jsx(pN,{"data-loc":"client/src/components/ErrorBoundary.tsx:29",size:48,className:"text-destructive mb-6 flex-shrink-0"}),y.jsx("h2",{"data-loc":"client/src/components/ErrorBoundary.tsx:34",className:"text-xl mb-4",children:"An unexpected error occurred."}),y.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:36",className:"p-4 w-full rounded bg-muted overflow-auto mb-6",children:y.jsx("pre",{"data-loc":"client/src/components/ErrorBoundary.tsx:37",className:"text-sm text-muted-foreground whitespace-break-spaces",children:this.state.error?.stack})}),y.jsxs("button",{"data-loc":"client/src/components/ErrorBoundary.tsx:42",onClick:()=>window.location.reload(),className:Hd("flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground","hover:opacity-90 cursor-pointer"),children:[y.jsx(Qg,{"data-loc":"client/src/components/ErrorBoundary.tsx:50",size:16}),"Reload Page"]})]})}):this.props.children}}const HN=G.createContext(void 0);function kN({children:n,defaultTheme:t="light",switchable:e=!1}){const[s,r]=G.useState(()=>e&&localStorage.getItem("theme")||t);G.useEffect(()=>{const u=document.documentElement;s==="dark"?u.classList.add("dark"):u.classList.remove("dark"),e&&localStorage.setItem("theme",s)},[s,e]);const l=e?()=>{r(u=>u==="light"?"dark":"light")}:void 0;return y.jsx(HN.Provider,{"data-loc":"client/src/contexts/ThemeContext.tsx:52",value:{theme:s,toggleTheme:l,switchable:e},children:n})}const tx=G.createContext({});function ex(n){const t=G.useRef(null);return t.current===null&&(t.current=n()),t.current}const nx=typeof window<"u",QE=nx?G.useLayoutEffect:G.useEffect,Gd=G.createContext(null);function ix(n,t){n.indexOf(t)===-1&&n.push(t)}function sx(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}const da=(n,t,e)=>e>t?t:e<n?n:e;let ax=()=>{};const ha={},JE=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function $E(n){return typeof n=="object"&&n!==null}const tT=n=>/^0[^.\s]+$/u.test(n);function rx(n){let t;return()=>(t===void 0&&(t=n()),t)}const Zi=n=>n,GN=(n,t)=>e=>t(n(e)),iu=(...n)=>n.reduce(GN),jc=(n,t,e)=>{const s=t-n;return s===0?1:(e-n)/s};class ox{constructor(){this.subscriptions=[]}add(t){return ix(this.subscriptions,t),()=>sx(this.subscriptions,t)}notify(t,e,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,e,s);else for(let l=0;l<r;l++){const u=this.subscriptions[l];u&&u(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Es=n=>n*1e3,qi=n=>n/1e3;function eT(n,t){return t?n*(1e3/t):0}const nT=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,jN=1e-7,WN=12;function XN(n,t,e,s,r){let l,u,f=0;do u=t+(e-t)/2,l=nT(u,s,r)-n,l>0?e=u:t=u;
vendor: 26,213 bytes, line 172
172while(Math.abs(l)>jN&&++f<WN);return u}function su(n,t,e,s){if(n===t&&e===s)return Zi;const r=l=>XN(l,0,1,n,e);return l=>l===0||l===1?l:nT(r(l),t,s)}const iT=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,sT=n=>t=>1-n(1-t),aT=su(.33,1.53,.69,.99),lx=sT(aT),rT=iT(lx),oT=n=>(n*=2)<1?.5*lx(n):.5*(2-Math.pow(2,-10*(n-1))),cx=n=>1-Math.sin(Math.acos(n)),lT=sT(cx),cT=iT(cx),YN=su(.42,0,1,1),qN=su(0,0,.58,1),uT=su(.42,0,.58,1),ZN=n=>Array.isArray(n)&&typeof n[0]!="number",fT=n=>Array.isArray(n)&&typeof n[0]=="number",KN={linear:Zi,easeIn:YN,easeInOut:uT,easeOut:qN,circIn:cx,circInOut:cT,circOut:lT,backIn:lx,backInOut:rT,backOut:aT,anticipate:oT},QN=n=>typeof n=="string",yb=n=>{if(fT(n)){ax(n.length===4);const[t,e,s,r]=n;return su(t,e,s,r)}else if(QN(n))return KN[n];return n},Af=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function JN(n,t){let e=new Set,s=new Set,r=!1,l=!1;const u=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function h(g){u.has(g)&&(d.schedule(g),n()),g(f)}const d={schedule:(g,m=!1,v=!1)=>{const M=v&&r?e:s;return m&&u.add(g),M.has(g)||M.add(g),g},cancel:g=>{s.delete(g),u.delete(g)},process:g=>{if(f=g,r){l=!0;return}r=!0,[e,s]=[s,e],e.forEach(h),e.clear(),r=!1,l&&(l=!1,d.process(g))}};return d}const $N=40;function dT(n,t){let e=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},l=()=>e=!0,u=Af.reduce((C,P)=>(C[P]=JN(l),C),{}),{setup:f,read:h,resolveKeyframes:d,preUpdate:g,update:m,preRender:v,render:_,postRender:M}=u,T=()=>{const C=ha.useManualTiming?r.timestamp:performance.now();e=!1,ha.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(C-r.timestamp,$N),1)),r.timestamp=C,r.isProcessing=!0,f.process(r),h.process(r),d.process(r),g.process(r),m.process(r),v.process(r),_.process(r),M.process(r),r.isProcessing=!1,e&&t&&(s=!1,n(T))},S=()=>{e=!0,s=!0,r.isProcessing||n(T)};return{schedule:Af.reduce((C,P)=>{const U=u[P];return C[P]=(F,L=!1,z=!1)=>(e||S(),U.schedule(F,L,z)),C},{}),cancel:C=>{for(let P=0;P<Af.length;P++)u[Af[P]].cancel(C)},state:r,steps:u}}const{schedule:dn,cancel:ar,state:Kn,steps:mm}=dT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zi,!0);let ad;function tL(){ad=void 0}const vi={now:()=>(ad===void 0&&vi.set(Kn.isProcessing||ha.useManualTiming?Kn.timestamp:performance.now()),ad),set:n=>{ad=n,queueMicrotask(tL)}},hT=n=>t=>typeof t=="string"&&t.startsWith(n),ux=hT("--"),eL=hT("var(--"),fx=n=>eL(n)?nL.test(n.split("/*")[0].trim()):!1,nL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ml={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Wc={...Ml,transform:n=>da(0,1,n)},wf={...Ml,default:1},Fc=n=>Math.round(n*1e5)/1e5,dx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iL(n){return n==null}const sL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hx=(n,t)=>e=>!!(typeof e=="string"&&sL.test(e)&&e.startsWith(n)||t&&!iL(e)&&Object.prototype.hasOwnProperty.call(e,t)),pT=(n,t,e)=>s=>{if(typeof s!="string")return s;const[r,l,u,f]=s.match(dx);return{[n]:parseFloat(r),[t]:parseFloat(l),[e]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},aL=n=>da(0,255,n),gm={...Ml,transform:n=>Math.round(aL(n))},Br={test:hx("rgb","red"),parse:pT("red","green","blue"),transform:({red:n,green:t,blue:e,alpha:s=1})=>"rgba("+gm.transform(n)+", "+gm.transform(t)+", "+gm.transform(e)+", "+Fc(Wc.transform(s))+")"};function rL(n){let t="",e="",s="",r="";return n.length>5?(t=n.substring(1,3),e=n.substring(3,5),s=n.substring(5,7),r=n.substring(7,9)):(t=n.substring(1,2),e=n.substring(2,3),s=n.substring(3,4),r=n.substring(4,5),t+=t,e+=e,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const M0={test:hx("#"),parse:rL,transform:Br.transform},au=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),Ja=au("deg"),Ts=au("%"),ue=au("px"),oL=au("vh"),lL=au("vw"),_b={...Ts,parse:n=>Ts.parse(n)/100,transform:n=>Ts.transform(n*100)},$o={test:hx("hsl","hue"),parse:pT("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:e,alpha:s=1})=>"hsla("+Math.round(n)+", "+Ts.transform(Fc(t))+", "+Ts.transform(Fc(e))+", "+Fc(Wc.transform(s))+")"},wn={test:n=>Br.test(n)||M0.test(n)||$o.test(n),parse:n=>Br.test(n)?Br.parse(n):$o.test(n)?$o.parse(n):M0.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Br.transform(n):$o.transform(n),getAnimatableNone:n=>{const t=wn.parse(n);return t.alpha=0,wn.transform(t)}},cL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uL(n){return isNaN(n)&&typeof n=="string"&&(n.match(dx)?.length||0)+(n.match(cL)?.length||0)>0}const mT="number",gT="color",fL="var",dL="var(",bb="${}",hL=/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 Xc(n){const t=n.toString(),e=[],s={color:[],number:[],var:[]},r=[];let l=0;const f=t.replace(hL,h=>(wn.test(h)?(s.color.push(l),r.push(gT),e.push(wn.parse(h))):h.startsWith(dL)?(s.var.push(l),r.push(fL),e.push(h)):(s.number.push(l),r.push(mT),e.push(parseFloat(h))),++l,bb)).split(bb);return{values:e,split:f,indexes:s,types:r}}function xT(n){return Xc(n).values}function vT(n){const{split:t,types:e}=Xc(n),s=t.length;return r=>{let l="";for(let u=0;u<s;u++)if(l+=t[u],r[u]!==void 0){const f=e[u];f===mT?l+=Fc(r[u]):f===gT?l+=wn.transform(r[u]):l+=r[u]}return l}}const pL=n=>typeof n=="number"?0:wn.test(n)?wn.getAnimatableNone(n):n;function mL(n){const t=xT(n);return vT(n)(t.map(pL))}const rr={test:uL,parse:xT,createTransformer:vT,getAnimatableNone:mL};function xm(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function gL({hue:n,saturation:t,lightness:e,alpha:s}){n/=360,t/=100,e/=100;let r=0,l=0,u=0;if(!t)r=l=u=e;else{const f=e<.5?e*(1+t):e+t-e*t,h=2*e-f;r=xm(h,f,n+1/3),l=xm(h,f,n),u=xm(h,f,n-1/3)}return{red:Math.round(r*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:s}}function bd(n,t){return e=>e>0?t:n}const hn=(n,t,e)=>n+(t-n)*e,vm=(n,t,e)=>{const s=n*n,r=e*(t*t-s)+s;return r<0?0:Math.sqrt(r)},xL=[M0,Br,$o],vL=n=>xL.find(t=>t.test(n));function Sb(n){const t=vL(n);if(!t)return!1;let e=t.parse(n);return t===$o&&(e=gL(e)),e}const Mb=(n,t)=>{const e=Sb(n),s=Sb(t);if(!e||!s)return bd(n,t);const r={...e};return l=>(r.red=vm(e.red,s.red,l),r.green=vm(e.green,s.green,l),r.blue=vm(e.blue,s.blue,l),r.alpha=hn(e.alpha,s.alpha,l),Br.transform(r))},E0=new Set(["none","hidden"]);function yL(n,t){return E0.has(n)?e=>e<=0?n:t:e=>e>=1?t:n}function _L(n,t){return e=>hn(n,t,e)}function px(n){return typeof n=="number"?_L:typeof n=="string"?fx(n)?bd:wn.test(n)?Mb:ML:Array.isArray(n)?yT:typeof n=="object"?wn.test(n)?Mb:bL:bd}function yT(n,t){const e=[...n],s=e.length,r=n.map((l,u)=>px(l)(l,t[u]));return l=>{for(let u=0;u<s;u++)e[u]=r[u](l);return e}}function bL(n,t){const e={...n,...t},s={};for(const r in e)n[r]!==void 0&&t[r]!==void 0&&(s[r]=px(n[r])(n[r],t[r]));return r=>{for(const l in s)e[l]=s[l](r);return e}}function SL(n,t){const e=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const l=t.types[r],u=n.indexes[l][s[l]],f=n.values[u]??0;e[r]=f,s[l]++}return e}const ML=(n,t)=>{const e=rr.createTransformer(t),s=Xc(n),r=Xc(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?E0.has(n)&&!r.values.length||E0.has(t)&&!s.values.length?yL(n,t):iu(yT(SL(s,r),r.values),e):bd(n,t)};function _T(n,t,e){return typeof n=="number"&&typeof t=="number"&&typeof e=="number"?hn(n,t,e):px(n)(n,t)}const EL=n=>{const t=({timestamp:e})=>n(e);return{start:(e=!0)=>dn.update(t,e),stop:()=>ar(t),now:()=>Kn.isProcessing?Kn.timestamp:vi.now()}},bT=(n,t,e=10)=>{let s="";const r=Math.max(Math.round(t/e),2);for(let l=0;l<r;l++)s+=Math.round(n(l/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Sd=2e4;function mx(n){let t=0;const e=50;let s=n.next(t);for(;!s.done&&t<Sd;)t+=e,s=n.next(t);return t>=Sd?1/0:t}function TL(n,t=100,e){const s=e({...n,keyframes:[0,t]}),r=Math.min(mx(s),Sd);return{type:"keyframes",ease:l=>s.next(r*l).value/t,duration:qi(r)}}const AL=5;function ST(n,t,e){const s=Math.max(t-AL,0);return eT(e-n(s),t-s)}const gn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ym=.001;function wL({duration:n=gn.duration,bounce:t=gn.bounce,velocity:e=gn.velocity,mass:s=gn.mass}){let r,l,u=1-t;u=da(gn.minDamping,gn.maxDamping,u),n=da(gn.minDuration,gn.maxDuration,qi(n)),u<1?(r=d=>{const g=d*u,m=g*n,v=g-e,_=T0(d,u),M=Math.exp(-m);return ym-v/_*M},l=d=>{const m=d*u*n,v=m*e+e,_=Math.pow(u,2)*Math.pow(d,2)*n,M=Math.exp(-m),T=T0(Math.pow(d,2),u);return(-r(d)+ym>0?-1:1)*((v-_)*M)/T}):(r=d=>{const g=Math.exp(-d*n),m=(d-e)*n+1;return-ym+g*m},l=d=>{const g=Math.exp(-d*n),m=(e-d)*(n*n);return g*m});const f=5/n,h=RL(r,l,f);if(n=Es(n),isNaN(h))return{stiffness:gn.stiffness,damping:gn.damping,duration:n};{const d=Math.pow(h,2)*s;return{stiffness:d,damping:u*2*Math.sqrt(s*d),duration:n}}}const CL=12;function RL(n,t,e){let s=e;for(let r=1;r<CL;r++)s=s-n(s)/t(s);return s}function T0(n,t){return n*Math.sqrt(1-t*t)}const DL=["duration","bounce"],NL=["stiffness","damping","mass"];function Eb(n,t){return t.some(e=>n[e]!==void 0)}function LL(n){let t={velocity:gn.velocity,stiffness:gn.stiffness,damping:gn.damping,mass:gn.mass,isResolvedFromDuration:!1,...n};if(!Eb(n,NL)&&Eb(n,DL))if(n.visualDuration){const e=n.visualDuration,s=2*Math.PI/(e*1.2),r=s*s,l=2*da(.05,1,1-(n.bounce||0))*Math.sqrt(r);t={...t,mass:gn.mass,stiffness:r,damping:l}}else{const e=wL(n);t={...t,...e,mass:gn.mass},t.isResolvedFromDuration=!0}return t}function Md(n=gn.visualDuration,t=gn.bounce){const e=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:s,restDelta:r}=e;const l=e.keyframes[0],u=e.keyframes[e.keyframes.length-1],f={done:!1,value:l},{stiffness:h,damping:d,mass:g,duration:m,velocity:v,isResolvedFromDuration:_}=LL({...e,velocity:-qi(e.velocity||0)}),M=v||0,T=d/(2*Math.sqrt(h*g)),S=u-l,b=qi(Math.sqrt(h/g)),R=Math.abs(S)<5;s||(s=R?gn.restSpeed.granular:gn.restSpeed.default),r||(r=R?gn.restDelta.granular:gn.restDelta.default);let C;if(T<1){const U=T0(b,T);C=F=>{const L=Math.exp(-T*b*F);return u-L*((M+T*b*S)/U*Math.sin(U*F)+S*Math.cos(U*F))}}else if(T===1)C=U=>u-Math.exp(-b*U)*(S+(M+b*S)*U);else{const U=b*Math.sqrt(T*T-1);C=F=>{const L=Math.exp(-T*b*F),z=Math.min(U*F,300);return u-L*((M+T*b*S)*Math.sinh(z)+U*S*Math.cosh(z))/U}}const P={calculatedDuration:_&&m||null,next:U=>{const F=C(U);if(_)f.done=U>=m;else{let L=U===0?M:0;T<1&&(L=U===0?Es(M):ST(C,U,F));const z=Math.abs(L)<=s,w=Math.abs(u-F)<=r;f.done=z&&w}return f.value=f.done?u:F,f},toString:()=>{const U=Math.min(mx(P),Sd),F=bT(L=>P.next(U*L).value,U,30);return U+"ms "+F},toTransition:()=>{}};return P}Md.applyToOptions=n=>{const t=TL(n,100,Md);return n.ease=t.ease,n.duration=Es(t.duration),n.type="keyframes",n};function A0({keyframes:n,velocity:t=0,power:e=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:l=500,modifyTarget:u,min:f,max:h,restDelta:d=.5,restSpeed:g}){const m=n[0],v={done:!1,value:m},_=z=>f!==void 0&&z<f||h!==void 0&&z>h,M=z=>f===void 0?h:h===void 0||Math.abs(f-z)<Math.abs(h-z)?f:h;let T=e*t;const S=m+T,b=u===void 0?S:u(S);b!==S&&(T=b-m);const R=z=>-T*Math.exp(-z/s),C=z=>b+R(z),P=z=>{const w=R(z),O=C(z);v.done=Math.abs(w)<=d,v.value=v.done?b:O};let U,F;const L=z=>{_(v.value)&&(U=z,F=Md({keyframes:[v.value,M(v.value)],velocity:ST(C,z,v.value),damping:r,stiffness:l,restDelta:d,restSpeed:g}))};return L(0),{calculatedDuration:null,next:z=>{let w=!1;return!F&&U===void 0&&(w=!0,P(z),L(z)),U!==void 0&&z>=U?F.next(z-U):(!w&&P(z),v)}}}function PL(n,t,e){const s=[],r=e||ha.mix||_T,l=n.length-1;for(let u=0;u<l;u++){let f=r(n[u],n[u+1]);if(t){const h=Array.isArray(t)?t[u]||Zi:t;f=iu(h,f)}s.push(f)}return s}function UL(n,t,{clamp:e=!0,ease:s,mixer:r}={}){const l=n.length;if(ax(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=n[0]===n[1];n[0]>n[l-1]&&(n=[...n].reverse(),t=[...t].reverse());const f=PL(t,s,r),h=f.length,d=g=>{if(u&&g<n[0])return t[0];let m=0;if(h>1)for(;m<n.length-2&&!(g<n[m+1]);m++);const v=jc(n[m],n[m+1],g);return f[m](v)};return e?g=>d(da(n[0],n[l-1],g)):d}function OL(n,t){const e=n[n.length-1];for(let s=1;s<=t;s++){const r=jc(0,t,s);n.push(hn(e,1,r))}}function FL(n){const t=[0];return OL(t,n.length-1),t}function IL(n,t){return n.map(e=>e*t)}function zL(n,t){return n.map(()=>t||uT).splice(0,n.length-1)}function Ic({duration:n=300,keyframes:t,times:e,ease:s="easeInOut"}){const r=ZN(s)?s.map(yb):yb(s),l={done:!1,value:t[0]},u=IL(e&&e.length===t.length?e:FL(t),n),f=UL(u,t,{ease:Array.isArray(r)?r:zL(t,r)});return{calculatedDuration:n,next:h=>(l.value=f(h),l.done=h>=n,l)}}const BL=n=>n!==null;function gx(n,{repeat:t,repeatType:e="loop"},s,r=1){const l=n.filter(BL),f=r<0||t&&e!=="loop"&&t%2===1?0:l.length-1;return!f||s===void 0?l[f]:s}const VL={decay:A0,inertia:A0,tween:Ic,keyframes:Ic,spring:Md};function MT(n){typeof n.type=="string"&&(n.type=VL[n.type])}class xx{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const HL=n=>n/100;class vx extends xx{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==vi.now()&&this.tick(vi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;MT(t);const{type:e=Ic,repeat:s=0,repeatDelay:r=0,repeatType:l,velocity:u=0}=t;let{keyframes:f}=t;const h=e||Ic;h!==Ic&&typeof f[0]!="number"&&(this.mixKeyframes=iu(HL,_T(f[0],f[1])),f=[0,100]);const d=h({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...f].reverse(),velocity:-u})),d.calculatedDuration===null&&(d.calculatedDuration=mx(d));const{calculatedDuration:g}=d;this.calculatedDuration=g,this.resolvedDuration=g+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:s,totalDuration:r,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:f,calculatedDuration:h}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:g,repeat:m,repeatType:v,repeatDelay:_,type:M,onUpdate:T,finalKeyframe:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const b=this.currentTime-d*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?b<0:b>r;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let C=this.currentTime,P=s;if(m){const z=Math.min(this.currentTime,r)/f;let w=Math.floor(z),O=z%1;!O&&z>=1&&(O=1),O===1&&w--,w=Math.min(w,m+1),!!(w%2)&&(v==="reverse"?(O=1-O,_&&(O-=_/f)):v==="mirror"&&(P=u)),C=da(0,1,O)*f}const U=R?{done:!1,value:g[0]}:P.next(C);l&&(U.value=l(U.value));let{done:F}=U;!R&&h!==null&&(F=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return L&&M!==A0&&(U.value=gx(g,this.options,S,this.speed)),T&&T(U.value),L&&this.finish(),U}then(t,e){return this.finished.then(t,e)}get duration(){return qi(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+qi(t)}get time(){return qi(this.currentTime)}set time(t){t=Es(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(vi.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=qi(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=EL,startTime:e}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=e??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function kL(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const Vr=n=>n*180/Math.PI,w0=n=>{const t=Vr(Math.atan2(n[1],n[0]));return C0(t)},GL={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:w0,rotateZ:w0,skewX:n=>Vr(Math.atan(n[1])),skewY:n=>Vr(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},C0=n=>(n=n%360,n<0&&(n+=360),n),Tb=w0,Ab=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),wb=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),jL={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ab,scaleY:wb,scale:n=>(Ab(n)+wb(n))/2,rotateX:n=>C0(Vr(Math.atan2(n[6],n[5]))),rotateY:n=>C0(Vr(Math.atan2(-n[2],n[0]))),rotateZ:Tb,rotate:Tb,skewX:n=>Vr(Math.atan(n[4])),skewY:n=>Vr(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function R0(n){return n.includes("scale")?1:0}function D0(n,t){if(!n||n==="none")return R0(t);const e=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(e)s=jL,r=e;else{const f=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=GL,r=f}if(!r)return R0(t);const l=s[t],u=r[1].split(",").map(XL);return typeof l=="function"?l(u):u[l]}const WL=(n,t)=>{const{transform:e="none"}=getComputedStyle(n);return D0(e,t)};function XL(n){return parseFloat(n.trim())}const El=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tl=new Set(El),Cb=n=>n===Ml||n===ue,YL=new Set(["x","y","z"]),qL=El.filter(n=>!YL.has(n));function ZL(n){const t=[];return qL.forEach(e=>{const s=n.getValue(e);s!==void 0&&(t.push([e,s.get()]),s.set(e.startsWith("scale")?1:0))}),t}const Gr={width:({x:n},{paddingLeft:t="0",paddingRight:e="0"})=>n.max-n.min-parseFloat(t)-parseFloat(e),height:({y:n},{paddingTop:t="0",paddingBottom:e="0"})=>n.max-n.min-parseFloat(t)-parseFloat(e),top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>D0(t,"x"),y:(n,{transform:t})=>D0(t,"y")};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const jr=new Set;let N0=!1,L0=!1,P0=!1;function ET(){if(L0){const n=Array.from(jr).filter(s=>s.needsMeasurement),t=new Set(n.map(s=>s.element)),e=new Map;t.forEach(s=>{const r=ZL(s);r.length&&(e.set(s,r),s.render())}),n.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=e.get(s);r&&r.forEach(([l,u])=>{s.getValue(l)?.set(u)})}),n.forEach(s=>s.measureEndState()),n.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}L0=!1,N0=!1,jr.forEach(n=>n.complete(P0)),jr.clear()}function TT(){jr.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(L0=!0)})}function KL(){P0=!0,TT(),ET(),P0=!1}class yx{constructor(t,e,s,r,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=r,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(jr.add(this),N0||(N0=!0,dn.read(TT),dn.resolveKeyframes(ET))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:r}=this;if(t[0]===null){const l=r?.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(s&&e){const f=s.readValue(e,u);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=u),r&&l===void 0&&r.set(t[0])}kL(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),jr.delete(this)}cancel(){this.state==="scheduled"&&(jr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const QL=n=>n.startsWith("--");function JL(n,t,e){QL(t)?n.style.setProperty(t,e):n.style[t]=e}const $L=rx(()=>window.ScrollTimeline!==void 0),t4={};function e4(n,t){const e=rx(n);return()=>t4[t]??e()}const AT=e4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pc=([n,t,e,s])=>`cubic-bezier(${n}, ${t}, ${e}, ${s})`,Rb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pc([0,.65,.55,1]),circOut:Pc([.55,0,1,.45]),backIn:Pc([.31,.01,.66,-.59]),backOut:Pc([.33,1.53,.69,.99])};function wT(n,t){if(n)return typeof n=="function"?AT()?bT(n,t):"ease-out":fT(n)?Pc(n):Array.isArray(n)?n.map(e=>wT(e,t)||Rb.easeOut):Rb[n]}function n4(n,t,e,{delay:s=0,duration:r=300,repeat:l=0,repeatType:u="loop",ease:f="easeOut",times:h}={},d=void 0){const g={[t]:e};h&&(g.offset=h);const m=wT(f,r);Array.isArray(m)&&(g.easing=m);const v={delay:s,duration:r,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return d&&(v.pseudoElement=d),n.animate(g,v)}function CT(n){return typeof n=="function"&&"applyToOptions"in n}function i4({type:n,...t}){return CT(n)&&AT()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class s4 extends xx{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:s,keyframes:r,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:f,onComplete:h}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,ax(typeof t.type!="string");const d=i4(t);this.animation=n4(e,s,r,d,l),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const g=gx(r,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(g):JL(e,s,g),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return qi(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+qi(t)}get time(){return qi(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Es(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&$L()?(this.animation.timeline=t,Zi):e(this)}}const RT={anticipate:oT,backInOut:rT,circInOut:cT};function a4(n){return n in RT}function r4(n){typeof n.ease=="string"&&a4(n.ease)&&(n.ease=RT[n.ease])}const Db=10;class o4 extends s4{constructor(t){r4(t),MT(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:s,onComplete:r,element:l,...u}=this.options;if(!e)return;if(t!==void 0){e.set(t);return}const f=new vx({...u,autoplay:!1}),h=Es(this.finishedTime??this.time);e.setWithVelocity(f.sample(h-Db).value,f.sample(h).value,Db),f.stop()}}const Nb=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(rr.test(n)||n==="0")&&!n.startsWith("url("));function l4(n){const t=n[0];if(n.length===1)return!0;for(let e=0;e<n.length;e++)if(n[e]!==t)return!0}function c4(n,t,e,s){const r=n[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const l=n[n.length-1],u=Nb(r,t),f=Nb(l,t);return!u||!f?!1:l4(n)||(e==="spring"||CT(e))&&s}function U0(n){n.duration=0,n.type="keyframes"}const u4=new Set(["opacity","clipPath","filter","transform"]),f4=rx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function d4(n){const{motionValue:t,name:e,repeatDelay:s,repeatType:r,damping:l,type:u}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:d}=t.owner.getProps();return f4()&&e&&u4.has(e)&&(e!=="transform"||!d)&&!h&&!s&&r!=="mirror"&&l!==0&&u!=="inertia"}const h4=40;class p4 extends xx{constructor({autoplay:t=!0,delay:e=0,type:s="
172keyframes",repeat:r=0,repeatDelay:l=0,repeatType:u="loop",keyframes:f,name:h,motionValue:d,element:g,...m}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vi.now();const v={autoplay:t,delay:e,type:s,repeat:r,repeatDelay:l,repeatType:u,name:h,motionValue:d,element:g,...m},_=g?.KeyframeResolver||yx;this.keyframeResolver=new _(f,(M,T,S)=>this.onKeyframesResolved(M,T,v,!S),h,d,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,s,r){this.keyframeResolver=void 0;const{name:l,type:u,velocity:f,delay:h,isHandoff:d,onUpdate:g}=s;this.resolvedAt=vi.now(),c4(t,l,u,f)||((ha.instantAnimations||!h)&&g?.(gx(t,s,e)),t[0]=t[t.length-1],U0(s),s.repeat=0);const v={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>h4?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:e,...s,keyframes:t},_=!d&&d4(v)?new o4({...v,element:v.motionValue.owner.current}):new vx(v);_.finished.then(()=>this.notifyFinished()).catch(Zi),this.pendingTimeline&&(this.stopTimeline=_.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=_}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),KL()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const m4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function g4(n){const t=m4.exec(n);if(!t)return[,];const[,e,s,r]=t;return[`--${e??s}`,r]}function DT(n,t,e=1){const[s,r]=g4(n);if(!s)return;const l=window.getComputedStyle(t).getPropertyValue(s);if(l){const u=l.trim();return JE(u)?parseFloat(u):u}return fx(r)?DT(r,t,e+1):r}function _x(n,t){return n?.[t]??n?.default??n}const NT=new Set(["width","height","top","left","right","bottom",...El]),x4={test:n=>n==="auto",parse:n=>n},LT=n=>t=>t.test(n),PT=[Ml,ue,Ts,Ja,lL,oL,x4],Lb=n=>PT.find(LT(n));function v4(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||tT(n):!0}const y4=new Set(["brightness","contrast","saturate","opacity"]);function _4(n){const[t,e]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[s]=e.match(dx)||[];if(!s)return n;const r=e.replace(s,"");let l=y4.has(t)?1:0;return s!==e&&(l*=100),t+"("+l+r+")"}const b4=/\b([a-z-]*)\(.*?\)/gu,O0={...rr,getAnimatableNone:n=>{const t=n.match(b4);return t?t.map(_4).join(" "):n}},Pb={...Ml,transform:Math.round},S4={rotate:Ja,rotateX:Ja,rotateY:Ja,rotateZ:Ja,scale:wf,scaleX:wf,scaleY:wf,scaleZ:wf,skew:Ja,skewX:Ja,skewY:Ja,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:Wc,originX:_b,originY:_b,originZ:ue},bx={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue,...S4,zIndex:Pb,fillOpacity:Wc,strokeOpacity:Wc,numOctaves:Pb},M4={...bx,color:wn,backgroundColor:wn,outlineColor:wn,fill:wn,stroke:wn,borderColor:wn,borderTopColor:wn,borderRightColor:wn,borderBottomColor:wn,borderLeftColor:wn,filter:O0,WebkitFilter:O0},UT=n=>M4[n];function OT(n,t){let e=UT(n);return e!==O0&&(e=rr),e.getAnimatableNone?e.getAnimatableNone(t):void 0}
vendor: 39,826 bytes, lines 172-180
172const E4=new Set(["auto","none","0"]);function T4(n,t,e){let s=0,r;for(;s<n.length&&!r;){const l=n[s];typeof l=="string"&&!E4.has(l)&&Xc(l).values.length&&(r=n[s]),s++}if(r&&e)for(const l of t)n[l]=OT(e,r)}class A4 extends yx{constructor(t,e,s,r,l){super(t,e,s,r,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:s}=this;if(!e||!e.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let d=t[h];if(typeof d=="string"&&(d=d.trim(),fx(d))){const g=DT(d,e.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!NT.has(s)||t.length!==2)return;const[r,l]=t,u=Lb(r),f=Lb(l);if(u!==f)if(Cb(u)&&Cb(f))for(let h=0;h<t.length;h++){const d=t[h];typeof d=="string"&&(t[h]=parseFloat(d))}else Gr[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||v4(t[r]))&&s.push(r);s.length&&T4(t,s,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gr[s](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const r=e[e.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(e);r&&r.jump(this.measuredOrigin,!1);const l=s.length-1,u=s[l];s[l]=Gr[e](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,h])=>{t.getValue(f).set(h)}),this.resolveNoneKeyframes()}}function w4(n,t,e){if(n instanceof EventTarget)return[n];if(typeof n=="string"){let s=document;const r=e?.[n]??s.querySelectorAll(n);return r?Array.from(r):[]}return Array.from(n)}const FT=(n,t)=>t&&typeof n=="number"?t.transform(n):n;function IT(n){return $E(n)&&"offsetHeight"in n}const Ub=30,C4=n=>!isNaN(parseFloat(n));class R4{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const r=vi.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=vi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=C4(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ox);const s=this.events[t].add(e);return t==="change"?()=>{s(),dn.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=vi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ub)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Ub);return eT(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dl(n,t){return new R4(n,t)}const{schedule:Sx}=dT(queueMicrotask,!1),rs={x:!1,y:!1};function zT(){return rs.x||rs.y}function D4(n){return n==="x"||n==="y"?rs[n]?null:(rs[n]=!0,()=>{rs[n]=!1}):rs.x||rs.y?null:(rs.x=rs.y=!0,()=>{rs.x=rs.y=!1})}function BT(n,t){const e=w4(n),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[e,r,()=>s.abort()]}function Ob(n){return!(n.pointerType==="touch"||zT())}function N4(n,t,e={}){const[s,r,l]=BT(n,e),u=f=>{if(!Ob(f))return;const{target:h}=f,d=t(h,f);if(typeof d!="function"||!h)return;const g=m=>{Ob(m)&&(d(m),h.removeEventListener("pointerleave",g))};h.addEventListener("pointerleave",g,r)};return s.forEach(f=>{f.addEventListener("pointerenter",u,r)}),l}const VT=(n,t)=>t?n===t?!0:VT(n,t.parentElement):!1,Mx=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,L4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function P4(n){return L4.has(n.tagName)||n.tabIndex!==-1}const rd=new WeakSet;function Fb(n){return t=>{t.key==="Enter"&&n(t)}}function _m(n,t){n.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const U4=(n,t)=>{const e=n.currentTarget;if(!e)return;const s=Fb(()=>{if(rd.has(e))return;_m(e,"down");const r=Fb(()=>{_m(e,"up")}),l=()=>_m(e,"cancel");e.addEventListener("keyup",r,t),e.addEventListener("blur",l,t)});e.addEventListener("keydown",s,t),e.addEventListener("blur",()=>e.removeEventListener("keydown",s),t)};function Ib(n){return Mx(n)&&!zT()}function O4(n,t,e={}){const[s,r,l]=BT(n,e),u=f=>{const h=f.currentTarget;if(!Ib(f))return;rd.add(h);const d=t(h,f),g=(_,M)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",v),rd.has(h)&&rd.delete(h),Ib(_)&&typeof d=="function"&&d(_,{success:M})},m=_=>{g(_,h===window||h===document||e.useGlobalTarget||VT(h,_.target))},v=_=>{g(_,!1)};window.addEventListener("pointerup",m,r),window.addEventListener("pointercancel",v,r)};return s.forEach(f=>{(e.useGlobalTarget?window:f).addEventListener("pointerdown",u,r),IT(f)&&(f.addEventListener("focus",d=>U4(d,r)),!P4(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function HT(n){return $E(n)&&"ownerSVGElement"in n}function F4(n){return HT(n)&&n.tagName==="svg"}const ei=n=>!!(n&&n.getVelocity),I4=[...PT,wn,rr],z4=n=>I4.find(LT(n)),Ex=G.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function zb(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function B4(...n){return t=>{let e=!1;const s=n.map(r=>{const l=zb(r,t);return!e&&typeof l=="function"&&(e=!0),l});if(e)return()=>{for(let r=0;r<s.length;r++){const l=s[r];typeof l=="function"?l():zb(n[r],null)}}}}function V4(...n){return G.useCallback(B4(...n),n)}class H4 extends G.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const s=e.offsetParent,r=IT(s)&&s.offsetWidth||0,l=this.props.sizeRef.current;l.height=e.offsetHeight||0,l.width=e.offsetWidth||0,l.top=e.offsetTop,l.left=e.offsetLeft,l.right=r-l.width-l.left}return null}componentDidUpdate(){}render(){return this.props.children}}function k4({children:n,isPresent:t,anchorX:e,root:s}){const r=G.useId(),l=G.useRef(null),u=G.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:f}=G.useContext(Ex),h=V4(l,n?.ref);return G.useInsertionEffect(()=>{const{width:d,height:g,top:m,left:v,right:_}=u.current;if(t||!l.current||!d||!g)return;const M=e==="left"?`left: ${v}`:`right: ${_}`;l.current.dataset.motionPopId=r;const T=document.createElement("style");f&&(T.nonce=f);const S=s??document.head;return S.appendChild(T),T.sheet&&T.sheet.insertRule(` 173 [data-motion-pop-id="${r}"] { 174 position: absolute !important; 175 width: ${d}px !important; 176 height: ${g}px !important; 177 ${M}px !important; 178 top: ${m}px !important; 179 } 180 `),()=>{S.contains(T)&&S.removeChild(T)}},[t]),y.jsx(H4,{isPresent:t,childRef:l,sizeRef:u,children:G.cloneElement(n,{ref:h})})}const G4=({children:n,initial:t,isPresent:e,onExitComplete:s,custom:r,presenceAffectsLayout:l,mode:u,anchorX:f,root:h})=>{const d=ex(j4),g=G.useId();let m=!0,v=G.useMemo(()=>(m=!1,{id:g,initial:t,isPresent:e,custom:r,onExitComplete:_=>{d.set(_,!0);for(const M of d.values())if(!M)return;s&&s()},register:_=>(d.set(_,!1),()=>d.delete(_))}),[e,d,s]);return l&&m&&(v={...v}),G.useMemo(()=>{d.forEach((_,M)=>d.set(M,!1))},[e]),G.useEffect(()=>{!e&&!d.size&&s&&s()},[e]),u==="popLayout"&&(n=y.jsx(k4,{isPresent:e,anchorX:f,root:h,children:n})),y.jsx(Gd.Provider,{value:v,children:n})};function j4(){return new Map}function kT(n=!0){const t=G.useContext(Gd);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:s,register:r}=t,l=G.useId();G.useEffect(()=>{if(n)return r(l)},[n]);const u=G.useCallback(()=>n&&s&&s(l),[l,s,n]);return!e&&s?[!1,u]:[!0]}const Cf=n=>n.key||"";function Bb(n){const t=[];return G.Children.forEach(n,e=>{G.isValidElement(e)&&t.push(e)}),t}const Al=({children:n,custom:t,initial:e=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:l="sync",propagate:u=!1,anchorX:f="left",root:h})=>{const[d,g]=kT(u),m=G.useMemo(()=>Bb(n),[n]),v=u&&!d?[]:m.map(Cf),_=G.useRef(!0),M=G.useRef(m),T=ex(()=>new Map),[S,b]=G.useState(m),[R,C]=G.useState(m);QE(()=>{_.current=!1,M.current=m;for(let F=0;F<R.length;F++){const L=Cf(R[F]);v.includes(L)?T.delete(L):T.get(L)!==!0&&T.set(L,!1)}},[R,v.length,v.join("-")]);const P=[];if(m!==S){let F=[...m];for(let L=0;L<R.length;L++){const z=R[L],w=Cf(z);v.includes(w)||(F.splice(L,0,z),P.push(z))}return l==="wait"&&P.length&&(F=P),C(Bb(F)),b(m),null}const{forceRender:U}=G.useContext(tx);return y.jsx(y.Fragment,{children:R.map(F=>{const L=Cf(F),z=u&&!d?!1:m===R||v.includes(L),w=()=>{if(T.has(L))T.set(L,!0);else return;let O=!0;T.forEach(j=>{j||(O=!1)}),O&&(U?.(),C(M.current),u&&g?.(),s&&s())};return y.jsx(G4,{isPresent:z,initial:!_.current||e?void 0:!1,custom:t,presenceAffectsLayout:r,mode:l,root:h,onExitComplete:z?void 0:w,anchorX:f,children:F},L)})})},GT=G.createContext({strict:!1}),Vb={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"]},hl={};for(const n in Vb)hl[n]={isEnabled:t=>Vb[n].some(e=>!!t[e])};function W4(n){for(const t in n)hl[t]={...hl[t],...n[t]}}const X4=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 Ed(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||X4.has(n)}let jT=n=>!Ed(n);function Y4(n){typeof n=="function"&&(jT=t=>t.startsWith("on")?!Ed(t):n(t))}try{Y4(require("@emotion/is-prop-valid").default)}catch{}function q4(n,t,e){const s={};for(const r in n)r==="values"&&typeof n.values=="object"||(jT(r)||e===!0&&Ed(r)||!t&&!Ed(r)||n.draggable&&r.startsWith("onDrag"))&&(s[r]=n[r]);return s}const jd=G.createContext({});function Wd(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Yc(n){return typeof n=="string"||Array.isArray(n)}const Tx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ax=["initial",...Tx];function Xd(n){return Wd(n.animate)||Ax.some(t=>Yc(n[t]))}function WT(n){return!!(Xd(n)||n.variants)}function Z4(n,t){if(Xd(n)){const{initial:e,animate:s}=n;return{initial:e===!1||Yc(e)?e:void 0,animate:Yc(s)?s:void 0}}return n.inherit!==!1?t:{}}function K4(n){const{initial:t,animate:e}=Z4(n,G.useContext(jd));return G.useMemo(()=>({initial:t,animate:e}),[Hb(t),Hb(e)])}function Hb(n){return Array.isArray(n)?n.join(" "):n}const qc={};function Q4(n){for(const t in n)qc[t]=n[t],ux(t)&&(qc[t].isCSSVariable=!0)}function XT(n,{layout:t,layoutId:e}){return Tl.has(n)||n.startsWith("origin")||(t||e!==void 0)&&(!!qc[n]||n==="opacity")}const J4={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$4=El.length;function tP(n,t,e){let s="",r=!0;for(let l=0;l<$4;l++){const u=El[l],f=n[u];if(f===void 0)continue;let h=!0;if(typeof f=="number"?h=f===(u.startsWith("scale")?1:0):h=parseFloat(f)===0,!h||e){const d=FT(f,bx[u]);if(!h){r=!1;const g=J4[u]||u;s+=`${g}(${d}) `}e&&(t[u]=d)}}return s=s.trim(),e?s=e(t,r?"":s):r&&(s="none"),s}function wx(n,t,e){const{style:s,vars:r,transformOrigin:l}=n;let u=!1,f=!1;for(const h in t){const d=t[h];if(Tl.has(h)){u=!0;continue}else if(ux(h)){r[h]=d;continue}else{const g=FT(d,bx[h]);h.startsWith("origin")?(f=!0,l[h]=g):s[h]=g}}if(t.transform||(u||e?s.transform=tP(t,n.transform,e):s.transform&&(s.transform="none")),f){const{originX:h="50%",originY:d="50%",originZ:g=0}=l;s.transformOrigin=`${h} ${d} ${g}`}}const Cx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YT(n,t,e){for(const s in t)!ei(t[s])&&!XT(s,e)&&(n[s]=t[s])}function eP({transformTemplate:n},t){return G.useMemo(()=>{const e=Cx();return wx(e,t,n),Object.assign({},e.vars,e.style)},[t])}function nP(n,t){const e=n.style||{},s={};return YT(s,e,n),Object.assign(s,eP(n,t)),s}function iP(n,t){const e={},s=nP(n,t);return n.drag&&n.dragListener!==!1&&(e.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(e.tabIndex=0),e.style=s,e}const sP={offset:"stroke-dashoffset",array:"stroke-dasharray"},aP={offset:"strokeDashoffset",array:"strokeDasharray"};function rP(n,t,e=1,s=0,r=!0){n.pathLength=1;const l=r?sP:aP;n[l.offset]=ue.transform(-s);const u=ue.transform(t),f=ue.transform(e);n[l.array]=`${u} ${f}`}function qT(n,{attrX:t,attrY:e,attrScale:s,pathLength:r,pathSpacing:l=1,pathOffset:u=0,...f},h,d,g){if(wx(n,f,d),h){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:m,style:v}=n;m.transform&&(v.transform=m.transform,delete m.transform),(v.transform||m.transformOrigin)&&(v.transformOrigin=m.transformOrigin??"50% 50%",delete m.transformOrigin),v.transform&&(v.transformBox=g?.transformBox??"fill-box",delete m.transformBox),t!==void 0&&(m.x=t),e!==void 0&&(m.y=e),s!==void 0&&(m.scale=s),r!==void 0&&rP(m,r,l,u,!1)}const ZT=()=>({...Cx(),attrs:{}}),KT=n=>typeof n=="string"&&n.toLowerCase()==="svg";function oP(n,t,e,s){const r=G.useMemo(()=>{const l=ZT();return qT(l,t,KT(s),n.transformTemplate,n.style),{...l.attrs,style:{...l.style}}},[t]);if(n.style){const l={};YT(l,n.style,n),r.style={...l,...r.style}}return r}const lP=["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 Rx(n){return typeof n!="string"||n.includes("-")?!1:!!(lP.indexOf(n)>-1||/[A-Z]/u.test(n))}function cP(n,t,e,{latestValues:s},r,l=!1){const f=(Rx(n)?oP:iP)(t,s,r,n),h=q4(t,typeof n=="string",l),d=n!==G.Fragment?{...h,...f,ref:e}:{},{children:g}=t,m=G.useMemo(()=>ei(g)?g.get():g,[g]);return G.createElement(n,{...d,children:m})}function kb(n){const t=[{},{}];return n?.values.forEach((e,s)=>{t[0][s]=e.get(),t[1][s]=e.getVelocity()}),t}function Dx(n,t,e,s){if(typeof t=="function"){const[r,l]=kb(s);t=t(e!==void 0?e:n.custom,r,l)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[r,l]=kb(s);t=t(e!==void 0?e:n.custom,r,l)}return t}function od(n){return ei(n)?n.get():n}function uP({scrapeMotionValuesFromProps:n,createRenderState:t},e,s,r){return{latestValues:fP(e,s,r,n),renderState:t()}}function fP(n,t,e,s){const r={},l=s(n,{});for(const v in l)r[v]=od(l[v]);let{initial:u,animate:f}=n;const h=Xd(n),d=WT(n);t&&d&&!h&&n.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let g=e?e.initial===!1:!1;g=g||u===!1;const m=g?f:u;if(m&&typeof m!="boolean"&&!Wd(m)){const v=Array.isArray(m)?m:[m];for(let _=0;_<v.length;_++){const M=Dx(n,v[_]);if(M){const{transitionEnd:T,transition:S,...b}=M;for(const R in b){let C=b[R];if(Array.isArray(C)){const P=g?C.length-1:0;C=C[P]}C!==null&&(r[R]=C)}for(const R in T)r[R]=T[R]}}}return r}const QT=n=>(t,e)=>{const s=G.useContext(jd),r=G.useContext(Gd),l=()=>uP(n,t,s,r);return e?l():ex(l)};function Nx(n,t,e){const{style:s}=n,r={};for(const l in s)(ei(s[l])||t.style&&ei(t.style[l])||XT(l,n)||e?.getValue(l)?.liveStyle!==void 0)&&(r[l]=s[l]);return r}const dP=QT({scrapeMotionValuesFromProps:Nx,createRenderState:Cx});function JT(n,t,e){const s=Nx(n,t,e);for(const r in n)if(ei(n[r])||ei(t[r])){const l=El.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[l]=n[r]}return s}const hP=QT({scrapeMotionValuesFromProps:JT,createRenderState:ZT}),pP=Symbol.for("motionComponentSymbol");function tl(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function mP(n,t,e){return G.useCallback(s=>{s&&n.onMount&&n.onMount(s),t&&(s?t.mount(s):t.unmount()),e&&(typeof e=="function"?e(s):tl(e)&&(e.current=s))},[t])}const Lx=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gP="framerAppearId",$T="data-"+Lx(gP),t2=G.createContext({});function xP(n,t,e,s,r){const{visualElement:l}=G.useContext(jd),u=G.useContext(GT),f=G.useContext(Gd),h=G.useContext(Ex).reducedMotion,d=G.useRef(null);s=s||u.renderer,!d.current&&s&&(d.current=s(n,{visualState:t,parent:l,props:e,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h}));const g=d.current,m=G.useContext(t2);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&vP(d.current,e,r,m);const v=G.useRef(!1);G.useInsertionEffect(()=>{g&&v.current&&g.update(e,f)});const _=e[$T],M=G.useRef(!!_&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return QE(()=>{g&&(v.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),M.current&&g.animationState&&g.animationState.animateChanges())}),G.useEffect(()=>{g&&(!M.current&&g.animationState&&g.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),M.current=!1),g.enteringChildren=void 0)}),g}function vP(n,t,e,s){const{layoutId:r,layout:l,drag:u,dragConstraints:f,layoutScroll:h,layoutRoot:d,layoutCrossfade:g}=t;n.projection=new e(n.latestValues,t["data-framer-portal-id"]?void 0:e2(n.parent)),n.projection.setOptions({layoutId:r,layout:l,alwaysMeasureLayout:!!u||f&&tl(f),visualElement:n,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,crossfade:g,layoutScroll:h,layoutRoot:d})}function e2(n){if(n)return n.options.allowProjection!==!1?n.projection:e2(n.parent)}function bm(n,{forwardMotionProps:t=!1}={},e,s){e&&W4(e);const r=Rx(n)?hP:dP;function l(f,h){let d;const g={...G.useContext(Ex),...f,layoutId:yP(f)},{isStatic:m}=g,v=K4(f),_=r(f,m);if(!m&&nx){_P();const M=bP(g);d=M.MeasureLayout,v.visualElement=xP(n,_,g,s,M.ProjectionNode)}return y.jsxs(jd.Provider,{value:v,children:[d&&v.visualElement?y.jsx(d,{visualElement:v.visualElement,...g}):null,cP(n,f,mP(_,v.visualElement,h),_,m,t)]})}l.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const u=G.forwardRef(l);return u[pP]=n,u}function yP({layoutId:n}){const t=G.useContext(tx).id;return t&&n!==void 0?t+"-"+n:n}function _P(n,t){G.useContext(GT).strict}function bP(n){const{drag:t,layout:e}=hl;if(!t&&!e)return{};const s={...t,...e};return{MeasureLayout:t?.isEnabled(n)||e?.isEnabled(n)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function SP(n,t){if(typeof Proxy>"u")return bm;const e=new Map,s=(l,u)=>bm(l,u,n,t),r=(l,u)=>s(l,u);return new Proxy(r,{get:(l,u)=>u==="create"?s:(e.has(u)||e.set(u,bm(u,void 0,n,t)),e.get(u))})}function n2({top:n,left:t,right:e,bottom:s}){return{x:{min:t,max:e},y:{min:n,max:s}}}function MP({x:n,y:t}){return{top:t.min,right:n.max,bottom:t.max,left:n.min}}function EP(n,t){if(!t)return n;const e=t({x:n.left,y:n.top}),s=t({x:n.right,y:n.bottom});return{top:e.y,left:e.x,bottom:s.y,right:s.x}}function Sm(n){return n===void 0||n===1}function F0({scale:n,scaleX:t,scaleY:e}){return!Sm(n)||!Sm(t)||!Sm(e)}function Fr(n){return F0(n)||i2(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function i2(n){return Gb(n.x)||Gb(n.y)}function Gb(n){return n&&n!=="0%"}function Td(n,t,e){const s=n-e,r=t*s;return e+r}function jb(n,t,e,s,r){return r!==void 0&&(n=Td(n,r,s)),Td(n,e,s)+t}function I0(n,t=0,e=1,s,r){n.min=jb(n.min,t,e,s,r),n.max=jb(n.max,t,e,s,r)}function s2(n,{x:t,y:e}){I0(n.x,t.translate,t.scale,t.originPoint),I0(n.y,e.translate,e.scale,e.originPoint)}const Wb=.999999999999,Xb=1.0000000000001;function TP(n,t,e,s=!1){const r=e.length;if(!r)return;t.x=t.y=1;let l,u;for(let f=0;f<r;f++){l=e[f],u=l.projectionDelta;const{visualElement:h}=l.options;h&&h.props.style&&h.props.style.display==="contents"||(s&&l.options.layoutScroll&&l.scroll&&l!==l.root&&nl(n,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,s2(n,u)),s&&Fr(l.latestValues)&&nl(n,l.latestValues))}t.x<Xb&&t.x>Wb&&(t.x=1),t.y<Xb&&t.y>Wb&&(t.y=1)}function el(n,t){n.min=n.min+t,n.max=n.max+t}function Yb(n,t,e,s,r=.5){const l=hn(n.min,n.max,r);I0(n,t,e,l,s)}function nl(n,t){Yb(n.x,t.x,t.scaleX,t.scale,t.originX),Yb(n.y,t.y,t.scaleY,t.scale,t.originY)}function a2(n,t){return n2(EP(n.getBoundingClientRect(),t))}function AP(n,t,e){const s=a2(n,e),{scroll:r}=t;return r&&(el(s.x,r.offset.x),el(s.y,r.offset.y)),s}const qb=()=>({translate:0,scale:1,origin:0,originPoint:0}),il=()=>({x:qb(),y:qb()}),Zb=()=>({min:0,max:0}),_n=()=>({x:Zb(),y:Zb()}),z0={current:null},r2={current:!1};function wP(){if(r2.current=!0,!!nx)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>z0.current=n.matches;n.addEventListener("change",t),t()}else z0.current=!1}const CP=new WeakMap;function RP(n,t,e){for(const s in t){const r=t[s],l=e[s];if(ei(r))n.addValue(s,r);else if(ei(l))n.addValue(s,dl(r,{owner:n}));else if(l!==r)if(n.hasValue(s)){const u=n.getValue(s);u.liveStyle===!0?u.jump(r):u.hasAnimated||u.set(r)}else{const u=n.getStaticValue(s);n.addValue(s,dl(u!==void 0?u:r,{owner:n}))}}for(const s in e)t[s]===void 0&&n.removeValue(s);return t}const Kb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DP{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:r,blockInitialAnimation:l,visualState:u},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=vi.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,dn.render(this.render,!1,!0))};const{latestValues:h,renderState:d}=u;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=d,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=Xd(e),this.isVariantNode=WT(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...m}=this.scrapeMotionValuesFromProps(e,{},this);for(const v in m){const _=m[v];h[v]!==void 0&&ei(_)&&_.set(h[v])}}mount(t){this.current=t,CP.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,s)=>this.bindToMotionValue(s,e)),r2.current||wP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:z0.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ar(this.notifyUpdate),ar(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Tl.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=e.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&dn.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),l&&l(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in hl){const e=hl[t];if(!e)continue;const{isEnabled:s,Feature:r}=e;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_n()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let s=0;s<Kb.length;s++){const r=Kb[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const l="on"+r,u=t[l];u&&(this.propEventSubscriptions[r]=this.on(r,u))}this.prevMotionValues=RP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const s=this.values.get(t);e!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&e!==void 0&&(s=dl(e===null?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(JE(s)||tT(s))?s=parseFloat(s):!z4(s)&&rr.test(e)&&(s=OT(t,e)),this.setBaseTarget(t,ei(s)?s.get():s)),ei(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if(typeof e=="string"||typeof e=="object"){const l=Dx(this.props,e,this.presenceContext?.custom);l&&(s=l[t])}if(e&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ei(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new ox),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Sx.render(this.render)}}class o2 extends DP{constructor(){super(...arguments),this.KeyframeResolver=A4}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:s}){delete e[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ei(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function l2(n,{style:t,vars:e},s,r){const l=n.style;let u;for(u in t)l[u]=t[u];r?.applyProjectionStyles(l,s);for(u in e)l.setProperty(u,e[u])}function NP(n){return window.getComputedStyle(n)}class LP extends o2{constructor(){super(...arguments),this.type="html",this.renderInstance=l2}readValueFromInstance(t,e){if(Tl.has(e))return this.projection?.isProjecting?R0(e):WL(t,e);{const s=NP(t),r=(ux(e)?s.getPropertyValue(e):s[e])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:e}){return a2(t,e)}build(t,e,s){wx(t,e,s.transformTemplate)}scrapeMotionValuesFromProps(t,e,s){return Nx(t,e,s)}}const c2=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 PP(n,t,e,s){l2(n,t,void 0,s);for(const r in t.attrs)n.setAttribute(c2.has(r)?r:Lx(r),t.attrs[r])}class UP extends o2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_n}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Tl.has(e)){const s=UT(e);return s&&s.default||0}return e=c2.has(e)?e:Lx(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,s){return JT(t,e,s)}build(t,e,s){qT(t,e,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,e,s,r){PP(t,e,s,r)}mount(t){this.isSVGTag=KT(t.tagName),super.mount(t)}}const OP=(n,t)=>Rx(n)?new UP(t):new LP(t,{allowProjection:n!==G.Fragment});function rl(n,t,e){const s=n.getProps();return Dx(s,t,e!==void 0?e:s.custom,n)}const B0=n=>Array.isArray(n);function FP(n,t,e){n.hasValue(t)?n.getValue(t).set(e):n.addValue(t,dl(e))}function IP(n){return B0(n)?n[n.length-1]||0:n}function zP(n,t){const e=rl(n,t);let{transitionEnd:s={},transition:r={},...l}=e||{};l={...l,...s};for(const u in l){const f=IP(l[u]);FP(n,u,f)}}function BP(n){return!!(ei(n)&&n.add)}function V0(n,t){const e=n.getValue("willChange");if(BP(e))return e.add(t);if(!e&&ha.WillChange){const s=new ha.WillChange("auto");n.addValue("willChange",s),s.add(t)}}function u2(n){return n.props[$T]}const VP=n=>n!==null;function HP(n,{repeat:t,repeatType:e="loop"},s){const r=n.filter(VP),l=t&&e!=="loop"&&t%2===1?0:r.length-1;return r[l]}const kP={type:"spring",stiffness:500,damping:25,restSpeed:10},GP=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),jP={type:"keyframes",duration:.8},WP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},XP=(n,{keyframes:t})=>t.length>2?jP:Tl.has(n)?n.startsWith("scale")?GP(t[1]):kP:WP;function YP({when:n,delay:t,delayChildren:e,staggerChildren:s,staggerDirection:r,repeat:l,repeatType:u,repeatDelay:f,from:h,elapsed:d,...g}){return!!Object.keys(g).length}const Px=(n,t,e,s={},r,l)=>u=>{const f=_x(s,n)||{},h=f.delay||s.delay||0;let{elapsed:d=0}=s;d=d-Es(h);const g={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-d,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:n,motionValue:t,element:l?void 0:r};YP(f)||Object.assign(g,XP(n,g)),g.duration&&(g.duration=Es(g.duration)),g.repeatDelay&&(g.repeatDelay=Es(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let m=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(U0(g),g.delay===0&&(m=!0)),(ha.instantAnimations||ha.skipAnimations)&&(m=!0,U0(g),g.delay=0),g.allowFlatten=!f.type&&!f.ease,m&&!l&&t.get()!==void 0){const v=HP(g.keyframes,f);if(v!==void 0){dn.update(()=>{g.onUpdate(v),g.onComplete()});return}}return f.isSync?new vx(g):new p4(g)};function qP({protectedKeys:n,needsAnimating:t},e){const s=n.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,s}function f2(n,t,{delay:e=0,transitionOverride:s,type:r}={}){let{transition:l=n.getDefaultTransition(),transitionEnd:u,...f}=t;s&&(l=s);const h=[],d=r&&n.animationState&&n.animationState.getState()[r];for(const g in f){const m=n.getValue(g,n.latestValues[g]??null),v=f[g];if(v===void 0||d&&qP(d,g))continue;const _={delay:e,..._x(l||{},g)},M=m.get();if(M!==void 0&&!m.isAnimating&&!Array.isArray(v)&&v===M&&!_.velocity)continue;let T=!1;if(window.MotionHandoffAnimation){const b=u2(n);if(b){const R=window.MotionHandoffAnimation(b,g,dn);R!==null&&(_.startTime=R,T=!0)}}V0(n,g),m.start(Px(g,m,v,n.shouldReduceMotion&&NT.has(g)?{type:!1}:_,n,T));const S=m.animation;S&&h.push(S)}return u&&Promise.all(h).then(()=>{dn.update(()=>{u&&zP(n,u)})}),h}function d2(n,t,e,s=0,r=1){const l=Array.from(n).sort((d,g)=>d.sortNodePosition(g)).indexOf(t),u=n.size,f=(u-1)*s;return typeof e=="function"?e(l,u):r===1?l*s:f-l*s}function H0(n,t,e={}){const s=rl(n,t,e.type==="exit"?n.presenceContext?.custom:void 0);let{transition:r=n.getDefaultTransition()||{}}=s||{};e.transitionOverride&&(r=e.transitionOverride);const l=s?()=>Promise.all(f2(n,s,e)):()=>Promise.resolve(),u=n.variantChildren&&n.variantChildren.size?(h=0)=>{const{delayChildren:d=0,staggerChildren:g,staggerDirection:m}=r;return ZP(n,t,h,d,g,m,e)}:()=>Promise.resolve(),{when:f}=r;if(f){const[h,d]=f==="beforeChildren"?[l,u]:[u,l];return h().then(()=>d())}else return Promise.all([l(),u(e.delay)])}function ZP(n,t,e=0,s=0,r=0,l=1,u){const f=[];for(const h of n.variantChildren)h.notify("AnimationStart",t),f.push(H0(h,t,{...u,delay:e+(typeof s=="function"?0:s)+d2(n.variantChildren,h,s,r,l)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(f)}function KP(n,t,e={}){n.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(l=>H0(n,l,e));s=Promise.all(r)}else if(typeof t=="string")s=H0(n,t,e);else{const r=typeof t=="function"?rl(n,t,e.custom):t;s=Promise.all(f2(n,r,e))}return s.then(()=>{n.notify("AnimationComplete",t)})}function h2(n,t){if(!Array.isArray(t))return!1;const e=t.length;if(e!==n.length)return!1;for(let s=0;s<e;s++)if(t[s]!==n[s])return!1;return!0}const QP=Ax.length;function p2(n){if(!n)return;if(!n.isControllingVariants){const e=n.parent?p2(n.parent)||{}:{};return n.props.initial!==void 0&&(e.initial=n.props.initial),e}const t={};for(let e=0;e<QP;e++){const s=Ax[e],r=n.props[s];(Yc(r)||r===!1)&&(t[s]=r)}return t}const JP=[...Tx].reverse(),$P=Tx.length;function tU(n){return t=>Promise.all(t.map(({animation:e,options:s})=>KP(n,e,s)))}function eU(n){let t=tU(n),e=Qb(),s=!0;const r=h=>(d,g)=>{const m=rl(n,g,h==="exit"?n.presenceContext?.custom:void 0);if(m){const{transition:v,transitionEnd:_,...M}=m;d={...d,...M,..._}}return d};function l(h){t=h(n)}function u(h){const{props:d}=n,g=p2(n.parent)||{},m=[],v=new Set;let _={},M=1/0;for(let S=0;S<$P;S++){const b=JP[S],R=e[b],C=d[b]!==void 0?d[b]:g[b],P=Yc(C),U=b===h?R.isActive:null;U===!1&&(M=S);let F=C===g[b]&&C!==d[b]&&P;if(F&&s&&n.manuallyAnimateOnMount&&(F=!1),R.protectedKeys={..._},!R.isActive&&U===null||!C&&!R.prevProp||Wd(C)||typeof C=="boolean")continue;const L=nU(R.prevProp,C);let z=L||b===h&&R.isActive&&!F&&P||S>M&&P,w=!1;const O=Array.isArray(C)?C:[C];let j=O.reduce(r(b),{});U===!1&&(j={});const{prevResolvedValues:Q={}}=R,Z={...Q,...j},rt=V=>{z=!0,v.has(V)&&(w=!0,v.delete(V)),R.needsAnimating[V]=!0;const k=n.getValue(V);k&&(k.liveStyle=!1)};for(const V in Z){const k=j[V],gt=Q[V];if(_.hasOwnProperty(V))continue;let xt=!1;B0(k)&&B0(gt)?xt=!h2(k,gt):xt=k!==gt,xt?k!=null?rt(V):v.add(V):k!==void 0&&v.has(V)?rt(V):R.protectedKeys[V]=!0}R.prevProp=C,R.prevResolvedValues=j,R.isActive&&(_={..._,...j}),s&&n.blockInitialAnimation&&(z=!1);const ot=F&&L;z&&(!ot||w)&&m.push(...O.map(V=>{const k={type:b};if(typeof V=="string"&&s&&!ot&&n.manuallyAnimateOnMount&&n.parent){const{parent:gt}=n,xt=rl(gt,V);if(gt.enteringChildren&&xt){const{delayChildren:B}=xt.transition||{};k.delay=d2(gt.enteringChildren,n,B)}}return{animation:V,options:k}}))}if(v.size){const S={};if(typeof d.initial!="boolean"){const b=rl(n,Array.isArray(d.initial)?d.initial[0]:d.initial);b&&b.transition&&(S.transition=b.transition)}v.forEach(b=>{const R=n.getBaseTarget(b),C=n.getValue(b);C&&(C.liveStyle=!0),S[b]=R??null}),m.push({animation:S})}let T=!!m.length;return s&&(d.initial===!1||d.initial===d.animate)&&!n.manuallyAnimateOnMount&&(T=!1),s=!1,T?t(m):Promise.resolve()}function f(h,d){if(e[h].isActive===d)return Promise.resolve();n.variantChildren?.forEach(m=>m.animationState?.setActive(h,d)),e[h].isActive=d;const g=u(h);for(const m in e)e[m].protectedKeys={};return g}return{animateChanges:u,setActive:f,setAnimateFunction:l,getState:()=>e,reset:()=>{e=Qb(),s=!0}}}function nU(n,t){return typeof t=="string"?t!==n:Array.isArray(t)?!h2(t,n):!1}function Cr(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qb(){return{animate:Cr(!0),whileInView:Cr(),whileHover:Cr(),whileTap:Cr(),whileDrag:Cr(),whileFocus:Cr(),exit:Cr()}}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iU extends lr{constructor(t){super(t),t.animationState||(t.animationState=eU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let sU=0;class aU extends lr{constructor(){super(...arguments),this.id=sU++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);e&&!t&&r.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};
vendor: 5,517 bytes, line 180
180e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const rU={animation:{Feature:iU},exit:{Feature:aU}};function Zc(n,t,e,s={passive:!0}){return n.addEventListener(t,e,s),()=>n.removeEventListener(t,e)}function ru(n){return{point:{x:n.pageX,y:n.pageY}}}const oU=n=>t=>Mx(t)&&n(t,ru(t));function zc(n,t,e,s){return Zc(n,t,oU(e),s)}const m2=1e-4,lU=1-m2,cU=1+m2,g2=.01,uU=0-g2,fU=0+g2;function oi(n){return n.max-n.min}function dU(n,t,e){return Math.abs(n-t)<=e}function Jb(n,t,e,s=.5){n.origin=s,n.originPoint=hn(t.min,t.max,n.origin),n.scale=oi(e)/oi(t),n.translate=hn(e.min,e.max,n.origin)-n.originPoint,(n.scale>=lU&&n.scale<=cU||isNaN(n.scale))&&(n.scale=1),(n.translate>=uU&&n.translate<=fU||isNaN(n.translate))&&(n.translate=0)}function Bc(n,t,e,s){Jb(n.x,t.x,e.x,s?s.originX:void 0),Jb(n.y,t.y,e.y,s?s.originY:void 0)}function $b(n,t,e){n.min=e.min+t.min,n.max=n.min+oi(t)}function hU(n,t,e){$b(n.x,t.x,e.x),$b(n.y,t.y,e.y)}function tS(n,t,e){n.min=t.min-e.min,n.max=n.min+oi(t)}function Vc(n,t,e){tS(n.x,t.x,e.x),tS(n.y,t.y,e.y)}function Xi(n){return[n("x"),n("y")]}const x2=({current:n})=>n?n.ownerDocument.defaultView:null,eS=(n,t)=>Math.abs(n-t);function pU(n,t){const e=eS(n.x,t.x),s=eS(n.y,t.y);return Math.sqrt(e**2+s**2)}class v2{constructor(t,e,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Em(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,M=pU(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!M)return;const{point:T}=v,{timestamp:S}=Kn;this.history.push({...T,timestamp:S});const{onStart:b,onMove:R}=this.handlers;_||(b&&b(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,v)},this.handlePointerMove=(v,_)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=Mm(_,this.transformPagePoint),dn.update(this.updatePoint,!0)},this.handlePointerUp=(v,_)=>{this.end();const{onEnd:M,onSessionEnd:T,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Em(v.type==="pointercancel"?this.lastMoveEventInfo:Mm(_,this.transformPagePoint),this.history);this.startEvent&&M&&M(v,b),T&&T(v,b)},!Mx(t))return;this.dragSnapToOrigin=l,this.handlers=e,this.transformPagePoint=s,this.distanceThreshold=u,this.contextWindow=r||window;const f=ru(t),h=Mm(f,this.transformPagePoint),{point:d}=h,{timestamp:g}=Kn;this.history=[{...d,timestamp:g}];const{onSessionStart:m}=e;m&&m(t,Em(h,this.history)),this.removeListeners=iu(zc(this.contextWindow,"pointermove",this.handlePointerMove),zc(this.contextWindow,"pointerup",this.handlePointerUp),zc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ar(this.updatePoint)}}function Mm(n,t){return t?{point:t(n.point)}:n}function nS(n,t){return{x:n.x-t.x,y:n.y-t.y}}function Em({point:n},t){return{point:n,delta:nS(n,y2(t)),offset:nS(n,mU(t)),velocity:gU(t,.1)}}function mU(n){return n[0]}function y2(n){return n[n.length-1]}function gU(n,t){if(n.length<2)return{x:0,y:0};let e=n.length-1,s=null;const r=y2(n);for(;e>=0&&(s=n[e],!(r.timestamp-s.timestamp>Es(t)));)e--;if(!s)return{x:0,y:0};const l=qi(r.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const u={x:(r.x-s.x)/l,y:(r.y-s.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function xU(n,{min:t,max:e},s){return t!==void 0&&n<t?n=s?hn(t,n,s.min):Math.max(n,t):e!==void 0&&n>e&&(n=s?hn(e,n,s.max):Math.min(n,e)),n}function iS(n,t,e){return{min:t!==void 0?n.min+t:void 0,max:e!==void 0?n.max+e-(n.max-n.min):void 0}}function vU(n,{top:t,left:e,bottom:s,right:r}){return{x:iS(n.x,e,r),y:iS(n.y,t,s)}}function sS(n,t){let e=t.min-n.min,s=t.max-n.max;return t.max-t.min<n.max-n.min&&([e,s]=[s,e]),{min:e,max:s}}function yU(n,t){return{x:sS(n.x,t.x),y:sS(n.y,t.y)}}function _U(n,t){let e=.5;const s=oi(n),r=oi(t);return r>s?e=jc(t.min,t.max-s,n.min):s>r&&(e=jc(n.min,n.max-r,t.min)),da(0,1,e)}function bU(n,t){const e={};return t.min!==void 0&&(e.min=t.min-n.min),t.max!==void 0&&(e.max=t.max-n.min),e}const k0=.35;function SU(n=k0){return n===!1?n=0:n===!0&&(n=k0),{x:aS(n,"left","right"),y:aS(n,"top","bottom")}}function aS(n,t,e){return{min:rS(n,t),max:rS(n,e)}}function rS(n,t){return typeof n=="number"?n:n[t]||0}const MU=new WeakMap;class EU{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_n(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const l=m=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ru(m).point)},u=(m,v)=>{const{drag:_,dragPropagation:M,onDragStart:T}=this.getProps();if(_&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=D4(_),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xi(b=>{let R=this.getAxisMotionValue(b).get()||0;if(Ts.test(R)){const{projection:C}
vendor: 9,400 bytes, line 180
180=this.visualElement;if(C&&C.layout){const P=C.layout.layoutBox[b];P&&(R=oi(P)*(parseFloat(R)/100))}}this.originPoint[b]=R}),T&&dn.postRender(()=>T(m,v)),V0(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},f=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v;const{dragPropagation:_,dragDirectionLock:M,onDirectionLock:T,onDrag:S}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:b}=v;if(M&&this.currentDirection===null){this.currentDirection=TU(b),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",v.point,b),this.updateAxis("y",v.point,b),this.visualElement.render(),S&&S(m,v)},h=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v,this.stop(m,v),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Xi(m=>this.getAnimationState(m)==="paused"&&this.getAxisMotionValue(m).animation?.play()),{dragSnapToOrigin:g}=this.getProps();this.panSession=new v2(t,{onSessionStart:l,onStart:u,onMove:f,onSessionEnd:h,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:s,contextWindow:x2(this.visualElement)})}stop(t,e){const s=t||this.latestPointerEvent,r=e||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!r||!s)return;const{velocity:u}=r;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&dn.postRender(()=>f(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,s){const{drag:r}=this.getProps();if(!s||!Rf(t,r,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(u=xU(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&tl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=vU(s.layoutBox,t):this.constraints=!1,this.elastic=SU(e),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Xi(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=bU(s.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!tl(t))return!1;const s=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const l=AP(s,r.root,this.visualElement.getTransformPagePoint());let u=yU(r.layout.layoutBox,l);if(e){const f=e(MP(u));this.hasMutatedConstraints=!!f,f&&(u=n2(f))}return u}startAnimation(t){const{drag:e,dragMomentum:s,dragElastic:r,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),h=this.constraints||{},d=Xi(g=>{if(!Rf(g,e,this.currentDirection))return;let m=h&&h[g]||{};u&&(m={min:0,max:0});const v=r?200:1e6,_=r?40:1e7,M={type:"inertia",velocity:s?t[g]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...l,...m};return this.startAxisValueAnimation(g,M)});return Promise.all(d).then(f)}startAxisValueAnimation(t,e){const s=this.getAxisMotionValue(t);return V0(this.visualElement,t),s.start(Px(t,s,0,e,this.visualElement,!1))}stopAnimation(){Xi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xi(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[e];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Xi(e=>{const{drag:s}=this.getProps();if(!Rf(e,s,this.currentDirection))return;const{projection:r}=this.visualElement,l=this.getAxisMotionValue(e);if(r&&r.layout){const{min:u,max:f}=r.layout.layoutBox[e];l.set(t[e]-hn(u,f,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:s}=this.visualElement;if(!tl(e)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Xi(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const h=f.get();r[u]=_U({min:h,max:h},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Xi(u=>{if(!Rf(u,t,null))return;const f=this.getAxisMotionValue(u),{min:h,max:d}=this.constraints[u];f.set(hn(h,d,r[u]))})}addListeners(){if(!this.visualElement.current)return;MU.set(this.visualElement,this);const t=this.visualElement.current,e=zc(t,"pointerdown",h=>{const{drag:d,dragListener:g=!0}=this.getProps();d&&g&&this.start(h)}),s=()=>{const{dragConstraints:h}=this.getProps();tl(h)&&h.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,l=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),dn.read(s);const u=Zc(window,"resize",()=>this.scalePositionWithinConstraints()),f=r.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:d})=>{this.isDragging&&d&&(Xi(g=>{const m=this.getAxisMotionValue(g);m&&(this.originPoint[g]+=h[g].translate,m.set(m.get()+h[g].translate))}),this.visualElement.render())}));return()=>{u(),e(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:l=!1,dragElastic:u=k0,dragMomentum:f=!0}=t;return{...t,drag:e,dragDirectionLock:s,dragPropagation:r,dragConstraints:l,dragElastic:u,dragMomentum:f}}}function Rf(n,t,e){return(t===!0||t===n)&&(e===null||e===n)}function TU(n,t=10){let e=null;return Math.abs(n.y)>t?e="y":Math.abs(n.x)>t&&(e="x"),e}class AU extends lr{constructor(t){super(t),this.removeGroupControls=Zi,this.removeListeners=Zi,this.controls=new EU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zi}unmount(){this.removeGroupControls(),this.removeListeners()}}const oS=n=>(t,e)=>{n&&dn.postRender(()=>n(t,e))};class wU extends lr{constructor(){super(...arguments),this.removePointerDownListener=Zi}onPointerDown(t){this.session=new v2(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:x2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:oS(t),onStart:oS(e),onMove:s,onEnd:(l,u)=>{delete this.session,r&&dn.postRender(()=>r(l,u))}}}mount(){this.removePointerDownListener=zc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ld={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lS(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const bc={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(ue.test(n))n=parseFloat(n);else return n;const e=lS(n,t.target.x),s=lS(n,t.target.y);return`${e}% ${s}%`}},CU={correct:(n,{treeScale:t,projectionDelta:e})=>{const s=n,r=rr.parse(n);if(r.length>5)return s;const l=rr.createTransformer(n),u=typeof r[0]!="number"?1:0,f=e.x.scale*t.x,h=e.y.scale*t.y;r[0+u]/=f,r[1+u]/=h;const d=hn(f,h,.5);return typeof r[2+u]=="number"&&(r[2+u]/=d),typeof r[3+u]=="number"&&(r[3+u]/=d),l(r)}};let Tm=!1;class RU extends G.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:s,layoutId:r}=this.props,{projection:l}=t;Q4(DU),l&&(e.group&&e.group.add(l),s&&s.register&&r&&s.register(l),Tm&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),ld.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:s,drag:r,isPresent:l}=this.props,{projection:u}=s;return u&&(u.isPresent=l,Tm=!0,r||t.layoutDependency!==e||e===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||dn.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sx.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:s}=this.props,{projection:r}=t;Tm=!0,r&&(r.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _2(n){const[t,e]=kT(),s=G.useContext(tx);return y.jsx(RU,{...n,layoutGroup:s,switchLayoutGroup:G.useContext(t2),isPresent:t,safeToRemove:e})}const DU={borderRadius:{...bc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bc,borderTopRightRadius:bc,borderBottomLeftRadius:bc,borderBottomRightRadius:bc,boxSh
vendor: 5,425 bytes, line 180
180adow:CU};function NU(n,t,e){const s=ei(n)?n:dl(n);return s.start(Px("",s,t,e)),s.animation}const LU=(n,t)=>n.depth-t.depth;class PU{constructor(){this.children=[],this.isDirty=!1}add(t){ix(this.children,t),this.isDirty=!0}remove(t){sx(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LU),this.isDirty=!1,this.children.forEach(t)}}function UU(n,t){const e=vi.now(),s=({timestamp:r})=>{const l=r-e;l>=t&&(ar(s),n(l-t))};return dn.setup(s,!0),()=>ar(s)}const b2=["TopLeft","TopRight","BottomLeft","BottomRight"],OU=b2.length,cS=n=>typeof n=="string"?parseFloat(n):n,uS=n=>typeof n=="number"||ue.test(n);function FU(n,t,e,s,r,l){r?(n.opacity=hn(0,e.opacity??1,IU(s)),n.opacityExit=hn(t.opacity??1,0,zU(s))):l&&(n.opacity=hn(t.opacity??1,e.opacity??1,s));for(let u=0;u<OU;u++){const f=`border${b2[u]}Radius`;let h=fS(t,f),d=fS(e,f);if(h===void 0&&d===void 0)continue;h||(h=0),d||(d=0),h===0||d===0||uS(h)===uS(d)?(n[f]=Math.max(hn(cS(h),cS(d),s),0),(Ts.test(d)||Ts.test(h))&&(n[f]+="%")):n[f]=d}(t.rotate||e.rotate)&&(n.rotate=hn(t.rotate||0,e.rotate||0,s))}function fS(n,t){return n[t]!==void 0?n[t]:n.borderRadius}const IU=S2(0,.5,lT),zU=S2(.5,.95,Zi);function S2(n,t,e){return s=>s<n?0:s>t?1:e(jc(n,t,s))}function dS(n,t){n.min=t.min,n.max=t.max}function ji(n,t){dS(n.x,t.x),dS(n.y,t.y)}function hS(n,t){n.translate=t.translate,n.scale=t.scale,n.originPoint=t.originPoint,n.origin=t.origin}function pS(n,t,e,s,r){return n-=t,n=Td(n,1/e,s),r!==void 0&&(n=Td(n,1/r,s)),n}function BU(n,t=0,e=1,s=.5,r,l=n,u=n){if(Ts.test(t)&&(t=parseFloat(t),t=hn(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=hn(l.min,l.max,s);n===l&&(f-=t),n.min=pS(n.min,t,e,f,r),n.max=pS(n.max,t,e,f,r)}function mS(n,t,[e,s,r],l,u){BU(n,t[e],t[s],t[r],t.scale,l,u)}const VU=["x","scaleX","originX"],HU=["y","scaleY","originY"];function gS(n,t,e,s){mS(n.x,t,VU,e?e.x:void 0,s?s.x:void 0),mS(n.y,t,HU,e?e.y:void 0,s?s.y:void 0)}function xS(n){return n.translate===0&&n.scale===1}function M2(n){return xS(n.x)&&xS(n.y)}function vS(n,t){return n.min===t.min&&n.max===t.max}function kU(n,t){return vS(n.x,t.x)&&vS(n.y,t.y)}function yS(n,t){return Math.round(n.min)===Math.round(t.min)&&Math.round(n.max)===Math.round(t.max)}function E2(n,t){return yS(n.x,t.x)&&yS(n.y,t.y)}function _S(n){return oi(n.x)/oi(n.y)}function bS(n,t){return n.translate===t.translate&&n.scale===t.scale&&n.originPoint===t.originPoint}class GU{constructor(){this.members=[]}add(t){ix(this.members,t),t.scheduleRender()}remove(t){if(sx(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(t){const e=this.members.findIndex(r=>t===r);if(e===0)return!1;let s;for(let r=e;r>=0;r--){const l=this.members[r];if(l.isPresent!==!1){s=l;break}}return s?(this.promote(s),!0):!1}promote(t,e){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,e&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:s}=t;e.onExitComplete&&e.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jU(n,t,e){let s="";const r=n.x.translate/t.x,l=n.y.translate/t.y,u=e?.z||0;if((r||l||u)&&(s=`translate3d(${r}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),e){const{transformPerspective:d,rotate:g,rotateX:m,rotateY:v,skewX:_,skewY:M}=e;d&&(s=`perspective(${d}px) ${s}`),g&&(s+=`rotate(${g}deg) `),m&&(s+=`rotateX(${m}deg) `),v&&(s+=`rotateY(${v}deg) `),_&&(s+=`skewX(${_}deg) `),M&&(s+=`skewY(${M}deg) `)}const f=n.x.scale*t.x,h=n.y.scale*t.y;return(f!==1||h!==1)&&(s+=`scale(${f}, ${h})`),s||"none"}const Am=["","X","Y","Z"],WU=1e3;let XU=0;function wm(n,t,e,s){const{latestValues:r}=t;r[n]&&(e[n]=r[n],t.setStaticValue(n,0),s&&(s[n]=0))}function T2(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:t}=n.options;if(!t)return;const e=u2(t);if(window.MotionHasOptimisedAnimation(e,"transform")){const{layout:r,layoutId:l}=n.options;window.MotionCancelOptimisedAnimation(e,"transform",dn,!(r||l))}const{parent:s}=n;s&&!s.hasCheckedOptimisedAppear&&T2(s)}function A2({attachResizeListener:n,defaultParent:t,measureScroll:e,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(u={},f=t?.()){this.id=XU++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
vendor: 4,304 bytes, line 180
180{this.projectionUpdateScheduled=!1,this.nodes.forEach(ZU),this.nodes.forEach($U),this.nodes.forEach(t5),this.nodes.forEach(KU)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new PU)}addEventListener(u,f){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new ox),this.eventHandlers.get(u).add(f)}notifyListeners(u,...f){const h=this.eventHandlers.get(u);h&&h.notify(...f)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=HT(u)&&!F4(u),this.instance=u;const{layoutId:f,layout:h,visualElement:d}=this.options;if(d&&!d.current&&d.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||f)&&(this.isLayoutDirty=!0),n){let g,m=0;const v=()=>this.root.updateBlockedByResize=!1;dn.read(()=>{m=window.innerWidth}),n(u,()=>{const _=window.innerWidth;_!==m&&(m=_,this.root.updateBlockedByResize=!0,g&&g(),g=UU(v,250),ld.hasAnimatedSinceResize&&(ld.hasAnimatedSinceResize=!1,this.nodes.forEach(ES)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&d&&(f||h)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:m,hasRelativeLayoutChanged:v,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=this.options.transition||d.getDefaultTransition()||a5,{onLayoutAnimationStart:T,onLayoutAnimationComplete:S}=d.getProps(),b=!this.targetLayout||!E2(this.targetLayout,_),R=!m&&v;if(this.options.layoutRoot||this.resumeFrom||R||m&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={..._x(M,"layout"),onPlay:T,onComplete:S};(d.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(g,R)}else m||ES(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ar(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(e5),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&T2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const m=this.path[g];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:f,layout:h}=this.options;if(f===void 0&&!h)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(SS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(MS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(JU),this.nodes.forEach(YU),this.nodes.forEach(qU)):this.nodes.forEach(MS),this.clearAllSnapshots();const f=vi.now();Kn.delta=da(0,1e3/60,f-Kn.timestamp),Kn.timestamp=f,Kn.isProcessing=!0,mm.update.process(Kn),mm.preRender.process(Kn),mm.render.process(Kn),Kn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sx.read(this.scheduleUpdate))}
vendor: 6,064 bytes, line 180
180clearAllSnapshots(){this.nodes.forEach(QU),this.sharedNodes.forEach(n5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!oi(this.snapshot.measuredBox.x)&&!oi(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_n(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(f=!1),f&&this.instance){const h=s(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:h,offset:e(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!r)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!M2(this.projectionDelta),h=this.getTransformTemplate(),d=h?h(this.latestValues,""):void 0,g=d!==this.prevTransformTemplateValue;u&&this.instance&&(f||Fr(this.latestValues)||g)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const f=this.measurePageBox();let h=this.removeElementScroll(f);return u&&(h=this.removeTransform(h)),r5(h),{animationId:this.root.animationId,measuredBox:f,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return _n();const f=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(o5))){const{scroll:d}=this.root;d&&(el(f.x,d.offset.x),el(f.y,d.offset.y))}return f}removeElementScroll(u){const f=_n();if(ji(f,u),this.scroll?.wasRoot)return f;for(let h=0;h<this.path.length;h++){const d=this.path[h],{scroll:g,options:m}=d;d!==this.root&&g&&m.layoutScroll&&(g.wasRoot&&ji(f,u),el(f.x,g.offset.x),el(f.y,g.offset.y))}return f}applyTransform(u,f=!1){const h=_n();ji(h,u);for(let d=0;d<this.path.length;d++){const g=this.path[d];!f&&g.options.layoutScroll&&g.scroll&&g!==g.root&&nl(h,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),Fr(g.latestValues)&&nl(h,g.latestValues)}return Fr(this.latestValues)&&nl(h,this.latestValues),h}removeTransform(u){const f=_n();ji(f,u);for(let h=0;h<this.path.length;h++){const d=this.path[h];if(!d.instance||!Fr(d.latestValues))continue;F0(d.latestValues)&&d.updateSnapshot();const g=_n(),m=d.measurePageBox();ji(g,m),gS(f,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,g)}return Fr(this.latestValues)&&gS(f,this.latestValues),f}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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!==Kn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==f;if(!(u||h&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:m}=this.options;if(!(!this.layout||!(g||m))){if(this.resolvedRelativeTargetAt=Kn.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_n(),this.relativeTargetOrigin=_n(),Vc(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_n(),this.targetWithTransforms=_n()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ji(this.target,this.layout.layoutBox),s2(this.target,this.targetDelta)):ji(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_n(),this.relativeTargetOrigin=_n(),Vc(this.relativeTargetOrigin,this.target,v.target),ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||F0(this.parent.latestValues)||i2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const u=this.getLead(),f=!!this.resumingFrom||this!==u;let h=!0;
vendor: 8,821 bytes, line 180
180if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Kn.timestamp&&(h=!1),h)return;const{layout:d,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||g))return;ji(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,v=this.treeScale.y;TP(this.layoutCorrected,this.treeScale,this.path,f),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=_n());const{target:_}=u;if(!_){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hS(this.prevProjectionDelta.x,this.projectionDelta.x),hS(this.prevProjectionDelta.y,this.projectionDelta.y)),Bc(this.projectionDelta,this.layoutCorrected,_,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==v||!bS(this.projectionDelta.x,this.prevProjectionDelta.x)||!bS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",_))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=il(),this.projectionDelta=il(),this.projectionDeltaWithTransform=il()}setAnimationOrigin(u,f=!1){const h=this.snapshot,d=h?h.latestValues:{},g={...this.latestValues},m=il();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=_n(),_=h?h.source:void 0,M=this.layout?this.layout.source:void 0,T=_!==M,S=this.getStack(),b=!S||S.members.length<=1,R=!!(T&&!b&&this.options.crossfade===!0&&!this.path.some(s5));this.animationProgress=0;let C;this.mixTargetDelta=P=>{const U=P/1e3;TS(m.x,u.x,U),TS(m.y,u.y,U),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vc(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),i5(this.relativeTarget,this.relativeTargetOrigin,v,U),C&&kU(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=_n()),ji(C,this.relativeTarget)),T&&(this.animationValues=g,FU(g,d,this.latestValues,U,R,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=U},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ar(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{ld.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dl(0)),this.currentAnimation=NU(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),u.onUpdate&&u.onUpdate(f)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(WU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:f,target:h,layout:d,latestValues:g}=u;if(!(!f||!h||!d)){if(this!==u&&this.layout&&d&&w2(this.options.animationType,this.layout.layoutBox,d.layoutBox)){h=this.target||_n();const m=oi(this.layout.layoutBox.x);h.x.min=u.target.x.min,h.x.max=h.x.min+m;const v=oi(this.layout.layoutBox.y);h.y.min=u.target.y.min,h.y.max=h.y.min+v}ji(f,h),nl(f,g),Bc(this.projectionDeltaWithTransform,this.layoutCorrected,f,g)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new GU),this.sharedNodes.get(u).add(f);const d=f.options.initialPromotionConfig;f.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:h}={}){const d=this.getStack();d&&d.promote(this,h),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let f=!1;const{latestValues:h}=u;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(f=!0),!f)return;const d={};h.z&&wm("z",u,d,this.animationValues);for(let g=0;g<Am.length;g++)wm(`rotate${Am[g]}`,u,d,this.animationValues),wm(`skew${Am[g]}`,u,d,this.animationValues);u.render();for(const g in d)u.setStaticValue(g,d[g]),this.animationValues&&(this.animationValues[g]=d[g]);u.scheduleRender()}applyProjectionStyles(u,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=od(f?.pointerEvents)||"",u.transform=h?h(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=od(f?.pointerEvents)||""),this.hasProjected&&!Fr(this.latestValues)&&(u.transform=h?h({},""):"none",this.hasProjected=!1);return}u.visibility="";const g=d.animationValues||d.latestValues;this.applyTransformsToTarget();let m=jU(this.projectionDeltaWithTransform,this.treeScale,g);h&&(m=h(g,m)),u.transform=m;const{x:v,y:_}=this.projectionDelta;u.transformOrigin=`${v.origin*100}% ${_.origin*100}% 0`,d.animationValues?u.opacity=d===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:u.opacity=d===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const M in qc){if(g[M]===void 0)continue;const{correct:T,applyTo:S,isCSSVariable:b}=qc[M],R=m==="none"?g[M]:T(g[M],d);if(S){const C=S.length;for(let P=0;P<C;P++)u[S[P]]=R}else b?this.options.visualElement.renderState.vars[M]=R:u[M]=R}this.options.layoutId&&(u.pointerEvents=d===this?od(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(SS),this.root.sharedNodes.clear()}}}function YU(n){n.updateLayout()}function qU(n){const t=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=n.layout,{animationType:r}=n.options,l=t.source!==n.layout.source;r==="size"?Xi(g=>{const m=l?t.measuredBox[g]:t.layoutBox[g],v=oi(m);m.min=e[g].min,m.max=m.min+v}):w2(r,t.layoutBox,e)&&Xi(g=>{const m=l?t.measuredBox[g]:t.layoutBox[g],v=oi(e[g]);m.max=m.min+v,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[g].max=n.relativeTarget[g].min+v)});const u=il();Bc(u,e,t.layoutBox);const f=il();l?Bc(f,n.applyTransform(s,!0),t.measuredBox):Bc(f,e,t.layoutBox);const h=!M2(u);let d=!1;if(!n.resumeFrom){const g=n.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:m,layout:v}=g;if(m&&v){const _=_n();Vc(_,t.layoutBox,m.layoutBox);const M=_n();Vc(M,e,v.layoutBox),E2(_,M)||(d=!0),g.options.layoutRoot&&(n.relativeTarget=M,n.relativeTargetOrigin=_,n.relativeParent=g)}}}n.notifyListeners("didUpdate",{layout:e,snapshot:t,delta:f,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d})}else if(n.isLead()){const{onExitComplete:e}=n.options;e&&e()}n.options.transition=void 0}function ZU(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}
vendor: 5,356 bytes, lines 180-184
180function KU(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function QU(n){n.clearSnapshot()}function SS(n){n.clearMeasurements()}function MS(n){n.isLayoutDirty=!1}function JU(n){const{visualElement:t}=n.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),n.resetTransform()}function ES(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function $U(n){n.resolveTargetDelta()}function t5(n){n.calcProjection()}function e5(n){n.resetSkewAndRotation()}function n5(n){n.removeLeadSnapshot()}function TS(n,t,e){n.translate=hn(t.translate,0,e),n.scale=hn(t.scale,1,e),n.origin=t.origin,n.originPoint=t.originPoint}function AS(n,t,e,s){n.min=hn(t.min,e.min,s),n.max=hn(t.max,e.max,s)}function i5(n,t,e,s){AS(n.x,t.x,e.x,s),AS(n.y,t.y,e.y,s)}function s5(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const a5={duration:.45,ease:[.4,0,.1,1]},wS=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),CS=wS("applewebkit/")&&!wS("chrome/")?Math.round:Zi;function RS(n){n.min=CS(n.min),n.max=CS(n.max)}function r5(n){RS(n.x),RS(n.y)}function w2(n,t,e){return n==="position"||n==="preserve-aspect"&&!dU(_S(t),_S(e),.2)}function o5(n){return n!==n.root&&n.scroll?.wasRoot}const l5=A2({attachResizeListener:(n,t)=>Zc(n,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cm={current:void 0},C2=A2({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Cm.current){const n=new l5({});n.mount(window),n.setOptions({layoutScroll:!0}),Cm.current=n}return Cm.current},resetTransform:(n,t)=>{n.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),c5={pan:{Feature:wU},drag:{Feature:AU,ProjectionNode:C2,MeasureLayout:_2}};function DS(n,t,e){const{props:s}=n;n.animationState&&s.whileHover&&n.animationState.setActive("whileHover",e==="Start");const r="onHover"+e,l=s[r];l&&dn.postRender(()=>l(t,ru(t)))}class u5 extends lr{mount(){const{current:t}=this.node;t&&(this.unmount=N4(t,(e,s)=>(DS(this.node,s,"Start"),r=>DS(this.node,r,"End"))))}unmount(){}}class f5 extends lr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=iu(Zc(this.node.current,"focus",()=>this.onFocus()),Zc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function NS(n,t,e){const{props:s}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&s.whileTap&&n.animationState.setActive("whileTap",e==="Start");const r="onTap"+(e==="End"?"":e),l=s[r];l&&dn.postRender(()=>l(t,ru(t)))}class d5 extends lr{mount(){const{current:t}=this.node;t&&(this.unmount=O4(t,(e,s)=>(NS(this.node,s,"Start"),(r,{success:l})=>NS(this.node,r,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const G0=new WeakMap,Rm=new WeakMap,h5=n=>{const t=G0.get(n.target);t&&t(n)},p5=n=>{n.forEach(h5)};function m5({root:n,...t}){const e=n||document;Rm.has(e)||Rm.set(e,{});const s=Rm.get(e),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(p5,{root:n,...t})),s[r]}function g5(n,t,e){const s=m5(t);return G0.set(n,e),s.observe(n),()=>{G0.delete(n),s.unobserve(n)}}const x5={some:0,all:1};class v5 extends lr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:s,amount:r="some",once:l}=t,u={root:e?e.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:x5[r]},f=h=>{const{isIntersecting:d}=h;if(this.isInView===d||(this.isInView=d,l&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:g,onViewportLeave:m}=this.node.getProps(),v=d?g:m;v&&v(h)};return g5(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(y5(t,e))&&this.startObserver()}unmount(){}}function y5({viewport:n={}},{viewport:t={}}={}){return e=>n[e]!==t[e]}const _5={inView:{Feature:v5},tap:{Feature:d5},focus:{Feature:f5},hover:{Feature:u5}},b5={layout:{ProjectionNode:C2,MeasureLayout:_2}},S5={...rU,..._5,...c5,...b5},an=SP(S5,OP);/** 181 * @license 182 * Copyright 2010-2025 Three.js Authors 183 * SPDX-License-Identifier: MIT 184 */const Ux="182",ol={ROTATE:0,DOLLY:1,PAN:2},sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},M5=0,LS=1,E5=2,cd=1,T5=2,Uc=3,or=0,yi=1,ra=2,la=0,ll=1,PS=2,US=3,OS=4,A5=5,Ir=100,w5=101,C5=102,R5=103,D5=104,N5=200,L5=201,P5=202,U5=203,j0=204,W0=205,O5=206,F5=207,I5=208,z5=209,B5=210,V5=211,H5=212,k5=213,G5=214,X0=0,Y0=1,q0=2,pl=3,Z0=4,K0=5,Q0=6,J0=7,R2=0,j5=1,W5=2,As=0,D2=1,N2=2,L2=3,Ox=4,P2=5,U2=6,O2=7,F2=300,Xr=301,ml=302,$0=303,tg=304,Yd=306,eg=1e3,oa=1001,ng=1002,Qn=1003,X5=1004,Df=1005,ni=1006,Dm=1007,Hr=1008,Ni=1009,I2=1010,z2
vendor: 16,887 bytes, line 184
184=1011,Kc=1012,Fx=1013,Rs=1014,bs=1015,pa=1016,Ix=1017,zx=1018,Qc=1020,B2=35902,V2=35899,H2=1021,k2=1022,os=1023,ma=1026,kr=1027,G2=1028,Bx=1029,gl=1030,Vx=1031,Hx=1033,ud=33776,fd=33777,dd=33778,hd=33779,ig=35840,sg=35841,ag=35842,rg=35843,og=36196,lg=37492,cg=37496,ug=37488,fg=37489,dg=37490,hg=37491,pg=37808,mg=37809,gg=37810,xg=37811,vg=37812,yg=37813,_g=37814,bg=37815,Sg=37816,Mg=37817,Eg=37818,Tg=37819,Ag=37820,wg=37821,Cg=36492,Rg=36494,Dg=36495,Ng=36283,Lg=36284,Pg=36285,Ug=36286,Y5=3200,q5=0,Z5=1,tr="",xi="srgb",xl="srgb-linear",Ad="linear",Ze="srgb",Uo=7680,FS=519,K5=512,Q5=513,J5=514,kx=515,$5=516,tO=517,Gx=518,eO=519,Og=35044,IS="300 es",Ss=2e3,wd=2001;function j2(n){for(let t=n.length-1;t>=0;--t)if(n[t]>=65535)return!0;return!1}function Jc(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function nO(){const n=Jc("canvas");return n.style.display="block",n}const zS={};function Cd(...n){const t="THREE."+n.shift();console.log(t,...n)}function fe(...n){const t="THREE."+n.shift();console.warn(t,...n)}function Oe(...n){const t="THREE."+n.shift();console.error(t,...n)}function $c(...n){const t=n.join(" ");t in zS||(zS[t]=!0,fe(...n))}function iO(n,t,e){return new Promise(function(s,r){function l(){switch(n.clientWaitSync(t,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(l,e);break;default:s()}}setTimeout(l,e)})}class Kr{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const s=this._listeners;s[t]===void 0&&(s[t]=[]),s[t].indexOf(e)===-1&&s[t].push(e)}hasEventListener(t,e){const s=this._listeners;return s===void 0?!1:s[t]!==void 0&&s[t].indexOf(e)!==-1}removeEventListener(t,e){const s=this._listeners;if(s===void 0)return;const r=s[t];if(r!==void 0){const l=r.indexOf(e);l!==-1&&r.splice(l,1)}}dispatchEvent(t){const e=this._listeners;if(e===void 0)return;const s=e[t.type];if(s!==void 0){t.target=this;const r=s.slice(0);for(let l=0,u=r.length;l<u;l++)r[l].call(this,t);t.target=null}}}const $n=["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"],pd=Math.PI/180,Fg=180/Math.PI;function nr(){const n=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,s=Math.random()*4294967295|0;return($n[n&255]+$n[n>>8&255]+$n[n>>16&255]+$n[n>>24&255]+"-"+$n[t&255]+$n[t>>8&255]+"-"+$n[t>>16&15|64]+$n[t>>24&255]+"-"+$n[e&63|128]+$n[e>>8&255]+"-"+$n[e>>16&255]+$n[e>>24&255]+$n[s&255]+$n[s>>8&255]+$n[s>>16&255]+$n[s>>24&255]).toLowerCase()}function we(n,t,e){return Math.max(t,Math.min(e,n))}function sO(n,t){return(n%t+t)%t}function Nm(n,t,e){return(1-e)*n+e*t}function ys(n,t){switch(t.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function tn(n,t){switch(t.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const aO={DEG2RAD:pd};class ce{constructor(t=0,e=0){ce.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,s=this.y,r=t.elements;return this.x=r[0]*e+r[3]*s+r[6],this.y=r[1]*e+r[4]*s+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=we(this.x,t.x,e.x),this.y=we(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=we(this.x,t,e),this.y=we(this.y,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(we(s,t,e))}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(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.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(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(we(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y;return e*e+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const s=Math.cos(e),r=Math.sin(e),l=this.x-t.x,u=this.y-t.y;return this.x=l*s-u*r+t.x,this.y=l*r+u*s+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Yr{constructor(t=0,e=0,s=0,r=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=s,this._w=r}static slerpFlat(t,e,s,r,l,u,f){let h=s[r+0],d=s[r+1],g=s[r+2],m=s[r+3],v=l[u+0],_=l[u+1],M=l[u+2],T=l[u+3];if(f<=0){t[e+0]=h,t[e+1]=d,t[e+2]=g,t[e+3]=m;return}if(f>=1){t[e+0]=v,t[e+1]=_,t[e+2]=M,t[e+3]=T;return}if(m!==T||h!==v||d!==_||g!==M){let S=h*v+d*_+g*M+m*T;S<0&&(v=-v,_=-_,M=-M,T=-T,S=-S);let b=1-f;if(S<.9995){const R=Math.acos(S),C=Math.sin(R);b=Math.sin(b*R)/C,f=Math.sin(f*R)/C,h=h*b+v*f,d=d*b+_*f,g=g*b+M*f,m=m*b+T*f}else{h=h*b+v*f,d=d*b+_*f,g=g*b+M*f,m=m*b+T*f;const R=1/Math.sqrt(h*h+d*d+g*g+m*m);h*=R,d*=R,g*=R,m*=R}}t[e]=h,t[e+1]=d,t[e+2]=g,t[e+3]=m}static multiplyQuaternionsFlat(t,e,s,r,l,u){const f=s[r],h=s[r+1],d=s[r+2],g=s[r+3],m=l[u],v=l[u+1],_=l[u+2],M=l[u+3];return t[e]=f*M+g*m+h*_-d*v,t[e+1]=h*M+g*v+d*m-f*_,t[e+2]=d*M+g*_+f*v-h*m,t[e+3]=g*M-f*m-h*v-d*_,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,s,r){return this._x=t,this._y=e,this._z=s,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const s=t._x,r=t._y,l=t._z,u=t._order,f=Math.cos,h=Math.sin,d=f(s/2),g=f(r/2),m=f(l/2),v=h(s/2),_=h(r/2),M=h(l/2);switch(u){case"XYZ":this._x=v*g*m+d*_*M,this._y=d*_*m-v*g*M,this._z=d*g*M+v*_*m,this._w=d*g*m-v*_*M;break;case"YXZ":this._x=v*g*m+d*_*M,this._y=d*_*m-v*g*M,this._z=d*g*M-v*_*m,this._w=d*g*m+v*_*M;break;case"ZXY":this._x=v*g*m-d*_*M,this._y=d*_*m+v*g*M,this._z=d*g*M+v*_*m,this._w=d*g*m-v*_*M;break;case"ZYX":this._x=v*g*m-d*_*M,this._y=d*_*m+v*g*M,this._z=d*g*M-v*_*m,this._w=d*g*m+v*_*M;break;case"YZX":this._x=v*g*m+d*_*M,this._y=d*_*m+v*g*M,this._z=d*g*M-v*_*m,this._w=d*g*m-v*_*M;break;case"XZY":this._x=v*g*m-d*_*M,this._y=d*_*m-v*g*M,this._z=d*g*M+v*_*m,this._w=d*g*m+v*_*M;break;default:fe("Quaternion: .setFromEuler() encountered an unknown order: "+u)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const s=e/2,r=Math.sin(s);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,s=e[0],r=e[4],l=e[8],u=e[1],f=e[5],h=e[9],d=e[2],g=e[6],m=e[10],v=s+f+m;if(v>0){const _=.5/Math.sqrt(v+1);this._w=.25/_,this._x=(g-h)*_,this._y=(l-d)*_,this._z=(u-r)*_}else if(s>f&&s>m){const _=2*Math.sqrt(1+s-f-m);this._w=(g-h)/_,this._x=.25*_,this._y=(r+u)/_,this._z=(l+d)/_}else if(f>m){const _=2*Math.sqrt(1+f-s-m);this._w=(l-d)/_,this._x=(r+u)/_,this._y=.25*_,this._z=(h+g)/_}else{const _=2*Math.sqrt(1+m-s-f);this._w=(u-r)/_,this._x=(l+d)/_,this._y=(h+g)/_,this._z=.25*_}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let s=t.dot(e)+1;return s<1e-8?(s=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=s):(this._x=0,this._y=-t.z,this._z=t.y,this._w=s)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=s),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(we(this.dot(t),-1,1)))}rotateTowards(t,e){const s=this.angleTo(t);if(s===0)return this;const r=Math.min(1,e/s);return this.slerp(t,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(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const s=t._x,r=t._y,l=t._z,u=t._w,f=e._x,h=e._y,d=e._z,g=e._w;return this._x=s*g+u*f+r*d-l*h,this._y=r*g+u*h+l*f-s*d,this._z=l*g+u*d+s*h-r*f,this._w=u*g-s*f-r*h-l*d,this._onChangeCallback(),this}slerp(t,e){if(e<=0)return this;if(e>=1)return this.copy(t);let s=t._x,r=t._y,l=t._z,u=t._w,f=this.dot(t);f<0&&(s=-s,r=-r,l=-l,u=-u,f=-f);let h=1-e;if(f<.9995){const d=Math.acos(f),g=Math.sin(d);h=Math.sin(h*d)/g,e=Math.sin(e*d)/g,this._x=this._x*h+s*e,this._y=this._y*h+r*e,this._z=this._z*h+l*e,this._w=this._w*h+u*e,this._onChangeCallback()}else this._x=this._x*h+s*e,this._y=this._y*h+r*e,this._z=this._z*h+l*e,this._w=this._w*h+u*e,this.normalize();return this}slerpQuaternions(t,e,s){return this.copy(t).slerp(e,s)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),s=Math.random(),r=Math.sqrt(1-s),l=Math.sqrt(s);return this.set(r*Math.sin(t),r*Math.cos(t),l*Math.sin(e),l*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class et{constructor(t=0,e=0,s=0){et.prototype.isVector3=!0,this.x=t,this.y=e,this.z=s}set(t,e,s){return s===void 0&&(s=this.z),this.x=t,this.y=e,this.z=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(BS.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(BS.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,s=this.y,r=this.z,l=t.elements;return this.x=l[0]*e+l[3]*s+l[6]*r,this.y=l[1]*e+l[4]*s+l[7]*r,this.z=l[2]*e+l[5]*s+l[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,s=this.y,r=this.z,l=t.elements,u=1/(l[3]*e+l[7]*s+l[11]*r+l[15]);return this.x=(l[0]*e+l[4]*s+l[8]*r+l[12])*u,this.y=(l[1]*e+l[5]*s+l[9]*r+l[13])*u,this.z=(l[2]*e+l[6]*s+l[10]*r+l[14])*u,this}applyQuaternion(t){const e=this.x,s=this.y,r=this.z,l=t.x,u=t.y,f=t.z,h=t.w,d=2*(u*r-f*s),g=2*(f*e-l*r),m=2*(l*s-u*e);return this.x=e+h*d+u*m-f*g,this.y=s+h*g+f*d-l*m,this.z=r+h*m+l*g-u*d,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,s=this.y,r=this.z,l=t.elements;return this.x=l[0]*e+l[4]*s+l[8]*r,this.y=l[1]*e+l[5]*s+l[9]*r,this.z=l[2]*e+l[6]*s+l[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=we(this.x,t.x,e.x),this.y=we(this.y,t.y,e.y),this.z=we(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=we(this.x,t,e),this.y=we(this.y,t,e),this.z=we(this.z,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(we(s,t,e))}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}
vendor: 5,301 bytes, line 184
184round(){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(t){return this.x*t.x+this.y*t.y+this.z*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const s=t.x,r=t.y,l=t.z,u=e.x,f=e.y,h=e.z;return this.x=r*h-l*f,this.y=l*u-s*h,this.z=s*f-r*u,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}projectOnPlane(t){return Lm.copy(this).projectOnVector(t),this.sub(Lm)}reflect(t){return this.sub(Lm.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(we(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y,r=this.z-t.z;return e*e+s*s+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,s){const r=Math.sin(e)*t;return this.x=r*Math.sin(s),this.y=Math.cos(e)*t,this.z=r*Math.cos(s),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,s){return this.x=t*Math.sin(e),this.y=s,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),s=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=s,this.z=r,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,s=Math.sqrt(1-e*e);return this.x=s*Math.cos(t),this.y=e,this.z=s*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Lm=new et,BS=new Yr;class be{constructor(t,e,s,r,l,u,f,h,d){be.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,s,r,l,u,f,h,d)}set(t,e,s,r,l,u,f,h,d){const g=this.elements;return g[0]=t,g[1]=r,g[2]=f,g[3]=e,g[4]=l,g[5]=h,g[6]=s,g[7]=u,g[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,s=t.elements;return e[0]=s[0],e[1]=s[1],e[2]=s[2],e[3]=s[3],e[4]=s[4],e[5]=s[5],e[6]=s[6],e[7]=s[7],e[8]=s[8],this}extractBasis(t,e,s){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const s=t.elements,r=e.elements,l=this.elements,u=s[0],f=s[3],h=s[6],d=s[1],g=s[4],m=s[7],v=s[2],_=s[5],M=s[8],T=r[0],S=r[3],b=r[6],R=r[1],C=r[4],P=r[7],U=r[2],F=r[5],L=r[8];return l[0]=u*T+f*R+h*U,l[3]=u*S+f*C+h*F,l[6]=u*b+f*P+h*L,l[1]=d*T+g*R+m*U,l[4]=d*S+g*C+m*F,l[7]=d*b+g*P+m*L,l[2]=v*T+_*R+M*U,l[5]=v*S+_*C+M*F,l[8]=v*b+_*P+M*L,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],s=t[1],r=t[2],l=t[3],u=t[4],f=t[5],h=t[6],d=t[7],g=t[8];return e*u*g-e*f*d-s*l*g+s*f*h+r*l*d-r*u*h}invert(){const t=this.elements,e=t[0],s=t[1],r=t[2],l=t[3],u=t[4],f=t[5],h=t[6],d=t[7],g=t[8],m=g*u-f*d,v=f*h-g*l,_=d*l-u*h,M=e*m+s*v+r*_;if(M===0)return this.set(0,0,0,0,0,0,0,0,0);const T=1/M;return t[0]=m*T,t[1]=(r*d-g*s)*T,t[2]=(f*s-r*u)*T,t[3]=v*T,t[4]=(g*e-r*h)*T,t[5]=(r*l-f*e)*T,t[6]=_*T,t[7]=(s*h-d*e)*T,t[8]=(u*e-s*l)*T,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,s,r,l,u,f){const h=Math.cos(l),d=Math.sin(l);
vendor: 65,763 bytes, line 184
184return this.set(s*h,s*d,-s*(h*u+d*f)+u+t,-r*d,r*h,-r*(-d*u+h*f)+f+e,0,0,1),this}scale(t,e){return this.premultiply(Pm.makeScale(t,e)),this}rotate(t){return this.premultiply(Pm.makeRotation(-t)),this}translate(t,e){return this.premultiply(Pm.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,s,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,s=t.elements;for(let r=0;r<9;r++)if(e[r]!==s[r])return!1;return!0}fromArray(t,e=0){for(let s=0;s<9;s++)this.elements[s]=t[s+e];return this}toArray(t=[],e=0){const s=this.elements;return t[e]=s[0],t[e+1]=s[1],t[e+2]=s[2],t[e+3]=s[3],t[e+4]=s[4],t[e+5]=s[5],t[e+6]=s[6],t[e+7]=s[7],t[e+8]=s[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const Pm=new be,VS=new be().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),HS=new be().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function rO(){const n={enabled:!0,workingColorSpace:xl,spaces:{},convert:function(r,l,u){return this.enabled===!1||l===u||!l||!u||(this.spaces[l].transfer===Ze&&(r.r=ca(r.r),r.g=ca(r.g),r.b=ca(r.b)),this.spaces[l].primaries!==this.spaces[u].primaries&&(r.applyMatrix3(this.spaces[l].toXYZ),r.applyMatrix3(this.spaces[u].fromXYZ)),this.spaces[u].transfer===Ze&&(r.r=cl(r.r),r.g=cl(r.g),r.b=cl(r.b))),r},workingToColorSpace:function(r,l){return this.convert(r,this.workingColorSpace,l)},colorSpaceToWorking:function(r,l){return this.convert(r,l,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===tr?Ad:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,l=this.workingColorSpace){return r.fromArray(this.spaces[l].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,l,u){return r.copy(this.spaces[l].toXYZ).multiply(this.spaces[u].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,l){return $c("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,l)},toWorkingColorSpace:function(r,l){return $c("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(r,l)}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],s=[.3127,.329];return n.define({[xl]:{primaries:t,whitePoint:s,transfer:Ad,toXYZ:VS,fromXYZ:HS,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:xi},outputColorSpaceConfig:{drawingBufferColorSpace:xi}},[xi]:{primaries:t,whitePoint:s,transfer:Ze,toXYZ:VS,fromXYZ:HS,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:xi}}}),n}const ze=rO();function ca(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function cl(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Oo;class oO{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let s;if(t instanceof HTMLCanvasElement)s=t;else{Oo===void 0&&(Oo=Jc("canvas")),Oo.width=t.width,Oo.height=t.height;const r=Oo.getContext("2d");t instanceof ImageData?r.putImageData(t,0,0):r.drawImage(t,0,0,t.width,t.height),s=Oo}return s.toDataURL(e)}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=Jc("canvas");e.width=t.width,e.height=t.height;const s=e.getContext("2d");s.drawImage(t,0,0,t.width,t.height);const r=s.getImageData(0,0,t.width,t.height),l=r.data;for(let u=0;u<l.length;u++)l[u]=ca(l[u]/255)*255;return s.putImageData(r,0,0),e}else if(t.data){const e=t.data.slice(0);for(let s=0;s<e.length;s++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[s]=Math.floor(ca(e[s]/255)*255):e[s]=ca(e[s]);return{data:e,width:t.width,height:t.height}}else return fe("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let lO=0;class jx{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:lO++}),this.uuid=nr(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):typeof VideoFrame<"u"&&e instanceof VideoFrame?t.set(e.displayHeight,e.displayWidth,0):e!==null?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const s={uuid:this.uuid,url:""},r=this.data;if(r!==null){let l;if(Array.isArray(r)){l=[];for(let u=0,f=r.length;u<f;u++)r[u].isDataTexture?l.push(Um(r[u].image)):l.push(Um(r[u]))}else l=Um(r);s.url=l}return e||(t.images[this.uuid]=s),s}}function Um(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?oO.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(fe("Texture: Unable to serialize Texture."),{})}let cO=0;const Om=new et;class ii extends Kr{constructor(t=ii.DEFAULT_IMAGE,e=ii.DEFAULT_MAPPING,s=oa,r=oa,l=ni,u=Hr,f=os,h=Ni,d=ii.DEFAULT_ANISOTROPY,g=tr){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:cO++}),this.uuid=nr(),this.name="",this.source=new jx(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=s,this.wrapT=r,this.magFilter=l,this.minFilter=u,this.anisotropy=d,this.format=f,this.internalFormat=null,this.type=h,this.offset=new ce(0,0),this.repeat=new ce(1,1),this.center=new ce(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new be,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=g,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Om).x}get height(){return this.source.getSize(Om).y}get depth(){return this.source.getSize(Om).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const s=t[e];if(s===void 0){fe(`Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const r=this[e];if(r===void 0){fe(`Texture.setValues(): property '${e}' does not exist.`);continue}r&&s&&r.isVector2&&s.isVector2||r&&s&&r.isVector3&&s.isVector3||r&&s&&r.isMatrix3&&s.isMatrix3?r.copy(s):this[e]=s}}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const s={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).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&&(s.userData=this.userData),e||(t.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==F2)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case eg:t.x=t.x-Math.floor(t.x);break;case oa:t.x=t.x<0?0:1;break;case ng:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case eg:t.y=t.y-Math.floor(t.y);break;case oa:t.y=t.y<0?0:1;break;case ng:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}ii.DEFAULT_IMAGE=null;ii.DEFAULT_MAPPING=F2;ii.DEFAULT_ANISOTROPY=1;class xn{constructor(t=0,e=0,s=0,r=1){xn.prototype.isVector4=!0,this.x=t,this.y=e,this.z=s,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,s,r){return this.x=t,this.y=e,this.z=s,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,s=this.y,r=this.z,l=this.w,u=t.elements;return this.x=u[0]*e+u[4]*s+u[8]*r+u[12]*l,this.y=u[1]*e+u[5]*s+u[9]*r+u[13]*l,this.z=u[2]*e+u[6]*s+u[10]*r+u[14]*l,this.w=u[3]*e+u[7]*s+u[11]*r+u[15]*l,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,s,r,l;const h=t.elements,d=h[0],g=h[4],m=h[8],v=h[1],_=h[5],M=h[9],T=h[2],S=h[6],b=h[10];if(Math.abs(g-v)<.01&&Math.abs(m-T)<.01&&Math.abs(M-S)<.01){if(Math.abs(g+v)<.1&&Math.abs(m+T)<.1&&Math.abs(M+S)<.1&&Math.abs(d+_+b-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const C=(d+1)/2,P=(_+1)/2,U=(b+1)/2,F=(g+v)/4,L=(m+T)/4,z=(M+S)/4;return C>P&&C>U?C<.01?(s=0,r=.707106781,l=.707106781):(s=Math.sqrt(C),r=F/s,l=L/s):P>U?P<.01?(s=.707106781,r=0,l=.707106781):(r=Math.sqrt(P),s=F/r,l=z/r):U<.01?(s=.707106781,r=.707106781,l=0):(l=Math.sqrt(U),s=L/l,r=z/l),this.set(s,r,l,e),this}let R=Math.sqrt((S-M)*(S-M)+(m-T)*(m-T)+(v-g)*(v-g));return Math.abs(R)<.001&&(R=1),this.x=(S-M)/R,this.y=(m-T)/R,this.z=(v-g)/R,this.w=Math.acos((d+_+b-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=we(this.x,t.x,e.x),this.y=we(this.y,t.y,e.y),this.z=we(this.z,t.z,e.z),this.w=we(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=we(this.x,t,e),this.y=we(this.y,t,e),this.z=we(this.z,t,e),this.w=we(this.w,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(we(s,t,e))}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(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this.w=t.w+(e.w-t.w)*s,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),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 uO extends Kr{constructor(t=1,e=1,s={}){super(),s=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ni,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},s),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=s.depth,this.scissor=new xn(0,0,t,e),this.scissorTest=!1,this.viewport=new xn(0,0,t,e);const r={width:t,height:e,depth:s.depth},l=new ii(r);this.textures=[];const u=s.count;for(let f=0;f<u;f++)this.textures[f]=l.clone(),this.textures[f].isRenderTargetTexture=!0,this.textures[f].renderTarget=this;this._setTextureOptions(s),this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,this.resolveDepthBuffer=s.resolveDepthBuffer,this.resolveStencilBuffer=s.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=s.depthTexture,this.samples=s.samples,this.multiview=s.multiview}_setTextureOptions(t={}){const e={minFilter:ni,generateMipmaps:!1,flipY:!1,internalFormat:null};t.mapping!==void 0&&(e.mapping=t.mapping),t.wrapS!==void 0&&(e.wrapS=t.wrapS),t.wrapT!==void 0&&(e.wrapT=t.wrapT),t.wrapR!==void 0&&(e.wrapR=t.wrapR),t.magFilter!==void 0&&(e.magFilter=t.magFilter),t.minFilter!==void 0&&(e.minFilter=t.minFilter),t.format!==void 0&&(e.format=t.format),t.type!==void 0&&(e.type=t.type),t.anisotropy!==void 0&&(e.anisotropy=t.anisotropy),t.colorSpace!==void 0&&(e.colorSpace=t.colorSpace),t.flipY!==void 0&&(e.flipY=t.flipY),t.generateMipmaps!==void 0&&(e.generateMipmaps=t.generateMipmaps),t.internalFormat!==void 0&&(e.internalFormat=t.internalFormat);for(let s=0;s<this.textures.length;s++)this.textures[s].setValues(e)}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}set depthTexture(t){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),t!==null&&(t.renderTarget=this),this._depthTexture=t}get depthTexture(){return this._depthTexture}setSize(t,e,s=1){if(this.width!==t||this.height!==e||this.depth!==s){this.width=t,this.height=e,this.depth=s;for(let r=0,l=this.textures.length;r<l;r++)this.textures[r].image.width=t,this.textures[r].image.height=e,this.textures[r].image.depth=s,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let e=0,s=t.textures.length;e<s;e++){this.textures[e]=t.textures[e].clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;const r=Object.assign({},t.textures[e].image);this.textures[e].source=new jx(r)}return this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ws extends uO{constructor(t=1,e=1,s={}){super(t,e,s),this.isWebGLRenderTarget=!0}}class W2 extends ii{constructor(t=null,e=1,s=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:s,depth:r},this.magFilter=Qn,this.minFilter=Qn,this.wrapR=oa,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class fO extends ii{constructor(t=null,e=1,s=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:s,depth:r},this.magFilter=Qn,this.minFilter=Qn,this.wrapR=oa,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ou{constructor(t=new et(1/0,1/0,1/0),e=new et(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,s=t.length;e<s;e+=3)this.expandByPoint(ns.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,s=t.count;e<s;e++)this.expandByPoint(ns.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,s=t.length;e<s;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const s=ns.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(s),this.max.copy(t).add(s),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.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(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const s=t.geometry;if(s!==void 0){const l=s.getAttribute("position");if(e===!0&&l!==void 0&&t.isInstancedMesh!==!0)for(let u=0,f=l.count;u<f;u++)t.isMesh===!0?t.getVertexPosition(u,ns):ns.fromBufferAttribute(l,u),ns.applyMatrix4(t.matrixWorld),this.expandByPoint(ns);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),Nf.copy(t.boundingBox)):(s.boundingBox===null&&s.computeBoundingBox(),Nf.copy(s.boundingBox)),Nf.applyMatrix4(t.matrixWorld),this.union(Nf)}const r=t.children;for(let l=0,u=r.length;l<u;l++)this.expandByObject(r[l],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,ns),ns.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,s;return t.normal.x>0?(e=t.normal.x*this.min.x,s=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,s=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,s+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,s+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,s+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,s+=t.normal.z*this.min.z),e<=-t.constant&&s>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Sc),Lf.subVectors(this.max,Sc),Fo.subVectors(t.a,Sc),Io.subVectors(t.b,Sc),zo.subVectors(t.c,Sc),Xa.subVectors(Io,Fo),Ya.subVectors(zo,Io),Rr.subVectors(Fo,zo);let e=[0,-Xa.z,Xa.y,0,-Ya.z,Ya.y,0,-Rr.z,Rr.y,Xa.z,0,-Xa.x,Ya.z,0,-Ya.x,Rr.z,0,-Rr.x,-Xa.y,Xa.x,0,-Ya.y,Ya.x,0,-Rr.y,Rr.x,0];return!Fm(e,Fo,Io,zo,Lf)||(e=[1,0,0,0,1,0,0,0,1],!Fm(e,Fo,Io,zo,Lf))?!1:(Pf.crossVectors(Xa,Ya),e=[Pf.x,Pf.y,Pf.z],Fm(e,Fo,Io,zo,Lf))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ns).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(ns).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Js[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Js[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Js[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Js[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Js[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Js[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Js[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Js[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Js),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(t){return this.min.fromArray(t.min),this.max.fromArray(t.max),this}}const Js=[new et,new et,new et,new et,new et,new et,new et,new et],ns=new et,Nf=new ou,Fo=new et,Io=new et,zo=new et,Xa=new et,Ya=new et,Rr=new et,Sc=new et,Lf=new et,Pf=new et,Dr=new et;function Fm(n,t,e,s,r){for(let l=0,u=n.length-3;l<=u;l+=3){Dr.fromArray(n,l);const f=r.x*Math.abs(Dr.x)+r.y*Math.abs(Dr.y)+r.z*Math.abs(Dr.z),h=t.dot(Dr),d=e.dot(Dr),g=s.dot(Dr);if(Math.max(-Math.max(h,d,g),Math.min(h,d,g))>f)return!1}return!0}const dO=new ou,Mc=new et,Im=new et;class qd{constructor(t=new et,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const s=this.center;e!==void 0?s.copy(e):dO.setFromPoints(t).getCenter(s);let r=0;for(let l=0,u=t.length;l<u;l++)r=Math.max(r,s.distanceToSquared(t[l]));return this.radius=Math.sqrt(r),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const s=this.center.distanceToSquared(t);return e.copy(t),s>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Mc.subVectors(t,this.center);const e=Mc.lengthSq();if(e>this.radius*this.radius){const s=Math.sqrt(e),r=(s-this.radius)*.5;this.center.addScaledVector(Mc,r/s),this.radius+=r}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(Im.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Mc.copy(t.center).add(Im)),this.expandByPoint(Mc.copy(t.center).sub(Im))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(t){return this.radius=t.radius,this.center.fromArray(t.center),this}}const $s=new et,zm=new et,Uf=new et,qa=new et,Bm=new et,Of=new et,Vm=new et;class Zd{constructor(t=new et,e=new et(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,$s)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const s=e.dot(this.direction);return s<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,s)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=$s.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):($s.copy(this.origin).addScaledVector(this.direction,e),$s.distanceToSquared(t))}distanceSqToSegment(t,e,s,r){zm.copy(t).add(e).multiplyScalar(.5),Uf.copy(e).sub(t).normalize(),qa.copy(this.origin).sub(zm);const l=t.distanceTo(e)*.5,u=-this.direction.dot(Uf),f=qa.dot(this.direction),h=-qa.dot(Uf),d=qa.lengthSq(),g=Math.abs(1-u*u);let m,v,_,M;if(g>0)if(m=u*h-f,v=u*f-h,M=l*g,m>=0)if(v>=-M)if(v<=M){const T=1/g;m*=T,v*=T,_=m*(m+u*v+2*f)+v*(u*m+v+2*h)+d}else v=l,m=Math.max(0,-(u*v+f)),_=-m*m+v*(v+2*h)+d;else v=-l,m=Math.max(0,-(u*v+f)),_=-m*m+v*(v+2*h)+d;else v<=-M?(m=Math.max(0,-(-u*l+f)),v=m>0?-l:Math.min(Math.max(-l,-h),l),_=-m*m+v*(v+2*h)+d):v<=M?(m=0,v=Math.min(Math.max(-l,-h),l),_=v*(v+2*h)+d):(m=Math.max(0,-(u*l+f)),v=m>0?l:Math.min(Math.max(-l,-h),l),_=-m*m+v*(v+2*h)+d);else v=u>0?-l:l,m=Math.max(0,-(u*v+f)),_=-m*m+v*(v+2*h)+d;return s&&s.copy(this.origin).addScaledVector(this.direction,m),r&&r.copy(zm).addScaledVector(Uf,v),_}intersectSphere(t,e){$s.subVectors(t.center,this.origin);const s=$s.dot(this.direction),r=$s.dot($s)-s*s,l=t.radius*t.radius;if(r>l)return null;const u=Math.sqrt(l-r),f=s-u,h=s+u;return h<0?null:f<0?this.at(h,e):this.at(f,e)}intersectsSphere(t){return t.radius<0?!1:this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const s=-(this.origin.dot(t.normal)+t.constant)/e;return s>=0?s:null}intersectPlane(t,e){const s=this.distanceToPlane(t);return s===null?null:this.at(s,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let s,r,l,u,f,h;const d=1/this.direction.x,g=1/this.direction.y,m=1/this.direction.z,v=this.origin;return d>=0?(s=(t.min.x-v.x)*d,r=(t.max.x-v.x)*d):(s=(t.max.x-v.x)*d,r=(t.min.x-v.x)*d),g>=0?(l=(t.min.y-v.y)*g,u=(t.max.y-v.y)*g):(l=(t.max.y-v.y)*g,u=(t.min.y-v.y)*g),s>u||l>r||((l>s||isNaN(s))&&(s=l),(u<r||isNaN(r))&&(r=u),m>=0?(f=(t.min.z-v.z)*m,h=(t.max.z-v.z)*m):(f=(t.max.z-v.z)*m,h=(t.min.z-v.z)*m),s>h||f>r)||((f>s||s!==s)&&(s=f),(h<r||r!==r)&&(r=h),r<0)?null:this.at(s>=0?s:r,e)}intersectsBox(t){return this.intersectBox(t,$s)!==null}intersectTriangle(t,e,s,r,l){Bm.subVectors(e,t),Of.subVectors(s,t),Vm.crossVectors(Bm,Of);let u=this.direction.dot(Vm),f;if(u>0){if(r)return null;f=1}else if(u<0)f=-1,u=-u;else return null;qa.subVectors(this.origin,t);const h=f*this.direction.dot(Of.crossVectors(qa,Of));if(h<0)return null;const d=f*this.direction.dot(Bm.cross(qa));if(d<0||h+d>u)return null;const g=-f*qa.dot(Vm);return g<0?null:this.at(g/u,l)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ln{constructor(t,e,s,r,l,u,f,h,d,g,m,v,_,M,T,S){ln.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,s,r,l,u,f,h,d,g,m,v,_,M,T,S)}set(t,e,s,r,l,u,f,h,d,g,m,v,_,M,T,S){const b=this.elements;return b[0]=t,b[4]=e,b[8]=s,b[12]=r,b[1]=l,b[5]=u,b[9]=f,b[13]=h,b[2]=d,b[6]=g,b[10]=m,b[14]=v,b[3]=_,b[7]=M,b[11]=T,b[15]=S,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 ln().fromArray(this.elements)}copy(t){const e=this.elements,s=t.elements;return e[0]=s[0],e[1]=s[1],e[2]=s[2],e[3]=s[3],e[4]=s[4],e[5]=s[5],e[6]=s[6],e[7]=s[7],e[8]=s[8],e[9]=s[9],e[10]=s[10],e[11]=s[11],e[12]=s[12],e[13]=s[13],e[14]=s[14],e[15]=s[15],this}copyPosition(t){const e=this.elements,s=t.elements;return e[12]=s[12],e[13]=s[13],e[14]=s[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,s){return this.determinant()===0?(t.set(1,0,0),e.set(0,1,0),s.set(0,0,1),this):(t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),s.setFromMatrixColumn(this,2),this)}makeBasis(t,e,s){return this.set(t.x,e.x,s.x,0,t.y,e.y,s.y,0,t.z,e.z,s.z,0,0,0,0,1),this}extractRotation(t){if(t.determinant()===0)return this.identity();const e=this.elements,s=t.elements,r=1/Bo.setFromMatrixColumn(t,0).length(),l=1/Bo.setFromMatrixColumn(t,1).length(),u=1/Bo.setFromMatrixColumn(t,2).length();return e[0]=s[0]*r,e[1]=s[1]*r,e[2]=s[2]*r,e[3]=0,e[4]=s[4]*l,e[5]=s[5]*l,e[6]=s[6]*l,e[7]=0,e[8]=s[8]*u,e[9]=s[9]*u,e[10]=s[10]*u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,s=t.x,r=t.y,l=t.z,u=Math.cos(s),f=Math.sin(s),h=Math.cos(r),d=Math.sin(r),g=Math.cos(l),m=Math.sin(l);if(t.order==="XYZ"){const v=u*g,_=u*m,M=f*g,T=f*m;e[0]=h*g,e[4]=-h*m,e[8]=d,e[1]=_+M*d,e[5]=v-T*d,e[9]=-f*h,e[2]=T-v*d,e[6]=M+_*d,e[10]=u*h}else if(t.order==="YXZ"){const v=h*g,_=h*m,M=d*g,T=d*m;e[0]=v+T*f,e[4]=M*f-_,e[8]=u*d,e[1]=u*m,e[5]=u*g,e[9]=-f,e[2]=_*f-M,e[6]=T+v*f,e[10]=u*h}else if(t.order==="ZXY"){const v=h*g,_=h*m,M=d*g,T=d*m;e[0]=v-T*f,e[4]=-u*m,e[8]=M+_*f,e[1]=_+M*f,e[5]=u*g,e[9]=T-v*f,e[2]=-u*d,e[6]=f,e[10]=u*h}else if(t.order==="ZYX"){const v=u*g,_=u*m,M=f*g,T=f*m;e[0]=h*g,e[4]=M*d-_,e[8]=v*d+T,e[1]=h*m,e[5]=T*d+v,e[9]=_*d-M,e[2]=-d,e[6]=f*h,e[10]=u*h}else if(t.order==="YZX"){const v=u*h,_=u*d,M=f*h,T=f*d;e[0]=h*g,e[4]=T-v*m,e[8]=M*m+_,e[1]=m,e[5]=u*g,e[9]=-f*g,e[2]=-d*g,e[6]=_*m+M,e[10]=v-T*m}else if(t.order==="XZY"){const v=u*h,_=u*d,M=f*h,T=f*d;e[0]=h*g,e[4]=-m,e[8]=d*g,e[1]=v*m+T,e[5]=u*g,e[9]=_*m-M,e[2]=M*m-_,e[6]=f*g,e[10]=T*m+v}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(hO,t,pO)}lookAt(t,e,s){const r=this.elements;return wi.subVectors(t,e),wi.lengthSq()===0&&(wi.z=1),wi.normalize(),Za.crossVectors(s,wi),Za.lengthSq()===0&&(Math.abs(s.z)===1?wi.x+=1e-4:wi.z+=1e-4,wi.normalize(),Za.crossVectors(s,wi)),Za.normalize(),Ff.crossVectors(wi,Za),r[0]=Za.x,r[4]=Ff.x,r[8]=wi.x,r[1]=Za.y,r[5]=Ff.y,r[9]=wi.y,r[2]=Za.z,r[6]=Ff.z,r[10]=wi.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const s=t.elements,r=e.elements,l=this.elements,u=s[0],f=s[4],h=s[8],d=s[12],g=s[1],m=s[5],v=s[9],_=s[13],M=s[2],T=s[6],S=s[10],b=s[14],R=s[3],C=s[7],P=s[11],U=s[15],F=r[0],L=r[4],z=r[8],w=r[12],O=r[1],j=r[5],Q=r[9],Z=r[13],rt=r[2],ot=r[6],I=r[10],V=r[14],k=r[3],gt=r[7],xt=r[11],B=r[15];return l[0]=u*F+f*O+h*rt+d*k,l[4]=u*L+f*j+h*ot+d*gt,l[8]=u*z+f*Q+h*I+d*xt,l[12]=u*w+f*Z+h*V+d*B,l[1]=g*F+m*O+v*rt+_*k,l[5]=g*L+m*j+v*ot+_*gt,l[9]=g*z+m*Q+v*I+_*xt,l[13]=g*w+m*Z+v*V+_*B,l[2]=M*F+T*O+S*rt+b*k,l[6]=M*L+T*j+S*ot+b*gt,l[10]=M*z+T*Q+S*I+b*xt,l[14]=M*w+T*Z+S*V+b*B,l[3]=R*F+C*O+P*rt+U*k,l[7]=R*L+C*j+P*ot+U*gt,l[11]=R*z+C*Q+P*I+U*xt,l[15]=R*w+C*Z+P*V+U*B,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],s=t[4],r=t[8],l=t[12],u=t[1],f=t[5],h=t[9],d=t[13],g=t[2],m=t[6],v=t[10],_=t[14],M=t[3],T=t[7],S=t[11],b=t[15],R=h*_-d*v,C=f*_-d*m,P=f*v-h*m,U=u*_-d*g,F=u*v-h*g,L=u*m-f*g;return e*(T*R-S*C+b*P)-s*(M*R-S*U+b*F)+r*(M*C-T*U+b*L)-l*(M*P-T*F+S*L)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,s){const r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=e,r[14]=s),this}invert(){const t=this.elements,e=t[0],s=t[1],r=t[2],l=t[3],u=t[4],f=t[5],h=t[6],d=t[7],g=t[8],m=t[9],v=t[10],_=t[11],M=t[12],T=t[13],S=t[14],b=t[15],R=m*S*d-T*v*d+T*h*_-f*S*_-m*h*b+f*v*b,C=M*v*d-g*S*d-M*h*_+u*S*_+g*h*b-u*v*b,P=g*T*d-M*m*d+M*f*_-u*T*_-g*f*b+u*m*b,U=M*m*h-g*T*h-M*f*v+u*T*v+g*f*S-u*m*S,F=e*R+s*C+r*P+l*U;if(F===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/F;return t[0]=R*L,t[1]=(T*v*l-m*S*l-T*r*_+s*S*_+m*r*b-s*v*b)*L,t[2]=(f*S*l-T*h*l+T*r*d-s*S*d-f*r*b+s*h*b)*L,t[3]=(m*h*l-f*v*l-m*r*d+s*v*d+f*r*_-s*h*_)*L,t[4]=C*L,t[5]=(g*S*l-M*v*l+M*r*_-e*S*_-g*r*b+e*v*b)*L,t[6]=(M*h*l-u*S*l-M*r*d+e*S*d+u*r*b-e*h*b)*L,t[7]=(u*v*l-g*h*l+g*r*d-e*v*d-u*r*_+e*h*_)*L,t[8]=P*L,t[9]=(M*m*l-g*T*l-M*s*_+e*T*_+g*s*b-e*m*b)*L,t[10]=(u*T*l-M*f*l+M*s*d-e*T*d-u*s*b+e*f*b)*L,t[11]=(g*f*l-u*m*l-g*s*d+e*m*d+u*s*_-e*f*_)*L,t[12]=U*L,t[13]=(g*T*r-M*m*r+M*s*v-e*T*v-g*s*S+e*m*S)*L,t[14]=(M*f*r-u*T*r-M*s*h+e*T*h+u*s*S-e*f*S)*L,t[15]=(u*m*r-g*f*r+g*s*h-e*m*h-u*s*v+e*f*v)*L,this}scale(t){const e=this.elements,s=t.x,r=t.y,l=t.z;return e[0]*=s,e[4]*=r,e[8]*=l,e[1]*=s,e[5]*=r,e[9]*=l,e[2]*=s,e[6]*=r,e[10]*=l,e[3]*=s,e[7]*=r,e[11]*=l,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],s=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,s,r))}makeTranslation(t,e,s){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,s,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),s=Math.sin(t);return this.set(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const s=Math.cos(e),r=Math.sin(e),l=1-s,u=t.x,f=t.y,h=t.z,d=l*u,g=l*f;return this.set(d*u+s,d*f-r*h,d*h+r*f,0,d*f+r*h,g*f+s,g*h-r*u,0,d*h-r*f,g*h+r*u,l*h*h+s,0,0,0,0,1),this}makeScale(t,e,s){return this.set(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1),this}makeShear(t,e,s,r,l,u){return this.set(1,s,l,0,t,1,u,0,e,r,1,0,0,0,0,1),this}compose(t,e,s){const r=this.elements,l=e._x,u=e._y,f=e._z,h=e._w,d=l+l,g=u+u,m=f+f,v=l*d,_=l*g,M=l*m,T=u*g,S=u*m,b=f*m,R=h*d,C=h*g,P=h*m,U=s.x,F=s.y,L=s.z;return r[0]=(1-(T+b))*U,r[1]=(_+P)*U,r[2]=(M-C)*U,r[3]=0,r[4]=(_-P)*F,r[5]=(1-(v+b))*F,r[6]=(S+R)*F,r[7]=0,r[8]=(M+C)*L,r[9]=(S-R)*L,r[10]=(1-(v+T))*L,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,e,s){const r=this.elements;if(t.x=r[12],t.y=r[13],t.z=r[14],this.determinant()===0)return s.set(1,1,1),e.identity(),this;let l=Bo.set(r[0],r[1],r[2]).length();const u=Bo.set(r[4],r[5],r[6]).length(),f=Bo.set(r[8],r[9],r[10]).length();this.determinant()<0&&(l=-l),is.copy(this);const d=1/l,g=1/u,m=1/f;return is.elements[0]*=d,is.elements[1]*=d,is.elements[2]*=d,is.elements[4]*=g,is.elements[5]*=g,is.elements[6]*=g,is.elements[8]*=m,is.elements[9]*=m,is.elements[10]*=m,e.setFromRotationMatrix(is),s.x=l,s.y=u,s.z=f,this}makePerspective(t,e,s,r,l,u,f=Ss,h=!1){const d=this.elements,g=2*l/(e-t),m=2*l/(s-r),v=(e+t)/(e-t),_=(s+r)/(s-r);let M,T;if(h)M=l/(u-l),T=u*l/(u-l);else if(f===Ss)M=-(u+l)/(u-l),T=-2*u*l/(u-l);else if(f===wd)M=-u/(u-l),T=-u*l/(u-l);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+f);return d[0]=g,d[4]=0,d[8]=v,d[12]=0,d[1]=0,d[5]=m,d[9]=_,d[13]=0,d[2]=0,d[6]=0,d[10]=M,d[14]=T,d[3]=0,d[7]=0,d[11]=-1,d[15]=0,this}makeOrthographic(t,e,s,r,l,u,f=Ss,h=!1){const d=this.elements,g=2/(e-t),m=2/(s-r),v=-(e+t)/(e-t),_=-(s+r)/(s-r);let M,T;if(h)M=1/(u-l),T=u/(u-l);else if(f===Ss)M=-2/(u-l),T=-(u+l)/(u-l);else if(f===wd)M=-1/(u-l),T=-l/(u-l);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+f);return d[0]=g,d[4]=0,d[8]=0,d[12]=v,d[1]=0,d[5]=m,d[9]=0,d[13]=_,d[2]=0,d[6]=0,d[10]=M,d[14]=T,d[3]=0,d[7]=0,d[11]=0,d[15]=1,this}equals(t){const e=this.elements,s=t.elements;for(let r=0;r<16;r++)if(e[r]!==s[r])return!1;return!0}fromArray(t,e=0){for(let s=0;s<16;s++)this.elements[s]=t[s+e];return this}toArray(t=[],e=0){const s=this.elements;return t[e]=s[0],t[e+1]=s[1],t[e+2]=s[2],t[e+3]=s[3],t[e+4]=s[4],t[e+5]=s[5],t[e+6]=s[6],t[e+7]=s[7],t[e+8]=s[8],t[e+9]=s[9],t[e+10]=s[10],t[e+11]=s[11],t[e+12]=s[12],t[e+13]=s[13],t[e+14]=s[14],t[e+15]=s[15],t}}const Bo=new et,is=new ln,hO=new et(0,0,0),pO=new et(1,1,1),Za=new et,Ff=new et,wi=new et,kS=new ln,GS=new Yr;class ga{constructor(t=0,e=0,s=0,r=ga.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=s,this._order=r}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,s,r=this._order){return this._x=t,this._y=e,this._z=s,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,s=!0){const r=t.elements,l=r[0],u=r[4],f=r[8],h=r[1],d=r[5],g=r[9],m=r[2],v=r[6],_=r[10];switch(e){case"XYZ":this._y=Math.asin(we(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(-g,_),this._z=Math.atan2(-u,l)):(this._x=Math.atan2(v,d),this._z=0);break;case"YXZ":this._x=Math.asin(-we(g,-1,1)),Math.abs(g)<.9999999?(this._y=Math.atan2(f,_),this._z=Math.atan2(h,d)):(this._y=Math.atan2(-m,l),this._z=0);break;case"ZXY":this._x=Math.asin(we(v,-1,1)),Math.abs(v)<.9999999?(this._y=Math.atan2(-m,_),this._z=Math.atan2(-u,d)):(this._y=0,this._z=Math.atan2(h,l));break;case"ZYX":this._y=Math.asin(-we(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(v,_),this._z=Math.atan2(h,l)):(this._x=0,this._z=Math.atan2(-u,d));break;case"YZX":this._z=Math.asin(we(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-g,d),this._y=Math.atan2(-m,l)):(this._x=0,this._y=Math.atan2(f,_));break;case"XZY":this._z=Math.asin(-we(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(v,d),this._y=Math.atan2(f,l)):(this._x=Math.atan2(-g,_),this._y=0);break;default:fe("Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,s===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,s){return kS.makeRotationFromQuaternion(t),this.setFromRotationMatrix(kS,e,s)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return GS.setFromEuler(this),this.setFromQuaternion(GS,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ga.DEFAULT_ORDER="XYZ";class Wx{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let mO=0;const jS=new et,Vo=new Yr,ta=new ln,If=new et,Ec=new et,gO=new et,xO=new Yr,WS=new et(1,0,0),XS=new et(0,1,0),YS=new et(0,0,1),qS={type:"added"},vO={type:"removed"},Ho={type:"childadded",child:null},Hm={type:"childremoved",child:null};class zn extends Kr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:mO++}),this.uuid=nr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=zn.DEFAULT_UP.clone();const t=new et,e=new ga,s=new Yr,r=new et(1,1,1);function l(){s.setFromEuler(e,!1)}function u(){e.setFromQuaternion(s,void 0,!1)}e._onChange(l),s._onChange(u),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:s},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new ln},normalMatrix:{value:new be}}),this.matrix=new ln,this.matrixWorld=new ln,this.matrixAutoUpdate=zn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=zn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Wx,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return Vo.setFromAxisAngle(t,e),this.quaternion.multiply(Vo),this}rotateOnWorldAxis(t,e){return Vo.setFromAxisAngle(t,e),this.quaternion.premultiply(Vo),this}rotateX(t){return this.rotateOnAxis(WS,t)}rotateY(t){return this.rotateOnAxis(XS,t)}rotateZ(t){return this.rotateOnAxis(YS,t)}translateOnAxis(t,e){return jS.copy(t).applyQuaternion(this.quaternion),this.position.add(jS.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(WS,t)}translateY(t){return this.translateOnAxis(XS,t)}translateZ(t){return this.translateOnAxis(YS,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ta.copy(this.matrixWorld).invert())}lookAt(t,e,s){t.isVector3?If.copy(t):If.set(t,e,s);const r=this.parent;this.updateWorldMatrix(!0,!1),Ec.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ta.lookAt(Ec,If,this.up):ta.lookAt(If,Ec,this.up),this.quaternion.setFromRotationMatrix(ta),r&&(ta.extractRotation(r.matrixWorld),Vo.setFromRotationMatrix(ta),this.quaternion.premultiply(Vo.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(Oe("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(qS),Ho.child=t,this.dispatchEvent(Ho),Ho.child=null):Oe("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let s=0;s<arguments.length;s++)this.remove(arguments[s]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(vO),Hm.child=t,this.dispatchEvent(Hm),Hm.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ta.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ta.multiply(t.parent.matrixWorld)),t.applyMatrix4(ta),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(qS),Ho.child=t,this.dispatchEvent(Ho),Ho.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let s=0,r=this.children.length;s<r;s++){const u=this.children[s].getObjectByProperty(t,e);if(u!==void 0)return u}}getObjectsByProperty(t,e,s=[]){this[t]===e&&s.push(this);const r=this.children;for(let l=0,u=r.length;l<u;l++)r[l].getObjectsByProperty(t,e,s);return s}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ec,t,gO),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ec,xO,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let s=0,r=e.length;s<r;s++)e[s].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let s=0,r=e.length;s<r;s++)e[s].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let s=0,r=e.length;s<r;s++)e[s].updateMatrixWorld(t)}updateWorldMatrix(t,e){const s=this.parent;if(t===!0&&s!==null&&s.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)),e===!0){const r=this.children;for(let l=0,u=r.length;l<u;l++)r[l].updateWorldMatrix(!1,!0)}}toJSON(t){const e=t===void 0||typeof t=="string",s={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},s.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(f=>({...f,boundingBox:f.boundingBox?f.boundingBox.toJSON():void 0,boundingSphere:f.boundingSphere?f.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(f=>({...f})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(t),r.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function l(f,h){return f[h.uuid]===void 0&&(f[h.uuid]=h.toJSON(t)),h.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=l(t.geometries,this.geometry);const f=this.geometry.parameters;if(f!==void 0&&f.shapes!==void 0){const h=f.shapes;if(Array.isArray(h))for(let d=0,g=h.length;d<g;d++){const m=h[d];l(t.shapes,m)}else l(t.shapes,h)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(l(t.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const f=[];for(let h=0,d=this.material.length;h<d;h++)f.push(l(t.materials,this.material[h]));r.material=f}else r.material=l(t.materials,this.material);if(this.children.length>0){r.children=[];for(let f=0;f<this.children.length;f++)r.children.push(this.children[f].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let f=0;f<this.animations.length;f++){const h=this.animations[f];r.animations.push(l(t.animations,h))}}if(e){const f=u(t.geometries),h=u(t.materials),d=u(t.textures),g=u(t.images),m=u(t.shapes),v=u(t.skeletons),_=u(t.animations),M=u(t.nodes);f.length>0&&(s.geometries=f),h.length>0&&(s.materials=h),d.length>0&&(s.textures=d),g.length>0&&(s.images=g),m.length>0&&(s.shapes=m),v.length>0&&(s.skeletons=v),_.length>0&&(s.animations=_),M.length>0&&(s.nodes=M)}return s.object=r,s;function u(f){const h=[];for(const d in f){const g=f[d];delete g.metadata,h.push(g)}return h}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let s=0;s<t.children.length;s++){const r=t.children[s];this.add(r.clone())}return this}}zn.DEFAULT_UP=new et(0,1,0);zn.DEFAULT_MATRIX_AUTO_UPDATE=!0;zn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const ss=new et,ea=new et,km=new et,na=new et,ko=new et,Go=new et,ZS=new et,Gm=new et,jm=new et,Wm=new et,Xm=new xn,Ym=new xn,qm=new xn;class Yi{constructor(t=new et,e=new et,s=new et){this.a=t,this.b=e,this.c=s}static getNormal(t,e,s,r){r.subVectors(s,e),ss.subVectors(t,e),r.cross(ss);const l=r.lengthSq();return l>0?r.multiplyScalar(1/Math.sqrt(l)):r.set(0,0,0)}static getBarycoord(t,e,s,r,l){ss.subVectors(r,e),ea.subVectors(s,e),km.subVectors(t,e);const u=ss.dot(ss),f=ss.dot(ea),h=ss.dot(km),d=ea.dot(ea),g=ea.dot(km),m=u*d-f*f;if(m===0)return l.set(0,0,0),null;const v=1/m,_=(d*h-f*g)*v,M=(u*g-f*h)*v;return l.set(1-_-M,M,_)}static containsPoint(t,e,s,r){return this.getBarycoord(t,e,s,r,na)===null?!1:na.x>=0&&na.y>=0&&na.x+na.y<=1}static getInterpolation(t,e,s,r,l,u,f,h){return this.getBarycoord(t,e,s,r,na)===null?(h.x=0,h.y=0,"z"in h&&(h.z=0),"w"in h&&(h.w=0),null):(h.setScalar(0),h.addScaledVector(l,na.x),h.addScaledVector(u,na.y),h.addScaledVector(f,na.z),h)}static getInterpolatedAttribute(t,e,s,r,l,u){return Xm.setScalar(0),Ym.setScalar(0),qm.setScalar(0),Xm.fromBufferAttribute(t,e),Ym.fromBufferAttribute(t,s),qm.fromBufferAttribute(t,r),u.setScalar(0),u.addScaledVector(Xm,l.x),u.addScaledVector(Ym,l.y),u.addScaledVector(qm,l.z),u}static isFrontFacing(t,e,s,r){return ss.subVectors(s,e),ea.subVectors(t,e),ss.cross(ea).dot(r)<0}set(t,e,s){return this.a.copy(t),this.b.copy(e),this.c.copy(s),this}setFromPointsAndIndices(t,e,s,r){return this.a.copy(t[e]),this.b.copy(t[s]),this.c.copy(t[r]),this}setFromAttributeAndIndices(t,e,s,r){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,s),this.c.fromBufferAttribute(t,r),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ss.subVectors(this.c,this.b),ea.subVectors(this.a,this.b),ss.cross(ea).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Yi.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Yi.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,s,r,l){return Yi.getInterpolation(t,this.a,this.b,this.c,e,s,r,l)}containsPoint(t){return Yi.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Yi.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const s=this.a,r=this.b,l=this.c;let u,f;ko.subVectors(r,s),Go.subVectors(l,s),Gm.subVectors(t,s);const h=ko.dot(Gm),d=Go.dot(Gm);if(h<=0&&d<=0)return e.copy(s);jm.subVectors(t,r);const g=ko.dot(jm),m=Go.dot(jm);if(g>=0&&m<=g)return e.copy(r);const v=h*m-g*d;if(v<=0&&h>=0&&g<=0)return u=h/(h-g),e.copy(s).addScaledVector(ko,u);Wm.subVectors(t,l);const _=ko.dot(Wm),M=Go.dot(Wm);if(M>=0&&_<=M)return e.copy(l);const T=_*d-h*M;if(T<=0&&d>=0&&M<=0)return f=d/(d-M),e.copy(s).addScaledVector(Go,f);const S=g*M-_*m;if(S<=0&&m-g>=0&&_-M>=0)return ZS.subVectors(l,r),f=(m-g)/(m-g+(_-M)),e.copy(r).addScaledVector(ZS,f);const b=1/(S+T+v);return u=T*b,f=v*b,e.copy(s).addScaledVector(ko,u).addScaledVector(Go,f)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const X2={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},Ka={h:0,s:0,l:0},zf={h:0,s:0,l:0};function Zm(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}class Fe{constructor(t,e,s){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,s)}set(t,e,s){if(e===void 0&&s===void 0){const r=t;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(t,e,s);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=xi){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,ze.colorSpaceToWorking(this,e),this}setRGB(t,e,s,r=ze.workingColorSpace){return this.r=t,this.g=e,this.b=s,ze.colorSpaceToWorking(this,r),this}setHSL(t,e,s,r=ze.workingColorSpace){if(t=sO(t,1),e=we(e,0,1),s=we(s,0,1),e===0)this.r=this.g=this.b=s;else{const l=s<=.5?s*(1+e):s+e-s*e,u=2*s-l;this.r=Zm(u,l,t+1/3),this.g=Zm(u,l,t),this.b=Zm(u,l,t-1/3)}return ze.colorSpaceToWorking(this,r),this}setStyle(t,e=xi){function s(l){l!==void 0&&parseFloat(l)<1&&fe("Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(t)){let l;const u=r[1],f=r[2];switch(u){case"rgb":case"rgba":if(l=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return s(l[4]),this.setRGB(Math.min(255,parseInt(l[1],10))/255,Math.min(255,parseInt(l[2],10))/255,Math.min(255,parseInt(l[3],10))/255,e);if(l=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return s(l[4]),this.setRGB(Math.min(100,parseInt(l[1],10))/100,Math.min(100,parseInt(l[2],10))/100,Math.min(100,parseInt(l[3],10))/100,e);break;case"hsl":case"hsla":if(l=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(f))return s(l[4]),this.setHSL(parseFloat(l[1])/360,parseFloat(l[2])/100,parseFloat(l[3])/100,e);break;default:fe("Color: Unknown color model "+t)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){const l=r[1],u=l.length;if(u===3)return this.setRGB(parseInt(l.charAt(0),16)/15,parseInt(l.charAt(1),16)/15,parseInt(l.charAt(2),16)/15,e);if(u===6)return this.setHex(parseInt(l,16),e);fe("Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=xi){const s=X2[t.toLowerCase()];return s!==void 0?this.setHex(s,e):fe("Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=ca(t.r),this.g=ca(t.g),this.b=ca(t.b),this}copyLinearToSRGB(t){return this.r=cl(t.r),this.g=cl(t.g),this.b=cl(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=xi){return ze.workingToColorSpace(ti.copy(this),t),Math.round(we(ti.r*255,0,255))*65536+Math.round(we(ti.g*255,0,255))*256+Math.round(we(ti.b*255,0,255))}getHexString(t=xi){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ze.workingColorSpace){ze.workingToColorSpace(ti.copy(this),e);const s=ti.r,r=ti.g,l=ti.b,u=Math.max(s,r,l),f=Math.min(s,r,l);let h,d;const g=(f+u)/2;if(f===u)h=0,d=0;else{const m=u-f;switch(d=g<=.5?m/(u+f):m/(2-u-f),u){case s:h=(r-l)/m+(r<l?6:0);break;case r:h=(l-s)/m+2;break;case l:h=(s-r)/m+4;break}h/=6}return t.h=h,t.s=d,t.l=g,t}getRGB(t,e=ze.workingColorSpace){return ze.workingToColorSpace(ti.copy(this),e),t.r=ti.r,t.g=ti.g,t.b=ti.b,t}getStyle(t=xi){ze.workingToColorSpace(ti.copy(this),t);const e=ti.r,s=ti.g,r=ti.b;return t!==xi?`color(${t} ${e.toFixed(3)} ${s.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(s*255)},${Math.round(r*255)})`}offsetHSL(t,e,s){return this.getHSL(Ka),this.setHSL(Ka.h+t,Ka.s+e,Ka.l+s)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,s){return this.r=t.r+(e.r-t.r)*s,this.g=t.g+(e.g-t.g)*s,this.b=t.b+(e.b-t.b)*s,this}lerpHSL(t,e){this.getHSL(Ka),t.getHSL(zf);const s=Nm(Ka.h,zf.h,e),r=Nm(Ka.s,zf.s,e),l=Nm(Ka.l,zf.l,e);return this.setHSL(s,r,l),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,s=this.g,r=this.b,l=t.elements;return this.r=l[0]*e+l[3]*s+l[6]*r,this.g=l[1]*e+l[4]*s+l[7]*r,this.b=l[2]*e+l[5]*s+l[8]*r,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const ti=new Fe;Fe.NAMES=X2;let yO=0;class wl extends Kr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:yO++}),this.uuid=nr(),this.name="",this.type="Material",this.blending=ll,this.side=or,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=j0,this.blendDst=W0,this.blendEquation=Ir,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Fe(0,0,0),this.blendAlpha=0,this.depthFunc=pl,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=FS,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Uo,this.stencilZFail=Uo,this.stencilZPass=Uo,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const s=t[e];if(s===void 0){fe(`Material: parameter '${e}' has value of undefined.`);continue}const r=this[e];if(r===void 0){fe(`Material: '${e}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(s):r&&r.isVector3&&s&&s.isVector3?r.copy(s):this[e]=s}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const s={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};
vendor: 10,078 bytes, line 184
184s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.color&&this.color.isColor&&(s.color=this.color.getHex()),this.roughness!==void 0&&(s.roughness=this.roughness),this.metalness!==void 0&&(s.metalness=this.metalness),this.sheen!==void 0&&(s.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(s.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(s.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(s.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(s.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(s.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(s.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(s.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(s.shininess=this.shininess),this.clearcoat!==void 0&&(s.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(s.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(s.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(s.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,s.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(s.sheenColorMap=this.sheenColorMap.toJSON(t).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(s.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(t).uuid),this.dispersion!==void 0&&(s.dispersion=this.dispersion),this.iridescence!==void 0&&(s.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(s.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(s.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(s.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(s.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(s.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(s.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(s.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(s.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(s.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(s.lightMap=this.lightMap.toJSON(t).uuid,s.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(s.aoMap=this.aoMap.toJSON(t).uuid,s.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(s.bumpMap=this.bumpMap.toJSON(t).uuid,s.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(s.normalMap=this.normalMap.toJSON(t).uuid,s.normalMapType=this.normalMapType,s.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(s.displacementMap=this.displacementMap.toJSON(t).uuid,s.displacementScale=this.displacementScale,s.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(s.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(s.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(s.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(s.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(s.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(s.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(s.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(s.combine=this.combine)),this.envMapRotation!==void 0&&(s.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(s.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(s.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(s.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(s.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(s.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(s.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(s.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(s.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(s.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(s.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(s.size=this.size),this.shadowSide!==null&&(s.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(s.sizeAttenuation=this.sizeAttenuation),this.blending!==ll&&(s.blending=this.blending),this.side!==or&&(s.side=this.side),this.vertexColors===!0&&(s.vertexColors=!0),this.opacity<1&&(s.opacity=this.opacity),this.transparent===!0&&(s.transparent=!0),this.blendSrc!==j0&&(s.blendSrc=this.blendSrc),this.blendDst!==W0&&(s.blendDst=this.blendDst),this.blendEquation!==Ir&&(s.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(s.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(s.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(s.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(s.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(s.blendAlpha=this.blendAlpha),this.depthFunc!==pl&&(s.depthFunc=this.depthFunc),this.depthTest===!1&&(s.depthTest=this.depthTest),this.depthWrite===!1&&(s.depthWrite=this.depthWrite),this.colorWrite===!1&&(s.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(s.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==FS&&(s.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(s.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(s.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Uo&&(s.stencilFail=this.stencilFail),this.stencilZFail!==Uo&&(s.stencilZFail=this.stencilZFail),this.stencilZPass!==Uo&&(s.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(s.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(s.rotation=this.rotation),this.polygonOffset===!0&&(s.polygonOffset=!0),this.polygonOffsetFactor!==0&&(s.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(s.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(s.linewidth=this.linewidth),this.dashSize!==void 0&&(s.dashSize=this.dashSize),this.gapSize!==void 0&&(s.gapSize=this.gapSize),this.scale!==void 0&&(s.scale=this.scale),this.dithering===!0&&(s.dithering=!0),this.alphaTest>0&&(s.alphaTest=this.alphaTest),this.alphaHash===!0&&(s.alphaHash=!0),this.alphaToCoverage===!0&&(s.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(s.premultipliedAlpha=!0),this.forceSinglePass===!0&&(s.forceSinglePass=!0),this.allowOverride===!1&&(s.allowOverride=!1),this.wireframe===!0&&(s.wireframe=!0),this.wireframeLinewidth>1&&(s.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(s.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(s.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(s.flatShading=!0),this.visible===!1&&(s.visible=!1),this.toneMapped===!1&&(s.toneMapped=!1),this.fog===!1&&(s.fog=!1),Object.keys(this.userData).length>0&&(s.userData=this.userData);function r(l){const u=[];for(const f in l){const h=l[f];delete h.metadata,u.push(h)}return u}if(e){const l=r(t.textures),u=r(t.images);l.length>0&&(s.textures=l),u.length>0&&(s.images=u)}return s}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let s=null;if(e!==null){const r=e.length;s=new Array(r);for(let l=0;l!==r;++l)s[l]=e[l].clone()}return this.clippingPlanes=s,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.allowOverride=t.allowOverride,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class Y2 extends wl{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Fe(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 ga,this.combine=
vendor: 28,858 bytes, lines 184-188
184R2,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const An=new et,Bf=new ce;let _O=0;class ls{constructor(t,e,s=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:_O++}),this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=s,this.usage=Og,this.updateRanges=[],this.gpuType=bs,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,s){t*=this.itemSize,s*=e.itemSize;for(let r=0,l=this.itemSize;r<l;r++)this.array[t+r]=e.array[s+r];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,s=this.count;e<s;e++)Bf.fromBufferAttribute(this,e),Bf.applyMatrix3(t),this.setXY(e,Bf.x,Bf.y);else if(this.itemSize===3)for(let e=0,s=this.count;e<s;e++)An.fromBufferAttribute(this,e),An.applyMatrix3(t),this.setXYZ(e,An.x,An.y,An.z);return this}applyMatrix4(t){for(let e=0,s=this.count;e<s;e++)An.fromBufferAttribute(this,e),An.applyMatrix4(t),this.setXYZ(e,An.x,An.y,An.z);return this}applyNormalMatrix(t){for(let e=0,s=this.count;e<s;e++)An.fromBufferAttribute(this,e),An.applyNormalMatrix(t),this.setXYZ(e,An.x,An.y,An.z);return this}transformDirection(t){for(let e=0,s=this.count;e<s;e++)An.fromBufferAttribute(this,e),An.transformDirection(t),this.setXYZ(e,An.x,An.y,An.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let s=this.array[t*this.itemSize+e];return this.normalized&&(s=ys(s,this.array)),s}setComponent(t,e,s){return this.normalized&&(s=tn(s,this.array)),this.array[t*this.itemSize+e]=s,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=ys(e,this.array)),e}setX(t,e){return this.normalized&&(e=tn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=ys(e,this.array)),e}setY(t,e){return this.normalized&&(e=tn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=ys(e,this.array)),e}setZ(t,e){return this.normalized&&(e=tn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=ys(e,this.array)),e}setW(t,e){return this.normalized&&(e=tn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,s){return t*=this.itemSize,this.normalized&&(e=tn(e,this.array),s=tn(s,this.array)),this.array[t+0]=e,this.array[t+1]=s,this}setXYZ(t,e,s,r){return t*=this.itemSize,this.normalized&&(e=tn(e,this.array),s=tn(s,this.array),r=tn(r,this.array)),this.array[t+0]=e,this.array[t+1]=s,this.array[t+2]=r,this}setXYZW(t,e,s,r,l){return t*=this.itemSize,this.normalized&&(e=tn(e,this.array),s=tn(s,this.array),r=tn(r,this.array),l=tn(l,this.array)),this.array[t+0]=e,this.array[t+1]=s,this.array[t+2]=r,this.array[t+3]=l,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==Og&&(t.usage=this.usage),t}}class q2 extends ls{constructor(t,e,s){super(new Uint16Array(t),e,s)}}class Z2 extends ls{constructor(t,e,s){super(new Uint32Array(t),e,s)}}class Pi extends ls{constructor(t,e,s){super(new Float32Array(t),e,s)}}let bO=0;const Wi=new ln,Km=new zn,jo=new et,Ci=new ou,Tc=new ou,In=new et;class Ki extends Kr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:bO++}),this.uuid=nr(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(j2(t)?Z2:q2)(t,1):this.index=t,this}setIndirect(t,e=0){return this.indirect=t,this.indirectOffset=e,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,s=0){this.groups.push({start:t,count:e,materialIndex:s})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);const s=this.attributes.normal;if(s!==void 0){const l=new be().getNormalMatrix(t);s.applyNormalMatrix(l),s.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(t),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return Wi.makeRotationFromQuaternion(t),this.applyMatrix4(Wi),this}rotateX(t){return Wi.makeRotationX(t),this.applyMatrix4(Wi),this}rotateY(t){return Wi.makeRotationY(t),this.applyMatrix4(Wi),this}rotateZ(t){return Wi.makeRotationZ(t),this.applyMatrix4(Wi),this}translate(t,e,s){return Wi.makeTranslation(t,e,s),this.applyMatrix4(Wi),this}scale(t,e,s){return Wi.makeScale(t,e,s),this.applyMatrix4(Wi),this}lookAt(t){return Km.lookAt(t),Km.updateMatrix(),this.applyMatrix4(Km.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(jo).negate(),this.translate(jo.x,jo.y,jo.z),this}setFromPoints(t){const e=this.getAttribute("position");if(e===void 0){const s=[];for(let r=0,l=t.length;r<l;r++){const u=t[r];s.push(u.x,u.y,u.z||0)}this.setAttribute("position",new Pi(s,3))}else{const s=Math.min(t.length,e.count);for(let r=0;r<s;r++){const l=t[r];e.setXYZ(r,l.x,l.y,l.z||0)}t.length>e.count&&fe("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ou);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){Oe("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new et(-1/0,-1/0,-1/0),new et(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let s=0,r=e.length;s<r;s++){const l=e[s];Ci.setFromBufferAttribute(l),this.morphTargetsRelative?(In.addVectors(this.boundingBox.min,Ci.min),this.boundingBox.expandByPoint(In),In.addVectors(this.boundingBox.max,Ci.max),this.boundingBox.expandByPoint(In)):(this.boundingBox.expandByPoint(Ci.min),this.boundingBox.expandByPoint(Ci.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&Oe('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 qd);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){Oe("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new et,1/0);return}if(t){const s=this.boundingSphere.center;if(Ci.setFromBufferAttribute(t),e)for(let l=0,u=e.length;l<u;l++){const f=e[l];Tc.setFromBufferAttribute(f),this.morphTargetsRelative?(In.addVectors(Ci.min,Tc.min),Ci.expandByPoint(In),In.addVectors(Ci.max,Tc.max),Ci.expandByPoint(In)):(Ci.expandByPoint(Tc.min),Ci.expandByPoint(Tc.max))}Ci.getCenter(s);let r=0;for(let l=0,u=t.count;l<u;l++)In.fromBufferAttribute(t,l),r=Math.max(r,s.distanceToSquared(In));if(e)for(let l=0,u=e.length;l<u;l++){const f=e[l],h=this.morphTargetsRelative;for(let d=0,g=f.count;d<g;d++)In.fromBufferAttribute(f,d),h&&(jo.fromBufferAttribute(t,d),In.add(jo)),r=Math.max(r,s.distanceToSquared(In))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&Oe('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){Oe("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const s=e.position,r=e.normal,l=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new ls(new Float32Array(4*s.count),4));const u=this.getAttribute("tangent"),f=[],h=[];for(let z=0;z<s.count;z++)f[z]=new et,h[z]=new et;const d=new et,g=new et,m=new et,v=new ce,_=new ce,M=new ce,T=new et,S=new et;function b(z,w,O){d.fromBufferAttribute(s,z),g.fromBufferAttribute(s,w),m.fromBufferAttribute(s,O),v.fromBufferAttribute(l,z),_.fromBufferAttribute(l,w),M.fromBufferAttribute(l,O),g.sub(d),m.sub(d),_.sub(v),M.sub(v);const j=1/(_.x*M.y-M.x*_.y);isFinite(j)&&(T.copy(g).multiplyScalar(M.y).addScaledVector(m,-_.y).multiplyScalar(j),S.copy(m).multiplyScalar(_.x).addScaledVector(g,-M.x).multiplyScalar(j),f[z].add(T),f[w].add(T),f[O].add(T),h[z].add(S),h[w].add(S),h[O].add(S))}let R=this.groups;R.length===0&&(R=[{start:0,count:t.count}]);for(let z=0,w=R.length;z<w;++z){const O=R[z],j=O.start,Q=O.count;for(let Z=j,rt=j+Q;Z<rt;Z+=3)b(t.getX(Z+0),t.getX(Z+1),t.getX(Z+2))}const C=new et,P=new et,U=new et,F=new et;function L(z){U.fromBufferAttribute(r,z),F.copy(U);const w=f[z];C.copy(w),C.sub(U.multiplyScalar(U.dot(w))).normalize(),P.crossVectors(F,w);const j=P.dot(h[z])<0?-1:1;u.setXYZW(z,C.x,C.y,C.z,j)}for(let z=0,w=R.length;z<w;++z){const O=R[z],j=O.start,Q=O.count;for(let Z=j,rt=j+Q;Z<rt;Z+=3)L(t.getX(Z+0)),L(t.getX(Z+1)),L(t.getX(Z+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(e!==void 0){let s=this.getAttribute("normal");if(s===void 0)s=new ls(new Float32Array(e.count*3),3),this.setAttribute("normal",s);else for(let v=0,_=s.count;v<_;v++)s.setXYZ(v,0,0,0);const r=new et,l=new et,u=new et,f=new et,h=new et,d=new et,g=new et,m=new et;if(t)for(let v=0,_=t.count;v<_;v+=3){const M=t.getX(v+0),T=t.getX(v+1),S=t.getX(v+2);r.fromBufferAttribute(e,M),l.fromBufferAttribute(e,T),u.fromBufferAttribute(e,S),g.subVectors(u,l),m.subVectors(r,l),g.cross(m),f.fromBufferAttribute(s,M),h.fromBufferAttribute(s,T),d.fromBufferAttribute(s,S),f.add(g),h.add(g),d.add(g),s.setXYZ(M,f.x,f.y,f.z),s.setXYZ(T,h.x,h.y,h.z),s.setXYZ(S,d.x,d.y,d.z)}else for(let v=0,_=e.count;v<_;v+=3)r.fromBufferAttribute(e,v+0),l.fromBufferAttribute(e,v+1),u.fromBufferAttribute(e,v+2),g.subVectors(u,l),m.subVectors(r,l),g.cross(m),s.setXYZ(v+0,g.x,g.y,g.z),s.setXYZ(v+1,g.x,g.y,g.z),s.setXYZ(v+2,g.x,g.y,g.z);this.normalizeNormals(),s.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,s=t.count;e<s;e++)In.fromBufferAttribute(t,e),In.normalize(),t.setXYZ(e,In.x,In.y,In.z)}toNonIndexed(){function t(f,h){const d=f.array,g=f.itemSize,m=f.normalized,v=new d.constructor(h.length*g);let _=0,M=0;for(let T=0,S=h.length;T<S;T++){f.isInterleavedBufferAttribute?_=h[T]*f.data.stride+f.offset:_=h[T]*g;for(let b=0;b<g;b++)v[M++]=d[_++]}return new ls(v,g,m)}if(this.index===null)return fe("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new Ki,s=this.index.array,r=this.attributes;for(const f in r){const h=r[f],d=t(h,s);e.setAttribute(f,d)}const l=this.morphAttributes;for(const f in l){const h=[],d=l[f];for(let g=0,m=d.length;g<m;g++){const v=d[g],_=t(v,s);h.push(_)}e.morphAttributes[f]=h}e.morphTargetsRelative=this.morphTargetsRelative;const u=this.groups;for(let f=0,h=u.length;f<h;f++){const d=u[f];e.addGroup(d.start,d.count,d.materialIndex)}return e}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){const h=this.parameters;for(const d in h)h[d]!==void 0&&(t[d]=h[d]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const s=this.attributes;for(const h in s){const d=s[h];t.data.attributes[h]=d.toJSON(t.data)}const r={};let l=!1;for(const h in this.morphAttributes){const d=this.morphAttributes[h],g=[];for(let m=0,v=d.length;m<v;m++){const _=d[m];g.push(_.toJSON(t.data))}g.length>0&&(r[h]=g,l=!0)}l&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);const u=this.groups;u.length>0&&(t.data.groups=JSON.parse(JSON.stringify(u)));const f=this.boundingSphere;return f!==null&&(t.data.boundingSphere=f.toJSON()),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const s=t.index;s!==null&&this.setIndex(s.clone());const r=t.attributes;for(const d in r){const g=r[d];this.setAttribute(d,g.clone(e))}const l=t.morphAttributes;for(const d in l){const g=[],m=l[d];for(let v=0,_=m.length;v<_;v++)g.push(m[v].clone(e));this.morphAttributes[d]=g}this.morphTargetsRelative=t.morphTargetsRelative;const u=t.groups;for(let d=0,g=u.length;d<g;d++){const m=u[d];this.addGroup(m.start,m.count,m.materialIndex)}const f=t.boundingBox;f!==null&&(this.boundingBox=f.clone());const h=t.boundingSphere;return h!==null&&(this.boundingSphere=h.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const KS=new ln,Nr=new Zd,Vf=new qd,QS=new et,Hf=new et,kf=new et,Gf=new et,Qm=new et,jf=new et,JS=new et,Wf=new et;class xa extends zn{constructor(t=new Ki,e=new Y2){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,s=Object.keys(e);if(s.length>0){const r=e[s[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let l=0,u=r.length;l<u;l++){const f=r[l].name||String(l);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=l}}}}getVertexPosition(t,e){const s=this.geometry,r=s.attributes.position,l=s.morphAttributes.position,u=s.morphTargetsRelative;e.fromBufferAttribute(r,t);const f=this.morphTargetInfluences;if(l&&f){jf.set(0,0,0);for(let h=0,d=l.length;h<d;h++){const g=f[h],m=l[h];g!==0&&(Qm.fromBufferAttribute(m,t),u?jf.addScaledVector(Qm,g):jf.addScaledVector(Qm.sub(e),g))}e.add(jf)}return e}raycast(t,e){const s=this.geometry,r=this.material,l=this.matrixWorld;r!==void 0&&(s.boundingSphere===null&&s.computeBoundingSphere(),Vf.copy(s.boundingSphere),Vf.applyMatrix4(l),Nr.copy(t.ray).recast(t.near),!(Vf.containsPoint(Nr.origin)===!1&&(Nr.intersectSphere(Vf,QS)===null||Nr.origin.distanceToSquared(QS)>(t.far-t.near)**2))&&(KS.copy(l).invert(),Nr.copy(t.ray).applyMatrix4(KS),!(s.boundingBox!==null&&Nr.intersectsBox(s.boundingBox)===!1)&&this._computeIntersections(t,e,Nr)))}_computeIntersections(t,e,s){let r;const l=this.geometry,u=this.material,f=l.index,h=l.attributes.position,d=l.attributes.uv,g=l.attributes.uv1,m=l.attributes.normal,v=l.groups,_=l.drawRange;if(f!==null)if(Array.isArray(u))for(let M=0,T=v.length;M<T;M++){const S=v[M],b=u[S.materialIndex],R=Math.max(S.start,_.start),C=Math.min(f.count,Math.min(S.start+S.count,_.start+_.count));for(let P=R,U=C;P<U;P+=3){const F=f.getX(P),L=f.getX(P+1),z=f.getX(P+2);r=Xf(this,b,t,s,d,g,m,F,L,z),r&&(r.faceIndex=Math.floor(P/3),r.face.materialIndex=S.materialIndex,e.push(r))}}else{const M=Math.max(0,_.start),T=Math.min(f.count,_.start+_.count);for(let S=M,b=T;S<b;S+=3){const R=f.getX(S),C=f.getX(S+1),P=f.getX(S+2);r=Xf(this,u,t,s,d,g,m,R,C,P),r&&(r.faceIndex=Math.floor(S/3),e.push(r))}}else if(h!==void 0)if(Array.isArray(u))for(let M=0,T=v.length;M<T;M++){const S=v[M],b=u[S.materialIndex],R=Math.max(S.start,_.start),C=Math.min(h.count,Math.min(S.start+S.count,_.start+_.count));for(let P=R,U=C;P<U;P+=3){const F=P,L=P+1,z=P+2;r=Xf(this,b,t,s,d,g,m,F,L,z),r&&(r.faceIndex=Math.floor(P/3),r.face.materialIndex=S.materialIndex,e.push(r))}}else{const M=Math.max(0,_.start),T=Math.min(h.count,_.start+_.count);for(let S=M,b=T;S<b;S+=3){const R=S,C=S+1,P=S+2;r=Xf(this,u,t,s,d,g,m,R,C,P),r&&(r.faceIndex=Math.floor(S/3),e.push(r))}}}}function SO(n,t,e,s,r,l,u,f){let h;if(t.side===yi?h=s.intersectTriangle(u,l,r,!0,f):h=s.intersectTriangle(r,l,u,t.side===or,f),h===null)return null;Wf.copy(f),Wf.applyMatrix4(n.matrixWorld);const d=e.ray.origin.distanceTo(Wf);return d<e.near||d>e.far?null:{distance:d,point:Wf.clone(),object:n}}function Xf(n,t,e,s,r,l,u,f,h,d){n.getVertexPosition(f,Hf),n.getVertexPosition(h,kf),n.getVertexPosition(d,Gf);const g=SO(n,t,e,s,Hf,kf,Gf,JS);if(g){const m=new et;Yi.getBarycoord(JS,Hf,kf,Gf,m),r&&(g.uv=Yi.getInterpolatedAttribute(r,f,h,d,m,new ce)),l&&(g.uv1=Yi.getInterpolatedAttribute(l,f,h,d,m,new ce)),u&&(g.normal=Yi.getInterpolatedAttribute(u,f,h,d,m,new et),g.normal.dot(s.direction)>0&&g.normal.multiplyScalar(-1));const v={a:f,b:h,c:d,normal:new et,materialIndex:0};Yi.getNormal(Hf,kf,Gf,v.normal),g.face=v,g.barycoord=m}return g}class lu extends Ki{constructor(t=1,e=1,s=1,r=1,l=1,u=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:s,widthSegments:r,heightSegments:l,depthSegments:u};const f=this;r=Math.floor(r),l=Math.floor(l),u=Math.floor(u);const h=[],d=[],g=[],m=[];let v=0,_=0;M("z","y","x",-1,-1,s,e,t,u,l,0),M("z","y","x",1,-1,s,e,-t,u,l,1),M("x","z","y",1,1,t,s,e,r,u,2),M("x","z","y",1,-1,t,s,-e,r,u,3),M("x","y","z",1,-1,t,e,s,r,l,4),M("x","y","z",-1,-1,t,e,-s,r,l,5),this.setIndex(h),this.setAttribute("position",new Pi(d,3)),this.setAttribute("normal",new Pi(g,3)),this.setAttribute("uv",new Pi(m,2));function M(T,S,b,R,C,P,U,F,L,z,w){const O=P/L,j=U/z,Q=P/2,Z=U/2,rt=F/2,ot=L+1,I=z+1;let V=0,k=0;const gt=new et;for(let xt=0;xt<I;xt++){const B=xt*j-Z;for(let at=0;at<ot;at++){const nt=at*O-Q;gt[T]=nt*R,gt[S]=B*C,gt[b]=rt,d.push(gt.x,gt.y,gt.z),gt[T]=0,gt[S]=0,gt[b]=F>0?1:-1,g.push(gt.x,gt.y,gt.z),m.push(at/L),m.push(1-xt/z),V+=1}}for(let xt=0;xt<z;xt++)for(let B=0;B<L;B++){const at=v+B+ot*xt,nt=v+B+ot*(xt+1),pt=v+(B+1)+ot*(xt+1),Et=v+(B+1)+ot*xt;h.push(at,nt,Et),h.push(nt,pt,Et),k+=6}f.addGroup(_,k,w),_+=k,v+=V}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new lu(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function vl(n){const t={};for(const e in n){t[e]={};for(const s in n[e]){const r=n[e][s];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(fe("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][s]=null):t[e][s]=r.clone():Array.isArray(r)?t[e][s]=r.slice():t[e][s]=r}}return t}function ri(n){const t={};for(let e=0;e<n.length;e++){const s=vl(n[e]);for(const r in s)t[r]=s[r]}return t}function MO(n){const t=[];for(let e=0;e<n.length;e++)t.push(n[e].clone());return t}function K2(n){const t=n.getRenderTarget();return t===null?n.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:ze.workingColorSpace}const EO={clone:vl,merge:ri};var TO=`void main() { 185 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 186}`,AO=`void main() { 187 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 188}`;class Ds extends wl{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=TO,this.fragmentShader=AO,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,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=vl(t.uniforms),this.uniformsGroups=MO(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this.defaultAttributeValues=Object.assign({},t.defaultAttributeValues),this.index0AttributeName=t.index0AttributeName,this.uniformsNeedUpdate=t.uniformsNeedUpdate,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const r in this.uniforms){const u=this.uniforms[r].value;u&&u.isTexture?e.uniforms[r]={type:"t",value:u.toJSON(t).uuid}:u&&u.isColor?e.uniforms[r]={type:"c",value:u.getHex()}:u&&u.isVector2?e.uniforms[r]={type:"v2",value:u.toArray()}:u&&u.isVector3?e.uniforms[r]={type:"v3",value:u.toArray()}:u&&u.isVector4?e.uniforms[r]={type:"v4",value:u.toArray()}:u&&u.isMatrix3?e.uniforms[r]={type:"m3",value:u.toArray()}:u&&u.isMatrix4?e.uniforms[r]={type:"m4",value:u.toArray()}:e.uniforms[r]={value:u}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const s={};for(const r in this.extensions)this.extensions[r]===!0&&(s[r]=!0);return Object.keys(s).length>0&&(e.extensions=s),e}}class Q2 extends zn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ln,this.projectionMatrix=new ln,this.projectionMatrixInverse=new ln,this.coordinateSystem=Ss,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Qa=new et,$S=new ce,tM=new ce;class Di extends Q2{constructor(t=50,e=1,s=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=s,this.far=r,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=Fg*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(pd*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Fg*2*Math.atan(Math.tan(pd*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,s){Qa.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Qa.x,Qa.y).multiplyScalar(-t/Qa.z),Qa.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),s.set(Qa.x,Qa.y).multiplyScalar(-t/Qa.z)}getViewSize(t,e){return this.getViewBounds(t,$S,tM),e.subVectors(tM,$S)}setViewOffset(t,e,s,r,l,u){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=s,this.view.offsetY=r,this.view.width=l,this.view.height=u,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(pd*.5*this.fov)/this.zoom,s=2*e,r=this.aspect*s,l=-.5*r;const u=this.view;if(this.view!==null&&this.view.enabled){const h=u.fullWidth,d=u.fullHeight;l+=u.offsetX*r/h,e-=u.offsetY*s/d,r*=u.width/h,s*=u.height/d}const f=this.filmOffset;f!==0&&(l+=t*f/this.getFilmWidth()),this.projectionMatrix.makePerspective(l,l+r,e,e-s,t,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const Wo=-90,Xo=1;class wO extends zn{constructor(t,e,s){super(),this.type="CubeCamera",this.renderTarget=s,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new Di(Wo,Xo,t,e);r.layers=this.layers,this.add(r);const l=new Di(Wo,Xo,t,e);l.layers=this.layers,this.add(l);const u=new Di(Wo,Xo,t,e);u.layers=this.layers,this.add(u);const f=new Di(Wo,Xo,t,e);f.layers=this.layers,this.add(f);const h=new Di(Wo,Xo,t,e);h.layers=this.layers,this.add(h);const d=new Di(Wo,Xo,t,e);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[s,r,l,u,f,h]=e;for(const d of e)this.remove(d);if(t===Ss)s.up.set(0,1,0),s.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),l.up.set(0,0,-1),l.lookAt(0,1,0),u.up.set(0,0,1),u.lookAt(0,-1,0),f.up.set(0,1,0),f.lookAt(0,0,1),h.up.set(0,1,0),h.lookAt(0,0,-1);else if(t===wd)s.up.set(0,-1,0),s.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),l.up.set(0,0,1),l.lookAt(0,1,0),u.up.set(0,0,-1),u.lookAt(0,-1,0),f.up.set(0,-1,0),f.lookAt(0,0,1),h.up.set(0,-1,0),h.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const d of e)this.add(d),d.updateMatrixWorld()}update(t,e){this.parent===null&&this.updateMatrixWorld();const{renderTarget:s,activeMipmapLevel:r}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[l,u,f,h,d,g]=this.children,m=t.getRenderTarget(),v=t.getActiveCubeFace(),_=t.getActiveMipmapLevel(),M=t.xr.enabled;t.xr.enabled=!1;const T=s.texture.generateMipmaps;s.texture.generateMipmaps=!1,t.setRenderTarget(s,0,r),t.render(e,l),t.setRenderTarget(s,1,r),t.render(e,u),t.setRenderTarget(s,2,r),t.render(e,f),t.setRenderTarget(s,3,r),t.render(e,h),t.setRenderTarget(s,4,r),t.render(e,d),s.texture.generateMipmaps=T,t.setRenderTarget(s,5,r),t.render(e,g),t.setRenderTarget(m,v,_),t.xr.enabled=M,s.texture.needsPMREMUpdate=!0}}class J2 extends ii{constructor(t=[],e=Xr,s,r,l,u,f,h,d,g){super(t,e,s,r,l,u,f,h,d,g),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class $2 extends ws{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const s={width:t,height:t,depth:1},r=[s,s,s,s,s,s];this.texture=new J2(r),this._setTextureOptions(e),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace
vendor: 7,773 bytes, lines 188-223
188=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const s={uniforms:{tEquirect:{value:null}},vertexShader:` 189 190 varying vec3 vWorldDirection; 191 192 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 193 194 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 195 196 } 197 198 void main() { 199 200 vWorldDirection = transformDirection( position, modelMatrix ); 201 202 #include <begin_vertex> 203 #include <project_vertex> 204 205 } 206 `,fragmentShader:` 207 208 uniform sampler2D tEquirect; 209 210 varying vec3 vWorldDirection; 211 212 #include <common> 213 214 void main() { 215 216 vec3 direction = normalize( vWorldDirection ); 217 218 vec2 sampleUV = equirectUv( direction ); 219 220 gl_FragColor = texture2D( tEquirect, sampleUV ); 221 222 } 223 `},r=new lu(5,5,5),l=new Ds({name:"CubemapFromEquirect",uniforms:vl(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,side:yi,blending:la});l.uniforms.tEquirect.value=e;const u=new xa(r,l),f=e.minFilter;return e.minFilter===Hr&&(e.minFilter=ni),new wO(1,10,this).update(t,u),e.minFilter=f,u.geometry.dispose(),u.material.dispose(),this}clear(t,e=!0,s=!0,r=!0){const l=t.getRenderTarget();for(let u=0;u<6;u++)t.setRenderTarget(this,u),t.clear(e,s,r);t.setRenderTarget(l)}}class Yf extends zn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const CO={type:"move"};class Jm{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Yf,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 Yf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new et,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new et),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Yf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new et,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new et),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const e=this._hand;if(e)for(const s of t.hand.values())this._getHandJoint(e,s)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,s){let r=null,l=null,u=null;const f=this._targetRay,h=this._grip,d=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(d&&t.hand){u=!0;for(const T of t.hand.values()){const S=e.getJointPose(T,s),b=this._getHandJoint(d,T);S!==null&&(b.matrix.fromArray(S.transform.matrix),b.matrix.decompose(b.position,b.rotation,b.scale),b.matrixWorldNeedsUpdate=!0,b.jointRadius=S.radius),b.visible=S!==null}const g=d.joints["index-finger-tip"],m=d.joints["thumb-tip"],v=g.position.distanceTo(m.position),_=.02,M=.005;d.inputState.pinching&&v>_+M?(d.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!d.inputState.pinching&&v<=_-M&&(d.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else h!==null&&t.gripSpace&&(l=e.getPose(t.gripSpace,s),l!==null&&(h.matrix.fromArray(l.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.matrixWorldNeedsUpdate=!0,l.linearVelocity?(h.hasLinearVelocity=!0,h.linearVelocity.copy(l.linearVelocity)):h.hasLinearVelocity=!1,l.angularVelocity?(h.hasAngularVelocity=!0,h.angularVelocity.copy(l.angularVelocity)):h.hasAngularVelocity=!1));f!==null&&(r=e.getPose(t.targetRaySpace,s),r===null&&l!==null&&(r=l),r!==null&&(f.matrix.fromArray(r.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,r.linearVelocity?(f.hasLinearVelocity=!0,f.linearVelocity.copy(r.linearVelocity)):f.hasLinearVelocity=!1,r.angularVelocity?(f.hasAngularVelocity=!0,f.angularVelocity.copy(r.angularVelocity)):f.hasAngularVelocity=!1,this.dispatchEvent(CO)))}return f!==null&&(f.visible=r!==null),h!==null&&(h.visible=l!==null),d!==null&&(d.visible=u!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){const s=new Yf;s.matrixAutoUpdate=!1,s.visible=!1,t.joints[e.jointName]=s,t.add(s)}return t.joints[e.jointName]}}class RO extends zn{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 ga,this.environmentIntensity=1,this.environmentRotation=new ga,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class DO{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=Og,this.updateRanges=[],this.version=0,this.uuid=nr()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,s){t*=this.stride,s*=e.stride;for(let r=0,l=this.stride;r<l;r++)this.array[t+r]=e.array[s+r];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=nr()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),s=new this.constructor(e,this.stride);return s.setUsage(this.usage),s}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=nr()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.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 ai=new et;class Rd{constructor(t,e,s,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=s,this.normalized=r}
vendor: 7,119 bytes, line 223
223get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,s=this.data.count;e<s;e++)ai.fromBufferAttribute(this,e),ai.applyMatrix4(t),this.setXYZ(e,ai.x,ai.y,ai.z);return this}applyNormalMatrix(t){for(let e=0,s=this.count;e<s;e++)ai.fromBufferAttribute(this,e),ai.applyNormalMatrix(t),this.setXYZ(e,ai.x,ai.y,ai.z);return this}transformDirection(t){for(let e=0,s=this.count;e<s;e++)ai.fromBufferAttribute(this,e),ai.transformDirection(t),this.setXYZ(e,ai.x,ai.y,ai.z);return this}getComponent(t,e){let s=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(s=ys(s,this.array)),s}setComponent(t,e,s){return this.normalized&&(s=tn(s,this.array)),this.data.array[t*this.data.stride+this.offset+e]=s,this}setX(t,e){return this.normalized&&(e=tn(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=tn(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=tn(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=tn(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=ys(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=ys(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=ys(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=ys(e,this.array)),e}setXY(t,e,s){return t=t*this.data.stride+this.offset,this.normalized&&(e=tn(e,this.array),s=tn(s,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=s,this}setXYZ(t,e,s,r){return t=t*this.data.stride+this.offset,this.normalized&&(e=tn(e,this.array),s=tn(s,this.array),r=tn(r,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=s,this.data.array[t+2]=r,this}setXYZW(t,e,s,r,l){return t=t*this.data.stride+this.offset,this.normalized&&(e=tn(e,this.array),s=tn(s,this.array),r=tn(r,this.array),l=tn(l,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=s,this.data.array[t+2]=r,this.data.array[t+3]=l,this}clone(t){if(t===void 0){Cd("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let s=0;s<this.count;s++){const r=s*this.data.stride+this.offset;for(let l=0;l<this.itemSize;l++)e.push(this.data.array[r+l])}return new ls(new this.array.constructor(e),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new Rd(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){Cd("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let s=0;s<this.count;s++){const r=s*this.data.stride+this.offset;for(let l=0;l<this.itemSize;l++)e.push(this.data.array[r+l])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class Ig extends wl{constructor(t){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Fe(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}let Yo;const Ac=new et,qo=new et,Zo=new et,Ko=new ce,wc=new ce,tA=new ln,qf=new et,Cc=new et,Zf=new et,eM=new ce,$m=new ce,nM=new ce;class iM extends zn{constructor(t=new Ig){if(super(),this.isSprite=!0,this.type="Sprite",Yo===void 0){Yo=new Ki;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),s=new DO(e,5);Yo.setIndex([0,1,2,0,2,3]),Yo.setAttribute("position",new Rd(s,3,0,!1)),Yo.setAttribute("uv",new Rd(s,2,3,!1))}this.geometry=Yo,this.material=t,this.center=new ce(.5,.5),this.count=1}raycast(t,e){t.camera===null&&Oe('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),qo.setFromMatrixScale(this.matrixWorld),tA.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),Zo.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&qo.multiplyScalar(-Zo.z);const s=this.material.rotation;let r,l;s!==0&&(l=Math.cos(s),r=Math.sin(s));const u=this.center;Kf(qf.set(-.5,-.5,0),Zo,u,qo,r,l),Kf(Cc.set(.5,-.5,0),Zo,u,qo,r,l),Kf(Zf.set(.5,.5,0),Zo,u,qo,r,l),eM.set(0,0),$m.set(1,0),nM.set(1,1);let f=t.ray.intersectTriangle(qf,Cc,Zf,!1,Ac);if(f===null&&(Kf(Cc.set(-.5,.5,0),Zo,u,qo,r,l),$m.set(0,1),f=t.ray.intersectTriangle(qf,Zf,Cc,!1,Ac),f===null))return;const h=t.ray.origin.distanceTo(Ac);h<t.near||h>t.far||e.push({distance:h,point:Ac.clone(),uv:Yi.getInterpolation(Ac,qf,Cc,Zf,eM,$m,nM,new ce),face:null,object:this})}copy(t,e){return super.copy(t,e),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function Kf(n,t,e,s,r,l){Ko.subVectors(n,e).addScalar(.5).multiply(s),r!==void 0?(wc.x=l*Ko.x-r*Ko.y,wc.y=r*Ko.x+l*Ko.y):wc.copy(Ko),n.copy(t),n.x+=wc.x,n.y+=wc.y,n.applyMatrix4(tA)}class NO extends ii{constructor(t=null,e=1,s=1,r,l,u,f,h,d=Qn,g=Qn,m,v){super(null,u,f,h,d,g,r,l,m,v),this.isDataTexture=!0,this.image={data:t,width:e,height:s},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const t0=new et,LO=new et,PO=new be;class $a{constructor(t=new et(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,s,r){return this.normal.set(t,e,s),this.constant=r,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,s){const r=t0.subVectors(s,e).cross(LO.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(r,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const s=t.delta(t0),r=this.normal.dot(s);if(r===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;
vendor: 23,964 bytes, lines 223-227
223const l=-(t.start.dot(this.normal)+this.constant)/r;return l<0||l>1?null:e.copy(t.start).addScaledVector(s,l)}intersectsLine(t){const e=this.distanceToPoint(t.start),s=this.distanceToPoint(t.end);return e<0&&s>0||s<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const s=e||PO.getNormalMatrix(t),r=this.coplanarPoint(t0).applyMatrix4(t),l=this.normal.applyMatrix3(s).normalize();return this.constant=-r.dot(l),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Lr=new qd,UO=new ce(.5,.5),Qf=new et;class Xx{constructor(t=new $a,e=new $a,s=new $a,r=new $a,l=new $a,u=new $a){this.planes=[t,e,s,r,l,u]}set(t,e,s,r,l,u){const f=this.planes;return f[0].copy(t),f[1].copy(e),f[2].copy(s),f[3].copy(r),f[4].copy(l),f[5].copy(u),this}copy(t){const e=this.planes;for(let s=0;s<6;s++)e[s].copy(t.planes[s]);return this}setFromProjectionMatrix(t,e=Ss,s=!1){const r=this.planes,l=t.elements,u=l[0],f=l[1],h=l[2],d=l[3],g=l[4],m=l[5],v=l[6],_=l[7],M=l[8],T=l[9],S=l[10],b=l[11],R=l[12],C=l[13],P=l[14],U=l[15];if(r[0].setComponents(d-u,_-g,b-M,U-R).normalize(),r[1].setComponents(d+u,_+g,b+M,U+R).normalize(),r[2].setComponents(d+f,_+m,b+T,U+C).normalize(),r[3].setComponents(d-f,_-m,b-T,U-C).normalize(),s)r[4].setComponents(h,v,S,P).normalize(),r[5].setComponents(d-h,_-v,b-S,U-P).normalize();else if(r[4].setComponents(d-h,_-v,b-S,U-P).normalize(),e===Ss)r[5].setComponents(d+h,_+v,b+S,U+P).normalize();else if(e===wd)r[5].setComponents(h,v,S,P).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),Lr.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),Lr.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Lr)}intersectsSprite(t){Lr.center.set(0,0,0);const e=UO.distanceTo(t.center);return Lr.radius=.7071067811865476+e,Lr.applyMatrix4(t.matrixWorld),this.intersectsSphere(Lr)}intersectsSphere(t){const e=this.planes,s=t.center,r=-t.radius;for(let l=0;l<6;l++)if(e[l].distanceToPoint(s)<r)return!1;return!0}intersectsBox(t){const e=this.planes;for(let s=0;s<6;s++){const r=e[s];if(Qf.x=r.normal.x>0?t.max.x:t.min.x,Qf.y=r.normal.y>0?t.max.y:t.min.y,Qf.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(Qf)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let s=0;s<6;s++)if(e[s].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class eA extends wl{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Fe(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const Dd=new et,Nd=new et,sM=new ln,Rc=new Zd,Jf=new qd,e0=new et,aM=new et;class OO extends zn{constructor(t=new Ki,e=new eA){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,s=[0];for(let r=1,l=e.count;r<l;r++)Dd.fromBufferAttribute(e,r-1),Nd.fromBufferAttribute(e,r),s[r]=s[r-1],s[r]+=Dd.distanceTo(Nd);t.setAttribute("lineDistance",new Pi(s,1))}else fe("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const s=this.geometry,r=this.matrixWorld,l=t.params.Line.threshold,u=s.drawRange;if(s.boundingSphere===null&&s.computeBoundingSphere(),Jf.copy(s.boundingSphere),Jf.applyMatrix4(r),Jf.radius+=l,t.ray.intersectsSphere(Jf)===!1)return;sM.copy(r).invert(),Rc.copy(t.ray).applyMatrix4(sM);const f=l/((this.scale.x+this.scale.y+this.scale.z)/3),h=f*f,d=this.isLineSegments?2:1,g=s.index,v=s.attributes.position;if(g!==null){const _=Math.max(0,u.start),M=Math.min(g.count,u.start+u.count);for(let T=_,S=M-1;T<S;T+=d){const b=g.getX(T),R=g.getX(T+1),C=$f(this,t,Rc,h,b,R,T);C&&e.push(C)}if(this.isLineLoop){const T=g.getX(M-1),S=g.getX(_),b=$f(this,t,Rc,h,T,S,M-1);b&&e.push(b)}}else{const _=Math.max(0,u.start),M=Math.min(v.count,u.start+u.count);for(let T=_,S=M-1;T<S;T+=d){const b=$f(this,t,Rc,h,T,T+1,T);b&&e.push(b)}if(this.isLineLoop){const T=$f(this,t,Rc,h,M-1,_,M-1);T&&e.push(T)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,s=Object.keys(e);if(s.length>0){const r=e[s[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let l=0,u=r.length;l<u;l++){const f=r[l].name||String(l);this.morphTargetInfluences.push(0),this.morphTargetDictionary[f]=l}}}}}function $f(n,t,e,s,r,l,u){const f=n.geometry.attributes.position;if(Dd.fromBufferAttribute(f,r),Nd.fromBufferAttribute(f,l),e.distanceSqToSegment(Dd,Nd,e0,aM)>s)return;e0.applyMatrix4(n.matrixWorld);const d=t.ray.origin.distanceTo(e0);if(!(d<t.near||d>t.far))return{distance:d,point:aM.clone().applyMatrix4(n.matrixWorld),index:u,face:null,faceIndex:null,barycoord:null,object:n}}const rM=new et,oM=new et;class FO extends OO{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,s=[];for(let r=0,l=e.count;r<l;r+=2)rM.fromBufferAttribute(e,r),oM.fromBufferAttribute(e,r+1),s[r]=r===0?0:s[r-1],s[r+1]=s[r]+rM.distanceTo(oM);t.setAttribute("lineDistance",new Pi(s,1))}else fe("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class tu extends ii{constructor(t,e,s=Rs,r,l,u,f=Qn,h=Qn,d,g=ma,m=1){if(g!==ma&&g!==kr)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const v={width:t,height:e,depth:m};super(v,r,l,u,f,h,g,s,d),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.source=new jx(Object.assign({},t.image)),this.compareFunction=t.compareFunction,this}toJSON(t){const e=super.toJSON(t);return this.compareFunction!==null&&(e.compareFunction=this.compareFunction),e}}class IO extends tu{constructor(t,e=Rs,s=Xr,r,l,u=Qn,f=Qn,h,d=ma){const g={width:t,height:t,depth:1},m=[g,g,g,g,g,g];super(t,t,e,s,r,l,u,f,h,d),this.image=m,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(t){this.image=t}}class nA extends ii{constructor(t=null){super(),this.sourceTexture=t,this.isExternalTexture=!0}copy(t){return super.copy(t),this.sourceTexture=t.sourceTexture,this}}class Kd extends Ki{constructor(t=1,e=1,s=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:s,heightSegments:r};const l=t/2,u=e/2,f=Math.floor(s),h=Math.floor(r),d=f+1,g=h+1,m=t/f,v=e/h,_=[],M=[],T=[],S=[];for(let b=0;b<g;b++){const R=b*v-u;for(let C=0;C<d;C++){const P=C*m-l;M.push(P,-R,0),T.push(0,0,1),S.push(C/f),S.push(1-b/h)}}for(let b=0;b<h;b++)for(let R=0;R<f;R++){const C=R+d*b,P=R+d*(b+1),U=R+1+d*(b+1),F=R+1+d*b;_.push(C,P,F),_.push(P,U,F)}this.setIndex(_),this.setAttribute("position",new Pi(M,3)),this.setAttribute("normal",new Pi(T,3)),this.setAttribute("uv",new Pi(S,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Kd(t.width,t.height,t.widthSegments,t.heightSegments)}}class zO extends Ds{constructor(t){super(t),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class BO extends wl{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Y5,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class VO extends wl{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}const n0={enabled:!1,files:{},add:function(n,t){this.enabled!==!1&&(this.files[n]=t)},get:function(n){if(this.enabled!==!1)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}};class HO{constructor(t,e,s){const r=this;let l=!1,u=0,f=0,h;const d=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=s,this._abortController=null,this.itemStart=function(g){f++,l===!1&&r.onStart!==void 0&&r.onStart(g,u,f),l=!0},this.itemEnd=function(g){u++,r.onProgress!==void 0&&r.onProgress(g,u,f),u===f&&(l=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(g){r.onError!==void 0&&r.onError(g)},this.resolveURL=function(g){return h?h(g):g},this.setURLModifier=function(g){return h=g,this},this.addHandler=function(g,m){return d.push(g,m),this},this.removeHandler=function(g){const m=d.indexOf(g);return m!==-1&&d.splice(m,2),this},this.getHandler=function(g){for(let m=0,v=d.length;m<v;m+=2){const _=d[m],M=d[m+1];if(_.global&&(_.lastIndex=0),_.test(g))return M}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const kO=new HO;class Yx{constructor(t){this.manager=t!==void 0?t:kO,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const s=this;return new Promise(function(r,l){s.load(t,r,e,l)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}abort(){return this}}Yx.DEFAULT_MATERIAL_NAME="__DEFAULT";const Qo=new WeakMap;class GO extends Yx{constructor(t){super(t)}load(t,e,s,r){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const l=this,u=n0.get(`image:${t}`);if(u!==void 0){if(u.complete===!0)l.manager.itemStart(t),setTimeout(function(){e&&e(u),l.manager.itemEnd(t)},0);else{let m=Qo.get(u);m===void 0&&(m=[],Qo.set(u,m)),m.push({onLoad:e,onError:r})}return u}const f=Jc("img");function h(){g(),e&&e(this);const m=Qo.get(this)||[];for(let v=0;v<m.length;v++){const _=m[v];_.onLoad&&_.onLoad(this)}Qo.delete(this),l.manager.itemEnd(t)}function d(m){g(),r&&r(m),n0.remove(`image:${t}`);const v=Qo.get(this)||[];for(let _=0;_<v.length;_++){const M=v[_];M.onError&&M.onError(m)}Qo.delete(this),l.manager.itemError(t),l.manager.itemEnd(t)}function g(){f.removeEventListener("load",h,!1),f.removeEventListener("error",d,!1)}return f.addEventListener("load",h,!1),f.addEventListener("error",d,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(f.crossOrigin=this.crossOrigin),n0.add(`image:${t}`,f),l.manager.itemStart(t),f.src=t,f}}class jO extends Yx{constructor(t){super(t)}load(t,e,s,r){const l=new ii,u=new GO(this.manager);return u.setCrossOrigin(this.crossOrigin),u.setPath(this.path),u.load(t,function(f){l.image=f,l.needsUpdate=!0,e!==void 0&&e(l)},s,r),l}}class qx extends zn{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new Fe(t),this.intensity=e}dispose(){this.dispatchEvent({type:"dispose"})}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,e}}const i0=new ln,lM=new et,cM=new et;class iA{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ce(512,512),this.mapType=Ni,this.map=null,this.mapPass=null,this.matrix=new ln,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Xx,this._frameExtents=new ce(1,1),this._viewportCount=1,this._viewports=[new xn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,s=this.matrix;lM.setFromMatrixPosition(t.matrixWorld),e.position.copy(lM),cM.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(cM),e.updateMatrixWorld(),i0.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(i0,e.coordinateSystem,e.reversedDepth),e.reversedDepth?s.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):s.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),s.multiply(i0)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.autoUpdate=t.autoUpdate,this.needsUpdate=t.needsUpdate,this.normalBias=t.normalBias,this.blurSamples=t.blurSamples,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const t={};return this.intensity!==1&&(t.intensity=this.intensity),this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class WO extends iA{constructor(){super(new Di(90,1,.5,500)),this.isPointLightShadow=!0}}class XO extends qx{constructor(t,e,s=0,r=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=s,this.decay=r,this.shadow=new WO}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.decay=this.decay,e.object.shadow=this.shadow.toJSON(),e}}class Zx extends Q2{constructor(t=-1,e=1,s=1,r=-1,l=.1,u=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=s,this.bottom=r,this.near=l,this.far=u,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,s,r,l,u){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=t,this.view.fullHeight=e,this.view.offsetX=s,this.view.offsetY=r,this.view.width=l,this.view.height=u,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),s=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let l=s-t,u=s+t,f=r+e,h=r-e;if(this.view!==null&&this.view.enabled){const d=(this.right-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;l+=d*this.view.offsetX,u=l+d*this.view.width,f-=g*this.view.offsetY,h=f-g*this.view.height}this.projectionMatrix.makeOrthographic(l,u,f,h,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}class YO extends iA{constructor(){super(new Zx(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class qO extends qx{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(zn.DEFAULT_UP),this.updateMatrix(),this.target=new zn,this.shadow=new YO}dispose(){super.dispose(),this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.shadow=this.shadow.toJSON(),e.object.target=this.target.uuid,e}}class ZO extends qx{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class KO extends Di{constructor(t=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=t}}const uM=new ln;class QO{constructor(t,e,s=0,r=1/0){this.ray=new Zd(t,e),this.near=s,this.far=r,this.camera=null,this.layers=new Wx,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):Oe("Raycaster: Unsupported camera type: "+e.type)}setFromXRController(t){return uM.identity().extractRotation(t.matrixWorld),this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(uM),this}intersectObject(t,e=!0,s=[]){return zg(t,this,s,e),s.sort(fM),s}intersectObjects(t,e=!0,s=[]){for(let r=0,l=t.length;r<l;r++)zg(t[r],this,s,e);return s.sort(fM),s}}function fM(n,t){return n.distance-t.distance}function zg(n,t,e,s){let r=!0;if(n.layers.test(t.layers)&&n.raycast(t,e)===!1&&(r=!1),r===!0&&s===!0){const l=n.children;for(let u=0,f=l.length;u<f;u++)zg(l[u],t,e,!0)}}class dM{constructor(t=1,e=0,s=0){this.radius=t,this.phi=e,this.theta=s}set(t,e,s){return this.radius=t,this.phi=e,this.theta=s,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){return this.phi=we(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,s){return this.radius=Math.sqrt(t*t+e*e+s*s),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,s),this.phi=Math.acos(we(e/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class JO extends FO{constructor(t=10,e=10,s=4473924,r=8947848){s=new Fe(s),r=new Fe(r);const l=e/2,u=t/e,f=t/2,h=[],d=[];for(let v=0,_=0,M=-f;v<=e;v++,M+=u){h.push(-f,0,M,f,0,M),h.push(M,0,-f,M,0,f);const T=v===l?s:r;T.toArray(d,_),_+=3,T.toArray(d,_),_+=3,T.toArray(d,_),_+=3,T.toArray(d,_),_+=3}const g=new Ki;g.setAttribute("position",new Pi(h,3)),g.setAttribute("color",new Pi(d,3));const m=new eA({vertexColors:!0,toneMapped:!1});super(g,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class $O extends Kr{constructor(t,e=null){super(),this.object=t,this.domElement=e,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(t){if(t===void 0){fe("Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=t}disconnect(){}dispose(){}update(){}}function hM(n,t,e,s){const r=t8(s);switch(e){case H2:return n*t;case G2:return n*t/r.components*r.byteLength;case Bx:return n*t/r.components*r.byteLength;case gl:return n*t*2/r.components*r.byteLength;case Vx:return n*t*2/r.components*r.byteLength;case k2:return n*t*3/r.components*r.byteLength;case os:return n*t*4/r.components*r.byteLength;case Hx:return n*t*4/r.components*r.byteLength;case ud:case fd:return Math.floor((n+3)/4)*Math.floor((t+3)/4)*8;case dd:case hd:return Math.floor((n+3)/4)*Math.floor((t+3)/4)*16;case sg:case rg:return Math.max(n,16)*Math.max(t,8)/4;case ig:case ag:return Math.max(n,8)*Math.max(t,8)/2;case og:case lg:case ug:case fg:return Math.floor((n+3)/4)*Math.floor((t+3)/4)*8;case cg:case dg:case hg:return Math.floor((n+3)/4)*Math.floor((t+3)/4)*16;case pg:return Math.floor((n+3)/4)*Math.floor((t+3)/4)*16;case mg:return Math.floor((n+4)/5)*Math.floor((t+3)/4)*16;case gg:return Math.floor((n+4)/5)*Math.floor((t+4)/5)*16;case xg:return Math.floor((n+5)/6)*Math.floor((t+4)/5)*16;case vg:return Math.floor((n+5)/6)*Math.floor((t+5)/6)*16;case yg:return Math.floor((n+7)/8)*Math.floor((t+4)/5)*16;case _g:return Math.floor((n+7)/8)*Math.floor((t+5)/6)*16;case bg:return Math.floor((n+7)/8)*Math.floor((t+7)/8)*16;case Sg:return Math.floor((n+9)/10)*Math.floor((t+4)/5)*16;case Mg:return Math.floor((n+9)/10)*Math.floor((t+5)/6)*16;case Eg:return Math.floor((n+9)/10)*Math.floor((t+7)/8)*16;case Tg:return Math.floor((n+9)/10)*Math.floor((t+9)/10)*16;case Ag:return Math.floor((n+11)/12)*Math.floor((t+9)/10)*16;case wg:return Math.floor((n+11)/12)*Math.floor((t+11)/12)*16;case Cg:case Rg:case Dg:return Math.ceil(n/4)*Math.ceil(t/4)*16;case Ng:case Lg:return Math.ceil(n/4)*Math.ceil(t/4)*8;case Pg:case Ug:return Math.ceil(n/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${e} format.`)}function t8(n){switch(n){case Ni:case I2:return{byteLength:1,components:1};case Kc:case z2:case pa:return{byteLength:2,components:1};case Ix:case zx:return{byteLength:2,components:4};case Rs:case Fx:case bs:return{byteLength:4,components:1};case B2:case V2:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Ux}}));typeof window<"u"&&(window.__THREE__?fe("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Ux);/** 224 * @license 225 * Copyright 2010-2025 Three.js Authors 226 * SPDX-License-Identifier: MIT 227 */function sA(){let n=null,t=!1,e=null,s=null;function r(l,u){e(l,u),s=n.requestAnimationFrame(r)}return{start:function(){t!==!0&&e!==null&&(s=n.requestAnimationFrame(r),t=!0)},stop:function(){n.cancelAnimationFrame(s),t=!1},setAnimationLoop:function(l){e=l},setContext:function(l){n=l}}}function e8(n){const t=new WeakMap;function e(f,h){const d=f.array,g=f.usage,m=d.byteLength,v=n.createBuffer();n.bindBuffer(h,v),n.bufferData(h,d,g),f.onUploadCallback();let _;if(d instanceof Float32Array)_=n.FLOAT;else if(typeof Float16Array<"u"&&d instanceof Float16Array)_=n.HALF_FLOAT;else if(d instanceof Uint16Array)f.isFloat16BufferAttribute?_=n.HALF_FLOAT:_=n.UNSIGNED_SHORT;else if(d instanceof Int16Array)_=n.SHORT;else if(d instanceof Uint32Array)_=n.UNSIGNED_INT;else if(d instanceof Int32Array)_=n.INT;else if(d instanceof Int8Array)_=n.BYTE;else if(d instanceof Uint8Array)_=n.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)_=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:v,type:_,bytesPerElement:d.BYTES_PER_ELEMENT,version:f.version,size:m}}function s(f,h,d){const g=h.array,m=h.updateRanges;if(n.bindBuffer(d,f),m.length===0)n.bufferSubData(d,0,g);else{m.sort((_,M)=>_.start-M.start);let v=0;for(let _=1;_<m.length;_++){const M=m[v],T=m[_];
vendor: 5,162 bytes, lines 227-340
227T.start<=M.start+M.count+1?M.count=Math.max(M.count,T.start+T.count-M.start):(++v,m[v]=T)}m.length=v+1;for(let _=0,M=m.length;_<M;_++){const T=m[_];n.bufferSubData(d,T.start*g.BYTES_PER_ELEMENT,g,T.start,T.count)}h.clearUpdateRanges()}h.onUploadCallback()}function r(f){return f.isInterleavedBufferAttribute&&(f=f.data),t.get(f)}function l(f){f.isInterleavedBufferAttribute&&(f=f.data);const h=t.get(f);h&&(n.deleteBuffer(h.buffer),t.delete(f))}function u(f,h){if(f.isInterleavedBufferAttribute&&(f=f.data),f.isGLBufferAttribute){const g=t.get(f);(!g||g.version<f.version)&&t.set(f,{buffer:f.buffer,type:f.type,bytesPerElement:f.elementSize,version:f.version});return}const d=t.get(f);if(d===void 0)t.set(f,e(f,h));else if(d.version<f.version){if(d.size!==f.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.");s(d.buffer,f,h),d.version=f.version}}return{get:r,remove:l,update:u}}var n8=`#ifdef USE_ALPHAHASH 228 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 229#endif`,i8=`#ifdef USE_ALPHAHASH 230 const float ALPHA_HASH_SCALE = 0.05; 231 float hash2D( vec2 value ) { 232 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 233 } 234 float hash3D( vec3 value ) { 235 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 236 } 237 float getAlphaHashThreshold( vec3 position ) { 238 float maxDeriv = max( 239 length( dFdx( position.xyz ) ), 240 length( dFdy( position.xyz ) ) 241 ); 242 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 243 vec2 pixScales = vec2( 244 exp2( floor( log2( pixScale ) ) ), 245 exp2( ceil( log2( pixScale ) ) ) 246 ); 247 vec2 alpha = vec2( 248 hash3D( floor( pixScales.x * position.xyz ) ), 249 hash3D( floor( pixScales.y * position.xyz ) ) 250 ); 251 float lerpFactor = fract( log2( pixScale ) ); 252 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 253 float a = min( lerpFactor, 1.0 - lerpFactor ); 254 vec3 cases = vec3( 255 x * x / ( 2.0 * a * ( 1.0 - a ) ), 256 ( x - 0.5 * a ) / ( 1.0 - a ), 257 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 258 ); 259 float threshold = ( x < ( 1.0 - a ) ) 260 ? ( ( x < a ) ? cases.x : cases.y ) 261 : cases.z; 262 return clamp( threshold , 1.0e-6, 1.0 ); 263 } 264#endif`,s8=`#ifdef USE_ALPHAMAP 265 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 266#endif`,a8=`#ifdef USE_ALPHAMAP 267 uniform sampler2D alphaMap; 268#endif`,r8=`#ifdef USE_ALPHATEST 269 #ifdef ALPHA_TO_COVERAGE 270 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 271 if ( diffuseColor.a == 0.0 ) discard; 272 #else 273 if ( diffuseColor.a < alphaTest ) discard; 274 #endif 275#endif`,o8=`#ifdef USE_ALPHATEST 276 uniform float alphaTest; 277#endif`,l8=`#ifdef USE_AOMAP 278 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 279 reflectedLight.indirectDiffuse *= ambientOcclusion; 280 #if defined( USE_CLEARCOAT ) 281 clearcoatSpecularIndirect *= ambientOcclusion; 282 #endif 283 #if defined( USE_SHEEN ) 284 sheenSpecularIndirect *= ambientOcclusion; 285 #endif 286 #if defined( USE_ENVMAP ) && defined( STANDARD ) 287 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 288 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 289 #endif 290#endif`,c8=`#ifdef USE_AOMAP 291 uniform sampler2D aoMap; 292 uniform float aoMapIntensity; 293#endif`,u8=`#ifdef USE_BATCHING 294 #if ! defined( GL_ANGLE_multi_draw ) 295 #define gl_DrawID _gl_DrawID 296 uniform int _gl_DrawID; 297 #endif 298 uniform highp sampler2D batchingTexture; 299 uniform highp usampler2D batchingIdTexture; 300 mat4 getBatchingMatrix( const in float i ) { 301 int size = textureSize( batchingTexture, 0 ).x; 302 int j = int( i ) * 4; 303 int x = j % size; 304 int y = j / size; 305 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 306 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 307 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 308 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 309 return mat4( v1, v2, v3, v4 ); 310 } 311 float getIndirectIndex( const in int i ) { 312 int size = textureSize( batchingIdTexture, 0 ).x; 313 int x = i % size; 314 int y = i / size; 315 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 316 } 317#endif 318#ifdef USE_BATCHING_COLOR 319 uniform sampler2D batchingColorTexture; 320 vec3 getBatchingColor( const in float i ) { 321 int size = textureSize( batchingColorTexture, 0 ).x; 322 int j = int( i ); 323 int x = j % size; 324 int y = j / size; 325 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; 326 } 327#endif`,f8=`#ifdef USE_BATCHING 328 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 329#endif`,d8=`vec3 transformed = vec3( position ); 330#ifdef USE_ALPHAHASH 331 vPosition = vec3( position ); 332#endif`,h8=`vec3 objectNormal = vec3( normal ); 333#ifdef USE_TANGENT 334 vec3 objectTangent = vec3( tangent.xyz ); 335#endif`,p8=`float G_BlinnPhong_Implicit( ) { 336 return 0.25; 337} 338float D_BlinnPhong( const in float shininess, const in float dotNH ) { 339 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 340}
341vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 342 vec3 halfDir = normalize( lightDir + viewDir ); 343 float dotNH = saturate( dot( normal, halfDir ) ); 344 float dotVH = saturate( dot( viewDir, halfDir ) ); 345 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 346 float G = G_BlinnPhong_Implicit( ); 347 float D = D_BlinnPhong( shininess, dotNH ); 348 return F * ( G * D ); 349} // validated`,m8=`#ifdef USE_IRIDESCENCE 350 const mat3 XYZ_TO_REC709 = mat3( 351 3.2404542, -0.9692660, 0.0556434, 352 -1.5371385, 1.8760108, -0.2040259, 353 -0.4985314, 0.0415560, 1.0572252 354 ); 355 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 356 vec3 sqrtF0 = sqrt( fresnel0 ); 357 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 358 } 359 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 360 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 361 } 362 float IorToFresnel0( float transmittedIor, float incidentIor ) { 363 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 364 } 365 vec3 evalSensitivity( float OPD, vec3 shift ) { 366 float phase = 2.0 * PI * OPD * 1.0e-9; 367 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 368 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 369 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 370 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 371 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 ) ); 372 xyz /= 1.0685e-7; 373 vec3 rgb = XYZ_TO_REC709 * xyz; 374 return rgb; 375 } 376 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 377 vec3 I; 378 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 379 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 380 float cosTheta2Sq = 1.0 - sinTheta2Sq; 381 if ( cosTheta2Sq < 0.0 ) { 382 return vec3( 1.0 ); 383 } 384 float cosTheta2 = sqrt( cosTheta2Sq ); 385 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 386 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
387 float T121 = 1.0 - R12; 388 float phi12 = 0.0; 389 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 390 float phi21 = PI - phi12; 391 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 392 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 393 vec3 phi23 = vec3( 0.0 ); 394 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 395 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 396 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 397 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 398 vec3 phi = vec3( phi21 ) + phi23; 399 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 400 vec3 r123 = sqrt( R123 ); 401 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 402 vec3 C0 = R12 + Rs; 403 I = C0; 404 vec3 Cm = Rs - T121; 405 for ( int m = 1; m <= 2; ++ m ) { 406 Cm *= r123; 407 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 408 I += Cm * Sm; 409 } 410 return max( I, vec3( 0.0 ) ); 411 } 412#endif`,g8=`#ifdef USE_BUMPMAP 413 uniform sampler2D bumpMap; 414 uniform float bumpScale; 415 vec2 dHdxy_fwd() { 416 vec2 dSTdx = dFdx( vBumpMapUv ); 417 vec2 dSTdy = dFdy( vBumpMapUv ); 418 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 419 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 420 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 421 return vec2( dBx, dBy ); 422 } 423 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 424 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 425 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 426 vec3 vN = surf_norm; 427 vec3 R1 = cross( vSigmaY, vN ); 428 vec3 R2 = cross( vN, vSigmaX ); 429 float fDet = dot( vSigmaX, R1 ) * faceDirection; 430 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 431 return normalize( abs( fDet ) * surf_norm - vGrad ); 432 } 433#endif`,x8=`#if NUM_CLIPPING_PLANES > 0 434 vec4 plane; 435 #ifdef ALPHA_TO_COVERAGE 436 float distanceToPlane, distanceGradient; 437 float clipOpacity = 1.0; 438 #pragma unroll_loop_start 439 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 440 plane = clippingPlanes[ i ]; 441 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 442 distanceGradient = fwidth( distanceToPlane ) / 2.0; 443 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 444 if ( clipOpacity == 0.0 ) discard; 445 } 446 #pragma unroll_loop_end 447 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 448 float unionClipOpacity = 1.0; 449 #pragma unroll_loop_start 450 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 451 plane = clippingPlanes[ i ]; 452 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 453 distanceGradient = fwidth( distanceToPlane ) / 2.0; 454 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 455 } 456 #pragma unroll_loop_end 457 clipOpacity *= 1.0 - unionClipOpacity; 458 #endif 459 diffuseColor.a *= clipOpacity; 460 if ( diffuseColor.a == 0.0 ) discard; 461 #else 462 #pragma unroll_loop_start 463 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 464 plane = clippingPlanes[ i ]; 465 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 466 } 467 #pragma unroll_loop_end 468 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 469 bool clipped = true; 470 #pragma unroll_loop_start 471 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 472 plane = clippingPlanes[ i ]; 473 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 474 } 475 #pragma unroll_loop_end 476 if ( clipped ) discard; 477 #endif 478 #endif 479#endif`,v8=`#if NUM_CLIPPING_PLANES > 0 480 varying vec3 vClipPosition; 481 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 482#endif`,y8=`#if NUM_CLIPPING_PLANES > 0 483 varying vec3 vClipPosition; 484#endif`,_8=`#if NUM_CLIPPING_PLANES > 0 485 vClipPosition = - mvPosition.xyz; 486#endif`,b8=`#if defined( USE_COLOR_ALPHA ) 487 diffuseColor *= vColor; 488#elif defined( USE_COLOR ) 489 diffuseColor.rgb *= vColor; 490#endif`,S8=`#if defined( USE_COLOR_ALPHA ) 491 varying vec4 vColor; 492#elif defined( USE_COLOR ) 493 varying vec3 vColor; 494#endif`,M8=`#if defined( USE_COLOR_ALPHA ) 495 varying vec4 vColor; 496#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 497 varying vec3 vColor; 498#endif`,E8=`#if defined( USE_COLOR_ALPHA ) 499 vColor = vec4( 1.0 ); 500#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 501 vColor = vec3( 1.0 ); 502#endif 503#ifdef USE_COLOR 504 vColor *= color; 505#endif 506#ifdef USE_INSTANCING_COLOR 507 vColor.xyz *= instanceColor.xyz; 508#endif 509#ifdef USE_BATCHING_COLOR 510 vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); 511 vColor.xyz *= batchingColor.xyz; 512#endif`,T8=`#define PI 3.141592653589793 513#define PI2 6.283185307179586 514#define PI_HALF 1.5707963267948966 515#define RECIPROCAL_PI 0.3183098861837907 516#define RECIPROCAL_PI2 0.15915494309189535 517#define EPSILON 1e-6 518#ifndef saturate 519#define saturate( a ) clamp( a, 0.0, 1.0 ) 520#endif 521#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 522float pow2( const in float x ) { return x*x; } 523vec3 pow2( const in vec3 x ) { return x*x; } 524float pow3( const in float x ) { return x*x*x; } 525float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 526float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 527float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 528highp float rand( const in vec2 uv ) { 529 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 530 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 531 return fract( sin( sn ) * c ); 532} 533#ifdef HIGH_PRECISION 534 float precisionSafeLength( vec3 v ) { return length( v ); } 535#else 536 float precisionSafeLength( vec3 v ) { 537 float maxComponent = max3( abs( v ) ); 538 return length( v / maxComponent ) * maxComponent; 539 } 540#endif 541struct IncidentLight { 542 vec3 color; 543 vec3 direction; 544 bool visible; 545}; 546struct ReflectedLight { 547 vec3 directDiffuse; 548 vec3 directSpecular; 549 vec3 indirectDiffuse; 550 vec3 indirectSpecular; 551}; 552#ifdef USE_ALPHAHASH 553 varying vec3 vPosition; 554#endif 555vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 556 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 557} 558vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 559 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 560} 561bool isPerspectiveMatrix( mat4 m ) { 562 return m[ 2 ][ 3 ] == - 1.0; 563} 564vec2 equirectUv( in vec3 dir ) { 565 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 566 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 567 return vec2( u, v ); 568}
569vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 570 return RECIPROCAL_PI * diffuseColor; 571} 572vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 573 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 574 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 575} 576float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 577 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 578 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 579} // validated`,A8=`#ifdef ENVMAP_TYPE_CUBE_UV 580 #define cubeUV_minMipLevel 4.0 581 #define cubeUV_minTileSize 16.0 582 float getFace( vec3 direction ) { 583 vec3 absDirection = abs( direction ); 584 float face = - 1.0; 585 if ( absDirection.x > absDirection.z ) { 586 if ( absDirection.x > absDirection.y ) 587 face = direction.x > 0.0 ? 0.0 : 3.0; 588 else 589 face = direction.y > 0.0 ? 1.0 : 4.0; 590 } else { 591 if ( absDirection.z > absDirection.y ) 592 face = direction.z > 0.0 ? 2.0 : 5.0; 593 else 594 face = direction.y > 0.0 ? 1.0 : 4.0; 595 } 596 return face; 597 } 598 vec2 getUV( vec3 direction, float face ) { 599 vec2 uv; 600 if ( face == 0.0 ) { 601 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 602 } else if ( face == 1.0 ) { 603 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 604 } else if ( face == 2.0 ) { 605 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 606 } else if ( face == 3.0 ) { 607 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 608 } else if ( face == 4.0 ) { 609 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 610 } else { 611 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 612 } 613 return 0.5 * ( uv + 1.0 ); 614 } 615 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 616 float face = getFace( direction ); 617 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 618 mipInt = max( mipInt, cubeUV_minMipLevel ); 619 float faceSize = exp2( mipInt ); 620 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 621 if ( face > 2.0 ) { 622 uv.y += faceSize; 623 face -= 3.0; 624 } 625 uv.x += face * faceSize; 626 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 627 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 628 uv.x *= CUBEUV_TEXEL_WIDTH; 629 uv.y *= CUBEUV_TEXEL_HEIGHT; 630 #ifdef texture2DGradEXT 631 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 632 #else 633 return texture2D( envMap, uv ).rgb; 634 #endif 635 } 636 #define cubeUV_r0 1.0 637 #define cubeUV_m0 - 2.0 638 #define cubeUV_r1 0.8 639 #define cubeUV_m1 - 1.0 640 #define cubeUV_r4 0.4 641 #define cubeUV_m4 2.0 642 #define cubeUV_r5 0.305 643 #define cubeUV_m5 3.0 644 #define cubeUV_r6 0.21 645 #define cubeUV_m6 4.0 646 float roughnessToMip( float roughness ) { 647 float mip = 0.0; 648 if ( roughness >= cubeUV_r1 ) { 649 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 650 } else if ( roughness >= cubeUV_r4 ) { 651 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 652 } else if ( roughness >= cubeUV_r5 ) { 653 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 654 } else if ( roughness >= cubeUV_r6 ) { 655 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 656 } else { 657 mip = - 2.0 * log2( 1.16 * roughness ); } 658 return mip; 659 } 660 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 661 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 662 float mipF = fract( mip ); 663 float mipInt = floor( mip ); 664 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 665 if ( mipF == 0.0 ) { 666 return vec4( color0, 1.0 ); 667 } else { 668 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 669 return vec4( mix( color0, color1, mipF ), 1.0 ); 670 } 671 } 672#endif`,w8=`vec3 transformedNormal = objectNormal; 673#ifdef USE_TANGENT 674 vec3 transformedTangent = objectTangent; 675#endif 676#ifdef USE_BATCHING 677 mat3 bm = mat3( batchingMatrix ); 678 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 679 transformedNormal = bm * transformedNormal; 680 #ifdef USE_TANGENT 681 transformedTangent = bm * transformedTangent; 682 #endif 683#endif 684#ifdef USE_INSTANCING 685 mat3 im = mat3( instanceMatrix ); 686 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 687 transformedNormal = im * transformedNormal; 688 #ifdef USE_TANGENT 689 transformedTangent = im * transformedTangent; 690 #endif 691#endif 692transformedNormal = normalMatrix * transformedNormal; 693#ifdef FLIP_SIDED 694 transformedNormal = - transformedNormal; 695#endif 696#ifdef USE_TANGENT 697 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 698 #ifdef FLIP_SIDED 699 transformedTangent = - transformedTangent; 700 #endif 701#endif`,C8=`#ifdef USE_DISPLACEMENTMAP 702 uniform sampler2D displacementMap; 703 uniform float displacementScale; 704 uniform float displacementBias; 705#endif`,R8=`#ifdef USE_DISPLACEMENTMAP 706 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
706placementBias ); 707#endif`,D8=`#ifdef USE_EMISSIVEMAP 708 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 709 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 710 emissiveColor = sRGBTransferEOTF( emissiveColor ); 711 #endif 712 totalEmissiveRadiance *= emissiveColor.rgb; 713#endif`,N8=`#ifdef USE_EMISSIVEMAP 714 uniform sampler2D emissiveMap; 715#endif`,L8="gl_FragColor = linearToOutputTexel( gl_FragColor );",P8=`vec4 LinearTransferOETF( in vec4 value ) { 716 return value; 717} 718vec4 sRGBTransferEOTF( in vec4 value ) { 719 return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); 720} 721vec4 sRGBTransferOETF( in vec4 value ) { 722 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 ); 723}`,U8=`#ifdef USE_ENVMAP 724 #ifdef ENV_WORLDPOS 725 vec3 cameraToFrag; 726 if ( isOrthographic ) { 727 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 728 } else { 729 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 730 } 731 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 732 #ifdef ENVMAP_MODE_REFLECTION 733 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 734 #else 735 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 736 #endif 737 #else 738 vec3 reflectVec = vReflect; 739 #endif 740 #ifdef ENVMAP_TYPE_CUBE 741 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 742 #else 743 vec4 envColor = vec4( 0.0 ); 744 #endif 745 #ifdef ENVMAP_BLENDING_MULTIPLY 746 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 747 #elif defined( ENVMAP_BLENDING_MIX ) 748 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 749 #elif defined( ENVMAP_BLENDING_ADD ) 750 outgoingLight += envColor.xyz * specularStrength * reflectivity; 751 #endif 752#endif`,O8=`#ifdef USE_ENVMAP 753 uniform float envMapIntensity; 754 uniform float flipEnvMap; 755 uniform mat3 envMapRotation; 756 #ifdef ENVMAP_TYPE_CUBE 757 uniform samplerCube envMap; 758 #else 759 uniform sampler2D envMap; 760 #endif 761#endif`,F8=`#ifdef USE_ENVMAP 762 uniform float reflectivity; 763 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 764 #define ENV_WORLDPOS 765 #endif 766 #ifdef ENV_WORLDPOS 767 varying vec3 vWorldPosition; 768 uniform float refractionRatio; 769 #else 770 varying vec3 vReflect; 771 #endif 772#endif`,I8=`#ifdef USE_ENVMAP 773 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 774 #define ENV_WORLDPOS 775 #endif 776 #ifdef ENV_WORLDPOS 777 778 varying vec3 vWorldPosition; 779 #else 780 varying vec3 vReflect; 781 uniform float refractionRatio; 782 #endif 783#endif`,z8=`#ifdef USE_ENVMAP 784 #ifdef ENV_WORLDPOS 785 vWorldPosition = worldPosition.xyz; 786 #else 787 vec3 cameraToVertex; 788 if ( isOrthographic ) { 789 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 790 } else {
791 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 792 } 793 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 794 #ifdef ENVMAP_MODE_REFLECTION 795 vReflect = reflect( cameraToVertex, worldNormal ); 796 #else 797 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 798 #endif 799 #endif 800#endif`,B8=`#ifdef USE_FOG 801 vFogDepth = - mvPosition.z; 802#endif`,V8=`#ifdef USE_FOG 803 varying float vFogDepth; 804#endif`,H8=`#ifdef USE_FOG 805 #ifdef FOG_EXP2 806 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 807 #else 808 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 809 #endif 810 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 811#endif`,k8=`#ifdef USE_FOG 812 uniform vec3 fogColor; 813 varying float vFogDepth; 814 #ifdef FOG_EXP2 815 uniform float fogDensity; 816 #else 817 uniform float fogNear; 818 uniform float fogFar; 819 #endif 820#endif`,G8=`#ifdef USE_GRADIENTMAP 821 uniform sampler2D gradientMap; 822#endif 823vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 824 float dotNL = dot( normal, lightDirection ); 825 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 826 #ifdef USE_GRADIENTMAP 827 return vec3( texture2D( gradientMap, coord ).r ); 828 #else 829 vec2 fw = fwidth( coord ) * 0.5; 830 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 831 #endif 832}`,j8=`#ifdef USE_LIGHTMAP 833 uniform sampler2D lightMap; 834 uniform float lightMapIntensity; 835#endif`,W8=`LambertMaterial material; 836material.diffuseColor = diffuseColor.rgb; 837material.specularStrength = specularStrength;`,X8=`varying vec3 vViewPosition; 838struct LambertMaterial { 839 vec3 diffuseColor; 840 float specularStrength; 841}; 842void 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 ) { 843 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 844 vec3 irradiance = dotNL * directLight.color; 845 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 846} 847void 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 ) { 848 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 849} 850#define RE_Direct RE_Direct_Lambert 851#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Y8=`uniform bool receiveShadow; 852uniform vec3 ambientLightColor; 853#if defined( USE_LIGHT_PROBES ) 854 uniform vec3 lightProbe[ 9 ]; 855#endif 856vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 857 float x = normal.x, y = normal.y, z = normal.z; 858 vec3 result = shCoefficients[ 0 ] * 0.886227; 859 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 860 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 861 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 862 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 863 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 864 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 865 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 866 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 867 return result; 868} 869vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 870 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 871 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 872 return irradiance; 873} 874vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 875 vec3 irradiance = ambientLightColor; 876 return irradiance; 877} 878float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 879 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 880 if ( cutoffDistance > 0.0 ) { 881 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 882 } 883 return distanceFalloff; 884} 885float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 886 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 887} 888#if NUM_DIR_LIGHTS > 0 889 struct DirectionalLight { 890 vec3 direction; 891 vec3 color; 892 }; 893 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 894 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 895 light.color = directionalLight.color; 896 light.direction = directionalLight.direction; 897 light.visible = true; 898 } 899#endif 900#if NUM_POINT_LIGHTS > 0 901 struct PointLight { 902 vec3 position; 903 vec3 color; 904 float distance; 905 float decay; 906 }; 907 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 908 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 909 vec3 lVector = pointLight.position - geometryPosition; 910 light.direction = normalize( lVector ); 911 float lightDistance = length( lVector ); 912 light.color = pointLight.color; 913 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 914 light.visible = ( light.color != vec3( 0.0 ) ); 915 } 916#endif
917#if NUM_SPOT_LIGHTS > 0 918 struct SpotLight { 919 vec3 position; 920 vec3 direction; 921 vec3 color; 922 float distance; 923 float decay; 924 float coneCos; 925 float penumbraCos; 926 }; 927 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 928 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 929 vec3 lVector = spotLight.position - geometryPosition; 930 light.direction = normalize( lVector ); 931 float angleCos = dot( light.direction, spotLight.direction ); 932 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 933 if ( spotAttenuation > 0.0 ) { 934 float lightDistance = length( lVector ); 935 light.color = spotLight.color * spotAttenuation; 936 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 937 light.visible = ( light.color != vec3( 0.0 ) ); 938 } else { 939 light.color = vec3( 0.0 ); 940 light.visible = false; 941 } 942 } 943#endif 944#if NUM_RECT_AREA_LIGHTS > 0 945 struct RectAreaLight { 946 vec3 color; 947 vec3 position; 948 vec3 halfWidth; 949 vec3 halfHeight; 950 }; 951 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 952 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 953#endif 954#if NUM_HEMI_LIGHTS > 0 955 struct HemisphereLight { 956 vec3 direction; 957 vec3 skyColor; 958 vec3 groundColor; 959 }; 960 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 961 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 962 float dotNL = dot( normal, hemiLight.direction ); 963 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 964 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 965 return irradiance; 966 } 967#endif`,q8=`#ifdef USE_ENVMAP 968 vec3 getIBLIrradiance( const in vec3 normal ) { 969 #ifdef ENVMAP_TYPE_CUBE_UV 970 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 971 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 972 return PI * envMapColor.rgb * envMapIntensity; 973 #else 974 return vec3( 0.0 ); 975 #endif 976 } 977 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 978 #ifdef ENVMAP_TYPE_CUBE_UV 979 vec3 reflectVec = reflect( - viewDir, normal ); 980 reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) ); 981 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 982 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 983 return envMapColor.rgb * envMapIntensity; 984 #else 985 return vec3( 0.0 ); 986 #endif 987 } 988 #ifdef USE_ANISOTROPY 989 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 990 #ifdef ENVMAP_TYPE_CUBE_UV 991 vec3 bentNormal = cross( bitangent, viewDir ); 992 bentNormal = normalize( cross( bentNormal, bitangent ) ); 993 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 994 return getIBLRadiance( viewDir, bentNormal, roughness ); 995 #else 996 return vec3( 0.0 ); 997 #endif 998 } 999 #endif 1000#endif`,Z8=`ToonMaterial material; 1001material.diffuseColor = diffuseColor.rgb;`,K8=`varying vec3 vViewPosition; 1002struct ToonMaterial { 1003 vec3 diffuseColor; 1004}; 1005void 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 ) { 1006 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 1007 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1008} 1009void 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 ) { 1010 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1011} 1012#define RE_Direct RE_Direct_Toon 1013#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Q8=`BlinnPhongMaterial material; 1014material.diffuseColor = diffuseColor.rgb; 1015material.specularColor = specular; 1016material.specularShininess = shininess; 1017material.specularStrength = specularStrength;`,J8=`varying vec3 vViewPosition; 1018struct BlinnPhongMaterial { 1019 vec3 diffuseColor; 1020 vec3 specularColor; 1021 float specularShininess; 1022 float specularStrength; 1023}; 1024void 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 ) {
1025 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1026 vec3 irradiance = dotNL * directLight.color; 1027 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1028 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 1029} 1030void 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 ) { 1031 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1032} 1033#define RE_Direct RE_Direct_BlinnPhong 1034#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,$8=`PhysicalMaterial material; 1035material.diffuseColor = diffuseColor.rgb; 1036material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 1037material.metalness = metalnessFactor; 1038vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 1039float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 1040material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 1041material.roughness = min( material.roughness, 1.0 ); 1042#ifdef IOR 1043 material.ior = ior; 1044 #ifdef USE_SPECULAR 1045 float specularIntensityFactor = specularIntensity; 1046 vec3 specularColorFactor = specularColor; 1047 #ifdef USE_SPECULAR_COLORMAP 1048 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 1049 #endif 1050 #ifdef USE_SPECULAR_INTENSITYMAP 1051 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 1052 #endif 1053 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 1054 #else 1055 float specularIntensityFactor = 1.0; 1056 vec3 specularColorFactor = vec3( 1.0 ); 1057 material.specularF90 = 1.0; 1058 #endif 1059 material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; 1060 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 1061#else 1062 material.specularColor = vec3( 0.04 ); 1063 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 1064 material.specularF90 = 1.0; 1065#endif 1066#ifdef USE_CLEARCOAT 1067 material.clearcoat = clearcoat; 1068 material.clearcoatRoughness = clearcoatRoughness; 1069 material.clearcoatF0 = vec3( 0.04 ); 1070 material.clearcoatF90 = 1.0; 1071 #ifdef USE_CLEARCOATMAP 1072 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 1073 #endif 1074 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 1075 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 1076 #endif 1077 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 1078 material.clearcoatRoughness += geometryRoughness; 1079 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 1080#endif 1081#ifdef USE_DISPERSION 1082 material.dispersion = dispersion; 1083#endif 1084#ifdef USE_IRIDESCENCE 1085 material.iridescence = iridescence; 1086 material.iridescenceIOR = iridescenceIOR; 1087 #ifdef USE_IRIDESCENCEMAP 1088 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 1089 #endif 1090 #ifdef USE_IRIDESCENCE_THICKNESSMAP 1091 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 1092 #else 1093 material.iridescenceThickness = iridescenceThicknessMaximum; 1094 #endif 1095#endif 1096#ifdef USE_SHEEN 1097 material.sheenColor = sheenColor; 1098 #ifdef USE_SHEEN_COLORMAP 1099 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 1100 #endif 1101 material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); 1102 #ifdef USE_SHEEN_ROUGHNESSMAP 1103 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 1104 #endif 1105#endif 1106#ifdef USE_ANISOTROPY 1107 #ifdef USE_ANISOTROPYMAP 1108 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 1109 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 1110 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 1111 #else 1112 vec2 anisotropyV = anisotropyVector; 1113 #endif 1114 material.anisotropy = length( anisotropyV ); 1115 if( material.anisotropy == 0.0 ) { 1116 anisotropyV = vec2( 1.0, 0.0 ); 1117 } else { 1118 anisotropyV /= material.anisotropy; 1119 material.anisotropy = saturate( material.anisotropy ); 1120 } 1121 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
1122 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 1123 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 1124#endif`,tF
vendor: 17,312 bytes, lines 1124-1472
1124=`uniform sampler2D dfgLUT; 1125struct PhysicalMaterial { 1126 vec3 diffuseColor; 1127 vec3 diffuseContribution; 1128 vec3 specularColor; 1129 vec3 specularColorBlended; 1130 float roughness; 1131 float metalness; 1132 float specularF90; 1133 float dispersion; 1134 #ifdef USE_CLEARCOAT 1135 float clearcoat; 1136 float clearcoatRoughness; 1137 vec3 clearcoatF0; 1138 float clearcoatF90; 1139 #endif 1140 #ifdef USE_IRIDESCENCE 1141 float iridescence; 1142 float iridescenceIOR; 1143 float iridescenceThickness; 1144 vec3 iridescenceFresnel; 1145 vec3 iridescenceF0; 1146 vec3 iridescenceFresnelDielectric; 1147 vec3 iridescenceFresnelMetallic; 1148 #endif 1149 #ifdef USE_SHEEN 1150 vec3 sheenColor; 1151 float sheenRoughness; 1152 #endif 1153 #ifdef IOR 1154 float ior; 1155 #endif 1156 #ifdef USE_TRANSMISSION 1157 float transmission; 1158 float transmissionAlpha; 1159 float thickness; 1160 float attenuationDistance; 1161 vec3 attenuationColor; 1162 #endif 1163 #ifdef USE_ANISOTROPY 1164 float anisotropy; 1165 float alphaT; 1166 vec3 anisotropyT; 1167 vec3 anisotropyB; 1168 #endif 1169}; 1170vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1171vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1172vec3 sheenSpecularDirect = vec3( 0.0 ); 1173vec3 sheenSpecularIndirect = vec3(0.0 ); 1174vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1175 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1176 float x2 = x * x; 1177 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1178 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1179} 1180float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1181 float a2 = pow2( alpha ); 1182 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1183 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1184 return 0.5 / max( gv + gl, EPSILON ); 1185} 1186float D_GGX( const in float alpha, const in float dotNH ) { 1187 float a2 = pow2( alpha ); 1188 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1189 return RECIPROCAL_PI * a2 / pow2( denom ); 1190} 1191#ifdef USE_ANISOTROPY 1192 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 ) { 1193 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1194 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1195 float v = 0.5 / ( gv + gl ); 1196 return v; 1197 } 1198 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1199 float a2 = alphaT * alphaB; 1200 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1201 highp float v2 = dot( v, v ); 1202 float w2 = a2 / v2; 1203 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1204 } 1205#endif 1206#ifdef USE_CLEARCOAT 1207 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1208 vec3 f0 = material.clearcoatF0; 1209 float f90 = material.clearcoatF90; 1210 float roughness = material.clearcoatRoughness; 1211 float alpha = pow2( roughness ); 1212 vec3 halfDir = normalize( lightDir + viewDir ); 1213 float dotNL = saturate( dot( normal, lightDir ) ); 1214 float dotNV = saturate( dot( normal, viewDir ) ); 1215 float dotNH = saturate( dot( normal, halfDir ) ); 1216 float dotVH = saturate( dot( viewDir, halfDir ) ); 1217 vec3 F = F_Schlick( f0, f90, dotVH ); 1218 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1219 float D = D_GGX( alpha, dotNH ); 1220 return F * ( V * D ); 1221 } 1222#endif 1223vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1224 vec3 f0 = material.specularColorBlended; 1225 float f90 = material.specularF90; 1226 float roughness = material.roughness; 1227 float alpha = pow2( roughness ); 1228 vec3 halfDir = normalize( lightDir + viewDir ); 1229 float dotNL = saturate( dot( normal, lightDir ) ); 1230 float dotNV = saturate( dot( normal, viewDir ) ); 1231 float dotNH = saturate( dot( normal, halfDir ) ); 1232 float dotVH = saturate( dot( viewDir, halfDir ) ); 1233 vec3 F = F_Schlick( f0, f90, dotVH ); 1234 #ifdef USE_IRIDESCENCE 1235 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1236 #endif 1237 #ifdef USE_ANISOTROPY 1238 float dotTL = dot( material.anisotropyT, lightDir ); 1239 float dotTV = dot( material.anisotropyT, viewDir ); 1240 float dotTH = dot( material.anisotropyT, halfDir ); 1241 float dotBL = dot( material.anisotropyB, lightDir ); 1242 float dotBV = dot( material.anisotropyB, viewDir ); 1243 float dotBH = dot( material.anisotropyB, halfDir ); 1244 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1245 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1246 #else 1247 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1248 float D = D_GGX( alpha, dotNH ); 1249 #endif 1250 return F * ( V * D ); 1251} 1252vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1253 const float LUT_SIZE = 64.0; 1254 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1255 const float LUT_BIAS = 0.5 / LUT_SIZE; 1256 float dotNV = saturate( dot( N, V ) ); 1257 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1258 uv = uv * LUT_SCALE + LUT_BIAS; 1259 return uv; 1260} 1261float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1262 float l = length( f ); 1263 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1264} 1265vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1266 float x = dot( v1, v2 ); 1267 float y = abs( x ); 1268 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1269 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1270 float v = a / b; 1271 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1272 return cross( v1, v2 ) * theta_sintheta; 1273} 1274vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1275 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1276 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1277 vec3 lightNormal = cross( v1, v2 ); 1278 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1279 vec3 T1, T2; 1280 T1 = normalize( V - N * dot( V, N ) ); 1281 T2 = - cross( N, T1 ); 1282 mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); 1283 vec3 coords[ 4 ]; 1284 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1285 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1286 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1287 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1288 coords[ 0 ] = normalize( coords[ 0 ] ); 1289 coords[ 1 ] = normalize( coords[ 1 ] ); 1290 coords[ 2 ] = normalize( coords[ 2 ] ); 1291 coords[ 3 ] = normalize( coords[ 3 ] ); 1292 vec3 vectorFormFactor = vec3( 0.0 ); 1293 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1294 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1295 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1296 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1297 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1298 return vec3( result ); 1299} 1300#if defined( USE_SHEEN ) 1301float D_Charlie( float roughness, float dotNH ) { 1302 float alpha = pow2( roughness ); 1303 float invAlpha = 1.0 / alpha; 1304 float cos2h = dotNH * dotNH; 1305 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1306 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1307} 1308float V_Neubelt( float dotNV, float dotNL ) { 1309 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1310} 1311vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1312 vec3 halfDir = normalize( lightDir + viewDir ); 1313 float dotNL = saturate( dot( normal, lightDir ) ); 1314 float dotNV = saturate( dot( normal, viewDir ) ); 1315 float dotNH = saturate( dot( normal, halfDir ) ); 1316 float D = D_Charlie( sheenRoughness, dotNH ); 1317 float V = V_Neubelt( dotNV, dotNL ); 1318 return sheenColor * ( D * V ); 1319} 1320#endif 1321float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1322 float dotNV = saturate( dot( normal, viewDir ) ); 1323 float r2 = roughness * roughness; 1324 float rInv = 1.0 / ( roughness + 0.1 ); 1325 float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; 1326 float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; 1327 float DG = exp( a * dotNV + b ); 1328 return saturate( DG ); 1329} 1330vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1331 float dotNV = saturate( dot( normal, viewDir ) ); 1332 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1333 return specularColor * fab.x + specularF90 * fab.y; 1334} 1335#ifdef USE_IRIDESCENCE 1336void 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 ) { 1337#else 1338void 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 ) { 1339#endif 1340 float dotNV = saturate( dot( normal, viewDir ) ); 1341 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1342 #ifdef USE_IRIDESCENCE 1343 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1344 #else 1345 vec3 Fr = specularColor; 1346 #endif 1347 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1348 float Ess = fab.x + fab.y; 1349 float Ems = 1.0 - Ess; 1350 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1351 singleScatter += FssEss; 1352 multiScatter += Fms * Ems; 1353} 1354vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1355 vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material ); 1356 float dotNL = saturate( dot( normal, lightDir ) ); 1357 float dotNV = saturate( dot( normal, viewDir ) ); 1358 vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg; 1359 vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg; 1360 vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y; 1361 vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y; 1362 float Ess_V = dfgV.x + dfgV.y; 1363 float Ess_L = dfgL.x + dfgL.y; 1364 float Ems_V = 1.0 - Ess_V; 1365 float Ems_L = 1.0 - Ess_L; 1366 vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; 1367 vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON ); 1368 float compensationFactor = Ems_V * Ems_L; 1369 vec3 multiScatter = Fms * compensationFactor; 1370 return singleScatter + multiScatter; 1371} 1372#if NUM_RECT_AREA_LIGHTS > 0 1373 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 ) { 1374 vec3 normal = geometryNormal; 1375 vec3 viewDir = geometryViewDir; 1376 vec3 position = geometryPosition; 1377 vec3 lightPos = rectAreaLight.position; 1378 vec3 halfWidth = rectAreaLight.halfWidth; 1379 vec3 halfHeight = rectAreaLight.halfHeight; 1380 vec3 lightColor = rectAreaLight.color; 1381 float roughness = material.roughness; 1382 vec3 rectCoords[ 4 ]; 1383 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1384 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1385 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1386 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1387 vec4 t1 = texture2D( ltc_1, uv ); 1388 vec4 t2 = texture2D( ltc_2, uv ); 1389 mat3 mInv = mat3( 1390 vec3( t1.x, 0, t1.y ), 1391 vec3( 0, 1, 0 ), 1392 vec3( t1.z, 0, t1.w ) 1393 ); 1394 vec3 fresnel = ( material.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y ); 1395 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1396 reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1397 } 1398#endif 1399void 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 ) { 1400 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1401 vec3 irradiance = dotNL * directLight.color; 1402 #ifdef USE_CLEARCOAT 1403 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1404 vec3 ccIrradiance = dotNLcc * directLight.color; 1405 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1406 #endif 1407 #ifdef USE_SHEEN 1408 1409 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1410 1411 float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1412 float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); 1413 1414 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); 1415 1416 irradiance *= sheenEnergyComp; 1417 1418 #endif 1419 reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); 1420 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ); 1421} 1422void 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 ) { 1423 vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ); 1424 #ifdef USE_SHEEN 1425 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1426 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1427 diffuse *= sheenEnergyComp; 1428 #endif 1429 reflectedLight.indirectDiffuse += diffuse; 1430} 1431void 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) { 1432 #ifdef USE_CLEARCOAT 1433 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1434 #endif 1435 #ifdef USE_SHEEN 1436 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; 1437 #endif 1438 vec3 singleScatteringDielectric = vec3( 0.0 ); 1439 vec3 multiScatteringDielectric = vec3( 0.0 ); 1440 vec3 singleScatteringMetallic = vec3( 0.0 ); 1441 vec3 multiScatteringMetallic = vec3( 0.0 ); 1442 #ifdef USE_IRIDESCENCE 1443 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1444 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1445 #else 1446 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1447 computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1448 #endif 1449 vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); 1450 vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); 1451 vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; 1452 vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); 1453 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1454 vec3 indirectSpecular = radiance * singleScattering; 1455 indirectSpecular += multiScattering * cosineWeightedIrradiance; 1456 vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; 1457 #ifdef USE_SHEEN 1458 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1459 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1460 indirectSpecular *= sheenEnergyComp; 1461 indirectDiffuse *= sheenEnergyComp; 1462 #endif 1463 reflectedLight.indirectSpecular += indirectSpecular; 1464 reflectedLight.indirectDiffuse += indirectDiffuse; 1465} 1466#define RE_Direct RE_Direct_Physical 1467#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1468#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1469#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1470float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1471 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1472}`,
1472eF=` 1473vec3 geometryPosition = - vViewPosition; 1474vec3 geometryNormal = normal; 1475vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1476vec3 geometryClearcoatNormal = vec3( 0.0 ); 1477#ifdef USE_CLEARCOAT 1478 geometryClearcoatNormal = clearcoatNormal; 1479#endif 1480#ifdef USE_IRIDESCENCE 1481 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1482 if ( material.iridescenceThickness == 0.0 ) { 1483 material.iridescence = 0.0; 1484 } else { 1485 material.iridescence = saturate( material.iridescence ); 1486 } 1487 if ( material.iridescence > 0.0 ) { 1488 material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1489 material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); 1490 material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness ); 1491 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1492 } 1493#endif 1494IncidentLight directLight; 1495#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1496 PointLight pointLight; 1497 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1498 PointLightShadow pointLightShadow; 1499 #endif 1500 #pragma unroll_loop_start 1501 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1502 pointLight = pointLights[ i ]; 1503 getPointLightInfo( pointLight, geometryPosition, directLight ); 1504 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 1505 pointLightShadow = pointLightShadows[ i ]; 1506 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1507 #endif 1508 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1509 } 1510 #pragma unroll_loop_end 1511#endif 1512#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1513 SpotLight spotLight; 1514 vec4 spotColor; 1515 vec3 spotLightCoord; 1516 bool inSpotLightMap; 1517 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1518 SpotLightShadow spotLightShadow; 1519 #endif 1520 #pragma unroll_loop_start 1521 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1522 spotLight = spotLights[ i ]; 1523 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1524 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1525 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1526 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1527 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1528 #else 1529 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1530 #endif 1531 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1532 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1533 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1534 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1535 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1536 #endif 1537 #undef SPOT_LIGHT_MAP_INDEX 1538 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1539 spotLightShadow = spotLightShadows[ i ]; 1540 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1541 #endif 1542 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1543 } 1544 #pragma unroll_loop_end 1545#endif 1546#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1547 DirectionalLight directionalLight; 1548 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1549 DirectionalLightShadow directionalLightShadow; 1550 #endif 1551 #pragma unroll_loop_start 1552 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1553 directionalLight = directionalLights[ i ]; 1554 getDirectionalLightInfo( directionalLight, directLight ); 1555 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1556 directionalLightShadow = directionalLightShadows[ i ]; 1557 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1558 #endif 1559 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1560 } 1561 #pragma unroll_loop_end 1562#endif 1563#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1564 RectAreaLight rectAreaLight; 1565 #pragma unroll_loop_start 1566 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1567 rectAreaLight = rectAreaLights[ i ]; 1568 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1569 } 1570 #pragma unroll_loop_end 1571#endif 1572#if defined( RE_IndirectDiffuse ) 1573 vec3 iblIrradiance = vec3( 0.0 ); 1574 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1575 #if defined( USE_LIGHT_PROBES ) 1576 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1577 #endif 1578 #if ( NUM_HEMI_LIGHTS > 0 ) 1579 #pragma unroll_loop_start 1580 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1581 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1582 } 1583 #pragma unroll_loop_end 1584 #endif 1585#endif 1586#if defined( RE_IndirectSpecular ) 1587 vec3 radiance = vec3( 0.0 ); 1588 vec3 clearcoatRadiance = vec3( 0.0 ); 1589#endif`,nF=`#if defined( RE_IndirectDiffuse ) 1590 #ifdef USE_LIGHTMAP 1591 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1592 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1593 irradiance += lightMapIrradiance; 1594 #endif 1595 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1596 iblIrradiance += getIBLIrradiance( geometryNormal ); 1597 #endif 1598#endif 1599#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1600 #ifdef USE_ANISOTROPY 1601 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1602 #else 1603 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1604 #endif 1605 #ifdef USE_CLEARCOAT 1606 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1607 #endif 1608#endif`,iF=`#if defined( RE_IndirectDiffuse ) 1609 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1610#endif 1611#if defined( RE_IndirectSpecular ) 1612 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1613#endif`,sF=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1614 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1615#endif`,aF=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1616 uniform float logDepthBufFC; 1617 varying float vFragDepth; 1618 varying float vIsPerspective; 1619#endif`,rF=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1620 varying float vFragDepth; 1621 varying float vIsPerspective; 1622#endif`,oF=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1623 vFragDepth = 1.0 + gl_Position.w; 1624 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1625#endif`,lF=`#ifdef USE_MAP 1626 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1627 #ifdef DECODE_VIDEO_TEXTURE 1628 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1629 #endif 1630 diffuseColor *= sampledDiffuseColor; 1631#endif`,cF=`#ifdef USE_MAP 1632 uniform sampler2D map; 1633#endif`,uF=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1634 #if defined( USE_POINTS_UV ) 1635 vec2 uv = vUv; 1636 #else 1637 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1638 #endif 1639#endif 1640#ifdef USE_MAP 1641 diffuseColor *= texture2D( map, uv ); 1642#endif 1643#ifdef USE_ALPHAMAP 1644 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1645#endif`,fF=`#if defined( USE_POINTS_UV ) 1646 varying vec2 vUv; 1647#else 1648 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1649 uniform mat3 uvTransform; 1650 #endif 1651#endif 1652#ifdef USE_MAP 1653 uniform sampler2D map; 1654#endif 1655#ifdef USE_ALPHAMAP 1656 uniform sampler2D alphaMap; 1657#endif`,dF=`float metalnessFactor = metalness; 1658#ifdef USE_METALNESSMAP 1659 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1660 metalnessFactor *= texelMetalness.b; 1661#endif`,hF=`#ifdef USE_METALNESSMAP 1662 uniform sampler2D metalnessMap; 1663#endif`,pF=`#ifdef USE_INSTANCING_MORPH 1664 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1665 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1666 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1667 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1668 } 1669#endif`,mF=`#if defined( USE_MORPHCOLORS ) 1670 vColor *= morphTargetBaseInfluence; 1671 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1672 #if defined( USE_COLOR_ALPHA ) 1673 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1674 #elif defined( USE_COLOR ) 1675 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1676 #endif 1677 } 1678#endif`,gF=`#ifdef USE_MORPHNORMALS 1679 objectNormal *= morphTargetBaseInfluence; 1680 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1681 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1682 } 1683#endif`,xF=`#ifdef USE_MORPHTARGETS 1684 #ifndef USE_INSTANCING_MORPH 1685 uniform float morphTargetBaseInfluence; 1686 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1687 #endif 1688 uniform sampler2DArray morphTargetsTexture; 1689 uniform ivec2 morphTargetsTextureSize; 1690 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1691 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1692 int y = texelIndex / morphTargetsTextureSize.x; 1693 int x = texelIndex - y * morphTargetsTextureSize.x; 1694 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1695 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1696 } 1697#endif`,vF=`#ifdef USE_MORPHTARGETS 1698 transformed *= morphTargetBaseInfluence; 1699 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1700 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1701 } 1702#endif`,yF=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1703#ifdef FLAT_SHADED 1704 vec3 fdx = dFdx( vViewPosition ); 1705 vec3 fdy = dFdy( vViewPosition ); 1706 vec3 normal = normalize( cross( fdx, fdy ) ); 1707#else 1708 vec3 normal = normalize( vNormal ); 1709 #ifdef DOUBLE_SIDED 1710 normal *= faceDirection; 1711 #endif 1712#endif 1713#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1714 #ifdef USE_TANGENT 1715 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1716 #else 1717 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1718 #if defined( USE_NORMALMAP ) 1719 vNormalMapUv 1720 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1721 vClearcoatNormalMapUv 1722 #else 1723 vUv 1724 #endif 1725 ); 1726 #endif 1727 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1728 tbn[0] *= faceDirection; 1729 tbn[1] *= faceDirection; 1730 #endif 1731#endif 1732#ifdef USE_CLEARCOAT_NORMALMAP 1733 #ifdef USE_TANGENT 1734 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1735 #else 1736 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1737 #endif 1738 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1739 tbn2[0] *= faceDirection; 1740 tbn2[1] *= faceDirection; 1741 #endif 1742#endif 1743vec3 nonPerturbedNormal = normal;`,_F=`#ifdef USE_NORMALMAP_OBJECTSPACE 1744 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1745 #ifdef FLIP_SIDED 1746 normal = - normal; 1747 #endif 1748 #ifdef DOUBLE_SIDED 1749 normal = normal * faceDirection; 1750 #endif 1751 normal = normalize( normalMatrix * normal ); 1752#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1753 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1754 mapN.xy *= normalScale; 1755 normal = normalize( tbn * mapN ); 1756#elif defined( USE_BUMPMAP )
1757 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1758#endif`,bF=`#ifndef FLAT_SHADED 1759 varying vec3 vNormal; 1760 #ifdef USE_TANGENT 1761 varying vec3 vTangent; 1762 varying vec3 vBitangent; 1763 #endif 1764#endif`,SF=`#ifndef FLAT_SHADED 1765 varying vec3 vNormal; 1766 #ifdef USE_TANGENT 1767 varying vec3 vTangent; 1768 varying vec3 vBitangent; 1769 #endif 1770#endif`,MF=`#ifndef FLAT_SHADED 1771 vNormal = normalize( transformedNormal ); 1772 #ifdef USE_TANGENT 1773 vTangent = normalize( transformedTangent ); 1774 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1775 #endif 1776#endif`,EF=`#ifdef USE_NORMALMAP 1777 uniform sampler2D normalMap; 1778 uniform vec2 normalScale; 1779#endif 1780#ifdef USE_NORMALMAP_OBJECTSPACE 1781 uniform mat3 normalMatrix; 1782#endif 1783#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1784 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1785 vec3 q0 = dFdx( eye_pos.xyz ); 1786 vec3 q1 = dFdy( eye_pos.xyz ); 1787 vec2 st0 = dFdx( uv.st ); 1788 vec2 st1 = dFdy( uv.st ); 1789 vec3 N = surf_norm; 1790 vec3 q1perp = cross( q1, N ); 1791 vec3 q0perp = cross( N, q0 ); 1792 vec3 T = q1perp * st0.x + q0perp * st1.x; 1793 vec3 B = q1perp * st0.y + q0perp * st1.y; 1794 float det = max( dot( T, T ), dot( B, B ) ); 1795 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1796 return mat3( T * scale, B * scale, N ); 1797 } 1798#endif`,TF=`#ifdef USE_CLEARCOAT 1799 vec3 clearcoatNormal = nonPerturbedNormal; 1800#endif`,AF=`#ifdef USE_CLEARCOAT_NORMALMAP 1801 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1802 clearcoatMapN.xy *= clearcoatNormalScale; 1803 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1804#endif`,wF=`#ifdef USE_CLEARCOATMAP 1805 uniform sampler2D clearcoatMap; 1806#endif 1807#ifdef USE_CLEARCOAT_NORMALMAP 1808 uniform sampler2D clearcoatNormalMap; 1809 uniform vec2 clearcoatNormalScale; 1810#endif 1811#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1812 uniform sampler2D clearcoatRoughnessMap; 1813#endif`,CF=`#ifdef USE_IRIDESCENCEMAP 1814 uniform sampler2D iridescenceMap; 1815#endif 1816#ifdef USE_IRIDESCENCE_THICKNESSMAP 1817 uniform sampler2D iridescenceThicknessMap; 1818#endif`,RF=`#ifdef OPAQUE 1819diffuseColor.a = 1.0; 1820#endif 1821#ifdef USE_TRANSMISSION 1822diffuseColor.a *= material.transmissionAlpha; 1823#endif 1824gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,DF=`vec3 packNormalToRGB( const in vec3 normal ) { 1825 return normalize( normal ) * 0.5 + 0.5; 1826} 1827vec3 unpackRGBToNormal( const in vec3 rgb ) { 1828 return 2.0 * rgb.xyz - 1.0; 1829} 1830const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 1831const float Inv255 = 1. / 255.; 1832const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 1833const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 1834const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 1835const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 1836vec4 packDepthToRGBA( const in float v ) { 1837 if( v <= 0.0 ) 1838 return vec4( 0., 0., 0., 0. ); 1839 if( v >= 1.0 ) 1840 return vec4( 1., 1., 1., 1. ); 1841 float vuf; 1842 float af = modf( v * PackFactors.a, vuf ); 1843 float bf = modf( vuf * ShiftRight8, vuf ); 1844 float gf = modf( vuf * ShiftRight8, vuf ); 1845 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 1846} 1847vec3 packDepthToRGB( const in float v ) { 1848 if( v <= 0.0 ) 1849 return vec3( 0., 0., 0. ); 1850 if( v >= 1.0 ) 1851 return vec3( 1., 1., 1. ); 1852 float vuf; 1853 float bf = modf( v * PackFactors.b, vuf ); 1854 float gf = modf( vuf * ShiftRight8, vuf ); 1855 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 1856} 1857vec2 packDepthToRG( const in float v ) { 1858 if( v <= 0.0 ) 1859 return vec2( 0., 0. ); 1860 if( v >= 1.0 ) 1861 return vec2( 1., 1. ); 1862 float vuf; 1863 float gf = modf( v * 256., vuf ); 1864 return vec2( vuf * Inv255, gf ); 1865} 1866float unpackRGBAToDepth( const in vec4 v ) { 1867 return dot( v, UnpackFactors4 ); 1868} 1869float unpackRGBToDepth( const in vec3 v ) { 1870 return dot( v, UnpackFactors3 ); 1871} 1872float unpackRGToDepth( const in vec2 v ) { 1873 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 1874} 1875vec4 pack2HalfToRGBA( const in vec2 v ) {
1876 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1877 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1878} 1879vec2 unpackRGBATo2Half( const in vec4 v ) { 1880 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1881} 1882float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1883 return ( viewZ + near ) / ( near - far ); 1884} 1885float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1886 return depth * ( near - far ) - near; 1887} 1888float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1889 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1890} 1891float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1892 return ( near * far ) / ( ( far - near ) * depth - far ); 1893}`,NF=`#ifdef PREMULTIPLIED_ALPHA 1894 gl_FragColor.rgb *= gl_FragColor.a; 1895#endif`,LF=`vec4 mvPosition = vec4( transformed, 1.0 ); 1896#ifdef USE_BATCHING 1897 mvPosition = batchingMatrix * mvPosition; 1898#endif 1899#ifdef USE_INSTANCING 1900 mvPosition = instanceMatrix * mvPosition; 1901#endif 1902mvPosition = modelViewMatrix * mvPosition; 1903gl_Position = projectionMatrix * mvPosition;`,PF=`#ifdef DITHERING 1904 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1905#endif`,UF=`#ifdef DITHERING 1906 vec3 dithering( vec3 color ) { 1907 float grid_position = rand( gl_FragCoord.xy ); 1908 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1909 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1910 return color + dither_shift_RGB; 1911 } 1912#endif`,OF=`float roughnessFactor = roughness; 1913#ifdef USE_ROUGHNESSMAP 1914 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1915 roughnessFactor *= texelRoughness.g; 1916#endif`,FF=`#ifdef USE_ROUGHNESSMAP 1917 uniform sampler2D roughnessMap; 1918#endif`,IF=`#if NUM_SPOT_LIGHT_COORDS > 0 1919 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1920#endif 1921#if NUM_SPOT_LIGHT_MAPS > 0 1922 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1923#endif 1924#ifdef USE_SHADOWMAP 1925 #if NUM_DIR_LIGHT_SHADOWS > 0 1926 #if defined( SHADOWMAP_TYPE_PCF ) 1927 uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1928 #else 1929 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1930 #endif 1931 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1932 struct DirectionalLightShadow { 1933 float shadowIntensity; 1934 float shadowBias; 1935 float shadowNormalBias; 1936 float shadowRadius; 1937 vec2 shadowMapSize; 1938 }; 1939 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1940 #endif 1941 #if NUM_SPOT_LIGHT_SHADOWS > 0 1942 #if defined( SHADOWMAP_TYPE_PCF ) 1943 uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1944 #else 1945 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1946 #endif 1947 struct SpotLightShadow { 1948 float shadowIntensity; 1949 float shadowBias; 1950 float shadowNormalBias; 1951 float shadowRadius; 1952 vec2 shadowMapSize; 1953 }; 1954 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1955 #endif 1956 #if NUM_POINT_LIGHT_SHADOWS > 0 1957 #if defined( SHADOWMAP_TYPE_PCF ) 1958 uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1959 #elif defined( SHADOWMAP_TYPE_BASIC ) 1960 uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1961 #endif 1962 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1963 struct PointLightShadow { 1964 float shadowIntensity; 1965 float shadowBias; 1966 float shadowNormalBias; 1967 float shadowRadius; 1968 vec2 shadowMapSize; 1969 float shadowCameraNear; 1970 float shadowCameraFar; 1971 }; 1972 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1973 #endif 1974 #if defined( SHADOWMAP_TYPE_PCF ) 1975 float interleavedGradientNoise( vec2 position ) { 1976 return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); 1977 } 1978 vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { 1979 const float goldenAngle = 2.399963229728653; 1980 float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); 1981 float theta = float( sampleIndex ) * goldenAngle + phi; 1982 return vec2( cos( theta ), sin( theta ) ) * r; 1983 } 1984 #endif 1985 #if defined( SHADOWMAP_TYPE_PCF ) 1986 float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1987 float shadow = 1.0; 1988 shadowCoord.xyz /= shadowCoord.w; 1989 shadowCoord.z += shadowBias; 1990 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1991 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1992 if ( frustumTest ) { 1993 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1994 float radius = shadowRadius * texelSize.x; 1995 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718; 1996 shadow = ( 1997 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + 1998 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + 1999 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + 2000 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + 2001 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) 2002 ) * 0.2; 2003 } 2004 return mix( 1.0, shadow, shadowIntensity ); 2005 } 2006 #elif defined( SHADOWMAP_TYPE_VSM ) 2007 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 2008 float shadow = 1.0; 2009 shadowCoord.xyz /= shadowCoord.w; 2010 shadowCoord.z += shadowBias; 2011 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 2012 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 2013 if ( frustumTest ) { 2014 vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; 2015 float mean = distribution.x; 2016 float variance = distribution.y * distribution.y; 2017 #ifdef USE_REVERSED_DEPTH_BUFFER 2018 float hard_shadow = step( mean, shadowCoord.z ); 2019 #else 2020 float hard_shadow = step( shadowCoord.z, mean ); 2021 #endif 2022 if ( hard_shadow == 1.0 ) { 2023 shadow = 1.0; 2024 } else { 2025 variance = max( variance, 0.0000001 ); 2026 float d = shadowCoord.z - mean; 2027 float p_max = variance / ( variance + d * d ); 2028 p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); 2029 shadow = max( hard_shadow, p_max ); 2030 } 2031 } 2032 return mix( 1.0, shadow, shadowIntensity ); 2033 } 2034 #else 2035 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 2036 float shadow = 1.0; 2037 shadowCoord.xyz /= shadowCoord.w; 2038 shadowCoord.z += shadowBias; 2039 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 2040 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 2041 if ( frustumTest ) { 2042 float depth = texture2D( shadowMap, shadowCoord.xy ).r; 2043 #ifdef USE_REVERSED_DEPTH_BUFFER 2044 shadow = step( depth, shadowCoord.z ); 2045 #else 2046 shadow = step( shadowCoord.z, depth ); 2047 #endif 2048 } 2049 return mix( 1.0, shadow, shadowIntensity ); 2050 } 2051 #endif 2052 #if NUM_POINT_LIGHT_SHADOWS > 0 2053 #if defined( SHADOWMAP_TYPE_PCF ) 2054 float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 2055 float shadow = 1.0; 2056 vec3 lightToPosition = shadowCoord.xyz; 2057 vec3 bd3D = normalize( lightToPosition ); 2058 vec3 absVec = abs( lightToPosition ); 2059 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 2060 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 2061 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 2062 dp += shadowBias; 2063 float texelSize = shadowRadius / shadowMapSize.x; 2064 vec3 absDir = abs( bd3D ); 2065 vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); 2066 tangent = normalize( cross( bd3D, tangent ) ); 2067 vec3 bitangent = cross( bd3D, tangent ); 2068 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718; 2069 shadow = ( 2070 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) + 2071 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) + 2072 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) + 2073 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) + 2074 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) ) 2075 ) * 0.2; 2076 } 2077 return mix( 1.0, shadow, shadowIntensity ); 2078 } 2079 #elif defined( SHADOWMAP_TYPE_BASIC ) 2080 float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 2081 float shadow = 1.0; 2082 vec3 lightToPosition = shadowCoord.xyz; 2083 vec3 bd3D = normalize( lightToPosition ); 2084 vec3 absVec = abs( lightToPosition ); 2085 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 2086 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 2087 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 2088 dp += shadowBias; 2089 float depth = textureCube( shadowMap, bd3D ).r; 2090 #ifdef USE_REVERSED_DEPTH_BUFFER 2091 shadow = step( depth, dp ); 2092 #else 2093 shadow = step( dp, depth ); 2094 #endif 2095 } 2096 return mix( 1.0, shadow, shadowIntensity ); 2097 } 2098 #endif 2099 #endif
2100#endif`,zF=`#if NUM_SPOT_LIGHT_COORDS > 0 2101 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 2102 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 2103#endif 2104#ifdef USE_SHADOWMAP 2105 #if NUM_DIR_LIGHT_SHADOWS > 0 2106 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 2107 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 2108 struct DirectionalLightShadow { 2109 float shadowIntensity; 2110 float shadowBias; 2111 float shadowNormalBias; 2112 float shadowRadius; 2113 vec2 shadowMapSize; 2114 }; 2115 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 2116 #endif 2117 #if NUM_SPOT_LIGHT_SHADOWS > 0 2118 struct SpotLightShadow { 2119 float shadowIntensity; 2120 float shadowBias; 2121 float shadowNormalBias; 2122 float shadowRadius; 2123 vec2 shadowMapSize; 2124 }; 2125 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 2126 #endif 2127 #if NUM_POINT_LIGHT_SHADOWS > 0 2128 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 2129 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 2130 struct PointLightShadow { 2131 float shadowIntensity; 2132 float shadowBias; 2133 float shadowNormalBias; 2134 float shadowRadius; 2135 vec2 shadowMapSize; 2136 float shadowCameraNear; 2137 float shadowCameraFar; 2138 }; 2139 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 2140 #endif 2141#endif`,BF=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 2142 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 2143 vec4 shadowWorldPosition; 2144#endif 2145#if defined( USE_SHADOWMAP ) 2146 #if NUM_DIR_LIGHT_SHADOWS > 0 2147 #pragma unroll_loop_start 2148 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2149 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 2150 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 2151 } 2152 #pragma unroll_loop_end 2153 #endif 2154 #if NUM_POINT_LIGHT_SHADOWS > 0 2155 #pragma unroll_loop_start 2156 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2157 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 2158 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 2159 } 2160 #pragma unroll_loop_end 2161 #endif 2162#endif 2163#if NUM_SPOT_LIGHT_COORDS > 0 2164 #pragma unroll_loop_start 2165 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 2166 shadowWorldPosition = worldPosition; 2167 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 2168 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 2169 #endif 2170 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 2171 } 2172 #pragma unroll_loop_end 2173#endif`,VF=`float getShadowMask() { 2174 float shadow = 1.0; 2175 #ifdef USE_SHADOWMAP 2176 #if NUM_DIR_LIGHT_SHADOWS > 0 2177 DirectionalLightShadow directionalLight; 2178 #pragma unroll_loop_start 2179 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2180 directionalLight = directionalLightShadows[ i ]; 2181 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2182 } 2183 #pragma unroll_loop_end 2184 #endif 2185 #if NUM_SPOT_LIGHT_SHADOWS > 0 2186 SpotLightShadow spotLight; 2187 #pragma unroll_loop_start 2188 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2189 spotLight = spotLightShadows[ i ]; 2190 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2191 } 2192 #pragma unroll_loop_end 2193 #endif 2194 #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 2195 PointLightShadow pointLight; 2196 #pragma unroll_loop_start 2197 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2198 pointLight = pointLightShadows[ i ]; 2199 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2200 } 2201 #pragma unroll_loop_end 2202 #endif 2203 #endif 2204 return shadow; 2205}`,HF=`#ifdef USE_SKINNING 2206 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2207 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2208 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2209 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2210#endif`,kF=`#ifdef USE_SKINNING 2211 uniform mat4 bindMatrix; 2212 uniform mat4 bindMatrixInverse; 2213 uniform highp sampler2D boneTexture; 2214 mat4 getBoneMatrix( const in float i ) { 2215 int size = textureSize( boneTexture, 0 ).x; 2216 int j = int( i ) * 4; 2217 int x = j % size; 2218 int y = j / size; 2219 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2220 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2221 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2222 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2223 return mat4( v1, v2, v3, v4 ); 2224 } 2225#endif`,GF=`#ifdef USE_SKINNING 2226 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2227 vec4 skinned = vec4( 0.0 ); 2228 skinned += boneMatX * skinVertex * skinWeight.x; 2229 skinned += boneMatY * skinVertex * skinWeight.y; 2230 skinned += boneMatZ * skinVertex * skinWeight.z; 2231 skinned += boneMatW * skinVertex * skinWeight.w; 2232 transformed = ( bindMatrixInverse * skinned ).xyz; 2233#endif`,jF=`#ifdef USE_SKINNING 2234 mat4 skinMatrix = mat4( 0.0 ); 2235 skinMatrix += skinWeight.x * boneMatX; 2236 skinMatrix += skinWeight.y * boneMatY; 2237 skinMatrix += skinWeight.z * boneMatZ; 2238 skinMatrix += skinWeight.w * boneMatW; 2239 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2240 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2241 #ifdef USE_TANGENT 2242 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2243 #endif 2244#endif`,WF=`float specularStrength; 2245#ifdef USE_SPECULARMAP 2246 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2247 specularStrength = texelSpecular.r; 2248#else 2249 specularStrength = 1.0; 2250#endif`,XF=`#ifdef USE_SPECULARMAP 2251 uniform sampler2D specularMap; 2252#endif`,YF=`#if defined( TONE_MAPPING ) 2253 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2254#endif`,qF=`#ifndef saturate 2255#define saturate( a ) clamp( a, 0.0, 1.0 ) 2256#endif 2257uniform float toneMappingExposure; 2258vec3 LinearToneMapping( vec3 color ) { 2259 return saturate( toneMappingExposure * color ); 2260} 2261vec3 ReinhardToneMapping( vec3 color ) { 2262 color *= toneMappingExposure; 2263 return saturate( color / ( vec3( 1.0 ) + color ) ); 2264} 2265vec3 CineonToneMapping( vec3 color ) { 2266 color *= toneMappingExposure; 2267 color = max( vec3( 0.0 ), color - 0.004 ); 2268 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2269} 2270vec3 RRTAndODTFit( vec3 v ) { 2271 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2272 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2273 return a / b; 2274} 2275vec3 ACESFilmicToneMapping( vec3 color ) { 2276 const mat3 ACESInputMat = mat3( 2277 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2278 vec3( 0.04823, 0.01566, 0.83777 ) 2279 ); 2280 const mat3 ACESOutputMat = mat3( 2281 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2282 vec3( -0.07367, -0.00605, 1.07602 ) 2283 ); 2284 color *= toneMappingExposure / 0.6; 2285 color = ACESInputMat * color; 2286 color = RRTAndODTFit( color ); 2287 color = ACESOutputMat * color; 2288 return saturate( color ); 2289} 2290const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2291 vec3( 1.6605, - 0.1246, - 0.0182 ), 2292 vec3( - 0.5876, 1.1329, - 0.1006 ), 2293 vec3( - 0.0728, - 0.0083, 1.1187 ) 2294); 2295const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2296 vec3( 0.6274, 0.0691, 0.0164 ), 2297 vec3( 0.3293, 0.9195, 0.0880 ), 2298 vec3( 0.0433, 0.0113, 0.8956 ) 2299); 2300vec3 agxDefaultContrastApprox( vec3 x ) { 2301 vec3 x2 = x * x; 2302 vec3 x4 = x2 * x2; 2303 return + 15.5 * x4 * x2 2304 - 40.14 * x4 * x 2305 + 31.96 * x4 2306 - 6.868 * x2 * x 2307 + 0.4298 * x2 2308 + 0.1191 * x 2309 - 0.00232; 2310} 2311vec3 AgXToneMapping( vec3 color ) { 2312 const mat3 AgXInsetMatrix = mat3( 2313 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2314 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2315 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2316 );
2317 const mat3 AgXOutsetMatrix = mat3( 2318 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2319 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2320 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2321 ); 2322 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2323 color *= toneMappingExposure; 2324 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2325 color = AgXInsetMatrix * color; 2326 color = max( color, 1e-10 ); color = log2( color ); 2327 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2328 color = clamp( color, 0.0, 1.0 ); 2329 color = agxDefaultContrastApprox( color ); 2330 color = AgXOutsetMatrix * color; 2331 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2332 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2333 color = clamp( color, 0.0, 1.0 ); 2334 return color; 2335} 2336vec3 NeutralToneMapping( vec3 color ) { 2337 const float StartCompression = 0.8 - 0.04; 2338 const float Desaturation = 0.15; 2339 color *= toneMappingExposure; 2340 float x = min( color.r, min( color.g, color.b ) ); 2341 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2342 color -= offset; 2343 float peak = max( color.r, max( color.g, color.b ) ); 2344 if ( peak < StartCompression ) return color; 2345 float d = 1. - StartCompression; 2346 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2347 color *= newPeak / peak; 2348 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2349 return mix( color, vec3( newPeak ), g ); 2350} 2351vec3 CustomToneMapping( vec3 color ) { return color; }`,ZF=`#ifdef USE_TRANSMISSION 2352 material.transmission = transmission; 2353 material.transmissionAlpha = 1.0; 2354 material.thickness = thickness; 2355 material.attenuationDistance = attenuationDistance; 2356 material.attenuationColor = attenuationColor; 2357 #ifdef USE_TRANSMISSIONMAP 2358 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2359 #endif 2360 #ifdef USE_THICKNESSMAP 2361 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2362 #endif 2363 vec3 pos = vWorldPosition; 2364 vec3 v = normalize( cameraPosition - pos ); 2365 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2366 vec4 transmitted = getIBLVolumeRefraction( 2367 n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, 2368 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2369 material.attenuationColor, material.attenuationDistance ); 2370 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2371 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2372#endif`,KF=`#ifdef USE_TRANSMISSION 2373 uniform float transmission; 2374 uniform float thickness; 2375 uniform float attenuationDistance; 2376 uniform vec3 attenuationColor; 2377 #ifdef USE_TRANSMISSIONMAP 2378 uniform sampler2D transmissionMap; 2379 #endif 2380 #ifdef USE_THICKNESSMAP 2381 uniform sampler2D thicknessMap; 2382 #endif 2383 uniform vec2 transmissionSamplerSize; 2384 uniform sampler2D transmissionSamplerMap; 2385 uniform mat4 modelMatrix; 2386 uniform mat4 projectionMatrix; 2387 varying vec3 vWorldPosition; 2388 float w0( float a ) { 2389 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2390 } 2391 float w1( float a ) { 2392 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2393 } 2394 float w2( float a ){ 2395 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2396 } 2397 float w3( float a ) { 2398 return ( 1.0 / 6.0 ) * ( a * a * a ); 2399 } 2400 float g0( float a ) { 2401 return w0( a ) + w1( a ); 2402 } 2403 float g1( float a ) { 2404 return w2( a ) + w3( a ); 2405 } 2406 float h0( float a ) { 2407 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2408 } 2409 float h1( float a ) { 2410 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2411 } 2412 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2413 uv = uv * texelSize.zw + 0.5; 2414 vec2 iuv = floor( uv ); 2415 vec2 fuv = fract( uv ); 2416 float g0x = g0( fuv.x ); 2417 float g1x = g1( fuv.x ); 2418 float h0x = h0( fuv.x ); 2419 float h1x = h1( fuv.x ); 2420 float h0y = h0( fuv.y ); 2421 float h1y = h1( fuv.y ); 2422 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2423 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2424 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2425 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2426 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2427 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2428 } 2429 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2430 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2431 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2432 vec2 fLodSizeInv = 1.0 / fLodSize; 2433 vec2 cLodSizeInv = 1.0 / cLodSize; 2434 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2435 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2436 return mix( fSample, cSample, fract( lod ) ); 2437 } 2438 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2439 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2440 vec3 modelScale; 2441 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2442 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2443 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2444 return normalize( refractionVector ) * thickness * modelScale; 2445 } 2446 float applyIorToRoughness( const in float roughness, const in float ior ) { 2447 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2448 } 2449 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2450 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2451 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2452 } 2453 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2454 if ( isinf( attenuationDistance ) ) { 2455 return vec3( 1.0 ); 2456 } else { 2457 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2458 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2459 } 2460 } 2461 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2462 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2463 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2464 const in vec3 attenuationColor, const in float attenuationDistance ) { 2465 vec4 transmittedLight; 2466 vec3 transmittance; 2467 #ifdef USE_DISPERSION 2468 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2469 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2470 for ( int i = 0; i < 3; i ++ ) { 2471 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2472 vec3 refractedRayExit = position + transmissionRay; 2473 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2474 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2475 refractionCoords += 1.0; 2476 refractionCoords /= 2.0; 2477 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2478 transmittedLight[ i ] = transmissionSample[ i ]; 2479 transmittedLight.a += transmissionSample.a; 2480 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2481 } 2482 transmittedLight.a /= 3.0; 2483 #else 2484 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2485 vec3 refractedRayExit = position + transmissionRay; 2486 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2487 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2488 refractionCoords += 1.0; 2489 refractionCoords /= 2.0; 2490 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2491 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2492 #endif 2493 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2494 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2495 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2496 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2497 } 2498#endif`,QF=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2499 varying vec2 vUv; 2500#endif 2501#ifdef USE_MAP 2502 varying vec2 vMapUv; 2503#endif 2504#ifdef USE_ALPHAMAP
2505 varying vec2 vAlphaMapUv; 2506#endif 2507#ifdef USE_LIGHTMAP 2508 varying vec2 vLightMapUv; 2509#endif 2510#ifdef USE_AOMAP 2511 varying vec2 vAoMapUv; 2512#endif 2513#ifdef USE_BUMPMAP 2514 varying vec2 vBumpMapUv; 2515#endif 2516#ifdef USE_NORMALMAP 2517 varying vec2 vNormalMapUv; 2518#endif 2519#ifdef USE_EMISSIVEMAP 2520 varying vec2 vEmissiveMapUv; 2521#endif 2522#ifdef USE_METALNESSMAP 2523 varying vec2 vMetalnessMapUv; 2524#endif 2525#ifdef USE_ROUGHNESSMAP 2526 varying vec2 vRoughnessMapUv; 2527#endif 2528#ifdef USE_ANISOTROPYMAP 2529 varying vec2 vAnisotropyMapUv; 2530#endif 2531#ifdef USE_CLEARCOATMAP 2532 varying vec2 vClearcoatMapUv; 2533#endif 2534#ifdef USE_CLEARCOAT_NORMALMAP 2535 varying vec2 vClearcoatNormalMapUv; 2536#endif 2537#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2538 varying vec2 vClearcoatRoughnessMapUv; 2539#endif 2540#ifdef USE_IRIDESCENCEMAP 2541 varying vec2 vIridescenceMapUv; 2542#endif 2543#ifdef USE_IRIDESCENCE_THICKNESSMAP 2544 varying vec2 vIridescenceThicknessMapUv; 2545#endif 2546#ifdef USE_SHEEN_COLORMAP 2547 varying vec2 vSheenColorMapUv; 2548#endif 2549#ifdef USE_SHEEN_ROUGHNESSMAP 2550 varying vec2 vSheenRoughnessMapUv; 2551#endif 2552#ifdef USE_SPECULARMAP 2553 varying vec2 vSpecularMapUv; 2554#endif 2555#ifdef USE_SPECULAR_COLORMAP 2556 varying vec2 vSpecularColorMapUv; 2557#endif 2558#ifdef USE_SPECULAR_INTENSITYMAP 2559 varying vec2 vSpecularIntensityMapUv; 2560#endif 2561#ifdef USE_TRANSMISSIONMAP 2562 uniform mat3 transmissionMapTransform; 2563 varying vec2 vTransmissionMapUv; 2564#endif 2565#ifdef USE_THICKNESSMAP 2566 uniform mat3 thicknessMapTransform; 2567 varying vec2 vThicknessMapUv; 2568#endif`,JF=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2569 varying vec2 vUv; 2570#endif 2571#ifdef USE_MAP 2572 uniform mat3 mapTransform; 2573 varying vec2 vMapUv; 2574#endif 2575#ifdef USE_ALPHAMAP 2576 uniform mat3 alphaMapTransform; 2577 varying vec2 vAlphaMapUv; 2578#endif 2579#ifdef USE_LIGHTMAP 2580 uniform mat3 lightMapTransform; 2581 varying vec2 vLightMapUv; 2582#endif 2583#ifdef USE_AOMAP 2584 uniform mat3 aoMapTransform; 2585 varying vec2 vAoMapUv; 2586#endif 2587#ifdef USE_BUMPMAP 2588 uniform mat3 bumpMapTransform; 2589 varying vec2 vBumpMapUv; 2590#endif 2591#ifdef USE_NORMALMAP 2592 uniform mat3 normalMapTransform; 2593 varying vec2 vNormalMapUv; 2594#endif 2595#ifdef USE_DISPLACEMENTMAP 2596 uniform mat3 displacementMapTransform; 2597 varying vec2 vDisplacementMapUv; 2598#endif 2599#ifdef USE_EMISSIVEMAP 2600 uniform mat3 emissiveMapTransform; 2601 varying vec2 vEmissiveMapUv; 2602#endif 2603#ifdef USE_METALNESSMAP 2604 uniform mat3 metalnessMapTransform; 2605 varying vec2 vMetalnessMapUv; 2606#endif 2607#ifdef USE_ROUGHNESSMAP 2608 uniform mat3 roughnessMapTransform; 2609 varying vec2 vRoughnessMapUv; 2610#endif 2611#ifdef USE_ANISOTROPYMAP 2612 uniform mat3 anisotropyMapTransform; 2613 varying vec2 vAnisotropyMapUv; 2614#endif 2615#ifdef USE_CLEARCOATMAP 2616 uniform mat3 clearcoatMapTransform; 2617 varying vec2 vClearcoatMapUv; 2618#endif 2619#ifdef USE_CLEARCOAT_NORMALMAP 2620 uniform mat3 clearcoatNormalMapTransform; 2621 varying vec2 vClearcoatNormalMapUv; 2622#endif 2623#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2624 uniform mat3 clearcoatRoughnessMapTransform; 2625 varying vec2 vClearcoatRoughnessMapUv; 2626#endif 2627#ifdef USE_SHEEN_COLORMAP 2628 uniform mat3 sheenColorMapTransform; 2629 varying vec2 vSheenColorMapUv; 2630#endif 2631#ifdef USE_SHEEN_ROUGHNESSMAP 2632 uniform mat3 sheenRoughnessMapTransform; 2633 varying vec2 vSheenRoughnessMapUv; 2634#endif 2635#ifdef USE_IRIDESCENCEMAP 2636 uniform mat3 iridescenceMapTransform; 2637 varying vec2 vIridescenceMapUv; 2638#endif 2639#ifdef USE_IRIDESCENCE_THICKNESSMAP 2640 uniform mat3 iridescenceThicknessMapTransform; 2641 varying vec2 vIridescenceThicknessMapUv; 2642#endif 2643#ifdef USE_SPECULARMAP 2644 uniform mat3 specularMapTransform; 2645 varying vec2 vSpecularMapUv; 2646#endif 2647#ifdef USE_SPECULAR_COLORMAP 2648 uniform mat3 specularColorMapTransform; 2649 varying vec2 vSpecularColorMapUv; 2650#endif 2651#ifdef USE_SPECULAR_INTENSITYMAP 2652 uniform mat3 specularIntensityMapTransform; 2653 varying vec2 vSpecularIntensityMapUv; 2654#endif 2655#ifdef USE_TRANSMISSIONMAP 2656 uniform mat3 transmissionMapTransform; 2657 varying vec2 vTransmissionMapUv; 2658#endif 2659#ifdef USE_THICKNESSMAP 2660 uniform mat3 thicknessMapTransform; 2661 varying vec2 vThicknessMapUv; 2662#endif`,$F=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2663 vUv = vec3( uv, 1 ).xy; 2664#endif 2665#ifdef USE_MAP 2666 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2667#endif 2668#ifdef USE_ALPHAMAP 2669 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2670#endif 2671#ifdef USE_LIGHTMAP 2672 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2673#endif 2674#ifdef USE_AOMAP 2675 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2676#endif 2677#ifdef USE_BUMPMAP 2678 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2679#endif 2680#ifdef USE_NORMALMAP 2681 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2682#endif 2683#ifdef USE_DISPLACEMENTMAP 2684 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2685#endif 2686#ifdef USE_EMISSIVEMAP 2687 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2688#endif 2689#ifdef USE_METALNESSMAP 2690 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2691#endif 2692#ifdef USE_ROUGHNESSMAP 2693 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2694#endif 2695#ifdef USE_ANISOTROPYMAP 2696 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2697#endif 2698#ifdef USE_CLEARCOATMAP 2699 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2700#endif 2701#ifdef USE_CLEARCOAT_NORMALMAP 2702 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2703#endif 2704#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2705 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2706#endif
2707#ifdef USE_IRIDESCENCEMAP 2708 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2709#endif 2710#ifdef USE_IRIDESCENCE_THICKNESSMAP 2711 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2712#endif 2713#ifdef USE_SHEEN_COLORMAP 2714 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2715#endif 2716#ifdef USE_SHEEN_ROUGHNESSMAP 2717 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2718#endif 2719#ifdef USE_SPECULARMAP 2720 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2721#endif 2722#ifdef USE_SPECULAR_COLORMAP 2723 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2724#endif 2725#ifdef USE_SPECULAR_INTENSITYMAP 2726 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2727#endif 2728#ifdef USE_TRANSMISSIONMAP 2729 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2730#endif 2731#ifdef USE_THICKNESSMAP 2732 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2733#endif`,tI=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2734 vec4 worldPosition = vec4( transformed, 1.0 ); 2735 #ifdef USE_BATCHING 2736 worldPosition = batchingMatrix * worldPosition; 2737 #endif 2738 #ifdef USE_INSTANCING 2739 worldPosition = instanceMatrix * worldPosition; 2740 #endif 2741 worldPosition = modelMatrix * worldPosition; 2742#endif`;const eI=`varying vec2 vUv; 2743uniform mat3 uvTransform; 2744void main() { 2745 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2746 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2747}`,nI=`uniform sampler2D t2D; 2748uniform float backgroundIntensity; 2749varying vec2 vUv; 2750void main() { 2751 vec4 texColor = texture2D( t2D, vUv ); 2752 #ifdef DECODE_VIDEO_TEXTURE 2753 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 ); 2754 #endif 2755 texColor.rgb *= backgroundIntensity; 2756 gl_FragColor = texColor; 2757 #include <tonemapping_fragment> 2758 #include <colorspace_fragment> 2759}`,iI=`varying vec3 vWorldDirection; 2760#include <common> 2761void main() { 2762 vWorldDirection = transformDirection( position, modelMatrix ); 2763 #include <begin_vertex> 2764 #include <project_vertex> 2765 gl_Position.z = gl_Position.w; 2766}`,sI=`#ifdef ENVMAP_TYPE_CUBE 2767 uniform samplerCube envMap; 2768#elif defined( ENVMAP_TYPE_CUBE_UV ) 2769 uniform sampler2D envMap; 2770#endif 2771uniform float flipEnvMap; 2772uniform float backgroundBlurriness; 2773uniform float backgroundIntensity; 2774uniform mat3 backgroundRotation; 2775varying vec3 vWorldDirection; 2776#include <cube_uv_reflection_fragment> 2777void main() { 2778 #ifdef ENVMAP_TYPE_CUBE 2779 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2780 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2781 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2782 #else 2783 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2784 #endif 2785 texColor.rgb *= backgroundIntensity; 2786 gl_FragColor = texColor; 2787 #include <tonemapping_fragment> 2788 #include <colorspace_fragment> 2789}`,aI=`varying vec3 vWorldDirection; 2790#include <common> 2791void main() { 2792 vWorldDirection = transformDirection( position, modelMatrix ); 2793 #include <begin_vertex> 2794 #include <project_vertex> 2795 gl_Position.z = gl_Position.w; 2796}`,rI=`uniform samplerCube tCube; 2797uniform float tFlip; 2798uniform float opacity; 2799varying vec3 vWorldDirection; 2800void main() { 2801 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2802 gl_FragColor = texColor; 2803 gl_FragColor.a *= opacity; 2804 #include <tonemapping_fragment> 2805 #include <colorspace_fragment> 2806}`,oI=`#include <common> 2807#include <batching_pars_vertex> 2808#include <uv_pars_vertex> 2809#include <displacementmap_pars_vertex> 2810#include <morphtarget_pars_vertex> 2811#include <skinning_pars_vertex> 2812#include <logdepthbuf_pars_vertex> 2813#include <clipping_planes_pars_vertex> 2814varying vec2 vHighPrecisionZW; 2815void main() { 2816 #include <uv_vertex> 2817 #include <batching_vertex> 2818 #include <skinbase_vertex> 2819 #include <morphinstance_vertex> 2820 #ifdef USE_DISPLACEMENTMAP 2821 #include <beginnormal_vertex> 2822 #include <morphnormal_vertex> 2823 #include <skinnormal_vertex> 2824 #endif 2825 #include <begin_vertex> 2826 #include <morphtarget_vertex> 2827 #include <skinning_vertex> 2828 #include <displacementmap_vertex> 2829 #include <project_vertex> 2830 #include <logdepthbuf_vertex> 2831 #include <clipping_planes_vertex> 2832 vHighPrecisionZW = gl_Position.zw; 2833}`,lI=`#if DEPTH_PACKING == 3200 2834 uniform float opacity; 2835#endif 2836#include <common> 2837#include <packing> 2838#include <uv_pars_fragment> 2839#include <map_pars_fragment> 2840#include <alphamap_pars_fragment> 2841#include <alphatest_pars_fragment> 2842#include <alphahash_pars_fragment> 2843#include <logdepthbuf_pars_fragment> 2844#include <clipping_planes_pars_fragment> 2845varying vec2 vHighPrecisionZW; 2846void main() { 2847 vec4 diffuseColor = vec4( 1.0 ); 2848 #include <clipping_planes_fragment> 2849 #if DEPTH_PACKING == 3200 2850 diffuseColor.a = opacity; 2851 #endif 2852 #include <map_fragment> 2853 #include <alphamap_fragment> 2854 #include <alphatest_fragment> 2855 #include <alphahash_fragment> 2856 #include <logdepthbuf_fragment> 2857 #ifdef USE_REVERSED_DEPTH_BUFFER 2858 float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; 2859 #else 2860 float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; 2861 #endif 2862 #if DEPTH_PACKING == 3200 2863 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2864 #elif DEPTH_PACKING == 3201 2865 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2866 #elif DEPTH_PACKING == 3202 2867 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 2868 #elif DEPTH_PACKING == 3203 2869 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 2870 #endif 2871}`,cI=`#define DISTANCE 2872varying vec3 vWorldPosition; 2873#include <common> 2874#include <batching_pars_vertex> 2875#include <uv_pars_vertex> 2876#include <displacementmap_pars_vertex> 2877#include <morphtarget_pars_vertex> 2878#include <skinning_pars_vertex> 2879#include <clipping_planes_pars_vertex> 2880void main() { 2881 #include <uv_vertex> 2882 #include <batching_vertex> 2883 #include <skinbase_vertex> 2884 #include <morphinstance_vertex> 2885 #ifdef USE_DISPLACEMENTMAP 2886 #include <beginnormal_vertex> 2887 #include <morphnormal_vertex> 2888 #include <skinnormal_vertex> 2889 #endif 2890 #include <begin_vertex> 2891 #include <morphtarget_vertex> 2892 #include <skinning_vertex> 2893 #include <displacementmap_vertex> 2894 #include <project_vertex> 2895 #include <worldpos_vertex> 2896 #include <clipping_planes_vertex> 2897 vWorldPosition = worldPosition.xyz; 2898}`,uI=`#define DISTANCE 2899uniform vec3 referencePosition; 2900uniform float nearDistance; 2901uniform float farDistance; 2902varying vec3 vWorldPosition; 2903#include <common> 2904#include <uv_pars_fragment> 2905#include <map_pars_fragment> 2906#include <alphamap_pars_fragment> 2907#include <alphatest_pars_fragment> 2908#include <alphahash_pars_fragment> 2909#include <clipping_planes_pars_fragment> 2910void main () { 2911 vec4 diffuseColor = vec4( 1.0 ); 2912 #include <clipping_planes_fragment> 2913 #include <map_fragment> 2914 #include <alphamap_fragment> 2915 #include <alphatest_fragment> 2916 #include <alphahash_fragment> 2917 float dist = length( vWorldPosition - referencePosition ); 2918 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2919 dist = saturate( dist ); 2920 gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); 2921}`,fI=`varying vec3 vWorldDirection; 2922#include <common> 2923void main() { 2924 vWorldDirection = transformDirection( position, modelMatrix ); 2925 #include <begin_vertex> 2926 #include <project_vertex> 2927}`,dI=`uniform sampler2D tEquirect; 2928varying vec3 vWorldDirection; 2929#include <common> 2930void main() { 2931 vec3 direction = normalize( vWorldDirection ); 2932 vec2 sampleUV = equirectUv( direction ); 2933 gl_FragColor = texture2D( tEquirect, sampleUV ); 2934 #include <tonemapping_fragment> 2935 #include <colorspace_fragment> 2936}`,hI=`uniform float scale; 2937attribute float lineDistance; 2938varying float vLineDistance; 2939#include <common> 2940#include <uv_pars_vertex> 2941#include <color_pars_vertex> 2942#include <fog_pars_vertex> 2943#include <morphtarget_pars_vertex> 2944#include <logdepthbuf_pars_vertex> 2945#include <clipping_planes_pars_vertex> 2946void main() { 2947 vLineDistance = scale * lineDistance; 2948 #include <uv_vertex> 2949 #include <color_vertex> 2950 #include <morphinstance_vertex> 2951 #include <morphcolor_vertex> 2952 #include <begin_vertex> 2953 #include <morphtarget_vertex> 2954 #include <project_vertex> 2955 #include <logdepthbuf_vertex> 2956 #include <clipping_planes_vertex> 2957 #include <fog_vertex> 2958}`,pI=`uniform vec3 diffuse; 2959uniform float opacity; 2960uniform float dashSize; 2961uniform float totalSize; 2962varying float vLineDistance; 2963#include <common> 2964#include <color_pars_fragment> 2965#include <uv_pars_fragment> 2966#include <map_pars_fragment> 2967#include <fog_pars_fragment> 2968#include <logdepthbuf_pars_fragment> 2969#include <clipping_planes_pars_fragment> 2970void main() { 2971 vec4 diffuseColor = vec4( diffuse, opacity ); 2972 #include <clipping_planes_fragment> 2973 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2974 discard; 2975 } 2976 vec3 outgoingLight = vec3( 0.0 ); 2977 #include <logdepthbuf_fragment> 2978 #include <map_fragment> 2979 #include <color_fragment> 2980 outgoingLight = diffuseColor.rgb; 2981 #include <opaque_fragment> 2982 #include <tonemapping_fragment> 2983 #include <colorspace_fragment> 2984 #include <fog_fragment> 2985 #include <premultiplied_alpha_fragment> 2986}`,mI=`#include <common> 2987#include <batching_pars_vertex> 2988#include <uv_pars_vertex> 2989#include <envmap_pars_vertex> 2990#include <color_pars_vertex> 2991#include <fog_pars_vertex> 2992#include <morphtarget_pars_vertex> 2993#include <skinning_pars_vertex> 2994#include <logdepthbuf_pars_vertex> 2995#include <clipping_planes_pars_vertex> 2996void main() { 2997 #include <uv_vertex> 2998 #include <color_vertex> 2999 #include <morphinstance_vertex> 3000 #include <morphcolor_vertex> 3001 #include <batching_vertex> 3002 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 3003 #include <beginnormal_vertex> 3004 #include <morphnormal_vertex> 3005 #include <skinbase_vertex> 3006 #include <skinnormal_vertex> 3007 #include <defaultnormal_vertex> 3008 #endif 3009 #include <begin_vertex> 3010 #include <morphtarget_vertex> 3011 #include <skinning_vertex> 3012 #include <project_vertex> 3013 #include <logdepthbuf_vertex> 3014 #include <clipping_planes_vertex> 3015 #include <worldpos_vertex> 3016 #include <envmap_vertex> 3017 #include <fog_vertex> 3018}`,gI=`uniform vec3 diffuse; 3019uniform float opacity; 3020#ifndef FLAT_SHADED 3021 varying vec3 vNormal; 3022#endif 3023#include <common> 3024#include <dithering_pars_fragment> 3025#include <color_pars_fragment> 3026#include <uv_pars_fragment> 3027#include <map_pars_fragment> 3028#include <alphamap_pars_fragment> 3029#include <alphatest_pars_fragment> 3030#include <alphahash_pars_fragment> 3031#include <aomap_pars_fragment> 3032#include <lightmap_pars_fragment> 3033#include <envmap_common_pars_fragment> 3034#include <envmap_pars_fragment> 3035#include <fog_pars_fragment> 3036#include <specularmap_pars_fragment> 3037#include <logdepthbuf_pars_fragment> 3038#include <clipping_planes_pars_fragment> 3039void main() { 3040 vec4 diffuseColor = vec4( diffuse, opacity ); 3041 #include <clipping_planes_fragment> 3042 #include <logdepthbuf_fragment> 3043 #include <map_fragment> 3044 #include <color_fragment> 3045 #include <alphamap_fragment> 3046 #include <alphatest_fragment> 3047 #include <alphahash_fragment> 3048 #include <specularmap_fragment> 3049 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3050 #ifdef USE_LIGHTMAP 3051 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 3052 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 3053 #else 3054 reflectedLight.indirectDiffuse += vec3( 1.0 ); 3055 #endif 3056 #include <aomap_fragment> 3057 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 3058 vec3 outgoingLight = reflectedLight.indirectDiffuse; 3059 #include <envmap_fragment> 3060 #include <opaque_fragment> 3061 #include <tonemapping_fragment> 3062 #include <colorspace_fragment> 3063 #include <fog_fragment> 3064 #include <premultiplied_alpha_fragment> 3065 #include <dithering_fragment> 3066}`,xI=`#define LAMBERT 3067varying vec3 vViewPosition; 3068#include <common> 3069#include <batching_pars_vertex> 3070#include <uv_pars_vertex> 3071#include <displacementmap_pars_vertex> 3072#include <envmap_pars_vertex> 3073#include <color_pars_vertex> 3074#include <fog_pars_vertex> 3075#include <normal_pars_vertex> 3076#include <morphtarget_pars_vertex> 3077#include <skinning_pars_vertex> 3078#include <shadowmap_pars_vertex> 3079#include <logdepthbuf_pars_vertex> 3080#include <clipping_planes_pars_vertex> 3081void main() { 3082 #include <uv_vertex> 3083 #include <color_vertex> 3084 #include <morphinstance_vertex> 3085 #include <morphcolor_vertex> 3086 #include <batching_vertex> 3087 #include <beginnormal_vertex> 3088 #include <morphnormal_vertex> 3089 #include <skinbase_vertex> 3090 #include <skinnormal_vertex> 3091 #include <defaultnormal_vertex> 3092 #include <normal_vertex> 3093 #include <begin_vertex> 3094 #include <morphtarget_vertex> 3095 #include <skinning_vertex> 3096 #include <displacementmap_vertex> 3097 #include <project_vertex> 3098 #include <logdepthbuf_vertex> 3099 #include <clipping_planes_vertex> 3100 vViewPosition = - mvPosition.xyz; 3101 #include <worldpos_vertex> 3102 #include <envmap_vertex> 3103 #include <shadowmap_vertex> 3104 #include <fog_vertex> 3105}`,vI=`#define LAMBERT 3106uniform vec3 diffuse; 3107uniform vec3 emissive; 3108uniform float opacity; 3109#include <common> 3110#include <dithering_pars_fragment> 3111#include <color_pars_fragment> 3112#include <uv_pars_fragment> 3113#include <map_pars_fragment> 3114#include <alphamap_pars_fragment> 3115#include <alphatest_pars_fragment> 3116#include <alphahash_pars_fragment> 3117#include <aomap_pars_fragment> 3118#include <lightmap_pars_fragment> 3119#include <emissivemap_pars_fragment> 3120#include <envmap_common_pars_fragment> 3121#include <envmap_pars_fragment> 3122#include <fog_pars_fragment> 3123#include <bsdfs> 3124#include <lights_pars_begin> 3125#include <normal_pars_fragment> 3126#include <lights_lambert_pars_fragment> 3127#include <shadowmap_pars_fragment> 3128#include <bumpmap_pars_fragment> 3129#include <normalmap_pars_fragment> 3130#include <specularmap_pars_fragment> 3131#include <logdepthbuf_pars_fragment> 3132#include <clipping_planes_pars_fragment> 3133void main() { 3134 vec4 diffuseColor = vec4( diffuse, opacity ); 3135 #include <clipping_planes_fragment> 3136 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3137 vec3 totalEmissiveRadiance = emissive; 3138 #include <logdepthbuf_fragment> 3139 #include <map_fragment> 3140 #include <color_fragment> 3141 #include <alphamap_fragment> 3142 #include <alphatest_fragment> 3143 #include <alphahash_fragment> 3144 #include <specularmap_fragment> 3145 #include <normal_fragment_begin> 3146 #include <normal_fragment_maps> 3147 #include <emissivemap_fragment> 3148 #include <lights_lambert_fragment> 3149 #include <lights_fragment_begin> 3150 #include <lights_fragment_maps> 3151 #include <lights_fragment_end> 3152 #include <aomap_fragment> 3153 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3154 #include <envmap_fragment> 3155 #include <opaque_fragment> 3156 #include <tonemapping_fragment> 3157 #include <colorspace_fragment> 3158 #include <fog_fragment> 3159 #include <premultiplied_alpha_fragment> 3160 #include <dithering_fragment> 3161}`,yI=`#define MATCAP 3162varying vec3 vViewPosition; 3163#include <common> 3164#include <batching_pars_vertex> 3165#include <uv_pars_vertex> 3166#include <color_pars_vertex> 3167#include <displacementmap_pars_vertex> 3168#include <fog_pars_vertex> 3169#include <normal_pars_vertex> 3170#include <morphtarget_pars_vertex> 3171#include <skinning_pars_vertex> 3172#include <logdepthbuf_pars_vertex> 3173#include <clipping_planes_pars_vertex> 3174void main() { 3175 #include <uv_vertex> 3176 #include <color_vertex> 3177 #include <morphinstance_vertex> 3178 #include <morphcolor_vertex> 3179 #include <batching_vertex> 3180 #include <beginnormal_vertex> 3181 #include <morphnormal_vertex> 3182 #include <skinbase_vertex> 3183 #include <skinnormal_vertex> 3184 #include <defaultnormal_vertex> 3185 #include <normal_vertex> 3186 #include <begin_vertex> 3187 #include <morphtarget_vertex> 3188 #include <skinning_vertex> 3189 #include <displacementmap_vertex> 3190 #include <project_vertex> 3191 #include <logdepthbuf_vertex> 3192 #include <clipping_planes_vertex> 3193 #include <fog_vertex> 3194 vViewPosition = - mvPosition.xyz; 3195}`,_I=`#define MATCAP 3196uniform vec3 diffuse; 3197uniform float opacity; 3198uniform sampler2D matcap; 3199varying vec3 vViewPosition; 3200#include <common> 3201#include <dithering_pars_fragment> 3202#include <color_pars_fragment> 3203#include <uv_pars_fragment> 3204#include <map_pars_fragment> 3205#include <alphamap_pars_fragment> 3206#include <alphatest_pars_fragment> 3207#include <alphahash_pars_fragment> 3208#include <fog_pars_fragment> 3209#include <normal_pars_fragment> 3210#include <bumpmap_pars_fragment> 3211#include <normalmap_pars_fragment> 3212#includ
3212e <logdepthbuf_pars_fragment> 3213#include <clipping_planes_pars_fragment> 3214void main() { 3215 vec4 diffuseColor = vec4( diffuse, opacity ); 3216 #include <clipping_planes_fragment> 3217 #include <logdepthbuf_fragment> 3218 #include <map_fragment> 3219 #include <color_fragment> 3220 #include <alphamap_fragment> 3221 #include <alphatest_fragment> 3222 #include <alphahash_fragment> 3223 #include <normal_fragment_begin> 3224 #include <normal_fragment_maps> 3225 vec3 viewDir = normalize( vViewPosition ); 3226 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3227 vec3 y = cross( viewDir, x ); 3228 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3229 #ifdef USE_MATCAP 3230 vec4 matcapColor = texture2D( matcap, uv ); 3231 #else 3232 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3233 #endif 3234 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3235 #include <opaque_fragment> 3236 #include <tonemapping_fragment> 3237 #include <colorspace_fragment> 3238 #include <fog_fragment> 3239 #include <premultiplied_alpha_fragment> 3240 #include <dithering_fragment> 3241}`,bI=`#define NORMAL 3242#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3243 varying vec3 vViewPosition; 3244#endif 3245#include <common> 3246#include <batching_pars_vertex> 3247#include <uv_pars_vertex> 3248#include <displacementmap_pars_vertex> 3249#include <normal_pars_vertex> 3250#include <morphtarget_pars_vertex> 3251#include <skinning_pars_vertex> 3252#include <logdepthbuf_pars_vertex> 3253#include <clipping_planes_pars_vertex> 3254void main() { 3255 #include <uv_vertex> 3256 #include <batching_vertex> 3257 #include <beginnormal_vertex> 3258 #include <morphinstance_vertex> 3259 #include <morphnormal_vertex> 3260 #include <skinbase_vertex> 3261 #include <skinnormal_vertex> 3262 #include <defaultnormal_vertex> 3263 #include <normal_vertex> 3264 #include <begin_vertex> 3265 #include <morphtarget_vertex> 3266 #include <skinning_vertex> 3267 #include <displacementmap_vertex> 3268 #include <project_vertex> 3269 #include <logdepthbuf_vertex> 3270 #include <clipping_planes_vertex> 3271#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3272 vViewPosition = - mvPosition.xyz; 3273#endif 3274}`,SI=`#define NORMAL 3275uniform float opacity; 3276#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3277 varying vec3 vViewPosition; 3278#endif 3279#include <uv_pars_fragment> 3280#include <normal_pars_fragment> 3281#include <bumpmap_pars_fragment> 3282#include <normalmap_pars_fragment> 3283#include <logdepthbuf_pars_fragment> 3284#include <clipping_planes_pars_fragment> 3285void main() { 3286 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3287 #include <clipping_planes_fragment> 3288 #include <logdepthbuf_fragment> 3289 #include <normal_fragment_begin> 3290 #include <normal_fragment_maps> 3291 gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); 3292 #ifdef OPAQUE 3293 gl_FragColor.a = 1.0; 3294 #endif 3295}`,MI=`#define PHONG 3296varying vec3 vViewPosition; 3297#include <common> 3298#include <batching_pars_vertex> 3299#include <uv_pars_vertex> 3300#include <displacementmap_pars_vertex> 3301#include <envmap_pars_vertex> 3302#include <color_pars_vertex> 3303#include <fog_pars_vertex> 3304#include <normal_pars_vertex> 3305#include <morphtarget_pars_vertex> 3306#include <skinning_pars_vertex> 3307#include <shadowmap_pars_vertex> 3308#include <logdepthbuf_pars_vertex> 3309#include <clipping_planes_pars_vertex> 3310void main() { 3311 #include <uv_vertex> 3312 #include <color_vertex> 3313 #include <morphcolor_vertex> 3314 #include <batching_vertex> 3315 #include <beginnormal_vertex> 3316 #include <morphinstance_vertex> 3317 #include <morphnormal_vertex> 3318 #include <skinbase_vertex> 3319 #include <skinnormal_vertex> 3320 #include <defaultnormal_vertex> 3321 #include <normal_vertex> 3322 #include <begin_vertex> 3323 #include <morphtarget_vertex> 3324 #include <skinning_vertex> 3325 #include <displacementmap_vertex> 3326 #include <project_vertex> 3327 #include <logdepthbuf_vertex> 3328 #include <clipping_planes_vertex> 3329 vViewPosition = - mvPosition.xyz; 3330 #include <worldpos_vertex> 3331 #include <envmap_vertex> 3332 #include <shadowmap_vertex> 3333 #include <fog_vertex> 3334}`,EI=`#define PHONG 3335uniform vec3 diffuse; 3336uniform vec3 emissive; 3337uniform vec3 specular; 3338uniform float shininess; 3339uniform float opacity; 3340#include <common> 3341#include <dithering_pars_fragment> 3342#include <color_pars_fragment> 3343#include <uv_pars_fragment> 3344#include <map_pars_fragment> 3345#include <alphamap_pars_fragment> 3346#include <alphatest_pars_fragment> 3347#include <alphahash_pars_fragment> 3348#include <aomap_pars_fragment> 3349#include <lightmap_pars_fragment> 3350#include <emissivemap_pars_fragment> 3351#include <envmap_common_pars_fragment> 3352#include <envmap_pars_fragment> 3353#include <fog_pars_fragment> 3354#include <bsdfs> 3355#include <lights_pars_begin> 3356#include <normal_pars_fragment> 3357#include <lights_phong_pars_fragment> 3358#include <shadowmap_pars_fragment> 3359#include <bumpmap_pars_fragment> 3360#include <normalmap_pars_fragment> 3361#include <specularmap_pars_fragment> 3362#include <logdepthbuf_pars_fragment> 3363#include <clipping_planes_pars_fragment> 3364void main() { 3365 vec4 diffuseColor = vec4( diffuse, opacity ); 3366 #include <clipping_planes_fragment> 3367 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3368 vec3 totalEmissiveRadiance = emissive; 3369 #include <logdepthbuf_fragment> 3370 #include <map_fragment> 3371 #include <color_fragment> 3372 #include <alphamap_fragment> 3373 #include <alphatest_fragment> 3374 #include <alphahash_fragment> 3375 #include <specularmap_fragment> 3376 #include <normal_fragment_begin> 3377 #include <normal_fragment_maps> 3378 #include <emissivemap_fragment> 3379 #include <lights_phong_fragment> 3380 #include <lights_fragment_begin> 3381 #include <lights_fragment_maps> 3382 #include <lights_fragment_end> 3383 #include <aomap_fragment> 3384 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3385 #include <envmap_fragment> 3386 #include <opaque_fragment> 3387 #include <tonemapping_fragment> 3388 #include <colorspace_fragment> 3389 #include <fog_fragment> 3390 #include <premultiplied_alpha_fragment> 3391 #include <dithering_fragment> 3392}`,TI=`#define STANDARD 3393varying vec3 vViewPosition; 3394#ifdef USE_TRANSMISSION 3395 varying vec3 vWorldPosition; 3396#endif 3397#include <common> 3398#include <batching_pars_vertex> 3399#include <uv_pars_vertex> 3400#include <displacementmap_pars_vertex> 3401#include <color_pars_vertex> 3402#include <fog_pars_vertex> 3403#include <normal_pars_vertex> 3404#include <morphtarget_pars_vertex> 3405#include <skinning_pars_vertex> 3406#include <shadowmap_pars_vertex> 3407#include <logdepthbuf_pars_vertex> 3408#include <clipping_planes_pars_vertex> 3409void main() { 3410 #include <uv_vertex> 3411 #include <color_vertex> 3412 #include <morphinstance_vertex> 3413 #include <morphcolor_vertex> 3414 #include <batching_vertex> 3415 #include <beginnormal_vertex> 3416 #include <morphnormal_vertex> 3417 #include <skinbase_vertex> 3418 #include <skinnormal_vertex> 3419 #include <defaultnormal_vertex> 3420 #include <normal_vertex> 3421 #include <begin_vertex> 3422 #include <morphtarget_vertex> 3423 #include <skinning_vertex> 3424 #include <displacementmap_vertex> 3425 #include <project_vertex> 3426 #include <logdepthbuf_vertex> 3427 #include <clipping_planes_vertex> 3428 vViewPosition = - mvPosition.xyz; 3429 #include <worldpos_vertex> 3430 #include <shadowmap_vertex> 3431 #include <fog_vertex> 3432#ifdef USE_TRANSMISSION 3433 vWorldPosition = worldPosition.xyz; 3434#endif 3435}`,AI=`#define STANDARD 3436#ifdef PHYSICAL 3437 #define IOR 3438 #define USE_SPECULAR 3439#endif 3440uniform vec3 diffuse; 3441uniform vec3 emissive; 3442uniform float roughness; 3443uniform float metalness; 3444uniform float opacity; 3445#ifdef IOR 3446 uniform float ior; 3447#endif 3448#ifdef USE_SPECULAR 3449 uniform float specularIntensity; 3450 uniform vec3 specularColor; 3451 #ifdef USE_SPECULAR_COLORMAP 3452 uniform sampler2D specularColorMap; 3453 #endif 3454 #ifdef USE_SPECULAR_INTENSITYMAP 3455 uniform sampler2D specularIntensityMap; 3456 #endif 3457#endif 3458#ifdef USE_CLEARCOAT 3459 uniform float clearcoat; 3460 uniform float clearcoatRoughness; 3461#endif 3462#ifdef USE_DISPERSION 3463 uniform float dispersion; 3464#endif
3465#ifdef USE_IRIDESCENCE 3466 uniform float iridescence; 3467 uniform float iridescenceIOR; 3468 uniform float iridescenceThicknessMinimum; 3469 uniform float iridescenceThicknessMaximum; 3470#endif 3471#ifdef USE_SHEEN 3472 uniform vec3 sheenColor; 3473 uniform float sheenRoughness; 3474 #ifdef USE_SHEEN_COLORMAP 3475 uniform sampler2D sheenColorMap; 3476 #endif 3477 #ifdef USE_SHEEN_ROUGHNESSMAP 3478 uniform sampler2D sheenRoughnessMap; 3479 #endif 3480#endif 3481#ifdef USE_ANISOTROPY 3482 uniform vec2 anisotropyVector; 3483 #ifdef USE_ANISOTROPYMAP 3484 uniform sampler2D anisotropyMap; 3485 #endif 3486#endif 3487varying vec3 vViewPosition; 3488#include <common> 3489#include <dithering_pars_fragment> 3490#include <color_pars_fragment> 3491#include <uv_pars_fragment> 3492#include <map_pars_fragment> 3493#include <alphamap_pars_fragment> 3494#include <alphatest_pars_fragment> 3495#include <alphahash_pars_fragment> 3496#include <aomap_pars_fragment> 3497#include <lightmap_pars_fragment> 3498#include <emissivemap_pars_fragment> 3499#include <iridescence_fragment> 3500#include <cube_uv_reflection_fragment> 3501#include <envmap_common_pars_fragment> 3502#include <envmap_physical_pars_fragment> 3503#include <fog_pars_fragment> 3504#include <lights_pars_begin> 3505#include <normal_pars_fragment> 3506#include <lights_physical_pars_fragment> 3507#include <transmission_pars_fragment> 3508#include <shadowmap_pars_fragment> 3509#include <bumpmap_pars_fragment> 3510#include <normalmap_pars_fragment> 3511#include <clearcoat_pars_fragment> 3512#include <iridescence_pars_fragment> 3513#include <roughnessmap_pars_fragment> 3514#include <metalnessmap_pars_fragment> 3515#include <logdepthbuf_pars_fragment> 3516#include <clipping_planes_pars_fragment> 3517void main() { 3518 vec4 diffuseColor = vec4( diffuse, opacity ); 3519 #include <clipping_planes_fragment> 3520 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3521 vec3 totalEmissiveRadiance = emissive; 3522 #include <logdepthbuf_fragment> 3523 #include <map_fragment> 3524 #include <color_fragment> 3525 #include <alphamap_fragment> 3526 #include <alphatest_fragment> 3527 #include <alphahash_fragment> 3528 #include <roughnessmap_fragment> 3529 #include <metalnessmap_fragment> 3530 #include <normal_fragment_begin> 3531 #include <normal_fragment_maps> 3532 #include <clearcoat_normal_fragment_begin> 3533 #include <clearcoat_normal_fragment_maps> 3534 #include <emissivemap_fragment> 3535 #include <lights_physical_fragment> 3536 #include <lights_fragment_begin> 3537 #include <lights_fragment_maps> 3538 #include <lights_fragment_end> 3539 #include <aomap_fragment> 3540 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3541 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3542 #include <transmission_fragment> 3543 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3544 #ifdef USE_SHEEN 3545 3546 outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; 3547 3548 #endif 3549 #ifdef USE_CLEARCOAT 3550 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3551 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3552 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3553 #endif 3554 #include <opaque_fragment> 3555 #include <tonemapping_fragment> 3556 #include <colorspace_fragment> 3557 #include <fog_fragment> 3558 #include <premultiplied_alpha_fragment> 3559 #include <dithering_fragment> 3560}`,wI=`#define TOON 3561varying vec3 vViewPosition; 3562#include <common> 3563#include <batching_pars_vertex> 3564#include <uv_pars_vertex> 3565#include <displacementmap_pars_vertex> 3566#include <color_pars_vertex> 3567#include <fog_pars_vertex> 3568#include <normal_pars_vertex> 3569#include <morphtarget_pars_vertex> 3570#include <skinning_pars_vertex> 3571#include <shadowmap_pars_vertex> 3572#include <logdepthbuf_pars_vertex> 3573#include <clipping_planes_pars_vertex> 3574void main() { 3575 #include <uv_vertex> 3576 #include <color_vertex> 3577 #include <morphinstance_vertex> 3578 #include <morphcolor_vertex> 3579 #include <batching_vertex> 3580 #include <beginnormal_vertex> 3581 #include <morphnormal_vertex> 3582 #include <skinbase_vertex> 3583 #include <skinnormal_vertex> 3584 #include <defaultnormal_vertex> 3585 #include <normal_vertex> 3586 #include <begin_vertex> 3587 #include <morphtarget_vertex> 3588 #include <skinning_vertex> 3589 #include <displacementmap_vertex> 3590 #include <project_vertex> 3591 #include <logdepthbuf_vertex> 3592 #include <clipping_planes_vertex> 3593 vViewPosition = - mvPosition.xyz; 3594 #include <worldpos_vertex> 3595 #include <shadowmap_vertex> 3596 #include <fog_vertex> 3597}`,CI=`#define TOON 3598uniform vec3 diffuse; 3599uniform vec3 emissive; 3600uniform float opacity; 3601#include <common> 3602#include <dithering_pars_fragment> 3603#include <color_pars_fragment> 3604#include <uv_pars_fragment> 3605#include <map_pars_fragment> 3606#include <alphamap_pars_fragment> 3607#include <alphatest_pars_fragment> 3608#include <alphahash_pars_fragment> 3609#include <aomap_pars_fragment> 3610#include <lightmap_pars_fragment> 3611#include <emissivemap_pars_fragment> 3612#include <gradientmap_pars_fragment> 3613#include <fog_pars_fragment> 3614#include <bsdfs> 3615#include <lights_pars_begin> 3616#include <normal_pars_fragment> 3617#include <lights_toon_pars_fragment> 3618#include <shadowmap_pars_fragment> 3619#include <bumpmap_pars_fragment> 3620#include <normalmap_pars_fragment> 3621#include <logdepthbuf_pars_fragment> 3622#include <clipping_planes_pars_fragment> 3623void main() { 3624 vec4 diffuseColor = vec4( diffuse, opacity ); 3625 #include <clipping_planes_fragment> 3626 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3627 vec3 totalEmissiveRadiance = emissive; 3628 #include <logdepthbuf_fragment> 3629 #include <map_fragment> 3630 #include <color_fragment> 3631 #include <alphamap_fragment> 3632 #include <alphatest_fragment> 3633 #include <alphahash_fragment> 3634 #include <normal_fragment_begin> 3635 #include <normal_fragment_maps> 3636 #include <emissivemap_fragment> 3637 #include <lights_toon_fragment> 3638 #include <lights_fragment_begin> 3639 #include <lights_fragment_maps> 3640 #include <lights_fragment_end> 3641 #include <aomap_fragment> 3642 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3643 #include <opaque_fragment> 3644 #include <tonemapping_fragment> 3645 #include <colorspace_fragment> 3646 #include <fog_fragment> 3647 #include <premultiplied_alpha_fragment> 3648 #include <dithering_fragment> 3649}`,RI=`uniform float size; 3650uniform float scale; 3651#include <common> 3652#include <color_pars_vertex> 3653#include <fog_pars_vertex> 3654#include <morphtarget_pars_vertex> 3655#include <logdepthbuf_pars_vertex> 3656#include <clipping_planes_pars_vertex> 3657#ifdef USE_POINTS_UV 3658 varying vec2 vUv; 3659 uniform mat3 uvTransform; 3660#endif 3661void main() { 3662 #ifdef USE_POINTS_UV 3663 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3664 #endif 3665 #include <color_vertex> 3666 #include <morphinstance_vertex> 3667 #include <morphcolor_vertex> 3668 #include <begin_vertex> 3669 #include <morphtarget_vertex> 3670 #include <project_vertex> 3671 gl_PointSize = size; 3672 #ifdef USE_SIZEATTENUATION 3673 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3674 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3675 #endif 3676 #include <logdepthbuf_vertex> 3677 #include <clipping_planes_vertex> 3678 #include <worldpos_vertex> 3679 #include <fog_vertex> 3680}`,DI=`uniform vec3 diffuse; 3681uniform float opacity; 3682#include <common> 3683#include <color_pars_fragment> 3684#include <map_particle_pars_fragment> 3685#include <alphatest_pars_fragment> 3686#include <alphahash_pars_fragment> 3687#include <fog_pars_fragment> 3688#include <logdepthbuf_pars_fragment> 3689#include <clipping_planes_pars_fragment> 3690void main() { 3691 vec4 diffuseColor = vec4( diffuse, opacity ); 3692 #include <clipping_planes_fragment> 3693 vec3 outgoingLight = vec3( 0.0 ); 3694 #include <logdepthbuf_fragment> 3695 #include <map_particle_fragment> 3696 #include <color_fragment> 3697 #include <alphatest_fragment> 3698 #include <alphahash_fragment> 3699 outgoingLight = diffuseColor.rgb; 3700 #include <opaque_fragment> 3701 #include <tonemapping_fragment> 3702 #include <colorspace_fragment> 3703 #include <fog_fragment> 3704 #include <premultiplied_alpha_fragment> 3705}`,NI=`#include <common> 3706#include <batching_pars_vertex> 3707#include <fog_pars_vertex> 3708#include <morphtarget_pars_vertex> 3709#include <skinning_pars_vertex> 3710#include <logdepthbuf_pars_vertex> 3711#include <shadowmap_pars_vertex> 3712void main() { 3713 #include <batching_vertex> 3714 #include <beginnormal_vertex> 3715 #include <morphinstance_vertex> 3716 #include <morphnormal_vertex> 3717 #include <skinbase_vertex> 3718 #include <skinnormal_vertex> 3719 #include <defaultnormal_vertex> 3720 #include <begin_vertex> 3721 #include <morphtarget_vertex> 3722 #include <skinning_vertex> 3723 #include <project_vertex> 3724 #include <logdepthbuf_vertex> 3725 #include <worldpos_vertex> 3726 #include <shadowmap_vertex> 3727 #include <fog_vertex> 3728}`,LI=`uniform vec3 color; 3729uniform float opacity; 3730#include <common> 3731#include <fog_pars_fragment> 3732#include <bsdfs> 3733#include <lights_pars_begin> 3734#include <logdepthbuf_pars_fragment> 3735#include <shadowmap_pars_fragment> 3736#include <shadowmask_pars_fragment> 3737void main() { 3738 #include <logdepthbuf_fragment> 3739 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3740 #include <tonemapping_fragment> 3741 #include <colorspace_fragment> 3742 #include <fog_fragment> 3743}`,PI=`uniform float rotation; 3744uniform vec2 center; 3745#include <common> 3746#include <uv_pars_vertex> 3747#include <fog_pars_vertex> 3748#include <logdepthbuf_pars_vertex> 3749#include <clipping_planes_pars_vertex> 3750void main() { 3751 #include <uv_vertex> 3752 vec4 mvPosition = modelViewMatrix[ 3 ]; 3753 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 3754 #ifndef USE_SIZEATTENUATION 3755 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3756 if ( isPerspective ) scale *= - mvPosition.z; 3757 #endif 3758 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3759 vec2 rotatedPosition; 3760 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3761 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3762 mvPosition.xy += rotatedPosition; 3763 gl_Position = projectionMatrix * mvPosition; 3764 #include <logdepthbuf_vertex> 3765 #include <clipping_planes_vertex> 3766 #include <fog_vertex> 3767}`,UI=`uniform vec3 diffuse; 3768uniform float opacity; 3769#include <common> 3770#include <uv_pars_fragment> 3771#include <map_pars_fragment> 3772#include <alphamap_pars_fragment> 3773#include <alphatest_pars_fragment> 3774#include <alphahash_pars_fragment> 3775#include <fog_pars_fragment> 3776#include <logdepthbuf_pars_fragment> 3777#include <clipping_planes_pars_fragment> 3778void main() { 3779 vec4 diffuseColor = vec4( diffuse, opacity ); 3780 #include <clipping_planes_fragment> 3781 vec3 outgoingLight = vec3( 0.0 ); 3782 #include <logdepthbuf_fragment> 3783 #include <map_fragment> 3784 #include <alphamap_fragment> 3785 #include <alphatest_fragment> 3786 #include <alphahash_fragment> 3787 outgoingLight = diffuseColor.rgb; 3788 #include <opaque_fragment> 3789 #include <tonemapping_fragment> 3790 #include <colorspace_fragment> 3791 #include <fog_fragment> 3792}`,Se={alphahash_fragment:n8,alphahash_pars_fragment:i8,alphamap_fragment:s8,alphamap_pars_fragment:a8,alphatest_fragment:r8,alphatest_pars_fragment:o8,aomap_fragment:l8,aomap_pars_fragment:c8,batching_pars_vertex:u8,batching_vertex:f8,begin_vertex:d8,beginnormal_vertex:h8,bsdfs:p8,iridescence_fragment:m8,bumpmap_pars_fragment:g8,clipping_planes_fragment:x8,clipping_planes_pars_fragment:v8,clipping_planes_pars_vertex:y8,clipping_planes_vertex:_8,color_fragment:b8,color_pars_fragment:S8,color_pars_vertex:M8,color_vertex:E8,common:T8,cube_uv_reflection_fragment:A8,defaultnormal_vertex:w8,displacementmap_pars_vertex:C8,displacementmap_vertex:R8,emissivemap_fragment:D8,emissivemap_pars_fragment:N8,colorspace_fragment:L8,colorspace_pars_fragment:P8,envmap_fragment:U8,envmap_common_pars_fragment:O8,envmap_pars_fragment:F8,envmap_pars_vertex:I8,envmap_physical_pars_fragment:q8,envmap_vertex:z8,fog_vertex:B8,fog_pars_vertex:V8,fog_fragment:H8,fog_pars_fragment:k8,gradientmap_pars_fragment:G8,lightmap_pars_fragment:j8,lights_lambert_fragment:W8,lights_lambert_pars_fragment:X8,lights_pars_begin:Y8,lights_toon_fragment:Z8,lights_toon_pars_fragment:K8,lights_phong_fragment:Q8,lights_phong_pars_fragment:J8,lights_physical_fragment:$8,lights_physical_pars_fragment:tF,lights_fragment_begin:eF,lights_fragment_maps:nF,lights_fragment_end:iF,logdepthbuf_fragment:sF,logdepthbuf_pars_fragment:aF,logdepthbuf_pars_vertex:rF,logdepthbuf_vertex:oF,map_fragment:lF,map_pars_fragment:cF,map_particle_fragment:uF,map_particle_pars_fragment:fF,metalnessmap_fragment:dF,metalnessmap_pars_fragment:hF,morphinstance_vertex:pF,morphcolor_vertex:mF,morphnormal_vertex:gF,morphtarget_pars_vertex:xF,morphtarget_vertex:vF,normal_fragment_begin:yF,normal_fragment_maps:_F,normal_pars_fragment:bF,normal_pars_vertex:SF,normal_vertex:MF,normalmap_pars_fragment:EF,clearcoat_normal_fragment_begin:TF,clearcoat_normal_fragment_maps:AF,clearcoat_pars_fragment:wF,iridescence_pars_fragment:CF,opaque_fragment:RF,packing:DF,premultiplied_alpha_fragment:NF,project_vertex:LF,dithering_fragment:PF,dithering_pars_fragment:UF,roughnessmap_fragment:OF,roughnessmap_pars_fragment:FF,shadowmap_pars_fragment:IF,shadowmap_pars_vertex:zF,shadowmap_vertex:BF,shadowmask_pars_fragment:VF,skinbase_vertex:HF,skinning_pars_vertex:kF,skinning_vertex:GF,skinnormal_vertex:jF,specularmap_fragment:WF,specularmap_pars_fragment:XF,tonemapping_fragment:YF,tonemapping_pars_fragment:qF,transmission_fragment:ZF,transmission_pars_fragment:KF,uv_pars_fragment:QF,uv_pars_vertex:JF,uv_vertex:$F,worldpos_vertex:tI,background_vert:eI,background_frag:nI,backgroundCube_vert:iI,backgroundCube_frag:sI,cube_vert:aI,cube_frag:rI,depth_vert:oI,depth_frag:lI,distance_vert:cI,distance_frag:uI,equirect_vert:fI,equirect_frag:dI,linedashed_vert:hI,linedashed_frag:pI,meshbasic_vert:mI,meshbasic_frag:gI,meshlambert_vert:xI,meshlambert_frag:vI,meshmatcap_vert:yI,meshmatcap_frag:_I,meshnormal_vert:bI,meshnormal_frag:SI,meshphong_vert:MI,meshphong_frag:EI,meshphysical_vert:TI,meshphysical_frag:AI,meshtoon_vert:wI,meshtoon_frag:CI,points_vert:RI,points_frag:DI,shadow_vert:NI,shadow_frag:LI,sprite_vert:PI,sprite_frag:UI},kt={common:{diffuse:{value:new Fe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new be},alphaMap:{value:null},alphaMapTransform:{value:new be},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new be}},envmap:{envMap:{value:null},envMapRotation:{value:new be},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new be}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new be}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new be},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new be},normalScale:{value:new ce(1,1)}}
vendor: 7,489 bytes, line 3792
3792,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new be},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new be}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new be}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new be}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{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 Fe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new be},alphaTest:{value:0},uvTransform:{value:new be}},sprite:{diffuse:{value:new Fe(16777215)},opacity:{value:1},center:{value:new ce(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new be},alphaMap:{value:null},alphaMapTransform:{value:new be},alphaTest:{value:0}}},vs={basic:{uniforms:ri([kt.common,kt.specularmap,kt.envmap,kt.aomap,kt.lightmap,kt.fog]),vertexShader:Se.meshbasic_vert,fragmentShader:Se.meshbasic_frag},lambert:{uniforms:ri([kt.common,kt.specularmap,kt.envmap,kt.aomap,kt.lightmap,kt.emissivemap,kt.bumpmap,kt.normalmap,kt.displacementmap,kt.fog,kt.lights,{emissive:{value:new Fe(0)}}]),vertexShader:Se.meshlambert_vert,fragmentShader:Se.meshlambert_frag},phong:{uniforms:ri([kt.common,kt.specularmap,kt.envmap,kt.aomap,kt.lightmap,kt.emissivemap,kt.bumpmap,kt.normalmap,kt.displacementmap,kt.fog,kt.lights,{emissive:{value:new Fe(0)},specular:{value:new Fe(1118481)},shininess:{value:30}}]),vertexShader:Se.meshphong_vert,fragmentShader:Se.meshphong_frag},standard:{uniforms:ri([kt.common,kt.envmap,kt.aomap,kt.lightmap,kt.emissivemap,kt.bumpmap,kt.normalmap,kt.displacementmap,kt.roughnessmap,kt.metalnessmap,kt.fog,kt.lights,{emissive:{value:new Fe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Se.meshphysical_vert,fragmentShader:Se.meshphysical_frag},toon:{uniforms:ri([kt.common,kt.aomap,kt.lightmap,kt.emissivemap,kt.bumpmap,kt.normalmap,kt.displacementmap,kt.gradientmap,kt.fog,kt.lights,{emissive:{value:new Fe(0)}}]),vertexShader:Se.meshtoon_vert,fragmentShader:Se.meshtoon_frag},matcap:{uniforms:ri([kt.common,kt.bumpmap,kt.normalmap,kt.displacementmap,kt.fog,{matcap:{value:null}}]),vertexShader:Se.meshmatcap_vert,fragmentShader:Se.meshmatcap_frag},points:{uniforms:ri([kt.points,kt.fog]),vertexShader:Se.points_vert,fragmentShader:Se.points_frag},dashed:{uniforms:ri([kt.common,kt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Se.linedashed_vert,fragmentShader:Se.linedashed_frag},depth:{uniforms:ri([kt.common,kt.displacementmap]),vertexShader:Se.depth_vert,fragmentShader:Se.depth_frag},normal:{uniforms:ri([kt.common,kt.bumpmap,kt.normalmap,kt.displacementmap,{opacity:{value:1}}]),vertexShader:Se.meshnormal_vert,fragmentShader:Se.meshnormal_frag},sprite:{uniforms:ri([kt.sprite,kt.fog]),vertexShader:Se.sprite_vert,fragmentShader:Se.sprite_frag},background:{uniforms:{uvTransform:{value:new be},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Se.background_vert,fragmentShader:Se.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new be}},vertexShader:Se.backgroundCube_vert,fragmentShader:Se.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Se.cube_vert,fragmentShader:Se.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Se.equirect_vert,fragmentShader:Se.equirect_frag},distance:{uniforms:ri([kt.common,kt.displacementmap,{referencePosition:{value:new et},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Se.distance_vert,fragmentShader:Se.distance_frag},shadow:{uniforms:ri([kt.lights,kt.fog,{color:{value:new Fe(0)},opacity:{value:1}}]),vertexShader:Se.shadow_vert,fragmentShader:Se.shadow_frag}};vs.physical={uniforms:ri([vs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new be},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new be},clearcoatNormalScale:{value:new ce(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new be},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new be},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new be},sheen:{value:0},sheenColor:{value:new Fe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new be},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new be},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new be},transmissionSamplerSize:{value:new ce},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new be},attenuationDistance:{value:0},attenuationColor:{value:new Fe(0)},specularColor:{value:new Fe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new be},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new be},anisotropyVector:{value:new ce},anisotropyMap:{value:null},anisotropyMapTransform:{value:new be}}]),vertexShader:Se.meshphysical_vert,fragmentShader:Se.meshphysical_frag};const td={r:0,b:0,g:0},Pr=new ga,OI=new ln;function FI(n,t,e,s,r,l,u){const f=new Fe(0);let h=l===!0?0:1,d,g,m=null,v=0,_=null;function M(C){let P=C.isScene===!0?C.background:null;return P&&P.isTexture&&(P=(C.backgroundBlurriness>0?e:t).get(P)),P}function T(C){let P=!1;const U=M(C);U===null?b(f,h):U&&U.isColor&&(b(U,1),P=!0);const F=n.xr.getEnvironmentBlendMode();F==="additive"?s.buffers.color.setClear(0,0,0,1,u):F==="alpha-blend"&&s.buffers.color.setClear(0,0,0,0,u),(n.autoClear||P)&&(s.buffers.depth.setTest(!0),s.buffers.depth.setMask(!0),s.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function S(C,P){const U=M(P);U&&(U.isCubeTexture||U.mapping===Yd)?(g===void 0&&(g=new xa(new lu(1,1,1),new Ds({name:"Backgroun
3792dCubeMaterial",uniforms:vl(vs.backgroundCube.uniforms),vertexShader:vs.backgroundCube.vertexShader,fragmentShader:vs.backgroundCube.fragmentShader,side:yi,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),g.geometry.deleteAttribute("normal"),g.geometry.deleteAttribute("uv"),g.onBeforeRender=function(F,L,z){this.matrixWorld.copyPosition(z.matrixWorld)},Object.defineProperty(g.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(g)),Pr.copy(P.backgroundRotation),Pr.x*=-1,Pr.y*=-1,Pr.z*=-1,U.isCubeTexture&&U.isRenderTargetTexture===!1&&(Pr.y*=-1,Pr.z*=-1),g.material.uniforms.envMap.value=U,g.material.uniforms.flipEnvMap.value=U.isCubeTexture&&U.isRenderTargetTexture===!1?-1:1,g.material.uniforms.backgroundBlurriness.value=P.backgroundBlurriness,g.material.uniforms.backgroundIntensity.value=P.backgroundIntensity,g.material.uniforms.backgroundRotation.value.setFromMatrix4(OI.makeRotationFromEuler(Pr)),g.material.toneMapped=ze.getTransfer(U.colorSpace)!==Ze,(m!==U||v!==U.version||_!==n.toneMapping)&&(g.material.needsUpdate=!0,m=U,v=U.version,_=n.toneMapping),g.layers.enableAll(),C.unshift(g,g.geometry,g.material,0,0,null)):U&&U.isTexture&&(d===void 0&&(d=new xa(new Kd(2,2),new Ds({name:"BackgroundMaterial",uniforms:vl(vs.background.uniforms),vertexShader:vs.background.vertexShader,fragmentShader:vs.background.fragmentShader,side:or,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),Object.defineProperty(d.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(d)),d.material.uniforms.t2D.value=U,d.material.uniforms.backgroundIntensity.value=P.backgroundIntensity,d.material.toneMapped=ze.getTransfer(U.colorSpace)!==Ze,U.matrixAutoUpdate===!0&&U.updateMatrix(),d.material.uniforms.uvTransform.value.copy(U.matrix),(m!==U||v!==U.version||_!==n.toneMapping)&&(d.material.needsUpdate=!0,m=U,v=U.version,_=n.toneMapping),d.layers.enableAll(),C.unshift(d,d.geometry,d.material,0,0,null))}function b(C,P){C.getRGB(td,K2(n)),s.buffers.color.setClear(td.r,td.g,td.b,P,u)}function R(){g!==void 0&&(g.geometry.dispose(),g.material.dispose(),g=void 0),d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0)}return{getClearColor:function(){return f},setClearColor:function(C,P=1){f.set(C),h=P,b(f,h)},getClearAlpha:function(){return h},setClearAlpha:function(C){h=C,b(f,h)},render:T,addToRenderList:S,dispose:R}}function II(n,t){const e=n.getParameter(n.MAX_VERTEX_ATTRIBS),s={},r=v(null);let l=r,u=!1;function f(O,j,Q,Z,rt){let ot=!1;const I=m(Z,Q,j);l!==I&&(l=I,d(l.object)),ot=_(O,Z,Q,rt),ot&&M(O,Z,Q,rt),rt!==null&&t.update(rt,n.ELEMENT_ARRAY_BUFFER),(ot||u)&&(u=!1,P(O,j,Q,Z),rt!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(rt).buffer))}function h(){return n.createVertexArray()}function d(O){return n.bindVertexArray(O)}function g(O){return n.deleteVertexArray(O)}function m(O,j,Q){const Z=Q.wireframe===!0;let rt=s[O.id];rt===void 0&&(rt={},s[O.id]=rt);let ot=rt[j.id];ot===void 0&&(ot={},rt[j.id]=ot);let I=ot[Z];return I===void 0&&(I=v(h()),ot[Z]=I),I}function v(O){const j=[],Q=[],Z=[];for(let rt=0;rt<e;rt++)j[rt]=0,Q[rt]=0,Z[rt]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:j,enabledAttributes:Q,attributeDivisors:Z,object:O,attributes:{},index:null}}function _(O,j,Q,Z){const rt=l.attributes,ot=j.attributes;let I=0;const V=Q.getAttributes();for(const k in V)if(V[k].location>=0){const xt=rt[k];let B=ot[k];if(B===void 0&&(k==="instanceMatrix"&&O.instanceMatrix&&(B=O.instanceMatrix),k==="instanceColor"&&O.instanceColor&&(B=O.instanceColor)),xt===void 0||xt.attribute!==B||B&&xt.data!==B.data)return!0;I++}return l.attributesNum!==I||l.index!==Z}function M(O,j,Q,Z){const rt={},ot=j.attributes;let I=0;const V=Q.getAttributes();for(const k in V)if(V[k].location>=0){let xt=ot[k];xt===void 0&&(k==="instanceMatrix"&&O.instanceMatrix&&(xt=O.instanceMatrix),k==="instanceColor"&&O.instanceColor&&(xt=O.instanceColor));const B={};B.attribute=xt,xt&&xt.data&&(B.data=xt.data),rt[k]=B,I++}l.attributes=rt,l.attributesNum=I,l.index=Z}function T(){const O=l.newAttributes;for(let j=0,Q=O.length;j<Q;j++)O[j]=0}function S(O){b(O,0)}function b(O,j){const Q=l.newAttributes,Z=l.enabledAttributes,rt=l.attributeDivisors;Q[O]=1,Z[O]===0&&(n.enableVertexAttribArray(O),Z[O]=1),rt[O]!==j&&(n.vertexAttribDivisor(O,j),rt[O]=j)}function R(){const O=l.newAttributes,j=l.enabledAttributes;for(let Q=0,Z=j.length;Q<Z;Q++)j[Q]!==O[Q]&&(n.disableVertexAttribArray(Q),j[Q]=0)}function C(O,j,Q,Z,rt,ot,I){I===!0?n.vertexAttribIPointer(O,j,Q,rt,ot):n.vertexAttribPointer(O,j,Q,Z,rt,ot)}function P(O,j,Q,Z){T();const rt=Z.attributes,ot=Q.getAttributes(),I=j.defaultAttributeValues;for(const V in ot){const k=ot[V];if(k.location>=0){let gt=rt[V];if(gt===void 0&&(V==="instanceMatrix"&&O.instanceMatrix&&(gt=O.instanceMatrix),V==="instanceColor"&&O.instanceColor&&(gt=O.instanceColor)),gt!==void 0){const xt=gt.normalized,B=gt.itemSize,at=t.get(gt);if(at===void 0)continue;const nt=at.buffer,pt=at.type,Et=at.bytesPerElement,J=pt===n.INT||pt===n.UNSIGNED_INT||gt.gpuType===Fx;if(gt.isInterleavedBufferAttribute){const it=gt.data,bt=it.stride,Ot=gt.offset;if(it.isInstancedInterleavedBuffer){for(let Ut=0;Ut<k.locationSize;Ut++)b(k.location+Ut,it.meshPerAttribute);O.isInstancedMesh!==!0&&Z._maxInstanceCount===void 0&&(Z._maxInstanceCount=it.meshPerAttribute*it.count)}else for(let Ut=0;Ut<k.locationSize;Ut++)S(k.location+Ut);n.bindBuffer(n.ARRAY_BUFFER,nt);for(let Ut=0;Ut<k.locationSize;Ut++)C(k.location+Ut,B/k.locationSize,pt,xt,bt*Et,(Ot+B/k.locationSize*Ut)*Et,J)}else{if(gt.isInstancedBufferAttribute){for(let it=0;
vendor: 1,795 bytes, line 3792
3792it<k.locationSize;it++)b(k.location+it,gt.meshPerAttribute);O.isInstancedMesh!==!0&&Z._maxInstanceCount===void 0&&(Z._maxInstanceCount=gt.meshPerAttribute*gt.count)}else for(let it=0;it<k.locationSize;it++)S(k.location+it);n.bindBuffer(n.ARRAY_BUFFER,nt);for(let it=0;it<k.locationSize;it++)C(k.location+it,B/k.locationSize,pt,xt,B*Et,B/k.locationSize*it*Et,J)}}else if(I!==void 0){const xt=I[V];if(xt!==void 0)switch(xt.length){case 2:n.vertexAttrib2fv(k.location,xt);break;case 3:n.vertexAttrib3fv(k.location,xt);break;case 4:n.vertexAttrib4fv(k.location,xt);break;default:n.vertexAttrib1fv(k.location,xt)}}}}R()}function U(){z();for(const O in s){const j=s[O];for(const Q in j){const Z=j[Q];for(const rt in Z)g(Z[rt].object),delete Z[rt];delete j[Q]}delete s[O]}}function F(O){if(s[O.id]===void 0)return;const j=s[O.id];for(const Q in j){const Z=j[Q];for(const rt in Z)g(Z[rt].object),delete Z[rt];delete j[Q]}delete s[O.id]}function L(O){for(const j in s){const Q=s[j];if(Q[O.id]===void 0)continue;const Z=Q[O.id];for(const rt in Z)g(Z[rt].object),delete Z[rt];delete Q[O.id]}}function z(){w(),u=!0,l!==r&&(l=r,d(l.object))}function w(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:f,reset:z,resetDefaultState:w,dispose:U,releaseStatesOfGeometry:F,releaseStatesOfProgram:L,initAttributes:T,enableAttribute:S,disableUnusedAttributes:R}}function zI(n,t,e){let s;function r(d){s=d}function l(d,g){n.drawArrays(s,d,g),e.update(g,s,1)}function u(d,g,m){m!==0&&(n.drawArraysInstanced(s,d,g,m),e.update(g,s,m))}function f(d,g,m){if(m===0)return;t.get("WEBGL_multi_draw").multiDrawArraysWEBGL(s,d,0,g,0,m);let _=0;for(let M=0;M<m;M++)_+=g[M];e.update(_,s,1)}function h(d,g,m,v){if(m===0)return;const _=t.get("WEBGL_multi_draw");if(_===null)for(let M=0;M<d.length;M++)u(d[M],g[M],v[M]);
vendor: 7,250 bytes, line 3792
3792else{_.multiDrawArraysInstancedWEBGL(s,d,0,g,0,v,0,m);let M=0;for(let T=0;T<m;T++)M+=g[T]*v[T];e.update(M,s,1)}}this.setMode=r,this.render=l,this.renderInstances=u,this.renderMultiDraw=f,this.renderMultiDrawInstances=h}function BI(n,t,e,s){let r;function l(){if(r!==void 0)return r;if(t.has("EXT_texture_filter_anisotropic")===!0){const L=t.get("EXT_texture_filter_anisotropic");r=n.getParameter(L.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function u(L){return!(L!==os&&s.convert(L)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_FORMAT))}function f(L){const z=L===pa&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(L!==Ni&&s.convert(L)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_TYPE)&&L!==bs&&!z)}function h(L){if(L==="highp"){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let d=e.precision!==void 0?e.precision:"highp";const g=h(d);g!==d&&(fe("WebGLRenderer:",d,"not supported, using",g,"instead."),d=g);const m=e.logarithmicDepthBuffer===!0,v=e.reversedDepthBuffer===!0&&t.has("EXT_clip_control"),_=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),M=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),T=n.getParameter(n.MAX_TEXTURE_SIZE),S=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),b=n.getParameter(n.MAX_VERTEX_ATTRIBS),R=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),C=n.getParameter(n.MAX_VARYING_VECTORS),P=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),U=n.getParameter(n.MAX_SAMPLES),F=n.getParameter(n.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:l,getMaxPrecision:h,textureFormatReadable:u,textureTypeReadable:f,precision:d,logarithmicDepthBuffer:m,reversedDepthBuffer:v,maxTextures:_,maxVertexTextures:M,maxTextureSize:T,maxCubemapSize:S,maxAttributes:b,maxVertexUniforms:R,maxVaryings:C,maxFragmentUniforms:P,maxSamples:U,samples:F}}function VI(n){const t=this;let e=null,s=0,r=!1,l=!1;const u=new $a,f=new be,h={value:null,needsUpdate:!1};this.uniform=h,this.numPlanes=0,this.numIntersection=0,this.init=function(m,v){const _=m.length!==0||v||s!==0||r;return r=v,s=m.length,_},this.beginShadows=function(){l=!0,g(null)},this.endShadows=function(){l=!1},this.setGlobalState=function(m,v){e=g(m,v,0)},this.setState=function(m,v,_){const M=m.clippingPlanes,T=m.clipIntersection,S=m.clipShadows,b=n.get(m);if(!r||M===null||M.length===0||l&&!S)l?g(null):d();else{const R=l?0:s,C=R*4;let P=b.clippingState||null;h.value=P,P=g(M,v,C,_);for(let U=0;U!==C;++U)P[U]=e[U];b.clippingState=P,this.numIntersection=T?this.numPlanes:0,this.numPlanes+=R}};function d(){h.value!==e&&(h.value=e,h.needsUpdate=s>0),t.numPlanes=s,t.numIntersection=0}function g(m,v,_,M){const T=m!==null?m.length:0;let S=null;if(T!==0){if(S=h.value,M!==!0||S===null){const b=_+T*4,R=v.matrixWorldInverse;f.getNormalMatrix(R),(S===null||S.length<b)&&(S=new Float32Array(b));for(let C=0,P=_;C!==T;++C,P+=4)u.copy(m[C]).applyMatrix4(R,f),u.normal.toArray(S,P),S[P+3]=u.constant}h.value=S,h.needsUpdate=!0}return t.numPlanes=T,t.numIntersection=0,S}}function HI(n){let t=new WeakMap;function e(u,f){return f===$0?u.mapping=Xr:f===tg&&(u.mapping=ml),u}function s(u){if(u&&u.isTexture){const f=u.mapping;if(f===$0||f===tg)if(t.has(u)){const h=t.get(u).texture;return e(h,u.mapping)}else{const h=u.image;if(h&&h.height>0){const d=new $2(h.height);return d.fromEquirectangularTexture(n,u),t.set(u,d),u.addEventListener("dispose",r),e(d.texture,u.mapping)}else return null}}return u}function r(u){const f=u.target;f.removeEventListener("dispose",r);const h=t.get(f);h!==void 0&&(t.delete(f),h.dispose())}function l(){t=new WeakMap}return{get:s,dispose:l}}const er=4,pM=[.125,.215,.35,.446,.526,.582],zr=20,kI=256,Dc=new Zx,mM=new Fe;let s0=null,a0=0,r0=0,o0=!1;const GI=new et;class gM{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(t,e=0,s=.1,r=100,l={}){const{size:u=256,position:f=GI}=l;s0=this._renderer.getRenderTarget(),a0=this._renderer.getActiveCubeFace(),r0=this._renderer.getActiveMipmapLevel(),o0=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(u);const h=this._allocateTargets();return h.depthBuffer=!0,this._sceneToCubeUV(t,s,r,h,f),e>0&&this._blur(h,0,0,e),this._applyPMREM(h),this._cleanup(h),h}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=yM(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=vM(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t<this._lodMeshes.length;t++)this._lodMeshes[t].geometry.dispose()}_cleanup(t){this._renderer.setRenderTarget(s0,a0,r0),this._renderer.xr.enabled=o0,t.scissorTest=!1,Jo(t,0,0,t.width,t.height)}_fromTexture(t,e){t.mapping===Xr||t.mapping===ml?this._setSize(t.image.length===0?16:t.image[0].width||t.image[0].image.width):this._setSize(t.image.width/4),s0=this._renderer.getRenderTarget(),a0=this._renderer.getActiveCubeFace(),r0=this._renderer.getActiveMipmapLevel(),o0=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const s=e||this._allocateTargets();return this._textureToCubeUV(t,s),this._applyPMREM(s),this._cleanup(s),s}_allocateTargets(){const t=3*Math.max(this._cubeSize,112),e=4*this._cubeSize,s={magFilter:ni,minFilter:ni,generateMipmaps:!1,type:pa,format:os,colorSpace:xl,depthBuffer:!1},r=xM(t,e,s);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==t||this._pingPongRenderTarget.height!==e){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=xM(t,e,s);const{_lodMax:l}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=jI(l)),this._blurMaterial=XI(l,t,e),this._ggxMaterial=WI(l,t,e)}return r}_compileMaterial(t){const e=new xa(new Ki,t);this._renderer.compile(e,Dc)}_sceneToCubeUV(t,e,s,r,l){const h=new Di(90,1,e,s),d=[1,-1,1,1,1,1],g=[1,1,1,-1,-1,-1],m=this._renderer,v=m.autoClear,_=m.toneMapping;m.getClearColor(mM),m.toneMapping=As,m.autoClear=!1,m.state.buffers.depth.getReversed()&&(m.setRenderTarget(r),m.clearDepth(),m.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new xa(new lu,new Y2({name:"PMREM.Backgroun
3792d",side:yi,depthWrite:!1,depthTest:!1})));const T=this._backgroundBox,S=T.material;let b=!1;const R=t.background;R?R.isColor&&(S.color.copy(R),t.background=null,b=!0):(S.color.copy(mM),b=!0);for(let C=0;C<6;C++){const P=C%3;P===0?(h.up.set(0,d[C],0),h.position.set(l.x,l.y,l.z),h.lookAt(l.x+g[C],l.y,l.z)):P===1?(h.up.set(0,0,d[C]),h.position.set(l.x,l.y,l.z),h.lookAt(l.x,l.y+g[C],l.z)):(h.up.set(0,d[C],0),h.position.set(l.x,l.y,l.z),h.lookAt(l.x,l.y,l.z+g[C]));const U=this._cubeSize;Jo(r,P*U,C>2?U:0,U,U),m.setRenderTarget(r),b&&m.render(T,h),m.render(t,h)}m.toneMapping=_,m.autoClear=v,t.background=R}_textureToCubeUV(t,e){const s=this._renderer,r=t.mapping===Xr||t.mapping===ml;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=yM()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=vM());const l=r?this._cubemapMaterial:this._equirectMaterial,u=this._lodMeshes[0];u.material=l;const f=l.uniforms;f.envMap.value=t;const h=this._cubeSize;Jo(e,0,0,3*h,2*h),s.setRenderTarget(e),s.render(u,Dc)}_applyPMREM(t){const e=this._renderer,s=e.autoClear;e.autoClear=!1;const r=this._lodMeshes.length;for(let l=1;l<r;l++)this._applyGGXFilter(t,l-1,l);e.autoClear=s}_applyGGXFilter(t,e,s){const r=this._renderer,l=this._pingPongRenderTarget,u=this._ggxMaterial,f=this._lodMeshes[s];f.material=u;const h=u.uniforms,d=s/(this._lodMeshes.length-1),g=e/(this._lodMeshes.length-1),m=Math.sqrt(d*d-g*g),v=0+d*1.25,_=m*v,{_lodMax:M}=this,T=this._sizeLods[s],S=3*T*(s>M-er?s-M+er:0),b=4*(this._cubeSize-T);h.envMap.value=t.texture,h.roughness.value=_,h.mipInt.value=M-e,Jo(l,S,b,3*T,2*T),r.setRenderTarget(l),r.render(f,Dc),h.envMap.value=l.texture,h.roughness.value=0,h.mipInt.value=M-s,Jo(t,S,b,3*T,2*T),r.setRenderTarget(t),r.render(f,Dc)}_blur(t,e,s,r,l){const u=this._pingPongRenderTarget;this._halfBlur(t,u,e,s,r,"latitudinal",l),this._halfBlur(u,t,s,s,r,"longitudinal",l)}_halfBlur(t,e,s,r,l,u,f){const h=this._renderer,d=this._blurMaterial;u!=="latitudinal"&&u!=="longitudinal"&&Oe("blur direction must be either latitudinal or longitudinal!");const g=3,m=this._lodMeshes[r];m.material=d;const v=d.uniforms,_=this._sizeLods[s]-1,M=isFinite(l)?Math.PI/(2*_):2*Math.PI/(2*zr-1),T=l/M,S=isFinite(l)?1+Math.floor(g*T):zr;S>zr&&fe(`sigmaRadians, ${l}, is too large and will clip, as it requested ${S} samples when the maximum is set to ${zr}`);const b=[];let R=0;for(let L=0;L<zr;++L){const z=L/T,w=Math.exp(-z*z/2);b.push(w),L===0?R+=w:L<S&&(R+=2*w)}for(let L=0;L<b.length;L++)b[L]=b[L]/R;v.envMap.value=t.texture,v.samples.value=S,v.weights.value=b,v.latitudinal.value=u==="latitudinal",f&&(v.poleAxis.value=f);const{_lodMax:C}=this;v.dTheta.value=M,v.mipInt.value=C-s;const P=this._sizeLods[r],U=3*P*(r>C-er?r-C+er:0),F=4*(this._cubeSize-P);Jo(e,U,F,3*P,2*P),h.setRenderTarget(e),h.render(m,Dc)}}function jI(n){const t=[],e=[],s=[];let r=n;const l=n-er+1+pM.length;for(let u=0;u<l;u++){const f=Math.pow(2,r);t.push(f);let h=1/f;u>n-er?h=pM[u-n+er-1]:u===0&&(h=0),e.push(h);const d=1/(f-2),g=-d,m=1+d,v=[g,g,m,g,m,m,g,g,m,m,g,m],_=6,M=6,T=3,S=2,b=1,R=new Float32Array(T*M*_),C=new Float32Array(S*M*_),P=new Float32Array(b*M*_);for(let F=0;F<_;F++){const L=F%3*2/3-1,z=F>2?0:-1,w=[L,z,0,L+2/3,z,0,L+2/3,z+1,0,L,z,0,L+2/3,z+1,0,L,z+1,0];R.set(w,T*M*F),C.set(v,S*M*F);const O=[F,F,F,F,F,F];P.set(O,b*M*F)}const U=new Ki;U.setAttribute("position",new ls(R,T)),U.setAttribute("uv",new ls(C,S)),U.setAttribute("faceIndex",new ls(P,b)),s.push(new xa(U,null)),r>er&&r--}return{lodMeshes:s,sizeLods:t,sigmas:e}}function xM(n,t,e){const s=new ws(n,t,e);return s.texture.mapping=Yd,s.texture.name="PMREM.cubeUv",s.scissorTest=!0,s}function Jo(n,t,e,s,r){n.viewport.set(t,e,s,r),n.scissor.set(t,e,s,r)}function WI(n,t,e){return new Ds({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:kI,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:Qd(),fragmentShader:` 3793 3794 precision highp float; 3795 precision highp int; 3796 3797 varying vec3 vOutputDirection; 3798 3799 uniform sampler2D envMap; 3800 uniform float roughness; 3801 uniform float mipInt; 3802 3803 #define ENVMAP_TYPE_CUBE_UV 3804 #include <cube_uv_reflection_fragment> 3805 3806 #define PI 3.14159265359 3807 3808 // Van der Corput radical inverse 3809 float radicalInverse_VdC(uint bits) { 3810 bits = (bits << 16u) | (bits >> 16u); 3811 bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 3812 bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 3813 bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 3814 bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 3815 return float(bits) * 2.3283064365386963e-10; // / 0x100000000 3816 } 3817 3818 // Hammersley sequence 3819 vec2 hammersley(uint i, uint N) { 3820 return vec2(float(i) / float(N), radicalInverse_VdC(i)); 3821 } 3822 3823 // GGX VNDF importance sampling (Eric Heitz 2018) 3824 // "Sampling the GGX Distribution of Visible Normals" 3825 // https://jcgt.org/published/0007/04/01/ 3826 vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { 3827 float alpha = roughness * roughness; 3828 3829 // Section 3.2: Transform view direction to hemisphere configuration 3830 vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z)); 3831 3832 // Section 4.1: Orthonormal basis 3833 float lensq = Vh.x * Vh.x + Vh.y * Vh.y; 3834 vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0); 3835 vec3 T2 = cross(Vh, T1); 3836 3837 // Section 4.2: Parameterization of projected area 3838 float r = sqrt(Xi.x); 3839 float phi = 2.0 * PI * Xi.y; 3840 float t1 = r * cos(phi); 3841 float t2 = r * sin(phi); 3842 float s = 0.5 * (1.0 + Vh.z); 3843 t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; 3844 3845 // Section 4.3: Reprojection onto hemisphere 3846 vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh; 3847 3848 // Section 3.4: Transform back to ellipsoid configuration 3849 return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); 3850 } 3851 3852 void main() { 3853 vec3 N = normalize(vOutputDirection); 3854 vec3 V = N; // Assume view direction equals normal for pre-filtering 3855 3856 vec3 prefilteredColor = vec3(0.0); 3857 float totalWeight = 0.0; 3858 3859 // For very low roughness, just sample the environment directly 3860 if (roughness < 0.001) { 3861 gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); 3862 return; 3863 } 3864 3865 // Tangent space basis for VNDF sampling 3866 vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 3867 vec3 tangent = normalize(cross(up, N)); 3868 vec3 bitangent = cross(N, tangent); 3869
3870 for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { 3871 vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); 3872 3873 // For PMREM, V = N, so in tangent space V is always (0, 0, 1) 3874 vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); 3875 3876 // Transform H back to world space 3877 vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); 3878 vec3 L = normalize(2.0 * dot(V, H) * H - V); 3879 3880 float NdotL = max(dot(N, L), 0.0); 3881 3882 if(NdotL > 0.0) { 3883 // Sample environment at fixed mip level 3884 // VNDF importance sampling handles the distribution filtering 3885 vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); 3886 3887 // Weight by NdotL for the split-sum approximation 3888 // VNDF PDF naturally accounts for the visible microfacet distribution 3889 prefilteredColor += sampleColor * NdotL; 3890 totalWeight += NdotL; 3891 } 3892 } 3893 3894 if (totalWeight > 0.0) { 3895 prefilteredColor = prefilteredColor / totalWeight; 3896 } 3897 3898 gl_FragColor = vec4(prefilteredColor, 1.0); 3899 } 3900 `,blending:la,depthTest:!1,depthWrite:!1})}function XI(n,t,e){const s=new Float32Array(zr),r=new et(0,1,0);return new Ds({name:"SphericalGaussianBlur",defines:{n:zr,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:s},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:Qd(),fragmentShader:` 3901 3902 precision mediump float; 3903 precision mediump int; 3904 3905 varying vec3 vOutputDirection; 3906 3907 uniform sampler2D envMap; 3908 uniform int samples; 3909 uniform float weights[ n ]; 3910 uniform bool latitudinal; 3911 uniform float dTheta; 3912 uniform float mipInt; 3913 uniform vec3 poleAxis; 3914 3915 #define ENVMAP_TYPE_CUBE_UV 3916 #include <cube_uv_reflection_fragment> 3917 3918 vec3 getSample( float theta, vec3 axis ) { 3919 3920 float cosTheta = cos( theta ); 3921 // Rodrigues' axis-angle rotation 3922 vec3 sampleDirection = vOutputDirection * cosTheta 3923 + cross( axis, vOutputDirection ) * sin( theta ) 3924 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3925 3926 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3927 3928 } 3929 3930 void main() { 3931 3932 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3933 3934 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3935 3936 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3937 3938 } 3939 3940 axis = normalize( axis ); 3941 3942 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3943 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3944 3945 for ( int i = 1; i < n; i++ ) { 3946 3947 if ( i >= samples ) { 3948 3949 break; 3950 3951 } 3952 3953 float theta = dTheta * float( i ); 3954 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3955 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3956 3957 } 3958 3959 } 3960 `,blending:la,depthTest:!1,depthWrite:!1})}function vM(){return new Ds({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Qd(),fragmentShader:` 3961 3962 precision mediump float; 3963 precision mediump int; 3964 3965 varying vec3 vOutputDirection; 3966 3967 uniform sampler2D envMap; 3968 3969 #include <common> 3970 3971 void main() { 3972 3973 vec3 outputDirection = normalize( vOutputDirection ); 3974 vec2 uv = equirectUv( outputDirection ); 3975 3976 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3977 3978 } 3979 `,blending:la,depthTest:!1,depthWrite:!1})}function yM(){return new Ds({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Qd(),fragmentShader:` 3980 3981 precision mediump float; 3982 precision mediump int; 3983 3984 uniform float flipEnvMap; 3985 3986 varying vec3 vOutputDirection; 3987 3988 uniform samplerCube envMap; 3989 3990 void main() { 3991 3992 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3993 3994 } 3995 `,blending:la,depthTest:!1,depthWrite:!1})}function Qd(){return` 3996 3997 precision mediump float; 3998 precision mediump int; 3999 4000 attribute float faceIndex; 4001 4002 varying vec3 vOutputDirection; 4003 4004 // RH coordinate system; PMREM face-indexing convention 4005 vec3 getDirection( vec2 uv, float face ) { 4006 4007 uv = 2.0 * uv - 1.0; 4008 4009 vec3 direction = vec3( uv, 1.0 ); 4010 4011 if ( face == 0.0 ) { 4012 4013 direction = direction.zyx; // ( 1, v, u ) pos x 4014 4015 } else if ( face == 1.0 ) { 4016 4017 direction = direction.xzy; 4018 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 4019 4020 } else if ( face == 2.0 ) { 4021 4022 direction.x *= -1.0; // ( -u, v, 1 ) pos z 4023 4024 } else if ( face == 3.0 ) { 4025 4026 direction = direction.zyx; 4027 direction.xz *= -1.0; // ( -1, v, -u ) neg x 4028 4029 } else if ( face == 4.0 ) { 4030 4031 direction = direction.xzy; 4032 direction.xy *= -1.0; // ( -u, -1, v ) neg y 4033 4034 } else if ( face == 5.0 ) { 4035 4036 direction.z *= -1.0; // ( u, v, -1 ) neg z 4037 4038 } 4039 4040 return direction; 4041 4042 } 4043 4044 void main() { 4045 4046 vOutputDirection = getDirection( uv, faceIndex ); 4047 gl_Position = vec4( position, 1.0 ); 4048 4049 } 4050 `}function YI(n){let t=new WeakMap,e=null;function s(f){if(f&&f.isTexture){const h=f.mapping,d=h===$0||h===tg,g=h===Xr||h===ml;if(d||g){let m=t.get(f);const v=m!==void 0?m.texture.pmremVersion:0;if(f.isRenderTargetTexture&&f.pmremVersion!==v)return e===null&&(e=new gM(n)),m=d?e.fromEquirectangular(f,m):e.fromCubemap(f,m),m.texture.pmremVersion=f.pmremVersion,t.set(f,m),m.texture;if(m!==void 0)return m.texture;{const _=f.image;return d&&_&&_.height>0||g&&_&&r(_)?(e===null&&(e=new gM(n)),m=d?e.fromEquirectangular(f):e.fromCubemap(f),m.texture.pmremVersion=f.pmremVersion,t.set(f,m),f.addEventListener("dispose",l),m.texture):null}}}return f}function r(f){let h=0;const d=6;for(let g=0;g<d;g++)f[g]!==void 0&&h++;return h===d}function l(f){const h=f.target;h.removeEventListener("dispose",l);const d=t.get(h);d!==void 0&&(t.delete(h),d.dispose())}
vendor: 22,687 bytes, lines 4050-4127
4050function u(){t=new WeakMap,e!==null&&(e.dispose(),e=null)}return{get:s,dispose:u}}function qI(n){const t={};function e(s){if(t[s]!==void 0)return t[s];const r=n.getExtension(s);return t[s]=r,r}return{has:function(s){return e(s)!==null},init:function(){e("EXT_color_buffer_float"),e("WEBGL_clip_cull_distance"),e("OES_texture_float_linear"),e("EXT_color_buffer_half_float"),e("WEBGL_multisampled_render_to_texture"),e("WEBGL_render_shared_exponent")},get:function(s){const r=e(s);return r===null&&$c("WebGLRenderer: "+s+" extension not supported."),r}}}function ZI(n,t,e,s){const r={},l=new WeakMap;function u(m){const v=m.target;v.index!==null&&t.remove(v.index);for(const M in v.attributes)t.remove(v.attributes[M]);v.removeEventListener("dispose",u),delete r[v.id];const _=l.get(v);_&&(t.remove(_),l.delete(v)),s.releaseStatesOfGeometry(v),v.isInstancedBufferGeometry===!0&&delete v._maxInstanceCount,e.memory.geometries--}function f(m,v){return r[v.id]===!0||(v.addEventListener("dispose",u),r[v.id]=!0,e.memory.geometries++),v}function h(m){const v=m.attributes;for(const _ in v)t.update(v[_],n.ARRAY_BUFFER)}function d(m){const v=[],_=m.index,M=m.attributes.position;let T=0;if(_!==null){const R=_.array;T=_.version;for(let C=0,P=R.length;C<P;C+=3){const U=R[C+0],F=R[C+1],L=R[C+2];v.push(U,F,F,L,L,U)}}else if(M!==void 0){const R=M.array;T=M.version;for(let C=0,P=R.length/3-1;C<P;C+=3){const U=C+0,F=C+1,L=C+2;v.push(U,F,F,L,L,U)}}else return;const S=new(j2(v)?Z2:q2)(v,1);S.version=T;const b=l.get(m);b&&t.remove(b),l.set(m,S)}function g(m){const v=l.get(m);if(v){const _=m.index;_!==null&&v.version<_.version&&d(m)}else d(m);return l.get(m)}return{get:f,update:h,getWireframeAttribute:g}}function KI(n,t,e){let s;function r(v){s=v}let l,u;function f(v){l=v.type,u=v.bytesPerElement}function h(v,_){n.drawElements(s,_,l,v*u),e.update(_,s,1)}function d(v,_,M){M!==0&&(n.drawElementsInstanced(s,_,l,v*u,M),e.update(_,s,M))}function g(v,_,M){if(M===0)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(s,_,0,l,v,0,M);let S=0;for(let b=0;b<M;b++)S+=_[b];e.update(S,s,1)}function m(v,_,M,T){if(M===0)return;const S=t.get("WEBGL_multi_draw");if(S===null)for(let b=0;b<v.length;b++)d(v[b]/u,_[b],T[b]);else{S.multiDrawElementsInstancedWEBGL(s,_,0,l,v,0,T,0,M);let b=0;for(let R=0;R<M;R++)b+=_[R]*T[R];e.update(b,s,1)}}this.setMode=r,this.setIndex=f,this.render=h,this.renderInstances=d,this.renderMultiDraw=g,this.renderMultiDrawInstances=m}function QI(n){const t={geometries:0,textures:0},e={frame:0,calls:0,triangles:0,points:0,lines:0};function s(l,u,f){switch(e.calls++,u){case n.TRIANGLES:e.triangles+=f*(l/3);break;case n.LINES:e.lines+=f*(l/2);break;case n.LINE_STRIP:e.lines+=f*(l-1);break;case n.LINE_LOOP:e.lines+=f*l;break;case n.POINTS:e.points+=f*l;break;default:Oe("WebGLInfo: Unknown draw mode:",u);break}}function r(){e.calls=0,e.triangles=0,e.points=0,e.lines=0}return{memory:t,render:e,programs:null,autoReset:!0,reset:r,update:s}}function JI(n,t,e){const s=new WeakMap,r=new xn;function l(u,f,h){const d=u.morphTargetInfluences,g=f.morphAttributes.position||f.morphAttributes.normal||f.morphAttributes.color,m=g!==void 0?g.length:0;let v=s.get(f);if(v===void 0||v.count!==m){let O=function(){z.dispose(),s.delete(f),f.removeEventListener("dispose",O)};var _=O;v!==void 0&&v.texture.dispose();const M=f.morphAttributes.position!==void 0,T=f.morphAttributes.normal!==void 0,S=f.morphAttributes.color!==void 0,b=f.morphAttributes.position||[],R=f.morphAttributes.normal||[],C=f.morphAttributes.color||[];let P=0;M===!0&&(P=1),T===!0&&(P=2),S===!0&&(P=3);let U=f.attributes.position.count*P,F=1;U>t.maxTextureSize&&(F=Math.ceil(U/t.maxTextureSize),U=t.maxTextureSize);const L=new Float32Array(U*F*4*m),z=new W2(L,U,F,m);z.type=bs,z.needsUpdate=!0;const w=P*4;for(let j=0;j<m;j++){const Q=b[j],Z=R[j],rt=C[j],ot=U*F*4*j;for(let I=0;I<Q.count;I++){const V=I*w;M===!0&&(r.fromBufferAttribute(Q,I),L[ot+V+0]=r.x,L[ot+V+1]=r.y,L[ot+V+2]=r.z,L[ot+V+3]=0),T===!0&&(r.fromBufferAttribute(Z,I),L[ot+V+4]=r.x,L[ot+V+5]=r.y,L[ot+V+6]=r.z,L[ot+V+7]=0),S===!0&&(r.fromBufferAttribute(rt,I),L[ot+V+8]=r.x,L[ot+V+9]=r.y,L[ot+V+10]=r.z,L[ot+V+11]=rt.itemSize===4?r.w:1)}}v={count:m,texture:z,size:new ce(U,F)},s.set(f,v),f.addEventListener("dispose",O)}if(u.isInstancedMesh===!0&&u.morphTexture!==null)h.getUniforms().setValue(n,"morphTexture",u.morphTexture,e);else{let M=0;for(let S=0;S<d.length;S++)M+=d[S];const T=f.morphTargetsRelative?1:1-M;h.getUniforms().setValue(n,"morphTargetBaseInfluence",T),h.getUniforms().setValue(n,"morphTargetInfluences",d)}h.getUniforms().setValue(n,"morphTargetsTexture",v.texture,e),h.getUniforms().setValue(n,"morphTargetsTextureSize",v.size)}return{update:l}}function $I(n,t,e,s){let r=new WeakMap;function l(h){const d=s.render.frame,g=h.geometry,m=t.get(h,g);if(r.get(m)!==d&&(t.update(m),r.set(m,d)),h.isInstancedMesh&&(h.hasEventListener("dispose",f)===!1&&h.addEventListener("dispose",f),r.get(h)!==d&&(e.update(h.instanceMatrix,n.ARRAY_BUFFER),h.instanceColor!==null&&e.update(h.instanceColor,n.ARRAY_BUFFER),r.set(h,d))),h.isSkinnedMesh){const v=h.skeleton;r.get(v)!==d&&(v.update(),r.set(v,d))}return m}function u(){r=new WeakMap}function f(h){const d=h.target;d.removeEventListener("dispose",f),e.remove(d.instanceMatrix),d.instanceColor!==null&&e.remove(d.instanceColor)}return{update:l,dispose:u}}const tz={[D2]:"LINEAR_TONE_MAPPING",[N2]:"REINHARD_TONE_MAPPING",[L2]:"CINEON_TONE_MAPPING",[Ox]:"ACES_FILMIC_TONE_MAPPING",[U2]:"AGX_TONE_MAPPING",[O2]:"NEUTRAL_TONE_MAPPING",[P2]:"CUSTOM_TONE_MAPPING"};function ez(n,t,e,s,r){const l=new ws(t,e,{type:n,depthBuffer:s,stencilBuffer:r}),u=new ws(t,e,{type:pa,depthBuffer:!1,stencilBuffer:!1}),f=new Ki;f.setAttribute("position",new Pi([-1,3,0,-1,-1,0,3,-1,0],3)),f.setAttribute("uv",new Pi([0,2,0,0,2,0],2));const h=new zO({uniforms:{tDiffuse:{value:null}},vertexShader:` 4051 precision highp float; 4052 4053 uniform mat4 modelViewMatrix; 4054 uniform mat4 projectionMatrix; 4055 4056 attribute vec3 position; 4057 attribute vec2 uv; 4058 4059 varying vec2 vUv; 4060 4061 void main() { 4062 vUv = uv; 4063 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4064 }`,fragmentShader:` 4065 precision highp float; 4066 4067 uniform sampler2D tDiffuse; 4068 4069 varying vec2 vUv; 4070 4071 #include <tonemapping_pars_fragment> 4072 #include <colorspace_pars_fragment> 4073 4074 void main() { 4075 gl_FragColor = texture2D( tDiffuse, vUv ); 4076 4077 #ifdef LINEAR_TONE_MAPPING 4078 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 4079 #elif defined( REINHARD_TONE_MAPPING ) 4080 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 4081 #elif defined( CINEON_TONE_MAPPING ) 4082 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 4083 #elif defined( ACES_FILMIC_TONE_MAPPING ) 4084 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 4085 #elif defined( AGX_TONE_MAPPING ) 4086 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 4087 #elif defined( NEUTRAL_TONE_MAPPING ) 4088 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 4089 #elif defined( CUSTOM_TONE_MAPPING ) 4090 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 4091 #endif 4092 4093 #ifdef SRGB_TRANSFER 4094 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 4095 #endif 4096 }`,depthTest:!1,depthWrite:!1}),d=new xa(f,h),g=new Zx(-1,1,1,-1,0,1);let m=null,v=null,_=!1,M,T=null,S=[],b=!1;this.setSize=function(R,C){l.setSize(R,C),u.setSize(R,C);for(let P=0;P<S.length;P++){const U=S[P];U.setSize&&U.setSize(R,C)}},this.setEffects=function(R){S=R,b=S.length>0&&S[0].isRenderPass===!0;const C=l.width,P=l.height;for(let U=0;U<S.length;U++){const F=S[U];F.setSize&&F.setSize(C,P)}},this.begin=function(R,C){if(_||R.toneMapping===As&&S.length===0)return!1;if(T=C,C!==null){const P=C.width,U=C.height;(l.width!==P||l.height!==U)&&this.setSize(P,U)}return b===!1&&R.setRenderTarget(l),M=R.toneMapping,R.toneMapping=As,!0},this.hasRenderPass=function(){return b},this.end=function(R,C){R.toneMapping=M,_=!0;let P=l,U=u;for(let F=0;F<S.length;F++){const L=S[F];if(L.enabled!==!1&&(L.render(R,U,P,C),L.needsSwap!==!1)){const z=P;P=U,U=z}}if(m!==R.outputColorSpace||v!==R.toneMapping){m=R.outputColorSpace,v=R.toneMapping,h.defines={},ze.getTransfer(m)===Ze&&(h.defines.SRGB_TRANSFER="");const F=tz[v];F&&(h.defines[F]=""),h.needsUpdate=!0}h.uniforms.tDiffuse.value=P.texture,R.setRenderTarget(T),R.render(d,g),T=null,_=!1},this.isCompositing=function(){return _},this.dispose=function(){l.dispose(),u.dispose(),f.dispose(),h.dispose()}}const aA=new ii,Bg=new tu(1,1),rA=new W2,oA=new fO,lA=new J2,_M=[],bM=[],SM=new Float32Array(16),MM=new Float32Array(9),EM=new Float32Array(4);function Cl(n,t,e){const s=n[0];if(s<=0||s>0)return n;const r=t*e;let l=_M[r];if(l===void 0&&(l=new Float32Array(r),_M[r]=l),t!==0){s.toArray(l,0);for(let u=1,f=0;u!==t;++u)f+=e,n[u].toArray(l,f)}return l}function Ln(n,t){if(n.length!==t.length)return!1;for(let e=0,s=n.length;e<s;e++)if(n[e]!==t[e])return!1;return!0}function Pn(n,t){for(let e=0,s=t.length;e<s;e++)n[e]=t[e]}function Jd(n,t){let e=bM[t];e===void 0&&(e=new Int32Array(t),bM[t]=e);for(let s=0;s!==t;++s)e[s]=n.allocateTextureUnit();return e}function nz(n,t){const e=this.cache;e[0]!==t&&(n.uniform1f(this.addr,t),e[0]=t)}function iz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(n.uniform2f(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Ln(e,t))return;n.uniform2fv(this.addr,t),Pn(e,t)}}function sz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(n.uniform3f(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else if(t.r!==void 0)(e[0]!==t.r||e[1]!==t.g||e[2]!==t.b)&&(n.uniform3f(this.addr,t.r,t.g,t.b),e[0]=t.r,e[1]=t.g,e[2]=t.b);else{if(Ln(e,t))return;n.uniform3fv(this.addr,t),Pn(e,t)}}function az(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(n.uniform4f(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Ln(e,t))return;n.uniform4fv(this.addr,t),Pn(e,t)}}function rz(n,t){const e=this.cache,s=t.elements;if(s===void 0){if(Ln(e,t))return;n.uniformMatrix2fv(this.addr,!1,t),Pn(e,t)}else{if(Ln(e,s))return;EM.set(s),n.uniformMatrix2fv(this.addr,!1,EM),Pn(e,s)}}function oz(n,t){const e=this.cache,s=t.elements;if(s===void 0){if(Ln(e,t))return;n.uniformMatrix3fv(this.addr,!1,t),Pn(e,t)}else{if(Ln(e,s))return;MM.set(s),n.uniformMatrix3fv(this.addr,!1,MM),Pn(e,s)}}function lz(n,t){const e=this.cache,s=t.elements;if(s===void 0){if(Ln(e,t))return;n.uniformMatrix4fv(this.addr,!1,t),Pn(e,t)}else{if(Ln(e,s))return;SM.set(s),n.uniformMatrix4fv(this.addr,!1,SM),Pn(e,s)}}function cz(n,t){const e=this.cache;e[0]!==t&&(n.uniform1i(this.addr,t),e[0]=t)}function uz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(n.uniform2i(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Ln(e,t))return;n.uniform2iv(this.addr,t),Pn(e,t)}}function fz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(n.uniform3i(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else{if(Ln(e,t))return;n.uniform3iv(this.addr,t),Pn(e,t)}}function dz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(n.uniform4i(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Ln(e,t))return;n.uniform4iv(this.addr,t),Pn(e,t)}}function hz(n,t){const e=this.cache;e[0]!==t&&(n.uniform1ui(this.addr,t),e[0]=t)}function pz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(n.uniform2ui(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Ln(e,t))return;n.uniform2uiv(this.addr,t),Pn(e,t)}}function mz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(n.uniform3ui(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else{if(Ln(e,t))return;n.uniform3uiv(this.addr,t),Pn(e,t)}}function gz(n,t){const e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(n.uniform4ui(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Ln(e,t))return;n.uniform4uiv(this.addr,t),Pn(e,t)}}function xz(n,t,e){const s=this.cache,r=e.allocateTextureUnit();s[0]!==r&&(n.uniform1i(this.addr,r),s[0]=r);let l;this.type===n.SAMPLER_2D_SHADOW?(Bg.compareFunction=e.isReversedDepthBuffer()?Gx:kx,l=Bg):l=aA,e.setTexture2D(t||l,r)}function vz(n,t,e){const s=this.cache,r=e.allocateTextureUnit();s[0]!==r&&(n.uniform1i(this.addr,r),s[0]=r),e.setTexture3D(t||oA,r)}function yz(n,t,e){const s=this.cache,r=e.allocateTextureUnit();s[0]!==r&&(n.uniform1i(this.addr,r),s[0]=r),e.setTextureCube(t||lA,r)}function _z(n,t,e){const s=this.cache,r=e.allocateTextureUnit();s[0]!==r&&(n.uniform1i(this.addr,r),s[0]=r),e.setTexture2DArray(t||rA,r)}function bz(n){switch(n){case 5126:return nz;case 35664:return iz;case 35665:return sz;case 35666:return az;case 35674:return rz;case 35675:return oz;case 35676:return lz;case 5124:case 35670:return cz;case 35667:case 35671:return uz;case 35668:case 35672:return fz;case 35669:case 35673:return dz;case 5125:return hz;case 36294:return pz;case 36295:return mz;case 36296:return gz;case 35678:case 36198:case 36298:case 36306:case 35682:return xz;case 35679:case 36299:case 36307:return vz;case 35680:case 36300:case 36308:case 36293:return yz;case 36289:case 36303:case 36311:case 36292:return _z}}function Sz(n,t){n.uniform1fv(this.addr,t)}function Mz(n,t){const e=Cl(t,this.size,2);n.uniform2fv(this.addr,e)}function Ez(n,t){const e=Cl(t,this.size,3);n.uniform3fv(this.addr,e)}function Tz(n,t){const e=Cl(t,this.size,4);n.uniform4fv(this.addr,e)}function Az(n,t){const e=Cl(t,this.size,4);n.uniformMatrix2fv(this.addr,!1,e)}function wz(n,t){const e=Cl(t,this.size,9);n.uniformMatrix3fv(this.addr,!1,e)}function Cz(n,t){const e=Cl(t,this.size,16);n.uniformMatrix4fv(this.addr,!1,e)}function Rz(n,t){n.uniform1iv(this.addr,t)}function Dz(n,t){n.uniform2iv(this.addr,t)}function Nz(n,t){n.uniform3iv(this.addr,t)}function Lz(n,t){n.uniform4iv(this.addr,t)}function Pz(n,t){n.uniform1uiv(this.addr,t)}function Uz(n,t){n.uniform2uiv(this.addr,t)}function Oz(n,t){n.uniform3uiv(this.addr,t)}function Fz(n,t){n.uniform4uiv(this.addr,t)}function Iz(n,t,e){const s=this.cache,r=t.length,l=Jd(e,r);Ln(s,l)||(n.uniform1iv(this.addr,l),Pn(s,l));let u;this.type===n.SAMPLER_2D_SHADOW?u=Bg:u=aA;for(let f=0;f!==r;++f)e.setTexture2D(t[f]||u,l[f])}function zz(n,t,e){const s=this.cache,r=t.length,l=Jd(e,r);Ln(s,l)||(n.uniform1iv(this.addr,l),Pn(s,l));for(let u=0;u!==r;++u)e.setTexture3D(t[u]||oA,l[u])}function Bz(n,t,e){const s=this.cache,r=t.length,l=Jd(e,r);Ln(s,l)||(n.uniform1iv(this.addr,l),Pn(s,l));for(let u=0;u!==r;++u)e.setTextureCube(t[u]||lA,l[u])}function Vz(n,t,e){const s=this.cache,r=t.length,l=Jd(e,r);Ln(s,l)||(n.uniform1iv(this.addr,l),Pn(s,l));for(let u=0;u!==r;++u)e.setTexture2DArray(t[u]||rA,l[u])}function Hz(n){switch(n){case 5126:return Sz;case 35664:return Mz;case 35665:return Ez;case 35666:return Tz;case 35674:return Az;case 35675:return wz;case 35676:return Cz;case 5124:case 35670:return Rz;case 35667:case 35671:return Dz;case 35668:case 35672:return Nz;case 35669:case 35673:return Lz;case 5125:return Pz;case 36294:return Uz;case 36295:return Oz;case 36296:return Fz;case 35678:case 36198:case 36298:case 36306:case 35682:return Iz;case 35679:case 36299:case 36307:return zz;case 35680:case 36300:case 36308:case 36293:return Bz;case 36289:case 36303:case 36311:case 36292:return Vz}}class kz{constructor(t,e,s){this.id=t,this.addr=s,this.cache=[],this.type=e.type,this.setValue=bz(e.type)}}class Gz{constructor(t,e,s){this.id=t,this.addr=s,this.cache=[],this.type=e.type,this.size=e.size,this.setValue=Hz(e.type)}}class jz{constructor(t){this.id=t,this.seq=[],this.map={}}setValue(t,e,s){const r=this.seq;for(let l=0,u=r.length;l!==u;++l){const f=r[l];f.setValue(t,e[f.id],s)}}}const l0=/(\w+)(\])?(\[|\.)?/g;function TM(n,t){n.seq.push(t),n.map[t.id]=t}function Wz(n,t,e){const s=n.name,r=s.length;for(l0.lastIndex=0;;){const l=l0.exec(s),u=l0.lastIndex;let f=l[1];const h=l[2]==="]",d=l[3];if(h&&(f=f|0),d===void 0||d==="["&&u+2===r){TM(e,d===void 0?new kz(f,n,t):new Gz(f,n,t));break}else{let m=e.map[f];m===void 0&&(m=new jz(f),TM(e,m)),e=m}}}class md{constructor(t,e){this.seq=[],this.map={};const s=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let u=0;u<s;++u){const f=t.getActiveUniform(e,u),h=t.getUniformLocation(e,f.name);Wz(f,h,this)}const r=[],l=[];for(const u of this.seq)u.type===t.SAMPLER_2D_SHADOW||u.type===t.SAMPLER_CUBE_SHADOW||u.type===t.SAMPLER_2D_ARRAY_SHADOW?r.push(u):l.push(u);r.length>0&&(this.seq=r.concat(l))}setValue(t,e,s,r){const l=this.map[e];l!==void 0&&l.setValue(t,s,r)}setOptional(t,e,s){const r=e[s];r!==void 0&&this.setValue(t,s,r)}static upload(t,e,s,r){for(let l=0,u=e.length;l!==u;++l){const f=e[l],h=s[f.id];h.needsUpdate!==!1&&f.setValue(t,h.value,r)}}static seqWithValue(t,e){const s=[];for(let r=0,l=t.length;r!==l;++r){const u=t[r];u.id in e&&s.push(u)}return s}}function AM(n,t,e){const s=n.createShader(t);return n.shaderSource(s,e),n.compileShader(s),s}const Xz=37297;let Yz=0;function qz(n,t){const e=n.split(` 4097`),s=[],r=Math.max(t-6,0),l=Math.min(t+6,e.length);for(let u=r;u<l;u++){const f=u+1;s.push(`${f===t?">":" "} ${f}: ${e[u]}`)}return s.join(` 4098`)}const wM=new be;function Zz(n){ze._getMatrix(wM,ze.workingColorSpace,n);const t=`mat3( ${wM.elements.map(e=>e.toFixed(4))} )`;switch(ze.getTransfer(n)){case Ad:return[t,"LinearTransferOETF"];case Ze:return[t,"sRGBTransferOETF"];default:return fe("WebGLProgram: Unsupported color space: ",n),[t,"LinearTransferOETF"]}}function CM(n,t,e){const s=n.getShaderParameter(t,n.COMPILE_STATUS),l=(n.getShaderInfoLog(t)||"").trim();if(s&&l==="")return"";const u=/ERROR: 0:(\d+)/.exec(l);if(u){const f=parseInt(u[1]);return e.toUpperCase()+` 4099 4100`+l+` 4101 4102`+qz(n.getShaderSource(t),f)}else return l}function Kz(n,t){const e=Zz(t);return[`vec4 ${n}( vec4 value ) {`,` return ${e[1]}( vec4( value.rgb * ${e[0]}, value.a ) );`,"}"].join(` 4103`)}const Qz={[D2]:"Linear",[N2]:"Reinhard",[L2]:"Cineon",[Ox]:"ACESFilmic",[U2]:"AgX",[O2]:"Neutral",[P2]:"Custom"};function Jz(n,t){const e=Qz[t];return e===void 0?(fe("WebGLProgram: Unsupported toneMapping:",t),"vec3 "+n+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+n+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}const ed=new et;function $z(){ze.getLuminanceCoefficients(ed);const n=ed.x.toFixed(4),t=ed.y.toFixed(4),e=ed.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${n}, ${t}, ${e} );`," return dot( weights, rgb );","}"].join(` 4104`)}function tB(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Oc).join(` 4105`)}function eB(n){const t=[];for(const e in n){const s=n[e];s!==!1&&t.push("#define "+e+" "+s)}return t.join(` 4106`)}function nB(n,t){const e={},s=n.getProgramParameter(t,n.ACTIVE_ATTRIBUTES);for(let r=0;r<s;r++){const l=n.getActiveAttrib(t,r),u=l.name;let f=1;l.type===n.FLOAT_MAT2&&(f=2),l.type===n.FLOAT_MAT3&&(f=3),l.type===n.FLOAT_MAT4&&(f=4),e[u]={type:l.type,location:n.getAttribLocation(t,u),locationSize:f}}return e}function Oc(n){return n!==""}function RM(n,t){const e=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return n.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,e).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function DM(n,t){return n.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const iB=/^[ \t]*#include +<([\w\d./]+)>/gm;function Vg(n){return n.replace(iB,aB)}const sB=new Map;function aB(n,t){let e=Se[t];if(e===void 0){const s=sB.get(t);if(s!==void 0)e=Se[s],fe('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,s);else throw new Error("Can not resolve #include <"+t+">")}return Vg(e)}const rB=/#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 NM(n){return n.replace(rB,oB)}function oB(n,t,e,s){let r="";for(let l=parseInt(t);l<parseInt(e);l++)r+=s.replace(/\[\s*i\s*\]/g,"[ "+l+" ]").replace(/UNROLLED_LOOP_INDEX/g,l);return r}function LM(n){let t=`precision ${n.precision} float; 4107 precision ${n.precision} int; 4108 precision ${n.precision} sampler2D; 4109 precision ${n.precision} samplerCube; 4110 precision ${n.precision} sampler3D; 4111 precision ${n.precision} sampler2DArray; 4112 precision ${n.precision} sampler2DShadow; 4113 precision ${n.precision} samplerCubeShadow; 4114 precision ${n.precision} sampler2DArrayShadow; 4115 precision ${n.precision} isampler2D; 4116 precision ${n.precision} isampler3D; 4117 precision ${n.precision} isamplerCube; 4118 precision ${n.precision} isampler2DArray; 4119 precision ${n.precision} usampler2D; 4120 precision ${n.precision} usampler3D; 4121 precision ${n.precision} usamplerCube; 4122 precision ${n.precision} usampler2DArray; 4123 `;return n.precision==="highp"?t+=` 4124#define HIGH_PRECISION`:n.precision==="mediump"?t+=` 4125#define MEDIUM_PRECISION`:n.precision==="lowp"&&(t+=` 4126#define LOW_PRECISION`),t}const lB={[cd]:"SHADOWMAP_TYPE_PCF",[Uc]:"SHADOWMAP_TYPE_VSM"};function cB(n){return lB[n.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const uB={[Xr]:"ENVMAP_TYPE_CUBE",[ml]:"ENVMAP_TYPE_CUBE",[Yd]:"ENVMAP_TYPE_CUBE_UV"};function fB(n){return n.envMap===!1?"ENVMAP_TYPE_CUBE":uB[n.envMapMode]||"ENVMAP_TYPE_CUBE"}const dB={[ml]:"ENVMAP_MODE_REFRACTION"};function hB(n){return n.envMap===!1?"ENVMAP_MODE_REFLECTION":dB[n.envMapMode]||"ENVMAP_MODE_REFLECTION"}const pB={[R2]:"ENVMAP_BLENDING_MULTIPLY",[j5]:"ENVMAP_BLENDING_MIX",[W5]:"ENVMAP_BLENDING_ADD"};function mB(n){return n.envMap===!1?"ENVMAP_BLENDING_NONE":pB[n.combine]||"ENVMAP_BLENDING_NONE"}function gB(n){const t=n.envMapCubeUVHeight;if(t===null)return null;const e=Math.log2(t)-2,s=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,e),112)),texelHeight:s,maxMip:e}}function xB(n,t,e,s){const r=n.getContext(),l=e.defines;let u=e.vertexShader,f=e.fragmentShader;const h=cB(e),d=fB(e),g=hB(e),m=mB(e),v=gB(e),_=tB(e),M=eB(l),T=r.createProgram();let S,b,R=e.glslVersion?"#version "+e.glslVersion+` 4127`:"";e.isRawShaderMaterial?(S=["#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,M].filter(Oc
vendor: 5,504 bytes, lines 4127-4131
4127).join(` 4128`),S.length>0&&(S+=` 4129`),b=["#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,M].filter(Oc).join(` 4130`),b.length>0&&(b+=` 4131`)):(S=[LM(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,M,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.batchingColor?"#define USE_BATCHING_COLOR":"",e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.instancingMorph?"#define USE_INSTANCING_MORPH":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+g:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",e.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",e.displacementMap?"#define USE_DISPLACEMENTMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.anisotropy?"#define USE_ANISOTROPY":"",e.anisotropyMap?"#define USE_ANISOTROPYMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",e.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaHash?"#define USE_ALPHAHASH":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",e.mapUv?"#define MAP_UV "+e.mapUv:"",e.alphaMapUv?"#define ALPHAMAP_UV "+e.alphaMapUv:"",e.lightMapUv?"#define LIGHTMAP_UV "+e.lightMapUv:"",e.aoMapUv?"#define AOMAP_UV "+e.aoMapUv:"",e.emissiveMapUv?"#define EMISSIVEMAP_UV "+e.emissiveMapUv:"",e.bumpMapUv?"#define BUMPMAP_UV "+e.bumpMapUv:"",e.normalMapUv?"#define NORMALMAP_UV "+e.normalMapUv:"",e.displacementMapUv?"#define DISPLACEMENTMAP_UV "+e.displacementMapUv:"",e.metalnessMapUv?"#define METALNESSMAP_UV "+e.metalnessMapUv:"",e.roughnessMapUv?"#define ROUGHNESSMAP_UV "+e.roughnessMapUv:"",e.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+e.anisotropyMapUv:"",e.clearcoatMapUv?"#define CLEARCOATMAP_UV "+e.clearcoatMapUv:"",e.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+e.clearcoatNormalMapUv:"",e.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+e.clearcoatRoughnessMapUv:"",e.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+e.iridescenceMapUv:"",e.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+e.iridescenceThicknessMapUv:"",e.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+e.sheenColorMapUv:"",e.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+e.sheenRoughnessMapUv:"",e.specularMapUv?"#define SPECULARMAP_UV "+e.specularMapUv:"",e.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+e.specularColorMapUv:"",e.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+e.specularIntensityMapUv:"",e.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+e.transmissionMapUv:"",e.thicknessMapUv?"#define THICKNESSMAP_UV "+e.thicknessMapUv:"",e.vertexTangents&&e.flatShading===!1?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUv1s?"#define USE_UV1":"",e.vertexUv2s?"#define USE_UV2":"",e.vertexUv3s?"#define USE_UV3":"",e.pointsUvs?"#define USE_POINTS_UV":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphColors?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+h:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.numLightProbes>0?"#define USE_LIGHT_PROBES":"",e.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",e.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
4132`].filter(Oc).join(` 4133`),b=[LM(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,M,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+d:"",e.envMap?"#define "+g:"",e.envMap?"#define "+m:"",v?"#define CUBEUV_TEXEL_WIDTH "+v.texelWidth:"",v?"#define CUBEUV_TEXEL_HEIGHT "+v.texelHeight:"",v?"#define CUBEUV_MAX_MIP "+v.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",e.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.anisotropy?"#define USE_ANISOTROPY":"",e.anisotropyMap?"#define USE_ANISOTROPYMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.dispersion?"#define USE_DISPERSION":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",e.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.alphaHash?"#define USE_ALPHAHASH":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.vertexTangents&&e.flatShading===!1?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor||e.batchingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUv1s?"#define USE_UV1":"",e.vertexUv2s?"#define USE_UV2":"",e.vertexUv3s?"#define USE_UV3":"",e.pointsUvs?"#define USE_POINTS_UV":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+h:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.numLightProbes>0?"#define USE_LIGHT_PROBES":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",e.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",e.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==As?"#define TONE_MAPPING":"",e.toneMapping!==As?Se.tonemapping_pars_fragment:"",e.toneMapping!==As?Jz("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Se.colorspace_pars_fragment,Kz("linearToOutputTexel",e.outputColorSpace),$z(),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",` 4134`].filter(Oc).join(` 4135`)),u=Vg(u),u=RM(u,e),u=DM(u,e),f=Vg(f),f=RM(f,e),f=DM(f,e),u=NM(u),f=NM(f),e.isRawShaderMaterial!==!0&&(R=`#version 300 es 4136`,S=[_,"#define attribute in","#define varying out","#define texture2D texture"].join(` 4137`)+` 4138`+S,b=["#define varying in",e.glslVersion===IS?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===IS?"":"#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(` 4139`)+` 4140`+b);const C=R+S+u,P=R+b+f,U=AM(r,r.VERTEX_SHADER,C),F=AM(r,r.FRAGMENT_SHADER,P);r.attachShader(T,U),r.attachShader(T,F),e.index0AttributeName!==void 0?r.bindAttribLocation(T,0,e.index0AttributeName):e.morphTargets===!0&&r.bindAttribLocation(T,0,"position"),r.linkProgram(T);
vendor: 13,977 bytes, lines 4140-4147
4140function L(j){if(n.debug.checkShaderErrors){const Q=r.getProgramInfoLog(T)||"",Z=r.getShaderInfoLog(U)||"",rt=r.getShaderInfoLog(F)||"",ot=Q.trim(),I=Z.trim(),V=rt.trim();let k=!0,gt=!0;if(r.getProgramParameter(T,r.LINK_STATUS)===!1)if(k=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,T,U,F);else{const xt=CM(r,U,"vertex"),B=CM(r,F,"fragment");Oe("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(T,r.VALIDATE_STATUS)+` 4141 4142Material Name: `+j.name+` 4143Material Type: `+j.type+` 4144 4145Program Info Log: `+ot+` 4146`+xt+` 4147`+B)}else ot!==""?fe("WebGLProgram: Program Info Log:",ot):(I===""||V==="")&&(gt=!1);gt&&(j.diagnostics={runnable:k,programLog:ot,vertexShader:{log:I,prefix:S},fragmentShader:{log:V,prefix:b}})}r.deleteShader(U),r.deleteShader(F),z=new md(r,T),w=nB(r,T)}let z;this.getUniforms=function(){return z===void 0&&L(this),z};let w;this.getAttributes=function(){return w===void 0&&L(this),w};let O=e.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return O===!1&&(O=r.getProgramParameter(T,Xz)),O},this.destroy=function(){s.releaseStatesOfProgram(this),r.deleteProgram(T),this.program=void 0},this.type=e.shaderType,this.name=e.shaderName,this.id=Yz++,this.cacheKey=t,this.usedTimes=1,this.program=T,this.vertexShader=U,this.fragmentShader=F,this}let vB=0;class yB{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const e=t.vertexShader,s=t.fragmentShader,r=this._getShaderStage(e),l=this._getShaderStage(s),u=this._getShaderCacheForMaterial(t);return u.has(r)===!1&&(u.add(r),r.usedTimes++),u.has(l)===!1&&(u.add(l),l.usedTimes++),this}remove(t){const e=this.materialCache.get(t);for(const s of e)s.usedTimes--,s.usedTimes===0&&this.shaderCache.delete(s.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const e=this.materialCache;let s=e.get(t);return s===void 0&&(s=new Set,e.set(t,s)),s}_getShaderStage(t){const e=this.shaderCache;let s=e.get(t);return s===void 0&&(s=new _B(t),e.set(t,s)),s}}class _B{constructor(t){this.id=vB++,this.code=t,this.usedTimes=0}}function bB(n,t,e,s,r,l,u){const f=new Wx,h=new yB,d=new Set,g=[],m=new Map,v=r.logarithmicDepthBuffer;let _=r.precision;const M={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function T(w){return d.add(w),w===0?"uv":`uv${w}`}function S(w,O,j,Q,Z){const rt=Q.fog,ot=Z.geometry,I=w.isMeshStandardMaterial?Q.environment:null,V=(w.isMeshStandardMaterial?e:t).get(w.envMap||I),k=V&&V.mapping===Yd?V.image.height:null,gt=M[w.type];w.precision!==null&&(_=r.getMaxPrecision(w.precision),_!==w.precision&&fe("WebGLProgram.getParameters:",w.precision,"not supported, using",_,"instead."));const xt=ot.morphAttributes.position||ot.morphAttributes.normal||ot.morphAttributes.color,B=xt!==void 0?xt.length:0;let at=0;ot.morphAttributes.position!==void 0&&(at=1),ot.morphAttributes.normal!==void 0&&(at=2),ot.morphAttributes.color!==void 0&&(at=3);let nt,pt,Et,J;if(gt){const Ee=vs[gt];nt=Ee.vertexShader,pt=Ee.fragmentShader}else nt=w.vertexShader,pt=w.fragmentShader,h.update(w),Et=h.getVertexShaderID(w),J=h.getFragmentShaderID(w);const it=n.getRenderTarget(),bt=n.state.buffers.depth.getReversed(),Ot=Z.isInstancedMesh===!0,Ut=Z.isBatchedMesh===!0,ae=!!w.map,Ce=!!w.matcap,ge=!!V,ye=!!w.aoMap,Ie=!!w.lightMap,de=!!w.bumpMap,Ke=!!w.normalMap,X=!!w.displacementMap,Pe=!!w.emissiveMap,Re=!!w.metalnessMap,Be=!!w.roughnessMap,Ht=w.anisotropy>0,H=w.clearcoat>0,A=w.dispersion>0,K=w.iridescence>0,yt=w.sheen>0,Tt=w.transmission>0,vt=Ht&&!!w.anisotropyMap,qt=H&&!!w.clearcoatMap,Nt=H&&!!w.clearcoatNormalMap,Wt=H&&!!w.clearcoatRoughnessMap,ne=K&&!!w.iridescenceMap,Ct=K&&!!w.iridescenceThicknessMap,Rt=yt&&!!w.sheenColorMap,Gt=yt&&!!w.sheenRoughnessMap,zt=!!w.specularMap,Lt=!!w.specularColorMap,he=!!w.specularIntensityMap,Y=Tt&&!!w.transmissionMap,Ft=Tt&&!!w.thicknessMap,Dt=!!w.gradientMap,Bt=!!w.alphaMap,At=w.alphaTest>0,ut=!!w.alphaHash,wt=!!w.extensions;let Qt=As;w.toneMapped&&(it===null||it.isXRRenderTarget===!0)&&(Qt=n.toneMapping);const xe={shaderID:gt,shaderType:w.type,shaderName:w.name,vertexShader:nt,fragmentShader:pt,defines:w.defines,customVertexShaderID:Et,customFragmentShaderID:J,isRawShaderMaterial:w.isRawShaderMaterial===!0,glslVersion:w.glslVersion,precision:_,batching:Ut,batchingColor:Ut&&Z._colorsTexture!==null,instancing:Ot,instancingColor:Ot&&Z.instanceColor!==null,instancingMorph:Ot&&Z.morphTexture!==null,outputColorSpace:it===null?n.outputColorSpace:it.isXRRenderTarget===!0?it.texture.colorSpace:xl,alphaToCoverage:!!w.alphaToCoverage,map:ae,matcap:Ce,envMap:ge,envMapMode:ge&&V.mapping,envMapCubeUVHeight:k,aoMap:ye,lightMap:Ie,bumpMap:de,normalMap:Ke,displacementMap:X,emissiveMap:Pe,normalMapObjectSpace:Ke&&w.normalMapType===Z5,normalMapTangentSpace:Ke&&w.normalMapType===q5,metalnessMap:Re,roughnessMap:Be,anisotropy:Ht,anisotropyMap:vt,clearcoat:H,clearcoatMap:qt,clearcoatNormalMap:Nt,clearcoatRoughnessMap:Wt,dispersion:A,iridescence:K,iridescenceMap:ne,iridescenceThicknessMap:Ct,sheen:yt,sheenColorMap:Rt,sheenRoughnessMap:Gt,specularMap:zt,specularColorMap:Lt,specularIntensityMap:he,transmission:Tt,transmissionMap:Y,thicknessMap:Ft,gradientMap:Dt,opaque:w.transparent===!1&&w.blending===ll&&w.alphaToCoverage===!1,alphaMap:Bt,alphaTest:At,alphaHash:ut,combine:w.combine,mapUv:ae&&T(w.map.channel),aoMapUv:ye&&T(w.aoMap.channel),lightMapUv:Ie&&T(w.lightMap.channel),bumpMapUv:de&&T(w.bumpMap.channel),normalMapUv:Ke&&T(w.normalMap.channel),displacementMapUv:X&&T(w.displacementMap.channel),emissiveMapUv:Pe&&T(w.emissiveMap.channel),metalnessMapUv:Re&&T(w.metalnessMap.channel),roughnessMapUv:Be&&T(w.roughnessMap.channel),anisotropyMapUv:vt&&T(w.anisotropyMap.channel),clearcoatMapUv:qt&&T(w.clearcoatMap.channel),clearcoatNormalMapUv:Nt&&T(w.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Wt&&T(w.clearcoatRoughnessMap.channel),iridescenceMapUv:ne&&T(w.iridescenceMap.channel),iridescenceThicknessMapUv:Ct&&T(w.iridescenceThicknessMap.channel),sheenColorMapUv:Rt&&T(w.sheenColorMap.channel),sheenRoughnessMapUv:Gt&&T(w.sheenRoughnessMap.channel),specularMapUv:zt&&T(w.specularMap.channel),specularColorMapUv:Lt&&T(w.specularColorMap.channel),specularIntensityMapUv:he&&T(w.specularIntensityMap.channel),transmissionMapUv:Y&&T(w.transmissionMap.channel),thicknessMapUv:Ft&&T(w.thicknessMap.channel),alphaMapUv:Bt&&T(w.alphaMap.channel),vertexTangents:!!ot.attributes.tangent&&(Ke||Ht),vertexColors:w.vertexColors,vertexAlphas:w.vertexColors===!0&&!!ot.attributes.color&&ot.attributes.color.itemSize===4,pointsUvs:Z.isPoints===!0&&!!ot.attributes.uv&&(ae||Bt),fog:!!rt,useFog:w.fog===!0,fogExp2:!!rt&&rt.isFogExp2,flatShading:w.flatShading===!0&&w.wireframe===!1,sizeAttenuation:w.sizeAttenuation===!0,logarithmicDepthBuffer:v,reversedDepthBuffer:bt,skinning:Z.isSkinnedMesh===!0,morphTargets:ot.morphAttributes.position!==void 0,morphNormals:ot.morphAttributes.normal!==void 0,morphColors:ot.morphAttributes.color!==void 0,morphTargetsCount:B,morphTextureStride:at,numDirLights:O.directional.length,numPointLights:O.point.length,numSpotLights:O.spot.length,numSpotLightMaps:O.spotLightMap.length,numRectAreaLights:O.rectArea.length,numHemiLights:O.hemi.length,numDirLightShadows:O.directionalShadowMap.length,numPointLightShadows:O.pointShadowMap.length,numSpotLightShadows:O.spotShadowMap.length,numSpotLightShadowsWithMaps:O.numSpotLightShadowsWithMaps,numLightProbes:O.numLightProbes,numClippingPlanes:u.numPlanes,numClipIntersection:u.numIntersection,dithering:w.dithering,shadowMapEnabled:n.shadowMap.enabled&&j.length>0,shadowMapType:n.shadowMap.type,toneMapping:Qt,decodeVideoTexture:ae&&w.map.isVideoTexture===!0&&ze.getTransfer(w.map.colorSpace)===Ze,decodeVideoTextureEmissive:Pe&&w.emissiveMap.isVideoTexture===!0&&ze.getTransfer(w.emissiveMap.colorSpace)===Ze,premultipliedAlpha:w.premultipliedAlpha,doubleSided:w.side===ra,flipSided:w.side===yi,useDepthPacking:w.depthPacking>=0,depthPacking:w.depthPacking||0,index0AttributeName:w.index0AttributeName,extensionClipCullDistance:wt&&w.extensions.clipCullDistance===!0&&s.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(wt&&w.extensions.multiDraw===!0||Ut)&&s.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:s.has("KHR_parallel_shader_compile"),customProgramCacheKey:w.customProgramCacheKey()};return xe.vertexUv1s=d.has(1),xe.vertexUv2s=d.has(2),xe.vertexUv3s=d.has(3),d.clear(),xe}function b(w){const O=[];if(w.shaderID?O.push(w.shaderID):(O.push(w.customVertexShaderID),O.push(w.customFragmentShaderID)),w.defines!==void 0)for(const j in w.defines)O.push(j),O.push(w.defines[j]);return w.isRawShaderMaterial===!1&&(R(O,w),C(O,w),O.push(n.outputColorSpace)),O.push(w.customProgramCacheKey),O.join()}function R(w,O){w.push(O.precision),w.push(O.outputColorSpace),w.push(O.envMapMode),w.push(O.envMapCubeUVHeight),w.push(O.mapUv),w.push(O.alphaMapUv),w.push(O.lightMapUv),w.push(O.aoMapUv),w.push(O.bumpMapUv),w.push(O.normalMapUv),w.push(O.displacementMapUv),w.push(O.emissiveMapUv),w.push(O.metalnessMapUv),w.push(O.roughnessMapUv),w.push(O.anisotropyMapUv),w.push(O.clearcoatMapUv),w.push(O.clearcoatNormalMapUv),w.push(O.clearcoatRoughnessMapUv),w.push(O.iridescenceMapUv),w.push(O.iridescenceThicknessMapUv),w.push(O.sheenColorMapUv),w.push(O.sheenRoughnessMapUv),w.push(O.specularMapUv),w.push(O.specularColorMapUv),w.push(O.specularIntensityMapUv),w.push(O.transmissionMapUv),w.push(O.thicknessMapUv),w.push(O.combine),w.push(O.fogExp2),w.push(O.sizeAttenuation),w.push(O.morphTargetsCount),w.push(O.morphAttributeCount),w.push(O.numDirLights),w.push(O.numPointLights),w.push(O.numSpotLights),w.push(O.numSpotLightMaps),w.push(O.numHemiLights),w.push(O.numRectAreaLights),w.push(O.numDirLightShadows),w.push(O.numPointLightShadows),w.push(O.numSpotLightShadows),w.push(O.numSpotLightShadowsWithMaps),w.push(O.numLightProbes),w.push(O.shadowMapType),w.push(O.toneMapping),w.push(O.numClippingPlanes),w.push(O.numClipIntersection),w.push(O.depthPacking)}function C(w,O){f.disableAll(),O.instancing&&f.enable(0),O.instancingColor&&f.enable(1),O.instancingMorph&&f.enable(2),O.matcap&&f.enable(3),O.envMap&&f.enable(4),O.normalMapObjectSpace&&f.enable(5),O.normalMapTangentSpace&&f.enable(6),O.clearcoat&&f.enable(7),O.iridescence&&f.enable(8),O.alphaTest&&f.enable(9),O.vertexColors&&f.enable(10),O.vertexAlphas&&f.enable(11),O.vertexUv1s&&f.enable(12),O.vertexUv2s&&f.enable(13),O.vertexUv3s&&f.enable(14),O.vertexTangents&&f.enable(15),O.anisotropy&&f.enable(16),O.alphaHash&&f.enable(17),O.batching&&f.enable(18),O.dispersion&&f.enable(19),O.batchingColor&&f.enable(20),O.gradientMap&&f.enable(21),w.push(f.mask),f.disableAll(),O.fog&&f.enable(0),O.useFog&&f.enable(1),O.flatShading&&f.enable(2),O.logarithmicDepthBuffer&&f.enable(3),O.reversedDepthBuffer&&f.enable(4),O.skinning&&f.enable(5),O.morphTargets&&f.enable(6),O.morphNormals&&f.enable(7),O.morphColors&&f.enable(8),O.premultipliedAlpha&&f.enable(9),O.shadowMapEnabled&&f.enable(10),O.doubleSided&&f.enable(11),O.flipSided&&f.enable(12),O.useDepthPacking&&f.enable(13),O.dithering&&f.enable(14),O.transmission&&f.enable(15),O.sheen&&f.enable(16),O.opaque&&f.enable(17),O.pointsUvs&&f.enable(18),O.decodeVideoTexture&&f.enable(19),O.decodeVideoTextureEmissive&&f.enable(20),O.alphaToCoverage&&f.enable(21),w.push(f.mask)}function P(w){const O=M[w.type];let j;if(O){const Q=vs[O];j=EO.clone(Q.uniforms)}else j=w.uniforms;return j}function U(w,O){let j=m.get(O);return j!==void 0?++j.usedTimes:(j=new xB(n,O,w,l),g.push(j),m.set(O,j)),j}function F(w){if(--w.usedTimes===0){const O=g.indexOf(w);g[O]=g[g.length-1],g.pop(),m.delete(w.cacheKey),w.destroy()}}function L(w){h.remove(w)}function z(){h.dispose()}return{getParameters:S,getProgramCacheKey:b,getUniforms:P,acquireProgram:U,releaseProgram:F,releaseShaderCache:L,programs:g,dispose:z}}function SB(){let n=new WeakMap;function t(u){return n.has(u)}function e(u){let f=n.get(u);return f===void 0&&(f={},n.set(u,f)),f}function s(u){n.delete(u)}function r(u,f,h){n.get(u)[f]=h}function l(){n=new WeakMap}return{has:t,get:e,remove:s,update:r,dispose:l}}function MB(n,t){return n.groupOrder!==t.groupOrder?n.groupOrder-t.groupOrder:n.renderOrder!==t.renderOrder?n.renderOrder-t.renderOrder:n.material.id!==t.material.id?n.material.id-t.material.id:n.z!==t.z?n.z-t.z:n.id-t.id}function PM(n,t){return n.groupOrder!==t.groupOrder?n.groupOrder-t.groupOrder:n.renderOrder!==t.renderOrder?n.renderOrder-t.renderOrder:n.z!==t.z?t.z-n.z:n.id-t.id}function UM(){const n=[];let t=0;const e=[],s=[],r=[];function l(){t=0,e.length=0,s.length=0,r.length=0}function u(m,v,_,M,T,S){let b=n[t];return b===void 0?(b={id:m.id,object:m,geometry:v,material:_,groupOrder:M,renderOrder:m.renderOrder,z:T,group:S},n[t]=b):(b.id=m.id,b.object=m,b.geometry=v,b.material=_,b.groupOrder=M,b.renderOrder=m.renderOrder,b.z=T,b.group=S),t++,b}function f(m,v,_,M,T,S){const b=u(m,v,_,M,T,S);_.transmission>0?s.push(b):_.transparent===!0?r.push(b):e.push(b)}function h(m,v,_,M,T,S){const b=u(m,v,_,M,T,S);_.transmission>0?s.unshift(b):_.transparent===!0?r.unshift(b):e.unshift(b)}function d(m,v){e.length>1&&e.sort(m||MB),s.length>1&&s.sort(v||PM),r.length>1&&r.sort(v||PM)}function g(){for(let m=t,v=n.length;m<v;m++){const _=n[m];if(_.id===null)break;_.id=null,_.object=null,_.geometry=null,_.material=null,_.group=null}}return{opaque:e,transmissive:s,transparent:r,init:l,push:f,unshift:h,finish:g,
vendor: 1,287 bytes, line 4147
4147sort:d}}function EB(){let n=new WeakMap;function t(s,r){const l=n.get(s);let u;return l===void 0?(u=new UM,n.set(s,[u])):r>=l.length?(u=new UM,l.push(u)):u=l[r],u}function e(){n=new WeakMap}return{get:t,dispose:e}}function TB(){const n={};return{get:function(t){if(n[t.id]!==void 0)return n[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new et,color:new Fe};break;case"SpotLight":e={position:new et,direction:new et,color:new Fe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new et,color:new Fe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new et,skyColor:new Fe,groundColor:new Fe};break;case"RectAreaLight":e={color:new Fe,position:new et,halfWidth:new et,halfHeight:new et};break}return n[t.id]=e,e}}}function AB(){const n={};return{get:function(t){if(n[t.id]!==void 0)return n[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ce};break;case"SpotLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ce};break;case"PointLight":e={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ce,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[t.id]=e,e}}}let wB=0;
vendor: 6,030 bytes, lines 4147-4152
4147function CB(n,t){return(t.castShadow?2:0)-(n.castShadow?2:0)+(t.map?1:0)-(n.map?1:0)}function RB(n){const t=new TB,e=AB(),s={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 d=0;d<9;d++)s.probe.push(new et);const r=new et,l=new ln,u=new ln;function f(d){let g=0,m=0,v=0;for(let w=0;w<9;w++)s.probe[w].set(0,0,0);let _=0,M=0,T=0,S=0,b=0,R=0,C=0,P=0,U=0,F=0,L=0;d.sort(CB);for(let w=0,O=d.length;w<O;w++){const j=d[w],Q=j.color,Z=j.intensity,rt=j.distance;let ot=null;if(j.shadow&&j.shadow.map&&(j.shadow.map.texture.format===gl?ot=j.shadow.map.texture:ot=j.shadow.map.depthTexture||j.shadow.map.texture),j.isAmbientLight)g+=Q.r*Z,m+=Q.g*Z,v+=Q.b*Z;else if(j.isLightProbe){for(let I=0;I<9;I++)s.probe[I].addScaledVector(j.sh.coefficients[I],Z);L++}else if(j.isDirectionalLight){const I=t.get(j);if(I.color.copy(j.color).multiplyScalar(j.intensity),j.castShadow){const V=j.shadow,k=e.get(j);k.shadowIntensity=V.intensity,k.shadowBias=V.bias,k.shadowNormalBias=V.normalBias,k.shadowRadius=V.radius,k.shadowMapSize=V.mapSize,s.directionalShadow[_]=k,s.directionalShadowMap[_]=ot,s.directionalShadowMatrix[_]=j.shadow.matrix,R++}s.directional[_]=I,_++}else if(j.isSpotLight){const I=t.get(j);I.position.setFromMatrixPosition(j.matrixWorld),I.color.copy(Q).multiplyScalar(Z),I.distance=rt,I.coneCos=Math.cos(j.angle),I.penumbraCos=Math.cos(j.angle*(1-j.penumbra)),I.decay=j.decay,s.spot[T]=I;const V=j.shadow;if(j.map&&(s.spotLightMap[U]=j.map,U++,V.updateMatrices(j),j.castShadow&&F++),s.spotLightMatrix[T]=V.matrix,j.castShadow){const k=e.get(j);k.shadowIntensity=V.intensity,k.shadowBias=V.bias,k.shadowNormalBias=V.normalBias,k.shadowRadius=V.radius,k.shadowMapSize=V.mapSize,s.spotShadow[T]=k,s.spotShadowMap[T]=ot,P++}T++}else if(j.isRectAreaLight){const I=t.get(j);I.color.copy(Q).multiplyScalar(Z),I.halfWidth.set(j.width*.5,0,0),I.halfHeight.set(0,j.height*.5,0),s.rectArea[S]=I,S++}else if(j.isPointLight){const I=t.get(j);if(I.color.copy(j.color).multiplyScalar(j.intensity),I.distance=j.distance,I.decay=j.decay,j.castShadow){const V=j.shadow,k=e.get(j);k.shadowIntensity=V.intensity,k.shadowBias=V.bias,k.shadowNormalBias=V.normalBias,k.shadowRadius=V.radius,k.shadowMapSize=V.mapSize,k.shadowCameraNear=V.camera.near,k.shadowCameraFar=V.camera.far,s.pointShadow[M]=k,s.pointShadowMap[M]=ot,s.pointShadowMatrix[M]=j.shadow.matrix,C++}s.point[M]=I,M++}else if(j.isHemisphereLight){const I=t.get(j);I.skyColor.copy(j.color).multiplyScalar(Z),I.groundColor.copy(j.groundColor).multiplyScalar(Z),s.hemi[b]=I,b++}}S>0&&(n.has("OES_texture_float_linear")===!0?(s.rectAreaLTC1=kt.LTC_FLOAT_1,s.rectAreaLTC2=kt.LTC_FLOAT_2):(s.rectAreaLTC1=kt.LTC_HALF_1,s.rectAreaLTC2=kt.LTC_HALF_2)),s.ambient[0]=g,s.ambient[1]=m,s.ambient[2]=v;const z=s.hash;(z.directionalLength!==_||z.pointLength!==M||z.spotLength!==T||z.rectAreaLength!==S||z.hemiLength!==b||z.numDirectionalShadows!==R||z.numPointShadows!==C||z.numSpotShadows!==P||z.numSpotMaps!==U||z.numLightProbes!==L)&&(s.directional.length=_,s.spot.length=T,s.rectArea.length=S,s.point.length=M,s.hemi.length=b,s.directionalShadow.length=R,s.directionalShadowMap.length=R,s.pointShadow.length=C,s.pointShadowMap.length=C,s.spotShadow.length=P,s.spotShadowMap.length=P,s.directionalShadowMatrix.length=R,s.pointShadowMatrix.length=C,s.spotLightMatrix.length=P+U-F,s.spotLightMap.length=U,s.numSpotLightShadowsWithMaps=F,s.numLightProbes=L,z.directionalLength=_,z.pointLength=M,z.spotLength=T,z.rectAreaLength=S,z.hemiLength=b,z.numDirectionalShadows=R,z.numPointShadows=C,z.numSpotShadows=P,z.numSpotMaps=U,z.numLightProbes=L,s.version=wB++)}function h(d,g){let m=0,v=0,_=0,M=0,T=0;const S=g.matrixWorldInverse;for(let b=0,R=d.length;b<R;b++){const C=d[b];if(C.isDirectionalLight){const P=s.directional[m];P.direction.setFromMatrixPosition(C.matrixWorld),r.setFromMatrixPosition(C.target.matrixWorld),P.direction.sub(r),P.direction.transformDirection(S),m++}else if(C.isSpotLight){const P=s.spot[_];P.position.setFromMatrixPosition(C.matrixWorld),P.position.applyMatrix4(S),P.direction.setFromMatrixPosition(C.matrixWorld),r.setFromMatrixPosition(C.target.matrixWorld),P.direction.sub(r),P.direction.transformDirection(S),_++}else if(C.isRectAreaLight){const P=s.rectArea[M];P.position.setFromMatrixPosition(C.matrixWorld),P.position.applyMatrix4(S),u.identity(),l.copy(C.matrixWorld),l.premultiply(S),u.extractRotation(l),P.halfWidth.set(C.width*.5,0,0),P.halfHeight.set(0,C.height*.5,0),P.halfWidth.applyMatrix4(u),P.halfHeight.applyMatrix4(u),M++}else if(C.isPointLight){const P=s.point[v];P.position.setFromMatrixPosition(C.matrixWorld),P.position.applyMatrix4(S),v++}else if(C.isHemisphereLight){const P=s.hemi[T];P.direction.setFromMatrixPosition(C.matrixWorld),P.direction.transformDirection(S),T++}}}return{setup:f,setupView:h,state:s}}function OM(n){const t=new RB(n),e=[],s=[];function r(g){d.camera=g,e.length=0,s.length=0}function l(g){e.push(g)}function u(g){s.push(g)}function f(){t.setup(e)}function h(g){t.setupView(e,g)}const d={lightsArray:e,shadowsArray:s,camera:null,lights:t,transmissionRenderTarget:{}};return{init:r,state:d,setupLights:f,setupLightsView:h,pushLight:l,pushShadow:u}}function DB(n){let t=new WeakMap;function e(r,l=0){const u=t.get(r);let f;return u===void 0?(f=new OM(n),t.set(r,[f])):l>=u.length?(f=new OM(n),u.push(f)):f=u[l],f}function s(){t=new WeakMap}return{get:e,dispose:s}}const NB=`void main() { 4148 gl_Position = vec4( position, 1.0 ); 4149}`,LB=`uniform sampler2D shadow_pass; 4150uniform vec2 resolution; 4151uniform float radius; 4152void main() {
4153 const float samples = float( VSM_SAMPLES ); 4154 float mean = 0.0; 4155 float squared_mean = 0.0; 4156 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 4157 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 4158 for ( float i = 0.0; i < samples; i ++ ) { 4159 float uvOffset = uvStart + i * uvStride; 4160 #ifdef HORIZONTAL_PASS 4161 vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; 4162 mean += distribution.x; 4163 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 4164 #else 4165 float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; 4166 mean += depth; 4167 squared_mean += depth * depth; 4168 #endif 4169 } 4170 mean = mean / samples; 4171 squared_mean = squared_mean / samples; 4172 float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); 4173 gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); 4174}`,PB=[new et(1,0,0),new et(-1,0,0),new et(0,1,0),new et(0,-1,0),new et(0,0,1),new et(0,0,-1)],UB=[new et(0,-1,0),new et(0,-1,0),new et(0,0,1),new et(0,0,-1),new et(0,-1,0),new et(0,-1,0)],FM=new ln,Nc=new et,c0=new et;function OB(n,t,e){let s=new Xx;const r=new ce,l=new ce,u=new xn,f=new BO,h=new VO,d={},g=e.maxTextureSize,m={[or]:yi,[yi]:or,[ra]:ra},v=new Ds({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ce},radius:{value:4}},vertexShader:NB,fragmentShader:LB}),_=v.clone();_.defines.HORIZONTAL_PASS=1;const M=new Ki;M.setAttribute("position",new ls(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const T=new xa(M,v),S=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=cd;let b=this.type;this.render=function(F,L,z){if(S.enabled===!1||S.autoUpdate===!1&&S.needsUpdate===!1||F.length===0)return;F.type===T5&&(fe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),F.type=cd);const w=n.getRenderTarget(),O=n.getActiveCubeFace(),j=n.getActiveMipmapLevel(),Q=n.state;Q.setBlending(la),Q.buffers.depth.getReversed()===!0?Q.buffers.color.setClear(0,0,0,0):Q.buffers.color.setClear(1,1,1,1),Q.buffers.depth.setTest(!0),Q.setScissorTest(!1);const Z=b!==this.type;Z&&L.traverse(function(rt){rt.material&&(Array.isArray(rt.material)?rt.material.forEach(ot=>ot.needsUpdate=!0):rt.material.needsUpdate=!0)});for(let rt=0,ot=F.length;rt<ot;rt++){const I=F[rt],V=I.shadow;if(V===void 0){fe("WebGLShadowMap:",I,"has no shadow.");continue}if(V.autoUpdate===!1&&V.needsUpdate===!1)continue;r.copy(V.mapSize);const k=V.getFrameExtents();if(r.multiply(k),l.copy(V.mapSize),(r.x>g||r.y>g)&&(r.x>g&&(l.x=Math.floor(g/k.x),r.x=l.x*k.x,V.mapSize.x=l.x),r.y>g&&(l.y=Math.floor(g/k.y),r.y=l.y*k.y,V.mapSize.y=l.y)),V.map===null||Z===!0){if(V.map!==null&&(V.map.depthTexture!==null&&(V.map.depthTexture.dispose(),V.map.depthTexture=null),V.map.dispose()),this.type===Uc){if(I.isPointLight){fe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}V.map=new ws(r.x,r.y,{format:gl,type:pa,minFilter:ni,magFilter:ni,generateMipmaps:!1}),V.map.texture.name=I.name+".shadowMap",V.map.depthTexture=new tu(r.x,r.y,bs),V.map.depthTexture.name=I.name+".shadowMapDepth",V.map.depthTexture.format=ma,V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=Qn,V.map.depthTexture.magFilter=Qn}else{I.isPointLight?(V.map=new $2(r.x),V.map.depthTexture=new IO(r.x,Rs)):(V.map=new ws(r.x,r.y),V.map.depthTexture=new tu(r.x,r.y,Rs)),V.map.depthTexture.name=I.name+".shadowMap",V.map.depthTexture.format=ma;const xt=n.state.buffers.depth.getReversed();this.type===cd?(V.map.depthTexture.compareFunction=xt?Gx:kx,V.map.depthTexture.minFilter=ni,V.map.depthTexture.magFilter=ni):(V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=Qn,V.map.depthTexture.magFilter=Qn)}V.camera.updateProjectionMatrix()}const gt=V.map.isWebGLCubeRenderTarget?6:1;for(let xt=0;xt<gt;xt++){if(V.map.isWebGLCubeRenderTarget)n.setRenderTarget(V.map,xt),n.clear();else{xt===0&&(n.setRenderTarget(V.map),n.clear());const B=V.getViewport(xt);u.set(l.x*B.x,l.y*B.y,l.x*B.z,l.y*B.w),Q.viewport(u)}if(I.isPointLight){const B=V.camera,at=V.matrix,nt=I.distance||B.far;nt!==B.far&&(B.far=nt,B.updateProjectionMatrix()),Nc.setFromMatrixPosition(I.matrixWorld),B.position.copy(Nc),c0.copy(B.position),c0.add(PB[xt]),B.up.copy(UB[xt]),B.lookAt(c0),B.updateMatrixWorld(),at.makeTranslation(-Nc.x,-Nc.y,-Nc.z),FM.multiplyMatrices(B.projectionMatrix,B.matrixWorldInverse),V._frustum.setFromProjectionMatrix(FM,B.coordinateSystem,B.reversedDepth)}else V.updateMatrices(I);s=V.getFrustum(),P(L,z,V.camera,I,this.type)}V.isPointLightShadow!==!0&&this.type===Uc&&R(V,z),V.needsUpdate=!1}b=this.type,S.needsUpdate=!1,n.setRenderTarget(w,O,j)};function R(F,L){const z=t.update(T);v.defines.VSM_SAMPLES!==F.blurSamples&&(v.defines.VSM_SAMPLES=F.blurSamples,_.defines.VSM_SAMPLES=F.blurSamples,v.needsUpdate=!0,_.needsUpdate=!0),F.mapPass===null&&(F.mapPass=new ws(r.x,r.y,{format:gl,type:pa})),v.uniforms.shadow_pass.value=F.map.depthTexture,v.uniforms.resolution.value=F.mapSize,v.uniforms.radius.value=F.radius,n.setRenderTarget(F.mapPass),n.clear(),n.renderBufferDirect(L,null,z,v,T,null),_.uniforms.shadow_pass.value=F.mapPass.texture,_.uniforms.resolution.value=F.mapSize,_.uniforms.radius.value=F.radius,n.setRenderTarget(F.map),n.clear(),n.renderBufferDirect(L,null,z,_,T,null)}function C(F,L,z,w){let O=null;const j=z.isPointLight===!0?F.customDistanceMaterial:F.customDepthMaterial;if(j!==void 0)O=j;else if(O=z.isPointLight===!0?h:f,n.localClippingEnabled&&L.clipShadows===!0&&Array.isArray(L.clippingPlanes)&&L.clippingPlanes.length!==0||L.displacementMap&&L.displacementScale!==0||L.alphaMap&&L.alphaTest>0||L.map&&L.alphaTest>0||L.alphaToCoverage===!0){const Q=O.uuid,Z=L.uuid;let rt=d[Q];rt===void 0&&(rt={},d[Q]=rt);let ot=rt[Z];ot===void 0&&(ot=O.clone(),rt[Z]=ot,L.addEventListener("dispose",U)),O=ot}
vendor: 101,363 bytes, lines 4174-4198
4174if(O.visible=L.visible,O.wireframe=L.wireframe,w===Uc?O.side=L.shadowSide!==null?L.shadowSide:L.side:O.side=L.shadowSide!==null?L.shadowSide:m[L.side],O.alphaMap=L.alphaMap,O.alphaTest=L.alphaToCoverage===!0?.5:L.alphaTest,O.map=L.map,O.clipShadows=L.clipShadows,O.clippingPlanes=L.clippingPlanes,O.clipIntersection=L.clipIntersection,O.displacementMap=L.displacementMap,O.displacementScale=L.displacementScale,O.displacementBias=L.displacementBias,O.wireframeLinewidth=L.wireframeLinewidth,O.linewidth=L.linewidth,z.isPointLight===!0&&O.isMeshDistanceMaterial===!0){const Q=n.properties.get(O);Q.light=z}return O}function P(F,L,z,w,O){if(F.visible===!1)return;if(F.layers.test(L.layers)&&(F.isMesh||F.isLine||F.isPoints)&&(F.castShadow||F.receiveShadow&&O===Uc)&&(!F.frustumCulled||s.intersectsObject(F))){F.modelViewMatrix.multiplyMatrices(z.matrixWorldInverse,F.matrixWorld);const Z=t.update(F),rt=F.material;if(Array.isArray(rt)){const ot=Z.groups;for(let I=0,V=ot.length;I<V;I++){const k=ot[I],gt=rt[k.materialIndex];if(gt&>.visible){const xt=C(F,gt,w,O);F.onBeforeShadow(n,F,L,z,Z,xt,k),n.renderBufferDirect(z,null,Z,xt,F,k),F.onAfterShadow(n,F,L,z,Z,xt,k)}}}else if(rt.visible){const ot=C(F,rt,w,O);F.onBeforeShadow(n,F,L,z,Z,ot,null),n.renderBufferDirect(z,null,Z,ot,F,null),F.onAfterShadow(n,F,L,z,Z,ot,null)}}const Q=F.children;for(let Z=0,rt=Q.length;Z<rt;Z++)P(Q[Z],L,z,w,O)}function U(F){F.target.removeEventListener("dispose",U);for(const z in d){const w=d[z],O=F.target.uuid;O in w&&(w[O].dispose(),delete w[O])}}}const FB={[X0]:Y0,[q0]:Q0,[Z0]:J0,[pl]:K0,[Y0]:X0,[Q0]:q0,[J0]:Z0,[K0]:pl};function IB(n,t){function e(){let Y=!1;const Ft=new xn;let Dt=null;const Bt=new xn(0,0,0,0);return{setMask:function(At){Dt!==At&&!Y&&(n.colorMask(At,At,At,At),Dt=At)},setLocked:function(At){Y=At},setClear:function(At,ut,wt,Qt,xe){xe===!0&&(At*=Qt,ut*=Qt,wt*=Qt),Ft.set(At,ut,wt,Qt),Bt.equals(Ft)===!1&&(n.clearColor(At,ut,wt,Qt),Bt.copy(Ft))},reset:function(){Y=!1,Dt=null,Bt.set(-1,0,0,0)}}}function s(){let Y=!1,Ft=!1,Dt=null,Bt=null,At=null;return{setReversed:function(ut){if(Ft!==ut){const wt=t.get("EXT_clip_control");ut?wt.clipControlEXT(wt.LOWER_LEFT_EXT,wt.ZERO_TO_ONE_EXT):wt.clipControlEXT(wt.LOWER_LEFT_EXT,wt.NEGATIVE_ONE_TO_ONE_EXT),Ft=ut;const Qt=At;At=null,this.setClear(Qt)}},getReversed:function(){return Ft},setTest:function(ut){ut?it(n.DEPTH_TEST):bt(n.DEPTH_TEST)},setMask:function(ut){Dt!==ut&&!Y&&(n.depthMask(ut),Dt=ut)},setFunc:function(ut){if(Ft&&(ut=FB[ut]),Bt!==ut){switch(ut){case X0:n.depthFunc(n.NEVER);break;case Y0:n.depthFunc(n.ALWAYS);break;case q0:n.depthFunc(n.LESS);break;case pl:n.depthFunc(n.LEQUAL);break;case Z0:n.depthFunc(n.EQUAL);break;case K0:n.depthFunc(n.GEQUAL);break;case Q0:n.depthFunc(n.GREATER);break;case J0:n.depthFunc(n.NOTEQUAL);break;default:n.depthFunc(n.LEQUAL)}Bt=ut}},setLocked:function(ut){Y=ut},setClear:function(ut){At!==ut&&(Ft&&(ut=1-ut),n.clearDepth(ut),At=ut)},reset:function(){Y=!1,Dt=null,Bt=null,At=null,Ft=!1}}}function r(){let Y=!1,Ft=null,Dt=null,Bt=null,At=null,ut=null,wt=null,Qt=null,xe=null;return{setTest:function(Ee){Y||(Ee?it(n.STENCIL_TEST):bt(n.STENCIL_TEST))},setMask:function(Ee){Ft!==Ee&&!Y&&(n.stencilMask(Ee),Ft=Ee)},setFunc:function(Ee,Ue,cn){(Dt!==Ee||Bt!==Ue||At!==cn)&&(n.stencilFunc(Ee,Ue,cn),Dt=Ee,Bt=Ue,At=cn)},setOp:function(Ee,Ue,cn){(ut!==Ee||wt!==Ue||Qt!==cn)&&(n.stencilOp(Ee,Ue,cn),ut=Ee,wt=Ue,Qt=cn)},setLocked:function(Ee){Y=Ee},setClear:function(Ee){xe!==Ee&&(n.clearStencil(Ee),xe=Ee)},reset:function(){Y=!1,Ft=null,Dt=null,Bt=null,At=null,ut=null,wt=null,Qt=null,xe=null}}}const l=new e,u=new s,f=new r,h=new WeakMap,d=new WeakMap;let g={},m={},v=new WeakMap,_=[],M=null,T=!1,S=null,b=null,R=null,C=null,P=null,U=null,F=null,L=new Fe(0,0,0),z=0,w=!1,O=null,j=null,Q=null,Z=null,rt=null;const ot=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let I=!1,V=0;const k=n.getParameter(n.VERSION);k.indexOf("WebGL")!==-1?(V=parseFloat(/^WebGL (\d)/.exec(k)[1]),I=V>=1):k.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(k)[1]),I=V>=2);let gt=null,xt={};const B=n.getParameter(n.SCISSOR_BOX),at=n.getParameter(n.VIEWPORT),nt=new xn().fromArray(B),pt=new xn().fromArray(at);function Et(Y,Ft,Dt,Bt){const At=new Uint8Array(4),ut=n.createTexture();n.bindTexture(Y,ut),n.texParameteri(Y,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(Y,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let wt=0;wt<Dt;wt++)Y===n.TEXTURE_3D||Y===n.TEXTURE_2D_ARRAY?n.texImage3D(Ft,0,n.RGBA,1,1,Bt,0,n.RGBA,n.UNSIGNED_BYTE,At):n.texImage2D(Ft+wt,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,At);return ut}const J={};J[n.TEXTURE_2D]=Et(n.TEXTURE_2D,n.TEXTURE_2D,1),J[n.TEXTURE_CUBE_MAP]=Et(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),J[n.TEXTURE_2D_ARRAY]=Et(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),J[n.TEXTURE_3D]=Et(n.TEXTURE_3D,n.TEXTURE_3D,1,1),l.setClear(0,0,0,1),u.setClear(1),f.setClear(0),it(n.DEPTH_TEST),u.setFunc(pl),de(!1),Ke(LS),it(n.CULL_FACE),ye(la);function it(Y){g[Y]!==!0&&(n.enable(Y),g[Y]=!0)}function bt(Y){g[Y]!==!1&&(n.disable(Y),g[Y]=!1)}function Ot(Y,Ft){return m[Y]!==Ft?(n.bindFramebuffer(Y,Ft),m[Y]=Ft,Y===n.DRAW_FRAMEBUFFER&&(m[n.FRAMEBUFFER]=Ft),Y===n.FRAMEBUFFER&&(m[n.DRAW_FRAMEBUFFER]=Ft),!0):!1}function Ut(Y,Ft){let Dt=_,Bt=!1;if(Y){Dt=v.get(Ft),Dt===void 0&&(Dt=[],v.set(Ft,Dt));const At=Y.textures;if(Dt.length!==At.length||Dt[0]!==n.COLOR_ATTACHMENT0){for(let ut=0,wt=At.length;ut<wt;ut++)Dt[ut]=n.COLOR_ATTACHMENT0+ut;Dt.length=At.length,Bt=!0}}else Dt[0]!==n.BACK&&(Dt[0]=n.BACK,Bt=!0);Bt&&n.drawBuffers(Dt)}function ae(Y){return M!==Y?(n.useProgram(Y),M=Y,!0):!1}const Ce={[Ir]:n.FUNC_ADD,[w5]:n.FUNC_SUBTRACT,[C5]:n.FUNC_REVERSE_SUBTRACT};Ce[R5]=n.MIN,Ce[D5]=n.MAX;const ge={[N5]:n.ZERO,[L5]:n.ONE,[P5]:n.SRC_COLOR,[j0]:n.SRC_ALPHA,[B5]:n.SRC_ALPHA_SATURATE,[I5]:n.DST_COLOR,[O5]:n.DST_ALPHA,[U5]:n.ONE_MINUS_SRC_COLOR,[W0]:n.ONE_MINUS_SRC_ALPHA,[z5]:n.ONE_MINUS_DST_COLOR,[F5]:n.ONE_MINUS_DST_ALPHA,[V5]:n.CONSTANT_COLOR,[H5]:n.ONE_MINUS_CONSTANT_COLOR,[k5]:n.CONSTANT_ALPHA,[G5]:n.ONE_MINUS_CONSTANT_ALPHA};function ye(Y,Ft,Dt,Bt,At,ut,wt,Qt,xe,Ee){if(Y===la){T===!0&&(bt(n.BLEND),T=!1);return}if(T===!1&&(it(n.BLEND),T=!0),Y!==A5){if(Y!==S||Ee!==w){if((b!==Ir||P!==Ir)&&(n.blendEquation(n.FUNC_ADD),b=Ir,P=Ir),Ee)switch(Y){case ll:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case PS:n.blendFunc(n.ONE,n.ONE);break;case US:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case OS:n.blendFuncSeparate(n.DST_COLOR,n.ONE_MINUS_SRC_ALPHA,n.ZERO,n.ONE);break;default:Oe("WebGLState: Invalid blending: ",Y);break}else switch(Y){case ll:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case PS:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE,n.ONE,n.ONE);break;case US:Oe("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case OS:Oe("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:Oe("WebGLState: Invalid blending: ",Y);break}R=null,C=null,U=null,F=null,L.set(0,0,0),z=0,S=Y,w=Ee}return}At=At||Ft,ut=ut||Dt,wt=wt||Bt,(Ft!==b||At!==P)&&(n.blendEquationSeparate(Ce[Ft],Ce[At]),b=Ft,P=At),(Dt!==R||Bt!==C||ut!==U||wt!==F)&&(n.blendFuncSeparate(ge[Dt],ge[Bt],ge[ut],ge[wt]),R=Dt,C=Bt,U=ut,F=wt),(Qt.equals(L)===!1||xe!==z)&&(n.blendColor(Qt.r,Qt.g,Qt.b,xe),L.copy(Qt),z=xe),S=Y,w=!1}function Ie(Y,Ft){Y.side===ra?bt(n.CULL_FACE):it(n.CULL_FACE);let Dt=Y.side===yi;Ft&&(Dt=!Dt),de(Dt),Y.blending===ll&&Y.transparent===!1?ye(la):ye(Y.blending,Y.blendEquation,Y.blendSrc,Y.blendDst,Y.blendEquationAlpha,Y.blendSrcAlpha,Y.blendDstAlpha,Y.blendColor,Y.blendAlpha,Y.premultipliedAlpha),u.setFunc(Y.depthFunc),u.setTest(Y.depthTest),u.setMask(Y.depthWrite),l.setMask(Y.colorWrite);const Bt=Y.stencilWrite;f.setTest(Bt),Bt&&(f.setMask(Y.stencilWriteMask),f.setFunc(Y.stencilFunc,Y.stencilRef,Y.stencilFuncMask),f.setOp(Y.stencilFail,Y.stencilZFail,Y.stencilZPass)),Pe(Y.polygonOffset,Y.polygonOffsetFactor,Y.polygonOffsetUnits),Y.alphaToCoverage===!0?it(n.SAMPLE_ALPHA_TO_COVERAGE):bt(n.SAMPLE_ALPHA_TO_COVERAGE)}function de(Y){O!==Y&&(Y?n.frontFace(n.CW):n.frontFace(n.CCW),O=Y)}function Ke(Y){Y!==M5?(it(n.CULL_FACE),Y!==j&&(Y===LS?n.cullFace(n.BACK):Y===E5?n.cullFace(n.FRONT):n.cullFace(n.FRONT_AND_BACK))):bt(n.CULL_FACE),j=Y}function X(Y){Y!==Q&&(I&&n.lineWidth(Y),Q=Y)}function Pe(Y,Ft,Dt){Y?(it(n.POLYGON_OFFSET_FILL),(Z!==Ft||rt!==Dt)&&(n.polygonOffset(Ft,Dt),Z=Ft,rt=Dt)):bt(n.POLYGON_OFFSET_FILL)}function Re(Y){Y?it(n.SCISSOR_TEST):bt(n.SCISSOR_TEST)}function Be(Y){Y===void 0&&(Y=n.TEXTURE0+ot-1),gt!==Y&&(n.activeTexture(Y),gt=Y)}function Ht(Y,Ft,Dt){Dt===void 0&&(gt===null?Dt=n.TEXTURE0+ot-1:Dt=gt);let Bt=xt[Dt];Bt===void 0&&(Bt={type:void 0,texture:void 0},xt[Dt]=Bt),(Bt.type!==Y||Bt.texture!==Ft)&&(gt!==Dt&&(n.activeTexture(Dt),gt=Dt),n.bindTexture(Y,Ft||J[Y]),Bt.type=Y,Bt.texture=Ft)}function H(){const Y=xt[gt];Y!==void 0&&Y.type!==void 0&&(n.bindTexture(Y.type,null),Y.type=void 0,Y.texture=void 0)}function A(){try{n.compressedTexImage2D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function K(){try{n.compressedTexImage3D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function yt(){try{n.texSubImage2D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function Tt(){try{n.texSubImage3D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function vt(){try{n.compressedTexSubImage2D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function qt(){try{n.compressedTexSubImage3D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function Nt(){try{n.texStorage2D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function Wt(){try{n.texStorage3D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function ne(){try{n.texImage2D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function Ct(){try{n.texImage3D(...arguments)}catch(Y){Oe("WebGLState:",Y)}}function Rt(Y){nt.equals(Y)===!1&&(n.scissor(Y.x,Y.y,Y.z,Y.w),nt.copy(Y))}function Gt(Y){pt.equals(Y)===!1&&(n.viewport(Y.x,Y.y,Y.z,Y.w),pt.copy(Y))}function zt(Y,Ft){let Dt=d.get(Ft);Dt===void 0&&(Dt=new WeakMap,d.set(Ft,Dt));let Bt=Dt.get(Y);Bt===void 0&&(Bt=n.getUniformBlockIndex(Ft,Y.name),Dt.set(Y,Bt))}function Lt(Y,Ft){const Bt=d.get(Ft).get(Y);h.get(Ft)!==Bt&&(n.uniformBlockBinding(Ft,Bt,Y.__bindingPointIndex),h.set(Ft,Bt))}function he(){n.disable(n.BLEND),n.disable(n.CULL_FACE),n.disable(n.DEPTH_TEST),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SCISSOR_TEST),n.disable(n.STENCIL_TEST),n.disable(n.SAMPLE_ALPHA_TO_COVERAGE),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ZERO),n.blendFuncSeparate(n.ONE,n.ZERO,n.ONE,n.ZERO),n.blendColor(0,0,0,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(n.LESS),u.setReversed(!1),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(n.ALWAYS,0,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),n.clearStencil(0),n.cullFace(n.BACK),n.frontFace(n.CCW),n.polygonOffset(0,0),n.activeTexture(n.TEXTURE0),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),g={},gt=null,xt={},m={},v=new WeakMap,_=[],M=null,T=!1,S=null,b=null,R=null,C=null,P=null,U=null,F=null,L=new Fe(0,0,0),z=0,w=!1,O=null,j=null,Q=null,Z=null,rt=null,nt.set(0,0,n.canvas.width,n.canvas.height),pt.set(0,0,n.canvas.width,n.canvas.height),l.reset(),u.reset(),f.reset()}return{buffers:{color:l,depth:u,stencil:f},enable:it,disable:bt,bindFramebuffer:Ot,drawBuffers:Ut,useProgram:ae,setBlending:ye,setMaterial:Ie,setFlipSided:de,setCullFace:Ke,setLineWidth:X,setPolygonOffset:Pe,setScissorTest:Re,activeTexture:Be,bindTexture:Ht,unbindTexture:H,compressedTexImage2D:A,compressedTexImage3D:K,texImage2D:ne,texImage3D:Ct,updateUBOMapping:zt,uniformBlockBinding:Lt,texStorage2D:Nt,texStorage3D:Wt,texSubImage2D:yt,texSubImage3D:Tt,compressedTexSubImage2D:vt,compressedTexSubImage3D:qt,scissor:Rt,viewport:Gt,reset:he}}function zB(n,t,e,s,r,l,u){const f=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,h=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),d=new ce,g=new WeakMap;let m;const v=new WeakMap;let _=!1;try{_=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function M(H,A){return _?new OffscreenCanvas(H,A):Jc("canvas")}function T(H,A,K){let yt=1;const Tt=Ht(H);if((Tt.width>K||Tt.height>K)&&(yt=K/Math.max(Tt.width,Tt.height)),yt<1)if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap||typeof VideoFrame<"u"&&H instanceof VideoFrame){const vt=Math.floor(yt*Tt.width),qt=Math.floor(yt*Tt.height);m===void 0&&(m=M(vt,qt));const Nt=A?M(vt,qt):m;return Nt.width=vt,Nt.height=qt,Nt.getContext("2d").drawImage(H,0,0,vt,qt),fe("WebGLRenderer: Texture has been resized from ("+Tt.width+"x"+Tt.height+") to ("+vt+"x"+qt+")."),Nt}else return"data"in H&&fe("WebGLRenderer: Image in DataTexture is too big ("+Tt.width+"x"+Tt.height+")."),H;return H}function S(H){return H.generateMipmaps}function b(H){n.generateMipmap(H)}function R(H){return H.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:H.isWebGL3DRenderTarget?n.TEXTURE_3D:H.isWebGLArrayRenderTarget||H.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function C(H,A,K,yt,Tt=!1){if(H!==null){if(n[H]!==void 0)return n[H];fe("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let vt=A;if(A===n.RED&&(K===n.FLOAT&&(vt=n.R32F),K===n.HALF_FLOAT&&(vt=n.R16F),K===n.UNSIGNED_BYTE&&(vt=n.R8)),A===n.RED_INTEGER&&(K===n.UNSIGNED_BYTE&&(vt=n.R8UI),K===n.UNSIGNED_SHORT&&(vt=n.R16UI),K===n.UNSIGNED_INT&&(vt=n.R32UI),K===n.BYTE&&(vt=n.R8I),K===n.SHORT&&(vt=n.R16I),K===n.INT&&(vt=n.R32I)),A===n.RG&&(K===n.FLOAT&&(vt=n.RG32F),K===n.HALF_FLOAT&&(vt=n.RG16F),K===n.UNSIGNED_BYTE&&(vt=n.RG8)),A===n.RG_INTEGER&&(K===n.UNSIGNED_BYTE&&(vt=n.RG8UI),K===n.UNSIGNED_SHORT&&(vt=n.RG16UI),K===n.UNSIGNED_INT&&(vt=n.RG32UI),K===n.BYTE&&(vt=n.RG8I),K===n.SHORT&&(vt=n.RG16I),K===n.INT&&(vt=n.RG32I)),A===n.RGB_INTEGER&&(K===n.UNSIGNED_BYTE&&(vt=n.RGB8UI),K===n.UNSIGNED_SHORT&&(vt=n.RGB16UI),K===n.UNSIGNED_INT&&(vt=n.RGB32UI),K===n.BYTE&&(vt=n.RGB8I),K===n.SHORT&&(vt=n.RGB16I),K===n.INT&&(vt=n.RGB32I)),A===n.RGBA_INTEGER&&(K===n.UNSIGNED_BYTE&&(vt=n.RGBA8UI),K===n.UNSIGNED_SHORT&&(vt=n.RGBA16UI),K===n.UNSIGNED_INT&&(vt=n.RGBA32UI),K===n.BYTE&&(vt=n.RGBA8I),K===n.SHORT&&(vt=n.RGBA16I),K===n.INT&&(vt=n.RGBA32I)),A===n.RGB&&(K===n.UNSIGNED_INT_5_9_9_9_REV&&(vt=n.RGB9_E5),K===n.UNSIGNED_INT_10F_11F_11F_REV&&(vt=n.R11F_G11F_B10F)),A===n.RGBA){const qt=Tt?Ad:ze.getTransfer(yt);K===n.FLOAT&&(vt=n.RGBA32F),K===n.HALF_FLOAT&&(vt=n.RGBA16F),K===n.UNSIGNED_BYTE&&(vt=qt===Ze?n.SRGB8_ALPHA8:n.RGBA8),K===n.UNSIGNED_SHORT_4_4_4_4&&(vt=n.RGBA4),K===n.UNSIGNED_SHORT_5_5_5_1&&(vt=n.RGB5_A1)}return(vt===n.R16F||vt===n.R32F||vt===n.RG16F||vt===n.RG32F||vt===n.RGBA16F||vt===n.RGBA32F)&&t.get("EXT_color_buffer_float"),vt}function P(H,A){let K;return H?A===null||A===Rs||A===Qc?K=n.DEPTH24_STENCIL8:A===bs?K=n.DEPTH32F_STENCIL8:A===Kc&&(K=n.DEPTH24_STENCIL8,fe("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):A===null||A===Rs||A===Qc?K=n.DEPTH_COMPONENT24:A===bs?K=n.DEPTH_COMPONENT32F:A===Kc&&(K=n.DEPTH_COMPONENT16),K}function U(H,A){return S(H)===!0||H.isFramebufferTexture&&H.minFilter!==Qn&&H.minFilter!==ni?Math.log2(Math.max(A.width,A.height))+1:H.mipmaps!==void 0&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?A.mipmaps.length:1}function F(H){const A=H.target;A.removeEventListener("dispose",F),z(A),A.isVideoTexture&&g.delete(A)}function L(H){const A=H.target;A.removeEventListener("dispose",L),O(A)}function z(H){const A=s.get(H);if(A.__webglInit===void 0)return;const K=H.source,yt=v.get(K);if(yt){const Tt=yt[A.__cacheKey];Tt.usedTimes--,Tt.usedTimes===0&&w(H),Object.keys(yt).length===0&&v.delete(K)}s.remove(H)}function w(H){const A=s.get(H);n.deleteTexture(A.__webglTexture);const K=H.source,yt=v.get(K);delete yt[A.__cacheKey],u.memory.textures--}function O(H){const A=s.get(H);if(H.depthTexture&&(H.depthTexture.dispose(),s.remove(H.depthTexture)),H.isWebGLCubeRenderTarget)for(let yt=0;yt<6;yt++){if(Array.isArray(A.__webglFramebuffer[yt]))for(let Tt=0;Tt<A.__webglFramebuffer[yt].length;Tt++)n.deleteFramebuffer(A.__webglFramebuffer[yt][Tt]);else n.deleteFramebuffer(A.__webglFramebuffer[yt]);A.__webglDepthbuffer&&n.deleteRenderbuffer(A.__webglDepthbuffer[yt])}else{if(Array.isArray(A.__webglFramebuffer))for(let yt=0;yt<A.__webglFramebuffer.length;yt++)n.deleteFramebuffer(A.__webglFramebuffer[yt]);else n.deleteFramebuffer(A.__webglFramebuffer);if(A.__webglDepthbuffer&&n.deleteRenderbuffer(A.__webglDepthbuffer),A.__webglMultisampledFramebuffer&&n.deleteFramebuffer(A.__webglMultisampledFramebuffer),A.__webglColorRenderbuffer)for(let yt=0;yt<A.__webglColorRenderbuffer.length;yt++)A.__webglColorRenderbuffer[yt]&&n.deleteRenderbuffer(A.__webglColorRenderbuffer[yt]);A.__webglDepthRenderbuffer&&n.deleteRenderbuffer(A.__webglDepthRenderbuffer)}const K=H.textures;for(let yt=0,Tt=K.length;yt<Tt;yt++){const vt=s.get(K[yt]);vt.__webglTexture&&(n.deleteTexture(vt.__webglTexture),u.memory.textures--),s.remove(K[yt])}s.remove(H)}let j=0;function Q(){j=0}function Z(){const H=j;return H>=r.maxTextures&&fe("WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+r.maxTextures),j+=1,H}function rt(H){const A=[];return A.push(H.wrapS),A.push(H.wrapT),A.push(H.wrapR||0),A.push(H.magFilter),A.push(H.minFilter),A.push(H.anisotropy),A.push(H.internalFormat),A.push(H.format),A.push(H.type),A.push(H.generateMipmaps),A.push(H.premultiplyAlpha),A.push(H.flipY),A.push(H.unpackAlignment),A.push(H.colorSpace),A.join()}function ot(H,A){const K=s.get(H);if(H.isVideoTexture&&Re(H),H.isRenderTargetTexture===!1&&H.isExternalTexture!==!0&&H.version>0&&K.__version!==H.version){const yt=H.image;if(yt===null)fe("WebGLRenderer: Texture marked for update but no image data found.");else if(yt.complete===!1)fe("WebGLRenderer: Texture marked for update but image is incomplete");else{J(K,H,A);return}}else H.isExternalTexture&&(K.__webglTexture=H.sourceTexture?H.sourceTexture:null);e.bindTexture(n.TEXTURE_2D,K.__webglTexture,n.TEXTURE0+A)}function I(H,A){const K=s.get(H);if(H.isRenderTargetTexture===!1&&H.version>0&&K.__version!==H.version){J(K,H,A);return}else H.isExternalTexture&&(K.__webglTexture=H.sourceTexture?H.sourceTexture:null);e.bindTexture(n.TEXTURE_2D_ARRAY,K.__webglTexture,n.TEXTURE0+A)}function V(H,A){const K=s.get(H);if(H.isRenderTargetTexture===!1&&H.version>0&&K.__version!==H.version){J(K,H,A);return}e.bindTexture(n.TEXTURE_3D,K.__webglTexture,n.TEXTURE0+A)}function k(H,A){const K=s.get(H);if(H.isCubeDepthTexture!==!0&&H.version>0&&K.__version!==H.version){it(K,H,A);return}e.bindTexture(n.TEXTURE_CUBE_MAP,K.__webglTexture,n.TEXTURE0+A)}const gt={[eg]:n.REPEAT,[oa]:n.CLAMP_TO_EDGE,[ng]:n.MIRRORED_REPEAT},xt={[Qn]:n.NEAREST,[X5]:n.NEAREST_MIPMAP_NEAREST,[Df]:n.NEAREST_MIPMAP_LINEAR,[ni]:n.LINEAR,[Dm]:n.LINEAR_MIPMAP_NEAREST,[Hr]:n.LINEAR_MIPMAP_LINEAR},B={[K5]:n.NEVER,[eO]:n.ALWAYS,[Q5]:n.LESS,[kx]:n.LEQUAL,[J5]:n.EQUAL,[Gx]:n.GEQUAL,[$5]:n.GREATER,[tO]:n.NOTEQUAL};function at(H,A){if(A.type===bs&&t.has("OES_texture_float_linear")===!1&&(A.magFilter===ni||A.magFilter===Dm||A.magFilter===Df||A.magFilter===Hr||A.minFilter===ni||A.minFilter===Dm||A.minFilter===Df||A.minFilter===Hr)&&fe("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(H,n.TEXTURE_WRAP_S,gt[A.wrapS]),n.texParameteri(H,n.TEXTURE_WRAP_T,gt[A.wrapT]),(H===n.TEXTURE_3D||H===n.TEXTURE_2D_ARRAY)&&n.texParameteri(H,n.TEXTURE_WRAP_R,gt[A.wrapR]),n.texParameteri(H,n.TEXTURE_MAG_FILTER,xt[A.magFilter]),n.texParameteri(H,n.TEXTURE_MIN_FILTER,xt[A.minFilter]),A.compareFunction&&(n.texParameteri(H,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(H,n.TEXTURE_COMPARE_FUNC,B[A.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(A.magFilter===Qn||A.minFilter!==Df&&A.minFilter!==Hr||A.type===bs&&t.has("OES_texture_float_linear")===!1)return;if(A.anisotropy>1||s.get(A).__currentAnisotropy){const K=t.get("EXT_texture_filter_anisotropic");n.texParameterf(H,K.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),s.get(A).__currentAnisotropy=A.anisotropy}}}function nt(H,A){let K=!1;H.__webglInit===void 0&&(H.__webglInit=!0,A.addEventListener("dispose",F));const yt=A.source;let Tt=v.get(yt);Tt===void 0&&(Tt={},v.set(yt,Tt));const vt=rt(A);if(vt!==H.__cacheKey){Tt[vt]===void 0&&(Tt[vt]={texture:n.createTexture(),usedTimes:0},u.memory.textures++,K=!0),Tt[vt].usedTimes++;const qt=Tt[H.__cacheKey];qt!==void 0&&(Tt[H.__cacheKey].usedTimes--,qt.usedTimes===0&&w(A)),H.__cacheKey=vt,H.__webglTexture=Tt[vt].texture}return K}function pt(H,A,K){return Math.floor(Math.floor(H/K)/A)}function Et(H,A,K,yt){const vt=H.updateRanges;if(vt.length===0)e.texSubImage2D(n.TEXTURE_2D,0,0,0,A.width,A.height,K,yt,A.data);else{vt.sort((Ct,Rt)=>Ct.start-Rt.start);let qt=0;for(let Ct=1;Ct<vt.length;Ct++){const Rt=vt[qt],Gt=vt[Ct],zt=Rt.start+Rt.count,Lt=pt(Gt.start,A.width,4),he=pt(Rt.start,A.width,4);Gt.start<=zt+1&&Lt===he&&pt(Gt.start+Gt.count-1,A.width,4)===Lt?Rt.count=Math.max(Rt.count,Gt.start+Gt.count-Rt.start):(++qt,vt[qt]=Gt)}vt.length=qt+1;const Nt=n.getParameter(n.UNPACK_ROW_LENGTH),Wt=n.getParameter(n.UNPACK_SKIP_PIXELS),ne=n.getParameter(n.UNPACK_SKIP_ROWS);n.pixelStorei(n.UNPACK_ROW_LENGTH,A.width);for(let Ct=0,Rt=vt.length;Ct<Rt;Ct++){const Gt=vt[Ct],zt=Math.floor(Gt.start/4),Lt=Math.ceil(Gt.count/4),he=zt%A.width,Y=Math.floor(zt/A.width),Ft=Lt,Dt=1;n.pixelStorei(n.UNPACK_SKIP_PIXELS,he),n.pixelStorei(n.UNPACK_SKIP_ROWS,Y),e.texSubImage2D(n.TEXTURE_2D,0,he,Y,Ft,Dt,K,yt,A.data)}H.clearUpdateRanges(),n.pixelStorei(n.UNPACK_ROW_LENGTH,Nt),n.pixelStorei(n.UNPACK_SKIP_PIXELS,Wt),n.pixelStorei(n.UNPACK_SKIP_ROWS,ne)}}function J(H,A,K){let yt=n.TEXTURE_2D;(A.isDataArrayTexture||A.isCompressedArrayTexture)&&(yt=n.TEXTURE_2D_ARRAY),A.isData3DTexture&&(yt=n.TEXTURE_3D);const Tt=nt(H,A),vt=A.source;e.bindTexture(yt,H.__webglTexture,n.TEXTURE0+K);const qt=s.get(vt);if(vt.version!==qt.__version||Tt===!0){e.activeTexture(n.TEXTURE0+K);const Nt=ze.getPrimaries(ze.workingColorSpace),Wt=A.colorSpace===tr?null:ze.getPrimaries(A.colorSpace),ne=A.colorSpace===tr||Nt===Wt?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,A.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,A.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,ne);let Ct=T(A.image,!1,r.maxTextureSize);Ct=Be(A,Ct);const Rt=l.convert(A.format,A.colorSpace),Gt=l.convert(A.type);let zt=C(A.internalFormat,Rt,Gt,A.colorSpace,A.isVideoTexture);at(yt,A);let Lt;const he=A.mipmaps,Y=A.isVideoTexture!==!0,Ft=qt.__version===void 0||Tt===!0,Dt=vt.dataReady,Bt=U(A,Ct);if(A.isDepthTexture)zt=P(A.format===kr,A.type),Ft&&(Y?e.texStorage2D(n.TEXTURE_2D,1,zt,Ct.width,Ct.height):e.texImage2D(n.TEXTURE_2D,0,zt,Ct.width,Ct.height,0,Rt,Gt,null));else if(A.isDataTexture)if(he.length>0){Y&&Ft&&e.texStorage2D(n.TEXTURE_2D,Bt,zt,he[0].width,he[0].height);for(let At=0,ut=he.length;At<ut;At++)Lt=he[At],Y?Dt&&e.texSubImage2D(n.TEXTURE_2D,At,0,0,Lt.width,Lt.height,Rt,Gt,Lt.data):e.texImage2D(n.TEXTURE_2D,At,zt,Lt.width,Lt.height,0,Rt,Gt,Lt.data);A.generateMipmaps=!1}else Y?(Ft&&e.texStorage2D(n.TEXTURE_2D,Bt,zt,Ct.width,Ct.height),Dt&&Et(A,Ct,Rt,Gt)):e.texImage2D(n.TEXTURE_2D,0,zt,Ct.width,Ct.height,0,Rt,Gt,Ct.data);else if(A.isCompressedTexture)if(A.isCompressedArrayTexture){Y&&Ft&&e.texStorage3D(n.TEXTURE_2D_ARRAY,Bt,zt,he[0].width,he[0].height,Ct.depth);for(let At=0,ut=he.length;At<ut;At++)if(Lt=he[At],A.format!==os)if(Rt!==null)if(Y){if(Dt)if(A.layerUpdates.size>0){const wt=hM(Lt.width,Lt.height,A.format,A.type);for(const Qt of A.layerUpdates){const xe=Lt.data.subarray(Qt*wt/Lt.data.BYTES_PER_ELEMENT,(Qt+1)*wt/Lt.data.BYTES_PER_ELEMENT);e.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,At,0,0,Qt,Lt.width,Lt.height,1,Rt,xe)}A.clearLayerUpdates()}else e.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,At,0,0,0,Lt.width,Lt.height,Ct.depth,Rt,Lt.data)}else e.compressedTexImage3D(n.TEXTURE_2D_ARRAY,At,zt,Lt.width,Lt.height,Ct.depth,0,Lt.data,0,0);else fe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Y?Dt&&e.texSubImage3D(n.TEXTURE_2D_ARRAY,At,0,0,0,Lt.width,Lt.height,Ct.depth,Rt,Gt,Lt.data):e.texImage3D(n.TEXTURE_2D_ARRAY,At,zt,Lt.width,Lt.height,Ct.depth,0,Rt,Gt,Lt.data)}else{Y&&Ft&&e.texStorage2D(n.TEXTURE_2D,Bt,zt,he[0].width,he[0].height);for(let At=0,ut=he.length;At<ut;At++)Lt=he[At],A.format!==os?Rt!==null?Y?Dt&&e.compressedTexSubImage2D(n.TEXTURE_2D,At,0,0,Lt.width,Lt.height,Rt,Lt.data):e.compressedTexImage2D(n.TEXTURE_2D,At,zt,Lt.width,Lt.height,0,Lt.data):fe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Y?Dt&&e.texSubImage2D(n.TEXTURE_2D,At,0,0,Lt.width,Lt.height,Rt,Gt,Lt.data):e.texImage2D(n.TEXTURE_2D,At,zt,Lt.width,Lt.height,0,Rt,Gt,Lt.data)}else if(A.isDataArrayTexture)if(Y){if(Ft&&e.texStorage3D(n.TEXTURE_2D_ARRAY,Bt,zt,Ct.width,Ct.height,Ct.depth),Dt)if(A.layerUpdates.size>0){const At=hM(Ct.width,Ct.height,A.format,A.type);for(const ut of A.layerUpdates){const wt=Ct.data.subarray(ut*At/Ct.data.BYTES_PER_ELEMENT,(ut+1)*At/Ct.data.BYTES_PER_ELEMENT);e.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,ut,Ct.width,Ct.height,1,Rt,Gt,wt)}A.clearLayerUpdates()}else e.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,Ct.width,Ct.height,Ct.depth,Rt,Gt,Ct.data)}else e.texImage3D(n.TEXTURE_2D_ARRAY,0,zt,Ct.width,Ct.height,Ct.depth,0,Rt,Gt,Ct.data);else if(A.isData3DTexture)Y?(Ft&&e.texStorage3D(n.TEXTURE_3D,Bt,zt,Ct.width,Ct.height,Ct.depth),Dt&&e.texSubImage3D(n.TEXTURE_3D,0,0,0,0,Ct.width,Ct.height,Ct.depth,Rt,Gt,Ct.data)):e.texImage3D(n.TEXTURE_3D,0,zt,Ct.width,Ct.height,Ct.depth,0,Rt,Gt,Ct.data);else if(A.isFramebufferTexture){if(Ft)if(Y)e.texStorage2D(n.TEXTURE_2D,Bt,zt,Ct.width,Ct.height);else{let At=Ct.width,ut=Ct.height;for(let wt=0;wt<Bt;wt++)e.texImage2D(n.TEXTURE_2D,wt,zt,At,ut,0,Rt,Gt,null),At>>=1,ut>>=1}}else if(he.length>0){if(Y&&Ft){const At=Ht(he[0]);e.texStorage2D(n.TEXTURE_2D,Bt,zt,At.width,At.height)}for(let At=0,ut=he.length;At<ut;At++)Lt=he[At],Y?Dt&&e.texSubImage2D(n.TEXTURE_2D,At,0,0,Rt,Gt,Lt):e.texImage2D(n.TEXTURE_2D,At,zt,Rt,Gt,Lt);A.generateMipmaps=!1}else if(Y){if(Ft){const At=Ht(Ct);e.texStorage2D(n.TEXTURE_2D,Bt,zt,At.width,At.height)}Dt&&e.texSubImage2D(n.TEXTURE_2D,0,0,0,Rt,Gt,Ct)}else e.texImage2D(n.TEXTURE_2D,0,zt,Rt,Gt,Ct);S(A)&&b(yt),qt.__version=vt.version,A.onUpdate&&A.onUpdate(A)}H.__version=A.version}function it(H,A,K){if(A.image.length!==6)return;const yt=nt(H,A),Tt=A.source;e.bindTexture(n.TEXTURE_CUBE_MAP,H.__webglTexture,n.TEXTURE0+K);const vt=s.get(Tt);if(Tt.version!==vt.__version||yt===!0){e.activeTexture(n.TEXTURE0+K);const qt=ze.getPrimaries(ze.workingColorSpace),Nt=A.colorSpace===tr?null:ze.getPrimaries(A.colorSpace),Wt=A.colorSpace===tr||qt===Nt?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,A.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,A.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Wt);const ne=A.isCompressedTexture||A.image[0].isCompressedTexture,Ct=A.image[0]&&A.image[0].isDataTexture,Rt=[];for(let ut=0;ut<6;ut++)!ne&&!Ct?Rt[ut]=T(A.image[ut],!0,r.maxCubemapSize):Rt[ut]=Ct?A.image[ut].image:A.image[ut],Rt[ut]=Be(A,Rt[ut]);const Gt=Rt[0],zt=l.convert(A.format,A.colorSpace),Lt=l.convert(A.type),he=C(A.internalFormat,zt,Lt,A.colorSpace),Y=A.isVideoTexture!==!0,Ft=vt.__version===void 0||yt===!0,Dt=Tt.dataReady;let Bt=U(A,Gt);at(n.TEXTURE_CUBE_MAP,A);let At;if(ne){Y&&Ft&&e.texStorage2D(n.TEXTURE_CUBE_MAP,Bt,he,Gt.width,Gt.height);for(let ut=0;ut<6;ut++){At=Rt[ut].mipmaps;for(let wt=0;wt<At.length;wt++){const Qt=At[wt];A.format!==os?zt!==null?Y?Dt&&e.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt,0,0,Qt.width,Qt.height,zt,Qt.data):e.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt,he,Qt.width,Qt.height,0,Qt.data):fe("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Y?Dt&&e.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt,0,0,Qt.width,Qt.height,zt,Lt,Qt.data):e.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt,he,Qt.width,Qt.height,0,zt,Lt,Qt.data)}}}else{if(At=A.mipmaps,Y&&Ft){At.length>0&&Bt++;const ut=Ht(Rt[0]);e.texStorage2D(n.TEXTURE_CUBE_MAP,Bt,he,ut.width,ut.height)}for(let ut=0;ut<6;ut++)if(Ct){Y?Dt&&e.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,0,0,0,Rt[ut].width,Rt[ut].height,zt,Lt,Rt[ut].data):e.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,0,he,Rt[ut].width,Rt[ut].height,0,zt,Lt,Rt[ut].data);for(let wt=0;wt<At.length;wt++){const xe=At[wt].image[ut].image;Y?Dt&&e.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt+1,0,0,xe.width,xe.height,zt,Lt,xe.data):e.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt+1,he,xe.width,xe.height,0,zt,Lt,xe.data)}}else{Y?Dt&&e.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,0,0,0,zt,Lt,Rt[ut]):e.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,0,he,zt,Lt,Rt[ut]);for(let wt=0;wt<At.length;wt++){const Qt=At[wt];Y?Dt&&e.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt+1,0,0,zt,Lt,Qt.image[ut]):e.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ut,wt+1,he,zt,Lt,Qt.image[ut])}}}S(A)&&b(n.TEXTURE_CUBE_MAP),vt.__version=Tt.version,A.onUpdate&&A.onUpdate(A)}H.__version=A.version}function bt(H,A,K,yt,Tt,vt){const qt=l.convert(K.format,K.colorSpace),Nt=l.convert(K.type),Wt=C(K.internalFormat,qt,Nt,K.colorSpace),ne=s.get(A),Ct=s.get(K);if(Ct.__renderTarget=A,!ne.__hasExternalTextures){const Rt=Math.max(1,A.width>>vt),Gt=Math.max(1,A.height>>vt);Tt===n.TEXTURE_3D||Tt===n.TEXTURE_2D_ARRAY?e.texImage3D(Tt,vt,Wt,Rt,Gt,A.depth,0,qt,Nt,null):e.texImage2D(Tt,vt,Wt,Rt,Gt,0,qt,Nt,null)}e.bindFramebuffer(n.FRAMEBUFFER,H),Pe(A)?f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,yt,Tt,Ct.__webglTexture,0,X(A)):(Tt===n.TEXTURE_2D||Tt>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Tt<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,yt,Tt,Ct.__webglTexture,vt),e.bindFramebuffer(n.FRAMEBUFFER,null)}function Ot(H,A,K){if(n.bindRenderbuffer(n.RENDERBUFFER,H),A.depthBuffer){const yt=A.depthTexture,Tt=yt&&yt.isDepthTexture?yt.type:null,vt=P(A.stencilBuffer,Tt),qt=A.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;Pe(A)?f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,X(A),vt,A.width,A.height):K?n.renderbufferStorageMultisample(n.RENDERBUFFER,X(A),vt,A.width,A.height):n.renderbufferStorage(n.RENDERBUFFER,vt,A.width,A.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,qt,n.RENDERBUFFER,H)}else{const yt=A.textures;for(let Tt=0;Tt<yt.length;Tt++){const vt=yt[Tt],qt=l.convert(vt.format,vt.colorSpace),Nt=l.convert(vt.type),Wt=C(vt.internalFormat,qt,Nt,vt.colorSpace);Pe(A)?f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,X(A),Wt,A.width,A.height):K?n.renderbufferStorageMultisample(n.RENDERBUFFER,X(A),Wt,A.width,A.height):n.renderbufferStorage(n.RENDERBUFFER,Wt,A.width,A.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}function Ut(H,A,K){const yt=A.isWebGLCubeRenderTarget===!0;if(e.bindFramebuffer(n.FRAMEBUFFER,H),!(A.depthTexture&&A.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Tt=s.get(A.depthTexture);if(Tt.__renderTarget=A,(!Tt.__webglTexture||A.depthTexture.image.width!==A.width||A.depthTexture.image.height!==A.height)&&(A.depthTexture.image.width=A.width,A.depthTexture.image.height=A.height,A.depthTexture.needsUpdate=!0),yt){if(Tt.__webglInit===void 0&&(Tt.__webglInit=!0,A.depthTexture.addEventListener("dispose",F)),Tt.__webglTexture===void 0){Tt.__webglTexture=n.createTexture(),e.bindTexture(n.TEXTURE_CUBE_MAP,Tt.__webglTexture),at(n.TEXTURE_CUBE_MAP,A.depthTexture);const ne=l.convert(A.depthTexture.format),Ct=l.convert(A.depthTexture.type);let Rt;A.depthTexture.format===ma?Rt=n.DEPTH_COMPONENT24:A.depthTexture.format===kr&&(Rt=n.DEPTH24_STENCIL8);for(let Gt=0;Gt<6;Gt++)n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Gt,0,Rt,A.width,A.height,0,ne,Ct,null)}}else ot(A.depthTexture,0);const vt=Tt.__webglTexture,qt=X(A),Nt=yt?n.TEXTURE_CUBE_MAP_POSITIVE_X+K:n.TEXTURE_2D,Wt=A.depthTexture.format===kr?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;if(A.depthTexture.format===ma)Pe(A)?f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Wt,Nt,vt,0,qt):n.framebufferTexture2D(n.FRAMEBUFFER,Wt,Nt,vt,0);else if(A.depthTexture.format===kr)Pe(A)?f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Wt,Nt,vt,0,qt):n.framebufferTexture2D(n.FRAMEBUFFER,Wt,Nt,vt,0);else throw new Error("Unknown depthTexture format")}function ae(H){const A=s.get(H),K=H.isWebGLCubeRenderTarget===!0;if(A.__boundDepthTexture!==H.depthTexture){const yt=H.depthTexture;if(A.__depthDisposeCallback&&A.__depthDisposeCallback(),yt){const Tt=()=>{delete A.__boundDepthTexture,delete A.__depthDisposeCallback,yt.removeEventListener("dispose",Tt)};yt.addEventListener("dispose",Tt),A.__depthDisposeCallback=Tt}A.__boundDepthTexture=yt}if(H.depthTexture&&!A.__autoAllocateDepthBuffer)if(K)for(let yt=0;yt<6;yt++)Ut(A.__webglFramebuffer[yt],H,yt);else{const yt=H.texture.mipmaps;yt&&yt.length>0?Ut(A.__webglFramebuffer[0],H,0):Ut(A.__webglFramebuffer,H,0)}else if(K){A.__webglDepthbuffer=[];for(let yt=0;yt<6;yt++)if(e.bindFramebuffer(n.FRAMEBUFFER,A.__webglFramebuffer[yt]),A.__webglDepthbuffer[yt]===void 0)A.__webglDepthbuffer[yt]=n.createRenderbuffer(),Ot(A.__webglDepthbuffer[yt],H,!1);else{const Tt=H.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,vt=A.__webglDepthbuffer[yt];n.bindRenderbuffer(n.RENDERBUFFER,vt),n.framebufferRenderbuffer(n.FRAMEBUFFER,Tt,n.RENDERBUFFER,vt)}}else{const yt=H.texture.mipmaps;if(yt&&yt.length>0?e.bindFramebuffer(n.FRAMEBUFFER,A.__webglFramebuffer[0]):e.bindFramebuffer(n.FRAMEBUFFER,A.__webglFramebuffer),A.__webglDepthbuffer===void 0)A.__webglDepthbuffer=n.createRenderbuffer(),Ot(A.__webglDepthbuffer,H,!1);else{const Tt=H.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,vt=A.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,vt),n.framebufferRenderbuffer(n.FRAMEBUFFER,Tt,n.RENDERBUFFER,vt)}}e.bindFramebuffer(n.FRAMEBUFFER,null)}function Ce(H,A,K){const yt=s.get(H);A!==void 0&&bt(yt.__webglFramebuffer,H,H.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),K!==void 0&&ae(H)}function ge(H){const A=H.texture,K=s.get(H),yt=s.get(A);H.addEventListener("dispose",L);const Tt=H.textures,vt=H.isWebGLCubeRenderTarget===!0,qt=Tt.length>1;if(qt||(yt.__webglTexture===void 0&&(yt.__webglTexture=n.createTexture()),yt.__version=A.version,u.memory.textures++),vt){K.__webglFramebuffer=[];for(let Nt=0;Nt<6;Nt++)if(A.mipmaps&&A.mipmaps.length>0){K.__webglFramebuffer[Nt]=[];for(let Wt=0;Wt<A.mipmaps.length;Wt++)K.__webglFramebuffer[Nt][Wt]=n.createFramebuffer()}else K.__webglFramebuffer[Nt]=n.createFramebuffer()}else{if(A.mipmaps&&A.mipmaps.length>0){K.__webglFramebuffer=[];for(let Nt=0;Nt<A.mipmaps.length;Nt++)K.__webglFramebuffer[Nt]=n.createFramebuffer()}else K.__webglFramebuffer=n.createFramebuffer();if(qt)for(let Nt=0,Wt=Tt.length;Nt<Wt;Nt++){const ne=s.get(Tt[Nt]);ne.__webglTexture===void 0&&(ne.__webglTexture=n.createTexture(),u.memory.textures++)}if(H.samples>0&&Pe(H)===!1){K.__webglMultisampledFramebuffer=n.createFramebuffer(),K.__webglColorRenderbuffer=[],e.bindFramebuffer(n.FRAMEBUFFER,K.__webglMultisampledFramebuffer);for(let Nt=0;Nt<Tt.length;Nt++){const Wt=Tt[Nt];K.__webglColorRenderbuffer[Nt]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,K.__webglColorRenderbuffer[Nt]);const ne=l.convert(Wt.format,Wt.colorSpace),Ct=l.convert(Wt.type),Rt=C(Wt.internalFormat,ne,Ct,Wt.colorSpace,H.isXRRenderTarget===!0),Gt=X(H);n.renderbufferStorageMultisample(n.RENDERBUFFER,Gt,Rt,H.width,H.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+Nt,n.RENDERBUFFER,K.__webglColorRenderbuffer[Nt])}n.bindRenderbuffer(n.RENDERBUFFER,null),H.depthBuffer&&(K.__webglDepthRenderbuffer=n.createRenderbuffer(),Ot(K.__webglDepthRenderbuffer,H,!0)),e.bindFramebuffer(n.FRAMEBUFFER,null)}}if(vt){e.bindTexture(n.TEXTURE_CUBE_MAP,yt.__webglTexture),at(n.TEXTURE_CUBE_MAP,A);for(let Nt=0;Nt<6;Nt++)if(A.mipmaps&&A.mipmaps.length>0)for(let Wt=0;Wt<A.mipmaps.length;Wt++)bt(K.__webglFramebuffer[Nt][Wt],H,A,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+Nt,Wt);else bt(K.__webglFramebuffer[Nt],H,A,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+Nt,0);S(A)&&b(n.TEXTURE_CUBE_MAP),e.unbindTexture()}else if(qt){for(let Nt=0,Wt=Tt.length;Nt<Wt;Nt++){const ne=Tt[Nt],Ct=s.get(ne);let Rt=n.TEXTURE_2D;(H.isWebGL3DRenderTarget||H.isWebGLArrayRenderTarget)&&(Rt=H.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),e.bindTexture(Rt,Ct.__webglTexture),at(Rt,ne),bt(K.__webglFramebuffer,H,ne,n.COLOR_ATTACHMENT0+Nt,Rt,0),S(ne)&&b(Rt)}e.unbindTexture()}else{let Nt=n.TEXTURE_2D;if((H.isWebGL3DRenderTarget||H.isWebGLArrayRenderTarget)&&(Nt=H.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),e.bindTexture(Nt,yt.__webglTexture),at(Nt,A),A.mipmaps&&A.mipmaps.length>0)for(let Wt=0;Wt<A.mipmaps.length;Wt++)bt(K.__webglFramebuffer[Wt],H,A,n.COLOR_ATTACHMENT0,Nt,Wt);else bt(K.__webglFramebuffer,H,A,n.COLOR_ATTACHMENT0,Nt,0);S(A)&&b(Nt),e.unbindTexture()}H.depthBuffer&&ae(H)}function ye(H){const A=H.textures;for(let K=0,yt=A.length;K<yt;K++){const Tt=A[K];if(S(Tt)){const vt=R(H),qt=s.get(Tt).__webglTexture;e.bindTexture(vt,qt),b(vt),e.unbindTexture()}}}const Ie=[],de=[];function Ke(H){if(H.samples>0){if(Pe(H)===!1){const A=H.textures,K=H.width,yt=H.height;let Tt=n.COLOR_BUFFER_BIT;const vt=H.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,qt=s.get(H),Nt=A.length>1;if(Nt)for(let ne=0;ne<A.length;ne++)e.bindFramebuffer(n.FRAMEBUFFER,qt.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+ne,n.RENDERBUFFER,null),e.bindFramebuffer(n.FRAMEBUFFER,qt.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+ne,n.TEXTURE_2D,null,0);e.bindFramebuffer(n.READ_FRAMEBUFFER,qt.__webglMultisampledFramebuffer);const Wt=H.texture.mipmaps;Wt&&Wt.length>0?e.bindFramebuffer(n.DRAW_FRAMEBUFFER,qt.__webglFramebuffer[0]):e.bindFramebuffer(n.DRAW_FRAMEBUFFER,qt.__webglFramebuffer);for(let ne=0;ne<A.length;ne++){if(H.resolveDepthBuffer&&(H.depthBuffer&&(Tt|=n.DEPTH_BUFFER_BIT),H.stencilBuffer&&H.resolveStencilBuffer&&(Tt|=n.STENCIL_BUFFER_BIT)),Nt){n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,qt.__webglColorRenderbuffer[ne]);const Ct=s.get(A[ne]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,Ct,0)}n.blitFramebuffer(0,0,K,yt,0,0,K,yt,Tt,n.NEAREST),h===!0&&(Ie.length=0,de.length=0,Ie.push(n.COLOR_ATTACHMENT0+ne),H.depthBuffer&&H.resolveDepthBuffer===!1&&(Ie.push(vt),de.push(vt),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,de)),n.invalidateFramebuffer(n.READ_FRAMEBUFFER,Ie))}if(e.bindFramebuffer(n.READ_FRAMEBUFFER,null),e.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),Nt)for(let ne=0;ne<A.length;ne++){e.bindFramebuffer(n.FRAMEBUFFER,qt.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+ne,n.RENDERBUFFER,qt.__webglColorRenderbuffer[ne]);const Ct=s.get(A[ne]).__webglTexture;e.bindFramebuffer(n.FRAMEBUFFER,qt.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+ne,n.TEXTURE_2D,Ct,0)}e.bindFramebuffer(n.DRAW_FRAMEBUFFER,qt.__webglMultisampledFramebuffer)}else if(H.depthBuffer&&H.resolveDepthBuffer===!1&&h){const A=H.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[A])}}}function X(H){return Math.min(r.maxSamples,H.samples)}function Pe(H){const A=s.get(H);return H.samples>0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&A.__useRenderToTexture!==!1}function Re(H){const A=u.render.frame;g.get(H)!==A&&(g.set(H,A),H.update())}function Be(H,A){const K=H.colorSpace,yt=H.format,Tt=H.type;return H.isCompressedTexture===!0||H.isVideoTexture===!0||K!==xl&&K!==tr&&(ze.getTransfer(K)===Ze?(yt!==os||Tt!==Ni)&&fe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):Oe("WebGLTextures: Unsupported texture color space:",K)),A}function Ht(H){return typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement?(d.width=H.naturalWidth||H.width,d.height=H.naturalHeight||H.height):typeof VideoFrame<"u"&&H instanceof VideoFrame?(d.width=H.displayWidth,d.height=H.displayHeight):(d.width=H.width,d.height=H.height),d}this.allocateTextureUnit=Z,this.resetTextureUnits=Q,this.setTexture2D=ot,this.setTexture2DArray=I,this.setTexture3D=V,this.setTextureCube=k,this.rebindTextures=Ce,this.setupRenderTarget=ge,this.updateRenderTargetMipmap=ye,this.updateMultisampleRenderTarget=Ke,this.setupDepthRenderbuffer=ae,this.setupFrameBufferTexture=bt,this.useMultisampledRTT=Pe,this.isReversedDepthBuffer=function(){return e.buffers.depth.getReversed()}}function BB(n,t){function e(s,r=tr){let l;const u=ze.getTransfer(r);if(s===Ni)return n.UNSIGNED_BYTE;if(s===Ix)return n.UNSIGNED_SHORT_4_4_4_4;if(s===zx)return n.UNSIGNED_SHORT_5_5_5_1;if(s===B2)return n.UNSIGNED_INT_5_9_9_9_REV;if(s===V2)return n.UNSIGNED_INT_10F_11F_11F_REV;if(s===I2)return n.BYTE;if(s===z2)return n.SHORT;if(s===Kc)return n.UNSIGNED_SHORT;if(s===Fx)return n.INT;if(s===Rs)return n.UNSIGNED_INT;if(s===bs)return n.FLOAT;if(s===pa)return n.HALF_FLOAT;if(s===H2)return n.ALPHA;if(s===k2)return n.RGB;if(s===os)return n.RGBA;if(s===ma)return n.DEPTH_COMPONENT;if(s===kr)return n.DEPTH_STENCIL;if(s===G2)return n.RED;if(s===Bx)return n.RED_INTEGER;if(s===gl)return n.RG;if(s===Vx)return n.RG_INTEGER;if(s===Hx)return n.RGBA_INTEGER;if(s===ud||s===fd||s===dd||s===hd)if(u===Ze)if(l=t.get("WEBGL_compressed_texture_s3tc_srgb"),l!==null){if(s===ud)return l.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===fd)return l.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===dd)return l.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===hd)return l.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(l=t.get("WEBGL_compressed_texture_s3tc"),l!==null){if(s===ud)return l.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===fd)return l.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===dd)return l.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===hd)return l.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===ig||s===sg||s===ag||s===rg)if(l=t.get("WEBGL_compressed_texture_pvrtc"),l!==null){if(s===ig)return l.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===sg)return l.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===ag)return l.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===rg)return l.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===og||s===lg||s===cg||s===ug||s===fg||s===dg||s===hg)if(l=t.get("WEBGL_compressed_texture_etc"),l!==null){if(s===og||s===lg)return u===Ze?l.COMPRESSED_SRGB8_ETC2:l.COMPRESSED_RGB8_ETC2;if(s===cg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:l.COMPRESSED_RGBA8_ETC2_EAC;if(s===ug)return l.COMPRESSED_R11_EAC;if(s===fg)return l.COMPRESSED_SIGNED_R11_EAC;if(s===dg)return l.COMPRESSED_RG11_EAC;if(s===hg)return l.COMPRESSED_SIGNED_RG11_EAC}else return null;if(s===pg||s===mg||s===gg||s===xg||s===vg||s===yg||s===_g||s===bg||s===Sg||s===Mg||s===Eg||s===Tg||s===Ag||s===wg)if(l=t.get("WEBGL_compressed_texture_astc"),l!==null){if(s===pg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:l.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===mg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:l.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===gg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:l.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===xg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:l.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===vg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:l.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===yg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:l.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===_g)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:l.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===bg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:l.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===Sg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:l.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===Mg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:l.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===Eg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:l.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===Tg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:l.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===Ag)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:l.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===wg)return u===Ze?l.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:l.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===Cg||s===Rg||s===Dg)if(l=t.get("EXT_texture_compression_bptc"),l!==null){if(s===Cg)return u===Ze?l.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:l.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(s===Rg)return l.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(s===Dg)return l.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(s===Ng||s===Lg||s===Pg||s===Ug)if(l=t.get("EXT_texture_compression_rgtc"),l!==null){if(s===Ng)return l.COMPRESSED_RED_RGTC1_EXT;if(s===Lg)return l.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===Pg)return l.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===Ug)return l.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Qc?n.UNSIGNED_INT_24_8:n[s]!==void 0?n[s]:null}return{convert:e}}const VB=` 4175void main() { 4176 4177 gl_Position = vec4( position, 1.0 ); 4178 4179}`,HB=` 4180uniform sampler2DArray depthColor; 4181uniform float depthWidth; 4182uniform float depthHeight; 4183 4184void main() { 4185 4186 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 4187 4188 if ( coord.x >= 1.0 ) { 4189 4190 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 4191 4192 } else { 4193 4194 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 4195 4196 } 4197 4198}`;class kB{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e){if(this.texture===null){const s=new nA(t.texture);(t.depthNear!==e.depthNear||t.depthFar!==e.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=s}}getMesh(t){if(this.texture!==null&&this.mesh===null){const e=t.cameras[0].viewport,s=new Ds({vertexShader:VB,fragmentShader:HB,uniforms:{depthColor:{value:this.texture},depthWidth:{value:e.z},depthHeight:{value:e.w}}});this.mesh=new xa(new Kd(20,20),s)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class GB extends Kr{constructor(t,e){super();const s=this;let r=null,l=1,u=null,f="local-floor",h=1,d=null,g=null,m=null,v=null,_=null,M=null;const T=typeof XRWebGLBinding<"u",S=new kB,b={},R=e.getContextAttributes();let C=null,P=null;const U=[],F=[],L=new ce;let z=null;const w=new Di;w.viewport=new xn;const O=new Di;O.viewport=new xn;const j=[w,O],Q=new KO;let Z=null,rt=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(J){let it=U[J];return it===void 0&&(it=new Jm,U[J]=it),it.getTargetRaySpace()},this.getControllerGrip=function(J){let it=U[J];return it===void 0&&(it=new Jm,U[J]=it),it.getGripSpace()},this.getHand=function(J){let it=U[J];return it===void 0&&(it=new Jm,U[J]=it),it.getHandSpace()};function ot(J){const it=F.indexOf(J.inputSource);if(it===-1)return;const bt=U[it];bt!==void 0&&(bt.update(J.inputSource,J.frame,d||u),bt.dispatchEvent({type:J.type,data:J.inputSource}))}function I(){r.removeEventListener("select",ot),r.removeEventListener("selectstart",ot),r.removeEventListener("selectend",ot),r.removeEventListener("squeeze",ot),r.removeEventListener("squeezestart",ot),r.removeEventListener("squeezeend",ot),r.removeEventListener("end",I),r.removeEventListener("inputsourceschange",V);for(let J=0;J<U.length;J++){const it=F[J];it!==null&&(F[J]=null,U[J].disconnect(it))}Z=null,rt=null,S.reset();for(const J in b)delete b[J];t.setRenderTarget(C),_=null,v=null,m=null,r=null,P=null,Et.stop(),s.isPresenting=!1,t.setPixelRatio(z),t.setSize(L.width,L.height,!1),s.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(J){l=J,s.isPresenting===!0&&fe("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(J){f=J,s.isPresenting===!0&&fe("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return d||u},this.setReferenceSpace=function(J){d=J},this.getBaseLayer=function(){return v!==null?v:_},this.getBinding=function(){return m===null&&T&&(m=new XRWebGLBinding(r,e)),m},this.getFrame=function(){return M},this.getSession=function(){return r},this.setSession=async function(J){if(r=J,r!==null){if(C=t.getRenderTarget(),r.addEventListener("select",ot),r.addEventListener("selectstart",ot),r.addEventListener("selectend",ot),r.addEventListener("squeeze",ot),r.addEventListener("squeezestart",ot),r.addEventListener("squeezeend",ot),r.addEventListener("end",I),r.addEventListener("inputsourceschange",V),R.xrCompatible!==!0&&await e.makeXRCompatible(),z=t.getPixelRatio(),t.getSize(L),T&&"createProjectionLayer"in XRWebGLBinding.prototype){let bt=null,Ot=null,Ut=null;R.depth&&(Ut=R.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,bt=R.stencil?kr:ma,Ot=R.stencil?Qc:Rs);const ae={colorFormat:e.RGBA8,depthFormat:Ut,scaleFactor:l};m=this.getBinding(),v=m.createProjectionLayer(ae),r.updateRenderState({layers:[v]}),t.setPixelRatio(1),t.setSize(v.textureWidth,v.textureHeight,!1),P=new ws(v.textureWidth,v.textureHeight,{format:os,type:Ni,depthTexture:new tu(v.textureWidth,v.textureHeight,Ot,void 0,void 0,void 0,void 0,void 0,void 0,bt),stencilBuffer:R.stencil,colorSpace:t.outputColorSpace,samples:R.antialias?4:0,resolveDepthBuffer:v.ignoreDepthValues===!1,resolveStencilBuffer:v.ignoreDepthValues===!1})}else{const bt={antialias:R.antialias,alpha:!0,depth:R.depth,stencil:R.stencil,framebufferScaleFactor:l};_=new XRWebGLLayer(r,e,bt),r.updateRenderState({baseLayer:_}),t.setPixelRatio(1),t.setSize(_.framebufferWidth,_.framebufferHeight,!1),P=new ws(_.framebufferWidth,_.framebufferHeight,{format:os,type:Ni,colorSpace:t.outputColorSpace,stencilBuffer:R.stencil,resolveDepthBuffer:_.ignoreDepthValues===!1,resolveStencilBuffer:_.ignoreDepthValues===!1})}P.isXRRenderTarget=!0,this.setFoveation(h),d=null,u=await r.requestReferenceSpace(f),Et.setContext(r),Et.start(),s.isPresenting=!0,s.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return S.getDepthTexture()};function V(J){for(let it=0;it<J.removed.length;it++){const bt=J.removed[it],Ot=F.indexOf(bt);Ot>=0&&(F[Ot]=null,U[Ot].disconnect(bt))}for(let it=0;it<J.added.length;it++){const bt=J.added[it];let Ot=F.indexOf(bt);if(Ot===-1){for(let ae=0;ae<U.length;ae++)if(ae>=F.length){F.push(bt),Ot=ae;break}else if(F[ae]===null){F[ae]=bt,Ot=ae;break}if(Ot===-1)break}const Ut=U[Ot];Ut&&Ut.connect(bt)}}const k=new et,gt=new et;function xt(J,it,bt){k.setFromMatrixPosition(it.matrixWorld),gt.setFromMatrixPosition(bt.matrixWorld);const Ot=k.distanceTo(gt),Ut=it.projectionMatrix.elements,ae=bt.projectionMatrix.elements,Ce=Ut[14]/(Ut[10]-1),ge=Ut[14]/(Ut[10]+1),ye=(Ut[9]+1)/Ut[5],Ie=(Ut[9]-1)/Ut[5],de=(Ut[8]-1)/Ut[0],Ke=(ae[8]+1)/ae[0],X=Ce*de,Pe=Ce*Ke,Re=Ot/(-de+Ke),Be=Re*-de;if(it.matrixWorld.decompose(J.position,J.quaternion,J.scale),J.translateX(Be),J.translateZ(Re),J.matrixWorld.compose(J.position,J.quaternion,J.scale),J.matrixWorldInverse.copy(J.matrixWorld).invert(),Ut[10]===-1)J.projectionMatrix.copy(it.projectionMatrix),J.projectionMatrixInverse.copy(it.projectionMatrixInverse);else{const Ht=Ce+Re,H=ge+Re,A=X-Be,K=Pe+(Ot-Be),yt=ye*ge/H*Ht,Tt=Ie*ge/H*Ht;J.projectionMatrix.makePerspective(A,K,yt,Tt,Ht,H),J.projectionMatrixInverse.copy(J.projectionMatrix).invert()}}function B(J,it){it===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(it.matrixWorld,J.matrix),J.matrixWorldInverse.copy(J.matrixWorld).invert()}this.updateCamera=function(J){if(r===null)return;let it=J.near,bt=J.far;S.texture!==null&&(S.depthNear>0&&(it=S.depthNear),S.depthFar>0&&(bt=S.depthFar)),Q.near=O.near=w.near=it,Q.far=O.far=w.far=bt,(Z!==Q.near||rt!==Q.far)&&(r.updateRenderState({depthNear:Q.near,depthFar:Q.far}),Z=Q.near,rt=Q.far),Q.layers.mask=J.layers.mask|6,w.layers.mask=Q.layers.mask&3,O.layers.mask=Q.layers.mask&5;const Ot=J.parent,Ut=Q.cameras;B(Q,Ot);for(let ae=0;ae<Ut.length;ae++)B(Ut[ae],Ot);Ut.length===2?xt(Q,w,O):Q.projectionMatrix.copy(w.projectionMatrix),at(J,Q,Ot)};function at(J,it,bt){bt===null?J.matrix.copy(it.matrixWorld):(J.matrix.copy(bt.matrixWorld),J.matrix.invert(),J.matrix.multiply(it.matrixWorld)),J.matrix.decompose(J.position,J.quaternion,J.scale),J.updateMatrixWorld(!0),J.projectionMatrix.copy(it.projectionMatrix),J.projectionMatrixInverse.copy(it.projectionMatrixInverse),J.isPerspectiveCamera&&(J.fov=Fg*2*Math.atan(1/J.projectionMatrix.elements[5]),J.zoom=1)}this.getCamera=function(){return Q},this.getFoveation=function(){if(!(v===null&&_===null))return h},this.setFoveation=function(J){h=J,v!==null&&(v.fixedFoveation=J),_!==null&&_.fixedFoveation!==void 0&&(_.fixedFoveation=J)},this.hasDepthSensing=function(){return S.texture!==null},this.getDepthSensingMesh=function(){return S.getMesh(Q)},this.getCameraTexture=function(J){return b[J]};let nt=null;function pt(J,it){if(g=it.getViewerPose(d||u),M=it,g!==null){const bt=g.views;_!==null&&(t.setRenderTargetFramebuffer(P,_.framebuffer),t.setRenderTarget(P));let Ot=!1;bt.length!==Q.cameras.length&&(Q.cameras.length=0,Ot=!0);for(let ge=0;ge<bt.length;ge++){const ye=bt[ge];let Ie=null;if(_!==null)Ie=_.getViewport(ye);else{const Ke=m.getViewSubImage(v,ye);Ie=Ke.viewport,ge===0&&(t.setRenderTargetTextures(P,Ke.colorTexture,Ke.depthStencilTexture),t.setRenderTarget(P))}let de=j[ge];de===void 0&&(de=new Di,de.layers.enable(ge),de.viewport=new xn,j[ge]=de),de.matrix.fromArray(ye.transform.matrix),de.matrix.decompose(de.position,de.quaternion,de.scale),de.projectionMatrix.fromArray(ye.projectionMatrix),de.projectionMatrixInverse.copy(de.projectionMatrix).invert(),de.viewport.set(Ie.x,Ie.y,Ie.width,Ie.height),ge===0&&(Q.matrix.copy(de.matrix),Q.matrix.decompose(Q.position,Q.quaternion,Q.scale)),Ot===!0&&Q.cameras.push(de)}const Ut=r.enabledFeatures;if(Ut&&Ut.includes("depth-sensing")&&r.depthUsage=="gpu-optimized"&&T){m=s.getBinding();const ge=m.getDepthInformation(bt[0]);ge&&ge.isValid&&ge.texture&&S.init(ge,r.renderState)}if(Ut&&Ut.includes("camera-access")&&T){t.state.unbindTexture(),m=s.getBinding();for(let ge=0;ge<bt.length;ge++){const ye=bt[ge].camera;if(ye){let Ie=b[ye];Ie||(Ie=new nA,b[ye]=Ie);const de=m.getCameraImage(ye);Ie.sourceTexture=de}}}}for(let bt=0;bt<U.length;bt++){const Ot=F[bt],Ut=U[bt];Ot!==null&&Ut!==void 0&&Ut.update(Ot,it,d||u)}nt&&nt(J,it),it.detectedPlanes&&s.dispatchEvent({type:"planesdetected",data:it}),M=null}const Et=new sA;Et.setAnimationLoop(pt),this.setAnimationLoop=function(J){nt=J},this.dispose=function(){}}}const Ur=new ga,jB=new ln;function WB(n,t){function e(S,b){S.matrixAutoUpdate===!0&&S.updateMatrix(),b.value.copy(S.matrix)}function s(S,b){b.color.getRGB(S.fogColor.value,K2(n)),b.isFog?(S.fogNear.value=b.near,S.fogFar.value=b.far):b.isFogExp2&&(S.fogDensity.value=b.density)}function r(S,b,R,C,P){b.isMeshBasicMaterial||b.isMeshLambertMaterial?l(S,b):b.isMeshToonMaterial?(l(S,b),m(S,b)):b.isMeshPhongMaterial?(l(S,b),g(S,b)):b.isMeshStandardMaterial?(l(S,b),v(S,b),b.isMeshPhysicalMaterial&&_(S,b,P)):b.isMeshMatcapMaterial?(l(S,b),M(S,b)):b.isMeshDepthMaterial?l(S,b):b.isMeshDistanceMaterial?(l(S,b),T(S,b)):b.isMeshNormalMaterial?l(S,b):b.isLineBasicMaterial?(u(S,b),b.isLineDashedMaterial&&f(S,b)):b.isPointsMaterial?h(S,b,R,C):b.isSpriteMaterial?d(S,b):b.isShadowMaterial?(S.color.value.copy(b.color),S.opacity.value=b.opacity):b.isShaderMaterial&&(b.uniformsNeedUpdate=!1)}function l(S,b){S.opacity.value=b.opacity,b.color&&S.diffuse.value.copy(b.color),b.emissive&&S.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity),b.map&&(S.map.value=b.map,e(b.map,S.mapTransform)),b.alphaMap&&(S.alphaMap.value=b.alphaMap,e(b.alphaMap,S.alphaMapTransform)),b.bumpMap&&(S.bumpMap.value=b.bumpMap,e(b.bumpMap,S.bumpMapTransform),S.bumpScale.value=b.bumpScale,b.side===yi&&(S.bumpScale.value*=-1)),b.normalMap&&(S.normalMap.value=b.normalMap,e(b.normalMap,S.normalMapTransform),S.normalScale.value.copy(b.normalScale),b.side===yi&&S.normalScale.value.negate()),b.displacementMap&&(S.displacementMap.value=b.displacementMap,e(b.displacementMap,S.displacementMapTransform),S.displacementScale.value=b.displacementScale,S.displacementBias.value=b.displacementBias),b.emissiveMap&&(S.emissiveMap.value=b.emissiveMap,e(b.emissiveMap,S.emissiveMapTransform)),b.specularMap&&(S.specularMap.value=b.specularMap,e(b.specularMap,S.specularMapTransform)),b.alphaTest>0&&(S.alphaTest.value=b.alphaTest);const R=t.get(b),C=R.envMap,P=R.envMapRotation;C&&(S.envMap.value=C,Ur.copy(P),Ur.x*=-1,Ur.y*=-1,Ur.z*=-1,C.isCubeTexture&&C.isRenderTargetTexture===!1&&(Ur.y*=-1,Ur.z*=-1),S.envMapRotation.value.setFromMatrix4(jB.makeRotationFromEuler(Ur)),S.flipEnvMap.value=C.isCubeTexture&&C.isRenderTargetTexture===!1?-1:1,S.reflectivity.value=b.reflectivity,S.ior.value=b.ior,S.refractionRatio.value=b.refractionRatio),b.lightMap&&(S.lightMap.value=b.lightMap,S.lightMapIntensity.value=b.lightMapIntensity,e(b.lightMap,S.lightMapTransform)),b.aoMap&&(S.aoMap.value=b.aoMap,S.aoMapIntensity.value=b.aoMapIntensity,e(b.aoMap,S.aoMapTransform))}function u(S,b){S.diffuse.value.copy(b.color),S.opacity.value=b.opacity,b.map&&(S.map.value=b.map,e(b.map,S.mapTransform))}function f(S,b){S.dashSize.value=b.dashSize,S.totalSize.value=b.dashSize+b.gapSize,S.scale.value=b.scale}function h(S,b,R,C){S.diffuse.value.copy(b.color),S.opacity.value=b.opacity,S.size.value=b.size*R,S.scale.value=C*.5,b.map&&(S.map.value=b.map,e(b.map,S.uvTransform)),b.alphaMap&&(S.alphaMap.value=b.alphaMap,e(b.alphaMap,S.alphaMapTransform)),b.alphaTest>0&&(S.alphaTest.value=b.alphaTest)}function d(S,b){S.diffuse.value.copy(b.color),S.opacity.value=b.opacity,S.rotation.value=b.rotation,b.map&&(S.map.value=b.map,e(b.map,S.mapTransform)),b.alphaMap&&(S.alphaMap.value=b.alphaMap,e(b.alphaMap,S.alphaMapTransform)),b.alphaTest>0&&(S.alphaTest.value=b.alphaTest)}function g(S,b){S.specular.value.copy(b.specular),S.shininess.value=Math.max(b.shininess,1e-4)}function m(S,b){b.gradientMap&&(S.gradientMap.value=b.gradientMap)}function v(S,b){S.metalness.value=b.metalness,b.metalnessMap&&(S.metalnessMap.value=b.metalnessMap,e(b.metalnessMap,S.metalnessMapTransform)),S.roughness.value=b.roughness,b.roughnessMap&&(S.roughnessMap.value=b.roughnessMap,e(b.roughnessMap,S.roughnessMapTransform)),b.envMap&&(S.envMapIntensity.value=b.envMapIntensity)}function _(S,b,R){S.ior.value=b.ior,b.sheen>0&&(S.sheenColor.value.copy(b.sheenColor).multiplyScalar(b.sheen),S.sheenRoughness.value=b.sheenRoughness,b.sheenColorMap&&(S.sheenColorMap.value=b.sheenColorMap,e(b.sheenColorMap,S.sheenColorMapTransform)),b.sheenRoughnessMap&&(S.sheenRoughnessMap.value=b.sheenRoughnessMap,e(b.sheenRoughnessMap,S.sheenRoughnessMapTransform))),b.clearcoat>0&&(S.clearcoat.value=b.clearcoat,S.clearcoatRoughness.value=b.clearcoatRoughness,b.clearcoatMap&&(S.clearcoatMap.value=b.clearcoatMap,e(b.clearcoatMap,S.clearcoatMapTransform)),b.clearcoatRoughnessMap&&(S.clearcoatRoughnessMap.value=b.clearcoatRoughnessMap,e(b.clearcoatRoughnessMap,S.clearcoatRoughnessMapTransform)),b.clearcoatNormalMap&&(S.clearcoatNormalMap.value=b.clearcoatNormalMap,e(b.clearcoatNormalMap,S.clearcoatNormalMapTransform),S.clearcoatNormalScale.value.copy(b.clearcoatNormalScale),b.side===yi&&S.clearcoatNormalScale.value.negate())),b.dispersion>0&&(S.dispersion.value=b.dispersion),b.iridescence>0&&(S.iridescence.value=b.iridescence,S.iridescenceIOR.value=b.iridescenceIOR,S.iridescenceThicknessMinimum.value=b.iridescenceThicknessRange[0],S.iridescenceThicknessMaximum.value=b.iridescenceThicknessRange[1],b.iridescenceMap&&(S.iridescenceMap.value=b.iridescenceMap,e(b.iridescenceMap,S.iridescenceMapTransform)),b.iridescenceThicknessMap&&(S.iridescenceThicknessMap.value=b.iridescenceThicknessMap,e(b.iridescenceThicknessMap,S.iridescenceThicknessMapTransform))),b.transmission>0&&(S.transmission.value=b.transmission,S.transmissionSamplerMap.value=R.texture,S.transmissionSamplerSize.value.set(R.width,R.height),b.transmissionMap&&(S.transmissionMap.value=b.transmissionMap,e(b.transmissionMap,S.transmissionMapTransform)),S.thickness.value=b.thickness,b.thicknessMap&&(S.thicknessMap.value=b.thicknessMap,e(b.thicknessMap,S.thicknessMapTransform)),S.attenuationDistance.value=b.attenuationDistance,S.attenuationColor.value.copy(b.attenuationColor)),b.anisotropy>0&&(S.anisotropyVector.value.set(b.anisotropy*Math.cos(b.anisotropyRotation),b.anisotropy*Math.sin(b.anisotropyRotation)),b.anisotropyMap&&(S.anisotropyMap.value=b.anisotropyMap,e(b.anisotropyMap,S.anisotropyMapTransform))),S.specularIntensity.value=b.specularIntensity,S.specularColor.value.copy(b.specularColor),b.specularColorMap&&(S.specularColorMap.value=b.specularColorMap,e(b.specularColorMap,S.specularColorMapTransform)),b.specularIntensityMap&&(S.specularIntensityMap.value=b.specularIntensityMap,e(b.specularIntensityMap,S.specularIntensityMapTransform))}function M(S,b){b.matcap&&(S.matcap.value=b.matcap)}function T(S,b){const R=t.get(b).light;S.referencePosition.value.setFromMatrixPosition(R.matrixWorld),S.nearDistance.value=R.shadow.camera.near,S.farDistance.value=R.shadow.camera.far}return{refreshFogUniforms:s,refreshMaterialUniforms:r}}function XB(n,t,e,s){let r={},l={},u=[];const f=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function h(R,C){const P=C.program;s.uniformBlockBinding(R,P)}function d(R,C){let P=r[R.id];P===void 0&&(M(R),P=g(R),r[R.id]=P,R.addEventListener("dispose",S));const U=C.program;s.updateUBOMapping(R,U);const F=t.render.frame;l[R.id]!==F&&(v(R),l[R.id]=F)}function g(R){const C=m();R.__bindingPointIndex=C;const P=n.createBuffer(),U=R.__size,F=R.usage;return n.bindBuffer(n.UNIFORM_BUFFER,P),n.bufferData(n.UNIFORM_BUFFER,U,F),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,C,P),P}function m(){for(let R=0;R<f;R++)if(u.indexOf(R)===-1)return u.push(R),R;return Oe("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function v(R){const C=r[R.id],P=R.uniforms,U=R.__cache;n.bindBuffer(n.UNIFORM_BUFFER,C);for(let F=0,L=P.length;F<L;F++){const z=Array.isArray(P[F])?P[F]:[P[F]];for(let w=0,O=z.length;w<O;w++){const j=z[w];if(_(j,F,w,U)===!0){const Q=j.__offset,Z=Array.isArray(j.value)?j.value:[j.value];let rt=0;for(let ot=0;ot<Z.length;ot++){const I=Z[ot],V=T(I);typeof I=="number"||typeof I=="boolean"?(j.__data[0]=I,n.bufferSubData(n.UNIFORM_BUFFER,Q+rt,j.__data)):I.isMatrix3?(j.__data[0]=I.elements[0],j.__data[1]=I.elements[1],j.__data[2]=I.elements[2],j.__data[3]=0,j.__data[4]=I.elements[3],j.__data[5]=I.elements[4],j.__data[6]=I.elements[5],j.__data[7]=0,j.__data[8]=I.elements[6],j.__data[9]=I.elements[7],j.__data[10]=I.elements[8],j.__data[11]=0):(I.toArray(j.__data,rt),rt+=V.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,Q,j.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}function _(R,C,P,U){const F=R.value,L=C+"_"+P;if(U[L]===void 0)return typeof F=="number"||typeof F=="boolean"?U[L]=F:U[L]=F.clone(),!0;{const z=U[L];if(typeof F=="number"||typeof F=="boolean"){if(z!==F)return U[L]=F,!0}else if(z.equals(F)===!1)return z.copy(F),!0}return!1}function M(R){const C=R.uniforms;let P=0;const U=16;for(let L=0,z=C.length;L<z;L++){const w=Array.isArray(C[L])?C[L]:[C[L]];for(let O=0,j=w.length;O<j;O++){const Q=w[O],Z=Array.isArray(Q.value)?Q.value:[Q.value];for(let rt=0,ot=Z.length;rt<ot;rt++){const I=Z[rt],V=T(I),k=P%U,gt=k%V.boundary,xt=k+gt;P+=gt,xt!==0&&U-xt<V.storage&&(P+=U-xt),Q.__data=new Float32Array(V.storage/Float32Array.BYTES_PER_ELEMENT),Q.__offset=P,P+=V.storage}}}const F=P%U;return F>0&&(P+=U-F),R.__size=P,R.__cache={},this}function T(R){const C={boundary:0,storage:0};return typeof R=="number"||typeof R=="boolean"?(C.boundary=4,C.storage=4):R.isVector2?(C.boundary=8,C.storage=8):R.isVector3||R.isColor?(C.boundary=16,C.storage=12):R.isVector4?(C.boundary=16,C.storage=16):R.isMatrix3?(C.boundary=48,C.storage=48):R.isMatrix4?(C.boundary=64,C.storage=64):R.isTexture?fe("WebGLRenderer: Texture samplers can not be part of an uniforms group."):fe("WebGLRenderer: Unsupported uniform value type.",R),C}function S(R){const C=R.target;C.removeEventListener("dispose",S);const P=u.indexOf(C.__bindingPointIndex);u.splice(P,1),n.deleteBuffer(r[C.id]),delete r[C.id],delete l[C.id]}function b(){for(const R in r)n.deleteBuffer(r[R]);u=[],r={},l={}}return{bind:h,update:d,dispose:b}}const YB=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let xs=null;function qB(){return xs===null&&(xs=new NO(YB,16,16,gl,pa),xs.name="DFG_LUT",xs.minFilter=ni,xs.magFilter=ni,xs.wrapS=oa,xs.wrapT=oa,xs.generateMipmaps=!1,xs.needsUpdate=!0),xs}class ZB{constructor(t={}){const{canvas:e=nO(),context:s=null,depth:r=!0,stencil:l=!1,alpha:u=!1,antialias:f=!1,premultipliedAlpha:h=!0,preserveDrawingBuffer:d=!1,powerPreference:g="default",failIfMajorPerformanceCaveat:m=!1,reversedDepthBuffer:v=!1,outputBufferType:_=Ni}=t;this.isWebGLRenderer=!0;let M;if(s!==null){if(typeof WebGLRenderingContext<"u"&&s instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");M=s.getContextAttributes().alpha}else M=u;const T=_,S=new Set([Hx,Vx,Bx]),b=new Set([Ni,Rs,Kc,Qc,Ix,zx]),R=new Uint32Array(4),C=new Int32Array(4);let P=null,U=null;const F=[],L=[];let z=null;this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=As,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const w=this;let O=!1;this._outputColorSpace=xi;let j=0,Q=0,Z=null,rt=-1,ot=null;const I=new xn,V=new xn;let k=null;const gt=new Fe(0);let xt=0,B=e.width,at=e.height,nt=1,pt=null,Et=null;const J=new xn(0,0,B,at),it=new xn(0,0,B,at);let bt=!1;const Ot=new Xx;let Ut=!1,ae=!1;const Ce=new ln,ge=new et,ye=new xn,Ie={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let de=!1;function Ke(){return Z===null?nt:1}let X=s;function Pe(N,$){return e.getContext(N,$)}try{const N={alpha:!0,depth:r,stencil:l,antialias:f,premultipliedAlpha:h,preserveDrawingBuffer:d,powerPreference:g,failIfMajorPerformanceCaveat:m};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${Ux}`),e.addEventListener("webglcontextlost",Qt,!1),e.addEventListener("webglcontextrestored",xe,!1),e.addEventListener("webglcontextcreationerror",Ee,!1),X===null){const $="webgl2";if(X=Pe($,N),X===null)throw Pe($)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(N){throw Oe("WebGLRenderer: "+N.message),N}let Re,Be,Ht,H,A,K,yt,Tt,vt,qt,Nt,Wt,ne,Ct,Rt,Gt,zt,Lt,he,Y,Ft,Dt,Bt,At;function ut(){Re=new qI(X),Re.init(),Dt=new BB(X,Re),Be=new BI(X,Re,t,Dt),Ht=new IB(X,Re),Be.reversedDepthBuffer&&v&&Ht.buffers.depth.setReversed(!0),H=new QI(X),A=new SB,K=new zB(X,Re,Ht,A,Be,Dt,H),yt=new HI(w),Tt=new YI(w),vt=new e8(X),Bt=new II(X,vt),qt=new ZI(X,vt,H,Bt),Nt=new $I(X,qt,vt,H),he=new JI(X,Be,K),Gt=new VI(A),Wt=new bB(w,yt,Tt,Re,Be,Bt,Gt),ne=new WB(w,A),Ct=new EB,Rt=new DB(Re),Lt=new FI(w,yt,Tt,Ht,Nt,M,h),zt=new OB(w,Nt,Be),At=new XB(X,H,Be,Ht),Y=new zI(X,Re,H),Ft=new KI(X,Re,H),H.programs=Wt.programs,w.capabilities=Be,w.extensions=Re,w.properties=A,w.renderLists=Ct,w.shadowMap=zt,w.state=Ht,w.info=H}ut(),T!==Ni&&(z=new ez(T,e.width,e.height,r,l));const wt=new GB(w,X);this.xr=wt,this.getContext=function(){return X},this.getContextAttributes=function(){return X.getContextAttributes()},this.forceContextLoss=function(){const N=Re.get("WEBGL_lose_context");N&&N.loseContext()},this.forceContextRestore=function(){const N=Re.get("WEBGL_lose_context");N&&N.restoreContext()},this.getPixelRatio=function(){return nt},this.setPixelRatio=function(N){N!==void 0&&(nt=N,this.setSize(B,at,!1))},this.getSize=function(N){return N.set(B,at)},this.setSize=function(N,$,ht=!0){if(wt.isPresenting){fe("WebGLRenderer: Can't change size while VR device is presenting.");return}B=N,at=$,e.width=Math.floor(N*nt),e.height=Math.floor($*nt),ht===!0&&(e.style.width=N+"px",e.style.height=$+"px"),z!==null&&z.setSize(e.width,e.height),this.setViewport(0,0,N,$)},this.getDrawingBufferSize=function(N){return N.set(B*nt,at*nt).floor()},this.setDrawingBufferSize=function(N,$,ht){B=N,at=$,nt=ht,e.width=Math.floor(N*ht),e.height=Math.floor($*ht),this.setViewport(0,0,N,$)},this.setEffects=function(N){if(T===Ni){console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(N){for(let $=0;$<N.length;$++)if(N[$].isOutputPass===!0){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}z.setEffects(N||[])},this.getCurrentViewport=function(N){return N.copy(I)},this.getViewport=function(N){return N.copy(J)},this.setViewport=function(N,$,ht,ft){N.isVector4?J.set(N.x,N.y,N.z,N.w):J.set(N,$,ht,ft),Ht.viewport(I.copy(J).multiplyScalar(nt).round())},this.getScissor=function(N){return N.copy(it)},this.setScissor=function(N,$,ht,ft){N.isVector4?it.set(N.x,N.y,N.z,N.w):it.set(N,$,ht,ft),Ht.scissor(V.copy(it).multiplyScalar(nt).round())},this.getScissorTest=function(){return bt},this.setScissorTest=function(N){Ht.setScissorTest(bt=N)},this.setOpaqueSort=function(N){pt=N},this.setTransparentSort=function(N){Et=N},this.getClearColor=function(N){return N.copy(Lt.getClearColor())},this.setClearColor=function(){Lt.setClearColor(...arguments)},this.getClearAlpha=function(){return Lt.getClearAlpha()},this.setClearAlpha=function(){Lt.setClearAlpha(...arguments)},this.clear=function(N=!0,$=!0,ht=!0){let ft=0;if(N){let st=!1;if(Z!==null){const It=Z.texture.format;st=S.has(It)}if(st){const It=Z.texture.type,jt=b.has(It),Vt=Lt.getClearColor(),Xt=Lt.getClearAlpha(),Jt=Vt.r,se=Vt.g,$t=Vt.b;jt?(R[0]=Jt,R[1]=se,R[2]=$t,R[3]=Xt,X.clearBufferuiv(X.COLOR,0,R)):(C[0]=Jt,C[1]=se,C[2]=$t,C[3]=Xt,X.clearBufferiv(X.COLOR,0,C))}else ft|=X.COLOR_BUFFER_BIT}$&&(ft|=X.DEPTH_BUFFER_BIT),ht&&(ft|=X.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),X.clear(ft)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",Qt,!1),e.removeEventListener("webglcontextrestored",xe,!1),e.removeEventListener("webglcontextcreationerror",Ee,!1),Lt.dispose(),Ct.dispose(),Rt.dispose(),A.dispose(),yt.dispose(),Tt.dispose(),Nt.dispose(),Bt.dispose(),At.dispose(),Wt.dispose(),wt.dispose(),wt.removeEventListener("sessionstart",li),wt.removeEventListener("sessionend",Qr),fs.stop()};function Qt(N){N.preventDefault(),Cd("WebGLRenderer: Context Lost."),O=!0}function xe(){Cd("WebGLRenderer: Context Restored."),O=!1;const N=H.autoReset,$=zt.enabled,ht=zt.autoUpdate,ft=zt.needsUpdate,st=zt.type;ut(),H.autoReset=N,zt.enabled=$,zt.autoUpdate=ht,zt.needsUpdate=ft,zt.type=st}function Ee(N){Oe("WebGLRenderer: A WebGL context could not be created. Reason: ",N.statusMessage)}function Ue(N){const $=N.target;$.removeEventListener("dispose",Ue),cn($)}function cn(N){Ls(N),A.remove(N)}function Ls(N){const $=A.get(N).programs;$!==void 0&&($.forEach(function(ht){Wt.releaseProgram(ht)}),N.isShaderMaterial&&Wt.releaseShaderCache(N))}this.renderBufferDirect=function(N,$,ht,ft,st,It){$===null&&($=Ie);const jt=st.isMesh&&st.matrixWorld.determinant()<0,Vt=cr(N,$,ht,ft,st);Ht.setMaterial(ft,jt);let Xt=ht.index,Jt=1;if(ft.wireframe===!0){if(Xt=qt.getWireframeAttribute(ht),Xt===void 0)return;Jt=2}const se=ht.drawRange,$t=ht.attributes.position;let re=se.start*Jt,ke=(se.start+se.count)*Jt;It!==null&&(re=Math.max(re,It.start*Jt),ke=Math.min(ke,(It.start+It.count)*Jt)),Xt!==null?(re=Math.max(re,0),ke=Math.min(ke,Xt.count)):$t!=null&&(re=Math.max(re,0),ke=Math.min(ke,$t.count));const un=ke-re;if(un<0||un===1/0)return;Bt.setup(st,ft,Vt,ht,Xt);let sn,We=Y;if(Xt!==null&&(sn=vt.get(Xt),We=Ft,We.setIndex(sn)),st.isMesh)ft.wireframe===!0?(Ht.setLineWidth(ft.wireframeLinewidth*Ke()),We.setMode(X.LINES)):We.setMode(X.TRIANGLES);else if(st.isLine){let ee=ft.linewidth;ee===void 0&&(ee=1),Ht.setLineWidth(ee*Ke()),st.isLineSegments?We.setMode(X.LINES):st.isLineLoop?We.setMode(X.LINE_LOOP):We.setMode(X.LINE_STRIP)}else st.isPoints?We.setMode(X.POINTS):st.isSprite&&We.setMode(X.TRIANGLES);if(st.isBatchedMesh)if(st._multiDrawInstances!==null)$c("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),We.renderMultiDrawInstances(st._multiDrawStarts,st._multiDrawCounts,st._multiDrawCount,st._multiDrawInstances);else if(Re.get("WEBGL_multi_draw"))We.renderMultiDraw(st._multiDrawStarts,st._multiDrawCounts,st._multiDrawCount);else{const ee=st._multiDrawStarts,Ge=st._multiDrawCounts,pe=st._multiDrawCount,Hn=Xt?vt.get(Xt).bytesPerElement:1,Ps=A.get(ft).currentProgram.getUniforms();for(let kn=0;kn<pe;kn++)Ps.setValue(X,"_gl_DrawID",kn),We.render(ee[kn]/Hn,Ge[kn])}else if(st.isInstancedMesh)We.renderInstances(re,un,st.count);else if(ht.isInstancedBufferGeometry){const ee=ht._maxInstanceCount!==void 0?ht._maxInstanceCount:1/0,Ge=Math.min(ht.instanceCount,ee);We.renderInstances(re,un,Ge)}else We.render(re,un)};function Bn(N,$,ht){N.transparent===!0&&N.side===ra&&N.forceSinglePass===!1?(N.side=yi,N.needsUpdate=!0,$r(N,$,ht),N.side=or,N.needsUpdate=!0,$r(N,$,ht),N.side=ra):$r(N,$,ht)}this.compile=function(N,$,ht=null){ht===null&&(ht=N),U=Rt.get(ht),U.init($),L.push(U),ht.traverseVisible(function(st){st.isLight&&st.layers.test($.layers)&&(U.pushLight(st),st.castShadow&&U.pushShadow(st))}),N!==ht&&N.traverseVisible(function(st){st.isLight&&st.layers.test($.layers)&&(U.pushLight(st),st.castShadow&&U.pushShadow(st))}),U.setupLights();const ft=new Set;return N.traverse(function(st){if(!(st.isMesh||st.isPoints||st.isLine||st.isSprite))return;const It=st.material;if(It)if(Array.isArray(It))for(let jt=0;jt<It.length;jt++){const Vt=It[jt];Bn(Vt,ht,st),ft.add(Vt)}else Bn(It,ht,st),ft.add(It)}),U=L.pop(),ft},this.compileAsync=function(N,$,ht=null){const ft=this.compile(N,$,ht);return new Promise(st=>{function It(){if(ft.forEach(function(jt){A.get(jt).currentProgram.isReady()&&ft.delete(jt)}),ft.size===0){st(N);return}setTimeout(It,10)}Re.get("KHR_parallel_shader_compile")!==null?It():setTimeout(It,10)})};let On=null;function va(N){On&&On(N)}function li(){fs.stop()}function Qr(){fs.start()}const fs=new sA;fs.setAnimationLoop(va),typeof self<"u"&&fs.setContext(self),this.setAnimationLoop=function(N){On=N,wt.setAnimationLoop(N),N===null?fs.stop():fs.start()},wt.addEventListener("sessionstart",li),wt.addEventListener("sessionend",Qr),this.render=function(N,$){if($!==void 0&&$.isCamera!==!0){Oe("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(O===!0)return;const ht=wt.enabled===!0&&wt.isPresenting===!0,ft=z!==null&&(Z===null||ht)&&z.begin(w,Z);if(N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),$.parent===null&&$.matrixWorldAutoUpdate===!0&&$.updateMatrixWorld(),wt.enabled===!0&&wt.isPresenting===!0&&(z===null||z.isCompositing()===!1)&&(wt.cameraAutoUpdate===!0&&wt.updateCamera($),$=wt.getCamera()),N.isScene===!0&&N.onBeforeRender(w,N,$,Z),U=Rt.get(N,L.length),U.init($),L.push(U),Ce.multiplyMatrices($.projectionMatrix,$.matrixWorldInverse),Ot.setFromProjectionMatrix(Ce,Ss,$.reversedDepth),ae=this.localClippingEnabled,Ut=Gt.init(this.clippingPlanes,ae),P=Ct.get(N,F.length),P.init(),F.push(P),wt.enabled===!0&&wt.isPresenting===!0){const jt=w.xr.getDepthSensingMesh();jt!==null&&Ui(jt,$,-1/0,w.sortObjects)}Ui(N,$,0,w.sortObjects),P.finish(),w.sortObjects===!0&&P.sort(pt,Et),de=wt.enabled===!1||wt.isPresenting===!1||wt.hasDepthSensing()===!1,de&&Lt.addToRenderList(P,N),this.info.render.frame++,Ut===!0&&Gt.beginShadows();const st=U.state.shadowsArray;if(zt.render(st,N,$),Ut===!0&&Gt.endShadows(),this.info.autoReset===!0&&this.info.reset(),(ft&&z.hasRenderPass())===!1){const jt=P.opaque,Vt=P.transmissive;if(U.setupLights(),$.isArrayCamera){const Xt=$.cameras;if(Vt.length>0)for(let Jt=0,se=Xt.length;Jt<se;Jt++){const $t=Xt[Jt];Vn(jt,Vt,N,$t)}de&&Lt.render(N);for(let Jt=0,se=Xt.length;Jt<se;Jt++){const $t=Xt[Jt];bn(P,N,$t,$t.viewport)}}else Vt.length>0&&Vn(jt,Vt,N,$),de&&Lt.render(N),bn(P,N,$)}Z!==null&&Q===0&&(K.updateMultisampleRenderTarget(Z),K.updateRenderTargetMipmap(Z)),ft&&z.end(w),N.isScene===!0&&N.onAfterRender(w,N,$),Bt.resetDefaultState(),rt=-1,ot=null,L.pop(),L.length>0?(U=L[L.length-1],Ut===!0&&Gt.setGlobalState(w.clippingPlanes,U.state.camera)):U=null,F.pop(),F.length>0?P=F[F.length-1]:P=null};function Ui(N,$,ht,ft){if(N.visible===!1)return;if(N.layers.test($.layers)){if(N.isGroup)ht=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update($);else if(N.isLight)U.pushLight(N),N.castShadow&&U.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||Ot.intersectsSprite(N)){ft&&ye.setFromMatrixPosition(N.matrixWorld).applyMatrix4(Ce);const jt=Nt.update(N),Vt=N.material;Vt.visible&&P.push(N,jt,Vt,ht,ye.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||Ot.intersectsObject(N))){const jt=Nt.update(N),Vt=N.material;if(ft&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),ye.copy(N.boundingSphere.center)):(jt.boundingSphere===null&&jt.computeBoundingSphere(),ye.copy(jt.boundingSphere.center)),ye.applyMatrix4(N.matrixWorld).applyMatrix4(Ce)),Array.isArray(Vt)){const Xt=jt.groups;for(let Jt=0,se=Xt.length;Jt<se;Jt++){const $t=Xt[Jt],re=Vt[$t.materialIndex];re&&re.visible&&P.push(N,jt,re,ht,ye.z,$t)}}else Vt.visible&&P.push(N,jt,Vt,ht,ye.z,null)}}const It=N.children;for(let jt=0,Vt=It.length;jt<Vt;jt++)Ui(It[jt],$,ht,ft)}function bn(N,$,ht,ft){const{opaque:st,transmissive:It,transparent:jt}=N;U.setupLightsView(ht),Ut===!0&&Gt.setGlobalState(w.clippingPlanes,ht),ft&&Ht.viewport(I.copy(ft)),st.length>0&&Qi(st,$,ht),It.length>0&&Qi(It,$,ht),jt.length>0&&Qi(jt,$,ht),Ht.buffers.depth.setTest(!0),Ht.buffers.depth.setMask(!0),Ht.buffers.color.setMask(!0),Ht.setPolygonOffset(!1)}function Vn(N,$,ht,ft){if((ht.isScene===!0?ht.overrideMaterial:null)!==null)return;if(U.state.transmissionRenderTarget[ft.id]===void 0){const re=Re.has("EXT_color_buffer_half_float")||Re.has("EXT_color_buffer_float");U.state.transmissionRenderTarget[ft.id]=new ws(1,1,{generateMipmaps:!0,type:re?pa:Ni,minFilter:Hr,samples:Be.samples,stencilBuffer:l,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ze.workingColorSpace})}const It=U.state.transmissionRenderTarget[ft.id],jt=ft.viewport||I;It.setSize(jt.z*w.transmissionResolutionScale,jt.w*w.transmissionResolutionScale);const Vt=w.getRenderTarget(),Xt=w.getActiveCubeFace(),Jt=w.getActiveMipmapLevel();w.setRenderTarget(It),w.getClearColor(gt),xt=w.getClearAlpha(),xt<1&&w.setClearColor(16777215,.5),w.clear(),de&&Lt.render(ht);const se=w.toneMapping;w.toneMapping=As;const $t=ft.viewport;if(ft.viewport!==void 0&&(ft.viewport=void 0),U.setupLightsView(ft),Ut===!0&&Gt.setGlobalState(w.clippingPlanes,ft),Qi(N,ht,ft),K.updateMultisampleRenderTarget(It),K.updateRenderTargetMipmap(It),Re.has("WEBGL_multisampled_render_to_texture")===!1){let re=!1;for(let ke=0,un=$.length;ke<un;ke++){const sn=$[ke],{object:We,geometry:ee,material:Ge,group:pe}=sn;if(Ge.side===ra&&We.layers.test(ft.layers)){const Hn=Ge.side;Ge.side=yi,Ge.needsUpdate=!0,Jr(We,ht,ft,ee,Ge,pe),Ge.side=Hn,Ge.needsUpdate=!0,re=!0}}re===!0&&(K.updateMultisampleRenderTarget(It),K.updateRenderTargetMipmap(It))}w.setRenderTarget(Vt,Xt,Jt),w.setClearColor(gt,xt),$t!==void 0&&(ft.viewport=$t),w.toneMapping=se}function Qi(N,$,ht){const ft=$.isScene===!0?$.overrideMaterial:null;for(let st=0,It=N.length;st<It;st++){const jt=N[st],{object:Vt,geometry:Xt,group:Jt}=jt;let se=jt.material;se.allowOverride===!0&&ft!==null&&(se=ft),Vt.layers.test(ht.layers)&&Jr(Vt,$,ht,Xt,se,Jt)}}function Jr(N,$,ht,ft,st,It){N.onBeforeRender(w,$,ht,ft,st,It),N.modelViewMatrix.multiplyMatrices(ht.matrixWorldInverse,N.matrixWorld),N.normalMatrix.getNormalMatrix(N.modelViewMatrix),st.onBeforeRender(w,$,ht,ft,N,It),st.transparent===!0&&st.side===ra&&st.forceSinglePass===!1?(st.side=yi,st.needsUpdate=!0,w.renderBufferDirect(ht,$,ft,st,N,It),st.side=or,st.needsUpdate=!0,w.renderBufferDirect(ht,$,ft,st,N,It),st.side=ra):w.renderBufferDirect(ht,$,ft,st,N,It),N.onAfterRender(w,$,ht,ft,st,It)}function $r(N,$,ht){$.isScene!==!0&&($=Ie);const ft=A.get(N),st=U.state.lights,It=U.state.shadowsArray,jt=st.state.version,Vt=Wt.getParameters(N,st.state,It,$,ht),Xt=Wt.getProgramCacheKey(Vt);let Jt=ft.programs;ft.environment=N.isMeshStandardMaterial?$.environment:null,ft.fog=$.fog,ft.envMap=(N.isMeshStandardMaterial?Tt:yt).get(N.envMap||ft.environment),ft.envMapRotation=ft.environment!==null&&N.envMap===null?$.environmentRotation:N.envMapRotation,Jt===void 0&&(N.addEventListener("dispose",Ue),Jt=new Map,ft.programs=Jt);let se=Jt.get(Xt);if(se!==void 0){if(ft.currentProgram===se&&ft.lightsStateVersion===jt)return Rl(N,Vt),se}else Vt.uniforms=Wt.getUniforms(N),N.onBeforeCompile(Vt,w),se=Wt.acquireProgram(Vt,Xt),Jt.set(Xt,se),ft.uniforms=Vt.uniforms;const $t=ft.uniforms;return(!N.isShaderMaterial&&!N.isRawShaderMaterial||N.clipping===!0)&&($t.clippingPlanes=Gt.uniform),Rl(N,Vt),ft.needsLights=ya(N),ft.lightsStateVersion=jt,ft.needsLights&&($t.ambientLightColor.value=st.state.ambient,$t.lightProbe.value=st.state.probe,$t.directionalLights.value=st.state.directional,$t.directionalLightShadows.value=st.state.directionalShadow,$t.spotLights.value=st.state.spot,$t.spotLightShadows.value=st.state.spotShadow,$t.rectAreaLights.value=st.state.rectArea,$t.ltc_1.value=st.state.rectAreaLTC1,$t.ltc_2.value=st.state.rectAreaLTC2,$t.pointLights.value=st.state.point,$t.pointLightShadows.value=st.state.pointShadow,$t.hemisphereLights.value=st.state.hemi,$t.directionalShadowMap.value=st.state.directionalShadowMap,$t.directionalShadowMatrix.value=st.state.directionalShadowMatrix,$t.spotShadowMap.value=st.state.spotShadowMap,$t.spotLightMatrix.value=st.state.spotLightMatrix,$t.spotLightMap.value=st.state.spotLightMap,$t.pointShadowMap.value=st.state.pointShadowMap,$t.pointShadowMatrix.value=st.state.pointShadowMatrix),ft.currentProgram=se,ft.uniformsList=null,se}function cu(N){if(N.uniformsList===null){const $=N.currentProgram.getUniforms();N.uniformsList=md.seqWithValue($.seq,N.uniforms)}return N.uniformsList}function Rl(N,$){const ht=A.get(N);ht.outputColorSpace=$.outputColorSpace,ht.batching=$.batching,ht.batchingColor=$.batchingColor,ht.instancing=$.instancing,ht.instancingColor=$.instancingColor,ht.instancingMorph=$.instancingMorph,ht.skinning=$.skinning,ht.morphTargets=$.morphTargets,ht.morphNormals=$.morphNormals,ht.morphColors=$.morphColors,ht.morphTargetsCount=$.morphTargetsCount,ht.numClippingPlanes=$.numClippingPlanes,ht.numIntersection=$.numClipIntersection,ht.vertexAlphas=$.vertexAlphas,ht.vertexTangents=$.vertexTangents,ht.toneMapping=$.toneMapping}function cr(N,$,ht,ft,st){$.isScene!==!0&&($=Ie),K.resetTextureUnits();const It=$.fog,jt=ft.isMeshStandardMaterial?$.environment:null,Vt=Z===null?w.outputColorSpace:Z.isXRRenderTarget===!0?Z.texture.colorSpace:xl,Xt=(ft.isMeshStandardMaterial?Tt:yt).get(ft.envMap||jt),Jt=ft.vertexColors===!0&&!!ht.attributes.color&&ht.attributes.color.itemSize===4,se=!!ht.attributes.tangent&&(!!ft.normalMap||ft.anisotropy>0),$t=!!ht.morphAttributes.position,re=!!ht.morphAttributes.normal,ke=!!ht.morphAttributes.color;let un=As;ft.toneMapped&&(Z===null||Z.isXRRenderTarget===!0)&&(un=w.toneMapping);const sn=ht.morphAttributes.position||ht.morphAttributes.normal||ht.morphAttributes.color,We=sn!==void 0?sn.length:0,ee=A.get(ft),Ge=U.state.lights;if(Ut===!0&&(ae===!0||N!==ot)){const jn=N===ot&&ft.id===rt;Gt.setState(ft,N,jn)}let pe=!1;ft.version===ee.__version?(ee.needsLights&&ee.lightsStateVersion!==Ge.state.version||ee.outputColorSpace!==Vt||st.isBatchedMesh&&ee.batching===!1||!st.isBatchedMesh&&ee.batching===!0||st.isBatchedMesh&&ee.batchingColor===!0&&st.colorTexture===null||st.isBatchedMesh&&ee.batchingColor===!1&&st.colorTexture!==null||st.isInstancedMesh&&ee.instancing===!1||!st.isInstancedMesh&&ee.instancing===!0||st.isSkinnedMesh&&ee.skinning===!1||!st.isSkinnedMesh&&ee.skinning===!0||st.isInstancedMesh&&ee.instancingColor===!0&&st.instanceColor===null||st.isInstancedMesh&&ee.instancingColor===!1&&st.instanceColor!==null||st.isInstancedMesh&&ee.instancingMorph===!0&&st.morphTexture===null||st.isInstancedMesh&&ee.instancingMorph===!1&&st.morphTexture!==null||ee.envMap!==Xt||ft.fog===!0&&ee.fog!==It||ee.numClippingPlanes!==void 0&&(ee.numClippingPlanes!==Gt.numPlanes||ee.numIntersection!==Gt.numIntersection)||ee.vertexAlphas!==Jt||ee.vertexTangents!==se||ee.morphTargets!==$t||ee.morphNormals!==re||ee.morphColors!==ke||ee.toneMapping!==un||ee.morphTargetsCount!==We)&&(pe=!0):(pe=!0,ee.__version=ft.version);let Hn=ee.currentProgram;pe===!0&&(Hn=$r(ft,$,st));let Ps=!1,kn=!1,Oi=!1;const Xe=Hn.getUniforms(),Gn=ee.uniforms;if(Ht.useProgram(Hn.program)&&(Ps=!0,kn=!0,Oi=!0),ft.id!==rt&&(rt=ft.id,kn=!0),Ps||ot!==N){Ht.buffers.depth.getReversed()&&N.reversedDepth!==!0&&(N._reversedDepth=!0,N.updateProjectionMatrix()),Xe.setValue(X,"projectionMatrix",N.projectionMatrix),Xe.setValue(X,"viewMatrix",N.matrixWorldInverse);const Wn=Xe.map.cameraPosition;Wn!==void 0&&Wn.setValue(X,ge.setFromMatrixPosition(N.matrixWorld)),Be.logarithmicDepthBuffer&&Xe.setValue(X,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(ft.isMeshPhongMaterial||ft.isMeshToonMaterial||ft.isMeshLambertMaterial||ft.isMeshBasicMaterial||ft.isMeshStandardMaterial||ft.isShaderMaterial)&&Xe.setValue(X,"isOrthographic",N.isOrthographicCamera===!0),ot!==N&&(ot=N,kn=!0,Oi=!0)}if(ee.needsLights&&(Ge.state.directionalShadowMap.length>0&&Xe.setValue(X,"directionalShadowMap",Ge.state.directionalShadowMap,K),Ge.state.spotShadowMap.length>0&&Xe.setValue(X,"spotShadowMap",Ge.state.spotShadowMap,K),Ge.state.pointShadowMap.length>0&&Xe.setValue(X,"pointShadowMap",Ge.state.pointShadowMap,K)),st.isSkinnedMesh){Xe.setOptional(X,st,"bindMatrix"),Xe.setOptional(X,st,"bindMatrixInverse");const jn=st.skeleton;jn&&(jn.boneTexture===null&&jn.computeBoneTexture(),Xe.setValue(X,"boneTexture",jn.boneTexture,K))}st.isBatchedMesh&&(Xe.setOptional(X,st,"batchingTexture"),Xe.setValue(X,"batchingTexture",st._matricesTexture,K),Xe.setOptional(X,st,"batchingIdTexture"),Xe.setValue(X,"batchingIdTexture",st._indirectTexture,K),Xe.setOptional(X,st,"batchingColorTexture"),st._colorsTexture!==null&&Xe.setValue(X,"batchingColorTexture",st._colorsTexture,K));const Cn=ht.morphAttributes;if((Cn.position!==void 0||Cn.normal!==void 0||Cn.color!==void 0)&&he.update(st,ht,Hn),(kn||ee.receiveShadow!==st.receiveShadow)&&(ee.receiveShadow=st.receiveShadow,Xe.setValue(X,"receiveShadow",st.receiveShadow)),ft.isMeshGouraudMaterial&&ft.envMap!==null&&(Gn.envMap.value=Xt,Gn.flipEnvMap.value=Xt.isCubeTexture&&Xt.isRenderTargetTexture===!1?-1:1),ft.isMeshStandardMaterial&&ft.envMap===null&&$.environment!==null&&(Gn.envMapIntensity.value=$.environmentIntensity),Gn.dfgLUT!==void 0&&(Gn.dfgLUT.value=qB()),kn&&(Xe.setValue(X,"toneMappingExposure",w.toneMappingExposure),ee.needsLights&&Dl(Gn,Oi),It&&ft.fog===!0&&ne.refreshFogUniforms(Gn,It),ne.refreshMaterialUniforms(Gn,ft,nt,at,U.state.transmissionRenderTarget[N.id]),md.upload(X,cu(ee),Gn,K)),ft.isShaderMaterial&&ft.uniformsNeedUpdate===!0&&(md.upload(X,cu(ee),Gn,K),ft.uniformsNeedUpdate=!1),ft.isSpriteMaterial&&Xe.setValue(X,"center",st.center),Xe.setValue(X,"modelViewMatrix",st.modelViewMatrix),Xe.setValue(X,"normalMatrix",st.normalMatrix),Xe.setValue(X,"modelMatrix",st.matrixWorld),ft.isShaderMaterial||ft.isRawShaderMaterial){const jn=ft.uniformsGroups;for(let Wn=0,to=jn.length;Wn<to;Wn++){const Ji=jn[Wn];At.update(Ji,Hn),At.bind(Ji,Hn)}}return Hn}function Dl(N,$){N.ambientLightColor.needsUpdate=$,N.lightProbe.needsUpdate=$,N.directionalLights.needsUpdate=$,N.directionalLightShadows.needsUpdate=$,N.pointLights.needsUpdate=$,N.pointLightShadows.needsUpdate=$,N.spotLights.needsUpdate=$,N.spotLightShadows.needsUpdate=$,N.rectAreaLights.needsUpdate=$,N.hemisphereLights.needsUpdate=$}function ya(N){return N.isMeshLambertMaterial||N.isMeshToonMaterial||N.isMeshPhongMaterial||N.isMeshStandardMaterial||N.isShadowMaterial||N.isShaderMaterial&&N.lights===!0}this.getActiveCubeFace=function(){return j},this.getActiveMipmapLevel=function(){return Q},this.getRenderTarget=function(){return Z},this.setRenderTargetTextures=function(N,$,ht){const ft=A.get(N);ft.__autoAllocateDepthBuffer=N.resolveDepthBuffer===!1,ft.__autoAllocateDepthBuffer===!1&&(ft.__useRenderToTexture=!1),A.get(N.texture).__webglTexture=$,A.get(N.depthTexture).__webglTexture=ft.__autoAllocateDepthBuffer?void 0:ht,ft.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(N,$){const ht=A.get(N);ht.__webglFramebuffer=$,ht.__useDefaultFramebuffer=$===void 0};const _a=X.createFramebuffer();this.setRenderTarget=function(N,$=0,ht=0){Z=N,j=$,Q=ht;let ft=null,st=!1,It=!1;if(N){const Vt=A.get(N);if(Vt.__useDefaultFramebuffer!==void 0){Ht.bindFramebuffer(X.FRAMEBUFFER,Vt.__webglFramebuffer),I.copy(N.viewport),V.copy(N.scissor),k=N.scissorTest,Ht.viewport(I),Ht.scissor(V),Ht.setScissorTest(k),rt=-1;return}else if(Vt.__webglFramebuffer===void 0)K.setupRenderTarget(N);else if(Vt.__hasExternalTextures)K.rebindTextures(N,A.get(N.texture).__webglTexture,A.get(N.depthTexture).__webglTexture);else if(N.depthBuffer){const se=N.depthTexture;if(Vt.__boundDepthTexture!==se){if(se!==null&&A.has(se)&&(N.width!==se.image.width||N.height!==se.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");K.setupDepthRenderbuffer(N)}}const Xt=N.texture;(Xt.isData3DTexture||Xt.isDataArrayTexture||Xt.isCompressedArrayTexture)&&(It=!0);const Jt=A.get(N).__webglFramebuffer;N.isWebGLCubeRenderTarget?(Array.isArray(Jt[$])?ft=Jt[$][ht]:ft=Jt[$],st=!0):N.samples>0&&K.useMultisampledRTT(N)===!1?ft=A.get(N).__webglMultisampledFramebuffer:Array.isArray(Jt)?ft=Jt[ht]:ft=Jt,I.copy(N.viewport),V.copy(N.scissor),k=N.scissorTest}else I.copy(J).multiplyScalar(nt).floor(),V.copy(it).multiplyScalar(nt).floor(),k=bt;if(ht!==0&&(ft=_a),Ht.bindFramebuffer(X.FRAMEBUFFER,ft)&&Ht.drawBuffers(N,ft),Ht.viewport(I),Ht.scissor(V),Ht.setScissorTest(k),st){const Vt=A.get(N.texture);X.framebufferTexture2D(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_CUBE_MAP_POSITIVE_X+$,Vt.__webglTexture,ht)}else if(It){const Vt=$;for(let Xt=0;Xt<N.textures.length;Xt++){const Jt=A.get(N.textures[Xt]);X.framebufferTextureLayer(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0+Xt,Jt.__webglTexture,ht,Vt)}}else if(N!==null&&ht!==0){const Vt=A.get(N.texture);X.framebufferTexture2D(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,Vt.__webglTexture,ht)}rt=-1},this.readRenderTargetPixels=function(N,$,ht,ft,st,It,jt,Vt=0){if(!(N&&N.isWebGLRenderTarget)){Oe("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Xt=A.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&jt!==void 0&&(Xt=Xt[jt]),Xt){Ht.bindFramebuffer(X.FRAMEBUFFER,Xt);try{const Jt=N.textures[Vt],se=Jt.format,$t=Jt.type;if(!Be.textureFormatReadable(se)){Oe("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Be.textureTypeReadable($t)){Oe("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}$>=0&&$<=N.width-ft&&ht>=0&&ht<=N.height-st&&(N.textures.length>1&&X.readBuffer(X.COLOR_ATTACHMENT0+Vt),X.readPixels($,ht,ft,st,Dt.convert(se),Dt.convert($t),It))}finally{const Jt=Z!==null?A.get(Z).__webglFramebuffer:null;Ht.bindFramebuffer(X.FRAMEBUFFER,Jt)}}},this.readRenderTargetPixelsAsync=async function(N,$,ht,ft,st,It,jt,Vt=0){if(!(N&&N.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Xt=A.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&jt!==void 0&&(Xt=Xt[jt]),Xt)if($>=0&&$<=N.width-ft&&ht>=0&&ht<=N.height-st){Ht.bindFramebuffer(X.FRAMEBUFFER,Xt);const Jt=N.textures[Vt],se=Jt.format,$t=Jt.type;if(!Be.textureFormatReadable(se))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Be.textureTypeReadable($t))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const re=X.createBuffer();X.bindBuffer(X.PIXEL_PACK_BUFFER,re),X.bufferData(X.PIXEL_PACK_BUFFER,It.byteLength,X.STREAM_READ),N.textures.length>1&&X.readBuffer(X.COLOR_ATTACHMENT0+Vt),X.readPixels($,ht,ft,st,Dt.convert(se),Dt.convert($t),0);const ke=Z!==null?A.get(Z).__webglFramebuffer:null;Ht.bindFramebuffer(X.FRAMEBUFFER,ke);const un=X.fenceSync(X.SYNC_GPU_COMMANDS_COMPLETE,0);return X.flush(),await iO(X,un,4),X.bindBuffer(X.PIXEL_PACK_BUFFER,re),X.getBufferSubData(X.PIXEL_PACK_BUFFER,0,It),X.deleteBuffer(re),X.deleteSync(un),It}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(N,$=null,ht=0){const ft=Math.pow(2,-ht),st=Math.floor(N.image.width*ft),It=Math.floor(N.image.height*ft),jt=$!==null?$.x:0,Vt=$!==null?$.y:0;K.setTexture2D(N,0),X.copyTexSubImage2D(X.TEXTURE_2D,ht,0,0,jt,Vt,st,It),Ht.unbindTexture()};const ur=X.createFramebuffer(),ba=X.createFramebuffer();this.copyTextureToTexture=function(N,$,ht=null,ft=null,st=0,It=null){It===null&&(st!==0?($c("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),It=st,st=0):It=0);let jt,Vt,Xt,Jt,se,$t,re,ke,un;const sn=N.isCompressedTexture?N.mipmaps[It]:N.image;if(ht!==null)jt=ht.max.x-ht.min.x,Vt=ht.max.y-ht.min.y,Xt=ht.isBox3?ht.max.z-ht.min.z:1,Jt=ht.min.x,se=ht.min.y,$t=ht.isBox3?ht.min.z:0;else{const Cn=Math.pow(2,-st);jt=Math.floor(sn.width*Cn),Vt=Math.floor(sn.height*Cn),N.isDataArrayTexture?Xt=sn.depth:N.isData3DTexture?Xt=Math.floor(sn.depth*Cn):Xt=1,Jt=0,se=0,$t=0}ft!==null?(re=ft.x,ke=ft.y,un=ft.z):(re=0,ke=0,un=0);const We=Dt.convert($.format),ee=Dt.convert($.type);let Ge;$.isData3DTexture?(K.setTexture3D($,0),Ge=X.TEXTURE_3D):$.isDataArrayTexture||$.isCompressedArrayTexture?(K.setTexture2DArray($,0),Ge=X.TEXTURE_2D_ARRAY):(K.setTexture2D($,0),Ge=X.TEXTURE_2D),X.pixelStorei(X.UNPACK_FLIP_Y_WEBGL,$.flipY),X.pixelStorei(X.UNPACK_PREMULTIPLY_ALPHA_WEBGL,$.premultiplyAlpha),X.pixelStorei(X.UNPACK_ALIGNMENT,$.unpackAlignment);const pe=X.getParameter(X.UNPACK_ROW_LENGTH),Hn=X.getParameter(X.UNPACK_IMAGE_HEIGHT),Ps=X.getParameter(X.UNPACK_SKIP_PIXELS),kn=X.getParameter(X.UNPACK_SKIP_ROWS),Oi=X.getParameter(X.UNPACK_SKIP_IMAGES);X.pixelStorei(X.UNPACK_ROW_LENGTH,sn.width),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,sn.height),X.pixelStorei(X.UNPACK_SKIP_PIXELS,Jt),X.pixelStorei(X.UNPACK_SKIP_ROWS,se),X.pixelStorei(X.UNPACK_SKIP_IMAGES,$t);const Xe=N.isDataArrayTexture||N.isData3DTexture,Gn=$.isDataArrayTexture||$.isData3DTexture;if(N.isDepthTexture){const Cn=A.get(N),jn=A.get($),Wn=A.get(Cn.__renderTarget),to=A.get(jn.__renderTarget);Ht.bindFramebuffer(X.READ_FRAMEBUFFER,Wn.__webglFramebuffer),Ht.bindFramebuffer(X.DRAW_FRAMEBUFFER,to.__webglFramebuffer);for(let Ji=0;Ji<Xt;Ji++)Xe&&(X.framebufferTextureLayer(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,A.get(N).__webglTexture,st,$t+Ji),X.framebufferTextureLayer(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,A.get($).__webglTexture,It,un+Ji)),X.blitFramebuffer(Jt,se,jt,Vt,re,ke,jt,Vt,X.DEPTH_BUFFER_BIT,X.NEAREST);Ht.bindFramebuffer(X.READ_FRAMEBUFFER,null),Ht.bindFramebuffer(X.DRAW_FRAMEBUFFER,null)}else if(st!==0||N.isRenderTargetTexture||A.has(N)){const Cn=A.get(N),jn=A.get($);Ht.bindFramebuffer(X.READ_FRAMEBUFFER,ur),Ht.bindFramebuffer(X.DRAW_FRAMEBUFFER,ba);for(let Wn=0;Wn<Xt;Wn++)Xe?X.framebufferTextureLayer(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,Cn.__webglTexture,st,$t+Wn):X.framebufferTexture2D(X.READ_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,Cn.__webglTexture,st),Gn?X.framebufferTextureLayer(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,jn.__webglTexture,It,un+Wn):X.framebufferTexture2D(X.DRAW_FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_2D,jn.__webglTexture,It),st!==0?X.blitFramebuffer(Jt,se,jt,Vt,re,ke,jt,Vt,X.COLOR_BUFFER_BIT,X.NEAREST):Gn?X.copyTexSubImage3D(Ge,It,re,ke,un+Wn,Jt,se,jt,Vt):X.copyTexSubImage2D(Ge,It,re,ke,Jt,se,jt,Vt);Ht.bindFramebuffer(X.READ_FRAMEBUFFER,null),Ht.bindFramebuffer(X.DRAW_FRAMEBUFFER,null)}else Gn?N.isDataTexture||N.isData3DTexture?X.texSubImage3D(Ge,It,re,ke,un,jt,Vt,Xt,We,ee,sn.data):$.isCompressedArrayTexture?X.compressedTexSubImage3D(Ge,It,re,ke,un,jt,Vt,Xt,We,sn.data):X.texSubImage3D(Ge,It,re,ke,un,jt,Vt,Xt,We,ee,sn):N.isDataTexture?X.texSubImage2D(X.TEXTURE_2D,It,re,ke,jt,Vt,We,ee,sn.data):N.isCompressedTexture?X.compressedTexSubImage2D(X.TEXTURE_2D,It,re,ke,sn.width,sn.height,We,sn.data):X.texSubImage2D(X.TEXTURE_2D,It,re,ke,jt,Vt,We,ee,sn);X.pixelStorei(X.UNPACK_ROW_LENGTH,pe),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,Hn),X.pixelStorei(X.UNPACK_SKIP_PIXELS,Ps),X.pixelStorei(X.UNPACK_SKIP_ROWS,kn),X.pixelStorei(X.UNPACK_SKIP_IMAGES,Oi),It===0&&$.generateMipmaps&&X.generateMipmap(Ge),Ht.unbindTexture()},this.initRenderTarget=function(N){A.get(N).__webglFramebuffer===void 0&&K.setupRenderTarget(N)},this.initTexture=function(N){N.isCubeTexture?K.setTextureCube(N,0):N.isData3DTexture?K.setTexture3D(N,0):N.isDataArrayTexture||N.isCompressedArrayTexture?K.setTexture2DArray(N,0):K.setTexture2D(N,0),Ht.unbindTexture()},this.resetState=function(){j=0,Q=0,Z=null,Ht.reset(),Bt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ss}
vendor: 21,127 bytes, line 4198
4198get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=ze._getDrawingBufferColorSpace(t),e.unpackColorSpace=ze._getUnpackColorSpace()}}const IM={type:"change"},Kx={type:"start"},cA={type:"end"},nd=new Zd,zM=new $a,KB=Math.cos(70*aO.DEG2RAD),Nn=new et,mi=2*Math.PI,en={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},u0=1e-6;class QB extends $O{constructor(t,e=null){super(t,e),this.state=en.NONE,this.target=new et,this.cursor=new et,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:ol.ROTATE,MIDDLE:ol.DOLLY,RIGHT:ol.PAN},this.touches={ONE:sl.ROTATE,TWO:sl.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new et,this._lastQuaternion=new Yr,this._lastTargetPosition=new et,this._quat=new Yr().setFromUnitVectors(t.up,new et(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new dM,this._sphericalDelta=new dM,this._scale=1,this._panOffset=new et,this._rotateStart=new ce,this._rotateEnd=new ce,this._rotateDelta=new ce,this._panStart=new ce,this._panEnd=new ce,this._panDelta=new ce,this._dollyStart=new ce,this._dollyEnd=new ce,this._dollyDelta=new ce,this._dollyDirection=new et,this._mouse=new ce,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=$B.bind(this),this._onPointerDown=JB.bind(this),this._onPointerUp=t6.bind(this),this._onContextMenu=o6.bind(this),this._onMouseWheel=i6.bind(this),this._onKeyDown=s6.bind(this),this._onTouchStart=a6.bind(this),this._onTouchMove=r6.bind(this),this._onMouseDown=e6.bind(this),this._onMouseMove=n6.bind(this),this._interceptControlDown=l6.bind(this),this._interceptControlUp=c6.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(IM),this.update(),this.state=en.NONE}update(t=null){const e=this.object.position;Nn.copy(e).sub(this.target),Nn.applyQuaternion(this._quat),this._spherical.setFromVector3(Nn),this.autoRotate&&this.state===en.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let s=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(s)&&isFinite(r)&&(s<-Math.PI?s+=mi:s>Math.PI&&(s-=mi),r<-Math.PI?r+=mi:r>Math.PI&&(r-=mi),s<=r?this._spherical.theta=Math.max(s,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(s+r)/2?Math.max(s,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let l=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const u=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),l=u!=this._spherical.radius}if(Nn.setFromSpherical(this._spherical),Nn.applyQuaternion(this._quatInverse),e.copy(this.target).add(Nn),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let u=null;if(this.object.isPerspectiveCamera){const f=Nn.length();u=this._clampDistance(f*this._scale);const h=f-u;this.object.position.addScaledVector(this._dollyDirection,h),this.object.updateMatrixWorld(),l=!!h}else if(this.object.isOrthographicCamera){const f=new et(this._mouse.x,this._mouse.y,0);f.unproject(this.object);const h=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),l=h!==this.object.zoom;const d=new et(this._mouse.x,this._mouse.y,0);d.unproject(this.object),this.object.position.sub(d).add(f),this.object.updateMatrixWorld(),u=Nn.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;u!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(u).add(this.object.position):(nd.origin.copy(this.object.position),nd.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(nd.direction))<KB?this.object.lookAt(this.target):(zM.setFromNormalAndCoplanarPoint(this.object.up,this.target),nd.intersectPlane(zM,this.target))))}else if(this.object.isOrthographicCamera){const u=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),u!==this.object.zoom&&(this.object.updateProjectionMatrix(),l=!0)}return this._scale=1,this._performCursorZoom=!1,l||this._lastPosition.distanceToSquared(this.object.position)>u0||8*(1-this._lastQuaternion.dot(this.object.quaternion))>u0||this._lastTargetPosition.distanceToSquared(this.target)>u0?(this.dispatchEvent(IM),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?mi/60*this.autoRotateSpeed*t:mi/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){Nn.setFromMatrixColumn(e,0),Nn.multiplyScalar(-t),this._panOffset.add(Nn)}_panUp(t,e){this.screenSpacePanning===!0?Nn.setFromMatrixColumn(e,1):(Nn.setFromMatrixColumn(e,0),Nn.crossVectors(this.object.up,Nn)),Nn.multiplyScalar(t),this._panOffset.add(Nn)}_pan(t,e){const s=this.domElement;if(this.object.isPerspectiveCamera){const r=this.object.position;Nn.copy(r).sub(this.target);let l=Nn.length();l*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*l/s.clientHeight,this.object.matrix),this._panUp(2*e*l/s.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/s.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/s.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const s=this.domElement.getBoundingClientRect(),r=t-s.left,l=e-s.top,u=s.width,f=s.height;this._mouse.x=r/u*2-1,this._mouse.y=-(l/f)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(mi*this._rotateDelta.x/e.clientHeight),this._rotateUp(mi*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(mi*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-mi*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(mi*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-mi*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),e=!0;break}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),s=.5*(t.pageX+e.x),r=.5*(t.pageY+e.y);this._rotateStart.set(s,r)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),s=.5*(t.pageX+e.x),r=.5*(t.pageY+e.y);this._panStart.set(s,r)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),s=t.pageX-e.x,r=t.pageY-e.y,l=Math.sqrt(s*s+r*r);this._dollyStart.set(0,l)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const s=this._getSecondPointerPosition(t),r=.5*(t.pageX+s.x),l=.5*(t.pageY+s.y);this._rotateEnd.set(r,l)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(mi*this._rotateDelta.x/e.clientHeight),this._rotateUp(mi*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),s=.5*(t.pageX+e.x),r=.5*(t.pageY+e.y);this._panEnd.set(s,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const e=this._getSecondPointerPosition(t),s=t.pageX-e.x,r=t.pageY-e.y,l=Math.sqrt(s*s+r*r);this._dollyEnd.set(0,l),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const u=(t.pageX+e.x)*.5,f=(t.pageY+e.y)*.5;this._updateZoomParameters(u,f)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId){this._pointers.splice(e,1);return}}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];e===void 0&&(e=new ce,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,s={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:s.deltaY*=16;break;case 2:s.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(s.deltaY*=10),s}}function JB(n){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(n.pointerId),this.domElement.ownerDocument.addEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(n)&&(this._addPointer(n),n.pointerType==="touch"?this._onTouchStart(n):this._onMouseDown(n)))}function $B(n){this.enabled!==!1&&(n.pointerType==="touch"?this._onTouchMove(n):this._onMouseMove(n))}function t6(n){switch(this._removePointer(n),this._pointers.length){case 0:this.domElement.releasePointerCapture(n.pointerId),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(cA),this.state=en.NONE;break;case 1:const t=this._pointers[0],e=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:e.x,pageY:e.y});break}}function e6(n){let t;switch(n.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case ol.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(n),this.state=en.DOLLY;break;case ol.ROTATE:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=en.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=en.ROTATE}break;case ol.PAN:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=en.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=en.PAN}break;default:this.state=en.NONE}this.state!==en.NONE&&this.dispatchEvent(Kx)}function n6(n){switch(this.state){case en.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(n);break;case en.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(n);break;case en.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(n);break}}function i6(n){this.enabled===!1||this.enableZoom===!1||this.state!==en.NONE||(n.preventDefault(),this.dispatchEvent(Kx),this._handleMouseWheel(this._customWheelEvent(n)),this.dispatchEvent(cA))}function s6(n){this.enabled!==!1&&this._handleKeyDown(n)}function a6(n){switch(this._trackPointer(n),this._pointers.length){case 1:switch(this.touches.ONE){case sl.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(n),this.state=en.TOUCH_ROTATE;break;case sl.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(n),this.state=en.TOUCH_PAN;break;default:this.state=en.NONE}break;case 2:switch(this.touches.TWO){case sl.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(n),this.state=en.TOUCH_DOLLY_PAN;break;case sl.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(n),this.state=en.TOUCH_DOLLY_ROTATE;break;default:this.state=en.NONE}break;default:this.state=en.NONE}this.state!==en.NONE&&this.dispatchEvent(Kx)}function r6(n){switch(this._trackPointer(n),this.state){case en.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(n),this.update();break;case en.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(n),this.update();break;case en.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(n),this.update();break;case en.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(n),this.update();break;default:this.state=en.NONE}}function o6(n){this.enabled!==!1&&n.preventDefault()}function l6(n){n.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function c6(n){n.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}const sa={stator_yoke:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/amuyaf75XMEi2I8vFKQAjB_1770538795994_na1fn_c3RhdG9yX3lva2U.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L2FtdXlhZjc1WE1FaTJJOHZGS1FBakJfMTc3MDUzODc5NTk5NF9uYTFmbl9jM1JoZEc5eVgzbHZhMlUucG5nP3gtb3NzLXByb2Nlc3M9aW1hZ2UvcmVzaXplLHdfMTkyMCxoXzE5MjAvZm9ybWF0LHdlYnAvcXVhbGl0eSxxXzgwIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzk4NzYxNjAwfX19XX0_&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=kDb03Dci2PjTZmF6IKgTOjxOocUJ18r6ok2WORVm8xfKKsUYNkyErtMXZjjGNwYzOQIw8sq3jg5IbL9a0v2Kf6dAFBMRc-7bCWVrUjYKSzByz~R0EyngqlKKImlK8F09kqzf~~uxlBSsZQWA9Zzl79kHMlxRDyUFULxEtB6SHP5v7K8j24K51msiddtYpzlo4mwXU1kZfpj6OexTigDuqlyeTAYT0bvx~rpF1CLSm8kLYPN8MN8z5oipfBeL7kMhlPZeHgc3xJA5G2Nr6riDJxGqymiFr7xPm5KqgUw9b1Qd65SwjrjRt6d7I6nBkZHmwUeXdGsd~HnaKixoGxIt8w__",field_windings:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/amuyaf75XMEi2I8vFKQAjB_1770538795999_na1fn_ZmllbGRfd2luZGluZ3M.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L2FtdXlhZjc1WE1FaTJJOHZGS1FBakJfMTc3MDUzODc5NTk5OV9uYTFmbl9abWxsYkdSZmQybHVaR2x1WjNNLnBuZz94LW9zcy1wcm9jZXNzPWltYWdlL3Jlc2l6ZSx3XzE5MjAsaF8xOTIwL2Zvcm1hdCx3ZWJwL3F1YWxpdHkscV84MCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2
4198NoVGltZSI6MTc5ODc2MTYwMH19fV19&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=kPePaxf7~eGo80NLTCPncaqOPRSdIR3cQX3qvEY8FyVQpV28JX4rTpqpRfoLMfsbUup-VoRDh0ZOcKv6~gP3qBeX9VGIEo2bbMECKObH5OXt8DftUpficgc6l7P2~TNYW3T3V9MKexf0nxdO8~wnxSakythl775n01eZJYqMWfSDIAMN0DYm~JMPk00Z2-0VUjeUe~xe2z6VDta5Na36WrMJkCsHGF1fa9D09WkrjzE1njWaZn9xW8-bHUNJWQm6hZQfF5UwP~9i9Y8pIG2G2sUKar8J-GNz5EeDFmXxsmJqeZtmSPvdy6eYGSWBSWKrFFtVM1usvwyP2w4YpNYPzA__",armature:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/amuyaf75XMEi2I8vFKQAjB_1770538796138_na1fn_YXJtYXR1cmU.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L2FtdXlhZjc1WE1FaTJJOHZGS1FBakJfMTc3MDUzODc5NjEzOF9uYTFmbl9ZWEp0WVhSMWNtVS5wbmc~eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsd18xOTIwLGhfMTkyMC9mb3JtYXQsd2VicC9xdWFsaXR5LHFfODAiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3OTg3NjE2MDB9fX1dfQ__&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=XI3Y91wvt1aEtivNvviKvh~iuo3tLoSWzBl6OnBU2fMwohPQKtm7o9fdKxrxAncgtVIUlLrrwQe~ZOSBO7ww-qLrUS6Qs2AQIRePTbK9vpxfpuc1DIOa9dcC7FY74Rnr6NYlZpyLkmQwQKM4mWeXpiHXeLtu-cdCVcBu7hK81pNdaOyEkHEVCnukkuOkKDrcRB9z7L1vDPVlPTOJZbcxD4PpW8QdKELsTnhVLGa77XR3GzkugOr3FZoyV5nGj2-wcwyQhs8d0V4KOKpJrSsFxnxgvaedckPWvWO9sgLQAmbPgmr8ioZdHJypevdglWi2H3KPiWagLehdox7t2BlXTg__",commutator:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/amuyaf75XMEi2I8vFKQAjB_1770538796138_na1fn_Y29tbXV0YXRvcg.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L2FtdXlhZjc1WE1FaTJJOHZGS1FBakJfMTc3MDUzODc5NjEzOF9uYTFmbl9ZMjl0YlhWMFlYUnZjZy5wbmc~eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsd18xOTIwLGhfMTkyMC9mb3JtYXQsd2VicC9xdWFsaXR5LHFfODAiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3OTg3NjE2MDB9fX1dfQ__&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=PIItQKZVGEdV4lanFMSgDNlA1aO4l2zqVSCUMXIaGUff7asPn0lTWqtS0VMc2RnrB6an-Tq3aVxuxLV4F9OP8fsBsWY6mGUOOmHgSsGoqLt~klwjb6HjuHM6119ou9StTBMwhxPCdLli4bK-1k4yG~PXLqUv2tPjkvatJlq8MOuaJBOCdLYOWawSFjbPQRllFpszZ5bDDGUcqbcFFQ76lP5TrUJudNE3Tzirvgdyov~jjUFcKIE7d6eYyLt0sseM4zA7c8C78kAyQPnHJIkyASb6nkGuvqE3SPoFHhnnvyWq8NxRETwfZmZ9GWDJMpUle01icSjqAUJ~E8EfBye5wg__",brushes:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/amuyaf75XMEi2I8vFKQAjB_1770538796139_na1fn_Y2FyYm9uX2JydXNoZXM.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L2FtdXlhZjc1WE1FaTJJOHZGS1FBakJfMTc3MDUzODc5NjEzOV9uYTFmbl9ZMkZ5WW05dVgySnlkWE5vWlhNLnBuZz94LW9zcy1wcm9jZXNzPWltYWdlL3Jlc2l6ZSx3XzE5MjAsaF8xOTIwL2Zvcm1hdCx3ZWJwL3F1YWxpdHkscV84MCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc5ODc2MTYwMH19fV19&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=Rc2-2T63DRyg5DwzfslCxeSUoFtL5LkcxpVm2Enoo3nKM1k0rSq6iN-1d5puMOiI315haIU2xKHnrXLDKUOD7sB2q8jXajswbj1FmDCRW2sOxG6HChHdUet7WsgrpFd3aw2nqeEoegYhgE33aw8o4TRG5WpQAkO7Y9WZgHmDQI1kArr8tPbT~6H-N7TzoUmRpz4QePP2GZeAgyxogvJj7toTViNdsIPhg8BEE~kmqCRIr8aVSJBPOZcc2QksWRZ3sN9lUbHhNWmiV4zojUQChUEP5hTn8Gkr1Vnb3J67eIgNzs4akOr~~a6nnDmdwdl1mdLIMcHGGAjDO7DjAe5CpA__",bearings:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/N8UBJe42SYZtWd39ly4bMs_1770538879220_na1fn_YmVhcmluZ3M.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L044VUJKZTQyU1ladFdkMzlseTRiTXNfMTc3MDUzODg3OTIyMF9uYTFmbl9ZbVZoY21sdVozTS5wbmc~eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsd18xOTIwLGhfMTkyMC9mb3JtYXQsd2VicC9xdWFsaXR5LHFfODAiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3OTg3NjE2MDB9fX1dfQ__&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=oKieW4~DsTjsciCuhlBHEGI0FCmehEsUG5gRc2OSKnIK7LExBaHR9R398vOEmb
4198wxVNGWzwnq8B~--WzLyoi6krPSQmMzT0MH0K1-CThAeGWyCbZMNZXag~YeF~NMptTbV3NkIgGzP8OKR8rGcS7ZMYX2JPGmzAyCsoi4msdGwOY9OmgD~Q0w2mSY1CDKPKXv8BKiOMZlDTkjA4SFPgAqPHl2gzUwLK7C~z539amAqs9rSEWwNCjVCNPGNfAVXKQmN4rDsziOGed4SYVhz-t6g5MuQoEVt08QJmFX3NxpYjN32P~prRIevO~1-wGy37R1qPqTdXrQLoj-DLTxwnzF6g__",terminal_panel:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/N8UBJe42SYZtWd39ly4bMs_1770538879221_na1fn_dGVybWluYWxfcGFuZWw.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L044VUJKZTQyU1ladFdkMzlseTRiTXNfMTc3MDUzODg3OTIyMV9uYTFmbl9kR1Z5YldsdVlXeGZjR0Z1Wld3LnBuZz94LW9zcy1wcm9jZXNzPWltYWdlL3Jlc2l6ZSx3XzE5MjAsaF8xOTIwL2Zvcm1hdCx3ZWJwL3F1YWxpdHkscV84MCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc5ODc2MTYwMH19fV19&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=kS-2PfJJpTCCGc8RmatLqF2HsvsyCyr5wPL1FQy-D87XzuUcMTkQ2-p9DFQb7dFMTlDzf4VVequjjSopRbz7EqaEcR7QayXi9sbGGPrFD4unRf43Hk2j8GHP-nH3yel5a8IdIFHF0pWYM~FgsiXOe1R-gc2FyHbSkSSEAFhw-gqeJaVD9oSw2aPIZOtJ7D6zJwfnqY4ny0MeZG-245BIOpA8xiH02Q6aiQ77oGIo5eXTRuhmIoDpAmSMlqVHz5rIaOkR0Pu5S0D3qNcTPEWzW3MHr7KNjm106v7PXD7sDGA0AWc3ea1xhyETAD1YFvtEDUVGwtsa0buWpT7B-q3QYQ__",assembled:"https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/N8UBJe42SYZtWd39ly4bMs-img-3_1770538868000_na1fn_ZGNfbWFjaGluZV9hc3NlbWJsZWQ.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L044VUJKZTQyU1ladFdkMzlseTRiTXMtaW1nLTNfMTc3MDUzODg2ODAwMF9uYTFmbl9aR05mYldGamFHbHVaVjloYzNObGJXSnNaV1EucG5nP3gtb3NzLXByb2Nlc3M9aW1hZ2UvcmVzaXplLHdfMTkyMCxoXzE5MjAvZm9ybWF0LHdlYnAvcXVhbGl0eSxxXzgwIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzk4NzYxNjAwfX19XX0_&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=o557tOn7Q4LtGOZSu6jtVqgG07MMRRb7FjSrTXXTVO~CYQ3uiDxFlTHJYfJGb71qOkozNqVdXDNnmx9Tn4gEqJo1hRx8szp7B7UBFu7-t3dR~qMGm0y0TOxP4YCDRGXugGkfIz5sqDYbWD-L9hzQav2OQIw66FyydIOyPsDQl9VK~O~CBxMUJS-45NLqnyoPBLJ4KaACVyhRHipTAWNdrT3NmMAocXIDy7MvjXb2LkiAroDs-Jc3rhMdZ25sf0Om4wwUWpGycQd4Uqw6zyzGED7UxiQvhL8e~y7ZO64eN3FRaypKRXqHnWbvVHpL8340v8I~dSZ7CLNtSFa6uEqJZg__"},Ld={stator_yoke:{nameAr:"ÙÙØ¨ اÙÙ
Ø¬Ø§Ù Ø§ÙØØ¯ÙØ¯Ù",nameEn:"Stator Yoke / Field Core",description:"اÙÙÙÙÙ Ø§ÙØ£Ø³Ø·ÙاÙÙ Ø§ÙØ®Ø§Ø±Ø¬Ù اÙÙ
صÙÙØ¹ Ù
Ù Ø§ÙØØ¯ÙØ¯ اÙÙ
ØµØ¨ÙØ¨. ÙØØªÙ٠عÙÙ ÙØ·Ø¨ÙÙ Ù
ØºÙØ§Ø·ÙسÙÙÙ Ù
ØªÙØ§Ø¨ÙÙÙ ÙÙØ¬Ùا٠اÙÙ
جا٠اÙÙ
ØºÙØ§Ø·ÙØ³Ù ÙØÙ Ø§ÙÙ
ÙØªØ¬. ÙØ¹Ù
Ù ÙÙ
سار ÙÙØªØ¯Ù٠اÙÙ
ØºÙØ§Ø·ÙسÙ.",category:"Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ«Ø§Ø¨Øª",isInternal:!1,imageUrl:sa.stator_yoke},field_windings:{nameAr:"Ù
ÙÙØ§Øª اÙÙ
جاÙ",nameEn:"Field Windings / Pole Coils",description:"Ù
ÙÙØ§Ù Ù
٠سÙÙ ÙØØ§Ø³Ù Ù
عزÙÙ Ù
ÙÙÙÙØ§Ù ØÙÙ ÙÙØ¨Ù اÙÙØ·Ø¨ÙÙ. Ø¹ÙØ¯ Ù
Ø±ÙØ± Ø§ÙØªÙار ÙÙÙÙ
ا ÙÙØªØ¬ Ù
جا٠Ù
ØºÙØ§Ø·Ùس٠ÙÙÙ. عدد اÙÙ
ÙÙØ§Øª: 2 (ÙØ·Ø¨ÙÙ ÙÙØ·).",category:"Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ«Ø§Ø¨Øª",isInternal:!1,imageUrl:sa.field_windings},armature:{nameAr:"اÙÙ
ÙØªØ¬ (Ø¹Ø¶Ù Ø§ÙØ¥Ùتاج)",nameEn:"Armature (Rotor)",description:"Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ¯Ùار اÙÙ
Ø±ÙØ²Ù. ÙØªÙÙÙ Ù
Ù ÙÙØ¨ ØØ¯Ùد٠Ù
ØµÙØ (ÙØªÙÙÙÙ ØªÙØ§Ø±Ø§Øª Ø§ÙØ¯ÙاÙ
Ø©) Ù
ع Ø´ÙÙÙ ØªØØªÙ٠عÙÙ Ù
ÙÙØ§Øª ÙØØ§Ø³ÙØ©. Ø¹ÙØ¯ Ù
Ø±ÙØ± Ø§ÙØªÙار Ù٠اÙÙ
جا٠اÙÙ
ØºÙØ§Ø·Ùس٠ÙÙØªØ¬ عزÙ
Ø¯ÙØ±Ø§Ù.",category:"Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ¯Ùار",isInternal:!0,imageUrl:sa.armature},commutator:{nameAr:"اÙÙ
ÙØØ¯ (اÙÙ
بدÙ)",nameEn:"Commutator",description:"Ø£Ø³Ø·ÙØ§ÙØ© ÙØØ§Ø³ÙØ© Ù
ÙØ³Ù
Ø© Ø¥ÙÙ Ø´Ø±Ø§Ø¦Ø Ù
عزÙÙØ© باÙÙ
ÙÙØ§. تعÙ
٠عÙÙ Ø¹ÙØ³ Ø§ØªØ¬Ø§Ù Ø§ÙØªÙار ÙÙ Ù
ÙÙØ§Øª اÙÙ
ÙØªØ¬ ÙÙ ÙØµÙ Ø¯ÙØ±Ø© ÙØ¶Ù
ا٠استÙ
رار Ø§ÙØ¯Ùرا٠ÙÙ Ø§ØªØ¬Ø§Ù ÙØ§ØØ¯.",category:"Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ¯Ùار",isInternal:!0,imageUrl:sa.commutator},brushes:{nameAr:"اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ©",nameEn:"Carbon Brushes",description:"ÙØ·Ø¹ØªØ§Ù Ù
٠اÙÙØ±Ø¨ÙÙ Ù
Ø¶ØºÙØ·ØªØ§Ù بÙÙØ§Ø¨Ø¶ عÙÙ Ø³Ø·Ø Ø§ÙÙ
ÙØØ¯. تÙÙÙ Ø§ÙØªÙار اÙÙÙØ±Ø¨Ø§Ø¦Ù Ù
Ù Ø§ÙØ¯Ø§Ø¦Ø±Ø© Ø§ÙØ®Ø§Ø±Ø¬ÙØ© Ø¥ÙÙ Ù
ÙÙØ§Øª اÙÙ
ÙØªØ¬ Ø§ÙØ¯Ùارة. Ø§ÙØ¹Ø¯Ø¯: 2 ÙØ±Ø´Ø© ÙÙØ·.",category:"ÙÙÙ Ø§ÙØªÙار",isInternal:!0,imageUrl:sa.brushes},bearings:{nameAr:"Ø§ÙØ¨ÙرÙÙ (اÙÙ
ØØ§Ù
Ù)",nameEn:"Ball Bearings",description:"Ù
ØÙ
ÙØ§Ù ÙØ±ÙÙØ§Ù (Ø£Ù
اÙ
Ù ÙØ®ÙÙÙ) ÙØ«Ø¨ØªØ§Ù اÙÙ
ØÙر ÙÙØ³Ù
ØØ§Ù Ø¨Ø¯ÙØ±Ø§ÙÙ Ø¨Ø³ÙØ§Ø³Ø© Ù
ع تÙÙÙÙ Ø§ÙØ§ØØªÙاÙ. عادة Ù
Ù ÙÙØ¹ Deep Groove Ball Bearing.",category:"Ù
ÙÙØ§ÙÙÙÙ",isInternal:!0,imageUrl:sa.bearings},terminal_panel:{nameAr:"ÙÙØØ© Ø§ÙØªÙصÙÙ",nameEn:"Terminal Panel",description:"ÙÙØØ© Ø§ÙØªÙصÙÙ ØªØØªÙ٠عÙ٠أطراÙ: A1-A2 (Ù
ÙÙØ§Øª اÙÙ
ÙØªØ¬)Ø D1-D2-D3 (Ù
ÙÙØ§Øª Ø§ÙØªÙاÙÙ Series)Ø F1-F2 (Ù
ÙÙØ§Øª Ø§ÙØªÙاز٠Shunt). تسÙ
Ø Ø¨ØªÙØµÙÙ Ø§ÙØ¢ÙØ© بأÙÙ
اط Ù
ختÙÙØ© (ØªÙØ§ÙÙØ ØªÙØ§Ø²ÙØ Ù
Ø±ÙØ¨).",category:"ÙÙØ±Ø¨Ø§Ø¦Ù",isInternal:!1,imageUrl:sa.terminal_panel}},u6={stator_yoke:[0,3.5,0],field_windings:[0,1.5,0],armature:[4,0,0],commutator:[6,-1.5,0],brushes:[-3,-2,2.5],bearings:[-4,0,-2],terminal_panel:[0,5,2]},BM={stator_yoke:[0,0,0],field_windings:[0,0,.01],armature:[0,0,.02],commutator:[0,0,.03],brushes:[0,0,.04],bearings:[0,0,.05],terminal_panel:[0,0,.06]},f6={stator_yoke:3.5,field_windings:2.8,armature:2.4,commutator:1.6,brushes:1.4,bearings:1.2,terminal_panel:1.5};function d6(n,t,e=800){const s=n.position.clone(),r=performance.now(),l=()=>
4198{const u=performance.now()-r,f=Math.min(u/e,1),h=1-Math.pow(1-f,3);n.position.lerpVectors(s,t,h),f<1&&requestAnimationFrame(l)};l()}function h6({viewMode:n,selectedComponent:t,onComponentSelect:e,autoRotate:s}){const r=G.useRef(null),l=G.useRef(null),u=G.useRef(null),f=G.useRef(null),h=G.useRef(null),d=G.useRef(new Map),g=G.useRef(null),m=G.useRef(new QO),v=G.useRef(new ce),_=G.useRef(0),M=G.useRef(0),[T,S]=G.useState(!0),[b,R]=G.useState(0),[C,P]=G.useState(!1),U=8,F=G.useCallback(()=>{M.current+=1;const L=Math.round(M.current/U*100);R(L),M.current>=U&&S(!1)},[]);return G.useEffect(()=>{if(!r.current)return;const L=document.createElement("canvas");if(!(L.getContext("webgl2")||L.getContext("webgl"))){P(!0),S(!1);return}const w=new RO;w.background=new Fe(657935),u.current=w;const O=r.current.clientWidth,j=r.current.clientHeight,Q=new Di(45,O/j,.1,200);Q.position.set(0,2,12),Q.lookAt(0,0,0),f.current=Q;const Z=new ZB({antialias:!0,alpha:!0,powerPreference:"high-performance"});Z.setSize(O,j),Z.setPixelRatio(Math.min(window.devicePixelRatio,2)),Z.toneMapping=Ox,Z.toneMappingExposure=1.3,r.current.appendChild(Z.domElement),l.current=Z;const rt=new QB(Q,Z.domElement);rt.enableDamping=!0,rt.dampingFactor=.05,rt.autoRotate=s,rt.autoRotateSpeed=1,rt.minDistance=5,rt.maxDistance=30,rt.target.set(0,0,0),h.current=rt;const ot=new ZO(16777215,.8);w.add(ot);const I=new qO(16777215,.6);I.position.set(5,8,5),w.add(I);const V=new XO(54527,.3,30);V.position.set(0,-3,5),w.add(V);const k=new JO(20,40,54527,1118498);k.position.y=-4,k.material.opacity=.1,k.material.transparent=!0,w.add(k);const gt=new jO;gt.crossOrigin="anonymous",gt.load(sa.assembled,pt=>{pt.colorSpace=xi;const Et=new Ig({map:pt,transparent:!0,depthTest:!0,depthWrite:!1}),J=new iM(Et);J.name="assembled";const it=pt.image.width/pt.image.height;J.scale.set(7*it,7,1),J.position.set(0,0,-.1),w.add(J),g.current=J,F()},void 0,()=>F()),Object.keys(Ld).forEach(pt=>{const Et=sa[pt];if(!Et){F();return}gt.load(Et,J=>{J.colorSpace=xi;const it=new Ig({map:J,transparent:!0,alphaTest:.05,depthTest:!0,depthWrite:!1}),bt=new iM(it);bt.name=pt;const Ot=J.image.width/J.image.height,Ut=f6[pt]||2;bt.scale.set(Ut*Ot,Ut,1);const ae=BM[pt]||[0,0,0];bt.position.set(ae[0],ae[1],ae[2]),bt.visible=!1,w.add(bt),d.current.set(pt,bt),F()},void 0,()=>F())});const B=()=>
4198{_.current=requestAnimationFrame(B),rt.update(),Z.render(w,Q)};B();const at=()=>{if(!r.current)return;const pt=r.current.clientWidth,Et=r.current.clientHeight;Q.aspect=pt/Et,Q.updateProjectionMatrix(),Z.setSize(pt,Et)};window.addEventListener("resize",at);const nt=pt=>{if(!r.current||!f.current)return;const Et=r.current.getBoundingClientRect();v.current.x=(pt.clientX-Et.left)/Et.width*2-1,v.current.y=-((pt.clientY-Et.top)/Et.height)*2+1,m.current.setFromCamera(v.current,f.current);const J=Array.from(d.current.values()).filter(bt=>bt.visible),it=m.current.intersectObjects(J);if(it.length>0){const bt=it[0].object.name;e(bt===t?null:bt)}else e(null)};return Z.domElement.addEventListener("click",nt),()=>{window.removeEventListener("resize",at),Z.domElement.removeEventListener("click",nt),cancelAnimationFrame(_.current),Z.dispose(),r.current&&Z.domElement.parentNode===r.current&&r.current.removeChild(Z.domElement)}},[]),G.useEffect(()=>{h.current&&(h.current.autoRotate=s)},[s]),G.useEffect(()=>{const L=g.current;console.log("[ThreeViewer] viewMode changed to:",n),console.log("[ThreeViewer] assembled sprite:",L),console.log("[ThreeViewer] sprites count:",d.current.size),n==="normal"?(L&&(L.visible=!0),d.current.forEach(z=>{z.visible=!1})):(L&&(L.visible=!1),d.current.forEach((z,w)=>{z.visible=!0;const O=n==="exploded"?u6[w]||[0,0,0]:BM[w]||[0,0,0],j=new et(O[0],O[1],O[2]);d6(z,j);const Q=z.material,Z=Ld[w];n==="cutaway"&&Z&&!Z.isInternal?Q.opacity=.2:Q.opacity=1}))},[n]),G.useEffect(()=>{d.current.forEach((L,z)=>{const w=L.material;if(t===z){w.color.set(16777215);const O=L.scale.clone();L.scale.multiplyScalar(1.08),setTimeout(()=>L.scale.copy(O),250)}else t&&t!==z?w.color.setHex(8947848):w.color.set(16777215)})},[t]),C?y.jsx("div",{"data-loc":"client/src/components/ThreeViewer.tsx:439",className:"absolute inset-0 flex items-center justify-center bg-[#0a0a0f]",children:y.jsxs("div",{"data-loc":"client/src/components/ThreeViewer.tsx:440",className:"text-center p-6 max-w-md",children:[y.jsx("div",{"data-loc":"client/src/components/ThreeViewer.tsx:441",className:"text-4xl mb-4",children:"â ï¸"}),y.jsx("h2",{"data-loc":"client/src/components/ThreeViewer.tsx:442",className:"text-xl font-bold text-white mb-2",children:"WebGL ØºÙØ± ٠دعÙÙ "}),y.jsx("p",{"data-loc":"client/src/components/ThreeViewer.tsx:443",className:"text-gray-400 text-sm",children:"اÙÙ ØªØµÙØ Ø§ÙØØ§ÙÙ ÙØ§ ÙØ¯Ø¹Ù WebGL. ÙØ±Ø¬Ù Ø§Ø³ØªØ®Ø¯Ø§Ù Ù ØªØµÙØ ØØ¯ÙØ« ٠ث٠Chrome Ø£Ù Safari."})]})}):y.jsx("div",{"data-loc":"client/src/components/ThreeViewer.tsx:452",ref:r,className:"absolute inset-0",children:T&&y.jsx("div",{"data-loc":"client/src/components/ThreeViewer.tsx:454",className:"absolute inset-0 flex items-center justify-center bg-[#0a0a0f] z-30",children:y.jsxs("div",{"data-loc":"client/src/components/ThreeViewer.tsx:455",className:"text-center",children:[y.jsxs("div",{"data-loc":"client/src/components/ThreeViewer.tsx:456",className:"relative w-20 h-20 mx-auto mb-4",children:[y.jsx("div",{"data-loc":"client/src/components/ThreeViewer.tsx:457",className:"absolute inset-0 border-2 border-[#00d4ff]/20 rounded-full"}),y.jsx("div",{"data-loc":"client/src/components/ThreeViewer.tsx:458",className:"absolute inset-0 border-2 border-[#00d4ff] rounded-full animate-spin",style:{borderTopColor:"transparent",borderRightColor:"transparent",animationDuration:"1.5s"}}),y.jsx("div",{"data-loc":"client/src/components/ThreeViewer.tsx:466",className:"absolute inset-0 flex items-center justify-center",children:y.jsxs("span",{"data-loc":"client/src/components/ThreeViewer.tsx:467",className:"text-[#00d4ff] text-xs font-mono",children:[b,"%"]})})]}),y.jsx("p",{"data-loc":"client/src/components/ThreeViewer.tsx:470",className:"text-[#00d4ff]/60 text-sm font-medium",children:"جار٠تØÙ Ù٠اÙÙ ÙÙÙØ§Øª..."})]})})})}const p6=typeof window<"u"?window.location.href:"",VM="https://dc-machines-lab.manus.space/",uA="اÙ٠درب ÙÙØ¯ Ø±ÙØ§Ø¹Ù",HM="[email protected]";function f0(n){const t=`${n} 4199 4200ð ${p6} 4201 4202âï¸ ÙÙØ±Ø© ÙØªØµÙ ÙÙ : ${uA}`;window.open(`https://wa.me/?text=${encodeURIComponent(t)}`,"_blank")}function m6(){const[n,t]=G.useState(!1);return y.jsxs("div",{"data-loc":"client/src/components/HUDFrame.tsx:26",className:"absolute inset-0 pointer-events-none z-10",children:[y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:28",className:"absolute top-3 right-3",children:y.jsx("svg",{"data-loc":"client/src/components/HUDFrame.tsx:29",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:y.jsx("path",{"data-loc":"client/src/components/HUDFrame.tsx:30",d:"M24 0V8M24 0H16",stroke:"#00d4ff",strokeWidth:"1.5",opacity:"0.6"})})}),y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:33",className:"absolute top-3 left-3",children:y.jsx("svg",{"data-loc":"client/src/components/HUDFrame.tsx:34",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:y.jsx("path",{"data-loc":"client/src/components/HUDFrame.tsx:35",d:"M0 0V8M0 0H8",stroke:"#00d4ff",strokeWidth:"1.5",opacity:"0.6"})})}),y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:38",className:"absolute bottom-16 right-3",children:y.jsx("svg",{"data-loc":"client/src/components/HUDFrame.tsx:39",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:y.jsx("path",{"data-loc":"client/src/components/HUDFrame.tsx:40",d:"M24 24V16M24 24H16",
4202stroke:"#00d4ff",strokeWidth:"1.5",opacity:"0.6"})})}),y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:43",className:"absolute bottom-16 left-3",children:y.jsx("svg",{"data-loc":"client/src/components/HUDFrame.tsx:44",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:y.jsx("path",{"data-loc":"client/src/components/HUDFrame.tsx:45",d:"M0 24V16M0 24H8",stroke:"#00d4ff",strokeWidth:"1.5",opacity:"0.6"})})}),y.jsxs(an.div,{"data-loc":"client/src/components/HUDFrame.tsx:50",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"absolute top-3 right-12 left-12 flex flex-col items-center",children:[y.jsxs("div",{"data-loc":"client/src/components/HUDFrame.tsx:57",className:"flex items-center gap-2",children:[y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:58",className:"w-2 h-2 rounded-full bg-[#00d4ff] animate-breathe"}),y.jsx("h1",{"data-loc":"client/src/components/HUDFrame.tsx:59",className:"text-sm sm:text-base font-bold text-white glow-text",children:"ترÙÙØ¨ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر"})]}),y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:65",className:"flex items-center gap-2 mt-0.5",children:y.jsxs("span",{"data-loc":"client/src/components/HUDFrame.tsx:66",className:"text-[10px] sm:text-[11px] text-[#00d4ff]/50",children:["ÙÙØ±Ø© ÙØªØµÙ
ÙÙ
: ",y.jsx("span",{"data-loc":"client/src/components/HUDFrame.tsx:67",className:"text-[#00d4ff]/70 font-semibold",children:uA})]})}),y.jsxs("div",{"data-loc":"client/src/components/HUDFrame.tsx:72",className:"flex items-center gap-3 mt-0.5 pointer-events-auto",children:[y.jsxs("a",{"data-loc":"client/src/components/HUDFrame.tsx:74",href:VM,className:"flex items-center gap-1 text-[9px] text-[#00d4ff]/60 hover:text-[#00d4ff] transition-colors font-semibold bg-[#00d4ff]/5 hover:bg-[#00d4ff]/10 px-2 py-1 rounded border border-[#00d4ff]/20",children:[y.jsx(_d,{"data-loc":"client/src/components/HUDFrame.tsx:78",size:10}),y.jsx("span",{"data-loc":"client/src/components/HUDFrame.tsx:79",children:"Ø§ÙØ¹Ùدة ÙÙÙ
ÙÙØ¹ Ø§ÙØ±Ø¦ÙسÙ"})]}),y.jsx("span",{"data-loc":"client/src/components/HUDFrame.tsx:81",className:"text-[#00d4ff]/20",children:"|"}),y.jsx("a",{"data-loc":"client/src/components/HUDFrame.tsx:82",href:`mailto:${HM}`,className:"text-[9px] text-[#00d4ff]/40 hover:text-[#00d4ff]/70 transition-colors font-mono",dir:"ltr",children:HM}),y.jsx("span",{"data-loc":"client/src/components/HUDFrame.tsx:89",className:"text-[#00d4ff]/20",children:"|"}),y.jsx("a",{"data-loc":"client/src/components/HUDFrame.tsx:90",href:VM,target:"_blank",rel:"noopener noreferrer",className:"text-[9px] text-[#00d4ff]/40 hover:text-[#00d4ff]/70 transition-colors",children:"Ù
عÙ
Ù Ø¢ÙØ§Øª Ø§ÙØªÙار اÙÙ
ستÙ
ر Ø§ÙØ°ÙÙ"}),y.jsx("span",{"data-loc":"client/src/components/HUDFrame.tsx:98",className:"text-[#00d4ff]/20",children:"|"}),y.jsxs("div",{"data-loc":"client/src/components/HUDFrame.tsx:100",className:"relative",children:[y.jsxs("button",{"data-loc":"client/src/components/HUDFrame.tsx:101",onClick:()=>t(!n),className:"flex items-center gap-1 text-[9px] text-[#00d4ff]/40 hover:text-[#00d4ff]/70 transition-colors",children:[y.jsx(dN,{"data-loc":"client/src/components/HUDFrame.tsx:105",size:10}),y.jsx("span",{"data-loc":"client/src/components/HUDFrame.tsx:106",children:"Ù
Ø´Ø§Ø±ÙØ©"})]}),n&&y.jsxs(an.div,{"data-loc":"client/src/components/HUDFrame.tsx:111",initial:{opacity:0,y:-4,scale:.95},animate:{opacity:1,y:0,scale:1},className:"absolute top-full mt-1 left-1/2 -translate-x-1/2 z-50 bg-[#0a0a0f]/95 backdrop-blur-md border border-[#00d4ff]/30 rounded-md shadow-lg shadow-[#00d4ff]/10 overflow-hidden min-w-[160px]",children:[y.jsxs("button",{"data-loc":"client/src/components/HUDFrame.tsx:116",onClick:()=>{f0("ترÙÙØ¨ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر - ÙÙ
ÙØ°Ø¬ ØªÙØ§Ø¹ÙÙ Ø«ÙØ§Ø«Ù Ø§ÙØ£Ø¨Ø¹Ø§Ø¯"),t(!1)},className:"w-full flex items-center gap-2 px-3 py-2 text-[11px] text-gray-300 hover:bg-[#00d4ff]/10 hover:text-[#00d4ff] transition-colors text-right",children:[y.jsx("svg",{"data-loc":"client/src/components/HUDFrame.tsx:123",width:"14",height:"14",viewBox:"0 0 24 24",fill:"
4202currentColor",children:y.jsx("path",{"data-loc":"client/src/components/HUDFrame.tsx:124",d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),"Ù
Ø´Ø§Ø±ÙØ© اÙÙ
ÙÙØ¹ عبر ÙØ§ØªØ³Ø§Ø¨"]}),y.jsxs("button",{"data-loc":"client/src/components/HUDFrame.tsx:128",onClick:()=>{f0("اÙÙ
ÙØ§ØµÙات اÙÙÙÙØ© ÙØ¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر Leybold 773 186 - Verbundmaschine"),t(!1)},className:"w-full flex items-center gap-2 px-3 py-2 text-[11px] text-gray-300 hover:bg-[#00d4ff]/10 hover:text-[#00d4ff] transition-colors text-right",children:[y.jsx("svg",{"data-loc":"client/src/components/HUDFrame.tsx:135",width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:y.jsx("path",{"data-loc":"client/src/components/HUDFrame.tsx:136",d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),"Ù
Ø´Ø§Ø±ÙØ© Ø§ÙØ¨ÙØ§ÙØ§Øª اÙÙÙÙØ©"]}),y.jsxs("button",{"data-loc":"client/src/components/HUDFrame.tsx:140",onClick:()=>{f0("Ù
ÙÙÙØ§Øª Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر: ÙÙØ¨ اÙÙ
Ø¬Ø§ÙØ Ù
ÙÙØ§Øª اÙÙ
Ø¬Ø§ÙØ اÙÙ
ÙØªØ¬Ø اÙÙ
ÙØØ¯Ø Ø§ÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ©Ø Ø§ÙØ¨ÙرÙÙØ ÙÙØØ© Ø§ÙØªÙصÙÙ"),t(!1)},className:"w-full flex items-center gap-2 px-3 py-2 text-[11px] text-gray-300 hover:bg-[#00d4ff]/10 hover:text-[#00d4ff] transition-colors text-right",children:[y.jsx("svg",{"data-loc":"client/src/components/HUDFrame.tsx:147",width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:y.jsx("path",{"data-loc":"client/src/components/HUDFrame.tsx:148",d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),"Ù
Ø´Ø§Ø±ÙØ© ÙØ§Ø¦Ù
Ø© اÙÙ
ÙÙÙØ§Øª"]})]})]})]})]}),n&&y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:160",className:"absolute inset-0 pointer-events-auto z-40",onClick:()=>t(!1)}),y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:167",className:"absolute inset-0 overflow-hidden opacity-[0.03]",children:y.jsx("div",{"data-loc":"client/src/components/HUDFrame.tsx:168",className:"w-full h-px bg-[#00d4ff] animate-scanline"})})]})}
4202function g6({viewMode:n,onViewModeChange:t,autoRotate:e,onAutoRotateToggle:s,onResetView:r,arSupported:l,onStartAR:u,onShowSpecs:f,onShowQuiz:h,onShowLearn:d}){const g=[{id:"normal",label:"Ø§ÙØ¹Ø±Ø¶ Ø§ÙØ¹Ø§Ø¯Ù",shortLabel:"عادÙ",icon:y.jsx(sN,{"data-loc":"client/src/components/HUDControls.tsx:40",size:18})},{id:"exploded",label:"Ø§ÙØ¹Ø±Ø¶ اÙÙ ÙÙØ¬Ø±",shortLabel:"Ù ÙÙØ¬Ø±",icon:y.jsx(uN,{"data-loc":"client/src/components/HUDControls.tsx:46",size:18})}];return y.jsx("div",{"data-loc":"client/src/components/HUDControls.tsx:51",className:"absolute bottom-0 left-0 right-0 z-20 pb-3 px-3",children:y.jsxs("div",{"data-loc":"client/src/components/HUDControls.tsx:52",className:"flex items-center justify-center gap-1.5 sm:gap-2 flex-wrap",children:[g.map(m=>y.jsxs(an.button,{"data-loc":"client/src/components/HUDControls.tsx:55",whileTap:{scale:.95},onClick:()=>t(m.id),className:` 4203 flex items-center gap-1.5 px-3 py-2 sm:px-4 sm:py-2.5 rounded text-xs sm:text-sm font-medium 4204 transition-all duration-300 backdrop-blur-md 4205 ${n===m.id?"bg-[#00d4ff]/20 text-[#00d4ff] border border-[#00d4ff]/50 shadow-[0_0_12px_rgba(0,212,255,0.2)]":"bg-[#0a0a0f]/70 text-gray-400 border border-white/10 hover:border-[#00d4ff]/30 hover:text-[#00d4ff]/80"} 4206 `,children:[m.icon,y.jsx("span",{"data-loc":"client/src/components/HUDControls.tsx:69",className:"hidden sm:inline",children:m.label}),y.jsx("span",{"data-loc":"client/src/components/HUDControls.tsx:70",className:"sm:hidden",children:m.shortLabel})]},m.id)),y.jsx("div",{"data-loc":"client/src/components/HUDControls.tsx:75",className:"w-px h-7 bg-[#00d4ff]/15 mx-0.5 hidden sm:block"}),y.jsxs(an.button,{"data-loc":"client/src/components/HUDControls.tsx:78",whileTap:{scale:.95},onClick:f,className:"flex items-center gap-1.5 px-2.5 py-2 sm:px-3 sm:py-2.5 rounded text-xs sm:text-sm bg-[#0a0a0f]/70 text-gray-400 border border-white/10 hover:border-[#00d4ff]/30 hover:text-[#00d4ff]/80 transition-all duration-300 backdrop-blur-md",title:"اÙÙ ÙØ§ØµÙات اÙÙÙÙØ©",children:[y.jsx(cN,{"data-loc":"client/src/components/HUDControls.tsx:84",size:16}),y.jsx("span",{"data-loc":"client/src/components/HUDControls.tsx:85",className:"hidden sm:inline text-xs",children:"اÙÙ ÙØ§ØµÙات"})]}),h&&y.jsxs(an.button,{"data-loc":"client/src/components/HUDControls.tsx:90",whileTap:{scale:.95},onClick:()=>{console.log("[HUDControls] Quiz button clicked"),h()},className:"flex items-center gap-1.5 px-2.5 py-2 sm:px-3 sm:py-2.5 rounded text-xs sm:text-sm bg-gradient-to-r from-[#00d4ff]/20 to-purple-500/20 text-[#00d4ff] border border-[#00d4ff]/40 hover:border-[#00d4ff]/60 hover:from-[#00d4ff]/30 hover:to-purple-500/30 transition-all duration-300 backdrop-blur-md shadow-[0_0_8px_rgba(0,212,255,0.15)]",title:"اختبر ٠عÙÙ٠اتÙ",children:[y.jsx(aN,{"data-loc":"client/src/components/HUDControls.tsx:99",size:16}),y.jsx("span",{"data-loc":"client/src/components/HUDControls.tsx:100",className:"hidden sm:inline text-xs font-semibold",children:"اختبر ٠عÙÙ٠اتÙ"}),y.jsx("span",{"data-loc":"client/src/components/HUDControls.tsx:101",className:"sm:hidden text-xs font-semibold",children:"اختبار"})]}),y.jsx(an.button,{"data-loc":"client/src/components/HUDControls.tsx:106",whileTap:{scale:.95},onClick:s,className:` 4207 flex items-center gap-1.5 px-2.5 py-2 sm:px-3 sm:py-2.5 rounded text-xs sm:text-sm 4208 transition-all duration-300 backdrop-blur-md 4209 ${e?"bg-[#00d4ff]/20 text-[#00d4ff] border border-[#00d4ff]/50":"bg-[#0a0a0f]/70 text-gray-400 border border-white/10 hover:border-[#00d4ff]/30"} 4210 `,title:"تدÙÙØ± تÙÙØ§Ø¦Ù",children:y.jsx(Qg,{"data-loc":"client/src/components/HUDControls.tsx:119",size:16,className:e?"animate-spin":"",style:{animationDuration:"3s"}})}),y.jsx(an.button,{"data-loc":"client/src/components/HUDControls.tsx:123",whileTap:{scale:.95},onClick:r,className:"flex items-center px-2.5 py-2 sm:px-3 sm:py-2.5 rounded text-xs sm:text-sm bg-[#0a0a0f]/70 text-gray-400 border border-white/10 hover:border-[#00d4ff]/30 hover:text-[#00d4ff]/80 transition-all duration-300 backdrop-blur-md",title:"إعادة Ø
4210¶Ø¨Ø· اÙÙØ§Ù
ÙØ±Ø§",children:y.jsxs("svg",{"data-loc":"client/src/components/HUDControls.tsx:129",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[y.jsx("path",{"data-loc":"client/src/components/HUDControls.tsx:130",d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),y.jsx("path",{"data-loc":"client/src/components/HUDControls.tsx:131",d:"M3 3v5h5"})]})}),l&&y.jsxs(an.button,{"data-loc":"client/src/components/HUDControls.tsx:137",whileTap:{scale:.95},onClick:u,className:"flex items-center gap-1.5 px-3 py-2 sm:px-4 sm:py-2.5 rounded text-xs sm:text-sm font-medium bg-[#00d4ff]/25 text-[#00d4ff] border border-[#00d4ff]/50 shadow-[0_0_15px_rgba(0,212,255,0.25)] hover:bg-[#00d4ff]/35 transition-all duration-300 backdrop-blur-md",children:[y.jsx(hN,{"data-loc":"client/src/components/HUDControls.tsx:142",size:16}),y.jsx("span",{"data-loc":"client/src/components/HUDControls.tsx:143",children:"اÙÙØ§Ùع اÙÙ
عزز"})]}),y.jsx(b0,{"data-loc":"client/src/components/HUDControls.tsx:148",href:"/learn",children:y.jsxs(an.button,{"data-loc":"client/src/components/HUDControls.tsx:149",whileTap:{scale:.95},className:"flex items-center gap-1.5 px-3 py-2 sm:px-4 sm:py-2.5 rounded text-xs sm:text-sm font-medium bg-[#00ff88]/20 text-[#00ff88] border border-[#00ff88]/50 hover:bg-[#00ff88]/30 transition-all duration-300 backdrop-blur-md",title:"تعÙÙ
اÙÙ
Ø²ÙØ¯ ع٠ترÙÙØ¨ Ø§ÙØ¢ÙØ©",children:[y.jsx(iN,{"data-loc":"client/src/components/HUDControls.tsx:154",size:16}),y.jsx("span",{"data-loc":"client/src/components/HUDControls.tsx:155",className:"hidden sm:inline",children:"تعÙÙ
اÙÙ
Ø²ÙØ¯"})]})})]})})}function x6({className:n=""}){return y.jsxs("svg",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:16",viewBox:"0 0 600 420",className:n,xmlns:"http://www.w3.org/2000/svg",style:{background:"transparent"},children:[y.jsx("rect",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:23",x:"0",y:"0",width:"600",height:"420",rx:"6",ry:"6",fill:"#f0ece4",stroke:"#c8c0b0",strokeWidth:"2"}),y.jsx(id,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:26",cx:22,cy:22}),y.jsx(id,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:27",cx:578,cy:22}),y.jsx(id,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:28",cx:22,cy:398}),y.jsx(id,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:29",cx:578,cy:398}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:34",x:"42",y:"68",fontSize:"15",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"A2"}),y.jsx(Or,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:35",cx:90,cy:72}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:36",x:"130",y:"68",fontSize:"15",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"A1"}),y.jsx(Or,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:37",cx:175,cy:72}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:40",x:"42",y:"148",fontSize:"15",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"D1"}),y.jsx(Or,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:41",cx:90,cy:152}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:42",x:"130",y:"148",fontSize:"15",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"D2"}),y.jsx(Or,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:43",cx:175,cy:152}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:44",x:"218",y:"148",fontSize:"15",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"D3"}),y.jsx(Or,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:45",cx:260,cy:152}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:48",x:"30",y:"228",fontSize:"13",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"E1"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:49",x:"26",y:"244",fontSize:"11",fontFamily:"Arial, sans-serif",fill:"#1a1a1a",textAnchor:"start",children:"(F1)"}),y.jsx(Or,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:50",cx:90,cy:232}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:51",x:"118",y:"228",fontSize:"13",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"E2"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:52",x:"114",y:"244",fontSize:"11",fontFamily:"Arial, sans-serif",fill:"#1a1a1a",textAnchor:"start",children:"(F2)"}),y.jsx(Or,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:53",cx:175,cy:232}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:58",cx:"380",cy:"80",r:"30",fill:"none",stroke:"#1a1a1a",strokeWidth:"2"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:59",x:"380",y:"78",fontSize:"16",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"middle",children:"M/G"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:61",x1:"365",y1:"90",x2:"395",y2:"90",stroke:"#1a1a1a",strokeWidth:"2"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:64",x:"370",y:"35",fontSize:"13",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"end",children:"A1"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:65",cx:"385",cy:"32",r:"3",fill:"#1a1a1a"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:66",x1:"385",y1:"35",x2:"385",y2:"50",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:69",x:"345",y:"130",fontSize:"13",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"end",children:"A2"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:70",cx:"355",cy:"127",r:"3",fill:"#1a1a1a"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:71",x1:"380",y1:"110",x2:"380",y2:"125",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:72",x1:"355",y1:"127",x2:"380",y2:"127",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:75",x1:"380",y1:"125",x2:"380",y2:"160",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:78",x1:"340",y1:"160",x2:"560",y2:"160",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:82",x1:"360",y1:"160",x2:"360",y2:"175",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx(Lc,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:83",cx:360,cy:200}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:84",x1:"360",y1:"225",x2:"360",y2:"245",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:85",x:"360",y:"260",fontSize:"13",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"middle",children:"D2"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:88",x1:"405",y1:"160",x2:"405",y2:"175",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx(Lc,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:89",cx:405,cy:200}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:90",x1:"405",y1:"225",x2:"405",y2:"245",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:91",x:"405",y:"260",fontSize:"13",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"middle",children:"D3"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:94",x1:"450",y1:"160",x2:"450",y2:"175",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx(Lc,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:95",cx:450,cy:200}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:96",x1:"450",y1:"225",x2:"450",y2:"245",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:97",x:"450",y:"260",fontSize:"13",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"middle",children:"D1"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:101",x1:"505",y1:"160",x2:"505",y2:"175",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx(Lc,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:102",cx:505,cy:200}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:103",x1:"505",y1:"225",x2:"505",y2:"245",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:104",x:"505",y:"260",fontSize:"12",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"middle",children:"E2"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:105",x:"505",y:"274",fontSize:"10",fontFamily:"Arial, sans-serif",fill:"#1a1a1a",textAnchor:"middle",children:"(F2)"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:108",x1:"550",y1:"160",x2:"550",y2:"175",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx(Lc,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:109",cx:550,cy:200}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:110",x1:"550",y1:"225",x2:"550",y2:"245",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:111",x:"550",y:"260",fontSize:"12",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"middle",children:"E1"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:112",x:"550",y:"274",fontSize:"10",fontFamily:"Arial, sans-serif",fill:"#1a1a1a",textAnchor:"middle",children:"(F1)"}),y.jsx(kM,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:117",cx:340,cy:330}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:119",x1:"358",y1:"330",x2:"385",y2:"330",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("rect",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:121",x:"388",y:"320",width:"24",height:"20",fill:"none",stroke:"#1a1a1a",strokeWidth:"1.5",rx:"2"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:122",x:"400",y:"335",fontSize:"11",fontFamily:"Arial, sans-serif",fill:"#1a1a1a",textAnchor:"middle",children:"θ >"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:123",x1:"412",y1:"330",x2:"432",y2:"330",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:125",x1:"375",y1:"322",x2:"390",y2:"330",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx(kM,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:126",cx:450,cy:330}),y.jsx(v6,{"data-loc":"client/src/components/TerminalPanelSVG.tsx:129",cx:530,cy:330}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:131",cx:"565",cy:"330",r:"14",fill:"none",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:132",x1:"558",y1:"330",x2:"572",y2:"330",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:133",x1:"560",y1:"325",x2:"560",y2:"335",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:134",x1:"565",y1:"323",x2:"565",y2:"337",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:135",x1:"570",y1:"325",x2:"570",y2:"335",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:140",cx:"60",cy:"380",r:"14",fill:"none",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:141",x:"60",y:"385",fontSize:"12",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"middle",children:"LD"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:144",x:"105",y:"386",fontSize:"16",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"start",children:"CE"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:147",x:"530",y:"378",fontSize:"11",fontFamily:"Arial, sans-serif",fontWeight:"bold",fill:"#1a1a1a",textAnchor:"end",letterSpacing:"1",children:"VERBUNDMASCHINE"}),y.jsx("text",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:148",x:"530",y:"396",fontSize:"10",fontFamily:"Arial, sans-serif",fill:"#555",textAnchor:"end",letterSpacing:"0.5",children:"DC MULTIFUNCTION MACHINE"})]})}function Or({cx:n,cy:t}){return y.jsxs("g",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:156",children:[y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:158",cx:n,cy:t,r:"16",fill:"#2a2a2a",stroke:"#1a1a1a",strokeWidth:"1.5"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:160",cx:n,cy:t,r:"11",fill:"#1a1a1a"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:162",cx:n,cy:t,r:"5",fill:"#0a0a0a"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:164",cx:n-3,cy:t-3,r:"3",fill:"#3a3a3a",opacity:"0.5"})]})}function kM({cx:n,cy:t}){return y.jsxs("g",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:172",children:[y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:173",cx:n,cy:t,r:"16",fill:"#cc2222",stroke:"#991111",strokeWidth:"1.5"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:174",cx:n,cy:t,r:"11",fill:"#aa1111"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:175",c
4210x:n,cy:t,r:"5",fill:"#880000"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:176",cx:n-3,cy:t-3,r:"3",fill:"#dd4444",opacity:"0.5"})]})}function v6({cx:n,cy:t}){return y.jsxs("g",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:184",children:[y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:185",cx:n,cy:t,r:"16",fill:"#88aa22",stroke:"#667711",strokeWidth:"1.5"}),y.jsx("clipPath",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:187",id:"earthClip",children:y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:188",cx:n,cy:t,r:"15"})}),y.jsxs("g",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:190",clipPath:"url(#earthClip)",children:[y.jsx("rect",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:191",x:n-16,y:t-16,width:"8",height:"32",fill:"#cccc00"}),y.jsx("rect",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:192",x:n-8,y:t-16,width:"8",height:"32",fill:"#228822"}),y.jsx("rect",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:193",x:n,y:t-16,width:"8",height:"32",fill:"#cccc00"}),y.jsx("rect",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:194",x:n+8,y:t-16,width:"8",height:"32",fill:"#228822"})]}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:196",cx:n,cy:t,r:"11",fill:"#556622"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:197",cx:n,cy:t,r:"5",fill:"#334411"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:198",cx:n-3,cy:t-3,r:"3",fill:"#99bb33",opacity:"0.4"})]})}function id({cx:n,cy:t}){return y.jsxs("g",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:206",children:[y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:207",cx:n,cy:t,r:"8",fill:"#b8a88a",stroke:"#9a8a6a",strokeWidth:"1"}),y.jsx("circle",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:208",cx:n,cy:t,r:"5",fill:"#a09070"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:210",x1:n-4,y1:t,x2:n+4,y2:t,stroke:"#887755",strokeWidth:"1.5"}),y.jsx("line",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:211",x1:n,y1:t-4,x2:n,y2:t+4,stroke:"#887755",strokeWidth:"1.5"})]})}function Lc({cx:n,cy:t}){return y.jsx("g",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:224",children:y.jsx("path",{"data-loc":"client/src/components/TerminalPanelSVG.tsx:226",d:`M ${n} ${t-22/2} 4211 C ${n+10} ${t-22/2} ${n+10} ${t-22/2+5.5} ${n} ${t-22/2+5.5} 4212 C ${n+10} ${t-22/2+5.5} ${n+10} ${t-22/2+2*5.5} ${n} ${t-22/2+2*5.5} 4213 C ${n+10} ${t-22/2+2*5.5} ${n+10} ${t-22/2+3*5.5} ${n} ${t-22/2+3*5.5} 4214 C ${n+10} ${t-22/2+3*5.5} ${n+10} ${t+22/2} ${n} ${t+22/2}`,fill:"none",stroke:"#1a1a1a",strokeWidth:"1.5"})})}function y6(n,t){const e=typeof window<"u"?window.location.href:"",s=`${n} (${t}) 4215Ù Ù Ù ÙÙÙØ§Øª Ø¢ÙØ© Ø§ÙØªÙار اÙ٠ست٠ر 4216 4217ð ${e} 4218 4219âï¸ ÙÙØ±Ø© ÙØªØµÙ ÙÙ : اÙ٠درب ÙÙØ¯ Ø±ÙØ§Ø¹Ù`;window.open(`https://wa.me/?text=${encodeURIComponent(s)}`,"_blank")}function _6({componentName:n,onClose:t}){const e=n?Ld[n]:null,s=n==="terminal_panel";return y.jsx(Al,{"data-loc":"client/src/components/ComponentInfo.tsx:28",children:e&&y.jsx(an.div,{"data-loc":"client/src/components/ComponentInfo.tsx:30",initial:{opacity:0,x:20,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:20,scale:.95},transition:{duration:.3,ease:"easeOut"},className:`absolute top-12 left-3 z-20 max-h-[80vh] overflow-y-auto ${s?"w-80 sm:w-96":"w-72 sm:w-80"}`,children:y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:38",className:"relative bg-[#0a0a0f]/92 backdrop-blur-md rounded-sm overflow-hidden hud-border",children:[y.jsx("button",{"data-loc":"client/src/components/ComponentInfo.tsx:40",onClick:t,className:"absolute top-2 left-2 z-10 w-6 h-6 flex items-center justify-center text-[#00d4ff]/60 hover:text-[#00d4ff] transition-colors",children:y.jsx("svg",{"data-loc":"client/src/components/ComponentInfo.tsx:44",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:y.jsx("path",{"data-loc":"client/src/components/ComponentInfo.tsx:45",d:"M1 1L13 13M1 13L13 1",stroke:"currentColor",strokeWidth:"1.5"})})}),y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:50",className:`relative overflow-hidden bg-gradient-to-b from-[#0a1520] to-[#0a0a0f] ${s?"h-56":"h-44"}`,children:[s?y.jsx("div",{"data-loc":"client/src/components/ComponentInfo.tsx:52",className:"w-full h-full flex items-center justify-center p-3",children:y.jsx(x6,{"data-loc":"client/src/components/ComponentInfo.tsx:53",className:"w-full h-full"})}):y.jsx("img",{"data-loc":"client/src/components/ComponentInfo.tsx:56",src:e.imageUrl,alt:e.nameAr,className:"w-full h-full object-contain p-4",loading:"lazy"}),y.jsx("div",{"data-loc":"client/src/components/ComponentInfo.tsx:64",className:"absolute top-2 right-2 px-2 py-0.5 bg-[#00d4ff]/10 border border-[#00d4ff]/20 rounded text-[9px] text-[#00d4ff]/80",children:e.category})]}),y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:70",className:"p-4",children:[y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:72",className:"flex items-center gap-2 mb-2",children:[y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:73",className:`inline-block w-2 h-2 rounded-full ${e.isInternal?"bg-orange-400":"bg-[#00d4ff]"}`}),y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:74",className:"text-[10px] text-[#00d4ff]/60 font-mono",dir:"ltr",children:e.isInternal?"INTERNAL":"EXTERNAL"})]}),y.jsx("h3",{"data-loc":"client/src/components/ComponentInfo.tsx:80",className:"text-base font-bold text-white mb-1 glow-text",children:e.nameAr}),y.jsx("p",{"data-loc":"client/src/components/ComponentInfo.tsx:81",className:"text-xs text-[#00d4ff]/50 font-mono mb-3",dir:"ltr",children:e.nameEn}),y.jsx("div",{"data-loc":"client/src/components/ComponentInfo.tsx:84",className:"h-px bg-gradient-to-l from-transparent via-[#00d4ff]/30 to-transparent mb-3"}),y.jsx("p",{"data-loc":"client/src/components/ComponentInfo.tsx:87",className:"text-[12px] text-gray-300 leading-relaxed",children:e.description}),s&&y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:91",className:"mt-3 space-y-1.5",children:[y.jsx("div",{"data-loc":"client/src/components/ComponentInfo.tsx:92",className:"h-px bg-gradient-to-l from-transparent via-[#00d4ff]/20 to-transparent"}),y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:93",className:"grid grid-cols-2 gap-1 text-[10px]",children:[y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:94",className:"flex items-center gap-1.5",children:[y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:95",className:"w-2.5 h-2.5 rounded-full bg-[#1a1a1a] border border-gray-500"}),y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:96",className:"text-gray-400",children:"A1-A2: Ù ÙÙØ§Øª اÙÙ ÙØªØ¬"})]}),y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:98",className:"flex items-center gap-1.5",children:[y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:99",className:"w-2.5 h-2.5 rounded-full bg-[#1a1a1a] border border-gray-500"}),y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:100",className:"text-gray-400",children:"D1-D3: Ù ÙÙØ§Øª Ø§ÙØªÙاÙÙ"})]}),y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:102",className:"flex items-center gap-1.5",children:[y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:103",className:"w-2.5 h-2.5 rounded-full bg-[#1a1a1a] border border-gray-500"}),y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:104",className:"text-gray-400",children:"E1/F1-E2/F2: Ø§ÙØªÙازÙ"})]}),y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:106",className:"flex items-center gap-1.5",children:[y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:107",className:"w-2.5 h-2.5 rounded-full bg-red-600"}),y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:108",className:"text-gray-400",children:"Ø£ØÙ ر: ØÙ Ø§ÙØ© ØØ±Ø§Ø±ÙØ©"})]}),y.jsxs("div",{"data-loc":"client/src/components/ComponentInfo.tsx:110",className:"flex items-center gap-1.5 col-span-2",children:[y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:111",className:"w-2.5 h-2.5 rounded-full bg-yellow-400 border border-green-600"}),y.jsx("span",{"data-loc":"client/src/components/ComponentInfo.tsx:112",className:"text-gray-400",children:"Ø£ØµÙØ±/أخضر: ØªØ£Ø±ÙØ¶"})]})]})]}),y.jsx("div",{"data-loc":"client/src/components/ComponentInfo.tsx:119",className:"h-px bg-gradient-to-l from-transparent via-[#00d4ff]/15 to-transparent mt-3 mb-2"}),y.jsxs("button",{"data-loc":"client/src/components/ComponentInfo.tsx:122",onClick:()=>y6(e.nameAr,e.nameEn),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded bg-[#25D366]/15 border border-[#25D366]/30 text-[#25D366] hover:bg-[#25D366]/25 transition-all duration-200 text-[11px] font-medium",children:[y.jsx("svg",{"data-loc":"client/src/components/ComponentInfo.tsx:126",width:"14",height:"14",viewBox:"0 0 24 24",fill:"
4219currentColor",children:y.jsx("path",{"data-loc":"client/src/components/ComponentInfo.tsx:127",d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),"Ù Ø´Ø§Ø±ÙØ© عبر ÙØ§ØªØ³Ø§Ø¨"]})]})]})},n)})}function b6({selectedComponent:n,onComponentSelect:t,viewMode:e}){const[s,r]=G.useState(()=>window.innerWidth>768);G.useEffect(()=>{const f=()=>{window.innerWidth<=768&&r(!1)};return window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);const l=Object.entries(Ld),u=e==="normal";return y.jsxs(y.Fragment,{children:[y.jsx(an.button,{"data-loc":"client/src/components/ComponentList.tsx:34",whileTap:{scale:.95},onClick:()=>r(!s),className:` 4220 absolute top-1/2 -translate-y-1/2 z-30 4221 bg-[#0a0a0f]/90 backdrop-blur-md border border-[#00d4ff]/30 4222 p-2 text-[#00d4ff]/70 hover:text-[#00d4ff] transition-all duration-300 4223 ${s?"right-56 rounded-r-sm border-r-0":"right-0 rounded-l-sm"} 4224 `,children:s?y.jsx(rN,{"data-loc":"client/src/components/ComponentList.tsx:44",size:16}):y.jsx(fN,{"data-loc":"client/src/components/ComponentList.tsx:44",size:16})}),y.jsx(Al,{"data-loc":"client/src/components/ComponentList.tsx:48",children:s&&y.jsx(an.div,{"data-loc":"client/src/components/ComponentList.tsx:50",initial:{opacity:0,x:200},animate:{opacity:1,x:0},exit:{opacity:0,x:200},transition:{duration:.3,ease:"easeOut"},className:"absolute top-10 right-0 bottom-16 w-56 z-20 overflow-hidden",children:y.jsxs("div",{"data-loc":"client/src/components/ComponentList.tsx:57",className:"bg-[#0a0a0f]/90 backdrop-blur-lg border-l border-[#00d4ff]/20 h-full overflow-y-auto",children:[y.jsxs("div",{"data-loc":"client/src/components/ComponentList.tsx:59",className:"sticky top-0 bg-[#0a0a0f]/95 backdrop-blur-md px-3 py-2 border-b border-[#00d4ff]/10",children:[y.jsx("h3",{"data-loc":"client/src/components/ComponentList.tsx:60",className:"text-xs font-bold text-[#00d4ff] glow-text",children:"Ù ÙÙÙØ§Øª Ø§ÙØ¢ÙØ© Ø§ÙØ±Ø¦ÙØ³ÙØ©"}),y.jsx("p",{"data-loc":"client/src/components/ComponentList.tsx:61",className:"text-[9px] text-[#00d4ff]/40 mt-0.5",children:"Ø¢ÙØ© ذات ÙØ·Ø¨ÙÙ â 7 Ù ÙÙÙØ§Øª"})]}),y.jsxs("div",{"data-loc":"client/src/components/ComponentList.tsx:64",className:"p-2",children:[l.map(([f,h])=>y.jsxs("button",{"data-loc":"client/src/components/ComponentList.tsx:66",onClick:()=>!u&&t(n===f?null:f),disabled:u,className:` 4225 w-full text-right px-3 py-1.5 rounded text-[11px] mb-0.5 4226 transition-all duration-200 block 4227 ${u?"opacity-40 cursor-not-allowed":""} 4228 ${n===f?"bg-[#00d4ff]/15 text-[#00d4ff] border-r-2 border-[#00d4ff]":"text-gray-400 hover:text-gray-200 hover:bg-white/5"} 4229 `,children:[y.jsx("span",{"data-loc":"client/src/components/ComponentList.tsx:80",className:"block",children:h.nameAr}),y.jsx("span",{"data-loc":"client/src/components/ComponentList.tsx:81",className:"block text-[8px] text-gray-500 font-mono",children:h.nameEn})]},f)),u&&y.jsx("p",{"data-loc":"client/src/components/ComponentList.tsx:86",className:"text-[9px] text-yellow-400/50 text-center mt-3 px-2",children:'اختر "Ø§ÙØ¹Ø±Ø¶ اÙÙ ÙÙØ¬Ø±" ÙØªÙعÙÙ Ø§Ø®ØªÙØ§Ø± اÙÙ ÙÙÙØ§Øª ٠٠اÙÙØ§Ø¦Ù Ø©'})]})]})})})]})}const fA="https://dc-machines-lab.manus.space/";function GM(){const t=`اÙÙ ÙØ§ØµÙات اÙÙÙÙØ© ÙØ¢ÙØ© Ø§ÙØªÙار اÙ٠ست٠ر 4230Leybold 773 186 â Verbundmaschine 4231 4232Ù ØØ±Ù ØªÙØ§Ø²Ù: 0.3kW, 220V, 2000rpm 4233Ù ÙÙØ¯ ØªÙØ§Ø²Ù: 0.22kW, 220V, 2500rpm 4234Ù ØØ±Ù ØªÙØ§ÙÙ: 0.3kW, 220V, 2050rpm 4235 4236ð ${typeof window<"u"?window.location.href:""} 4237ð¬ Ù Ø¹Ù Ù Ø¢ÙØ§Øª Ø§ÙØªÙار اÙ٠ست٠ر Ø§ÙØ°ÙÙ: ${fA} 4238 4239âï¸ ÙÙØ±Ø© ÙØªØµÙ ÙÙ : اÙ٠درب ÙÙØ¯ Ø±ÙØ§Ø¹Ù`;window.open(`https://wa.me/?text=${encodeURIComponent(t)}`,"_blank")}function S6({isOpen:n,onClose:t}){return y.jsx(Al,{"data-loc":"client/src/components/SpecsPanel.tsx:26",children:n&&y.jsxs(y.Fragment,{children:[y.jsx(an.div,{"data-loc":"client/src/components/SpecsPanel.tsx:30",initial:{opacity:0}
4239,animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/40 z-30",onClick:t}),y.jsx(an.div,{"data-loc":"client/src/components/SpecsPanel.tsx:39",initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},transition:{duration:.4,ease:[.16,1,.3,1]},className:"absolute bottom-0 left-0 right-0 z-40 max-h-[75vh] overflow-y-auto",children:y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:46",className:"bg-[#0a0a0f]/97 backdrop-blur-xl border-t border-[#00d4ff]/30 rounded-t-xl p-4 sm:p-6",children:[y.jsx("div",{"data-loc":"client/src/components/SpecsPanel.tsx:48",className:"flex justify-center mb-3",children:y.jsx("div",{"data-loc":"client/src/components/SpecsPanel.tsx:49",className:"w-10 h-1 bg-[#00d4ff]/30 rounded-full"})}),y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:53",className:"flex items-center justify-between mb-4",children:[y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:54",children:[y.jsx("h2",{"data-loc":"client/src/components/SpecsPanel.tsx:55",className:"text-lg font-bold text-white glow-text",children:"اÙÙ
ÙØ§ØµÙات اÙÙÙÙØ©"}),y.jsx("p",{"data-loc":"client/src/components/SpecsPanel.tsx:56",className:"text-xs text-[#00d4ff]/50 font-mono mt-0.5",dir:"ltr",children:"Leybold 773 186 â Verbundmaschine / DC Multifunction Machine"})]}),y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:60",className:"flex items-center gap-2",children:[y.jsx("button",{"data-loc":"client/src/components/SpecsPanel.tsx:62",onClick:GM,className:"w-8 h-8 flex items-center justify-center text-[#25D366]/70 hover:text-[#25D366] border border-[#25D366]/20 hover:border-[#25D366]/40 rounded transition-colors",title:"Ù
Ø´Ø§Ø±ÙØ© اÙÙ
ÙØ§ØµÙات عبر ÙØ§ØªØ³Ø§Ø¨",children:y.jsx("svg",{"data-loc":"client/src/components/SpecsPanel.tsx:67",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:y.jsx("path",{"data-loc":"client/src/components/SpecsPanel.tsx:68",d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}),y.jsx("button",{"data-loc":"client/src/components/SpecsPanel.tsx:72",onClick:t,className:"w-8 h-8 flex items-center justify-center text-[#00d4ff]/60 hover:text-[#00d4ff] border border-[#00d4ff]/20 rounded transition-colors",children:y.jsx(kE,{"data-loc":"client/src/components/SpecsPanel.tsx:76",size:16})})]})]}),y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:82",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:[y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:84",title:"Ø¨ÙØ§Ùات Ø§ÙØ¢ÙØ©",icon:"ð",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:85",label:"Ø§ÙØ´Ø±ÙØ© اÙÙ
ØµÙØ¹Ø©",value:"LD Didactic (Leybold)"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:86",label:"اÙÙÙØ¹",value:"Verbundmaschine"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:87",label:"اÙÙØµÙ",value:"Ø¢ÙØ© DC Ù
تعددة اÙÙØ¸Ø§Ø¦Ù"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:88",label:"Ø§ÙØ±ÙÙ
اÙÙØªØ§ÙÙØ¬Ù",value:"773 186"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:89",label:"اÙÙØ¦Ø©",value:"
42390.3 kW"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:90",label:"Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù
",value:"Ù
ØØ±Ù / Ù
ÙÙØ¯ DC"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:94",title:"Ù
ØØ±Ù ØªÙØ§Ø²Ù (Shunt Motor)",icon:"â¡",accent:"orange",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:95",label:"اÙÙØ¯Ø±Ø©",value:"0.3 kW"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:96",label:"Ø§ÙØ¬Ùد",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:97",label:"Ø§ÙØªÙار",value:"1.8 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:98",label:"Ø¬ÙØ¯ Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:99",label:"ØªÙØ§Ø± Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"0.26 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:100",label:"Ø§ÙØ³Ø±Ø¹Ø©",value:"2000 rpm"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:104",title:"Ù
ÙÙØ¯ ØªÙØ§Ø²Ù (Shunt Generator)",icon:"â¡",accent:"green",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:105",label:"اÙÙØ¯Ø±Ø©",value:"0.22 kW"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:106",label:"Ø§ÙØ¬Ùد",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:107",label:"Ø§ÙØªÙار",value:"1 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:108",label:"Ø¬ÙØ¯ Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:109",label:"ØªÙØ§Ø± Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"0.26 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:110",label:"Ø§ÙØ³Ø±Ø¹Ø©",value:"2500 rpm"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:114",title:"Ù
ØØ±Ù ØªÙØ§ÙÙ (Series Motor)",icon:"â¡",accent:"orange",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:115",label:"اÙÙØ¯Ø±Ø©",value:"0.3 kW"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:116",label:"Ø§ÙØ¬Ùد",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:117",label:"Ø§ÙØªÙار",value:"1.74 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:118",label:"Ø§ÙØ³Ø±Ø¹Ø©",value:"2050 rpm"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:122",title:"Ù
ØØ±Ù Ù
Ø±ÙØ¨ (Compound Motor)",icon:"â¡",accent:"orange",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:123",label:"اÙÙØ¯Ø±Ø©",value:"0.3 kW"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:124",label:"Ø§ÙØ¬Ùد",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:125",label:"Ø§ÙØªÙار",value:"1.83 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:126",label:"Ø¬ÙØ¯ Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:127",label:"ØªÙØ§Ø± Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"0.26 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:128",label:"Ø§ÙØ³Ø±Ø¹Ø©",value:"1645 rpm"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:132",title:"Ù
ÙÙØ¯ Ù
Ø±ÙØ¨ (Compound Generator)",icon:"â¡",accent:"green",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:133",label:"اÙÙØ¯Ø±Ø©",value:"0.22 kW"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:134",label:"Ø§ÙØ¬Ùد",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:135",label:"Ø§ÙØªÙار",value:"1 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:136",label:"Ø¬ÙØ¯ Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"220 V"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:137",label:"ØªÙØ§Ø± Ø§ÙØ¥Ø«Ø§Ø±Ø©",value:"0.26 A"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:138",label:"Ø§ÙØ³Ø±Ø¹Ø©",value:"2400 rpm"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:142",title:"Ø§ÙØ¨ÙØ§ÙØ§Øª اÙÙ
ÙÙØ§ÙÙÙÙØ©",icon:"ð§",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:143",label:"ÙÙØ¹ Ø§ÙØ¨Ùاء",value:"B3"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:144",label:"ÙÙØ§ÙØ© اÙÙ
ØÙر",value:"1"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:145",label:"اÙÙØ§Ø¹Ø¯Ø©",value:"Ø£ÙÙ
ÙÙÙÙ
"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:146",label:"ØµÙØ¯ÙÙ Ø§ÙØªÙصÙÙ",value:"عÙÙÙ"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:147",label:"ÙØ¦Ø© Ø§ÙØØ±Ø§Ø±Ø©",value:"B (120°C)"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:148",label:"درجة Ø§ÙØÙ
Ø§ÙØ©",value:"IP20"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:152",title:"Ø£Ø·Ø±Ø§Ù Ø§ÙØªÙصÙÙ",icon:"ð",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:153",label:"A1 - A2",value:"Ù
ÙÙØ§Øª اÙÙ
ÙØªØ¬ (Armature)"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:154",label:"D1 - D2 - D3",value:"Ù
ÙÙØ§Øª Ø§ÙØªÙاÙÙ (Series)"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:155",label:"F1 - F2",value:"Ù
ÙÙØ§Øª Ø§ÙØªÙاز٠(Shunt)"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:156",label:"Ø£ØÙ
ر",value:"ØÙ
Ø§ÙØ© ØØ±Ø§Ø±ÙØ©"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:157",label:"Ø£ØµÙØ±/أخضر",value:"ØªØ£Ø±ÙØ¶ â"})]}),y.jsxs(ia,{"data-loc":"client/src/components/SpecsPanel.tsx:161",title:"Ø§ÙØÙ
Ø§ÙØ© ÙØ§ÙØ£Ù
اÙ",icon:"ð¡ï¸",children:[y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:162",label:"Ø§ÙØÙ
Ø§ÙØ© Ø§ÙØØ±Ø§Ø±ÙØ©",value:"Ù
ÙØªØ§Ø Ø«ÙØ§Ø¦Ù اÙÙ
عدÙ"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:163",label:"درجة اÙÙØµÙ",value:"110°C NC"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:164",label:"Ø£Ø·Ø±Ø§Ù Ø§ÙØÙ
Ø§ÙØ©",value:"Ø£ØÙ
ر (2 طرÙ)"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:165",label:"Ø§ÙØªØ£Ø±Ùض",value:"Ø·Ø±Ù Ø£ØµÙØ±/أخضر"}),y.jsx(le,{"data-loc":"client/src/components/SpecsPanel.tsx:166",label:"Ø¹ÙØ§Ù
Ø© CE",value:"Ù
ØªÙØ§ÙÙ â"})]})]}),y.jsx("div",{"data-loc":"client/src/components/SpecsPanel.tsx:171",className:"mt-4 pt-3 border-t border-[#00d4ff]/15",children:y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:172",className:"flex flex-col sm:flex-row items-center justify-between gap-3",children:[y.jsxs("a",{"data-loc":"client/src/components/SpecsPanel.tsx:174",href:fA,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 rounded bg-[#00d4ff]/10 border border-[#00d4ff]/25 text-[#00d4ff] hover:bg-[#00d4ff]/20 transition-all duration-200 text-xs",children:[y.jsx(lN,{"data-loc":"client/src/components/SpecsPanel.tsx:180",size:14}),"Ù
عÙ
Ù Ø¢ÙØ§Øª Ø§ÙØªÙار اÙÙ
ستÙ
ر Ø§ÙØ°ÙÙ"]}),y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:185",className:"text-center sm:text-left",children:[y.jsxs("p",{"data-loc":"client/src/components/SpecsPanel.tsx:186",className:"text-[10px] text-[#00d4ff]/40",children:["ÙÙØ±Ø© ÙØªØµÙ
ÙÙ
: ",y.jsx("span",{"data-loc":"client/src/components/SpecsPanel.tsx:187",className:"text-[#00d4ff]/60 font-semibold",children:"اÙÙ
درب ÙÙØ¯ Ø±ÙØ§Ø¹Ù"})]}),y.jsx("p",{"data-loc":"client/src/components/SpecsPanel.tsx:189",className:"text-[9px] text-[#00d4ff]/25 font-mono",dir:"ltr",children:"[email protected]"})]}),y.jsxs("button",{"data-loc":"client/src/components/SpecsPanel.tsx:193",onClick:GM,className:"flex items-center gap-2 px-4 py-2 rounded bg-[#25D366]/15 border border-[#25D366]/30 text-[#25D366] hover:bg-[#25D366]/25 transition-all duration-200 text-xs font-medium",children:[y.jsx("svg",{"data-loc":"client/src/components/SpecsPanel.tsx:197",width:"14",height:"14",viewBox:"0 0 24 24",fill:"
4239currentColor",children:y.jsx("path",{"data-loc":"client/src/components/SpecsPanel.tsx:198",d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),"Ù
Ø´Ø§Ø±ÙØ© اÙÙ
ÙØ§ØµÙات"]})]})})]})})]})})}function ia({title:n,icon:t,accent:e,children:s}){const r=e==="orange"?"border-orange-400/20":e==="green"?"border-green-400/20":"border-[#00d4ff]/15",l=e==="orange"?"text-orange-300":e==="green"?"text-green-300":"text-[#00d4ff]";return y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:217",className:`bg-[#0a0a0f]/60 border ${r} rounded-lg p-3`,children:[y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:218",className:"flex items-center gap-2 mb-2.5",children:[y.jsx("span",{"data-loc":"client/src/components/SpecsPanel.tsx:219",className:"text-sm",children:t}),y.jsx("h4",{"data-loc":"client/src/components/SpecsPanel.tsx:220",className:`text-xs font-bold ${l}`,children:n})]}),y.jsx("div",{"data-loc":"client/src/components/SpecsPanel.tsx:222",className:"space-y-0.5",children:s})]})}function le({label:n,value:t}){return y.jsxs("div",{"data-loc":"client/src/components/SpecsPanel.tsx:229",className:"flex justify-between items-center py-0.5",children:[y.jsx("span",{"data-loc":"client/src/components/SpecsPanel.tsx:230",className:"text-[10px] text-gray-400",children:n}),y.jsx("span",{"data-loc":"client/src/components/SpecsPanel.tsx:231",className:"text-[10px] text-white font-mono",dir:"ltr",children:t})]})}const M6=[{id:"stator_yoke",nameAr:"ÙÙØ¨ اÙÙ
Ø¬Ø§Ù Ø§ÙØØ¯ÙØ¯Ù",x:55,y:20},{id:"field_windings",nameAr:"Ù
ÙÙØ§Øª اÙÙ
جاÙ",x:55,y:68},{id:"armature",nameAr:"اÙÙ
ÙØªØ¬ (Ø¹Ø¶Ù Ø§ÙØ¥Ùتاج)",x:50,y:42},{id:"commutator",nameAr:"اÙÙ
ÙØØ¯ (اÙÙ
بدÙ)",x:25,y:52},{id:"brushes",nameAr:"اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ©",x:27,y:40},{id:"bearings",nameAr:"Ø§ÙØ¨ÙرÙÙ (اÙÙ
ØØ§Ù
Ù)",x:78,y:42},{id:"terminal_panel",nameAr:"ÙÙØØ© Ø§ÙØªÙصÙÙ",x:60,y:8}],E6="https://private-us-east-1.manuscdn.com/sessionFile/rKa78zyPphhV8bfc9c61Nk/sandbox/N8UBJe42SYZtWd39ly4bMs-img-3_1770538868000_na1fn_ZGNfbWFjaGluZV9hc3NlbWJsZWQ.png?x-oss-process=image/resize,w_1920,h_1920/format,webp/quality,q_80&Expires=1798761600&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wcml2YXRlLXVzLWVhc3QtMS5tYW51c2Nkbi5jb20vc2Vzc2lvbkZpbGUvckthNzh6eVBwaGhWOGJmYzljNjFOay9zYW5kYm94L044VUJKZTQyU1ladFdkMzlseTRiTXMtaW1nLTNfMTc3MDUzODg2ODAwMF9uYTFmbl9aR05mYldGamFHbHVaVjloYzNObGJXSnNaV1EucG5nP3gtb3NzLXByb2Nlc3M9aW1hZ2UvcmVzaXplLHdfMTkyMCxoXzE5MjAvZm9ybWF0LHdlYnAvcXVhbGl0eSxxXzgwIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzk4NzYxNjAwfX19XX0_&Key-Pair-Id=K2HSFNDJXOU9YS&Signature=o557tOn7Q4LtGOZSu6jtVqgG07MMRRb7FjSrTXXTVO~CYQ3uiDxFlTHJYfJGb71qOkozNqVdXDNnmx9Tn4gEqJo1hRx8szp7B7UBFu7-t3dR~qMGm0y0TOxP4YCDRGXugGkfIz5sqDYbWD-L9hzQav2OQIw66FyydIOyPsDQl9VK~O~CBxMUJS-45NLqnyoPBLJ4KaACVyhRHipTAWNdrT3NmMAocXIDy7MvjXb2LkiAroDs-Jc3rhMdZ25sf0Om4wwUWpGycQd4Uqw6zyzGED7UxiQvhL8e~y7ZO64eN3FRaypKRXqHnWbvVHpL8340v8I~dSZ7CLNtSFa6uEqJZg__";function T6({visible:n,selectedComponent:t,onComponentSelect:e}){const s=G.useRef(null),[r,l]=G.useState(!1);return n?y.jsxs("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:112",className:"absolute inset-0 z-10 flex items-center justify-center bg-[#0a0a0f]",children:[y.jsxs("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:114",ref:s,className:"relative w-full h-full flex items-center justify-center",style:{maxWidth:"100vw",maxHeight:"100dvh"},children:[y.jsxs("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:120",className:"relative",style:{width:"fit-content",height:"fit-content"},children:[y.jsx("img",{"data-loc":"client/src/components/InteractiveHotspots.tsx:121",src:E6,alt:"Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر - اÙÙ
ÙØ·Ø¹ Ø§ÙØ¹Ø±Ø¶Ù",className:"max-w-[92vw] max-h-[78dvh] object-contain select-none",draggable:!1,onLoad:()=>l(!0),style:{filter:"drop-shadow(0 0 30px rgba(0, 212, 255, 0.08))"}}),r&&y.jsx("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:134",className:"absolute inset-0",children:M6.map(u=>{const f=t===u.id;return y.jsxs("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:138",className:"absolute",style:{left:`${u.x}%`,top:`${u.y}%`,transform:"translate(-50%, -50%)",zIndex:f?30:20},children:[y.jsxs("button",{"data-loc":"client/src/components/InteractiveHotspots.tsx:149",onClick:h=>{h.stopPropagation(),e(f?null:u.id)},className:"relative group cursor-pointer","aria-label":u.nameAr,style:{touchAction:"manipulation"},children:[y.jsx("span",{"data-loc":"client/src/components/InteractiveHotspots.tsx:159",className:`absolute rounded-full ${f?"bg-[#00d4ff]/30":"bg-green-400/20"}`,style:{width:"24px",height:"24px",top:"-6px",left:"-6px",animation:"hotspotPulse 2.5s ease-in-out infinite"}}),y.jsx("span",{"data-loc":"client/src/components/InteractiveHotspots.tsx:173",className:`absolute rounded-full border ${f?"border-[#00d4ff]/50":"border-green-400/30"}`,style:{width:"18px",height:"18px",top:"-3px",left:"-3px"}}),y.jsx("span",{"data-loc":"client/src/components/InteractiveHotspots.tsx:188",className:`relative block rounded-full border-2 transition-all duration-300 ${f?"w-3 h-3 bg-[#00d4ff] border-white shadow-[0_0_12px_rgba(0,212,255,0.8)]":"w-3 h-3 bg-green-400 border-white/80 shadow-[0_0_8px_rgba(74,222,128,0.6)] group-hover:bg-green-300 group-hover:shadow-[0_0_14px_rgba(74,222,128,0.8)]"}`})]}),y.jsx(Al,{"data-loc":"client/src/components/InteractiveHotspots.tsx:198",children:f&&y.jsx(an.div,{"data-loc":"client/src/components/InteractiveHotspots.tsx:200",initial:{opacity:0,y:4,scale:.9}
4239,animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,scale:.9},transition:{duration:.2},className:"absolute top-full mt-2 left-1/2 -translate-x-1/2 whitespace-nowrap z-30",children:y.jsxs("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:207",className:"bg-[#0a0a0f]/95 backdrop-blur-md border border-[#00d4ff]/50 rounded-md px-3 py-1.5 shadow-lg shadow-[#00d4ff]/10",children:[y.jsx("span",{"data-loc":"client/src/components/InteractiveHotspots.tsx:208",className:"text-[11px] text-[#00d4ff] font-semibold",children:u.nameAr}),y.jsx("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:212",className:"absolute -top-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-[#0a0a0f]/95 border-t border-l border-[#00d4ff]/50 rotate-45"})]})})})]},u.id)})})]}),!r&&y.jsx("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:226",className:"absolute inset-0 flex items-center justify-center",children:y.jsxs("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:227",className:"text-center",children:[y.jsxs("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:228",className:"relative w-16 h-16 mx-auto mb-3",children:[y.jsx("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:229",className:"absolute inset-0 border-2 border-[#00d4ff]/20 rounded-full"}),y.jsx("div",{"data-loc":"client/src/components/InteractiveHotspots.tsx:230",className:"absolute inset-0 border-2 border-[#00d4ff] rounded-full animate-spin",style:{borderTopColor:"transparent",borderRightColor:"transparent",animationDuration:"1.5s"}})]}),y.jsx("p",{"data-loc":"client/src/components/InteractiveHotspots.tsx:239",className:"text-[#00d4ff]/50 text-sm",children:"جار٠تØÙ ÙÙ Ø§ÙØµÙرة..."})]})})]}),y.jsx("style",{"data-loc":"client/src/components/InteractiveHotspots.tsx:246",children:` 4240 @keyframes hotspotPulse { 4241 0%, 100% { 4242 transform: scale(1); 4243 opacity: 0.5; 4244 } 4245 50% { 4246 transform: scale(2); 4247 opacity: 0; 4248 } 4249 } 4250 `})]}):null}const as=[{id:1,question:"٠ا ÙÙ ÙØ¸ÙÙØ© ÙÙØ¨ اÙÙ Ø¬Ø§Ù Ø§ÙØØ¯ÙØ¯Ù ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙ٠ست٠رØ",options:["تÙÙÙØ¯ Ø§ÙØªÙار اÙÙÙØ±Ø¨Ø§Ø¦Ù","تÙÙÙØ± ٠سار ÙÙØªØ¯Ù٠اÙÙ ØºÙØ§Ø·ÙسÙ","Ø¹ÙØ³ Ø§ØªØ¬Ø§Ù Ø§ÙØªÙار","تÙÙÙÙ Ø§ÙØ§ØØªÙاÙ"],correctAnswer:1,explanation:"ÙÙØ¨ اÙÙ Ø¬Ø§Ù Ø§ÙØØ¯ÙØ¯Ù Ù٠اÙÙÙÙÙ Ø§ÙØ®Ø§Ø±Ø¬Ù اÙ٠صÙÙØ¹ Ù Ù Ø§ÙØØ¯ÙØ¯ اÙÙ ØµØ¨ÙØ¨Ø ÙÙØ¸ÙÙØªÙ Ø§ÙØ£Ø³Ø§Ø³ÙØ© Ù٠تÙÙÙØ± ٠سار Ù ÙØ®Ùض اÙÙ ÙØ§ÙÙ Ø© ÙÙØªØ¯Ù٠اÙÙ ØºÙØ§Ø·ÙسÙ."},{id:2,question:"Ù٠عدد Ù ÙÙØ§Øª اÙ٠جا٠ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙ٠ست٠ر ذات اÙÙØ·Ø¨ÙÙØ",options:["Ù ÙÙ ÙØ§ØØ¯","Ù ÙÙØ§Ù (2)","أربعة Ù ÙÙØ§Øª (4)","ستة Ù ÙÙØ§Øª (6)"],correctAnswer:1,explanation:"ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙ٠ست٠ر ذات اÙÙØ·Ø¨ÙÙ (2-pole)Ø ÙÙØ¬Ø¯ Ù ÙÙØ§Ù ÙÙØ· Ù Ù Ù ÙÙØ§Øª اÙ٠جا٠- ÙØ§ØØ¯ ÙÙÙ ÙØ·Ø¨ Ù ØºÙØ§Ø·ÙسÙ."},{id:3,question:"٠ا Ù٠اÙ٠ادة اÙ٠ستخد٠ة ÙÙ ØµÙØ§Ø¹Ø© اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ©Ø",o
4250ptions:["اÙÙØØ§Ø³","Ø§ÙØ£ÙÙÙ
ÙÙÙÙ
","اÙÙØ±Ø¨ÙÙ","Ø§ÙØØ¯ÙØ¯"],correctAnswer:2,explanation:"اÙÙØ±Ø´ Ù
صÙÙØ¹Ø© Ù
٠اÙÙØ±Ø¨ÙÙ ÙØ£ÙÙ Ù
ÙØµÙ Ø¬ÙØ¯ ÙÙÙÙØ±Ø¨Ø§Ø¡Ø ÙÙØ¯ÙÙ Ù
عاÙ
Ù Ø§ØØªÙا٠Ù
ÙØ®ÙØ¶Ø ÙÙØ§ ÙØªÙÙ Ø³Ø·Ø Ø§ÙÙ
ÙØØ¯ اÙÙØØ§Ø³Ù."},{id:4,question:"Ù
ا ÙÙ ÙØ¸ÙÙØ© اÙÙ
ÙØØ¯ (اÙÙ
بدÙ) ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
رØ",options:["Ø²ÙØ§Ø¯Ø© Ø§ÙØ¬Ùد اÙÙÙØ±Ø¨Ø§Ø¦Ù","تØÙÙÙ Ø§ÙØªÙار اÙÙ
تردد Ø¥ÙÙ ØªÙØ§Ø± Ù
ستÙ
ر","تÙÙÙÙ Ø§ÙØ³Ø±Ø¹Ø©","تÙÙÙØ¯ اÙÙ
جا٠اÙÙ
ØºÙØ§Ø·ÙسÙ"],correctAnswer:1,explanation:"اÙÙ
ÙØØ¯ (Commutator) ÙØ¹Ù
٠عÙ٠تØÙÙÙ Ø§ÙØªÙار اÙÙ
تردد اÙÙ
تÙÙØ¯ ÙÙ Ù
ÙÙØ§Øª اÙÙ
ÙØªØ¬ Ø¥ÙÙ ØªÙØ§Ø± Ù
ستÙ
ر Ø¹ÙØ¯ Ø§ÙØ£Ø·Ø±Ø§Ù Ø§ÙØ®Ø§Ø±Ø¬ÙØ©."},{id:5,question:"ÙÙ
اذا ÙÙØµÙع ÙÙØ¨ اÙÙ
ÙØªØ¬ Ù
Ù ØµÙØ§Ø¦Ø ØØ¯ÙØ¯ÙØ© رÙÙÙØ© Ù
عزÙÙØ©Ø",options:["ÙØªÙÙÙ٠اÙÙØ²Ù","ÙØªÙÙÙÙ ØªÙØ§Ø±Ø§Øª Ø§ÙØ¯ÙاÙ
Ø© (Eddy Currents)","ÙØ²Ùادة اÙÙ
ÙØ§ÙÙ
Ø© اÙÙÙØ±Ø¨Ø§Ø¦ÙØ©","ÙØªØ³ÙÙÙ Ø§ÙØªØµÙÙØ¹"],correctAnswer:1,explanation:"Ø§ÙØªØµÙÙØ (Lamination) ÙÙÙÙ Ù
Ù ØªÙØ§Ø±Ø§Øª Ø§ÙØ¯ÙاÙ
Ø© Ø§ÙØªÙ تسبب ÙÙØ¯ Ø§ÙØ·Ø§ÙØ© عÙÙ Ø´ÙÙ ØØ±Ø§Ø±Ø©Ø Ù
Ù
ا ÙØØ³Ù ÙÙØ§Ø¡Ø© Ø§ÙØ¢ÙØ©."},{id:6,question:"Ù
ا ÙÙ ÙÙØ¹ اÙÙ
ØØ§Ù
٠اÙÙ
ستخدÙ
Ø© ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
رØ",options:["Ù
ØØ§Ù
Ù Ø§ÙØ²ÙاÙÙØ© (Sleeve Bearings)","Ù
ØØ§Ù
Ù ÙØ±ÙÙØ© (Ball Bearings)","Ù
ØØ§Ù
Ù Ø£Ø³Ø·ÙØ§ÙÙØ© (Roller Bearings)","Ù
ØØ§Ù
Ù Ù
ØºÙØ§Ø·ÙØ³ÙØ© (Magnetic Bearings)"],correctAnswer:1,explanation:"ØªÙØ³ØªØ®Ø¯Ù
اÙÙ
ØØ§Ù
٠اÙÙØ±ÙÙØ© (Deep Groove Ball Bearings) ÙØ£ÙÙØ§ تتØÙ
Ù Ø§ÙØ£ØÙ
Ø§Ù Ø§ÙØ´Ø¹Ø§Ø¹ÙØ© ÙØ§ÙÙ
ØÙØ±ÙØ©Ø ÙØªÙÙÙ Ø§ÙØ§ØØªÙا٠بشÙÙ ÙØ¹Ø§Ù."},{id:7,question:"Ù
ا Ù٠اÙÙ
ادة Ø§ÙØ¹Ø§Ø²ÙØ© اÙÙ
ستخدÙ
Ø© بÙÙ Ø´Ø±Ø§Ø¦Ø Ø§ÙÙ
ÙØØ¯Ø",options:["Ø§ÙØ¨ÙاستÙÙ","اÙÙ
طاط","اÙÙ
ÙÙØ§ (Mica)","اÙÙØ±Ù اÙÙ
ÙÙÙ"],correctAnswer:2,explanation:"اÙÙ
ÙÙØ§ (Mica) Ù
ادة Ø¹Ø§Ø²ÙØ© Ù
Ù
تازة تتØÙ
٠درجات Ø§ÙØØ±Ø§Ø±Ø© Ø§ÙØ¹Ø§ÙÙØ© ÙØ§ÙØ§ØØªÙØ§ÙØ ÙØªÙستخدÙ
ÙØ¹Ø²Ù Ø´Ø±Ø§Ø¦Ø Ø§ÙÙ
ÙØØ¯ Ø¹Ù Ø¨Ø¹Ø¶ÙØ§."},{id:8,question:"Ù
ا ÙÙ ÙØ¸ÙÙØ© ÙÙØØ© Ø§ÙØªÙصÙÙ (Terminal Panel)Ø",options:["ØªØ¨Ø±ÙØ¯ Ø§ÙØ¢ÙØ©","ØªÙØµÙÙ Ø§ÙØ¢ÙØ© بÙ
صدر Ø§ÙØ·Ø§ÙØ© بأÙÙ
اط Ù
ختÙÙØ©","ÙÙØ§Ø³ Ø§ÙØ³Ø±Ø¹Ø©","ØÙ
Ø§ÙØ© Ø§ÙØ¢ÙØ© Ù
Ù Ø§ÙØªÙار Ø§ÙØ²Ø§Ø¦Ø¯"],correctAnswer:1,explanation:"ÙÙØØ© Ø§ÙØªÙصÙÙ ØªØØªÙ٠عÙ٠أطرا٠(A1-A2, D1-D2-D3, F1-F2) تسÙ
Ø Ø¨ØªÙØµÙÙ Ø§ÙØ¢ÙØ© بأÙÙ
اط Ù
ختÙÙØ©: ØªÙØ§ÙÙØ ØªÙØ§Ø²ÙØ Ø£Ù Ù
Ø±ÙØ¨."},{id:9,question:"Ø£Ù Ù
٠اÙÙ
ÙÙÙØ§Øª Ø§ÙØªØ§ÙÙØ© ÙÙØ¹ØªØ¨Ø± جزءا٠Ù
Ù Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ¯Ùار (Rotor)Ø",options:["ÙÙØ¨ اÙÙ
جاÙ","Ù
ÙÙØ§Øª اÙÙ
جاÙ","اÙÙ
ÙØªØ¬ (Armature)","ÙÙØØ© Ø§ÙØªÙصÙÙ"],correctAnswer:2,explanation:"اÙÙ
ÙØªØ¬ (Armature) ÙÙ Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ¯Ùار اÙÙ
Ø±ÙØ²Ù ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
Ø±Ø Ø¨ÙÙÙ
ا ÙÙØ¨ اÙÙ
جا٠ÙÙ
ÙÙØ§Øª اÙÙ
جا٠جزء Ù
Ù Ø§ÙØ¬Ø²Ø¡ Ø§ÙØ«Ø§Ø¨Øª (Stator)."},{id:10,question:"Ù
ا Ù٠اÙÙØ¸ÙÙØ© Ø§ÙØ£Ø³Ø§Ø³ÙØ© ÙÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ© ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
رØ",options:["تÙÙÙØ¯ اÙÙ
جا٠اÙÙ
ØºÙØ§Ø·ÙسÙ","ØªÙØµÙÙ Ø§ÙØªÙار اÙÙÙØ±Ø¨Ø§Ø¦Ù بÙ٠اÙÙ
ÙØØ¯ ÙØ§Ùدائرة Ø§ÙØ®Ø§Ø±Ø¬ÙØ©","ØªØ¨Ø±ÙØ¯ Ø§ÙØ¢ÙØ©","Ø¹Ø²Ù Ø§ÙØ£Ø¬Ø²Ø§Ø¡ Ø§ÙØ¯Ùارة"],correctAnswer:1,explanation:"اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ© تعÙ
Ù ÙÙ
ÙØµÙ ÙÙØ±Ø¨Ø§Ø¦Ù Ù
ØªØØ±Ù بÙ٠اÙÙ
ÙØØ¯ Ø§ÙØ¯Ùار ÙØ§Ùدائرة Ø§ÙØ®Ø§Ø±Ø¬ÙØ© Ø§ÙØ«Ø§Ø¨ØªØ©Ø Ù
ع Ø§ÙØÙØ§Ø¸ عÙ٠اتصا٠ÙÙØ±Ø¨Ø§Ø¦Ù Ù
ستÙ
ر."}];function A6({isOpen:n,onClose:t}){const[e,s]=G.useState(0),[r,l]=G.useState(null),[u,f]=G.useState(!1),[h,d]=G.useState(0),[g,m]=G.useState([]),[v,_]=G.useState(!1),M=as[e],T=r===M.correctAnswer,S=P=>{r===null&&(l(P),f(!0),P===M.correctAnswer&&d(h+1),m([...g,M.id]))},b=()=>{e<as.length-1?(s(e+1),l(null),f(!1)):_(!0)},R=()=>{s(0),l(null),f(!1),d(0),m([]),_(!1)},C=()=>{R(),t()};return n?y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:197",className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",role:"dialog","aria-modal":"true",children:[y.jsx(an.div,{"data-loc":"client/src/components/QuizDialog.tsx:199",initial:{opacity:0}
4250,animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:C}),y.jsxs(an.div,{"data-loc":"client/src/components/QuizDialog.tsx:208",initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:"relative w-full max-w-2xl max-h-[85vh] overflow-y-auto bg-[#0a0a0f] border border-[#00d4ff]/30 rounded-lg shadow-2xl shadow-[#00d4ff]/20",children:[y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:215",className:"sticky top-0 bg-[#0a0a0f] border-b border-[#00d4ff]/20 p-4 flex items-center justify-between",children:[y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:216",children:[y.jsx("h2",{"data-loc":"client/src/components/QuizDialog.tsx:217",className:"text-xl font-bold text-white",children:"اختبر Ù
عÙÙÙ
اتÙ"}),y.jsx("p",{"data-loc":"client/src/components/QuizDialog.tsx:218",className:"text-sm text-[#00d4ff]/60 mt-1",children:v?"Ø§ÙØªÙ
Ù Ø§ÙØ§Ø®ØªØ¨Ø§Ø±!":`Ø§ÙØ³Ø¤Ø§Ù ${e+1} Ù
Ù ${as.length}`})]}),y.jsx("button",{"data-loc":"client/src/components/QuizDialog.tsx:225",onClick:C,className:"p-2 hover:bg-[#00d4ff]/10 rounded-full transition-colors",children:y.jsx(kE,{"data-loc":"client/src/components/QuizDialog.tsx:229",size:20,className:"text-[#00d4ff]/60"})})]}),y.jsx("div",{"data-loc":"client/src/components/QuizDialog.tsx:234",className:"p-6",children:v?y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:338",className:"text-center py-8",children:[y.jsx(an.div,{"data-loc":"client/src/components/QuizDialog.tsx:339",initial:{scale:0},animate:{scale:1},transition:{type:"spring",duration:.5},children:y.jsx(mN,{"data-loc":"client/src/components/QuizDialog.tsx:344",size:64,className:"text-[#00d4ff] mx-auto mb-4"})}),y.jsx("h3",{"data-loc":"client/src/components/QuizDialog.tsx:347",className:"text-2xl font-bold text-white mb-2",children:h===as.length?"Ù
Ù
تاز! ð":h>=as.length*.7?"Ø£ØØ³Ùت! ð":h>=as.length*.5?"Ø¬ÙØ¯! ð":"ØØ§ÙÙ Ù
رة أخر٠ðª"}),y.jsxs("p",{"data-loc":"client/src/components/QuizDialog.tsx:357",className:"text-[#00d4ff]/80 mb-6",children:["ÙÙØ¯ أجبت بشÙ٠صØÙØ Ø¹ÙÙ ",y.jsx("span",{"data-loc":"client/src/components/QuizDialog.tsx:358",className:"font-bold text-[#00d4ff]",children:h})," Ù
Ù"," ",y.jsx("span",{"data-loc":"client/src/components/QuizDialog.tsx:359",className:"font-bold",children:as.length})," سؤاÙ"]}),y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:362",className:"mb-6",children:[y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:363",className:"text-5xl font-bold text-[#00d4ff] mb-2",children:[Math.round(h/as.length*100),"%"]}),y.jsx("p",{"data-loc":"client/src/components/QuizDialog.tsx:366",className:"text-gray-400 text-sm",children:"اÙÙØ³Ø¨Ø© اÙÙ
ئÙÙØ©"})]}),y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:369",className:"flex gap-3",children:[y.jsxs("button",{"data-loc":"client/src/components/QuizDialog.tsx:370",onClick:R,className:"flex-1 py-3 bg-[#00d4ff]/10 hover:bg-[#00d4ff]/20 text-[#00d4ff] font-semibold rounded-lg transition-colors flex items-center justify-center gap-2",children:[y.jsx(Qg,{"data-loc":"client/src/components/QuizDialog.tsx:374",size:18}),"إعادة اÙÙ
ØØ§ÙÙØ©"]}),y.jsx("button",{"data-loc":"client/src/components/QuizDialog.tsx:377",onClick:C,className:"flex-1 py-3 bg-[#00d4ff] hover:bg-[#00d4ff]/90 text-black font-semibold rounded-lg transition-colors",children:"Ø¥ØºÙØ§Ù"})]})]}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:238",className:"mb-6",children:[y.jsx("h3",{"data-loc":"client/src/components/QuizDialog.tsx:239",className:"text-lg font-semibold text-white mb-4",children:M.question}),y.jsx("div",{"data-loc":"client/src/components/QuizDialog.tsx:244",className:"space-y-3",children:M.options.map((P,U)=>{const F=r===U,L=U===M.correctAnswer,z=u&&L,w=u&&F&&!T;return y.jsx("button",{"data-loc":"client/src/components/QuizDialog.tsx:252",onClick:()=>S(U),disabled:r!==null,className:`w-full text-right p-4 rounded-lg border-2 transition-all ${z?"border-green-500 bg-green-500/10":w?"border-red-500 bg-red-500/10":F?"border-[#00d4ff] bg-[#00d4ff]/10":"border-[#00d4ff]/20 hover:border-[#00d4ff]/40 hover:bg-[#00d4ff]/5"}
4250 ${r!==null?"cursor-not-allowed":"cursor-pointer"}`,children:y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:266",className:"flex items-center justify-between",children:[y.jsx("span",{"data-loc":"client/src/components/QuizDialog.tsx:267",className:"text-white",children:P}),z&&y.jsx(lb,{"data-loc":"client/src/components/QuizDialog.tsx:268",size:20,className:"text-green-500"}),w&&y.jsx(cb,{"data-loc":"client/src/components/QuizDialog.tsx:269",size:20,className:"text-red-500"})]})},U)})})]}),y.jsx(Al,{"data-loc":"client/src/components/QuizDialog.tsx:278",children:u&&y.jsx(an.div,{"data-loc":"client/src/components/QuizDialog.tsx:280",initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:`mb-6 p-4 rounded-lg border ${T?"border-green-500/30 bg-green-500/5":"border-red-500/30 bg-red-500/5"}`,children:y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:290",className:"flex items-start gap-3",children:[T?y.jsx(lb,{"data-loc":"client/src/components/QuizDialog.tsx:292",size:24,className:"text-green-500 flex-shrink-0 mt-0.5"}):y.jsx(cb,{"data-loc":"client/src/components/QuizDialog.tsx:294",size:24,className:"text-red-500 flex-shrink-0 mt-0.5"}),y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:296",children:[y.jsx("p",{"data-loc":"client/src/components/QuizDialog.tsx:297",className:`font-semibold mb-2 ${T?"text-green-400":"text-red-400"}`,children:T?"إجابة صØÙØØ©! ð":"إجابة خاطئة"}),y.jsx("p",{"data-loc":"client/src/components/QuizDialog.tsx:300",className:"text-gray-300 text-sm leading-relaxed",children:M.explanation})]})]})})}),u&&y.jsx(an.button,{"data-loc":"client/src/components/QuizDialog.tsx:311",initial:{opacity:0,y:10},animate:{opacity:1,y:0},onClick:b,className:"w-full py-3 bg-[#00d4ff] hover:bg-[#00d4ff]/90 text-black font-semibold rounded-lg transition-colors",children:e<as.length-1?"Ø§ÙØ³Ø¤Ø§Ù Ø§ÙØªØ§ÙÙ":"عرض اÙÙØªÙجة"}),y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:322",className:"mt-6",children:[y.jsxs("div",{"data-loc":"client/src/components/QuizDialog.tsx:323",className:"flex justify-between text-xs text-[#00d4ff]/60 mb-2",children:[y.jsx("span",{"data-loc":"client/src/components/QuizDialog.tsx:324",children:"Ø§ÙØªÙدÙ
"}),y.jsxs("span",{"data-loc":"client/src/components/QuizDialog.tsx:325",children:[Math.round((e+1)/as.length*100),"%"]})]}),y.jsx("div",{"data-loc":"client/src/components/QuizDialog.tsx:327",className:"w-full h-2 bg-[#00d4ff]/10 rounded-full overflow-hidden",children:y.jsx(an.div,{"data-loc":"client/src/components/QuizDialog.tsx:328",initial:{width:0},animate:{width:`${(e+1)/as.length*100}%`},className:"h-full bg-[#00d4ff]"})})]})]})})]})]}):null}function w6({onComplete:n}){const[t,e]=G.useState(!1);return y.jsxs(an.div,{"data-loc":"client/src/components/SplashScreen.tsx:19",initial:{opacity:0}
4250,animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"fixed inset-0 z-[9999] bg-gradient-to-br from-[#0a0a0f] via-[#0f1419] to-[#0a0a0f] flex items-center justify-center",children:[y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:28",className:"absolute inset-0 opacity-5",children:y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:29",className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(0, 212, 255, 0.15) 1px, transparent 0)",backgroundSize:"40px 40px"}})}),y.jsxs("div",{"data-loc":"client/src/components/SplashScreen.tsx:36",className:"relative max-w-6xl w-full px-4 md:px-6 flex flex-col items-center justify-center gap-4 md:gap-6 min-h-screen",children:[y.jsxs(an.div,{"data-loc":"client/src/components/SplashScreen.tsx:38",initial:{scale:.8,y:30,opacity:0},animate:{scale:t?1:.8,y:t?0:30,opacity:t?1:0},transition:{duration:.8,ease:[.16,1,.3,1],delay:.2},className:"relative w-full max-w-md md:max-w-lg lg:max-w-xl",children:[y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:53",className:"absolute inset-0 bg-gradient-to-t from-[#00d4ff]/20 via-transparent to-transparent blur-3xl transform translate-y-8"}),y.jsxs("div",{"data-loc":"client/src/components/SplashScreen.tsx:56",className:"relative rounded-2xl overflow-hidden border-2 border-[#00d4ff]/30 shadow-2xl shadow-[#00d4ff]/20",children:[y.jsx("img",{"data-loc":"client/src/components/SplashScreen.tsx:57",src:"https://files.manuscdn.com/user_upload_by_module/session_file/114878380/eDdgorAjaacaAEkU.jpg",alt:"اÙÙ
درب ÙÙØ¯ Ø±ÙØ§Ø¹Ù - Ù
عÙ
Ù Ø¢ÙØ§Øª Ø§ÙØªÙار اÙÙ
ستÙ
ر",className:"w-full h-auto object-cover max-h-[50vh] md:max-h-[55vh] lg:max-h-[60vh]",onLoad:()=>e(!0)}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:65",className:"absolute inset-0 bg-gradient-to-t from-[#0a0a0f]/60 via-trans
4250parent to-transparent pointer-events-none"})]}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:69",className:"absolute -top-2 -left-2 w-8 h-8 border-t-2 border-l-2 border-[#00d4ff]/50"}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:70",className:"absolute -top-2 -right-2 w-8 h-8 border-t-2 border-r-2 border-[#00d4ff]/50"}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:71",className:"absolute -bottom-2 -left-2 w-8 h-8 border-b-2 border-l-2 border-[#00d4ff]/50"}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:72",className:"absolute -bottom-2 -right-2 w-8 h-8 border-b-2 border-r-2 border-[#00d4ff]/50"})]}),y.jsx(an.div,{"data-loc":"client/src/components/SplashScreen.tsx:76",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.8,duration:.4},className:"w-full flex justify-center z-10",children:y.jsxs("button",{"data-loc":"client/src/components/SplashScreen.tsx:82",onClick:n,className:"group relative px-6 py-2.5 md:px-8 md:py-3 bg-gradient-to-r from-[#00d4ff] to-[#00ff88] rounded-lg font-bold text-sm md:text-base text-[#0a0a0f] shadow-xl shadow-[#00d4ff]/30 hover:shadow-[#00d4ff]/50 transition-all duration-300 hover:scale-105 active:scale-95",children:[y.jsx("span",{"data-loc":"client/src/components/SplashScreen.tsx:86",className:"relative z-10",children:"دخÙÙ ÙÙØªØ·Ø¨ÙÙ"}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:89",className:"absolute inset-0 rounded-lg bg-gradient-to-r from-[#00d4ff] to-[#00ff88] blur-lg opacity-50 group-hover:opacity-75 transition-opacity"}),y.jsx("svg",{"data-loc":"client/src/components/SplashScreen.tsx:92",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[#0a0a0f] group-hover:-translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{"data-loc":"client/src/components/SplashScreen.tsx:98",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})}),y.jsxs(an.div,{"data-loc":"client/src/components/SplashScreen.tsx:104",initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6,delay:.6},className:"text-center space-y-2 md:space-y-3 pb-4 z-10",children:[y.jsx("h1",{"data-loc":"client/src/components/SplashScreen.tsx:110",className:"text-xl md:text-2xl lg:text-3xl font-bold text-white",children:"Ù
عÙ
Ù Ø¢ÙØ§Øª Ø§ÙØªÙار اÙÙ
ستÙ
ر Ø§ÙØ°ÙÙ"}),y.jsx("p",{"data-loc":"client/src/components/SplashScreen.tsx:113",className:"text-sm md:text-base lg:text-lg text-[#00d4ff]/90 font-semibold",children:"ترÙÙØ¨ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر - اÙÙØ§Ùع اÙÙ
عزز"}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:116",className:"pt-3 border-t border-[#00d4ff]/20 mt-4",children:y.jsx("p",{"data-loc":"client/src/components/SplashScreen.tsx:117",className:"text-sm md:text-base text-gray-300 font-medium",children:"ÙÙØ±Ø© ÙØªØµÙ
ÙÙ
: اÙÙ
درب ÙÙØ¯ Ø±ÙØ§Ø¹Ù"})})]})]}),y.jsx("div",{"data-loc":"client/src/components/SplashScreen.tsx:127",className:"absolute inset-0 overflow-hidden pointer-events-none",children:[...Array(20)].map((s,r)=>y.jsx(an.div,{"data-loc":"client/src/components/SplashScreen.tsx:129",className:"absolute w-1 h-1 bg-[#00d4ff]/30 rounded-full",initial:{x:Math.random()*window.innerWidth,y:Math.random()*window.innerHeight,scale:Math.random()*.5+.5},animate:{y:[null,Math.random()*window.innerHeight],opacity:[0,1,0]},transition:{duration:Math.random()*3+2,repeat:1/0,delay:Math.random()*2}},r))})]})}function C6(){const[n,t]=G.useState(!0),[e,s]=G.useState("normal"),[r,l]=G.useState(null),[u,f]=G.useState(!0),[h,d]=G.useState(!1),[g,m]=G.useState(!1),[v,_]=G.useState(!1);G.useEffect(()=>{console.log("[Home] showQuiz changed to:",v)},[v]),G.useEffect(()=>{"xr"in navigator&&navigator.xr?.isSessionSupported?.("immersive-ar")?.then(C=>{d(C)}).catch(()=>{d(!1)})},[]);const M=G.useCallback(C=>{s(C),l(null),lm({normal:"Ø§ÙØ¹Ø±Ø¶ Ø§ÙØ¹Ø§Ø¯Ù - اضغط عÙ٠اÙÙÙØ§Ø· Ø§ÙØ®Ø¶Ø±Ø§Ø¡ ÙØ§Ø³ØªÙشا٠اÙÙ
ÙÙÙØ§Øª",exploded:"Ø§ÙØ¹Ø±Ø¶ اÙÙ
ÙÙØ¬Ø± - اÙÙ
ÙÙÙØ§Øª Ù
ÙÙØµÙØ©"}[C]||"",{duration:2500,style:{background:"rgba(10, 10, 15, 0.9)",border:"1px solid rgba(0, 212, 255, 0.3)",color:"#00d4ff",backdropFilter:"blur(8px)"}})},[]),T=G.useCallback(C=>{l(C)},[]),S=G.useCallback(()=>
4250{s("normal"),l(null),lm("تÙ
إعادة ضبط Ø§ÙØ¹Ø±Ø¶",{duration:1500,style:{background:"rgba(10, 10, 15, 0.9)",border:"1px solid rgba(0, 212, 255, 0.2)",color:"#00d4ff"}})},[]),b=G.useCallback(()=>{lm("جار٠تشغÙ٠اÙÙØ§Ùع اÙÙ
عزز...",{duration:3e3,style:{background:"rgba(10, 10, 15, 0.9)",border:"1px solid rgba(0, 212, 255, 0.3)",color:"#00d4ff"}})},[]),R=e==="normal";return y.jsxs(y.Fragment,{children:[y.jsx(Al,{"data-loc":"client/src/pages/Home.tsx:99",children:n&&y.jsx(w6,{"data-loc":"client/src/pages/Home.tsx:101",onComplete:()=>t(!1)})}),y.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:105",className:"h-[100dvh] w-screen overflow-hidden bg-[#0a0a0f] relative select-none",children:[y.jsx(h6,{"data-loc":"client/src/pages/Home.tsx:107",viewMode:e,selectedComponent:r,onComponentSelect:T,autoRotate:u}),y.jsx(T6,{"data-loc":"client/src/pages/Home.tsx:115",visible:R,selectedComponent:r,onComponentSelect:T}),y.jsx(m6,{"data-loc":"client/src/pages/Home.tsx:122"}),y.jsx(_6,{"data-loc":"client/src/pages/Home.tsx:125",componentName:r,onClose:()=>l(null)}),y.jsx(b6,{"data-loc":"client/src/pages/Home.tsx:131",selectedComponent:r,onComponentSelect:T,viewMode:e}),y.jsx(S6,{"data-loc":"client/src/pages/Home.tsx:138",isOpen:g,onClose:()=>m(!1)}),y.jsx(A6,{"data-loc":"client/src/pages/Home.tsx:144",isOpen:v,onClose:()=>_(!1)}),y.jsx(g6,{"data-loc":"client/src/pages/Home.tsx:150",viewMode:e,onViewModeChange:M,autoRotate:u,onAutoRotateToggle:()=>f(!u),onResetView:S,arSupported:h,onStartAR:b,onShowSpecs:()=>m(!g),onShowQuiz:()=>_(!0)}),y.jsx("div",{"data-loc":"client/src/pages/Home.tsx:163",className:"absolute bottom-12 left-1/2 -translate-x-1/2 text-center z-10 pointer-events-none",children:y.jsx("p",{"data-loc":"client/src/pages/Home.tsx:164",className:"text-[10px] text-[#00d4ff]/25 font-mono",children:R?"اضغط عÙ٠اÙÙÙØ§Ø· Ø§ÙØ®Ø¶Ø±Ø§Ø¡ ÙØ§Ø³ØªÙشا٠اÙÙ
ÙÙÙØ§Øª":"اضغط عÙ٠اÙÙ
ÙÙÙ ÙØ¹Ø±Ø¶ Ù
عÙÙÙ
ات٠| Ø§Ø³ØØ¨ ÙÙØªØ¯ÙÙØ± | ÙØ±Ùب ÙÙØªÙØ¨ÙØ±"})}),y.jsx("div",{"data-loc":"client/src/pages/Home.tsx:173",className:"absolute bottom-0.5 left-1/2 -translate-x-1/2 z-10 pointer-events-none",children:y.jsx("p",{"data-loc":"client/src/pages/Home.tsx:174",className:"text-[8px] text-[#00d4ff]/15 font-mono",children:"ÙÙØ±Ø© ÙØªØµÙ
ÙÙ
: اÙÙ
درب ÙÙØ¯ Ø±ÙØ§Ø¹Ù | اÙÙ
ؤسسة Ø§ÙØ¹Ø§Ù
Ø© ÙÙØªØ¯Ø±Ùب Ø§ÙØªÙÙÙ ÙØ§ÙÙ
ÙÙÙ"})})]})]})}function R6(){return y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:11",className:"min-h-screen bg-gradient-to-br from-[#0a0a0f] via-[#0f1419] to-[#0a0a0f] text-white",children:[y.jsx("header",{"data-loc":"client/src/pages/Learn.tsx:13",className:"sticky top-0 z-50 bg-[#0a0a0f]/90 backdrop-blur-md border-b border-[#00d4ff]/20",children:y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:14",className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[y.jsx("h1",{"data-loc":"client/src/pages/Learn.tsx:15",className:"text-xl md:text-2xl font-bold text-[#00d4ff]",children:"تعÙÙ
اÙÙ
Ø²ÙØ¯ ع٠ترÙÙØ¨ Ø§ÙØ¢ÙØ©"}),y.jsx(b0,{"data-loc":"client/src/pages/Learn.tsx:18",href:"/",children:y.jsxs("a",{"data-loc":"client/src/pages/Learn.tsx:19",className:"flex items-center gap-2 px-4 py-2 bg-[#00d4ff]/10 hover:bg-[#00d4ff]/20 border border-[#00d4ff]/30 rounded-lg transition-all",children:[y.jsx(_d,{"data-loc":"client/src/pages/Learn.tsx:20",className:"w-4 h-4"}),y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:21",className:"hidden md:inline",children:"Ø§ÙØ¹Ùدة ÙÙØ±Ø¦ÙØ³ÙØ©"})]})})]})}),y.jsxs("main",{"data-loc":"client/src/pages/Learn.tsx:28",className:"container mx-auto px-4 py-8 max-w-4xl",children:[y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:30",className:"bg-gradient-to-r from-[#00d4ff]/10 to-[#00ff88]/10 border border-[#00d4ff]/30 rounded-2xl p-8 mb-8",children:[y.jsx("h2",{"data-loc":"client/src/pages/Learn.tsx:31",className:"text-3xl md:text-4xl font-bold mb-4 text-center",children:"Ù
ØØ§Ø¶Ø±Ø©: Ù
ÙÙÙØ§Øª Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:34",className:"text-xl text-center text-[#00d4ff]/90 mb-2",children:"DC Machine Construction"}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:37",className:"text-center space-y-1 mt-6 pt-6 border-t border-[#00d4ff]/20",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:38",className:"text-lg font-semibold",children:"اÙÙ
درب: Ù
. ÙÙØ¯ Ø±ÙØ§Ø¹Ù"}),y.jsxs("a",{"data-loc":"client/src/pages/Learn.tsx:39",href:"mailto:[email protected]",className:"inline-flex items-center gap-2 text-[#00d4ff] hover:text-[#00ff88] transition-colors",children:[y.jsx(ub,{"data-loc":"client/src/pages/Learn.tsx:43",className:"w-4 h-4"}),"[email protected]"]}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:46",className:"text-sm text-gray-400",children:"اÙÙÙÙØ© Ø§ÙØªÙÙÙØ© بجازاÙ"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:47",className:"text-sm text-gray-400",children:"اÙÙ
ÙØ±Ø±: Ø¢ÙØ§Øª Ø§ÙØªÙار اÙÙ
ستÙ
ر"})]})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:52",className:"space-y-6",children:[y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:54",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:55",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:56",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"1"}),"Ø§ÙØ¹ÙØ§ÙØ© بÙ٠عدد Ø§ÙØ£Ùطاب ÙØ¹Ø¯Ø¯ اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ©"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:59",className:"space-y-3 text-gray-300 leading-relaxed",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:60",className:"text-lg font-semibold text-white",children:"Ù
٠اÙÙ
بادئ Ø§ÙØ£Ø³Ø§Ø³ÙØ© ÙÙ Ø¢ÙØ© Ø§ÙØªÙار اÙÙ
ستÙ
ر Ø£Ù:"}),y.jsx("div",{"data-loc":"client/src/pages/Learn.tsx:61",className:"bg-[#00d4ff]/10 border-r-4 border-[#00d4ff] p-4 rounded",children:y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:62",className:"text-xl font-bold text-[#00d4ff]",children:"عدد اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ© = عدد Ø§ÙØ£Ùطاب اÙÙ
ØºÙØ§Ø·ÙØ³ÙØ©"})}),y.jsxs("ul",{"data-loc":"client/src/pages/Learn.tsx:66",className:"space-y-2 mr-6",children:[y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:67",children:"⢠اÙÙ
ØºÙØ§Ø·Ùس ÙÙ Ø·Ø¨ÙØ¹ØªÙ ÙØ§ ÙÙ
Ù٠أ٠ÙÙÙÙ ÙÙ Ø¥ÙØ§ ÙØ·Ø¨Ø§Ù: Ø´Ù
اÙÙ ÙØ¬ÙÙØ¨Ù"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:68",children:"⢠إذا ÙØ§Ù ÙØ¯ÙÙØ§ Ù
ØºÙØ§Ø·Ùس ÙØ§ØØ¯ â ÙÙ ÙØ·Ø¨Ø§Ù â ÙØØªØ§Ø¬ ÙØ±Ø´ØªÙÙ ÙØ±Ø¨ÙÙÙØªÙÙ"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:69",children:"⢠إذا ÙØ§Ù ÙØ¯ÙÙØ§ أربعة Ø£ÙØ·Ø§Ø¨ (ÙØ·Ø¨Ø§Ù Ø´Ù
اÙÙØ§Ù ÙÙØ·Ø¨Ø§Ù جÙÙØ¨ÙاÙ) â ÙØØªØ§Ø¬ أربع ÙØ±Ø´ ÙØ±Ø¨ÙÙÙØ©"})]}),y.jsxs("p",{"data-loc":"client/src/pages/Learn.tsx:71",className:"pt-2",children:["ÙÙ Ø¢ÙØ© اÙÙ
عÙ
٠اÙÙ
ÙØ¬Ùدة ÙØ¯ÙÙÙ
ÙÙØ¬Ø¯ ",y.jsx("strong",{"data-loc":"client/src/pages/Learn.tsx:72",children:"ÙØ·Ø¨Ø§Ù ÙÙØ·"})," (Ù
ÙÙ Ù
جا٠شÙ
اÙÙ ÙÙ
ÙÙ Ù
جا٠جÙÙØ¨Ù)Ø ÙØ°ÙÙ ØªØØªÙÙ Ø§ÙØ¢ÙØ© عÙÙ ",
4250y.jsx("strong",{"data-loc":"client/src/pages/Learn.tsx:73",children:"ÙØ±Ø´ØªÙÙ ÙØ±Ø¨ÙÙÙØªÙÙ"}),"."]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:75",className:"bg-[#00ff88]/10 border border-[#00ff88]/30 rounded-lg p-4 mt-4",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:76",className:"text-[#00ff88] font-semibold",children:"ð¡ Ø§ÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ© ÙØ¸ÙÙØªÙا:"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:77",children:"ÙÙÙ Ø§ÙØªÙار اÙÙÙØ±Ø¨Ø§Ø¦Ù Ù
٠اÙÙ
ÙØØ¯ (Commutator) Ø¥ÙÙ Ø§ÙØ¯Ø§Ø¦Ø±Ø© Ø§ÙØ®Ø§Ø±Ø¬ÙØ© Ø£Ù Ø§ÙØ¹Ùس."})]})]})]}),y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:83",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:84",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:85",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"2"}),"Ù
ÙÙÙØ§Øª Ø§ÙØ¹Ø¶Ù Ø§ÙØ¯Ùار (Rotor / Armature)"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:88",className:"space-y-4 text-gray-300",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:89",className:"font-semibold text-white",children:"Ø£ÙÙ
Ø¹ÙØ§ØµØ± Ø§ÙØ¹Ø¶Ù Ø§ÙØ¯Ùار:"}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:90",className:"grid gap-3",children:[y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:91",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:92",className:"font-bold text-[#00d4ff] mb-2",children:"1. ÙÙØ¨ اÙÙ
ÙØªØ¬ (Armature Core)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:93",children:"Ù
صÙÙØ¹ Ù
Ù Ø´Ø±Ø§Ø¦Ø Ù
عدÙÙØ© Ù
عزÙÙØ© Ø¹Ù Ø¨Ø¹Ø¶ÙØ§ ÙØªÙÙÙ٠اÙÙÙØ§Ùد."})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:95",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:96",className:"font-bold text-[#00d4ff] mb-2",children:"2. Ù
ÙÙØ§Øª اÙÙ
ÙØªØ¬ (Armature Windings)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:97",children:"Ù
ÙØ¶Ùعة داخ٠Ù
جار٠اÙÙÙØ¨ Ø§ÙØØ¯ÙØ¯Ù."})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:99",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:100",className:"font-bold text-[#00d4ff] mb-2",children:"3. اÙÙ
ÙØØ¯ (Commutator)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:101",children:"ÙØªÙÙÙ Ù
Ù Ø´Ø±Ø§Ø¦Ø ÙØØ§Ø³ÙØ© Ù
عزÙÙØ© Ø¹Ù Ø¨Ø¹Ø¶ÙØ§ بعازÙ."}),y.jsxs("p",{"data-loc":"client/src/pages/Learn.tsx:102",className:"mt-2 text-[#00ff88]",children:[y.jsx("strong",{"data-loc":"client/src/pages/Learn.tsx:103",children:"ÙØ¸ÙÙØªÙ:"})," تØÙÙÙ Ø§ÙØªÙار اÙÙ
تÙÙØ¯ داخ٠اÙÙ
ÙØªØ¬ Ø¥ÙÙ ØªÙØ§Ø± Ù
ستÙ
ر Ø¹ÙØ¯ Ø§ÙØ®Ø±Ø¬."]})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:106",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:107",className:"font-bold text-[#00d4ff] mb-2",children:"4. اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ© (Carbon Brushes)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:108",children:"تضغط عÙ٠اÙÙ
ÙØØ¯ ÙØªÙÙÙ Ø§ÙØªÙار اÙÙÙØ±Ø¨Ø§Ø¦Ù."})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:110",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:111",className:"font-bold text-[#00d4ff] mb-2",children:"5. عÙ
ÙØ¯ Ø§ÙØ¯Ùرا٠(Shaft)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:112",children:"ÙØÙ
Ù Ø§ÙØ¹Ø¶Ù Ø§ÙØ¯Ùار ÙÙÙÙÙ Ø§ÙØØ±ÙØ© اÙÙ
ÙÙØ§ÙÙÙÙØ©."})]})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:115",className:"bg-[#00ff88]/10 border border-[#00ff88]/30 rounded-lg p-4 mt-4",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:116",className:"font-semibold text-[#00ff88]",children:"ð Ø£Ø·Ø±Ø§Ù Ø¯Ø§Ø¦Ø±Ø© اÙÙ
ÙØªØ¬ Ù٠اÙÙ
عÙ
Ù:"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:117",className:"text-xl font-bold mt-2",children:"A1 Ù A2"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:118",className:"text-sm",children:"ÙÙ٠أطرا٠خارجة ÙØ¹ÙÙØ§Ù Ù
٠اÙÙØ±Ø´ اÙÙØ±Ø¨ÙÙÙØ©."})]})]})]}),y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:124",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:125",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:126",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"3"}),"Ù
ÙÙÙØ§Øª Ø§ÙØ¹Ø¶Ù Ø§ÙØ«Ø§Ø¨Øª (Stator / Field System)"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:129",className:"space-y-4 text-gray-300",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:130",className:"font-semibold text-white",children:"Ø§ÙØ¹Ø¶Ù Ø§ÙØ«Ø§Ø¨Øª ÙØªÙÙÙ Ù
Ù:"}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:131",className:"grid gap-3",children:[y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:132",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:133",className:"font-bold text-[#00d4ff] mb-2",children:"1. اÙÙÙÙÙ (Frame)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:134",children:"ÙØ´ÙÙ Ø§ÙØ¯Ø¹Ø§Ù
Ø© اÙÙ
ÙÙØ§ÙÙÙÙØ© ÙÙØ¢ÙØ©."})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:136",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:137",className:"font-bold text-[#00d4ff] mb-2",children:"2. ÙÙØ¨ اÙÙ
Ø¬Ø§Ù Ø§ÙØØ¯ÙØ¯Ù (Field Core / Poles)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:138",children:"ÙØ·Ø¹ ØØ¯ÙØ¯ÙØ© Ù
ثبتة داخ٠اÙÙÙÙÙ."})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:140",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:141",className:"font-bold text-[#00d4ff] mb-2",children:"3. Ù
ÙÙØ§Øª اÙÙ
جا٠(Field Windings)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:142",children:"Ù
ÙÙÙÙØ© ØÙÙ Ø§ÙØ£Ùطاب ÙØªÙÙÙ٠اÙÙ
جا٠اÙÙ
ØºÙØ§Ø·ÙسÙ."})]})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:145",className:"bg-[#00ff88]/10 border border-[#00ff88]/30 rounded-lg p-4 mt-4",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:146",className:"font-semibold text-[#00ff88]",children:"ð Ø£Ø·Ø±Ø§Ù Ù
ÙÙØ§Øª اÙÙ
جا٠Ù٠اÙÙ
عÙ
Ù:"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:147",className:"text-xl font-bold mt-2",children:"F1 Ù F2"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:148",className:"text-sm",children:"ÙØ§ÙØØ±Ù F Ù
Ø£Ø®ÙØ° Ù
Ù ÙÙÙ
Ø© Field."}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:149",className:"mt-2 text-sm",children:"ØØªÙ ÙÙ ÙØ§Ù Ù
4250ÙØ§Ù Ø£ÙØ«Ø± Ù
Ù Ù
Ù٠داخÙÙØ§ÙØ ÙØªÙ
Ø§ÙØªÙصÙ٠داخÙÙØ§Ù بØÙØ« ÙØ®Ø±Ø¬ Ø·Ø±ÙØ§Ù ÙÙØ· ÙÙØªØ¹Ø§Ù
Ù Ù
ع Ø§ÙØ¢ÙØ© ÙÙ
ØºÙØ§Ø·Ùس Ù
ÙØ§Ùئ ÙØ§ØØ¯."})]})]})]}),y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:158",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:159",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:160",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"4"}),"اÙÙØ¬ÙØ© اÙÙÙØ§Ø¦ÙØ© (Air Gap)"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:163",className:"space-y-3 text-gray-300",children:[y.jsxs("p",{"data-loc":"client/src/pages/Learn.tsx:164",children:["بÙÙ Ø§ÙØ¹Ø¶Ù Ø§ÙØ¯Ùار ÙØ§ÙØ¹Ø¶Ù Ø§ÙØ«Ø§Ø¨Øª ØªÙØ¬Ø¯ ",y.jsx("strong",{"data-loc":"client/src/pages/Learn.tsx:164",className:"text-[#00d4ff]",children:"ÙØ¬ÙØ© ÙÙØ§Ø¦ÙØ©"}),"."]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:165",className:"grid md:grid-cols-2 gap-4 mt-4",children:[y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:166",className:"bg-[#00ff88]/10 border border-[#00ff88]/30 rounded-lg p-4",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:167",className:"font-bold text-[#00ff88] mb-2",children:"â
Ø£ÙÙ
ÙØªÙا:"}),y.jsxs("ul",{"data-loc":"client/src/pages/Learn.tsx:168",className:"space-y-1 text-sm",children:[y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:169",children:"⢠تسÙ
Ø Ø¨ØØ±ÙØ© Ø¯ÙØ±Ø§Ù Ø§ÙØ¹Ø¶Ù Ø§ÙØ¯Ùار"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:170",children:"⢠بدÙÙÙØ§ ÙØ§ ÙÙ
ÙÙ ÙÙØ¢ÙØ© أ٠تعÙ
Ù"})]})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:173",className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:174",className:"font-bold text-red-400 mb-2",children:"â ï¸ ÙÙÙÙØ§ Ø£ÙØ¶Ø§Ù:"}),y.jsx("ul",{"data-loc":"client/src/pages/Learn.tsx:175",className:"space-y-1 text-sm",children:y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:176",children:"⢠تسبب تسرب جزء Ù
٠اÙÙÙØ¶ اÙÙ
ØºÙØ§Ø·ÙسÙ"})})]})]}),y.jsxs("p",{"data-loc":"client/src/pages/Learn.tsx:180",className:"pt-2",children:["ÙØ°ÙÙ ÙØªÙ
تÙÙÙÙÙØ§ عÙ
ÙÙØ§Ù Ø¥ÙÙ ",y.jsx("strong",{"data-loc":"client/src/pages/Learn.tsx:181",className:"text-[#00d4ff]",children:"بضعة Ù
ÙÙÙ
ترات (3â4 Ù
Ù
ØªÙØ±ÙباÙ)"}),"ÙØªØÙÙÙ Ø£ÙØ¶Ù ØªÙØ§Ø²Ù بÙ٠اÙÙÙØ§Ø¡Ø© ÙØ§ÙØØ±ÙØ© اÙÙ
ÙÙØ§ÙÙÙÙØ©."]})]})]}),y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:188",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:189",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:190",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"5"}),"Ù
Ø±ÙØØ© Ø§ÙØªØ¨Ø±Ùد"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:193",className:"space-y-3 text-gray-300",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:194",children:"ÙÙ ÙØ«Ùر Ù
Ù Ø§ÙØ¢Ùات ÙØªÙ
ترÙÙØ¨ Ù
Ø±ÙØØ© عÙ٠عÙ
ÙØ¯ Ø§ÙØ¯ÙراÙ."}),y.jsx("div",{"data-loc":"client/src/pages/Learn.tsx:195",className:"bg-[#00d4ff]/10 border-r-4 border-[#00d4ff] p-4 rounded",children:y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:196",className:"text-lg font-bold text-[#00d4ff]",children:"ÙØ¸ÙÙØªÙا اÙÙØÙØ¯Ø©: Ø§ÙØªØ¨Ø±Ùد"})}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:198",children:"بسبب اÙÙÙØ§Ùد Ø§ÙØØ±Ø§Ø±ÙØ© (ÙØØ§Ø³ÙØ© ÙØØ¯ÙØ¯ÙØ©)Ø ØªØªØÙ٠بعض Ø§ÙØ·Ø§ÙØ© Ø¥ÙÙ ØØ±Ø§Ø±Ø©Ø ÙØ§ÙÙ
Ø±ÙØØ© تعÙ
٠عÙ٠طرد اÙÙÙØ§Ø¡ Ø§ÙØ³Ø§Ø®Ù ÙØ§ÙÙ
ØØ§Ùظة عÙ٠درجة ØØ±Ø§Ø±Ø© Ø§ÙØªØ´ØºÙÙ Ø§ÙØ¢Ù
ÙØ©."})]})]}),y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:206",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:207",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:208",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"6"}),"تصÙÙØ¹ ÙÙØ¨ اÙÙ
ÙØªØ¬"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:211",className:"space-y-3 text-gray-300",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:212",className:"font-semibold text-white",children:"ÙÙØ¨ اÙÙ
ÙØªØ¬ ÙØ§ ÙÙØµÙع ÙÙØ·Ø¹Ø© ØØ¯Ùد Ù
صÙ
تة ÙØªÙ
ØÙØ±ÙØ§Ø Ø¨Ù ÙØªÙÙÙ Ù
Ù:"}),y.jsxs("ul",{"data-loc":"client/src/pages/Learn.tsx:215",className:"space-y-2 mr-6",children:[y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:216",children:"â¢ Ø´Ø±Ø§Ø¦Ø Ù
عدÙÙØ© Ø¯Ø§Ø¦Ø±ÙØ© (Laminations)"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:217",children:"⢠Ù
عزÙÙØ© Ø¹Ù Ø¨Ø¹Ø¶ÙØ§"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:218",children:"⢠Ù
ÙØ¯Ø³Ø© Ù
Ø¹Ø§Ù ÙØªÙÙÙÙ Ø§ÙØ´Ù٠اÙÙÙØ§Ø¦Ù"})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:220",className:"bg-[#00ff88]/10 border border-[#00ff88]/30 rounded-lg p-4 mt-4",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:221",className:"font-semibold text-[#00ff88]",children:"ð¯ Ø§ÙÙØ¯Ù Ù
٠ذÙÙ:"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:222",children:"تÙÙÙÙ Ø§ÙØªÙارات Ø§ÙØ¯ÙاÙ
ÙØ© (Eddy Currents) ÙØªÙÙÙ٠اÙÙÙØ§Ùد Ø§ÙØØ¯ÙØ¯ÙØ©."})]}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:224",className:"pt-2",children:"اÙÙ
جار٠اÙÙ
ÙØ¬Ùدة Ù٠اÙÙÙØ¨ ØªÙØ³ØªØ®Ø¯Ù
ÙØªØ±ÙÙØ¨ Ù
ÙÙØ§Øª اÙÙ
ÙØªØ¬."})]})]}),y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:231",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:232",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:233",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"7"}),"Ø§ÙØ¹Ø²Ù ÙØ§ÙتغÙÙÙ"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:236",className:"space-y-4 text-gray-300",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:237",className:"font-semibold text-white",children:"ÙØ³ØªØ®Ø¯Ù
ÙÙ ÙÙ Ø§ÙØ¢Ùات:"}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:238",className:"grid gap-3",children:[y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:239",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:240",className:"font-bold text-[#00d4ff] mb-2",children:"ÙØ±Ù برسبا٠(Presspan Paper)"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:241",children:"ÙØ±Ù عاز٠ÙÙÙ ÙØ³ØªØ®Ø¯Ù
ÙØ¹Ø²Ù اÙÙ
جار٠ÙÙ
ÙØ¹ تÙ
اس اÙÙ
ÙÙØ§Øª Ù
ع اÙÙÙØ¨ Ø§ÙØØ¯ÙØ¯Ù."})]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:245",className:"bg-[#0a0a0f]/50 border border-[#00d4ff]/10 rounded-lg p-4",children:[y.jsx("h4",{"data-loc":"client/src/pages/Learn.tsx:246",className:"font-bold text-[#00d4ff] mb-2",children:"Ø£ÙÙØ§Ù Ø²Ø¬Ø§Ø¬ÙØ© ÙØ´Ø±ÙØ· تÙÙÙØ©"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:247",children:"ÙØªØ«Ø¨Ùت اÙÙ
ÙÙØ§Øª ÙÙ
ÙØ¹ Ø®Ø±ÙØ¬Ùا بسبب ÙÙØ© Ø§ÙØ·Ø±Ø¯ اÙÙ
Ø±ÙØ²Ù Ø¹ÙØ¯ Ø§ÙØ³Ø±Ø¹Ø§Øª Ø§ÙØ¹Ø§ÙÙØ©."})]})]}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:252",className:"text-sm pt-2",children:"ÙÙ Ø§ÙØ¢Ùات Ø§ÙØµØºÙرة ÙØ¯ ÙØ§ ÙØªÙ
استخداÙ
عز٠Ù
ØªÙØ¯Ù
ÙØ§Ø¹ØªØ¨Ø§Ø±Ø§Øª Ø§ÙØªØµØ§Ø¯ÙØ©Ø ÙÙÙ ÙÙ Ø§ÙØ¢Ùات Ø§ÙØµÙØ§Ø¹ÙØ© اÙÙØ¨Ùرة ÙØ¹ØªØ¨Ø± Ø§ÙØ¹Ø²Ù Ø¬Ø²Ø¡Ø§Ù Ø£Ø³Ø§Ø³ÙØ§Ù Ù
Ù Ø¬ÙØ¯Ø© Ø§ÙØªØµÙÙØ¹."})]})]}),y.jsxs("section",{"data-loc":"client/src/pages/Learn.tsx:260",className:"bg-gradient-to-r from-[#00d4ff]/10 to-[#00ff88]/10 border border-[#00d4ff]/30 rounded-xl p-6",children:[y.jsxs("h3",{"data-loc":"client/src/pages/Learn.tsx:261",className:"text-2xl font-bold mb-4 text-[#00d4ff] flex items-center gap-2",children:[y.jsx("span",{"data-loc":"client/src/pages/Learn.tsx:262",className:"flex items-center justify-center w-8 h-8 bg-[#00d4ff]/20 rounded-full text-sm",children:"8"}),"اÙÙÙÙ
ÙØ¨Ù Ø§ÙØÙØ¸"]}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:265",className:"space-y-3 text-gray-300",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:266",className:"text-lg font-semibold text-white",children:"اÙÙØ¯Ù Ù
Ù ÙØ°Ù اÙÙ
ØØ§Ø¶Ø±Ø© ÙÙØ³ Ø§ÙØÙØ¸Ø ب٠اÙÙÙÙ
Ø§ÙØ¨ØµØ±Ù ÙØ§ÙترÙÙØ¨Ù ÙÙØ¢ÙØ©."}),y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:269",className:"bg-[#0a0a0f]/50 rounded-lg p-4 mt-4",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:270",className:"font-semibold text-[#00ff88] mb-3",children:"Ø¹ÙØ¯Ù
ا تÙÙÙ
:"}),y.jsxs("ul",{"data-loc":"client/src/pages/Learn.tsx:271",className:"space-y-2 mr-6",children:[y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:272",children:"â Ø§ÙÙØ±Ù بÙ٠دائرة اÙÙ
ÙØªØ¬ ÙØ¯Ø§Ø¦Ø±Ø© اÙÙ
جاÙ"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:273",children:"â Ù
عÙÙ A1 Ù A2"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:274",children:"â Ù
عÙÙ F1 Ù F2"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:275",children:"â ÙØ¸ÙÙØ© اÙÙ
ÙØØ¯ ÙØ§ÙÙØ±Ø´"}),y.jsx("li",{"data-loc":"client/src/pages/Learn.tsx:276",children:"â Ø³Ø¨Ø¨ ÙØ¬Ùد اÙÙØ¬ÙØ© اÙÙÙØ§Ø¦ÙØ©"})]})]}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:279",className:"text-lg font-semibold text-[#00d4ff] pt-4",children:"Ø³ØªØ±ØªØ§Ø ÙØ«Ùرا٠Ù٠اÙÙ
عÙ
ÙØ ÙØªØ³ØªØ·Ùع تØÙÙÙ Ø£Ù Ø³Ø¤Ø§Ù Ø£Ù ØµÙØ±Ø© ÙÙ Ø§ÙØ§Ø®ØªØ¨Ø§Ø± بسÙÙÙØ©."})]})]})]}),y.jsxs("footer",{"data-loc":"client/src/pages/Learn.tsx:287",className:"mt-12 pt-8 border-t border-[#00d4ff]/20 text-center space-y-4",children:[y.jsxs("div",{"data-loc":"client/src/pages/Learn.tsx:288",className:"bg-[#0f1419]/50 border border-[#00d4ff]/20 rounded-xl p-6",children:[y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:289",className:"text-lg font-semibold mb-2",children:"اÙÙ
درب: Ù
. ÙÙØ¯ Ø±ÙØ§Ø¹Ù"}),y.jsxs("a",{"data-loc":"client/src/pages/Learn.tsx:290",href:"mailto:[email protected]",className:"inline-flex items-center gap-2 text-[#00d4ff] hover:text-[#00ff88] transition-colors",children:[y.jsx(ub,{"data-loc":"client/src/pages/Learn.tsx:294",className:"w-4 h-4"}),"[email protected]"]}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:297",className:"text-sm text-gray-400 mt-3",children:"اÙÙÙÙØ© Ø§ÙØªÙÙÙØ© بجازاÙ"}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:298",className:"text-sm text-gray-400",children:"اÙÙ
ؤسسة Ø§ÙØ¹Ø§Ù
Ø© ÙÙØªØ¯Ø±Ùب Ø§ÙØªÙÙÙ ÙØ§ÙÙ
ÙÙÙ"})]}),y.jsx(b0,{"data-loc":"client/src/pages/Learn.tsx:301",href:"/",children:y.jsxs("a",{"data-loc":"client/src/pages/Learn.tsx:302",className:"inline-flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-[#00d4ff] to-[#00ff88] text-[#0a0a0f] font-bold rounded-lg hover:scale-105 transition-transform",children:[y.jsx(_d,{"data-loc":"client/src/pages/Learn.tsx:303",className:"w-5 h-5"}),"Ø§ÙØ¹Ùدة ÙÙØµÙØØ© Ø§ÙØ±Ø¦ÙØ³ÙØ©"]})}),y.jsx("p",{"data-loc":"client/src/pages/Learn.tsx:308",className:"text-xs text-gray-500 pt-4",children:"© 2026 Ù
عÙ
Ù Ø¢ÙØ§Øª Ø§ÙØªÙار اÙÙ
ستÙ
ر Ø§ÙØ°ÙÙ - جÙ
ÙØ¹ Ø§ÙØÙÙÙ Ù
ØÙÙØ¸Ø©"})]})]})]})}function D6(){return y.jsxs(BN,{"data-loc":"client/src/App.tsx:12",children:[y.jsx(Tf,{"data-loc":"client/src/App.tsx:13",path:"/",component:C6}),y.jsx(Tf,{"data-loc":"client/src/App.tsx:14",path:"/learn",component:R6}),y.jsx(Tf,{"data-loc":"client/src/App.tsx:15",path:"/404",component:vb}),y.jsx(Tf,{"data-loc":"client/src/App.tsx:16",component:vb})]})}function N6(){return y.jsx(VN,{"data-loc":"client/src/App.tsx:23",children:y.jsx(kN,{"data-loc":"client/src/App.tsx:24",defaultTheme:"dark",children:y.jsxs(qD,{"data-loc":"client/src/App.tsx:25",children:[y.jsx(aC,{"data-loc":"client/src/App.tsx:26"}),y.jsx(D6,{"data-loc":"client/src/App.tsx:27"})]})})})}T3.createRoot(document.getElementById("root")).render(y.jsx(N6,{"data-loc":"client/src/main.tsx:5"}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.