diff --git a/assets/index-BGHkwXzP.js b/assets/index-DFaEj4eB.js similarity index 61% rename from assets/index-BGHkwXzP.js rename to assets/index-DFaEj4eB.js index d27e161..8357acf 100644 --- a/assets/index-BGHkwXzP.js +++ b/assets/index-DFaEj4eB.js @@ -1,4 +1,4 @@ -var Rj=Object.defineProperty;var hI=t=>{throw TypeError(t)};var Aj=(t,e,n)=>e in t?Rj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Wt=(t,e,n)=>Aj(t,typeof e!="symbol"?e+"":e,n),MS=(t,e,n)=>e.has(t)||hI("Cannot "+n);var Gs=(t,e,n)=>(MS(t,e,"read from private field"),n?n.call(t):e.get(t)),ES=(t,e,n)=>e.has(t)?hI("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),D0=(t,e,n,r)=>(MS(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),TS=(t,e,n)=>(MS(t,e,"access private method"),n);function Pj(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var F0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Va(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ko(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var E5={exports:{}},H1={},T5={exports:{}},Kt={};/** +var Nj=Object.defineProperty;var fI=t=>{throw TypeError(t)};var kj=(t,e,n)=>e in t?Nj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Wt=(t,e,n)=>kj(t,typeof e!="symbol"?e+"":e,n),MS=(t,e,n)=>e.has(t)||fI("Cannot "+n);var Gs=(t,e,n)=>(MS(t,e,"read from private field"),n?n.call(t):e.get(t)),ES=(t,e,n)=>e.has(t)?fI("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),D0=(t,e,n,r)=>(MS(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),TS=(t,e,n)=>(MS(t,e,"access private method"),n);function Lj(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var F0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Va(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ko(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var RD={exports:{}},H1={},AD={exports:{}},Kt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Rj=Object.defineProperty;var hI=t=>{throw TypeError(t)};var Aj=(t,e,n)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var eg=Symbol.for("react.element"),Ij=Symbol.for("react.portal"),Nj=Symbol.for("react.fragment"),kj=Symbol.for("react.strict_mode"),Lj=Symbol.for("react.profiler"),Oj=Symbol.for("react.provider"),Dj=Symbol.for("react.context"),Fj=Symbol.for("react.forward_ref"),zj=Symbol.for("react.suspense"),Uj=Symbol.for("react.memo"),Bj=Symbol.for("react.lazy"),pI=Symbol.iterator;function jj(t){return t===null||typeof t!="object"?null:(t=pI&&t[pI]||t["@@iterator"],typeof t=="function"?t:null)}var C5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R5=Object.assign,A5={};function $d(t,e,n){this.props=t,this.context=e,this.refs=A5,this.updater=n||C5}$d.prototype.isReactComponent={};$d.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};$d.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function P5(){}P5.prototype=$d.prototype;function uC(t,e,n){this.props=t,this.context=e,this.refs=A5,this.updater=n||C5}var fC=uC.prototype=new P5;fC.constructor=uC;R5(fC,$d.prototype);fC.isPureReactComponent=!0;var mI=Array.isArray,I5=Object.prototype.hasOwnProperty,dC={current:null},N5={key:!0,ref:!0,__self:!0,__source:!0};function k5(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)I5.call(e,r)&&!N5.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1{throw TypeError(t)};var Aj=(t,e,n)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gj=R,Xj=Symbol.for("react.element"),qj=Symbol.for("react.fragment"),Yj=Object.prototype.hasOwnProperty,Kj=Gj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zj={key:!0,ref:!0,__self:!0,__source:!0};function O5(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)Yj.call(e,r)&&!Zj.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Xj,type:t,key:s,ref:o,props:i,_owner:Kj.current}}H1.Fragment=qj;H1.jsx=O5;H1.jsxs=O5;E5.exports=H1;var E=E5.exports,D5={exports:{}},ds={},F5={exports:{}},z5={};/** + */var Kj=R,Zj=Symbol.for("react.element"),Jj=Symbol.for("react.fragment"),Qj=Object.prototype.hasOwnProperty,eV=Kj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tV={key:!0,ref:!0,__self:!0,__source:!0};function zD(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)Qj.call(e,r)&&!tV.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Zj,type:t,key:s,ref:o,props:i,_owner:eV.current}}H1.Fragment=Jj;H1.jsx=zD;H1.jsxs=zD;RD.exports=H1;var E=RD.exports,UD={exports:{}},ds={},BD={exports:{}},jD={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var Rj=Object.defineProperty;var hI=t=>{throw TypeError(t)};var Aj=(t,e,n)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(F,q){var K=F.length;F.push(q);e:for(;0>>1,he=F[Q];if(0>>1;Qi(de,K))bei(_e,de)?(F[Q]=_e,F[be]=K,Q=be):(F[Q]=de,F[J]=K,Q=J);else if(bei(_e,K))F[Q]=_e,F[be]=K,Q=be;else break e}}return q}function i(F,q){var K=F.sortIndex-q.sortIndex;return K!==0?K:F.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(F){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=F)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(F){if(x=!1,_(F),!y)if(n(l)!==null)y=!0,X(C);else{var q=n(c);q!==null&&Z(S,q.startTime-F)}}function C(F,q){y=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(q),f=n(l);f!==null&&(!(f.expirationTime>q)||F&&!N());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,h=f.priorityLevel;var he=Q(f.expirationTime<=q);q=t.unstable_now(),typeof he=="function"?f.callback=he:f===n(l)&&r(l),_(q)}else r(l);f=n(l)}if(f!==null)var fe=!0;else{var J=n(c);J!==null&&Z(S,J.startTime-q),fe=!1}return fe}finally{f=null,h=K,m=!1}}var P=!1,A=null,L=-1,k=5,T=-1;function N(){return!(t.unstable_now()-TF||125Q?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-Q))):(F.sortIndex=he,e(l,F),y||m||(y=!0,X(C))),F},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(F){var q=h;return function(){var K=h;h=q;try{return F.apply(this,arguments)}finally{h=K}}}})(z5);F5.exports=z5;var Jj=F5.exports;/** + */(function(t){function e(F,q){var K=F.length;F.push(q);e:for(;0>>1,he=F[Q];if(0>>1;Qi(de,K))bei(_e,de)?(F[Q]=_e,F[be]=K,Q=be):(F[Q]=de,F[J]=K,Q=J);else if(bei(_e,K))F[Q]=_e,F[be]=K,Q=be;else break e}}return q}function i(F,q){var K=F.sortIndex-q.sortIndex;return K!==0?K:F.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(F){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=F)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(F){if(x=!1,_(F),!y)if(n(l)!==null)y=!0,X(C);else{var q=n(c);q!==null&&Z(S,q.startTime-F)}}function C(F,q){y=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(q),f=n(l);f!==null&&(!(f.expirationTime>q)||F&&!N());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,h=f.priorityLevel;var he=Q(f.expirationTime<=q);q=t.unstable_now(),typeof he=="function"?f.callback=he:f===n(l)&&r(l),_(q)}else r(l);f=n(l)}if(f!==null)var fe=!0;else{var J=n(c);J!==null&&Z(S,J.startTime-q),fe=!1}return fe}finally{f=null,h=K,m=!1}}var P=!1,A=null,L=-1,k=5,T=-1;function N(){return!(t.unstable_now()-TF||125Q?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-Q))):(F.sortIndex=he,e(l,F),y||m||(y=!0,X(C))),F},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(F){var q=h;return function(){var K=h;h=q;try{return F.apply(this,arguments)}finally{h=K}}}})(jD);BD.exports=jD;var nV=BD.exports;/** * @license React * react-dom.production.min.js * @@ -30,26 +30,26 @@ var Rj=Object.defineProperty;var hI=t=>{throw TypeError(t)};var Aj=(t,e,n)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Qj=R,ls=Jj;function Ue(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JE=Object.prototype.hasOwnProperty,eV=/^[: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]*$/,yI={},vI={};function tV(t){return JE.call(vI,t)?!0:JE.call(yI,t)?!1:eV.test(t)?vI[t]=!0:(yI[t]=!0,!1)}function nV(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function rV(t,e,n,r){if(e===null||typeof e>"u"||nV(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function pi(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Lr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Lr[t]=new pi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Lr[e]=new pi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Lr[t]=new pi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Lr[t]=new pi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Lr[t]=new pi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Lr[t]=new pi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Lr[t]=new pi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Lr[t]=new pi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Lr[t]=new pi(t,5,!1,t.toLowerCase(),null,!1,!1)});var pC=/[\-:]([a-z])/g;function mC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(pC,mC);Lr[e]=new pi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(pC,mC);Lr[e]=new pi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(pC,mC);Lr[e]=new pi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Lr[t]=new pi(t,1,!1,t.toLowerCase(),null,!1,!1)});Lr.xlinkHref=new pi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Lr[t]=new pi(t,1,!1,t.toLowerCase(),null,!0,!0)});function gC(t,e,n,r){var i=Lr.hasOwnProperty(e)?Lr[e]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JE=Object.prototype.hasOwnProperty,iV=/^[: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]*$/,mI={},gI={};function sV(t){return JE.call(gI,t)?!0:JE.call(mI,t)?!1:iV.test(t)?gI[t]=!0:(mI[t]=!0,!1)}function oV(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function aV(t,e,n,r){if(e===null||typeof e>"u"||oV(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function pi(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Lr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Lr[t]=new pi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Lr[e]=new pi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Lr[t]=new pi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Lr[t]=new pi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Lr[t]=new pi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Lr[t]=new pi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Lr[t]=new pi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Lr[t]=new pi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Lr[t]=new pi(t,5,!1,t.toLowerCase(),null,!1,!1)});var hC=/[\-:]([a-z])/g;function pC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(hC,pC);Lr[e]=new pi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(hC,pC);Lr[e]=new pi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(hC,pC);Lr[e]=new pi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Lr[t]=new pi(t,1,!1,t.toLowerCase(),null,!1,!1)});Lr.xlinkHref=new pi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Lr[t]=new pi(t,1,!1,t.toLowerCase(),null,!0,!0)});function mC(t,e,n,r){var i=Lr.hasOwnProperty(e)?Lr[e]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{AS=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?hp(t):""}function iV(t){switch(t.tag){case 5:return hp(t.type);case 16:return hp("Lazy");case 13:return hp("Suspense");case 19:return hp("SuspenseList");case 0:case 2:case 15:return t=PS(t.type,!1),t;case 11:return t=PS(t.type.render,!1),t;case 1:return t=PS(t.type,!0),t;default:return""}}function n2(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case zf:return"Fragment";case Ff:return"Portal";case QE:return"Profiler";case yC:return"StrictMode";case e2:return"Suspense";case t2:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case j5:return(t.displayName||"Context")+".Consumer";case B5:return(t._context.displayName||"Context")+".Provider";case vC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case xC:return e=t.displayName||null,e!==null?e:n2(t.type)||"Memo";case pl:e=t._payload,t=t._init;try{return n2(t(e))}catch{}}return null}function sV(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return n2(e);case 8:return e===yC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ol(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function $5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function oV(t){var e=$5(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function B0(t){t._valueTracker||(t._valueTracker=oV(t))}function W5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=$5(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Kv(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function r2(t,e){var n=e.checked;return Dn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function bI(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Ol(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function H5(t,e){e=e.checked,e!=null&&gC(t,"checked",e,!1)}function i2(t,e){H5(t,e);var n=Ol(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?s2(t,e.type,n):e.hasOwnProperty("defaultValue")&&s2(t,e.type,Ol(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function _I(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function s2(t,e,n){(e!=="number"||Kv(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var pp=Array.isArray;function rd(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=j0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function em(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Mp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},aV=["Webkit","ms","Moz","O"];Object.keys(Mp).forEach(function(t){aV.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Mp[e]=Mp[t]})});function Y5(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Mp.hasOwnProperty(t)&&Mp[t]?(""+e).trim():e+"px"}function K5(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Y5(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var lV=Dn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function l2(t,e){if(e){if(lV[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ue(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ue(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ue(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ue(62))}}function c2(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var u2=null;function bC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var f2=null,id=null,sd=null;function MI(t){if(t=rg(t)){if(typeof f2!="function")throw Error(Ue(280));var e=t.stateNode;e&&(e=K1(e),f2(t.stateNode,t.type,e))}}function Z5(t){id?sd?sd.push(t):sd=[t]:id=t}function J5(){if(id){var t=id,e=sd;if(sd=id=null,MI(t),e)for(t=0;t>>=0,t===0?32:31-(xV(t)/bV|0)|0}var V0=64,$0=4194304;function mp(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ex(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=mp(a):(s&=o,s!==0&&(r=mp(s)))}else o=n&~i,o!==0?r=mp(o):s!==0&&(r=mp(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function tg(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-oo(e),t[e]=n}function MV(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Tp),kI=" ",LI=!1;function vD(t,e){switch(t){case"keyup":return JV.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xD(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Uf=!1;function e$(t,e){switch(t){case"compositionend":return xD(e);case"keypress":return e.which!==32?null:(LI=!0,kI);case"textInput":return t=e.data,t===kI&&LI?null:t;default:return null}}function t$(t,e){if(Uf)return t==="compositionend"||!RC&&vD(t,e)?(t=gD(),bv=EC=bl=null,Uf=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zI(n)}}function SD(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?SD(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function MD(){for(var t=window,e=Kv();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Kv(t.document)}return e}function AC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function u$(t){var e=MD(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&SD(n.ownerDocument.documentElement,n)){if(r!==null&&AC(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=UI(n,s);var o=UI(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bf=null,y2=null,Rp=null,v2=!1;function BI(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;v2||Bf==null||Bf!==Kv(r)||(r=Bf,"selectionStart"in r&&AC(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rp&&om(Rp,r)||(Rp=r,r=rx(y2,"onSelect"),0$f||(t.current=M2[$f],M2[$f]=null,$f--)}function Sn(t,e){$f++,M2[$f]=t.current,t.current=e}var Dl={},Zr=$l(Dl),Oi=$l(!1),su=Dl;function yd(t,e){var n=t.type.contextTypes;if(!n)return Dl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Di(t){return t=t.childContextTypes,t!=null}function sx(){Tn(Oi),Tn(Zr)}function XI(t,e,n){if(Zr.current!==Dl)throw Error(Ue(168));Sn(Zr,e),Sn(Oi,n)}function kD(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Ue(108,sV(t)||"Unknown",i));return Dn({},n,r)}function ox(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Dl,su=Zr.current,Sn(Zr,t),Sn(Oi,Oi.current),!0}function qI(t,e,n){var r=t.stateNode;if(!r)throw Error(Ue(169));n?(t=kD(t,e,su),r.__reactInternalMemoizedMergedChildContext=t,Tn(Oi),Tn(Zr),Sn(Zr,t)):Tn(Oi),Sn(Oi,n)}var ga=null,Z1=!1,WS=!1;function LD(t){ga===null?ga=[t]:ga.push(t)}function w$(t){Z1=!0,LD(t)}function Wl(){if(!WS&&ga!==null){WS=!0;var t=0,e=gn;try{var n=ga;for(gn=1;t>=o,i-=o,_a=1<<32-oo(e)+i|n<L?(k=A,A=null):k=A.sibling;var T=h(g,A,_[L],S);if(T===null){A===null&&(A=k);break}t&&A&&T.alternate===null&&e(g,A),b=s(T,b,L),P===null?C=T:P.sibling=T,P=T,A=k}if(L===_.length)return n(g,A),Pn&&wc(g,L),C;if(A===null){for(;L<_.length;L++)A=f(g,_[L],S),A!==null&&(b=s(A,b,L),P===null?C=A:P.sibling=A,P=A);return Pn&&wc(g,L),C}for(A=r(g,A);L<_.length;L++)k=m(A,g,L,_[L],S),k!==null&&(t&&k.alternate!==null&&A.delete(k.key===null?L:k.key),b=s(k,b,L),P===null?C=k:P.sibling=k,P=k);return t&&A.forEach(function(N){return e(g,N)}),Pn&&wc(g,L),C}function x(g,b,_,S){var C=kh(_);if(typeof C!="function")throw Error(Ue(150));if(_=C.call(_),_==null)throw Error(Ue(151));for(var P=C=null,A=b,L=b=0,k=null,T=_.next();A!==null&&!T.done;L++,T=_.next()){A.index>L?(k=A,A=null):k=A.sibling;var N=h(g,A,T.value,S);if(N===null){A===null&&(A=k);break}t&&A&&N.alternate===null&&e(g,A),b=s(N,b,L),P===null?C=N:P.sibling=N,P=N,A=k}if(T.done)return n(g,A),Pn&&wc(g,L),C;if(A===null){for(;!T.done;L++,T=_.next())T=f(g,T.value,S),T!==null&&(b=s(T,b,L),P===null?C=T:P.sibling=T,P=T);return Pn&&wc(g,L),C}for(A=r(g,A);!T.done;L++,T=_.next())T=m(A,g,L,T.value,S),T!==null&&(t&&T.alternate!==null&&A.delete(T.key===null?L:T.key),b=s(T,b,L),P===null?C=T:P.sibling=T,P=T);return t&&A.forEach(function(z){return e(g,z)}),Pn&&wc(g,L),C}function v(g,b,_,S){if(typeof _=="object"&&_!==null&&_.type===zf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case U0:e:{for(var C=_.key,P=b;P!==null;){if(P.key===C){if(C=_.type,C===zf){if(P.tag===7){n(g,P.sibling),b=i(P,_.props.children),b.return=g,g=b;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===pl&&ZI(C)===P.type){n(g,P.sibling),b=i(P,_.props),b.ref=zh(g,P,_),b.return=g,g=b;break e}n(g,P);break}else e(g,P);P=P.sibling}_.type===zf?(b=Wc(_.props.children,g.mode,S,_.key),b.return=g,g=b):(S=Rv(_.type,_.key,_.props,null,g.mode,S),S.ref=zh(g,b,_),S.return=g,g=S)}return o(g);case Ff:e:{for(P=_.key;b!==null;){if(b.key===P)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){n(g,b.sibling),b=i(b,_.children||[]),b.return=g,g=b;break e}else{n(g,b);break}else e(g,b);b=b.sibling}b=JS(_,g.mode,S),b.return=g,g=b}return o(g);case pl:return P=_._init,v(g,b,P(_._payload),S)}if(pp(_))return y(g,b,_,S);if(kh(_))return x(g,b,_,S);K0(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,b!==null&&b.tag===6?(n(g,b.sibling),b=i(b,_),b.return=g,g=b):(n(g,b),b=ZS(_,g.mode,S),b.return=g,g=b),o(g)):n(g,b)}return v}var xd=zD(!0),UD=zD(!1),cx=$l(null),ux=null,Gf=null,kC=null;function LC(){kC=Gf=ux=null}function OC(t){var e=cx.current;Tn(cx),t._currentValue=e}function C2(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ad(t,e){ux=t,kC=Gf=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ki=!0),t.firstContext=null)}function Os(t){var e=t._currentValue;if(kC!==t)if(t={context:t,memoizedValue:e,next:null},Gf===null){if(ux===null)throw Error(Ue(308));Gf=t,ux.dependencies={lanes:0,firstContext:t}}else Gf=Gf.next=t;return e}var Lc=null;function DC(t){Lc===null?Lc=[t]:Lc.push(t)}function BD(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,DC(e)):(n.next=i.next,i.next=n),e.interleaved=n,ka(t,r)}function ka(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ml=!1;function FC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jD(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ta(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,sn&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,ka(t,n)}return i=r.interleaved,i===null?(e.next=e,DC(r)):(e.next=i.next,i.next=e),r.interleaved=e,ka(t,n)}function wv(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,wC(t,n)}}function JI(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function fx(t,e,n,r){var i=t.updateQueue;ml=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,u=c=l=null,a=s;do{var h=a.lane,m=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,x=a;switch(h=e,m=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){f=y.call(m,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,h=typeof y=="function"?y.call(m,f,h):y,h==null)break e;f=Dn({},f,h);break e;case 2:ml=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=f):u=u.next=m,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);lu|=o,t.lanes=o,t.memoizedState=f}}function QI(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=GS.transition;GS.transition={};try{t(!1),e()}finally{gn=n,GS.transition=r}}function iF(){return Ds().memoizedState}function T$(t,e,n){var r=Pl(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sF(t))oF(e,n);else if(n=BD(t,e,n,r),n!==null){var i=ui();ao(n,t,r,i),aF(n,e,r)}}function C$(t,e,n){var r=Pl(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sF(t))oF(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,co(a,o)){var l=e.interleaved;l===null?(i.next=i,DC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=BD(t,e,i,r),n!==null&&(i=ui(),ao(n,t,r,i),aF(n,e,r))}}function sF(t){var e=t.alternate;return t===On||e!==null&&e===On}function oF(t,e){Ap=hx=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function aF(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,wC(t,n)}}var px={readContext:Os,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},R$={readContext:Os,useCallback:function(t,e){return Ao().memoizedState=[t,e===void 0?null:e],t},useContext:Os,useEffect:tN,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Mv(4194308,4,QD.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Mv(4194308,4,t,e)},useInsertionEffect:function(t,e){return Mv(4,2,t,e)},useMemo:function(t,e){var n=Ao();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ao();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=T$.bind(null,On,t),[r.memoizedState,t]},useRef:function(t){var e=Ao();return t={current:t},e.memoizedState=t},useState:eN,useDebugValue:HC,useDeferredValue:function(t){return Ao().memoizedState=t},useTransition:function(){var t=eN(!1),e=t[0];return t=E$.bind(null,t[1]),Ao().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=On,i=Ao();if(Pn){if(n===void 0)throw Error(Ue(407));n=n()}else{if(n=e(),wr===null)throw Error(Ue(349));au&30||HD(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,tN(XD.bind(null,r,s,t),[t]),r.flags|=2048,pm(9,GD.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Ao(),e=wr.identifierPrefix;if(Pn){var n=wa,r=_a;n=(r&~(1<<32-oo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=dm++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{AS=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?pp(t):""}function lV(t){switch(t.tag){case 5:return pp(t.type);case 16:return pp("Lazy");case 13:return pp("Suspense");case 19:return pp("SuspenseList");case 0:case 2:case 15:return t=PS(t.type,!1),t;case 11:return t=PS(t.type.render,!1),t;case 1:return t=PS(t.type,!0),t;default:return""}}function n2(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case zf:return"Fragment";case Ff:return"Portal";case QE:return"Profiler";case gC:return"StrictMode";case e2:return"Suspense";case t2:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case WD:return(t.displayName||"Context")+".Consumer";case $D:return(t._context.displayName||"Context")+".Provider";case yC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case vC:return e=t.displayName||null,e!==null?e:n2(t.type)||"Memo";case pl:e=t._payload,t=t._init;try{return n2(t(e))}catch{}}return null}function cV(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return n2(e);case 8:return e===gC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ol(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function GD(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function uV(t){var e=GD(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function B0(t){t._valueTracker||(t._valueTracker=uV(t))}function XD(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=GD(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Kv(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function r2(t,e){var n=e.checked;return Fn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function vI(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Ol(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function qD(t,e){e=e.checked,e!=null&&mC(t,"checked",e,!1)}function i2(t,e){qD(t,e);var n=Ol(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?s2(t,e.type,n):e.hasOwnProperty("defaultValue")&&s2(t,e.type,Ol(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function xI(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function s2(t,e,n){(e!=="number"||Kv(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var mp=Array.isArray;function id(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=j0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function em(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Mp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fV=["Webkit","ms","Moz","O"];Object.keys(Mp).forEach(function(t){fV.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Mp[e]=Mp[t]})});function JD(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Mp.hasOwnProperty(t)&&Mp[t]?(""+e).trim():e+"px"}function QD(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=JD(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var dV=Fn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function l2(t,e){if(e){if(dV[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ue(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ue(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ue(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ue(62))}}function c2(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var u2=null;function xC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var f2=null,sd=null,od=null;function wI(t){if(t=rg(t)){if(typeof f2!="function")throw Error(Ue(280));var e=t.stateNode;e&&(e=K1(e),f2(t.stateNode,t.type,e))}}function e5(t){sd?od?od.push(t):od=[t]:sd=t}function t5(){if(sd){var t=sd,e=od;if(od=sd=null,wI(t),e)for(t=0;t>>=0,t===0?32:31-(SV(t)/MV|0)|0}var V0=64,$0=4194304;function gp(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ex(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=gp(a):(s&=o,s!==0&&(r=gp(s)))}else o=n&~i,o!==0?r=gp(o):s!==0&&(r=gp(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function tg(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-oo(e),t[e]=n}function RV(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Tp),II=" ",NI=!1;function _5(t,e){switch(t){case"keyup":return n$.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Uf=!1;function i$(t,e){switch(t){case"compositionend":return w5(e);case"keypress":return e.which!==32?null:(NI=!0,II);case"textInput":return t=e.data,t===II&&NI?null:t;default:return null}}function s$(t,e){if(Uf)return t==="compositionend"||!CC&&_5(t,e)?(t=x5(),bv=MC=bl=null,Uf=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=DI(n)}}function T5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?T5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function C5(){for(var t=window,e=Kv();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Kv(t.document)}return e}function RC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function p$(t){var e=C5(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&T5(n.ownerDocument.documentElement,n)){if(r!==null&&RC(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=FI(n,s);var o=FI(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bf=null,y2=null,Rp=null,v2=!1;function zI(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;v2||Bf==null||Bf!==Kv(r)||(r=Bf,"selectionStart"in r&&RC(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rp&&om(Rp,r)||(Rp=r,r=rx(y2,"onSelect"),0$f||(t.current=M2[$f],M2[$f]=null,$f--)}function Sn(t,e){$f++,M2[$f]=t.current,t.current=e}var Dl={},Zr=$l(Dl),Oi=$l(!1),su=Dl;function vd(t,e){var n=t.type.contextTypes;if(!n)return Dl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Di(t){return t=t.childContextTypes,t!=null}function sx(){Tn(Oi),Tn(Zr)}function HI(t,e,n){if(Zr.current!==Dl)throw Error(Ue(168));Sn(Zr,e),Sn(Oi,n)}function D5(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Ue(108,cV(t)||"Unknown",i));return Fn({},n,r)}function ox(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Dl,su=Zr.current,Sn(Zr,t),Sn(Oi,Oi.current),!0}function GI(t,e,n){var r=t.stateNode;if(!r)throw Error(Ue(169));n?(t=D5(t,e,su),r.__reactInternalMemoizedMergedChildContext=t,Tn(Oi),Tn(Zr),Sn(Zr,t)):Tn(Oi),Sn(Oi,n)}var ga=null,Z1=!1,WS=!1;function F5(t){ga===null?ga=[t]:ga.push(t)}function T$(t){Z1=!0,F5(t)}function Wl(){if(!WS&&ga!==null){WS=!0;var t=0,e=gn;try{var n=ga;for(gn=1;t>=o,i-=o,_a=1<<32-oo(e)+i|n<L?(k=A,A=null):k=A.sibling;var T=h(g,A,_[L],S);if(T===null){A===null&&(A=k);break}t&&A&&T.alternate===null&&e(g,A),b=s(T,b,L),P===null?C=T:P.sibling=T,P=T,A=k}if(L===_.length)return n(g,A),Pn&&wc(g,L),C;if(A===null){for(;L<_.length;L++)A=f(g,_[L],S),A!==null&&(b=s(A,b,L),P===null?C=A:P.sibling=A,P=A);return Pn&&wc(g,L),C}for(A=r(g,A);L<_.length;L++)k=m(A,g,L,_[L],S),k!==null&&(t&&k.alternate!==null&&A.delete(k.key===null?L:k.key),b=s(k,b,L),P===null?C=k:P.sibling=k,P=k);return t&&A.forEach(function(N){return e(g,N)}),Pn&&wc(g,L),C}function x(g,b,_,S){var C=Lh(_);if(typeof C!="function")throw Error(Ue(150));if(_=C.call(_),_==null)throw Error(Ue(151));for(var P=C=null,A=b,L=b=0,k=null,T=_.next();A!==null&&!T.done;L++,T=_.next()){A.index>L?(k=A,A=null):k=A.sibling;var N=h(g,A,T.value,S);if(N===null){A===null&&(A=k);break}t&&A&&N.alternate===null&&e(g,A),b=s(N,b,L),P===null?C=N:P.sibling=N,P=N,A=k}if(T.done)return n(g,A),Pn&&wc(g,L),C;if(A===null){for(;!T.done;L++,T=_.next())T=f(g,T.value,S),T!==null&&(b=s(T,b,L),P===null?C=T:P.sibling=T,P=T);return Pn&&wc(g,L),C}for(A=r(g,A);!T.done;L++,T=_.next())T=m(A,g,L,T.value,S),T!==null&&(t&&T.alternate!==null&&A.delete(T.key===null?L:T.key),b=s(T,b,L),P===null?C=T:P.sibling=T,P=T);return t&&A.forEach(function(z){return e(g,z)}),Pn&&wc(g,L),C}function v(g,b,_,S){if(typeof _=="object"&&_!==null&&_.type===zf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case U0:e:{for(var C=_.key,P=b;P!==null;){if(P.key===C){if(C=_.type,C===zf){if(P.tag===7){n(g,P.sibling),b=i(P,_.props.children),b.return=g,g=b;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===pl&&YI(C)===P.type){n(g,P.sibling),b=i(P,_.props),b.ref=Uh(g,P,_),b.return=g,g=b;break e}n(g,P);break}else e(g,P);P=P.sibling}_.type===zf?(b=Wc(_.props.children,g.mode,S,_.key),b.return=g,g=b):(S=Rv(_.type,_.key,_.props,null,g.mode,S),S.ref=Uh(g,b,_),S.return=g,g=S)}return o(g);case Ff:e:{for(P=_.key;b!==null;){if(b.key===P)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){n(g,b.sibling),b=i(b,_.children||[]),b.return=g,g=b;break e}else{n(g,b);break}else e(g,b);b=b.sibling}b=JS(_,g.mode,S),b.return=g,g=b}return o(g);case pl:return P=_._init,v(g,b,P(_._payload),S)}if(mp(_))return y(g,b,_,S);if(Lh(_))return x(g,b,_,S);K0(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,b!==null&&b.tag===6?(n(g,b.sibling),b=i(b,_),b.return=g,g=b):(n(g,b),b=ZS(_,g.mode,S),b.return=g,g=b),o(g)):n(g,b)}return v}var bd=j5(!0),V5=j5(!1),cx=$l(null),ux=null,Gf=null,NC=null;function kC(){NC=Gf=ux=null}function LC(t){var e=cx.current;Tn(cx),t._currentValue=e}function C2(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ld(t,e){ux=t,NC=Gf=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ki=!0),t.firstContext=null)}function Os(t){var e=t._currentValue;if(NC!==t)if(t={context:t,memoizedValue:e,next:null},Gf===null){if(ux===null)throw Error(Ue(308));Gf=t,ux.dependencies={lanes:0,firstContext:t}}else Gf=Gf.next=t;return e}var Lc=null;function OC(t){Lc===null?Lc=[t]:Lc.push(t)}function $5(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,OC(e)):(n.next=i.next,i.next=n),e.interleaved=n,ka(t,r)}function ka(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ml=!1;function DC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function W5(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ta(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,sn&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,ka(t,n)}return i=r.interleaved,i===null?(e.next=e,OC(r)):(e.next=i.next,i.next=e),r.interleaved=e,ka(t,n)}function wv(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,_C(t,n)}}function KI(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function fx(t,e,n,r){var i=t.updateQueue;ml=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,u=c=l=null,a=s;do{var h=a.lane,m=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,x=a;switch(h=e,m=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){f=y.call(m,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,h=typeof y=="function"?y.call(m,f,h):y,h==null)break e;f=Fn({},f,h);break e;case 2:ml=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=f):u=u.next=m,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);lu|=o,t.lanes=o,t.memoizedState=f}}function ZI(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=GS.transition;GS.transition={};try{t(!1),e()}finally{gn=n,GS.transition=r}}function aF(){return Ds().memoizedState}function P$(t,e,n){var r=Pl(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lF(t))cF(e,n);else if(n=$5(t,e,n,r),n!==null){var i=ui();ao(n,t,r,i),uF(n,e,r)}}function I$(t,e,n){var r=Pl(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lF(t))cF(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,co(a,o)){var l=e.interleaved;l===null?(i.next=i,OC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=$5(t,e,i,r),n!==null&&(i=ui(),ao(n,t,r,i),uF(n,e,r))}}function lF(t){var e=t.alternate;return t===Dn||e!==null&&e===Dn}function cF(t,e){Ap=hx=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function uF(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,_C(t,n)}}var px={readContext:Os,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},N$={readContext:Os,useCallback:function(t,e){return Ao().memoizedState=[t,e===void 0?null:e],t},useContext:Os,useEffect:QI,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Mv(4194308,4,nF.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Mv(4194308,4,t,e)},useInsertionEffect:function(t,e){return Mv(4,2,t,e)},useMemo:function(t,e){var n=Ao();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ao();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=P$.bind(null,Dn,t),[r.memoizedState,t]},useRef:function(t){var e=Ao();return t={current:t},e.memoizedState=t},useState:JI,useDebugValue:WC,useDeferredValue:function(t){return Ao().memoizedState=t},useTransition:function(){var t=JI(!1),e=t[0];return t=A$.bind(null,t[1]),Ao().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Dn,i=Ao();if(Pn){if(n===void 0)throw Error(Ue(407));n=n()}else{if(n=e(),wr===null)throw Error(Ue(349));au&30||q5(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,QI(K5.bind(null,r,s,t),[t]),r.flags|=2048,pm(9,Y5.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Ao(),e=wr.identifierPrefix;if(Pn){var n=wa,r=_a;n=(r&~(1<<32-oo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=dm++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[No]=e,t[cm]=r,yF(t,e,!1,!1),e.stateNode=t;e:{switch(o=c2(n,r),n){case"dialog":Mn("cancel",t),Mn("close",t),i=r;break;case"iframe":case"object":case"embed":Mn("load",t),i=r;break;case"video":case"audio":for(i=0;iwd&&(e.flags|=128,r=!0,Uh(s,!1),e.lanes=4194304)}else{if(!r)if(t=dx(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Uh(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Pn)return jr(e),null}else 2*qn()-s.renderingStartTime>wd&&n!==1073741824&&(e.flags|=128,r=!0,Uh(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=qn(),e.sibling=null,n=kn.current,Sn(kn,r?n&1|2:n&1),e):(jr(e),null);case 22:case 23:return ZC(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Ji&1073741824&&(jr(e),e.subtreeFlags&6&&(e.flags|=8192)):jr(e),null;case 24:return null;case 25:return null}throw Error(Ue(156,e.tag))}function D$(t,e){switch(IC(e),e.tag){case 1:return Di(e.type)&&sx(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return bd(),Tn(Oi),Tn(Zr),BC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return UC(e),null;case 13:if(Tn(kn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ue(340));vd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Tn(kn),null;case 4:return bd(),null;case 10:return OC(e.type._context),null;case 22:case 23:return ZC(),null;case 24:return null;default:return null}}var J0=!1,qr=!1,F$=typeof WeakSet=="function"?WeakSet:Set,ft=null;function Xf(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$n(t,e,r)}else n.current=null}function D2(t,e,n){try{n()}catch(r){$n(t,e,r)}}var dN=!1;function z$(t,e){if(x2=tx,t=MD(),AC(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=o),h===s&&++u===r&&(l=o),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(b2={focusedElem:t,selectionRange:n},tx=!1,ft=e;ft!==null;)if(e=ft,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ft=t;else for(;ft!==null;){e=ft;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,v=y.memoizedState,g=e.stateNode,b=g.getSnapshotBeforeUpdate(e.elementType===e.type?x:Js(e.type,x),v);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ue(163))}}catch(S){$n(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,ft=t;break}ft=e.return}return y=dN,dN=!1,y}function Pp(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&D2(e,n,s)}i=i.next}while(i!==r)}}function eb(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function F2(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function bF(t){var e=t.alternate;e!==null&&(t.alternate=null,bF(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[No],delete e[cm],delete e[S2],delete e[b$],delete e[_$])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function _F(t){return t.tag===5||t.tag===3||t.tag===4}function hN(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||_F(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function z2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ix));else if(r!==4&&(t=t.child,t!==null))for(z2(t,e,n),t=t.sibling;t!==null;)z2(t,e,n),t=t.sibling}function U2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(U2(t,e,n),t=t.sibling;t!==null;)U2(t,e,n),t=t.sibling}var Ar=null,eo=!1;function rl(t,e,n){for(n=n.child;n!==null;)wF(t,e,n),n=n.sibling}function wF(t,e,n){if(Do&&typeof Do.onCommitFiberUnmount=="function")try{Do.onCommitFiberUnmount(G1,n)}catch{}switch(n.tag){case 5:qr||Xf(n,e);case 6:var r=Ar,i=eo;Ar=null,rl(t,e,n),Ar=r,eo=i,Ar!==null&&(eo?(t=Ar,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ar.removeChild(n.stateNode));break;case 18:Ar!==null&&(eo?(t=Ar,n=n.stateNode,t.nodeType===8?$S(t.parentNode,n):t.nodeType===1&&$S(t,n),im(t)):$S(Ar,n.stateNode));break;case 4:r=Ar,i=eo,Ar=n.stateNode.containerInfo,eo=!0,rl(t,e,n),Ar=r,eo=i;break;case 0:case 11:case 14:case 15:if(!qr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&D2(n,e,o),i=i.next}while(i!==r)}rl(t,e,n);break;case 1:if(!qr&&(Xf(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$n(n,e,a)}rl(t,e,n);break;case 21:rl(t,e,n);break;case 22:n.mode&1?(qr=(r=qr)||n.memoizedState!==null,rl(t,e,n),qr=r):rl(t,e,n);break;default:rl(t,e,n)}}function pN(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new F$),e.forEach(function(r){var i=X$.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Xs(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=qn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*B$(r/1960))-r,10t?16:t,_l===null)var r=!1;else{if(t=_l,_l=null,yx=0,sn&6)throw Error(Ue(331));var i=sn;for(sn|=4,ft=t.current;ft!==null;){var s=ft,o=s.child;if(ft.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lqn()-YC?$c(t,0):qC|=n),Fi(t,e)}function PF(t,e){e===0&&(t.mode&1?(e=$0,$0<<=1,!($0&130023424)&&($0=4194304)):e=1);var n=ui();t=ka(t,e),t!==null&&(tg(t,e,n),Fi(t,n))}function G$(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),PF(t,n)}function X$(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Ue(314))}r!==null&&r.delete(e),PF(t,n)}var IF;IF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Oi.current)ki=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ki=!1,L$(t,e,n);ki=!!(t.flags&131072)}else ki=!1,Pn&&e.flags&1048576&&OD(e,lx,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ev(t,e),t=e.pendingProps;var i=yd(e,Zr.current);ad(e,n),i=VC(null,e,r,t,i,n);var s=$C();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Di(r)?(s=!0,ox(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,FC(e),i.updater=Q1,e.stateNode=i,i._reactInternals=e,A2(e,r,t,n),e=N2(null,e,r,!0,s,n)):(e.tag=0,Pn&&s&&PC(e),si(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ev(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Y$(r),t=Js(r,t),i){case 0:e=I2(null,e,r,t,n);break e;case 1:e=cN(null,e,r,t,n);break e;case 11:e=aN(null,e,r,t,n);break e;case 14:e=lN(null,e,r,Js(r.type,t),n);break e}throw Error(Ue(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),I2(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),cN(t,e,r,i,n);case 3:e:{if(pF(e),t===null)throw Error(Ue(387));r=e.pendingProps,s=e.memoizedState,i=s.element,jD(t,e),fx(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=_d(Error(Ue(423)),e),e=uN(t,e,r,n,i);break e}else if(r!==i){i=_d(Error(Ue(424)),e),e=uN(t,e,r,n,i);break e}else for(ns=Cl(e.stateNode.containerInfo.firstChild),rs=e,Pn=!0,to=null,n=UD(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vd(),r===i){e=La(t,e,n);break e}si(t,e,r,n)}e=e.child}return e;case 5:return VD(e),t===null&&T2(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,_2(r,i)?o=null:s!==null&&_2(r,s)&&(e.flags|=32),hF(t,e),si(t,e,o,n),e.child;case 6:return t===null&&T2(e),null;case 13:return mF(t,e,n);case 4:return zC(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=xd(e,null,r,n):si(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),aN(t,e,r,i,n);case 7:return si(t,e,e.pendingProps,n),e.child;case 8:return si(t,e,e.pendingProps.children,n),e.child;case 12:return si(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Sn(cx,r._currentValue),r._currentValue=o,s!==null)if(co(s.value,o)){if(s.children===i.children&&!Oi.current){e=La(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Ta(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),C2(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ue(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),C2(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}si(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ad(e,n),i=Os(i),r=r(i),e.flags|=1,si(t,e,r,n),e.child;case 14:return r=e.type,i=Js(r,e.pendingProps),i=Js(r.type,i),lN(t,e,r,i,n);case 15:return fF(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),Ev(t,e),e.tag=1,Di(r)?(t=!0,ox(e)):t=!1,ad(e,n),lF(e,r,i),A2(e,r,i,n),N2(null,e,r,!0,t,n);case 19:return gF(t,e,n);case 22:return dF(t,e,n)}throw Error(Ue(156,e.tag))};function NF(t,e){return sD(t,e)}function q$(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ns(t,e,n,r){return new q$(t,e,n,r)}function QC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Y$(t){if(typeof t=="function")return QC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===vC)return 11;if(t===xC)return 14}return 2}function Il(t,e){var n=t.alternate;return n===null?(n=Ns(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Rv(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")QC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case zf:return Wc(n.children,i,s,e);case yC:o=8,i|=8;break;case QE:return t=Ns(12,n,e,i|2),t.elementType=QE,t.lanes=s,t;case e2:return t=Ns(13,n,e,i),t.elementType=e2,t.lanes=s,t;case t2:return t=Ns(19,n,e,i),t.elementType=t2,t.lanes=s,t;case V5:return nb(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case B5:o=10;break e;case j5:o=9;break e;case vC:o=11;break e;case xC:o=14;break e;case pl:o=16,r=null;break e}throw Error(Ue(130,t==null?t:typeof t,""))}return e=Ns(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Wc(t,e,n,r){return t=Ns(7,t,r,e),t.lanes=n,t}function nb(t,e,n,r){return t=Ns(22,t,r,e),t.elementType=V5,t.lanes=n,t.stateNode={isHidden:!1},t}function ZS(t,e,n){return t=Ns(6,t,null,e),t.lanes=n,t}function JS(t,e,n){return e=Ns(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function K$(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=NS(0),this.expirationTimes=NS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=NS(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function eR(t,e,n,r,i,s,o,a,l){return t=new K$(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ns(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},FC(s),t}function Z$(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(DF)}catch(t){console.error(t)}}DF(),D5.exports=ds;var Hl=D5.exports;const yp=Va(Hl);var iR,wN=Hl;iR=wN.createRoot,wN.hydrateRoot;function FF(t,e){return function(){return t.apply(e,arguments)}}const{toString:tW}=Object.prototype,{getPrototypeOf:sR}=Object,ab=(t=>e=>{const n=tW.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),po=t=>(t=t.toLowerCase(),e=>ab(e)===t),lb=t=>e=>typeof e===t,{isArray:Gd}=Array,gm=lb("undefined");function nW(t){return t!==null&&!gm(t)&&t.constructor!==null&&!gm(t.constructor)&&is(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const zF=po("ArrayBuffer");function rW(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&zF(t.buffer),e}const iW=lb("string"),is=lb("function"),UF=lb("number"),cb=t=>t!==null&&typeof t=="object",sW=t=>t===!0||t===!1,Av=t=>{if(ab(t)!=="object")return!1;const e=sR(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},oW=po("Date"),aW=po("File"),lW=po("Blob"),cW=po("FileList"),uW=t=>cb(t)&&is(t.pipe),fW=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||is(t.append)&&((e=ab(t))==="formdata"||e==="object"&&is(t.toString)&&t.toString()==="[object FormData]"))},dW=po("URLSearchParams"),[hW,pW,mW,gW]=["ReadableStream","Request","Response","Headers"].map(po),yW=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sg(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Gd(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Dc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jF=t=>!gm(t)&&t!==Dc;function W2(){const{caseless:t}=jF(this)&&this||{},e={},n=(r,i)=>{const s=t&&BF(e,i)||i;Av(e[s])&&Av(r)?e[s]=W2(e[s],r):Av(r)?e[s]=W2({},r):Gd(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r(sg(e,(i,s)=>{n&&is(i)?t[s]=FF(i,n):t[s]=i},{allOwnKeys:r}),t),xW=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),bW=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},_W=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&sR(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},wW=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},SW=t=>{if(!t)return null;if(Gd(t))return t;let e=t.length;if(!UF(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},MW=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&sR(Uint8Array)),EW=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},TW=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},CW=po("HTMLFormElement"),RW=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),SN=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),AW=po("RegExp"),VF=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};sg(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},PW=t=>{VF(t,(e,n)=>{if(is(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(is(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},IW=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Gd(t)?r(t):r(String(t).split(e)),n},NW=()=>{},kW=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,QS="abcdefghijklmnopqrstuvwxyz",MN="0123456789",$F={DIGIT:MN,ALPHA:QS,ALPHA_DIGIT:QS+QS.toUpperCase()+MN},LW=(t=16,e=$F.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function OW(t){return!!(t&&is(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const DW=t=>{const e=new Array(10),n=(r,i)=>{if(cb(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=Gd(r)?[]:{};return sg(r,(o,a)=>{const l=n(o,i+1);!gm(l)&&(s[a]=l)}),e[i]=void 0,s}}return r};return n(t,0)},FW=po("AsyncFunction"),zW=t=>t&&(cb(t)||is(t))&&is(t.then)&&is(t.catch),WF=((t,e)=>t?setImmediate:e?((n,r)=>(Dc.addEventListener("message",({source:i,data:s})=>{i===Dc&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Dc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",is(Dc.postMessage)),UW=typeof queueMicrotask<"u"?queueMicrotask.bind(Dc):typeof process<"u"&&process.nextTick||WF,we={isArray:Gd,isArrayBuffer:zF,isBuffer:nW,isFormData:fW,isArrayBufferView:rW,isString:iW,isNumber:UF,isBoolean:sW,isObject:cb,isPlainObject:Av,isReadableStream:hW,isRequest:pW,isResponse:mW,isHeaders:gW,isUndefined:gm,isDate:oW,isFile:aW,isBlob:lW,isRegExp:AW,isFunction:is,isStream:uW,isURLSearchParams:dW,isTypedArray:MW,isFileList:cW,forEach:sg,merge:W2,extend:vW,trim:yW,stripBOM:xW,inherits:bW,toFlatObject:_W,kindOf:ab,kindOfTest:po,endsWith:wW,toArray:SW,forEachEntry:EW,matchAll:TW,isHTMLForm:CW,hasOwnProperty:SN,hasOwnProp:SN,reduceDescriptors:VF,freezeMethods:PW,toObjectSet:IW,toCamelCase:RW,noop:NW,toFiniteNumber:kW,findKey:BF,global:Dc,isContextDefined:jF,ALPHABET:$F,generateString:LW,isSpecCompliantForm:OW,toJSONObject:DW,isAsyncFn:FW,isThenable:zW,setImmediate:WF,asap:UW};function Ut(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}we.inherits(Ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:we.toJSONObject(this.config),code:this.code,status:this.status}}});const HF=Ut.prototype,GF={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{GF[t]={value:t}});Object.defineProperties(Ut,GF);Object.defineProperty(HF,"isAxiosError",{value:!0});Ut.from=(t,e,n,r,i,s)=>{const o=Object.create(HF);return we.toFlatObject(t,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ut.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const BW=null;function H2(t){return we.isPlainObject(t)||we.isArray(t)}function XF(t){return we.endsWith(t,"[]")?t.slice(0,-2):t}function EN(t,e,n){return t?t.concat(e).map(function(i,s){return i=XF(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function jW(t){return we.isArray(t)&&!t.some(H2)}const VW=we.toFlatObject(we,{},null,function(e){return/^is[A-Z]/.test(e)});function ub(t,e,n){if(!we.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=we.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!we.isUndefined(v[x])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&we.isSpecCompliantForm(e);if(!we.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(we.isDate(y))return y.toISOString();if(!l&&we.isBlob(y))throw new Ut("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(y)||we.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,x,v){let g=y;if(y&&!v&&typeof y=="object"){if(we.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=JSON.stringify(y);else if(we.isArray(y)&&jW(y)||(we.isFileList(y)||we.endsWith(x,"[]"))&&(g=we.toArray(y)))return x=XF(x),g.forEach(function(_,S){!(we.isUndefined(_)||_===null)&&e.append(o===!0?EN([x],S,s):o===null?x:x+"[]",c(_))}),!1}return H2(y)?!0:(e.append(EN(v,x,s),c(y)),!1)}const f=[],h=Object.assign(VW,{defaultVisitor:u,convertValue:c,isVisitable:H2});function m(y,x){if(!we.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(y),we.forEach(y,function(g,b){(!(we.isUndefined(g)||g===null)&&i.call(e,g,we.isString(b)?b.trim():b,x,h))===!0&&m(g,x?x.concat(b):[b])}),f.pop()}}if(!we.isObject(t))throw new TypeError("data must be an object");return m(t),e}function TN(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function oR(t,e){this._pairs=[],t&&ub(t,this,e)}const qF=oR.prototype;qF.append=function(e,n){this._pairs.push([e,n])};qF.toString=function(e){const n=e?function(r){return e.call(this,r,TN)}:TN;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function $W(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function YF(t,e,n){if(!e)return t;const r=n&&n.encode||$W;we.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=we.isURLSearchParams(e)?e.toString():new oR(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class CN{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){we.forEach(this.handlers,function(r){r!==null&&e(r)})}}const KF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},WW=typeof URLSearchParams<"u"?URLSearchParams:oR,HW=typeof FormData<"u"?FormData:null,GW=typeof Blob<"u"?Blob:null,XW={isBrowser:!0,classes:{URLSearchParams:WW,FormData:HW,Blob:GW},protocols:["http","https","file","blob","url","data"]},aR=typeof window<"u"&&typeof document<"u",G2=typeof navigator=="object"&&navigator||void 0,qW=aR&&(!G2||["ReactNative","NativeScript","NS"].indexOf(G2.product)<0),YW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",KW=aR&&window.location.href||"http://localhost",ZW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:aR,hasStandardBrowserEnv:qW,hasStandardBrowserWebWorkerEnv:YW,navigator:G2,origin:KW},Symbol.toStringTag,{value:"Module"})),Yr={...ZW,...XW};function JW(t,e){return ub(t,new Yr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Yr.isNode&&we.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function QW(t){return we.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function eH(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r=n.length;return o=!o&&we.isArray(i)?i.length:o,l?(we.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!we.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&we.isArray(i[o])&&(i[o]=eH(i[o])),!a)}if(we.isFormData(t)&&we.isFunction(t.entries)){const n={};return we.forEachEntry(t,(r,i)=>{e(QW(r),i,n,0)}),n}return null}function tH(t,e,n){if(we.isString(t))try{return(e||JSON.parse)(t),we.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const og={transitional:KF,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=we.isObject(e);if(s&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return i?JSON.stringify(ZF(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e)||we.isReadableStream(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return JW(e,this.formSerializer).toString();if((a=we.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ub(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),tH(e)):e}],transformResponse:[function(e){const n=this.transitional||og.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(we.isResponse(e)||we.isReadableStream(e))return e;if(e&&we.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Ut.from(a,Ut.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yr.classes.FormData,Blob:Yr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};we.forEach(["delete","get","head","post","put","patch"],t=>{og.headers[t]={}});const nH=we.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rH=t=>{const e={};let n,r,i;return t&&t.split(` -`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&nH[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},RN=Symbol("internals");function jh(t){return t&&String(t).trim().toLowerCase()}function Pv(t){return t===!1||t==null?t:we.isArray(t)?t.map(Pv):String(t)}function iH(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const sH=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function eM(t,e,n,r,i){if(we.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!we.isString(e)){if(we.isString(r))return e.indexOf(r)!==-1;if(we.isRegExp(r))return r.test(e)}}function oH(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function aH(t,e){const n=we.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}class zi{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,l,c){const u=jh(l);if(!u)throw new Error("header name must be a non-empty string");const f=we.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Pv(a))}const o=(a,l)=>we.forEach(a,(c,u)=>s(c,u,l));if(we.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(we.isString(e)&&(e=e.trim())&&!sH(e))o(rH(e),n);else if(we.isHeaders(e))for(const[a,l]of e.entries())s(l,a,r);else e!=null&&s(n,e,r);return this}get(e,n){if(e=jh(e),e){const r=we.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return iH(i);if(we.isFunction(n))return n.call(this,i,r);if(we.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=jh(e),e){const r=we.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||eM(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=jh(o),o){const a=we.findKey(r,o);a&&(!n||eM(r,r[a],a,n))&&(delete r[a],i=!0)}}return we.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||eM(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return we.forEach(this,(i,s)=>{const o=we.findKey(r,s);if(o){n[o]=Pv(i),delete n[s];return}const a=e?oH(s):String(s).trim();a!==s&&delete n[s],n[a]=Pv(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return we.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&we.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[RN]=this[RN]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=jh(o);r[a]||(aH(i,o),r[a]=!0)}return we.isArray(e)?e.forEach(s):s(e),this}}zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);we.reduceDescriptors(zi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});we.freezeMethods(zi);function tM(t,e){const n=this||og,r=e||n,i=zi.from(r.headers);let s=r.data;return we.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function JF(t){return!!(t&&t.__CANCEL__)}function Xd(t,e,n){Ut.call(this,t??"canceled",Ut.ERR_CANCELED,e,n),this.name="CanceledError"}we.inherits(Xd,Ut,{__CANCEL__:!0});function QF(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ut("Request failed with status code "+n.status,[Ut.ERR_BAD_REQUEST,Ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function lH(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function cH(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let f=s,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o{n=u,i=null,s&&(clearTimeout(s),s=null),t.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const bx=(t,e,n=3)=>{let r=0;const i=cH(50,250);return uH(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},AN=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},PN=t=>(...e)=>we.asap(()=>t(...e)),fH=Yr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Yr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Yr.origin),Yr.navigator&&/(msie|trident)/i.test(Yr.navigator.userAgent)):()=>!0,dH=Yr.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];we.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),we.isString(r)&&o.push("path="+r),we.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hH(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function pH(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ez(t,e){return t&&!hH(e)?pH(t,e):e}const IN=t=>t instanceof zi?{...t}:t;function uu(t,e){e=e||{};const n={};function r(c,u,f,h){return we.isPlainObject(c)&&we.isPlainObject(u)?we.merge.call({caseless:h},c,u):we.isPlainObject(u)?we.merge({},u):we.isArray(u)?u.slice():u}function i(c,u,f,h){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c,f,h)}else return r(c,u,f,h)}function s(c,u){if(!we.isUndefined(u))return r(void 0,u)}function o(c,u){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in e)return r(c,u);if(f in t)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,f)=>i(IN(c),IN(u),f,!0)};return we.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,h=f(t[u],e[u],u);we.isUndefined(h)&&f!==a||(n[u]=h)}),n}const tz=t=>{const e=uu({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=zi.from(o),e.url=YF(ez(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(we.isFormData(n)){if(Yr.hasStandardBrowserEnv||Yr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Yr.hasStandardBrowserEnv&&(r&&we.isFunction(r)&&(r=r(e)),r||r!==!1&&fH(e.url))){const c=i&&s&&dH.read(s);c&&o.set(i,c)}return e},mH=typeof XMLHttpRequest<"u",gH=mH&&function(t){return new Promise(function(n,r){const i=tz(t);let s=i.data;const o=zi.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,m,y;function x(){m&&m(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function g(){if(!v)return;const _=zi.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:t,request:v};QF(function(A){n(A),x()},function(A){r(A),x()},C),v=null}"onloadend"in v?v.onloadend=g:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(g)},v.onabort=function(){v&&(r(new Ut("Request aborted",Ut.ECONNABORTED,t,v)),v=null)},v.onerror=function(){r(new Ut("Network Error",Ut.ERR_NETWORK,t,v)),v=null},v.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||KF;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ut(S,C.clarifyTimeoutError?Ut.ETIMEDOUT:Ut.ECONNABORTED,t,v)),v=null},s===void 0&&o.setContentType(null),"setRequestHeader"in v&&we.forEach(o.toJSON(),function(S,C){v.setRequestHeader(C,S)}),we.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),a&&a!=="json"&&(v.responseType=i.responseType),c&&([h,y]=bx(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([f,m]=bx(l),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(u=_=>{v&&(r(!_||_.type?new Xd(null,t,v):_),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=lH(i.url);if(b&&Yr.protocols.indexOf(b)===-1){r(new Ut("Unsupported protocol "+b+":",Ut.ERR_BAD_REQUEST,t));return}v.send(s||null)})},yH=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Ut?u:new Xd(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,s(new Ut(`timeout ${e} of ms exceeded`,Ut.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>we.asap(a),l}},vH=function*(t,e){let n=t.byteLength;if(n{const i=xH(t,e);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let f=u.byteLength;if(n){let h=s+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},fb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",nz=fb&&typeof ReadableStream=="function",_H=fb&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),rz=(t,...e)=>{try{return!!t(...e)}catch{return!1}},wH=nz&&rz(()=>{let t=!1;const e=new Request(Yr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),kN=64*1024,X2=nz&&rz(()=>we.isReadableStream(new Response("").body)),_x={stream:X2&&(t=>t.body)};fb&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!_x[e]&&(_x[e]=we.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ut(`Response type '${e}' is not supported`,Ut.ERR_NOT_SUPPORT,r)})})})(new Response);const SH=async t=>{if(t==null)return 0;if(we.isBlob(t))return t.size;if(we.isSpecCompliantForm(t))return(await new Request(Yr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(we.isArrayBufferView(t)||we.isArrayBuffer(t))return t.byteLength;if(we.isURLSearchParams(t)&&(t=t+""),we.isString(t))return(await _H(t)).byteLength},MH=async(t,e)=>{const n=we.toFiniteNumber(t.getContentLength());return n??SH(e)},EH=fb&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=tz(t);c=c?(c+"").toLowerCase():"text";let m=yH([i,s&&s.toAbortSignal()],o),y;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let v;try{if(l&&wH&&n!=="get"&&n!=="head"&&(v=await MH(u,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),P;if(we.isFormData(r)&&(P=C.headers.get("content-type"))&&u.setContentType(P),C.body){const[A,L]=AN(v,bx(PN(l)));r=NN(C.body,kN,A,L)}}we.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;y=new Request(e,{...h,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:g?f:void 0});let b=await fetch(y);const _=X2&&(c==="stream"||c==="response");if(X2&&(a||_&&x)){const C={};["status","statusText","headers"].forEach(k=>{C[k]=b[k]});const P=we.toFiniteNumber(b.headers.get("content-length")),[A,L]=a&&AN(P,bx(PN(a),!0))||[];b=new Response(NN(b.body,kN,A,()=>{L&&L(),x&&x()}),C)}c=c||"text";let S=await _x[we.findKey(_x,c)||"text"](b,t);return!_&&x&&x(),await new Promise((C,P)=>{QF(C,P,{data:S,headers:zi.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:y})})}catch(g){throw x&&x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Ut("Network Error",Ut.ERR_NETWORK,t,y),{cause:g.cause||g}):Ut.from(g,g&&g.code,t,y)}}),q2={http:BW,xhr:gH,fetch:EH};we.forEach(q2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const LN=t=>`- ${t}`,TH=t=>we.isFunction(t)||t===null||t===!1,iz={getAdapter:t=>{t=we.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since : -`+s.map(LN).join(` -`):" "+LN(s[0]):"as no adapter specified";throw new Ut("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:q2};function nM(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Xd(null,t)}function ON(t){return nM(t),t.headers=zi.from(t.headers),t.data=tM.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),iz.getAdapter(t.adapter||og.adapter)(t).then(function(r){return nM(t),r.data=tM.call(t,t.transformResponse,r),r.headers=zi.from(r.headers),r},function(r){return JF(r)||(nM(t),r&&r.response&&(r.response.data=tM.call(t,t.transformResponse,r.response),r.response.headers=zi.from(r.response.headers))),Promise.reject(r)})}const sz="1.7.9",db={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{db[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const DN={};db.transitional=function(e,n,r){function i(s,o){return"[Axios v"+sz+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new Ut(i(o," has been removed"+(n?" in "+n:"")),Ut.ERR_DEPRECATED);return n&&!DN[o]&&(DN[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};db.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function CH(t,e,n){if(typeof t!="object")throw new Ut("options must be an object",Ut.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],l=a===void 0||o(a,s,t);if(l!==!0)throw new Ut("option "+s+" must be "+l,Ut.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ut("Unknown option "+s,Ut.ERR_BAD_OPTION)}}const Iv={assertOptions:CH,validators:db},Co=Iv.validators;class Hc{constructor(e){this.defaults=e,this.interceptors={request:new CN,response:new CN}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=uu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Iv.assertOptions(r,{silentJSONParsing:Co.transitional(Co.boolean),forcedJSONParsing:Co.transitional(Co.boolean),clarifyTimeoutError:Co.transitional(Co.boolean)},!1),i!=null&&(we.isFunction(i)?n.paramsSerializer={serialize:i}:Iv.assertOptions(i,{encode:Co.function,serialize:Co.function},!0)),Iv.assertOptions(n,{baseUrl:Co.spelling("baseURL"),withXsrfToken:Co.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&we.merge(s.common,s[n.method]);s&&we.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=zi.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let u,f=0,h;if(!l){const y=[ON.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),h=y.length,u=Promise.resolve(n);f{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new Xd(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new lR(function(i){e=i}),cancel:e}}}function RH(t){return function(n){return t.apply(null,n)}}function AH(t){return we.isObject(t)&&t.isAxiosError===!0}const Y2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Y2).forEach(([t,e])=>{Y2[e]=t});function oz(t){const e=new Hc(t),n=FF(Hc.prototype.request,e);return we.extend(n,Hc.prototype,e,{allOwnKeys:!0}),we.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return oz(uu(t,i))},n}const Fn=oz(og);Fn.Axios=Hc;Fn.CanceledError=Xd;Fn.CancelToken=lR;Fn.isCancel=JF;Fn.VERSION=sz;Fn.toFormData=ub;Fn.AxiosError=Ut;Fn.Cancel=Fn.CanceledError;Fn.all=function(e){return Promise.all(e)};Fn.spread=RH;Fn.isAxiosError=AH;Fn.mergeConfig=uu;Fn.AxiosHeaders=zi;Fn.formToJSON=t=>ZF(we.isHTMLForm(t)?new FormData(t):t);Fn.getAdapter=iz.getAdapter;Fn.HttpStatusCode=Y2;Fn.default=Fn;const ym={black:"#000",white:"#fff"},Zu={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ju={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Qu={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ef={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},tf={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Vh={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},PH={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Oa(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n0?Pr(qd,--ji):0,Md--,er===10&&(Md=1,pb--),er}function ss(){return er=ji2||xm(er)>3?"":" "}function HH(t,e){for(;--e&&ss()&&!(er<48||er>102||er>57&&er<65||er>70&&er<97););return ag(t,Nv()+(e<6&&zo()==32&&ss()==32))}function Z2(t){for(;ss();)switch(er){case t:return ji;case 34:case 39:t!==34&&t!==39&&Z2(er);break;case 40:t===41&&Z2(t);break;case 92:ss();break}return ji}function GH(t,e){for(;ss()&&t+er!==57;)if(t+er===84&&zo()===47)break;return"/*"+ag(e,ji-1)+"*"+hb(t===47?t:ss())}function XH(t){for(;!xm(zo());)ss();return ag(t,ji)}function qH(t){return dz(Lv("",null,null,null,[""],t=fz(t),0,[0],t))}function Lv(t,e,n,r,i,s,o,a,l){for(var c=0,u=0,f=o,h=0,m=0,y=0,x=1,v=1,g=1,b=0,_="",S=i,C=s,P=r,A=_;v;)switch(y=b,b=ss()){case 40:if(y!=108&&Pr(A,f-1)==58){K2(A+=hn(kv(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:A+=kv(b);break;case 9:case 10:case 13:case 32:A+=WH(y);break;case 92:A+=HH(Nv()-1,7);continue;case 47:switch(zo()){case 42:case 47:ty(YH(GH(ss(),Nv()),e,n),l);break;default:A+="/"}break;case 123*x:a[c++]=Po(A)*g;case 125*x:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:g==-1&&(A=hn(A,/\f/g,"")),m>0&&Po(A)-f&&ty(m>32?zN(A+";",r,n,f-1):zN(hn(A," ","")+";",r,n,f-2),l);break;case 59:A+=";";default:if(ty(P=FN(A,e,n,c,u,i,a,_,S=[],C=[],f),s),b===123)if(u===0)Lv(A,e,P,P,S,s,f,a,C);else switch(h===99&&Pr(A,3)===110?100:h){case 100:case 108:case 109:case 115:Lv(t,P,P,r&&ty(FN(t,P,P,0,0,i,a,_,i,S=[],f),C),i,C,f,a,r?S:C);break;default:Lv(A,P,P,P,[""],C,0,a,C)}}c=u=m=0,x=g=1,_=A="",f=o;break;case 58:f=1+Po(A),m=y;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&$H()==125)continue}switch(A+=hb(b),b*x){case 38:g=u>0?1:(A+="\f",-1);break;case 44:a[c++]=(Po(A)-1)*g,g=1;break;case 64:zo()===45&&(A+=kv(ss())),h=zo(),u=f=Po(_=A+=XH(Nv())),b++;break;case 45:y===45&&Po(A)==2&&(x=0)}}return s}function FN(t,e,n,r,i,s,o,a,l,c,u){for(var f=i-1,h=i===0?s:[""],m=fR(h),y=0,x=0,v=0;y0?h[g]+" "+b:hn(b,/&\f/g,h[g])))&&(l[v++]=_);return mb(t,e,n,i===0?cR:a,l,c,u)}function YH(t,e,n){return mb(t,e,n,az,hb(VH()),vm(t,2,-2),0)}function zN(t,e,n,r){return mb(t,e,n,uR,vm(t,0,r),vm(t,r+1,-1),r)}function cd(t,e){for(var n="",r=fR(t),i=0;i6)switch(Pr(t,e+1)){case 109:if(Pr(t,e+4)!==45)break;case 102:return hn(t,/(.+:)(.+)-([^]+)/,"$1"+dn+"$2-$3$1"+wx+(Pr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~K2(t,"stretch")?pz(hn(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Pr(t,e+1)!==115)break;case 6444:switch(Pr(t,Po(t)-3-(~K2(t,"!important")&&10))){case 107:return hn(t,":",":"+dn)+t;case 101:return hn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dn+(Pr(t,14)===45?"inline-":"")+"box$3$1"+dn+"$2$3$1"+Hr+"$2box$3")+t}break;case 5936:switch(Pr(t,e+11)){case 114:return dn+t+Hr+hn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return dn+t+Hr+hn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return dn+t+Hr+hn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return dn+t+Hr+t+t}return t}var iG=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case uR:e.return=pz(e.value,e.length);break;case lz:return cd([$h(e,{value:hn(e.value,"@","@"+dn)})],i);case cR:if(e.length)return jH(e.props,function(s){switch(BH(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return cd([$h(e,{props:[hn(s,/:(read-\w+)/,":"+wx+"$1")]})],i);case"::placeholder":return cd([$h(e,{props:[hn(s,/:(plac\w+)/,":"+dn+"input-$1")]}),$h(e,{props:[hn(s,/:(plac\w+)/,":"+wx+"$1")]}),$h(e,{props:[hn(s,/:(plac\w+)/,Hr+"input-$1")]})],i)}return""})}},sG=[iG],mz=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var v=x.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||sG,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var v=x.getAttribute("data-emotion").split(" "),g=1;g<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[No]=e,t[cm]=r,bF(t,e,!1,!1),e.stateNode=t;e:{switch(o=c2(n,r),n){case"dialog":Mn("cancel",t),Mn("close",t),i=r;break;case"iframe":case"object":case"embed":Mn("load",t),i=r;break;case"video":case"audio":for(i=0;iSd&&(e.flags|=128,r=!0,Bh(s,!1),e.lanes=4194304)}else{if(!r)if(t=dx(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Bh(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Pn)return jr(e),null}else 2*qn()-s.renderingStartTime>Sd&&n!==1073741824&&(e.flags|=128,r=!0,Bh(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=qn(),e.sibling=null,n=Ln.current,Sn(Ln,r?n&1|2:n&1),e):(jr(e),null);case 22:case 23:return KC(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Ji&1073741824&&(jr(e),e.subtreeFlags&6&&(e.flags|=8192)):jr(e),null;case 24:return null;case 25:return null}throw Error(Ue(156,e.tag))}function B$(t,e){switch(PC(e),e.tag){case 1:return Di(e.type)&&sx(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return _d(),Tn(Oi),Tn(Zr),UC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return zC(e),null;case 13:if(Tn(Ln),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ue(340));xd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Tn(Ln),null;case 4:return _d(),null;case 10:return LC(e.type._context),null;case 22:case 23:return KC(),null;case 24:return null;default:return null}}var J0=!1,qr=!1,j$=typeof WeakSet=="function"?WeakSet:Set,ft=null;function Xf(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$n(t,e,r)}else n.current=null}function D2(t,e,n){try{n()}catch(r){$n(t,e,r)}}var uN=!1;function V$(t,e){if(x2=tx,t=C5(),RC(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=o),h===s&&++u===r&&(l=o),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(b2={focusedElem:t,selectionRange:n},tx=!1,ft=e;ft!==null;)if(e=ft,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ft=t;else for(;ft!==null;){e=ft;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,v=y.memoizedState,g=e.stateNode,b=g.getSnapshotBeforeUpdate(e.elementType===e.type?x:Js(e.type,x),v);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ue(163))}}catch(S){$n(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,ft=t;break}ft=e.return}return y=uN,uN=!1,y}function Pp(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&D2(e,n,s)}i=i.next}while(i!==r)}}function eb(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function F2(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function SF(t){var e=t.alternate;e!==null&&(t.alternate=null,SF(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[No],delete e[cm],delete e[S2],delete e[M$],delete e[E$])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function MF(t){return t.tag===5||t.tag===3||t.tag===4}function fN(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||MF(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function z2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ix));else if(r!==4&&(t=t.child,t!==null))for(z2(t,e,n),t=t.sibling;t!==null;)z2(t,e,n),t=t.sibling}function U2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(U2(t,e,n),t=t.sibling;t!==null;)U2(t,e,n),t=t.sibling}var Ar=null,eo=!1;function rl(t,e,n){for(n=n.child;n!==null;)EF(t,e,n),n=n.sibling}function EF(t,e,n){if(Do&&typeof Do.onCommitFiberUnmount=="function")try{Do.onCommitFiberUnmount(G1,n)}catch{}switch(n.tag){case 5:qr||Xf(n,e);case 6:var r=Ar,i=eo;Ar=null,rl(t,e,n),Ar=r,eo=i,Ar!==null&&(eo?(t=Ar,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ar.removeChild(n.stateNode));break;case 18:Ar!==null&&(eo?(t=Ar,n=n.stateNode,t.nodeType===8?$S(t.parentNode,n):t.nodeType===1&&$S(t,n),im(t)):$S(Ar,n.stateNode));break;case 4:r=Ar,i=eo,Ar=n.stateNode.containerInfo,eo=!0,rl(t,e,n),Ar=r,eo=i;break;case 0:case 11:case 14:case 15:if(!qr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&D2(n,e,o),i=i.next}while(i!==r)}rl(t,e,n);break;case 1:if(!qr&&(Xf(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$n(n,e,a)}rl(t,e,n);break;case 21:rl(t,e,n);break;case 22:n.mode&1?(qr=(r=qr)||n.memoizedState!==null,rl(t,e,n),qr=r):rl(t,e,n);break;default:rl(t,e,n)}}function dN(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new j$),e.forEach(function(r){var i=Z$.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Xs(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=qn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*W$(r/1960))-r,10t?16:t,_l===null)var r=!1;else{if(t=_l,_l=null,yx=0,sn&6)throw Error(Ue(331));var i=sn;for(sn|=4,ft=t.current;ft!==null;){var s=ft,o=s.child;if(ft.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lqn()-qC?$c(t,0):XC|=n),Fi(t,e)}function kF(t,e){e===0&&(t.mode&1?(e=$0,$0<<=1,!($0&130023424)&&($0=4194304)):e=1);var n=ui();t=ka(t,e),t!==null&&(tg(t,e,n),Fi(t,n))}function K$(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),kF(t,n)}function Z$(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Ue(314))}r!==null&&r.delete(e),kF(t,n)}var LF;LF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Oi.current)ki=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ki=!1,z$(t,e,n);ki=!!(t.flags&131072)}else ki=!1,Pn&&e.flags&1048576&&z5(e,lx,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ev(t,e),t=e.pendingProps;var i=vd(e,Zr.current);ld(e,n),i=jC(null,e,r,t,i,n);var s=VC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Di(r)?(s=!0,ox(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,DC(e),i.updater=Q1,e.stateNode=i,i._reactInternals=e,A2(e,r,t,n),e=N2(null,e,r,!0,s,n)):(e.tag=0,Pn&&s&&AC(e),si(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ev(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Q$(r),t=Js(r,t),i){case 0:e=I2(null,e,r,t,n);break e;case 1:e=aN(null,e,r,t,n);break e;case 11:e=sN(null,e,r,t,n);break e;case 14:e=oN(null,e,r,Js(r.type,t),n);break e}throw Error(Ue(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),I2(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),aN(t,e,r,i,n);case 3:e:{if(yF(e),t===null)throw Error(Ue(387));r=e.pendingProps,s=e.memoizedState,i=s.element,W5(t,e),fx(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=wd(Error(Ue(423)),e),e=lN(t,e,r,n,i);break e}else if(r!==i){i=wd(Error(Ue(424)),e),e=lN(t,e,r,n,i);break e}else for(ns=Cl(e.stateNode.containerInfo.firstChild),rs=e,Pn=!0,to=null,n=V5(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xd(),r===i){e=La(t,e,n);break e}si(t,e,r,n)}e=e.child}return e;case 5:return H5(e),t===null&&T2(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,_2(r,i)?o=null:s!==null&&_2(r,s)&&(e.flags|=32),gF(t,e),si(t,e,o,n),e.child;case 6:return t===null&&T2(e),null;case 13:return vF(t,e,n);case 4:return FC(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=bd(e,null,r,n):si(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),sN(t,e,r,i,n);case 7:return si(t,e,e.pendingProps,n),e.child;case 8:return si(t,e,e.pendingProps.children,n),e.child;case 12:return si(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Sn(cx,r._currentValue),r._currentValue=o,s!==null)if(co(s.value,o)){if(s.children===i.children&&!Oi.current){e=La(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Ta(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),C2(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ue(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),C2(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}si(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ld(e,n),i=Os(i),r=r(i),e.flags|=1,si(t,e,r,n),e.child;case 14:return r=e.type,i=Js(r,e.pendingProps),i=Js(r.type,i),oN(t,e,r,i,n);case 15:return pF(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Js(r,i),Ev(t,e),e.tag=1,Di(r)?(t=!0,ox(e)):t=!1,ld(e,n),fF(e,r,i),A2(e,r,i,n),N2(null,e,r,!0,t,n);case 19:return xF(t,e,n);case 22:return mF(t,e,n)}throw Error(Ue(156,e.tag))};function OF(t,e){return l5(t,e)}function J$(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ns(t,e,n,r){return new J$(t,e,n,r)}function JC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Q$(t){if(typeof t=="function")return JC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===yC)return 11;if(t===vC)return 14}return 2}function Il(t,e){var n=t.alternate;return n===null?(n=Ns(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Rv(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")JC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case zf:return Wc(n.children,i,s,e);case gC:o=8,i|=8;break;case QE:return t=Ns(12,n,e,i|2),t.elementType=QE,t.lanes=s,t;case e2:return t=Ns(13,n,e,i),t.elementType=e2,t.lanes=s,t;case t2:return t=Ns(19,n,e,i),t.elementType=t2,t.lanes=s,t;case HD:return nb(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case $D:o=10;break e;case WD:o=9;break e;case yC:o=11;break e;case vC:o=14;break e;case pl:o=16,r=null;break e}throw Error(Ue(130,t==null?t:typeof t,""))}return e=Ns(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Wc(t,e,n,r){return t=Ns(7,t,r,e),t.lanes=n,t}function nb(t,e,n,r){return t=Ns(22,t,r,e),t.elementType=HD,t.lanes=n,t.stateNode={isHidden:!1},t}function ZS(t,e,n){return t=Ns(6,t,null,e),t.lanes=n,t}function JS(t,e,n){return e=Ns(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function eW(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=NS(0),this.expirationTimes=NS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=NS(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function QC(t,e,n,r,i,s,o,a,l){return t=new eW(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ns(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},DC(s),t}function tW(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(UF)}catch(t){console.error(t)}}UF(),UD.exports=ds;var Hl=UD.exports;const vp=Va(Hl);var rR,bN=Hl;rR=bN.createRoot,bN.hydrateRoot;function BF(t,e){return function(){return t.apply(e,arguments)}}const{toString:oW}=Object.prototype,{getPrototypeOf:iR}=Object,ab=(t=>e=>{const n=oW.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),po=t=>(t=t.toLowerCase(),e=>ab(e)===t),lb=t=>e=>typeof e===t,{isArray:Xd}=Array,gm=lb("undefined");function aW(t){return t!==null&&!gm(t)&&t.constructor!==null&&!gm(t.constructor)&&is(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const jF=po("ArrayBuffer");function lW(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&jF(t.buffer),e}const cW=lb("string"),is=lb("function"),VF=lb("number"),cb=t=>t!==null&&typeof t=="object",uW=t=>t===!0||t===!1,Av=t=>{if(ab(t)!=="object")return!1;const e=iR(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},fW=po("Date"),dW=po("File"),hW=po("Blob"),pW=po("FileList"),mW=t=>cb(t)&&is(t.pipe),gW=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||is(t.append)&&((e=ab(t))==="formdata"||e==="object"&&is(t.toString)&&t.toString()==="[object FormData]"))},yW=po("URLSearchParams"),[vW,xW,bW,_W]=["ReadableStream","Request","Response","Headers"].map(po),wW=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sg(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Xd(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Dc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,WF=t=>!gm(t)&&t!==Dc;function W2(){const{caseless:t}=WF(this)&&this||{},e={},n=(r,i)=>{const s=t&&$F(e,i)||i;Av(e[s])&&Av(r)?e[s]=W2(e[s],r):Av(r)?e[s]=W2({},r):Xd(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r(sg(e,(i,s)=>{n&&is(i)?t[s]=BF(i,n):t[s]=i},{allOwnKeys:r}),t),MW=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),EW=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},TW=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&iR(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},CW=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},RW=t=>{if(!t)return null;if(Xd(t))return t;let e=t.length;if(!VF(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},AW=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&iR(Uint8Array)),PW=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},IW=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},NW=po("HTMLFormElement"),kW=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),_N=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),LW=po("RegExp"),HF=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};sg(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},OW=t=>{HF(t,(e,n)=>{if(is(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(is(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},DW=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Xd(t)?r(t):r(String(t).split(e)),n},FW=()=>{},zW=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,QS="abcdefghijklmnopqrstuvwxyz",wN="0123456789",GF={DIGIT:wN,ALPHA:QS,ALPHA_DIGIT:QS+QS.toUpperCase()+wN},UW=(t=16,e=GF.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function BW(t){return!!(t&&is(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const jW=t=>{const e=new Array(10),n=(r,i)=>{if(cb(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=Xd(r)?[]:{};return sg(r,(o,a)=>{const l=n(o,i+1);!gm(l)&&(s[a]=l)}),e[i]=void 0,s}}return r};return n(t,0)},VW=po("AsyncFunction"),$W=t=>t&&(cb(t)||is(t))&&is(t.then)&&is(t.catch),XF=((t,e)=>t?setImmediate:e?((n,r)=>(Dc.addEventListener("message",({source:i,data:s})=>{i===Dc&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Dc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",is(Dc.postMessage)),WW=typeof queueMicrotask<"u"?queueMicrotask.bind(Dc):typeof process<"u"&&process.nextTick||XF,we={isArray:Xd,isArrayBuffer:jF,isBuffer:aW,isFormData:gW,isArrayBufferView:lW,isString:cW,isNumber:VF,isBoolean:uW,isObject:cb,isPlainObject:Av,isReadableStream:vW,isRequest:xW,isResponse:bW,isHeaders:_W,isUndefined:gm,isDate:fW,isFile:dW,isBlob:hW,isRegExp:LW,isFunction:is,isStream:mW,isURLSearchParams:yW,isTypedArray:AW,isFileList:pW,forEach:sg,merge:W2,extend:SW,trim:wW,stripBOM:MW,inherits:EW,toFlatObject:TW,kindOf:ab,kindOfTest:po,endsWith:CW,toArray:RW,forEachEntry:PW,matchAll:IW,isHTMLForm:NW,hasOwnProperty:_N,hasOwnProp:_N,reduceDescriptors:HF,freezeMethods:OW,toObjectSet:DW,toCamelCase:kW,noop:FW,toFiniteNumber:zW,findKey:$F,global:Dc,isContextDefined:WF,ALPHABET:GF,generateString:UW,isSpecCompliantForm:BW,toJSONObject:jW,isAsyncFn:VW,isThenable:$W,setImmediate:XF,asap:WW};function Ut(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}we.inherits(Ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:we.toJSONObject(this.config),code:this.code,status:this.status}}});const qF=Ut.prototype,YF={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{YF[t]={value:t}});Object.defineProperties(Ut,YF);Object.defineProperty(qF,"isAxiosError",{value:!0});Ut.from=(t,e,n,r,i,s)=>{const o=Object.create(qF);return we.toFlatObject(t,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ut.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const HW=null;function H2(t){return we.isPlainObject(t)||we.isArray(t)}function KF(t){return we.endsWith(t,"[]")?t.slice(0,-2):t}function SN(t,e,n){return t?t.concat(e).map(function(i,s){return i=KF(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function GW(t){return we.isArray(t)&&!t.some(H2)}const XW=we.toFlatObject(we,{},null,function(e){return/^is[A-Z]/.test(e)});function ub(t,e,n){if(!we.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=we.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!we.isUndefined(v[x])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&we.isSpecCompliantForm(e);if(!we.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(we.isDate(y))return y.toISOString();if(!l&&we.isBlob(y))throw new Ut("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(y)||we.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,x,v){let g=y;if(y&&!v&&typeof y=="object"){if(we.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=JSON.stringify(y);else if(we.isArray(y)&&GW(y)||(we.isFileList(y)||we.endsWith(x,"[]"))&&(g=we.toArray(y)))return x=KF(x),g.forEach(function(_,S){!(we.isUndefined(_)||_===null)&&e.append(o===!0?SN([x],S,s):o===null?x:x+"[]",c(_))}),!1}return H2(y)?!0:(e.append(SN(v,x,s),c(y)),!1)}const f=[],h=Object.assign(XW,{defaultVisitor:u,convertValue:c,isVisitable:H2});function m(y,x){if(!we.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(y),we.forEach(y,function(g,b){(!(we.isUndefined(g)||g===null)&&i.call(e,g,we.isString(b)?b.trim():b,x,h))===!0&&m(g,x?x.concat(b):[b])}),f.pop()}}if(!we.isObject(t))throw new TypeError("data must be an object");return m(t),e}function MN(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function sR(t,e){this._pairs=[],t&&ub(t,this,e)}const ZF=sR.prototype;ZF.append=function(e,n){this._pairs.push([e,n])};ZF.toString=function(e){const n=e?function(r){return e.call(this,r,MN)}:MN;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function qW(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function JF(t,e,n){if(!e)return t;const r=n&&n.encode||qW;we.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=we.isURLSearchParams(e)?e.toString():new sR(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class EN{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){we.forEach(this.handlers,function(r){r!==null&&e(r)})}}const QF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YW=typeof URLSearchParams<"u"?URLSearchParams:sR,KW=typeof FormData<"u"?FormData:null,ZW=typeof Blob<"u"?Blob:null,JW={isBrowser:!0,classes:{URLSearchParams:YW,FormData:KW,Blob:ZW},protocols:["http","https","file","blob","url","data"]},oR=typeof window<"u"&&typeof document<"u",G2=typeof navigator=="object"&&navigator||void 0,QW=oR&&(!G2||["ReactNative","NativeScript","NS"].indexOf(G2.product)<0),eH=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tH=oR&&window.location.href||"http://localhost",nH=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:oR,hasStandardBrowserEnv:QW,hasStandardBrowserWebWorkerEnv:eH,navigator:G2,origin:tH},Symbol.toStringTag,{value:"Module"})),Yr={...nH,...JW};function rH(t,e){return ub(t,new Yr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Yr.isNode&&we.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function iH(t){return we.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function sH(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r=n.length;return o=!o&&we.isArray(i)?i.length:o,l?(we.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!we.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&we.isArray(i[o])&&(i[o]=sH(i[o])),!a)}if(we.isFormData(t)&&we.isFunction(t.entries)){const n={};return we.forEachEntry(t,(r,i)=>{e(iH(r),i,n,0)}),n}return null}function oH(t,e,n){if(we.isString(t))try{return(e||JSON.parse)(t),we.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const og={transitional:QF,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=we.isObject(e);if(s&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return i?JSON.stringify(ez(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e)||we.isReadableStream(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return rH(e,this.formSerializer).toString();if((a=we.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ub(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),oH(e)):e}],transformResponse:[function(e){const n=this.transitional||og.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(we.isResponse(e)||we.isReadableStream(e))return e;if(e&&we.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Ut.from(a,Ut.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yr.classes.FormData,Blob:Yr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};we.forEach(["delete","get","head","post","put","patch"],t=>{og.headers[t]={}});const aH=we.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lH=t=>{const e={};let n,r,i;return t&&t.split(` +`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&aH[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},TN=Symbol("internals");function Vh(t){return t&&String(t).trim().toLowerCase()}function Pv(t){return t===!1||t==null?t:we.isArray(t)?t.map(Pv):String(t)}function cH(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const uH=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function eM(t,e,n,r,i){if(we.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!we.isString(e)){if(we.isString(r))return e.indexOf(r)!==-1;if(we.isRegExp(r))return r.test(e)}}function fH(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function dH(t,e){const n=we.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}let zi=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,l,c){const u=Vh(l);if(!u)throw new Error("header name must be a non-empty string");const f=we.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Pv(a))}const o=(a,l)=>we.forEach(a,(c,u)=>s(c,u,l));if(we.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(we.isString(e)&&(e=e.trim())&&!uH(e))o(lH(e),n);else if(we.isHeaders(e))for(const[a,l]of e.entries())s(l,a,r);else e!=null&&s(n,e,r);return this}get(e,n){if(e=Vh(e),e){const r=we.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return cH(i);if(we.isFunction(n))return n.call(this,i,r);if(we.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Vh(e),e){const r=we.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||eM(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=Vh(o),o){const a=we.findKey(r,o);a&&(!n||eM(r,r[a],a,n))&&(delete r[a],i=!0)}}return we.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||eM(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return we.forEach(this,(i,s)=>{const o=we.findKey(r,s);if(o){n[o]=Pv(i),delete n[s];return}const a=e?fH(s):String(s).trim();a!==s&&delete n[s],n[a]=Pv(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return we.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&we.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[TN]=this[TN]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Vh(o);r[a]||(dH(i,o),r[a]=!0)}return we.isArray(e)?e.forEach(s):s(e),this}};zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);we.reduceDescriptors(zi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});we.freezeMethods(zi);function tM(t,e){const n=this||og,r=e||n,i=zi.from(r.headers);let s=r.data;return we.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function tz(t){return!!(t&&t.__CANCEL__)}function qd(t,e,n){Ut.call(this,t??"canceled",Ut.ERR_CANCELED,e,n),this.name="CanceledError"}we.inherits(qd,Ut,{__CANCEL__:!0});function nz(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ut("Request failed with status code "+n.status,[Ut.ERR_BAD_REQUEST,Ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function hH(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function pH(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let f=s,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o{n=u,i=null,s&&(clearTimeout(s),s=null),t.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const bx=(t,e,n=3)=>{let r=0;const i=pH(50,250);return mH(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},CN=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},RN=t=>(...e)=>we.asap(()=>t(...e)),gH=Yr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Yr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Yr.origin),Yr.navigator&&/(msie|trident)/i.test(Yr.navigator.userAgent)):()=>!0,yH=Yr.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];we.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),we.isString(r)&&o.push("path="+r),we.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vH(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function xH(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function rz(t,e){return t&&!vH(e)?xH(t,e):e}const AN=t=>t instanceof zi?{...t}:t;function uu(t,e){e=e||{};const n={};function r(c,u,f,h){return we.isPlainObject(c)&&we.isPlainObject(u)?we.merge.call({caseless:h},c,u):we.isPlainObject(u)?we.merge({},u):we.isArray(u)?u.slice():u}function i(c,u,f,h){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c,f,h)}else return r(c,u,f,h)}function s(c,u){if(!we.isUndefined(u))return r(void 0,u)}function o(c,u){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in e)return r(c,u);if(f in t)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,f)=>i(AN(c),AN(u),f,!0)};return we.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,h=f(t[u],e[u],u);we.isUndefined(h)&&f!==a||(n[u]=h)}),n}const iz=t=>{const e=uu({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=zi.from(o),e.url=JF(rz(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(we.isFormData(n)){if(Yr.hasStandardBrowserEnv||Yr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Yr.hasStandardBrowserEnv&&(r&&we.isFunction(r)&&(r=r(e)),r||r!==!1&&gH(e.url))){const c=i&&s&&yH.read(s);c&&o.set(i,c)}return e},bH=typeof XMLHttpRequest<"u",_H=bH&&function(t){return new Promise(function(n,r){const i=iz(t);let s=i.data;const o=zi.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,m,y;function x(){m&&m(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function g(){if(!v)return;const _=zi.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:t,request:v};nz(function(A){n(A),x()},function(A){r(A),x()},C),v=null}"onloadend"in v?v.onloadend=g:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(g)},v.onabort=function(){v&&(r(new Ut("Request aborted",Ut.ECONNABORTED,t,v)),v=null)},v.onerror=function(){r(new Ut("Network Error",Ut.ERR_NETWORK,t,v)),v=null},v.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||QF;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ut(S,C.clarifyTimeoutError?Ut.ETIMEDOUT:Ut.ECONNABORTED,t,v)),v=null},s===void 0&&o.setContentType(null),"setRequestHeader"in v&&we.forEach(o.toJSON(),function(S,C){v.setRequestHeader(C,S)}),we.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),a&&a!=="json"&&(v.responseType=i.responseType),c&&([h,y]=bx(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([f,m]=bx(l),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(u=_=>{v&&(r(!_||_.type?new qd(null,t,v):_),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=hH(i.url);if(b&&Yr.protocols.indexOf(b)===-1){r(new Ut("Unsupported protocol "+b+":",Ut.ERR_BAD_REQUEST,t));return}v.send(s||null)})},wH=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Ut?u:new qd(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,s(new Ut(`timeout ${e} of ms exceeded`,Ut.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>we.asap(a),l}},SH=function*(t,e){let n=t.byteLength;if(n{const i=MH(t,e);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let f=u.byteLength;if(n){let h=s+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},fb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",sz=fb&&typeof ReadableStream=="function",TH=fb&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),oz=(t,...e)=>{try{return!!t(...e)}catch{return!1}},CH=sz&&oz(()=>{let t=!1;const e=new Request(Yr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),IN=64*1024,X2=sz&&oz(()=>we.isReadableStream(new Response("").body)),_x={stream:X2&&(t=>t.body)};fb&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!_x[e]&&(_x[e]=we.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ut(`Response type '${e}' is not supported`,Ut.ERR_NOT_SUPPORT,r)})})})(new Response);const RH=async t=>{if(t==null)return 0;if(we.isBlob(t))return t.size;if(we.isSpecCompliantForm(t))return(await new Request(Yr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(we.isArrayBufferView(t)||we.isArrayBuffer(t))return t.byteLength;if(we.isURLSearchParams(t)&&(t=t+""),we.isString(t))return(await TH(t)).byteLength},AH=async(t,e)=>{const n=we.toFiniteNumber(t.getContentLength());return n??RH(e)},PH=fb&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=iz(t);c=c?(c+"").toLowerCase():"text";let m=wH([i,s&&s.toAbortSignal()],o),y;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let v;try{if(l&&CH&&n!=="get"&&n!=="head"&&(v=await AH(u,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),P;if(we.isFormData(r)&&(P=C.headers.get("content-type"))&&u.setContentType(P),C.body){const[A,L]=CN(v,bx(RN(l)));r=PN(C.body,IN,A,L)}}we.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;y=new Request(e,{...h,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:g?f:void 0});let b=await fetch(y);const _=X2&&(c==="stream"||c==="response");if(X2&&(a||_&&x)){const C={};["status","statusText","headers"].forEach(k=>{C[k]=b[k]});const P=we.toFiniteNumber(b.headers.get("content-length")),[A,L]=a&&CN(P,bx(RN(a),!0))||[];b=new Response(PN(b.body,IN,A,()=>{L&&L(),x&&x()}),C)}c=c||"text";let S=await _x[we.findKey(_x,c)||"text"](b,t);return!_&&x&&x(),await new Promise((C,P)=>{nz(C,P,{data:S,headers:zi.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:y})})}catch(g){throw x&&x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Ut("Network Error",Ut.ERR_NETWORK,t,y),{cause:g.cause||g}):Ut.from(g,g&&g.code,t,y)}}),q2={http:HW,xhr:_H,fetch:PH};we.forEach(q2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const NN=t=>`- ${t}`,IH=t=>we.isFunction(t)||t===null||t===!1,az={getAdapter:t=>{t=we.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since : +`+s.map(NN).join(` +`):" "+NN(s[0]):"as no adapter specified";throw new Ut("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:q2};function nM(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qd(null,t)}function kN(t){return nM(t),t.headers=zi.from(t.headers),t.data=tM.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),az.getAdapter(t.adapter||og.adapter)(t).then(function(r){return nM(t),r.data=tM.call(t,t.transformResponse,r),r.headers=zi.from(r.headers),r},function(r){return tz(r)||(nM(t),r&&r.response&&(r.response.data=tM.call(t,t.transformResponse,r.response),r.response.headers=zi.from(r.response.headers))),Promise.reject(r)})}const lz="1.7.9",db={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{db[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const LN={};db.transitional=function(e,n,r){function i(s,o){return"[Axios v"+lz+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new Ut(i(o," has been removed"+(n?" in "+n:"")),Ut.ERR_DEPRECATED);return n&&!LN[o]&&(LN[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};db.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function NH(t,e,n){if(typeof t!="object")throw new Ut("options must be an object",Ut.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],l=a===void 0||o(a,s,t);if(l!==!0)throw new Ut("option "+s+" must be "+l,Ut.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ut("Unknown option "+s,Ut.ERR_BAD_OPTION)}}const Iv={assertOptions:NH,validators:db},Co=Iv.validators;let Hc=class{constructor(e){this.defaults=e,this.interceptors={request:new EN,response:new EN}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=uu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Iv.assertOptions(r,{silentJSONParsing:Co.transitional(Co.boolean),forcedJSONParsing:Co.transitional(Co.boolean),clarifyTimeoutError:Co.transitional(Co.boolean)},!1),i!=null&&(we.isFunction(i)?n.paramsSerializer={serialize:i}:Iv.assertOptions(i,{encode:Co.function,serialize:Co.function},!0)),Iv.assertOptions(n,{baseUrl:Co.spelling("baseURL"),withXsrfToken:Co.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&we.merge(s.common,s[n.method]);s&&we.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=zi.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let u,f=0,h;if(!l){const y=[kN.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),h=y.length,u=Promise.resolve(n);f{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new qd(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new cz(function(i){e=i}),cancel:e}}};function LH(t){return function(n){return t.apply(null,n)}}function OH(t){return we.isObject(t)&&t.isAxiosError===!0}const Y2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Y2).forEach(([t,e])=>{Y2[e]=t});function uz(t){const e=new Hc(t),n=BF(Hc.prototype.request,e);return we.extend(n,Hc.prototype,e,{allOwnKeys:!0}),we.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return uz(uu(t,i))},n}const Nn=uz(og);Nn.Axios=Hc;Nn.CanceledError=qd;Nn.CancelToken=kH;Nn.isCancel=tz;Nn.VERSION=lz;Nn.toFormData=ub;Nn.AxiosError=Ut;Nn.Cancel=Nn.CanceledError;Nn.all=function(e){return Promise.all(e)};Nn.spread=LH;Nn.isAxiosError=OH;Nn.mergeConfig=uu;Nn.AxiosHeaders=zi;Nn.formToJSON=t=>ez(we.isHTMLForm(t)?new FormData(t):t);Nn.getAdapter=az.getAdapter;Nn.HttpStatusCode=Y2;Nn.default=Nn;const{Axios:a2e,AxiosError:l2e,CanceledError:c2e,isCancel:u2e,CancelToken:f2e,VERSION:d2e,all:h2e,Cancel:p2e,isAxiosError:m2e,spread:g2e,toFormData:y2e,AxiosHeaders:v2e,HttpStatusCode:x2e,formToJSON:b2e,getAdapter:_2e,mergeConfig:w2e}=Nn,ym={black:"#000",white:"#fff"},Zu={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ju={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Qu={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ef={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},tf={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},$h={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},DH={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Oa(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n0?Pr(Yd,--ji):0,Ed--,er===10&&(Ed=1,pb--),er}function ss(){return er=ji2||xm(er)>3?"":" "}function ZH(t,e){for(;--e&&ss()&&!(er<48||er>102||er>57&&er<65||er>70&&er<97););return ag(t,Nv()+(e<6&&zo()==32&&ss()==32))}function Z2(t){for(;ss();)switch(er){case t:return ji;case 34:case 39:t!==34&&t!==39&&Z2(er);break;case 40:t===41&&Z2(t);break;case 92:ss();break}return ji}function JH(t,e){for(;ss()&&t+er!==57;)if(t+er===84&&zo()===47)break;return"/*"+ag(e,ji-1)+"*"+hb(t===47?t:ss())}function QH(t){for(;!xm(zo());)ss();return ag(t,ji)}function eG(t){return gz(Lv("",null,null,null,[""],t=mz(t),0,[0],t))}function Lv(t,e,n,r,i,s,o,a,l){for(var c=0,u=0,f=o,h=0,m=0,y=0,x=1,v=1,g=1,b=0,_="",S=i,C=s,P=r,A=_;v;)switch(y=b,b=ss()){case 40:if(y!=108&&Pr(A,f-1)==58){K2(A+=hn(kv(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:A+=kv(b);break;case 9:case 10:case 13:case 32:A+=KH(y);break;case 92:A+=ZH(Nv()-1,7);continue;case 47:switch(zo()){case 42:case 47:ty(tG(JH(ss(),Nv()),e,n),l);break;default:A+="/"}break;case 123*x:a[c++]=Po(A)*g;case 125*x:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:g==-1&&(A=hn(A,/\f/g,"")),m>0&&Po(A)-f&&ty(m>32?DN(A+";",r,n,f-1):DN(hn(A," ","")+";",r,n,f-2),l);break;case 59:A+=";";default:if(ty(P=ON(A,e,n,c,u,i,a,_,S=[],C=[],f),s),b===123)if(u===0)Lv(A,e,P,P,S,s,f,a,C);else switch(h===99&&Pr(A,3)===110?100:h){case 100:case 108:case 109:case 115:Lv(t,P,P,r&&ty(ON(t,P,P,0,0,i,a,_,i,S=[],f),C),i,C,f,a,r?S:C);break;default:Lv(A,P,P,P,[""],C,0,a,C)}}c=u=m=0,x=g=1,_=A="",f=o;break;case 58:f=1+Po(A),m=y;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&YH()==125)continue}switch(A+=hb(b),b*x){case 38:g=u>0?1:(A+="\f",-1);break;case 44:a[c++]=(Po(A)-1)*g,g=1;break;case 64:zo()===45&&(A+=kv(ss())),h=zo(),u=f=Po(_=A+=QH(Nv())),b++;break;case 45:y===45&&Po(A)==2&&(x=0)}}return s}function ON(t,e,n,r,i,s,o,a,l,c,u){for(var f=i-1,h=i===0?s:[""],m=cR(h),y=0,x=0,v=0;y0?h[g]+" "+b:hn(b,/&\f/g,h[g])))&&(l[v++]=_);return mb(t,e,n,i===0?aR:a,l,c,u)}function tG(t,e,n){return mb(t,e,n,fz,hb(qH()),vm(t,2,-2),0)}function DN(t,e,n,r){return mb(t,e,n,lR,vm(t,0,r),vm(t,r+1,-1),r)}function ud(t,e){for(var n="",r=cR(t),i=0;i6)switch(Pr(t,e+1)){case 109:if(Pr(t,e+4)!==45)break;case 102:return hn(t,/(.+:)(.+)-([^]+)/,"$1"+dn+"$2-$3$1"+wx+(Pr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~K2(t,"stretch")?vz(hn(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Pr(t,e+1)!==115)break;case 6444:switch(Pr(t,Po(t)-3-(~K2(t,"!important")&&10))){case 107:return hn(t,":",":"+dn)+t;case 101:return hn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dn+(Pr(t,14)===45?"inline-":"")+"box$3$1"+dn+"$2$3$1"+Hr+"$2box$3")+t}break;case 5936:switch(Pr(t,e+11)){case 114:return dn+t+Hr+hn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return dn+t+Hr+hn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return dn+t+Hr+hn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return dn+t+Hr+t+t}return t}var uG=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case lR:e.return=vz(e.value,e.length);break;case dz:return ud([Wh(e,{value:hn(e.value,"@","@"+dn)})],i);case aR:if(e.length)return XH(e.props,function(s){switch(GH(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ud([Wh(e,{props:[hn(s,/:(read-\w+)/,":"+wx+"$1")]})],i);case"::placeholder":return ud([Wh(e,{props:[hn(s,/:(plac\w+)/,":"+dn+"input-$1")]}),Wh(e,{props:[hn(s,/:(plac\w+)/,":"+wx+"$1")]}),Wh(e,{props:[hn(s,/:(plac\w+)/,Hr+"input-$1")]})],i)}return""})}},fG=[uG],xz=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var v=x.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||fG,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var v=x.getAttribute("data-emotion").split(" "),g=1;g=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var gG={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yG=/[A-Z]|^ms/g,vG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_z=function(e){return e.charCodeAt(1)===45},BN=function(e){return e!=null&&typeof e!="boolean"},rM=hz(function(t){return _z(t)?t:t.replace(yG,"-$&").toLowerCase()}),jN=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(vG,function(r,i,s){return Io={name:i,styles:s,next:Io},i})}return gG[e]!==1&&!_z(e)&&typeof n=="number"&&n!==0?n+"px":n};function bm(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Io={name:i.name,styles:i.styles,next:Io},i.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)Io={name:o.name,styles:o.styles,next:Io},o=o.next;var a=s.styles+";";return a}return xG(t,e,n)}case"function":{if(t!==void 0){var l=Io,c=n(t);return Io=l,bm(t,e,c)}break}}var u=n;if(e==null)return u;var f=e[u];return f!==void 0?f:u}function xG(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?PG:IG},HN=function(e,n,r){var i;if(n){var s=n.shouldForwardProp;i=e.__emotion_forwardProp&&s?function(o){return e.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},NG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return mR(n,r,i),Sz(function(){return gR(n,r,i)}),null},kG=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,s,o;n!==void 0&&(s=n.label,o=n.target);var a=HN(e,n,r),l=a||WN(i),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var h=u[0];f.push(h[0]);for(var m=u.length,y=1;ye(jG(i)?n:i):e;return E.jsx(CG,{styles:r})}function xR(t,e){return Q2(t,e)}const Pz=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},VG=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Az,StyledEngineProvider:BG,ThemeContext:Yd,css:Ez,default:xR,internal_processStyles:Pz,keyframes:Cb},Symbol.toStringTag,{value:"Module"}));function va(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Iz(t){if(R.isValidElement(t)||!va(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Iz(t[n])}),e}function fi(t,e,n={clone:!0}){const r=n.clone?W({},t):t;return va(t)&&va(e)&&Object.keys(e).forEach(i=>{R.isValidElement(e[i])?r[i]=e[i]:va(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&va(t[i])?r[i]=fi(t[i],e[i],n):n.clone?r[i]=va(e[i])?Iz(e[i]):e[i]:r[i]=e[i]}),r}const $G=Object.freeze(Object.defineProperty({__proto__:null,default:fi,isPlainObject:va},Symbol.toStringTag,{value:"Module"})),WG=["values","unit","step"],HG=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>W({},n,{[r.key]:r.val}),{})};function Nz(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=nt(t,WG),s=HG(e),o=Object.keys(s);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function c(h,m){const y=o.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(y!==-1&&typeof e[o[y]]=="number"?e[o[y]]:m)-r/100}${n})`}function u(h){return o.indexOf(h)+1`@media (min-width:${bR[t]}px)`};function Vi(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const s=r.breakpoints||GN;return e.reduce((o,a,l)=>(o[s.up(s.keys[l])]=n(e[l]),o),{})}if(typeof e=="object"){const s=r.breakpoints||GN;return Object.keys(e).reduce((o,a)=>{if(Object.keys(s.values||bR).indexOf(a)!==-1){const l=s.up(a);o[l]=n(e[a],a)}else{const l=a;o[l]=e[l]}return o},{})}return n(e)}function kz(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const s=t.up(i);return r[s]={},r},{}))||{}}function Lz(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function XG(t,...e){const n=kz(t),r=[n,...e].reduce((i,s)=>fi(i,s),{});return Lz(Object.keys(n),r)}function qG(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,s)=>{s{t[i]!=null&&(n[i]=!0)}),n}function Gc({values:t,breakpoints:e,base:n}){const r=n||qG(t,e),i=Object.keys(r);if(i.length===0)return t;let s;return i.reduce((o,a,l)=>(Array.isArray(t)?(o[a]=t[l]!=null?t[l]:t[s],s=l):typeof t=="object"?(o[a]=t[a]!=null?t[a]:t[s],s=a):o[a]=t,o),{})}function bt(t){if(typeof t!="string")throw new Error(Oa(7));return t.charAt(0).toUpperCase()+t.slice(1)}const YG=Object.freeze(Object.defineProperty({__proto__:null,default:bt},Symbol.toStringTag,{value:"Module"}));function Ed(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function Sx(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=Ed(t,n)||r,e&&(i=e(i,r,t)),i}function Yn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,s=o=>{if(o[e]==null)return null;const a=o[e],l=o.theme,c=Ed(l,r)||{};return Vi(o,a,f=>{let h=Sx(c,i,f);return f===h&&typeof f=="string"&&(h=Sx(c,i,`${e}${f==="default"?"":bt(f)}`,f)),n===!1?h:{[n]:h}})};return s.propTypes={},s.filterProps=[e],s}function KG(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const ZG={m:"margin",p:"padding"},JG={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},XN={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},QG=KG(t=>{if(t.length>2)if(XN[t])t=XN[t];else return[t];const[e,n]=t.split(""),r=ZG[e],i=JG[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),_R=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],wR=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[..._R,...wR];function lg(t,e,n,r){var i;const s=(i=Ed(t,e,!1))!=null?i:n;return typeof s=="number"?o=>typeof o=="string"?o:s*o:Array.isArray(s)?o=>typeof o=="string"?o:s[o]:typeof s=="function"?s:()=>{}}function SR(t){return lg(t,"spacing",8)}function fu(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function eX(t,e){return n=>t.reduce((r,i)=>(r[i]=fu(e,n),r),{})}function tX(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=QG(n),s=eX(i,r),o=t[n];return Vi(t,o,s)}function Oz(t,e){const n=SR(t.theme);return Object.keys(t).map(r=>tX(t,e,r,n)).reduce(kp,{})}function jn(t){return Oz(t,_R)}jn.propTypes={};jn.filterProps=_R;function Vn(t){return Oz(t,wR)}Vn.propTypes={};Vn.filterProps=wR;function nX(t=8){if(t.mui)return t;const e=SR({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function Rb(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>e[s]?kp(i,e[s](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Is(t){return typeof t!="number"?t:`${t}px solid`}function Us(t,e){return Yn({prop:t,themeKey:"borders",transform:e})}const rX=Us("border",Is),iX=Us("borderTop",Is),sX=Us("borderRight",Is),oX=Us("borderBottom",Is),aX=Us("borderLeft",Is),lX=Us("borderColor"),cX=Us("borderTopColor"),uX=Us("borderRightColor"),fX=Us("borderBottomColor"),dX=Us("borderLeftColor"),hX=Us("outline",Is),pX=Us("outlineColor"),Ab=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=lg(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:fu(e,r)});return Vi(t,t.borderRadius,n)}return null};Ab.propTypes={};Ab.filterProps=["borderRadius"];Rb(rX,iX,sX,oX,aX,lX,cX,uX,fX,dX,Ab,hX,pX);const Pb=t=>{if(t.gap!==void 0&&t.gap!==null){const e=lg(t.theme,"spacing",8),n=r=>({gap:fu(e,r)});return Vi(t,t.gap,n)}return null};Pb.propTypes={};Pb.filterProps=["gap"];const Ib=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=lg(t.theme,"spacing",8),n=r=>({columnGap:fu(e,r)});return Vi(t,t.columnGap,n)}return null};Ib.propTypes={};Ib.filterProps=["columnGap"];const Nb=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=lg(t.theme,"spacing",8),n=r=>({rowGap:fu(e,r)});return Vi(t,t.rowGap,n)}return null};Nb.propTypes={};Nb.filterProps=["rowGap"];const mX=Yn({prop:"gridColumn"}),gX=Yn({prop:"gridRow"}),yX=Yn({prop:"gridAutoFlow"}),vX=Yn({prop:"gridAutoColumns"}),xX=Yn({prop:"gridAutoRows"}),bX=Yn({prop:"gridTemplateColumns"}),_X=Yn({prop:"gridTemplateRows"}),wX=Yn({prop:"gridTemplateAreas"}),SX=Yn({prop:"gridArea"});Rb(Pb,Ib,Nb,mX,gX,yX,vX,xX,bX,_X,wX,SX);function ud(t,e){return e==="grey"?e:t}const MX=Yn({prop:"color",themeKey:"palette",transform:ud}),EX=Yn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ud}),TX=Yn({prop:"backgroundColor",themeKey:"palette",transform:ud});Rb(MX,EX,TX);function es(t){return t<=1&&t!==0?`${t*100}%`:t}const CX=Yn({prop:"width",transform:es}),MR=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const s=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||bR[n];return s?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${s}${t.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:es(n)}};return Vi(t,t.maxWidth,e)}return null};MR.filterProps=["maxWidth"];const RX=Yn({prop:"minWidth",transform:es}),AX=Yn({prop:"height",transform:es}),PX=Yn({prop:"maxHeight",transform:es}),IX=Yn({prop:"minHeight",transform:es});Yn({prop:"size",cssProperty:"width",transform:es});Yn({prop:"size",cssProperty:"height",transform:es});const NX=Yn({prop:"boxSizing"});Rb(CX,MR,RX,AX,PX,IX,NX);const cg={border:{themeKey:"borders",transform:Is},borderTop:{themeKey:"borders",transform:Is},borderRight:{themeKey:"borders",transform:Is},borderBottom:{themeKey:"borders",transform:Is},borderLeft:{themeKey:"borders",transform:Is},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Is},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ab},color:{themeKey:"palette",transform:ud},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ud},backgroundColor:{themeKey:"palette",transform:ud},p:{style:Vn},pt:{style:Vn},pr:{style:Vn},pb:{style:Vn},pl:{style:Vn},px:{style:Vn},py:{style:Vn},padding:{style:Vn},paddingTop:{style:Vn},paddingRight:{style:Vn},paddingBottom:{style:Vn},paddingLeft:{style:Vn},paddingX:{style:Vn},paddingY:{style:Vn},paddingInline:{style:Vn},paddingInlineStart:{style:Vn},paddingInlineEnd:{style:Vn},paddingBlock:{style:Vn},paddingBlockStart:{style:Vn},paddingBlockEnd:{style:Vn},m:{style:jn},mt:{style:jn},mr:{style:jn},mb:{style:jn},ml:{style:jn},mx:{style:jn},my:{style:jn},margin:{style:jn},marginTop:{style:jn},marginRight:{style:jn},marginBottom:{style:jn},marginLeft:{style:jn},marginX:{style:jn},marginY:{style:jn},marginInline:{style:jn},marginInlineStart:{style:jn},marginInlineEnd:{style:jn},marginBlock:{style:jn},marginBlockStart:{style:jn},marginBlockEnd:{style:jn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Pb},rowGap:{style:Nb},columnGap:{style:Ib},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:es},maxWidth:{style:MR},minWidth:{transform:es},height:{transform:es},maxHeight:{transform:es},minHeight:{transform:es},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function kX(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function LX(t,e){return typeof t=="function"?t(e):t}function Dz(){function t(n,r,i,s){const o={[n]:r,theme:i},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Ed(i,c)||{};return f?f(o):Vi(o,r,y=>{let x=Sx(h,u,y);return y===x&&typeof y=="string"&&(x=Sx(h,u,`${n}${y==="default"?"":bt(y)}`,y)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:s={}}=n||{};if(!i)return null;const o=(r=s.unstable_sxConfig)!=null?r:cg;function a(l){let c=l;if(typeof l=="function")c=l(s);else if(typeof l!="object")return l;if(!c)return null;const u=kz(s.breakpoints),f=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const y=LX(c[m],s);if(y!=null)if(typeof y=="object")if(o[m])h=kp(h,t(m,y,s,o));else{const x=Vi({theme:s},y,v=>({[m]:v}));kX(x,y)?h[m]=e({sx:y,theme:s}):h=kp(h,x)}else h=kp(h,t(m,y,s,o))}),Lz(f,h)}return Array.isArray(i)?i.map(a):a(i)}return e}const Kd=Dz();Kd.filterProps=["sx"];function Fz(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const OX=["breakpoints","palette","spacing","shape"];function Zd(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:s={}}=t,o=nt(t,OX),a=Nz(n),l=nX(i);let c=fi({breakpoints:a,direction:"ltr",components:{},palette:W({mode:"light"},r),spacing:l,shape:W({},GG,s)},o);return c.applyStyles=Fz,c=e.reduce((u,f)=>fi(u,f),c),c.unstable_sxConfig=W({},cg,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(f){return Kd({sx:f,theme:this})},c}const DX=Object.freeze(Object.defineProperty({__proto__:null,default:Zd,private_createBreakpoints:Nz,unstable_applyStyles:Fz},Symbol.toStringTag,{value:"Module"}));function FX(t){return Object.keys(t).length===0}function ER(t=null){const e=R.useContext(Yd);return!e||FX(e)?t:e}const zX=Zd();function kb(t=zX){return ER(t)}function UX({styles:t,themeId:e,defaultTheme:n={}}){const r=kb(n),i=typeof t=="function"?t(e&&r[e]||r):t;return E.jsx(Az,{styles:i})}const BX=["sx"],jX=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:cg;return Object.keys(t).forEach(s=>{i[s]?r.systemProps[s]=t[s]:r.otherProps[s]=t[s]}),r};function ug(t){const{sx:e}=t,n=nt(t,BX),{systemProps:r,otherProps:i}=jX(n);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...o)=>{const a=e(...o);return va(a)?W({},r,a):r}:s=W({},r,e),W({},i,{sx:s})}const VX=Object.freeze(Object.defineProperty({__proto__:null,default:Kd,extendSxProp:ug,unstable_createStyleFunctionSx:Dz,unstable_defaultSxConfig:cg},Symbol.toStringTag,{value:"Module"})),qN=t=>t,$X=()=>{let t=qN;return{configure(e){t=e},generate(e){return t(e)},reset(){t=qN}}},zz=$X();function Uz(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;ea!=="theme"&&a!=="sx"&&a!=="as"})(Kd);return R.forwardRef(function(l,c){const u=kb(n),f=ug(l),{className:h,component:m="div"}=f,y=nt(f,WX);return E.jsx(s,W({as:m,ref:c,className:lt(h,i?i(r):r),theme:e&&u[e]||u},y))})}const GX={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Rt(t,e,n="Mui"){const r=GX[e];return r?`${n}-${r}`:`${zz.generate(t)}-${e}`}function Ct(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Rt(t,i,n)}),r}var Bz={exports:{}},_n={};/** + */var Tr=typeof Symbol=="function"&&Symbol.for,uR=Tr?Symbol.for("react.element"):60103,fR=Tr?Symbol.for("react.portal"):60106,gb=Tr?Symbol.for("react.fragment"):60107,yb=Tr?Symbol.for("react.strict_mode"):60108,vb=Tr?Symbol.for("react.profiler"):60114,xb=Tr?Symbol.for("react.provider"):60109,bb=Tr?Symbol.for("react.context"):60110,dR=Tr?Symbol.for("react.async_mode"):60111,_b=Tr?Symbol.for("react.concurrent_mode"):60111,wb=Tr?Symbol.for("react.forward_ref"):60112,Sb=Tr?Symbol.for("react.suspense"):60113,dG=Tr?Symbol.for("react.suspense_list"):60120,Mb=Tr?Symbol.for("react.memo"):60115,Eb=Tr?Symbol.for("react.lazy"):60116,hG=Tr?Symbol.for("react.block"):60121,pG=Tr?Symbol.for("react.fundamental"):60117,mG=Tr?Symbol.for("react.responder"):60118,gG=Tr?Symbol.for("react.scope"):60119;function ps(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case uR:switch(t=t.type,t){case dR:case _b:case gb:case vb:case yb:case Sb:return t;default:switch(t=t&&t.$$typeof,t){case bb:case wb:case Eb:case Mb:case xb:return t;default:return e}}case fR:return e}}}function _z(t){return ps(t)===_b}vn.AsyncMode=dR;vn.ConcurrentMode=_b;vn.ContextConsumer=bb;vn.ContextProvider=xb;vn.Element=uR;vn.ForwardRef=wb;vn.Fragment=gb;vn.Lazy=Eb;vn.Memo=Mb;vn.Portal=fR;vn.Profiler=vb;vn.StrictMode=yb;vn.Suspense=Sb;vn.isAsyncMode=function(t){return _z(t)||ps(t)===dR};vn.isConcurrentMode=_z;vn.isContextConsumer=function(t){return ps(t)===bb};vn.isContextProvider=function(t){return ps(t)===xb};vn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===uR};vn.isForwardRef=function(t){return ps(t)===wb};vn.isFragment=function(t){return ps(t)===gb};vn.isLazy=function(t){return ps(t)===Eb};vn.isMemo=function(t){return ps(t)===Mb};vn.isPortal=function(t){return ps(t)===fR};vn.isProfiler=function(t){return ps(t)===vb};vn.isStrictMode=function(t){return ps(t)===yb};vn.isSuspense=function(t){return ps(t)===Sb};vn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===gb||t===_b||t===vb||t===yb||t===Sb||t===dG||typeof t=="object"&&t!==null&&(t.$$typeof===Eb||t.$$typeof===Mb||t.$$typeof===xb||t.$$typeof===bb||t.$$typeof===wb||t.$$typeof===pG||t.$$typeof===mG||t.$$typeof===gG||t.$$typeof===hG)};vn.typeOf=ps;bz.exports=vn;var yG=bz.exports,wz=yG,vG={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xG={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Sz={};Sz[wz.ForwardRef]=vG;Sz[wz.Memo]=xG;var bG=!0;function Mz(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(r+=i+" ")}),r}var hR=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||bG===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},pR=function(e,n,r){hR(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+i:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function _G(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var wG={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},SG=/[A-Z]|^ms/g,MG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ez=function(e){return e.charCodeAt(1)===45},zN=function(e){return e!=null&&typeof e!="boolean"},rM=yz(function(t){return Ez(t)?t:t.replace(SG,"-$&").toLowerCase()}),UN=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(MG,function(r,i,s){return Io={name:i,styles:s,next:Io},i})}return wG[e]!==1&&!Ez(e)&&typeof n=="number"&&n!==0?n+"px":n};function bm(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Io={name:i.name,styles:i.styles,next:Io},i.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)Io={name:o.name,styles:o.styles,next:Io},o=o.next;var a=s.styles+";";return a}return EG(t,e,n)}case"function":{if(t!==void 0){var l=Io,c=n(t);return Io=l,bm(t,e,c)}break}}var u=n;if(e==null)return u;var f=e[u];return f!==void 0?f:u}function EG(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?OG:DG},WN=function(e,n,r){var i;if(n){var s=n.shouldForwardProp;i=e.__emotion_forwardProp&&s?function(o){return e.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},FG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return hR(n,r,i),Cz(function(){return pR(n,r,i)}),null},zG=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,s,o;n!==void 0&&(s=n.label,o=n.target);var a=WN(e,n,r),l=a||$N(i),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var h=u[0];f.push(h[0]);for(var m=u.length,y=1;ye(GG(i)?n:i):e;return E.jsx(NG,{styles:r})}function yR(t,e){return Q2(t,e)}const Lz=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},XG=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:kz,StyledEngineProvider:HG,ThemeContext:Kd,css:Az,default:yR,internal_processStyles:Lz,keyframes:Cb},Symbol.toStringTag,{value:"Module"}));function va(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Oz(t){if(R.isValidElement(t)||!va(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Oz(t[n])}),e}function fi(t,e,n={clone:!0}){const r=n.clone?W({},t):t;return va(t)&&va(e)&&Object.keys(e).forEach(i=>{R.isValidElement(e[i])?r[i]=e[i]:va(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&va(t[i])?r[i]=fi(t[i],e[i],n):n.clone?r[i]=va(e[i])?Oz(e[i]):e[i]:r[i]=e[i]}),r}const qG=Object.freeze(Object.defineProperty({__proto__:null,default:fi,isPlainObject:va},Symbol.toStringTag,{value:"Module"})),YG=["values","unit","step"],KG=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>W({},n,{[r.key]:r.val}),{})};function Dz(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=nt(t,YG),s=KG(e),o=Object.keys(s);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function c(h,m){const y=o.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(y!==-1&&typeof e[o[y]]=="number"?e[o[y]]:m)-r/100}${n})`}function u(h){return o.indexOf(h)+1`@media (min-width:${vR[t]}px)`};function Vi(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const s=r.breakpoints||HN;return e.reduce((o,a,l)=>(o[s.up(s.keys[l])]=n(e[l]),o),{})}if(typeof e=="object"){const s=r.breakpoints||HN;return Object.keys(e).reduce((o,a)=>{if(Object.keys(s.values||vR).indexOf(a)!==-1){const l=s.up(a);o[l]=n(e[a],a)}else{const l=a;o[l]=e[l]}return o},{})}return n(e)}function Fz(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const s=t.up(i);return r[s]={},r},{}))||{}}function zz(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function JG(t,...e){const n=Fz(t),r=[n,...e].reduce((i,s)=>fi(i,s),{});return zz(Object.keys(n),r)}function QG(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,s)=>{s{t[i]!=null&&(n[i]=!0)}),n}function Gc({values:t,breakpoints:e,base:n}){const r=n||QG(t,e),i=Object.keys(r);if(i.length===0)return t;let s;return i.reduce((o,a,l)=>(Array.isArray(t)?(o[a]=t[l]!=null?t[l]:t[s],s=l):typeof t=="object"?(o[a]=t[a]!=null?t[a]:t[s],s=a):o[a]=t,o),{})}function bt(t){if(typeof t!="string")throw new Error(Oa(7));return t.charAt(0).toUpperCase()+t.slice(1)}const eX=Object.freeze(Object.defineProperty({__proto__:null,default:bt},Symbol.toStringTag,{value:"Module"}));function Td(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function Sx(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=Td(t,n)||r,e&&(i=e(i,r,t)),i}function Yn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,s=o=>{if(o[e]==null)return null;const a=o[e],l=o.theme,c=Td(l,r)||{};return Vi(o,a,f=>{let h=Sx(c,i,f);return f===h&&typeof f=="string"&&(h=Sx(c,i,`${e}${f==="default"?"":bt(f)}`,f)),n===!1?h:{[n]:h}})};return s.propTypes={},s.filterProps=[e],s}function tX(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const nX={m:"margin",p:"padding"},rX={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},GN={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},iX=tX(t=>{if(t.length>2)if(GN[t])t=GN[t];else return[t];const[e,n]=t.split(""),r=nX[e],i=rX[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),xR=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],bR=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...xR,...bR];function lg(t,e,n,r){var i;const s=(i=Td(t,e,!1))!=null?i:n;return typeof s=="number"?o=>typeof o=="string"?o:s*o:Array.isArray(s)?o=>typeof o=="string"?o:s[o]:typeof s=="function"?s:()=>{}}function _R(t){return lg(t,"spacing",8)}function fu(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function sX(t,e){return n=>t.reduce((r,i)=>(r[i]=fu(e,n),r),{})}function oX(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=iX(n),s=sX(i,r),o=t[n];return Vi(t,o,s)}function Uz(t,e){const n=_R(t.theme);return Object.keys(t).map(r=>oX(t,e,r,n)).reduce(kp,{})}function jn(t){return Uz(t,xR)}jn.propTypes={};jn.filterProps=xR;function Vn(t){return Uz(t,bR)}Vn.propTypes={};Vn.filterProps=bR;function aX(t=8){if(t.mui)return t;const e=_R({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function Rb(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>e[s]?kp(i,e[s](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Is(t){return typeof t!="number"?t:`${t}px solid`}function Us(t,e){return Yn({prop:t,themeKey:"borders",transform:e})}const lX=Us("border",Is),cX=Us("borderTop",Is),uX=Us("borderRight",Is),fX=Us("borderBottom",Is),dX=Us("borderLeft",Is),hX=Us("borderColor"),pX=Us("borderTopColor"),mX=Us("borderRightColor"),gX=Us("borderBottomColor"),yX=Us("borderLeftColor"),vX=Us("outline",Is),xX=Us("outlineColor"),Ab=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=lg(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:fu(e,r)});return Vi(t,t.borderRadius,n)}return null};Ab.propTypes={};Ab.filterProps=["borderRadius"];Rb(lX,cX,uX,fX,dX,hX,pX,mX,gX,yX,Ab,vX,xX);const Pb=t=>{if(t.gap!==void 0&&t.gap!==null){const e=lg(t.theme,"spacing",8),n=r=>({gap:fu(e,r)});return Vi(t,t.gap,n)}return null};Pb.propTypes={};Pb.filterProps=["gap"];const Ib=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=lg(t.theme,"spacing",8),n=r=>({columnGap:fu(e,r)});return Vi(t,t.columnGap,n)}return null};Ib.propTypes={};Ib.filterProps=["columnGap"];const Nb=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=lg(t.theme,"spacing",8),n=r=>({rowGap:fu(e,r)});return Vi(t,t.rowGap,n)}return null};Nb.propTypes={};Nb.filterProps=["rowGap"];const bX=Yn({prop:"gridColumn"}),_X=Yn({prop:"gridRow"}),wX=Yn({prop:"gridAutoFlow"}),SX=Yn({prop:"gridAutoColumns"}),MX=Yn({prop:"gridAutoRows"}),EX=Yn({prop:"gridTemplateColumns"}),TX=Yn({prop:"gridTemplateRows"}),CX=Yn({prop:"gridTemplateAreas"}),RX=Yn({prop:"gridArea"});Rb(Pb,Ib,Nb,bX,_X,wX,SX,MX,EX,TX,CX,RX);function fd(t,e){return e==="grey"?e:t}const AX=Yn({prop:"color",themeKey:"palette",transform:fd}),PX=Yn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:fd}),IX=Yn({prop:"backgroundColor",themeKey:"palette",transform:fd});Rb(AX,PX,IX);function es(t){return t<=1&&t!==0?`${t*100}%`:t}const NX=Yn({prop:"width",transform:es}),wR=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const s=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||vR[n];return s?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${s}${t.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:es(n)}};return Vi(t,t.maxWidth,e)}return null};wR.filterProps=["maxWidth"];const kX=Yn({prop:"minWidth",transform:es}),LX=Yn({prop:"height",transform:es}),OX=Yn({prop:"maxHeight",transform:es}),DX=Yn({prop:"minHeight",transform:es});Yn({prop:"size",cssProperty:"width",transform:es});Yn({prop:"size",cssProperty:"height",transform:es});const FX=Yn({prop:"boxSizing"});Rb(NX,wR,kX,LX,OX,DX,FX);const cg={border:{themeKey:"borders",transform:Is},borderTop:{themeKey:"borders",transform:Is},borderRight:{themeKey:"borders",transform:Is},borderBottom:{themeKey:"borders",transform:Is},borderLeft:{themeKey:"borders",transform:Is},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Is},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ab},color:{themeKey:"palette",transform:fd},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:fd},backgroundColor:{themeKey:"palette",transform:fd},p:{style:Vn},pt:{style:Vn},pr:{style:Vn},pb:{style:Vn},pl:{style:Vn},px:{style:Vn},py:{style:Vn},padding:{style:Vn},paddingTop:{style:Vn},paddingRight:{style:Vn},paddingBottom:{style:Vn},paddingLeft:{style:Vn},paddingX:{style:Vn},paddingY:{style:Vn},paddingInline:{style:Vn},paddingInlineStart:{style:Vn},paddingInlineEnd:{style:Vn},paddingBlock:{style:Vn},paddingBlockStart:{style:Vn},paddingBlockEnd:{style:Vn},m:{style:jn},mt:{style:jn},mr:{style:jn},mb:{style:jn},ml:{style:jn},mx:{style:jn},my:{style:jn},margin:{style:jn},marginTop:{style:jn},marginRight:{style:jn},marginBottom:{style:jn},marginLeft:{style:jn},marginX:{style:jn},marginY:{style:jn},marginInline:{style:jn},marginInlineStart:{style:jn},marginInlineEnd:{style:jn},marginBlock:{style:jn},marginBlockStart:{style:jn},marginBlockEnd:{style:jn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Pb},rowGap:{style:Nb},columnGap:{style:Ib},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:es},maxWidth:{style:wR},minWidth:{transform:es},height:{transform:es},maxHeight:{transform:es},minHeight:{transform:es},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function zX(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function UX(t,e){return typeof t=="function"?t(e):t}function Bz(){function t(n,r,i,s){const o={[n]:r,theme:i},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Td(i,c)||{};return f?f(o):Vi(o,r,y=>{let x=Sx(h,u,y);return y===x&&typeof y=="string"&&(x=Sx(h,u,`${n}${y==="default"?"":bt(y)}`,y)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:s={}}=n||{};if(!i)return null;const o=(r=s.unstable_sxConfig)!=null?r:cg;function a(l){let c=l;if(typeof l=="function")c=l(s);else if(typeof l!="object")return l;if(!c)return null;const u=Fz(s.breakpoints),f=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const y=UX(c[m],s);if(y!=null)if(typeof y=="object")if(o[m])h=kp(h,t(m,y,s,o));else{const x=Vi({theme:s},y,v=>({[m]:v}));zX(x,y)?h[m]=e({sx:y,theme:s}):h=kp(h,x)}else h=kp(h,t(m,y,s,o))}),zz(f,h)}return Array.isArray(i)?i.map(a):a(i)}return e}const Zd=Bz();Zd.filterProps=["sx"];function jz(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const BX=["breakpoints","palette","spacing","shape"];function Jd(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:s={}}=t,o=nt(t,BX),a=Dz(n),l=aX(i);let c=fi({breakpoints:a,direction:"ltr",components:{},palette:W({mode:"light"},r),spacing:l,shape:W({},ZG,s)},o);return c.applyStyles=jz,c=e.reduce((u,f)=>fi(u,f),c),c.unstable_sxConfig=W({},cg,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(f){return Zd({sx:f,theme:this})},c}const jX=Object.freeze(Object.defineProperty({__proto__:null,default:Jd,private_createBreakpoints:Dz,unstable_applyStyles:jz},Symbol.toStringTag,{value:"Module"}));function VX(t){return Object.keys(t).length===0}function SR(t=null){const e=R.useContext(Kd);return!e||VX(e)?t:e}const $X=Jd();function kb(t=$X){return SR(t)}function WX({styles:t,themeId:e,defaultTheme:n={}}){const r=kb(n),i=typeof t=="function"?t(e&&r[e]||r):t;return E.jsx(kz,{styles:i})}const HX=["sx"],GX=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:cg;return Object.keys(t).forEach(s=>{i[s]?r.systemProps[s]=t[s]:r.otherProps[s]=t[s]}),r};function ug(t){const{sx:e}=t,n=nt(t,HX),{systemProps:r,otherProps:i}=GX(n);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...o)=>{const a=e(...o);return va(a)?W({},r,a):r}:s=W({},r,e),W({},i,{sx:s})}const XX=Object.freeze(Object.defineProperty({__proto__:null,default:Zd,extendSxProp:ug,unstable_createStyleFunctionSx:Bz,unstable_defaultSxConfig:cg},Symbol.toStringTag,{value:"Module"})),XN=t=>t,qX=()=>{let t=XN;return{configure(e){t=e},generate(e){return t(e)},reset(){t=XN}}},Vz=qX();function $z(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;ea!=="theme"&&a!=="sx"&&a!=="as"})(Zd);return R.forwardRef(function(l,c){const u=kb(n),f=ug(l),{className:h,component:m="div"}=f,y=nt(f,YX);return E.jsx(s,W({as:m,ref:c,className:lt(h,i?i(r):r),theme:e&&u[e]||u},y))})}const ZX={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Rt(t,e,n="Mui"){const r=ZX[e];return r?`${n}-${r}`:`${Vz.generate(t)}-${e}`}function Ct(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Rt(t,i,n)}),r}var Wz={exports:{}},_n={};/** * @license React * react-is.production.js * @@ -57,7 +57,7 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var TR=Symbol.for("react.transitional.element"),CR=Symbol.for("react.portal"),Lb=Symbol.for("react.fragment"),Ob=Symbol.for("react.strict_mode"),Db=Symbol.for("react.profiler"),Fb=Symbol.for("react.consumer"),zb=Symbol.for("react.context"),Ub=Symbol.for("react.forward_ref"),Bb=Symbol.for("react.suspense"),jb=Symbol.for("react.suspense_list"),Vb=Symbol.for("react.memo"),$b=Symbol.for("react.lazy"),XX=Symbol.for("react.offscreen"),qX=Symbol.for("react.client.reference");function Bs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case TR:switch(t=t.type,t){case Lb:case Db:case Ob:case Bb:case jb:return t;default:switch(t=t&&t.$$typeof,t){case zb:case Ub:case $b:case Vb:return t;case Fb:return t;default:return e}}case CR:return e}}}_n.ContextConsumer=Fb;_n.ContextProvider=zb;_n.Element=TR;_n.ForwardRef=Ub;_n.Fragment=Lb;_n.Lazy=$b;_n.Memo=Vb;_n.Portal=CR;_n.Profiler=Db;_n.StrictMode=Ob;_n.Suspense=Bb;_n.SuspenseList=jb;_n.isContextConsumer=function(t){return Bs(t)===Fb};_n.isContextProvider=function(t){return Bs(t)===zb};_n.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===TR};_n.isForwardRef=function(t){return Bs(t)===Ub};_n.isFragment=function(t){return Bs(t)===Lb};_n.isLazy=function(t){return Bs(t)===$b};_n.isMemo=function(t){return Bs(t)===Vb};_n.isPortal=function(t){return Bs(t)===CR};_n.isProfiler=function(t){return Bs(t)===Db};_n.isStrictMode=function(t){return Bs(t)===Ob};_n.isSuspense=function(t){return Bs(t)===Bb};_n.isSuspenseList=function(t){return Bs(t)===jb};_n.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Lb||t===Db||t===Ob||t===Bb||t===jb||t===XX||typeof t=="object"&&t!==null&&(t.$$typeof===$b||t.$$typeof===Vb||t.$$typeof===zb||t.$$typeof===Fb||t.$$typeof===Ub||t.$$typeof===qX||t.getModuleId!==void 0)};_n.typeOf=Bs;Bz.exports=_n;var YN=Bz.exports;const YX=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function jz(t){const e=`${t}`.match(YX);return e&&e[1]||""}function Vz(t,e=""){return t.displayName||t.name||jz(t)||e}function KN(t,e,n){const r=Vz(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function KX(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Vz(t,"Component");if(typeof t=="object")switch(t.$$typeof){case YN.ForwardRef:return KN(t,t.render,"ForwardRef");case YN.Memo:return KN(t,t.type,"memo");default:return}}}const ZX=Object.freeze(Object.defineProperty({__proto__:null,default:KX,getFunctionName:jz},Symbol.toStringTag,{value:"Module"})),JX=["ownerState"],QX=["variants"],eq=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function tq(t){return Object.keys(t).length===0}function nq(t){return typeof t=="string"&&t.charCodeAt(0)>96}function iM(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const rq=Zd(),iq=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function ny({defaultTheme:t,theme:e,themeId:n}){return tq(e)?t:e[n]||e}function sq(t){return t?(e,n)=>n[t]:null}function Ov(t,e){let{ownerState:n}=e,r=nt(e,JX);const i=typeof t=="function"?t(W({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(s=>Ov(s,W({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=nt(i,QX);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(W({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(W({ownerState:n},r,n)):l.style))}),a}return i}function oq(t={}){const{themeId:e,defaultTheme:n=rq,rootShouldForwardProp:r=iM,slotShouldForwardProp:i=iM}=t,s=o=>Kd(W({},o,{theme:ny(W({},o,{defaultTheme:n,themeId:e}))}));return s.__mui_systemSx=!0,(o,a={})=>{Pz(o,C=>C.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=sq(iq(c))}=a,m=nt(a,eq),y=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let v,g=iM;c==="Root"||c==="root"?g=r:c?g=i:nq(o)&&(g=void 0);const b=xR(o,W({shouldForwardProp:g,label:v},m)),_=C=>typeof C=="function"&&C.__emotion_real!==C||va(C)?P=>Ov(C,W({},P,{theme:ny({theme:P.theme,defaultTheme:n,themeId:e})})):C,S=(C,...P)=>{let A=_(C);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=ny(W({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=Ov(X,W({},N,{theme:z}))}),h(N,B)}),l&&!y&&L.push(N=>{var z;const D=ny(W({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return Ov({variants:B},W({},N,{theme:D}))}),x||L.push(s);const k=L.length-P.length;if(Array.isArray(C)&&k>0){const N=new Array(k).fill("");A=[...C,...N],A.raw=[...C.raw,...N]}const T=b(A,...L);return o.muiName&&(T.muiName=o.muiName),T};return b.withConfig&&(S.withConfig=b.withConfig),S}}const $z=oq();function _m(t,e){const n=W({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=W({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},s=e[r];n[r]={},!s||!Object.keys(s)?n[r]=i:!i||!Object.keys(i)?n[r]=s:(n[r]=W({},s),Object.keys(i).forEach(o=>{n[r][o]=_m(i[o],s[o])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Wz(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:_m(e.components[n].defaultProps,r)}function Hz({props:t,name:e,defaultTheme:n,themeId:r}){let i=kb(n);return r&&(i=i[r]||i),Wz({theme:i,name:e,props:t})}const Fs=typeof window<"u"?R.useLayoutEffect:R.useEffect;function aq(t,e,n,r,i){const[s,o]=R.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return Fs(()=>{let a=!0;if(!n)return;const l=n(t),c=()=>{a&&o(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[t,n]),s}const Gz=R.useSyncExternalStore;function lq(t,e,n,r,i){const s=R.useCallback(()=>e,[e]),o=R.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:u}=r(t);return()=>u}return s},[s,t,r,i,n]),[a,l]=R.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const u=n(t);return[()=>u.matches,f=>(u.addListener(f),()=>{u.removeListener(f)})]},[s,n,t]);return Gz(l,a,o)}function Xz(t,e={}){const n=ER(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:s=r?window.matchMedia:null,ssrMatchMedia:o=null,noSsr:a=!1}=Wz({name:"MuiUseMediaQuery",props:e,theme:n});let l=typeof t=="function"?t(n):t;return l=l.replace(/^@media( ?)/m,""),(Gz!==void 0?lq:aq)(l,i,s,o,a)}function qz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const cq=Object.freeze(Object.defineProperty({__proto__:null,default:qz},Symbol.toStringTag,{value:"Module"}));function Yz(t,e=0,n=1){return qz(t,e,n)}function uq(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function RR(t){if(t.type)return t;if(t.charAt(0)==="#")return RR(uq(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Oa(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Oa(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}function Kz(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function sM(t,e){if(t=RR(t),e=Yz(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Kz(t)}function oM(t,e){if(t=RR(t),e=Yz(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Kz(t)}function ZN(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Wb(t,e=166){let n;function r(...i){const s=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(s,e)}return r.clear=()=>{clearTimeout(n)},r}function Dv(t,e){var n,r;return R.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Ui(t){return t&&t.ownerDocument||document}function Da(t){return Ui(t).defaultView||window}function tT(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let JN=0;function fq(t){const[e,n]=R.useState(t),r=t||e;return R.useEffect(()=>{e==null&&(JN+=1,n(`mui-${JN}`))},[e]),r}const QN=Jp.useId;function Zz(t){if(QN!==void 0){const e=QN();return t??e}return fq(t)}function nT({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=R.useRef(t!==void 0),[s,o]=R.useState(e),a=i?t:s,l=R.useCallback(c=>{i||o(c)},[]);return[a,l]}function Sa(t){const e=R.useRef(t);return Fs(()=>{e.current=t}),R.useRef((...n)=>(0,e.current)(...n)).current}function Mr(...t){return R.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{tT(n,e)})},t)}const e4={};function dq(t,e){const n=R.useRef(e4);return n.current===e4&&(n.current=t(e)),n}const hq=[];function pq(t){R.useEffect(t,hq)}class Hb{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Hb}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Jz(){const t=dq(Hb.create).current;return pq(t.disposeEffect),t}let Gb=!0,rT=!1;const mq=new Hb,gq={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function yq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&gq[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function vq(t){t.metaKey||t.altKey||t.ctrlKey||(Gb=!0)}function aM(){Gb=!1}function xq(){this.visibilityState==="hidden"&&rT&&(Gb=!0)}function bq(t){t.addEventListener("keydown",vq,!0),t.addEventListener("mousedown",aM,!0),t.addEventListener("pointerdown",aM,!0),t.addEventListener("touchstart",aM,!0),t.addEventListener("visibilitychange",xq,!0)}function _q(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Gb||yq(e)}function Qz(){const t=R.useCallback(i=>{i!=null&&bq(i.ownerDocument)},[]),e=R.useRef(!1);function n(){return e.current?(rT=!0,mq.start(100,()=>{rT=!1}),e.current=!1,!0):!1}function r(i){return _q(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function eU(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let nf;function tU(){if(nf)return nf;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),nf="reverse",t.scrollLeft>0?nf="default":(t.scrollLeft=1,t.scrollLeft===0&&(nf="negative")),document.body.removeChild(t),nf}function wq(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch(tU()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}function At(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((s,o)=>{if(o){const a=e(o);a!==""&&s.push(a),n&&n[o]&&s.push(n[o])}return s},[]).join(" ")}),r}function Td(t){return typeof t=="string"}function Sq(t,e,n){return t===void 0||Td(t)?e:W({},e,{ownerState:W({},e.ownerState,n)})}function nU(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function t4(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function Mq(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=t;if(!e){const m=lt(n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),y=W({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),x=W({},n,i,r);return m.length>0&&(x.className=m),Object.keys(y).length>0&&(x.style=y),{props:x,internalRef:void 0}}const o=nU(W({},i,r)),a=t4(r),l=t4(i),c=e(o),u=lt(c==null?void 0:c.className,n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),f=W({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=W({},c,n,l,a);return u.length>0&&(h.className=u),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Eq(t,e,n){return typeof t=="function"?t(e,n):t}const Tq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Ho(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1}=t,o=nt(t,Tq),a=s?{}:Eq(r,i),{props:l,internalRef:c}=Mq(W({},o,{externalSlotProps:a})),u=Mr(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return Sq(n,W({},l,{ref:u}),i)}function fg(t){if(parseInt(R.version,10)>=19){var e;return(t==null||(e=t.props)==null?void 0:e.ref)||null}return(t==null?void 0:t.ref)||null}const rU=R.createContext(null);function iU(){return R.useContext(rU)}const Cq=typeof Symbol=="function"&&Symbol.for,Rq=Cq?Symbol.for("mui.nested"):"__THEME_NESTED__";function Aq(t,e){return typeof e=="function"?e(t):W({},t,e)}function Pq(t){const{children:e,theme:n}=t,r=iU(),i=R.useMemo(()=>{const s=r===null?n:Aq(r,n);return s!=null&&(s[Rq]=r!==null),s},[n,r]);return E.jsx(rU.Provider,{value:i,children:e})}const Iq=["value"],sU=R.createContext();function Nq(t){let{value:e}=t,n=nt(t,Iq);return E.jsx(sU.Provider,W({value:e??!0},n))}const AR=()=>{const t=R.useContext(sU);return t??!1},oU=R.createContext(void 0);function kq({value:t,children:e}){return E.jsx(oU.Provider,{value:t,children:e})}function Lq(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const i=e.components[n];return i.defaultProps?_m(i.defaultProps,r):!i.styleOverrides&&!i.variants?_m(i,r):r}function Oq({props:t,name:e}){const n=R.useContext(oU);return Lq({props:t,name:e,theme:{components:n}})}const n4={};function r4(t,e,n,r=!1){return R.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const s=n(i),o=t?W({},e,{[t]:s}):s;return r?()=>o:o}return t?W({},e,{[t]:n}):W({},e,n)},[t,e,n,r])}function Dq(t){const{children:e,theme:n,themeId:r}=t,i=ER(n4),s=iU()||n4,o=r4(r,i,n),a=r4(r,s,n,!0),l=o.direction==="rtl";return E.jsx(Pq,{theme:a,children:E.jsx(Yd.Provider,{value:o,children:E.jsx(Nq,{value:l,children:E.jsx(kq,{value:o==null?void 0:o.components,children:e})})})})}const Fq=["className","component","disableGutters","fixed","maxWidth","classes"],zq=Zd(),Uq=$z("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${bt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),Bq=t=>Hz({props:t,name:"MuiContainer",defaultTheme:zq}),jq=(t,e)=>{const n=l=>Rt(e,l),{classes:r,fixed:i,disableGutters:s,maxWidth:o}=t,a={root:["root",o&&`maxWidth${bt(String(o))}`,i&&"fixed",s&&"disableGutters"]};return At(a,n,r)};function Vq(t={}){const{createStyledComponent:e=Uq,useThemeProps:n=Bq,componentName:r="MuiContainer"}=t,i=e(({theme:o,ownerState:a})=>W({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:o.spacing(2),paddingRight:o.spacing(2),[o.breakpoints.up("sm")]:{paddingLeft:o.spacing(3),paddingRight:o.spacing(3)}}),({theme:o,ownerState:a})=>a.fixed&&Object.keys(o.breakpoints.values).reduce((l,c)=>{const u=c,f=o.breakpoints.values[u];return f!==0&&(l[o.breakpoints.up(u)]={maxWidth:`${f}${o.breakpoints.unit}`}),l},{}),({theme:o,ownerState:a})=>W({},a.maxWidth==="xs"&&{[o.breakpoints.up("xs")]:{maxWidth:Math.max(o.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[o.breakpoints.up(a.maxWidth)]:{maxWidth:`${o.breakpoints.values[a.maxWidth]}${o.breakpoints.unit}`}}));return R.forwardRef(function(a,l){const c=n(a),{className:u,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:y="lg"}=c,x=nt(c,Fq),v=W({},c,{component:f,disableGutters:h,fixed:m,maxWidth:y}),g=jq(v,r);return E.jsx(i,W({as:f,ownerState:v,className:lt(g.root,u),ref:l},x))})}const $q=["component","direction","spacing","divider","children","className","useFlexGap"],Wq=Zd(),Hq=$z("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Gq(t){return Hz({props:t,name:"MuiStack",defaultTheme:Wq})}function Xq(t,e){const n=R.Children.toArray(t).filter(Boolean);return n.reduce((r,i,s)=>(r.push(i),s({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Yq=({ownerState:t,theme:e})=>{let n=W({display:"flex",flexDirection:"column"},Vi({theme:e},Gc({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=SR(e),i=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),s=Gc({values:t.direction,base:i}),o=Gc({values:t.spacing,base:i});typeof s=="object"&&Object.keys(s).forEach((l,c,u)=>{if(!s[l]){const h=c>0?s[u[c-1]]:"column";s[l]=h}}),n=fi(n,Vi({theme:e},o,(l,c)=>t.useFlexGap?{gap:fu(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${qq(c?s[c]:t.direction)}`]:fu(r,l)}}))}return n=XG(e.breakpoints,n),n};function Kq(t={}){const{createStyledComponent:e=Hq,useThemeProps:n=Gq,componentName:r="MuiStack"}=t,i=()=>At({root:["root"]},l=>Rt(r,l),{}),s=e(Yq);return R.forwardRef(function(l,c){const u=n(l),f=ug(u),{component:h="div",direction:m="column",spacing:y=0,divider:x,children:v,className:g,useFlexGap:b=!1}=f,_=nt(f,$q),S={direction:m,spacing:y,useFlexGap:b},C=i();return E.jsx(s,W({as:h,ownerState:S,ref:c,className:lt(C.root,g)},_,{children:x?Xq(v,x):v}))})}function Zq(t,e){return W({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Kn={},aU={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(aU);var lU=aU.exports;const Jq=Ko(IH),Qq=Ko(cq);var cU=lU;Object.defineProperty(Kn,"__esModule",{value:!0});var In=Kn.alpha=mU;Kn.blend=uY;Kn.colorChannel=void 0;var uU=Kn.darken=IR;Kn.decomposeColor=zs;Kn.emphasize=gU;var eY=Kn.getContrastRatio=sY;Kn.getLuminance=Mx;Kn.hexToRgb=dU;Kn.hslToRgb=pU;var fU=Kn.lighten=NR;Kn.private_safeAlpha=oY;Kn.private_safeColorChannel=void 0;Kn.private_safeDarken=aY;Kn.private_safeEmphasize=cY;Kn.private_safeLighten=lY;Kn.recomposeColor=Jd;Kn.rgbToHex=iY;var i4=cU(Jq),tY=cU(Qq);function PR(t,e=0,n=1){return(0,tY.default)(t,e,n)}function dU(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function nY(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function zs(t){if(t.type)return t;if(t.charAt(0)==="#")return zs(dU(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,i4.default)(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,i4.default)(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const hU=t=>{const e=zs(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Kn.colorChannel=hU;const rY=(t,e)=>{try{return hU(t)}catch{return t}};Kn.private_safeColorChannel=rY;function Jd(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function iY(t){if(t.indexOf("#")===0)return t;const{values:e}=zs(t);return`#${e.map((n,r)=>nY(r===3?Math.round(255*n):n)).join("")}`}function pU(t){t=zs(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,s=r*Math.min(i,1-i),o=(c,u=(c+n/30)%12)=>i-s*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Jd({type:a,values:l})}function Mx(t){t=zs(t);let e=t.type==="hsl"||t.type==="hsla"?zs(pU(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function sY(t,e){const n=Mx(t),r=Mx(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function mU(t,e){return t=zs(t),e=PR(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Jd(t)}function oY(t,e,n){try{return mU(t,e)}catch{return t}}function IR(t,e){if(t=zs(t),e=PR(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Jd(t)}function aY(t,e,n){try{return IR(t,e)}catch{return t}}function NR(t,e){if(t=zs(t),e=PR(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Jd(t)}function lY(t,e,n){try{return NR(t,e)}catch{return t}}function gU(t,e=.15){return Mx(t)>.5?IR(t,e):NR(t,e)}function cY(t,e,n){try{return gU(t,e)}catch{return t}}function uY(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),s=zs(t),o=zs(e),a=[i(s.values[0],o.values[0]),i(s.values[1],o.values[1]),i(s.values[2],o.values[2])];return Jd({type:"rgb",values:a})}const fY=["mode","contrastThreshold","tonalOffset"],s4={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ym.white,default:ym.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},lM={text:{primary:ym.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ym.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function o4(t,e,n,r){const i=r.light||r,s=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=fU(t.main,i):e==="dark"&&(t.dark=uU(t.main,s)))}function dY(t="light"){return t==="dark"?{main:Qu[200],light:Qu[50],dark:Qu[400]}:{main:Qu[700],light:Qu[400],dark:Qu[800]}}function hY(t="light"){return t==="dark"?{main:Ju[200],light:Ju[50],dark:Ju[400]}:{main:Ju[500],light:Ju[300],dark:Ju[700]}}function pY(t="light"){return t==="dark"?{main:Zu[500],light:Zu[300],dark:Zu[700]}:{main:Zu[700],light:Zu[400],dark:Zu[800]}}function mY(t="light"){return t==="dark"?{main:ef[400],light:ef[300],dark:ef[700]}:{main:ef[700],light:ef[500],dark:ef[900]}}function gY(t="light"){return t==="dark"?{main:tf[400],light:tf[300],dark:tf[700]}:{main:tf[800],light:tf[500],dark:tf[900]}}function yY(t="light"){return t==="dark"?{main:Vh[400],light:Vh[300],dark:Vh[700]}:{main:"#ed6c02",light:Vh[500],dark:Vh[900]}}function vY(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=nt(t,fY),s=t.primary||dY(e),o=t.secondary||hY(e),a=t.error||pY(e),l=t.info||mY(e),c=t.success||gY(e),u=t.warning||yY(e);function f(x){return eY(x,lM.text.primary)>=n?lM.text.primary:s4.text.primary}const h=({color:x,name:v,mainShade:g=500,lightShade:b=300,darkShade:_=700})=>{if(x=W({},x),!x.main&&x[g]&&(x.main=x[g]),!x.hasOwnProperty("main"))throw new Error(Oa(11,v?` (${v})`:"",g));if(typeof x.main!="string")throw new Error(Oa(12,v?` (${v})`:"",JSON.stringify(x.main)));return o4(x,"light",b,r),o4(x,"dark",_,r),x.contrastText||(x.contrastText=f(x.main)),x},m={dark:lM,light:s4};return fi(W({common:W({},ym),mode:e,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:PH,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},m[e]),i)}const xY=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function bY(t){return Math.round(t*1e5)/1e5}const a4={textTransform:"uppercase"},l4='"Roboto", "Helvetica", "Arial", sans-serif';function _Y(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=l4,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=n,h=nt(n,xY),m=i/14,y=f||(g=>`${g/c*m}rem`),x=(g,b,_,S,C)=>W({fontFamily:r,fontWeight:g,fontSize:y(b),lineHeight:_},r===l4?{letterSpacing:`${bY(S/b)}em`}:{},C,u),v={h1:x(s,96,1.167,-1.5),h2:x(s,60,1.2,-.5),h3:x(o,48,1.167,0),h4:x(o,34,1.235,.25),h5:x(o,24,1.334,0),h6:x(a,20,1.6,.15),subtitle1:x(o,16,1.75,.15),subtitle2:x(a,14,1.57,.1),body1:x(o,16,1.5,.15),body2:x(o,14,1.43,.15),button:x(a,14,1.75,.4,a4),caption:x(o,12,1.66,.4),overline:x(o,12,2.66,1,a4),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return fi(W({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:i,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},v),h,{clone:!1})}const wY=.2,SY=.14,MY=.12;function An(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${wY})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${SY})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${MY})`].join(",")}const EY=["none",An(0,2,1,-1,0,1,1,0,0,1,3,0),An(0,3,1,-2,0,2,2,0,0,1,5,0),An(0,3,3,-2,0,3,4,0,0,1,8,0),An(0,2,4,-1,0,4,5,0,0,1,10,0),An(0,3,5,-1,0,5,8,0,0,1,14,0),An(0,3,5,-1,0,6,10,0,0,1,18,0),An(0,4,5,-2,0,7,10,1,0,2,16,1),An(0,5,5,-3,0,8,10,1,0,3,14,2),An(0,5,6,-3,0,9,12,1,0,3,16,2),An(0,6,6,-3,0,10,14,1,0,4,18,3),An(0,6,7,-4,0,11,15,1,0,4,20,3),An(0,7,8,-4,0,12,17,2,0,5,22,4),An(0,7,8,-4,0,13,19,2,0,5,24,4),An(0,7,9,-4,0,14,21,2,0,5,26,4),An(0,8,9,-5,0,15,22,2,0,6,28,5),An(0,8,10,-5,0,16,24,2,0,6,30,5),An(0,8,11,-5,0,17,26,2,0,6,32,5),An(0,9,11,-5,0,18,28,2,0,7,34,6),An(0,9,12,-6,0,19,29,2,0,7,36,6),An(0,10,13,-6,0,20,31,3,0,8,38,7),An(0,10,13,-6,0,21,33,3,0,8,40,7),An(0,10,14,-6,0,22,35,3,0,8,42,7),An(0,11,14,-7,0,23,36,3,0,9,44,8),An(0,11,15,-7,0,24,38,3,0,9,46,8)],TY=["duration","easing","delay"],CY={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},RY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function c4(t){return`${Math.round(t)}ms`}function AY(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function PY(t){const e=W({},CY,t.easing),n=W({},RY,t.duration);return W({getAutoHeightDuration:AY,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:a=e.easeInOut,delay:l=0}=s;return nt(s,TY),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof o=="string"?o:c4(o)} ${a} ${typeof l=="string"?l:c4(l)}`).join(",")}},t,{easing:e,duration:n})}const IY={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},NY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function kR(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:s={}}=t,o=nt(t,NY);if(t.vars)throw new Error(Oa(18));const a=vY(r),l=Zd(t);let c=fi(l,{mixins:Zq(l.breakpoints,n),palette:a,shadows:EY.slice(),typography:_Y(a,s),transitions:PY(i),zIndex:W({},IY)});return c=fi(c,o),c=e.reduce((u,f)=>fi(u,f),c),c.unstable_sxConfig=W({},cg,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(f){return Kd({sx:f,theme:this})},c}const LR=kR();function Su(){const t=kb(LR);return t[Sd]||t}var dg={},cM={exports:{}},u4;function kY(){return u4||(u4=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r96}function Fv(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const ZY=dg.systemDefaultTheme=(0,$Y.default)(),JY=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function ry({defaultTheme:t,theme:e,themeId:n}){return YY(e)?t:e[n]||e}function QY(t){return t?(e,n)=>n[t]:null}function zv(t,e){let{ownerState:n}=e,r=(0,iT.default)(e,HY);const i=typeof t=="function"?t((0,Ts.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(s=>zv(s,(0,Ts.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=(0,iT.default)(i,GY);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Ts.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Ts.default)({ownerState:n},r,n)):l.style))}),a}return i}function eK(t={}){const{themeId:e,defaultTheme:n=ZY,rootShouldForwardProp:r=Fv,slotShouldForwardProp:i=Fv}=t,s=o=>(0,WY.default)((0,Ts.default)({},o,{theme:ry((0,Ts.default)({},o,{defaultTheme:n,themeId:e}))}));return s.__mui_systemSx=!0,(o,a={})=>{(0,d4.internal_processStyles)(o,C=>C.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=QY(JY(c))}=a,m=(0,iT.default)(a,XY),y=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let v,g=Fv;c==="Root"||c==="root"?g=r:c?g=i:KY(o)&&(g=void 0);const b=(0,d4.default)(o,(0,Ts.default)({shouldForwardProp:g,label:v},m)),_=C=>typeof C=="function"&&C.__emotion_real!==C||(0,VY.isPlainObject)(C)?P=>zv(C,(0,Ts.default)({},P,{theme:ry({theme:P.theme,defaultTheme:n,themeId:e})})):C,S=(C,...P)=>{let A=_(C);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=ry((0,Ts.default)({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=zv(X,(0,Ts.default)({},N,{theme:z}))}),h(N,B)}),l&&!y&&L.push(N=>{var z;const D=ry((0,Ts.default)({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return zv({variants:B},(0,Ts.default)({},N,{theme:D}))}),x||L.push(s);const k=L.length-P.length;if(Array.isArray(C)&&k>0){const N=new Array(k).fill("");A=[...C,...N],A.raw=[...C.raw,...N]}const T=b(A,...L);return o.muiName&&(T.muiName=o.muiName),T};return b.withConfig&&(S.withConfig=b.withConfig),S}}function vU(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const mi=t=>vU(t)&&t!=="classes",Xe=jY({themeId:Sd,defaultTheme:LR,rootShouldForwardProp:mi}),tK=["theme"];function nK(t){let{theme:e}=t,n=nt(t,tK);const r=e[Sd];return E.jsx(Dq,W({},n,{themeId:r?Sd:void 0,theme:r||e}))}const h4=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function Pt(t){return Oq(t)}function rK(t){return Rt("MuiSvgIcon",t)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const iK=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],sK=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${bt(e)}`,`fontSize${bt(n)}`]};return At(i,rK,r)},oK=Xe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${bt(n.color)}`],e[`fontSize${bt(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,s,o,a,l,c,u,f,h,m,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((s=t.typography)==null||(o=s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?f:{action:(m=(t.vars||t).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(y=(t.vars||t).palette)==null||(y=y.action)==null?void 0:y.disabled,inherit:void 0}[e.color]}}),Ex=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=r,m=nt(r,iK),y=R.isValidElement(i)&&i.type==="svg",x=W({},r,{color:o,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:y}),v={};u||(v.viewBox=h);const g=sK(x);return E.jsxs(oK,W({as:a,className:lt(g.root,s),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v,m,y&&i.props,{ownerState:x,children:[y?i.props.children:i,f?E.jsx("title",{children:f}):null]}))});Ex.muiName="SvgIcon";function eh(t,e){function n(r,i){return E.jsx(Ex,W({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=Ex.muiName,R.memo(R.forwardRef(n))}function sT(t,e){return sT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},sT(t,e)}function OR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,sT(t,e)}const p4={disabled:!1},Tx=Et.createContext(null);var aK=function(e){return e.scrollTop},vp="unmounted",Mc="exited",Ec="entering",Af="entered",oT="exiting",Zo=function(t){OR(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=Mc,s.appearStatus=Ec):l=Af:r.unmountOnExit||r.mountOnEnter?l=vp:l=Mc,s.state={status:l},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===vp?{status:Mc}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Ec&&o!==Af&&(s=Ec):(o===Ec||o===Af)&&(s=oT)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Ec){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:yp.findDOMNode(this);o&&aK(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Mc&&this.setState({status:vp})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[yp.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!o||p4.disabled){this.safeSetState({status:Af},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ec},function(){s.props.onEntering(c,u),s.onTransitionEnd(h,function(){s.safeSetState({status:Af},function(){s.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:yp.findDOMNode(this);if(!s||p4.disabled){this.safeSetState({status:Mc},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:oT},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Mc},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:yp.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===vp)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=nt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Et.createElement(Tx.Provider,{value:null},typeof o=="function"?o(i,a):Et.cloneElement(Et.Children.only(o),a))},e}(Et.Component);Zo.contextType=Tx;Zo.propTypes={};function rf(){}Zo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:rf,onEntering:rf,onEntered:rf,onExit:rf,onExiting:rf,onExited:rf};Zo.UNMOUNTED=vp;Zo.EXITED=Mc;Zo.ENTERING=Ec;Zo.ENTERED=Af;Zo.EXITING=oT;function lK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function DR(t,e){var n=function(s){return e&&R.isValidElement(s)?e(s):s},r=Object.create(null);return t&&R.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function cK(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,a={};for(var l in e){if(r[l])for(o=0;ot.scrollTop;function Cx(t,e){var n,r;const{timeout:i,easing:s,style:o={}}=t;return{duration:(n=o.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=o.transitionTimingFunction)!=null?r:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}function pK(t){return Rt("MuiPaper",t)}Ct("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const mK=["className","component","elevation","square","variant"],gK=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,s={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return At(s,pK,i)},yK=Xe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return W({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&W({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${In("#fff",h4(e.elevation))}, ${In("#fff",h4(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Mu=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiPaper"}),{className:i,component:s="div",elevation:o=1,square:a=!1,variant:l="elevation"}=r,c=nt(r,mK),u=W({},r,{component:s,elevation:o,square:a,variant:l}),f=gK(u);return E.jsx(yK,W({as:s,ownerState:u,className:lt(f.root,i),ref:n},c))});function vK(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:o,in:a,onExited:l,timeout:c}=t,[u,f]=R.useState(!1),h=lt(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:o,height:o,top:-(o/2)+s,left:-(o/2)+i},y=lt(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&f(!0),R.useEffect(()=>{if(!a&&l!=null){const x=setTimeout(l,c);return()=>{clearTimeout(x)}}},[l,a,c]),E.jsx("span",{className:h,style:m,children:E.jsx("span",{className:y})})}const Rs=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),xK=["center","classes","className"];let Xb=t=>t,m4,g4,y4,v4;const aT=550,bK=80,_K=Cb(m4||(m4=Xb` + */var MR=Symbol.for("react.transitional.element"),ER=Symbol.for("react.portal"),Lb=Symbol.for("react.fragment"),Ob=Symbol.for("react.strict_mode"),Db=Symbol.for("react.profiler"),Fb=Symbol.for("react.consumer"),zb=Symbol.for("react.context"),Ub=Symbol.for("react.forward_ref"),Bb=Symbol.for("react.suspense"),jb=Symbol.for("react.suspense_list"),Vb=Symbol.for("react.memo"),$b=Symbol.for("react.lazy"),JX=Symbol.for("react.offscreen"),QX=Symbol.for("react.client.reference");function Bs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case MR:switch(t=t.type,t){case Lb:case Db:case Ob:case Bb:case jb:return t;default:switch(t=t&&t.$$typeof,t){case zb:case Ub:case $b:case Vb:return t;case Fb:return t;default:return e}}case ER:return e}}}_n.ContextConsumer=Fb;_n.ContextProvider=zb;_n.Element=MR;_n.ForwardRef=Ub;_n.Fragment=Lb;_n.Lazy=$b;_n.Memo=Vb;_n.Portal=ER;_n.Profiler=Db;_n.StrictMode=Ob;_n.Suspense=Bb;_n.SuspenseList=jb;_n.isContextConsumer=function(t){return Bs(t)===Fb};_n.isContextProvider=function(t){return Bs(t)===zb};_n.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===MR};_n.isForwardRef=function(t){return Bs(t)===Ub};_n.isFragment=function(t){return Bs(t)===Lb};_n.isLazy=function(t){return Bs(t)===$b};_n.isMemo=function(t){return Bs(t)===Vb};_n.isPortal=function(t){return Bs(t)===ER};_n.isProfiler=function(t){return Bs(t)===Db};_n.isStrictMode=function(t){return Bs(t)===Ob};_n.isSuspense=function(t){return Bs(t)===Bb};_n.isSuspenseList=function(t){return Bs(t)===jb};_n.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Lb||t===Db||t===Ob||t===Bb||t===jb||t===JX||typeof t=="object"&&t!==null&&(t.$$typeof===$b||t.$$typeof===Vb||t.$$typeof===zb||t.$$typeof===Fb||t.$$typeof===Ub||t.$$typeof===QX||t.getModuleId!==void 0)};_n.typeOf=Bs;Wz.exports=_n;var qN=Wz.exports;const eq=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Hz(t){const e=`${t}`.match(eq);return e&&e[1]||""}function Gz(t,e=""){return t.displayName||t.name||Hz(t)||e}function YN(t,e,n){const r=Gz(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function tq(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Gz(t,"Component");if(typeof t=="object")switch(t.$$typeof){case qN.ForwardRef:return YN(t,t.render,"ForwardRef");case qN.Memo:return YN(t,t.type,"memo");default:return}}}const nq=Object.freeze(Object.defineProperty({__proto__:null,default:tq,getFunctionName:Hz},Symbol.toStringTag,{value:"Module"})),rq=["ownerState"],iq=["variants"],sq=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function oq(t){return Object.keys(t).length===0}function aq(t){return typeof t=="string"&&t.charCodeAt(0)>96}function iM(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const lq=Jd(),cq=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function ny({defaultTheme:t,theme:e,themeId:n}){return oq(e)?t:e[n]||e}function uq(t){return t?(e,n)=>n[t]:null}function Ov(t,e){let{ownerState:n}=e,r=nt(e,rq);const i=typeof t=="function"?t(W({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(s=>Ov(s,W({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=nt(i,iq);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(W({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(W({ownerState:n},r,n)):l.style))}),a}return i}function fq(t={}){const{themeId:e,defaultTheme:n=lq,rootShouldForwardProp:r=iM,slotShouldForwardProp:i=iM}=t,s=o=>Zd(W({},o,{theme:ny(W({},o,{defaultTheme:n,themeId:e}))}));return s.__mui_systemSx=!0,(o,a={})=>{Lz(o,C=>C.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=uq(cq(c))}=a,m=nt(a,sq),y=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let v,g=iM;c==="Root"||c==="root"?g=r:c?g=i:aq(o)&&(g=void 0);const b=yR(o,W({shouldForwardProp:g,label:v},m)),_=C=>typeof C=="function"&&C.__emotion_real!==C||va(C)?P=>Ov(C,W({},P,{theme:ny({theme:P.theme,defaultTheme:n,themeId:e})})):C,S=(C,...P)=>{let A=_(C);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=ny(W({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=Ov(X,W({},N,{theme:z}))}),h(N,B)}),l&&!y&&L.push(N=>{var z;const D=ny(W({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return Ov({variants:B},W({},N,{theme:D}))}),x||L.push(s);const k=L.length-P.length;if(Array.isArray(C)&&k>0){const N=new Array(k).fill("");A=[...C,...N],A.raw=[...C.raw,...N]}const T=b(A,...L);return o.muiName&&(T.muiName=o.muiName),T};return b.withConfig&&(S.withConfig=b.withConfig),S}}const Xz=fq();function _m(t,e){const n=W({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=W({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},s=e[r];n[r]={},!s||!Object.keys(s)?n[r]=i:!i||!Object.keys(i)?n[r]=s:(n[r]=W({},s),Object.keys(i).forEach(o=>{n[r][o]=_m(i[o],s[o])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function qz(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:_m(e.components[n].defaultProps,r)}function Yz({props:t,name:e,defaultTheme:n,themeId:r}){let i=kb(n);return r&&(i=i[r]||i),qz({theme:i,name:e,props:t})}const Fs=typeof window<"u"?R.useLayoutEffect:R.useEffect;function dq(t,e,n,r,i){const[s,o]=R.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return Fs(()=>{let a=!0;if(!n)return;const l=n(t),c=()=>{a&&o(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[t,n]),s}const Kz=R.useSyncExternalStore;function hq(t,e,n,r,i){const s=R.useCallback(()=>e,[e]),o=R.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:u}=r(t);return()=>u}return s},[s,t,r,i,n]),[a,l]=R.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const u=n(t);return[()=>u.matches,f=>(u.addListener(f),()=>{u.removeListener(f)})]},[s,n,t]);return Kz(l,a,o)}function Zz(t,e={}){const n=SR(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:s=r?window.matchMedia:null,ssrMatchMedia:o=null,noSsr:a=!1}=qz({name:"MuiUseMediaQuery",props:e,theme:n});let l=typeof t=="function"?t(n):t;return l=l.replace(/^@media( ?)/m,""),(Kz!==void 0?hq:dq)(l,i,s,o,a)}function Jz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const pq=Object.freeze(Object.defineProperty({__proto__:null,default:Jz},Symbol.toStringTag,{value:"Module"}));function Qz(t,e=0,n=1){return Jz(t,e,n)}function mq(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function TR(t){if(t.type)return t;if(t.charAt(0)==="#")return TR(mq(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Oa(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Oa(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}function eU(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function sM(t,e){if(t=TR(t),e=Qz(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return eU(t)}function oM(t,e){if(t=TR(t),e=Qz(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return eU(t)}function KN(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Wb(t,e=166){let n;function r(...i){const s=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(s,e)}return r.clear=()=>{clearTimeout(n)},r}function Dv(t,e){var n,r;return R.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Ui(t){return t&&t.ownerDocument||document}function Da(t){return Ui(t).defaultView||window}function tT(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let ZN=0;function gq(t){const[e,n]=R.useState(t),r=t||e;return R.useEffect(()=>{e==null&&(ZN+=1,n(`mui-${ZN}`))},[e]),r}const JN=Jp.useId;function tU(t){if(JN!==void 0){const e=JN();return t??e}return gq(t)}function nT({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=R.useRef(t!==void 0),[s,o]=R.useState(e),a=i?t:s,l=R.useCallback(c=>{i||o(c)},[]);return[a,l]}function Sa(t){const e=R.useRef(t);return Fs(()=>{e.current=t}),R.useRef((...n)=>(0,e.current)(...n)).current}function Mr(...t){return R.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{tT(n,e)})},t)}const QN={};function yq(t,e){const n=R.useRef(QN);return n.current===QN&&(n.current=t(e)),n}const vq=[];function xq(t){R.useEffect(t,vq)}class Hb{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Hb}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function nU(){const t=yq(Hb.create).current;return xq(t.disposeEffect),t}let Gb=!0,rT=!1;const bq=new Hb,_q={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function wq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&_q[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function Sq(t){t.metaKey||t.altKey||t.ctrlKey||(Gb=!0)}function aM(){Gb=!1}function Mq(){this.visibilityState==="hidden"&&rT&&(Gb=!0)}function Eq(t){t.addEventListener("keydown",Sq,!0),t.addEventListener("mousedown",aM,!0),t.addEventListener("pointerdown",aM,!0),t.addEventListener("touchstart",aM,!0),t.addEventListener("visibilitychange",Mq,!0)}function Tq(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Gb||wq(e)}function rU(){const t=R.useCallback(i=>{i!=null&&Eq(i.ownerDocument)},[]),e=R.useRef(!1);function n(){return e.current?(rT=!0,bq.start(100,()=>{rT=!1}),e.current=!1,!0):!1}function r(i){return Tq(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function iU(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let nf;function sU(){if(nf)return nf;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),nf="reverse",t.scrollLeft>0?nf="default":(t.scrollLeft=1,t.scrollLeft===0&&(nf="negative")),document.body.removeChild(t),nf}function Cq(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch(sU()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}function At(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((s,o)=>{if(o){const a=e(o);a!==""&&s.push(a),n&&n[o]&&s.push(n[o])}return s},[]).join(" ")}),r}function Cd(t){return typeof t=="string"}function Rq(t,e,n){return t===void 0||Cd(t)?e:W({},e,{ownerState:W({},e.ownerState,n)})}function oU(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function ek(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function Aq(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=t;if(!e){const m=lt(n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),y=W({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),x=W({},n,i,r);return m.length>0&&(x.className=m),Object.keys(y).length>0&&(x.style=y),{props:x,internalRef:void 0}}const o=oU(W({},i,r)),a=ek(r),l=ek(i),c=e(o),u=lt(c==null?void 0:c.className,n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),f=W({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=W({},c,n,l,a);return u.length>0&&(h.className=u),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Pq(t,e,n){return typeof t=="function"?t(e,n):t}const Iq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Ho(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1}=t,o=nt(t,Iq),a=s?{}:Pq(r,i),{props:l,internalRef:c}=Aq(W({},o,{externalSlotProps:a})),u=Mr(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return Rq(n,W({},l,{ref:u}),i)}function fg(t){if(parseInt(R.version,10)>=19){var e;return(t==null||(e=t.props)==null?void 0:e.ref)||null}return(t==null?void 0:t.ref)||null}const aU=R.createContext(null);function lU(){return R.useContext(aU)}const Nq=typeof Symbol=="function"&&Symbol.for,kq=Nq?Symbol.for("mui.nested"):"__THEME_NESTED__";function Lq(t,e){return typeof e=="function"?e(t):W({},t,e)}function Oq(t){const{children:e,theme:n}=t,r=lU(),i=R.useMemo(()=>{const s=r===null?n:Lq(r,n);return s!=null&&(s[kq]=r!==null),s},[n,r]);return E.jsx(aU.Provider,{value:i,children:e})}const Dq=["value"],cU=R.createContext();function Fq(t){let{value:e}=t,n=nt(t,Dq);return E.jsx(cU.Provider,W({value:e??!0},n))}const CR=()=>{const t=R.useContext(cU);return t??!1},uU=R.createContext(void 0);function zq({value:t,children:e}){return E.jsx(uU.Provider,{value:t,children:e})}function Uq(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const i=e.components[n];return i.defaultProps?_m(i.defaultProps,r):!i.styleOverrides&&!i.variants?_m(i,r):r}function Bq({props:t,name:e}){const n=R.useContext(uU);return Uq({props:t,name:e,theme:{components:n}})}const tk={};function nk(t,e,n,r=!1){return R.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const s=n(i),o=t?W({},e,{[t]:s}):s;return r?()=>o:o}return t?W({},e,{[t]:n}):W({},e,n)},[t,e,n,r])}function jq(t){const{children:e,theme:n,themeId:r}=t,i=SR(tk),s=lU()||tk,o=nk(r,i,n),a=nk(r,s,n,!0),l=o.direction==="rtl";return E.jsx(Oq,{theme:a,children:E.jsx(Kd.Provider,{value:o,children:E.jsx(Fq,{value:l,children:E.jsx(zq,{value:o==null?void 0:o.components,children:e})})})})}const Vq=["className","component","disableGutters","fixed","maxWidth","classes"],$q=Jd(),Wq=Xz("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${bt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),Hq=t=>Yz({props:t,name:"MuiContainer",defaultTheme:$q}),Gq=(t,e)=>{const n=l=>Rt(e,l),{classes:r,fixed:i,disableGutters:s,maxWidth:o}=t,a={root:["root",o&&`maxWidth${bt(String(o))}`,i&&"fixed",s&&"disableGutters"]};return At(a,n,r)};function Xq(t={}){const{createStyledComponent:e=Wq,useThemeProps:n=Hq,componentName:r="MuiContainer"}=t,i=e(({theme:o,ownerState:a})=>W({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:o.spacing(2),paddingRight:o.spacing(2),[o.breakpoints.up("sm")]:{paddingLeft:o.spacing(3),paddingRight:o.spacing(3)}}),({theme:o,ownerState:a})=>a.fixed&&Object.keys(o.breakpoints.values).reduce((l,c)=>{const u=c,f=o.breakpoints.values[u];return f!==0&&(l[o.breakpoints.up(u)]={maxWidth:`${f}${o.breakpoints.unit}`}),l},{}),({theme:o,ownerState:a})=>W({},a.maxWidth==="xs"&&{[o.breakpoints.up("xs")]:{maxWidth:Math.max(o.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[o.breakpoints.up(a.maxWidth)]:{maxWidth:`${o.breakpoints.values[a.maxWidth]}${o.breakpoints.unit}`}}));return R.forwardRef(function(a,l){const c=n(a),{className:u,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:y="lg"}=c,x=nt(c,Vq),v=W({},c,{component:f,disableGutters:h,fixed:m,maxWidth:y}),g=Gq(v,r);return E.jsx(i,W({as:f,ownerState:v,className:lt(g.root,u),ref:l},x))})}const qq=["component","direction","spacing","divider","children","className","useFlexGap"],Yq=Jd(),Kq=Xz("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Zq(t){return Yz({props:t,name:"MuiStack",defaultTheme:Yq})}function Jq(t,e){const n=R.Children.toArray(t).filter(Boolean);return n.reduce((r,i,s)=>(r.push(i),s({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],eY=({ownerState:t,theme:e})=>{let n=W({display:"flex",flexDirection:"column"},Vi({theme:e},Gc({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=_R(e),i=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),s=Gc({values:t.direction,base:i}),o=Gc({values:t.spacing,base:i});typeof s=="object"&&Object.keys(s).forEach((l,c,u)=>{if(!s[l]){const h=c>0?s[u[c-1]]:"column";s[l]=h}}),n=fi(n,Vi({theme:e},o,(l,c)=>t.useFlexGap?{gap:fu(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Qq(c?s[c]:t.direction)}`]:fu(r,l)}}))}return n=JG(e.breakpoints,n),n};function tY(t={}){const{createStyledComponent:e=Kq,useThemeProps:n=Zq,componentName:r="MuiStack"}=t,i=()=>At({root:["root"]},l=>Rt(r,l),{}),s=e(eY);return R.forwardRef(function(l,c){const u=n(l),f=ug(u),{component:h="div",direction:m="column",spacing:y=0,divider:x,children:v,className:g,useFlexGap:b=!1}=f,_=nt(f,qq),S={direction:m,spacing:y,useFlexGap:b},C=i();return E.jsx(s,W({as:h,ownerState:S,ref:c,className:lt(C.root,g)},_,{children:x?Jq(v,x):v}))})}function nY(t,e){return W({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Kn={},fU={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(fU);var dU=fU.exports;const rY=Ko(FH),iY=Ko(pq);var hU=dU;Object.defineProperty(Kn,"__esModule",{value:!0});var In=Kn.alpha=xU;Kn.blend=mY;Kn.colorChannel=void 0;var pU=Kn.darken=AR;Kn.decomposeColor=zs;Kn.emphasize=bU;var sY=Kn.getContrastRatio=uY;Kn.getLuminance=Mx;Kn.hexToRgb=gU;Kn.hslToRgb=vU;var mU=Kn.lighten=PR;Kn.private_safeAlpha=fY;Kn.private_safeColorChannel=void 0;Kn.private_safeDarken=dY;Kn.private_safeEmphasize=pY;Kn.private_safeLighten=hY;Kn.recomposeColor=Qd;Kn.rgbToHex=cY;var rk=hU(rY),oY=hU(iY);function RR(t,e=0,n=1){return(0,oY.default)(t,e,n)}function gU(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function aY(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function zs(t){if(t.type)return t;if(t.charAt(0)==="#")return zs(gU(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,rk.default)(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,rk.default)(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const yU=t=>{const e=zs(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Kn.colorChannel=yU;const lY=(t,e)=>{try{return yU(t)}catch{return t}};Kn.private_safeColorChannel=lY;function Qd(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function cY(t){if(t.indexOf("#")===0)return t;const{values:e}=zs(t);return`#${e.map((n,r)=>aY(r===3?Math.round(255*n):n)).join("")}`}function vU(t){t=zs(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,s=r*Math.min(i,1-i),o=(c,u=(c+n/30)%12)=>i-s*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Qd({type:a,values:l})}function Mx(t){t=zs(t);let e=t.type==="hsl"||t.type==="hsla"?zs(vU(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function uY(t,e){const n=Mx(t),r=Mx(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function xU(t,e){return t=zs(t),e=RR(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Qd(t)}function fY(t,e,n){try{return xU(t,e)}catch{return t}}function AR(t,e){if(t=zs(t),e=RR(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Qd(t)}function dY(t,e,n){try{return AR(t,e)}catch{return t}}function PR(t,e){if(t=zs(t),e=RR(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Qd(t)}function hY(t,e,n){try{return PR(t,e)}catch{return t}}function bU(t,e=.15){return Mx(t)>.5?AR(t,e):PR(t,e)}function pY(t,e,n){try{return bU(t,e)}catch{return t}}function mY(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),s=zs(t),o=zs(e),a=[i(s.values[0],o.values[0]),i(s.values[1],o.values[1]),i(s.values[2],o.values[2])];return Qd({type:"rgb",values:a})}const gY=["mode","contrastThreshold","tonalOffset"],ik={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ym.white,default:ym.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},lM={text:{primary:ym.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ym.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function sk(t,e,n,r){const i=r.light||r,s=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=mU(t.main,i):e==="dark"&&(t.dark=pU(t.main,s)))}function yY(t="light"){return t==="dark"?{main:Qu[200],light:Qu[50],dark:Qu[400]}:{main:Qu[700],light:Qu[400],dark:Qu[800]}}function vY(t="light"){return t==="dark"?{main:Ju[200],light:Ju[50],dark:Ju[400]}:{main:Ju[500],light:Ju[300],dark:Ju[700]}}function xY(t="light"){return t==="dark"?{main:Zu[500],light:Zu[300],dark:Zu[700]}:{main:Zu[700],light:Zu[400],dark:Zu[800]}}function bY(t="light"){return t==="dark"?{main:ef[400],light:ef[300],dark:ef[700]}:{main:ef[700],light:ef[500],dark:ef[900]}}function _Y(t="light"){return t==="dark"?{main:tf[400],light:tf[300],dark:tf[700]}:{main:tf[800],light:tf[500],dark:tf[900]}}function wY(t="light"){return t==="dark"?{main:$h[400],light:$h[300],dark:$h[700]}:{main:"#ed6c02",light:$h[500],dark:$h[900]}}function SY(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=nt(t,gY),s=t.primary||yY(e),o=t.secondary||vY(e),a=t.error||xY(e),l=t.info||bY(e),c=t.success||_Y(e),u=t.warning||wY(e);function f(x){return sY(x,lM.text.primary)>=n?lM.text.primary:ik.text.primary}const h=({color:x,name:v,mainShade:g=500,lightShade:b=300,darkShade:_=700})=>{if(x=W({},x),!x.main&&x[g]&&(x.main=x[g]),!x.hasOwnProperty("main"))throw new Error(Oa(11,v?` (${v})`:"",g));if(typeof x.main!="string")throw new Error(Oa(12,v?` (${v})`:"",JSON.stringify(x.main)));return sk(x,"light",b,r),sk(x,"dark",_,r),x.contrastText||(x.contrastText=f(x.main)),x},m={dark:lM,light:ik};return fi(W({common:W({},ym),mode:e,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:DH,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},m[e]),i)}const MY=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function EY(t){return Math.round(t*1e5)/1e5}const ok={textTransform:"uppercase"},ak='"Roboto", "Helvetica", "Arial", sans-serif';function TY(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=ak,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=n,h=nt(n,MY),m=i/14,y=f||(g=>`${g/c*m}rem`),x=(g,b,_,S,C)=>W({fontFamily:r,fontWeight:g,fontSize:y(b),lineHeight:_},r===ak?{letterSpacing:`${EY(S/b)}em`}:{},C,u),v={h1:x(s,96,1.167,-1.5),h2:x(s,60,1.2,-.5),h3:x(o,48,1.167,0),h4:x(o,34,1.235,.25),h5:x(o,24,1.334,0),h6:x(a,20,1.6,.15),subtitle1:x(o,16,1.75,.15),subtitle2:x(a,14,1.57,.1),body1:x(o,16,1.5,.15),body2:x(o,14,1.43,.15),button:x(a,14,1.75,.4,ok),caption:x(o,12,1.66,.4),overline:x(o,12,2.66,1,ok),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return fi(W({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:i,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},v),h,{clone:!1})}const CY=.2,RY=.14,AY=.12;function An(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${CY})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${RY})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${AY})`].join(",")}const PY=["none",An(0,2,1,-1,0,1,1,0,0,1,3,0),An(0,3,1,-2,0,2,2,0,0,1,5,0),An(0,3,3,-2,0,3,4,0,0,1,8,0),An(0,2,4,-1,0,4,5,0,0,1,10,0),An(0,3,5,-1,0,5,8,0,0,1,14,0),An(0,3,5,-1,0,6,10,0,0,1,18,0),An(0,4,5,-2,0,7,10,1,0,2,16,1),An(0,5,5,-3,0,8,10,1,0,3,14,2),An(0,5,6,-3,0,9,12,1,0,3,16,2),An(0,6,6,-3,0,10,14,1,0,4,18,3),An(0,6,7,-4,0,11,15,1,0,4,20,3),An(0,7,8,-4,0,12,17,2,0,5,22,4),An(0,7,8,-4,0,13,19,2,0,5,24,4),An(0,7,9,-4,0,14,21,2,0,5,26,4),An(0,8,9,-5,0,15,22,2,0,6,28,5),An(0,8,10,-5,0,16,24,2,0,6,30,5),An(0,8,11,-5,0,17,26,2,0,6,32,5),An(0,9,11,-5,0,18,28,2,0,7,34,6),An(0,9,12,-6,0,19,29,2,0,7,36,6),An(0,10,13,-6,0,20,31,3,0,8,38,7),An(0,10,13,-6,0,21,33,3,0,8,40,7),An(0,10,14,-6,0,22,35,3,0,8,42,7),An(0,11,14,-7,0,23,36,3,0,9,44,8),An(0,11,15,-7,0,24,38,3,0,9,46,8)],IY=["duration","easing","delay"],NY={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},kY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function lk(t){return`${Math.round(t)}ms`}function LY(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function OY(t){const e=W({},NY,t.easing),n=W({},kY,t.duration);return W({getAutoHeightDuration:LY,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:a=e.easeInOut,delay:l=0}=s;return nt(s,IY),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof o=="string"?o:lk(o)} ${a} ${typeof l=="string"?l:lk(l)}`).join(",")}},t,{easing:e,duration:n})}const DY={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},FY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function IR(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:s={}}=t,o=nt(t,FY);if(t.vars)throw new Error(Oa(18));const a=SY(r),l=Jd(t);let c=fi(l,{mixins:nY(l.breakpoints,n),palette:a,shadows:PY.slice(),typography:TY(a,s),transitions:OY(i),zIndex:W({},DY)});return c=fi(c,o),c=e.reduce((u,f)=>fi(u,f),c),c.unstable_sxConfig=W({},cg,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(f){return Zd({sx:f,theme:this})},c}const NR=IR();function Su(){const t=kb(NR);return t[Md]||t}var dg={},cM={exports:{}},ck;function zY(){return ck||(ck=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r96}function Fv(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const nK=dg.systemDefaultTheme=(0,qY.default)(),rK=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function ry({defaultTheme:t,theme:e,themeId:n}){return eK(e)?t:e[n]||e}function iK(t){return t?(e,n)=>n[t]:null}function zv(t,e){let{ownerState:n}=e,r=(0,iT.default)(e,KY);const i=typeof t=="function"?t((0,Ts.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(s=>zv(s,(0,Ts.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=(0,iT.default)(i,ZY);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Ts.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Ts.default)({ownerState:n},r,n)):l.style))}),a}return i}function sK(t={}){const{themeId:e,defaultTheme:n=nK,rootShouldForwardProp:r=Fv,slotShouldForwardProp:i=Fv}=t,s=o=>(0,YY.default)((0,Ts.default)({},o,{theme:ry((0,Ts.default)({},o,{defaultTheme:n,themeId:e}))}));return s.__mui_systemSx=!0,(o,a={})=>{(0,fk.internal_processStyles)(o,C=>C.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=iK(rK(c))}=a,m=(0,iT.default)(a,JY),y=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let v,g=Fv;c==="Root"||c==="root"?g=r:c?g=i:tK(o)&&(g=void 0);const b=(0,fk.default)(o,(0,Ts.default)({shouldForwardProp:g,label:v},m)),_=C=>typeof C=="function"&&C.__emotion_real!==C||(0,XY.isPlainObject)(C)?P=>zv(C,(0,Ts.default)({},P,{theme:ry({theme:P.theme,defaultTheme:n,themeId:e})})):C,S=(C,...P)=>{let A=_(C);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=ry((0,Ts.default)({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=zv(X,(0,Ts.default)({},N,{theme:z}))}),h(N,B)}),l&&!y&&L.push(N=>{var z;const D=ry((0,Ts.default)({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return zv({variants:B},(0,Ts.default)({},N,{theme:D}))}),x||L.push(s);const k=L.length-P.length;if(Array.isArray(C)&&k>0){const N=new Array(k).fill("");A=[...C,...N],A.raw=[...C.raw,...N]}const T=b(A,...L);return o.muiName&&(T.muiName=o.muiName),T};return b.withConfig&&(S.withConfig=b.withConfig),S}}function wU(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const mi=t=>wU(t)&&t!=="classes",Ge=GY({themeId:Md,defaultTheme:NR,rootShouldForwardProp:mi}),oK=["theme"];function aK(t){let{theme:e}=t,n=nt(t,oK);const r=e[Md];return E.jsx(jq,W({},n,{themeId:r?Md:void 0,theme:r||e}))}const dk=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function Pt(t){return Bq(t)}function lK(t){return Rt("MuiSvgIcon",t)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const cK=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],uK=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${bt(e)}`,`fontSize${bt(n)}`]};return At(i,lK,r)},fK=Ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${bt(n.color)}`],e[`fontSize${bt(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,s,o,a,l,c,u,f,h,m,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((s=t.typography)==null||(o=s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?f:{action:(m=(t.vars||t).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(y=(t.vars||t).palette)==null||(y=y.action)==null?void 0:y.disabled,inherit:void 0}[e.color]}}),Ex=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=r,m=nt(r,cK),y=R.isValidElement(i)&&i.type==="svg",x=W({},r,{color:o,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:y}),v={};u||(v.viewBox=h);const g=uK(x);return E.jsxs(fK,W({as:a,className:lt(g.root,s),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v,m,y&&i.props,{ownerState:x,children:[y?i.props.children:i,f?E.jsx("title",{children:f}):null]}))});Ex.muiName="SvgIcon";function th(t,e){function n(r,i){return E.jsx(Ex,W({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=Ex.muiName,R.memo(R.forwardRef(n))}function sT(t,e){return sT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},sT(t,e)}function kR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,sT(t,e)}const hk={disabled:!1},Tx=Et.createContext(null);var dK=function(e){return e.scrollTop},xp="unmounted",Mc="exited",Ec="entering",Af="entered",oT="exiting",Zo=function(t){kR(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=Mc,s.appearStatus=Ec):l=Af:r.unmountOnExit||r.mountOnEnter?l=xp:l=Mc,s.state={status:l},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===xp?{status:Mc}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Ec&&o!==Af&&(s=Ec):(o===Ec||o===Af)&&(s=oT)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Ec){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:vp.findDOMNode(this);o&&dK(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Mc&&this.setState({status:xp})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[vp.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!o||hk.disabled){this.safeSetState({status:Af},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ec},function(){s.props.onEntering(c,u),s.onTransitionEnd(h,function(){s.safeSetState({status:Af},function(){s.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:vp.findDOMNode(this);if(!s||hk.disabled){this.safeSetState({status:Mc},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:oT},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Mc},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:vp.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===xp)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=nt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Et.createElement(Tx.Provider,{value:null},typeof o=="function"?o(i,a):Et.cloneElement(Et.Children.only(o),a))},e}(Et.Component);Zo.contextType=Tx;Zo.propTypes={};function rf(){}Zo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:rf,onEntering:rf,onEntered:rf,onExit:rf,onExiting:rf,onExited:rf};Zo.UNMOUNTED=xp;Zo.EXITED=Mc;Zo.ENTERING=Ec;Zo.ENTERED=Af;Zo.EXITING=oT;function hK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function LR(t,e){var n=function(s){return e&&R.isValidElement(s)?e(s):s},r=Object.create(null);return t&&R.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function pK(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,a={};for(var l in e){if(r[l])for(o=0;ot.scrollTop;function Cx(t,e){var n,r;const{timeout:i,easing:s,style:o={}}=t;return{duration:(n=o.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=o.transitionTimingFunction)!=null?r:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}function xK(t){return Rt("MuiPaper",t)}Ct("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const bK=["className","component","elevation","square","variant"],_K=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,s={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return At(s,xK,i)},wK=Ge("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return W({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&W({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${In("#fff",dk(e.elevation))}, ${In("#fff",dk(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Mu=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiPaper"}),{className:i,component:s="div",elevation:o=1,square:a=!1,variant:l="elevation"}=r,c=nt(r,bK),u=W({},r,{component:s,elevation:o,square:a,variant:l}),f=_K(u);return E.jsx(wK,W({as:s,ownerState:u,className:lt(f.root,i),ref:n},c))});function SK(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:o,in:a,onExited:l,timeout:c}=t,[u,f]=R.useState(!1),h=lt(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:o,height:o,top:-(o/2)+s,left:-(o/2)+i},y=lt(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&f(!0),R.useEffect(()=>{if(!a&&l!=null){const x=setTimeout(l,c);return()=>{clearTimeout(x)}}},[l,a,c]),E.jsx("span",{className:h,style:m,children:E.jsx("span",{className:y})})}const Rs=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),MK=["center","classes","className"];let Xb=t=>t,pk,mk,gk,yk;const aT=550,EK=80,TK=Cb(pk||(pk=Xb` 0% { transform: scale(0); opacity: 0.1; @@ -67,7 +67,7 @@ Error generating stack: `+s.message+` transform: scale(1); opacity: 0.3; } -`)),wK=Cb(g4||(g4=Xb` +`)),CK=Cb(mk||(mk=Xb` 0% { opacity: 1; } @@ -75,7 +75,7 @@ Error generating stack: `+s.message+` 100% { opacity: 0; } -`)),SK=Cb(y4||(y4=Xb` +`)),RK=Cb(gk||(gk=Xb` 0% { transform: scale(1); } @@ -87,7 +87,7 @@ Error generating stack: `+s.message+` 100% { transform: scale(1); } -`)),MK=Xe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),EK=Xe(vK,{name:"MuiTouchRipple",slot:"Ripple"})(v4||(v4=Xb` +`)),AK=Ge("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),PK=Ge(SK,{name:"MuiTouchRipple",slot:"Ripple"})(yk||(yk=Xb` opacity: 0; position: absolute; @@ -130,9 +130,9 @@ Error generating stack: `+s.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),Rs.rippleVisible,_K,aT,({theme:t})=>t.transitions.easing.easeInOut,Rs.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Rs.child,Rs.childLeaving,wK,aT,({theme:t})=>t.transitions.easing.easeInOut,Rs.childPulsate,SK,({theme:t})=>t.transitions.easing.easeInOut),TK=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:o}=r,a=nt(r,xK),[l,c]=R.useState([]),u=R.useRef(0),f=R.useRef(null);R.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=R.useRef(!1),m=Jz(),y=R.useRef(null),x=R.useRef(null),v=R.useCallback(S=>{const{pulsate:C,rippleX:P,rippleY:A,rippleSize:L,cb:k}=S;c(T=>[...T,E.jsx(EK,{classes:{ripple:lt(s.ripple,Rs.ripple),rippleVisible:lt(s.rippleVisible,Rs.rippleVisible),ripplePulsate:lt(s.ripplePulsate,Rs.ripplePulsate),child:lt(s.child,Rs.child),childLeaving:lt(s.childLeaving,Rs.childLeaving),childPulsate:lt(s.childPulsate,Rs.childPulsate)},timeout:aT,pulsate:C,rippleX:P,rippleY:A,rippleSize:L},u.current)]),u.current+=1,f.current=k},[s]),g=R.useCallback((S={},C={},P=()=>{})=>{const{pulsate:A=!1,center:L=i||C.pulsate,fakeElement:k=!1}=C;if((S==null?void 0:S.type)==="mousedown"&&h.current){h.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(h.current=!0);const T=k?null:x.current,N=T?T.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,D,B;if(L||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)z=Math.round(N.width/2),D=Math.round(N.height/2);else{const{clientX:G,clientY:X}=S.touches&&S.touches.length>0?S.touches[0]:S;z=Math.round(G-N.left),D=Math.round(X-N.top)}if(L)B=Math.sqrt((2*N.width**2+N.height**2)/3),B%2===0&&(B+=1);else{const G=Math.max(Math.abs((T?T.clientWidth:0)-z),z)*2+2,X=Math.max(Math.abs((T?T.clientHeight:0)-D),D)*2+2;B=Math.sqrt(G**2+X**2)}S!=null&&S.touches?y.current===null&&(y.current=()=>{v({pulsate:A,rippleX:z,rippleY:D,rippleSize:B,cb:P})},m.start(bK,()=>{y.current&&(y.current(),y.current=null)})):v({pulsate:A,rippleX:z,rippleY:D,rippleSize:B,cb:P})},[i,v,m]),b=R.useCallback(()=>{g({},{pulsate:!0})},[g]),_=R.useCallback((S,C)=>{if(m.clear(),(S==null?void 0:S.type)==="touchend"&&y.current){y.current(),y.current=null,m.start(0,()=>{_(S,C)});return}y.current=null,c(P=>P.length>0?P.slice(1):P),f.current=C},[m]);return R.useImperativeHandle(n,()=>({pulsate:b,start:g,stop:_}),[b,g,_]),E.jsx(MK,W({className:lt(Rs.root,s.root,o),ref:x},a,{children:E.jsx(FR,{component:null,exit:!0,children:l})}))});function CK(t){return Rt("MuiButtonBase",t)}const RK=Ct("MuiButtonBase",["root","disabled","focusVisible"]),AK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],PK=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,o=At({root:["root",e&&"disabled",n&&"focusVisible"]},CK,i);return n&&r&&(o.root+=` ${r}`),o},IK=Xe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${RK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Eu=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:o,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:y,onClick:x,onContextMenu:v,onDragLeave:g,onFocus:b,onFocusVisible:_,onKeyDown:S,onKeyUp:C,onMouseDown:P,onMouseLeave:A,onMouseUp:L,onTouchEnd:k,onTouchMove:T,onTouchStart:N,tabIndex:z=0,TouchRippleProps:D,touchRippleRef:B,type:G}=r,X=nt(r,AK),Z=R.useRef(null),F=R.useRef(null),q=Mr(F,B),{isFocusVisibleRef:K,onFocus:Q,onBlur:he,ref:fe}=Qz(),[J,de]=R.useState(!1);c&&J&&de(!1),R.useImperativeHandle(i,()=>({focusVisible:()=>{de(!0),Z.current.focus()}}),[]);const[be,_e]=R.useState(!1);R.useEffect(()=>{_e(!0)},[]);const He=be&&!u&&!c;R.useEffect(()=>{J&&h&&!u&&be&&F.current.pulsate()},[u,h,J,be]);function at(Ee,_t,Le=f){return Sa(it=>(_t&&_t(it),!Le&&F.current&&F.current[Ee](it),!0))}const Ve=at("start",P),$e=at("stop",v),ae=at("stop",g),oe=at("stop",L),V=at("stop",Ee=>{J&&Ee.preventDefault(),A&&A(Ee)}),Ie=at("start",N),Re=at("stop",k),De=at("stop",T),ue=at("stop",Ee=>{he(Ee),K.current===!1&&de(!1),y&&y(Ee)},!1),Ye=Sa(Ee=>{Z.current||(Z.current=Ee.currentTarget),Q(Ee),K.current===!0&&(de(!0),_&&_(Ee)),b&&b(Ee)}),ke=()=>{const Ee=Z.current;return l&&l!=="button"&&!(Ee.tagName==="A"&&Ee.href)},$=R.useRef(!1),U=Sa(Ee=>{h&&!$.current&&J&&F.current&&Ee.key===" "&&($.current=!0,F.current.stop(Ee,()=>{F.current.start(Ee)})),Ee.target===Ee.currentTarget&&ke()&&Ee.key===" "&&Ee.preventDefault(),S&&S(Ee),Ee.target===Ee.currentTarget&&ke()&&Ee.key==="Enter"&&!c&&(Ee.preventDefault(),x&&x(Ee))}),ne=Sa(Ee=>{h&&Ee.key===" "&&F.current&&J&&!Ee.defaultPrevented&&($.current=!1,F.current.stop(Ee,()=>{F.current.pulsate(Ee)})),C&&C(Ee),x&&Ee.target===Ee.currentTarget&&ke()&&Ee.key===" "&&!Ee.defaultPrevented&&x(Ee)});let le=l;le==="button"&&(X.href||X.to)&&(le=m);const Te={};le==="button"?(Te.type=G===void 0?"button":G,Te.disabled=c):(!X.href&&!X.to&&(Te.role="button"),c&&(Te["aria-disabled"]=c));const ye=Mr(n,fe,Z),Ge=W({},r,{centerRipple:s,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:z,focusVisible:J}),Ae=PK(Ge);return E.jsxs(IK,W({as:le,className:lt(Ae.root,a),ownerState:Ge,onBlur:ue,onClick:x,onContextMenu:$e,onFocus:Ye,onKeyDown:U,onKeyUp:ne,onMouseDown:Ve,onMouseLeave:V,onMouseUp:oe,onDragLeave:ae,onTouchEnd:Re,onTouchMove:De,onTouchStart:Ie,ref:ye,tabIndex:c?-1:z,type:G},Te,X,{children:[o,He?E.jsx(TK,W({ref:q,center:s},D)):null]}))});function NK(t){return Rt("MuiTypography",t)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const kK=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],LK=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=t,a={root:["root",s,t.align!=="inherit"&&`align${bt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return At(a,NK,o)},OK=Xe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${bt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>W({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),x4={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},DK={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},FK=t=>DK[t]||t,ar=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTypography"}),i=FK(r.color),s=ug(W({},r,{color:i})),{align:o="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=x4}=s,y=nt(s,kK),x=W({},s,{align:o,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:f,variant:h,variantMapping:m}),v=l||(f?"p":m[h]||x4[h])||"span",g=LK(x);return E.jsx(OK,W({as:v,ref:n,ownerState:x,className:lt(g.root,a)},y))});function zK(t){return Rt("MuiAppBar",t)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const UK=["className","color","enableColorOnDark","position"],BK=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${bt(e)}`,`position${bt(n)}`]};return At(i,zK,r)},iy=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,jK=Xe(Mu,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${bt(n.position)}`],e[`color${bt(n.color)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return W({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&W({},e.color==="default"&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&W({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&W({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:iy(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:iy(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:iy(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:iy(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},!["inherit","transparent"].includes(e.color)&&{backgroundColor:"var(--AppBar-background)"},{color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),VK=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiAppBar"}),{className:i,color:s="primary",enableColorOnDark:o=!1,position:a="fixed"}=r,l=nt(r,UK),c=W({},r,{color:s,position:a,enableColorOnDark:o}),u=BK(c);return E.jsx(jK,W({square:!0,component:"header",ownerState:c,elevation:4,className:lt(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function $K(t){return typeof t=="function"?t():t}const WK=R.forwardRef(function(e,n){const{children:r,container:i,disablePortal:s=!1}=e,[o,a]=R.useState(null),l=Mr(R.isValidElement(r)?fg(r):null,n);if(Fs(()=>{s||a($K(i)||document.body)},[i,s]),Fs(()=>{if(o&&!s)return tT(n,o),()=>{tT(n,null)}},[n,o,s]),s){if(R.isValidElement(r)){const c={ref:l};return R.cloneElement(r,c)}return E.jsx(R.Fragment,{children:r})}return E.jsx(R.Fragment,{children:o&&Hl.createPortal(r,o)})}),HK=["onChange","maxRows","minRows","style","value"];function sy(t){return parseInt(t,10)||0}const GK={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function XK(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const qK=R.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:s=1,style:o,value:a}=e,l=nt(e,HK),{current:c}=R.useRef(a!=null),u=R.useRef(null),f=Mr(n,u),h=R.useRef(null),m=R.useRef(null),y=R.useCallback(()=>{const g=u.current,_=Da(g).getComputedStyle(g);if(_.width==="0px")return{outerHeightStyle:0,overflowing:!1};const S=m.current;S.style.width=_.width,S.value=g.value||e.placeholder||"x",S.value.slice(-1)===` -`&&(S.value+=" ");const C=_.boxSizing,P=sy(_.paddingBottom)+sy(_.paddingTop),A=sy(_.borderBottomWidth)+sy(_.borderTopWidth),L=S.scrollHeight;S.value="x";const k=S.scrollHeight;let T=L;s&&(T=Math.max(Number(s)*k,T)),i&&(T=Math.min(Number(i)*k,T)),T=Math.max(T,k);const N=T+(C==="border-box"?P+A:0),z=Math.abs(T-L)<=1;return{outerHeightStyle:N,overflowing:z}},[i,s,e.placeholder]),x=R.useCallback(()=>{const g=y();if(XK(g))return;const b=g.outerHeightStyle,_=u.current;h.current!==b&&(h.current=b,_.style.height=`${b}px`),_.style.overflow=g.overflowing?"hidden":""},[y]);Fs(()=>{const g=()=>{x()};let b;const _=Wb(g),S=u.current,C=Da(S);C.addEventListener("resize",_);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(g),P.observe(S)),()=>{_.clear(),cancelAnimationFrame(b),C.removeEventListener("resize",_),P&&P.disconnect()}},[y,x]),Fs(()=>{x()});const v=g=>{c||x(),r&&r(g)};return E.jsxs(R.Fragment,{children:[E.jsx("textarea",W({value:a,onChange:v,ref:f,rows:s,style:o},l)),E.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:W({},GK.shadow,o,{paddingTop:0,paddingBottom:0})})]})});function th({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const zR=R.createContext(void 0);function Tu(){return R.useContext(zR)}function bU(t){return E.jsx(UX,W({},t,{defaultTheme:LR,themeId:Sd}))}function b4(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Rx(t,e=!1){return t&&(b4(t.value)&&t.value!==""||e&&b4(t.defaultValue)&&t.defaultValue!=="")}function YK(t){return t.startAdornment}function KK(t){return Rt("MuiInputBase",t)}const Cd=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),ZK=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],qb=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${bt(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},Yb=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},JK=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:s,focused:o,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:y}=t,x={root:["root",`color${bt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",o&&"focused",a&&"formControl",h&&h!=="medium"&&`size${bt(h)}`,u&&"multiline",m&&"adornedStart",s&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",y==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",s&&"inputAdornedEnd",f&&"readOnly"]};return At(x,KK,e)},Kb=Xe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:qb})(({theme:t,ownerState:e})=>W({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Cd.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&W({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),Zb=Xe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Yb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=W({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return W({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Cd.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${Cd.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),QK=E.jsx(bU,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),UR=R.forwardRef(function(e,n){var r;const i=Pt({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:o,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:y,fullWidth:x=!1,id:v,inputComponent:g="input",inputProps:b={},inputRef:_,maxRows:S,minRows:C,multiline:P=!1,name:A,onBlur:L,onChange:k,onClick:T,onFocus:N,onKeyDown:z,onKeyUp:D,placeholder:B,readOnly:G,renderSuffix:X,rows:Z,slotProps:F={},slots:q={},startAdornment:K,type:Q="text",value:he}=i,fe=nt(i,ZK),J=b.value!=null?b.value:he,{current:de}=R.useRef(J!=null),be=R.useRef(),_e=R.useCallback(Ae=>{},[]),He=Mr(be,_,b.ref,_e),[at,Ve]=R.useState(!1),$e=Tu(),ae=th({props:i,muiFormControl:$e,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ae.focused=$e?$e.focused:at,R.useEffect(()=>{!$e&&h&&at&&(Ve(!1),L&&L())},[$e,h,at,L]);const oe=$e&&$e.onFilled,V=$e&&$e.onEmpty,Ie=R.useCallback(Ae=>{Rx(Ae)?oe&&oe():V&&V()},[oe,V]);Fs(()=>{de&&Ie({value:J})},[J,Ie,de]);const Re=Ae=>{if(ae.disabled){Ae.stopPropagation();return}N&&N(Ae),b.onFocus&&b.onFocus(Ae),$e&&$e.onFocus?$e.onFocus(Ae):Ve(!0)},De=Ae=>{L&&L(Ae),b.onBlur&&b.onBlur(Ae),$e&&$e.onBlur?$e.onBlur(Ae):Ve(!1)},ue=(Ae,...Ee)=>{if(!de){const _t=Ae.target||be.current;if(_t==null)throw new Error(Oa(1));Ie({value:_t.value})}b.onChange&&b.onChange(Ae,...Ee),k&&k(Ae,...Ee)};R.useEffect(()=>{Ie(be.current)},[]);const Ye=Ae=>{be.current&&Ae.currentTarget===Ae.target&&be.current.focus(),T&&T(Ae)};let ke=g,$=b;P&&ke==="input"&&(Z?$=W({type:void 0,minRows:Z,maxRows:Z},$):$=W({type:void 0,maxRows:S,minRows:C},$),ke=qK);const U=Ae=>{Ie(Ae.animationName==="mui-auto-fill-cancel"?be.current:{value:"x"})};R.useEffect(()=>{$e&&$e.setAdornedStart(!!K)},[$e,K]);const ne=W({},i,{color:ae.color||"primary",disabled:ae.disabled,endAdornment:y,error:ae.error,focused:ae.focused,formControl:$e,fullWidth:x,hiddenLabel:ae.hiddenLabel,multiline:P,size:ae.size,startAdornment:K,type:Q}),le=JK(ne),Te=q.root||c.Root||Kb,ye=F.root||u.root||{},Ge=q.input||c.Input||Zb;return $=W({},$,(r=F.input)!=null?r:u.input),E.jsxs(R.Fragment,{children:[!m&&QK,E.jsxs(Te,W({},ye,!Td(Te)&&{ownerState:W({},ne,ye.ownerState)},{ref:n,onClick:Ye},fe,{className:lt(le.root,ye.className,l,G&&"MuiInputBase-readOnly"),children:[K,E.jsx(zR.Provider,{value:null,children:E.jsx(Ge,W({ownerState:ne,"aria-invalid":ae.error,"aria-describedby":s,autoComplete:o,autoFocus:a,defaultValue:f,disabled:ae.disabled,id:v,onAnimationStart:U,name:A,placeholder:B,readOnly:G,required:ae.required,rows:Z,value:J,onKeyDown:z,onKeyUp:D,type:Q},$,!Td(Ge)&&{as:ke,ownerState:W({},ne,$.ownerState)},{ref:He,className:lt(le.input,$.className,G&&"MuiInputBase-readOnly"),onBlur:De,onChange:ue,onFocus:Re}))}),y,X?X(W({},ae,{startAdornment:K})):null]}))]})});function eZ(t){return Rt("MuiInput",t)}const Wh=W({},Cd,Ct("MuiInput",["root","underline","input"]));function tZ(t){return Rt("MuiOutlinedInput",t)}const il=W({},Cd,Ct("MuiOutlinedInput",["root","notchedOutline","input"]));function nZ(t){return Rt("MuiFilledInput",t)}const lc=W({},Cd,Ct("MuiFilledInput",["root","underline","input"])),rZ=eh(E.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),iZ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],sZ={entering:{opacity:1},entered:{opacity:1}},oZ=R.forwardRef(function(e,n){const r=Su(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:a,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:y,onExiting:x,style:v,timeout:g=i,TransitionComponent:b=Zo}=e,_=nt(e,iZ),S=R.useRef(null),C=Mr(S,fg(a),n),P=B=>G=>{if(B){const X=S.current;G===void 0?B(X):B(X,G)}},A=P(h),L=P((B,G)=>{xU(B);const X=Cx({style:v,timeout:g,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",X),B.style.transition=r.transitions.create("opacity",X),u&&u(B,G)}),k=P(f),T=P(x),N=P(B=>{const G=Cx({style:v,timeout:g,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",G),B.style.transition=r.transitions.create("opacity",G),m&&m(B)}),z=P(y),D=B=>{s&&s(S.current,B)};return E.jsx(b,W({appear:o,in:c,nodeRef:S,onEnter:L,onEntered:k,onEntering:A,onExit:N,onExited:z,onExiting:T,addEndListener:D,timeout:g},_,{children:(B,G)=>R.cloneElement(a,W({style:W({opacity:0,visibility:B==="exited"&&!c?"hidden":void 0},sZ[B],v,a.props.style),ref:C},G))}))});function aZ(t){return Rt("MuiBackdrop",t)}Ct("MuiBackdrop",["root","invisible"]);const lZ=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],cZ=t=>{const{classes:e,invisible:n}=t;return At({root:["root",n&&"invisible"]},aZ,e)},uZ=Xe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>W({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),fZ=R.forwardRef(function(e,n){var r,i,s;const o=Pt({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:f={},invisible:h=!1,open:m,slotProps:y={},slots:x={},TransitionComponent:v=oZ,transitionDuration:g}=o,b=nt(o,lZ),_=W({},o,{component:c,invisible:h}),S=cZ(_),C=(r=y.root)!=null?r:f.root;return E.jsx(v,W({in:m,timeout:g},b,{children:E.jsx(uZ,W({"aria-hidden":!0},C,{as:(i=(s=x.root)!=null?s:u.Root)!=null?i:c,className:lt(S.root,l,C==null?void 0:C.className),ownerState:W({},_,C==null?void 0:C.ownerState),classes:S,ref:n,children:a}))}))}),dZ=Ct("MuiBox",["root"]),hZ=kR(),Go=HX({themeId:Sd,defaultTheme:hZ,defaultClassName:dZ.root,generateClassName:zz.generate});function pZ(t){return Rt("MuiButton",t)}const oy=Ct("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),mZ=R.createContext({}),gZ=R.createContext(void 0),yZ=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],vZ=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:s,classes:o}=t,a={root:["root",s,`${s}${bt(e)}`,`size${bt(i)}`,`${s}Size${bt(i)}`,`color${bt(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${bt(i)}`],endIcon:["icon","endIcon",`iconSize${bt(i)}`]},l=At(a,pZ,o);return W({},o,l)},_U=t=>W({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),xZ=Xe(Eu,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${bt(n.color)}`],e[`size${bt(n.size)}`],e[`${n.variant}Size${bt(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],s=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return W({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":W({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:In(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:In(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:In(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":W({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${oy.focusVisible}`]:W({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${oy.disabled}`]:W({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${In(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${oy.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oy.disabled}`]:{boxShadow:"none"}}),bZ=Xe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${bt(n.size)}`]]}})(({ownerState:t})=>W({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},_U(t))),_Z=Xe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${bt(n.size)}`]]}})(({ownerState:t})=>W({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},_U(t))),du=R.forwardRef(function(e,n){const r=R.useContext(mZ),i=R.useContext(gZ),s=_m(r,e),o=Pt({props:s,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:y,focusVisibleClassName:x,fullWidth:v=!1,size:g="medium",startIcon:b,type:_,variant:S="text"}=o,C=nt(o,yZ),P=W({},o,{color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:v,size:g,type:_,variant:S}),A=vZ(P),L=b&&E.jsx(bZ,{className:A.startIcon,ownerState:P,children:b}),k=y&&E.jsx(_Z,{className:A.endIcon,ownerState:P,children:y}),T=i||"";return E.jsxs(xZ,W({ownerState:P,className:lt(r.className,A.root,u,T),component:c,disabled:f,focusRipple:!m,focusVisibleClassName:lt(A.focusVisible,x),ref:n,type:_},C,{classes:A,children:[L,a,k]}))});function wZ(t){return Rt("MuiCard",t)}Ct("MuiCard",["root"]);const SZ=["className","raised"],MZ=t=>{const{classes:e}=t;return At({root:["root"]},wZ,e)},EZ=Xe(Mu,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),TZ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiCard"}),{className:i,raised:s=!1}=r,o=nt(r,SZ),a=W({},r,{raised:s}),l=MZ(a);return E.jsx(EZ,W({className:lt(l.root,i),elevation:s?8:void 0,ref:n,ownerState:a},o))});function CZ(t){return Rt("MuiCardActions",t)}Ct("MuiCardActions",["root","spacing"]);const RZ=["disableSpacing","className"],AZ=t=>{const{classes:e,disableSpacing:n}=t;return At({root:["root",!n&&"spacing"]},CZ,e)},PZ=Xe("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>W({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),IZ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:s}=r,o=nt(r,RZ),a=W({},r,{disableSpacing:i}),l=AZ(a);return E.jsx(PZ,W({className:lt(l.root,s),ownerState:a,ref:n},o))});function NZ(t){return Rt("MuiCardContent",t)}Ct("MuiCardContent",["root"]);const kZ=["className","component"],LZ=t=>{const{classes:e}=t;return At({root:["root"]},NZ,e)},OZ=Xe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),DZ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiCardContent"}),{className:i,component:s="div"}=r,o=nt(r,kZ),a=W({},r,{component:s}),l=LZ(a);return E.jsx(OZ,W({as:s,className:lt(l.root,i),ownerState:a,ref:n},o))});function FZ(t){return Rt("PrivateSwitchBase",t)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const zZ=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],UZ=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,s={root:["root",n&&"checked",r&&"disabled",i&&`edge${bt(i)}`],input:["input"]};return At(s,FZ,e)},BZ=Xe(Eu)(({ownerState:t})=>W({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),jZ=Xe("input",{shouldForwardProp:mi})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),VZ=R.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:s,className:o,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:h,inputProps:m,inputRef:y,name:x,onBlur:v,onChange:g,onFocus:b,readOnly:_,required:S=!1,tabIndex:C,type:P,value:A}=e,L=nt(e,zZ),[k,T]=nT({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),N=Tu(),z=q=>{b&&b(q),N&&N.onFocus&&N.onFocus(q)},D=q=>{v&&v(q),N&&N.onBlur&&N.onBlur(q)},B=q=>{if(q.nativeEvent.defaultPrevented)return;const K=q.target.checked;T(K),g&&g(q,K)};let G=l;N&&typeof G>"u"&&(G=N.disabled);const X=P==="checkbox"||P==="radio",Z=W({},e,{checked:k,disabled:G,disableFocusRipple:c,edge:u}),F=UZ(Z);return E.jsxs(BZ,W({component:"span",className:lt(F.root,o),centerRipple:!0,focusRipple:!c,disabled:G,tabIndex:null,role:void 0,onFocus:z,onBlur:D,ownerState:Z,ref:n},L,{children:[E.jsx(jZ,W({autoFocus:r,checked:i,defaultChecked:a,className:F.input,disabled:G,id:X?h:void 0,name:x,onChange:B,readOnly:_,ref:y,required:S,ownerState:Z,tabIndex:C,type:P},P==="checkbox"&&A===void 0?{}:{value:A},m)),k?s:f]}))}),$Z=eh(E.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),WZ=eh(E.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),HZ=eh(E.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function GZ(t){return Rt("MuiCheckbox",t)}const fM=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),XZ=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],qZ=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,s={root:["root",n&&"indeterminate",`color${bt(r)}`,`size${bt(i)}`]},o=At(s,GZ,e);return W({},e,o)},YZ=Xe(VZ,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${bt(n.size)}`],n.color!=="default"&&e[`color${bt(n.color)}`]]}})(({theme:t,ownerState:e})=>W({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:In(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${fM.checked}, &.${fM.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${fM.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),KZ=E.jsx(WZ,{}),ZZ=E.jsx($Z,{}),JZ=E.jsx(HZ,{}),QZ=R.forwardRef(function(e,n){var r,i;const s=Pt({props:e,name:"MuiCheckbox"}),{checkedIcon:o=KZ,color:a="primary",icon:l=ZZ,indeterminate:c=!1,indeterminateIcon:u=JZ,inputProps:f,size:h="medium",className:m}=s,y=nt(s,XZ),x=c?u:l,v=c?u:o,g=W({},s,{color:a,indeterminate:c,size:h}),b=qZ(g);return E.jsx(YZ,W({type:"checkbox",inputProps:W({"data-indeterminate":c},f),icon:R.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:h}),checkedIcon:R.cloneElement(v,{fontSize:(i=v.props.fontSize)!=null?i:h}),ownerState:g,ref:n,className:lt(b.root,m)},y,{classes:b}))}),eJ=Vq({createStyledComponent:Xe("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${bt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Pt({props:t,name:"MuiContainer"})}),tJ=(t,e)=>W({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),nJ=t=>W({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),rJ=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([o,a])=>{var l;r[t.getColorSchemeSelector(o).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=W({html:tJ(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:W({margin:0},nJ(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const s=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return s&&(i=[i,s]),i};function iJ(t){const e=Pt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return E.jsxs(R.Fragment,{children:[E.jsx(bU,{styles:i=>rJ(i,r)}),n]})}function sJ(t){const e=Ui(t);return e.body===t?Da(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Lp(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function _4(t){return parseInt(Da(t).getComputedStyle(t).paddingRight,10)||0}function oJ(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function w4(t,e,n,r,i){const s=[e,n,...r];[].forEach.call(t.children,o=>{const a=s.indexOf(o)===-1,l=!oJ(o);a&&l&&Lp(o,i)})}function dM(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function aJ(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(sJ(r)){const o=eU(Ui(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_4(r)+o}px`;const a=Ui(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${_4(l)+o}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Ui(r).body;else{const o=r.parentElement,a=Da(r);s=(o==null?void 0:o.nodeName)==="HTML"&&a.getComputedStyle(o).overflowY==="scroll"?o:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:o,property:a})=>{s?o.style.setProperty(a,s):o.style.removeProperty(a)})}}function lJ(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class cJ{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Lp(e.modalRef,!1);const i=lJ(n);w4(n,e.mount,e.modalRef,i,!0);const s=dM(this.containers,o=>o.container===n);return s!==-1?(this.containers[s].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=dM(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=aJ(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=dM(this.containers,o=>o.modals.indexOf(e)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&Lp(e.modalRef,n),w4(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const o=s.modals[s.modals.length-1];o.modalRef&&Lp(o.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const uJ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function fJ(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function dJ(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function hJ(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||dJ(t))}function pJ(t){const e=[],n=[];return Array.from(t.querySelectorAll(uJ)).forEach((r,i)=>{const s=fJ(r);s===-1||!hJ(r)||(s===0?e.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function mJ(){return!0}function gJ(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=pJ,isEnabled:o=mJ,open:a}=t,l=R.useRef(!1),c=R.useRef(null),u=R.useRef(null),f=R.useRef(null),h=R.useRef(null),m=R.useRef(!1),y=R.useRef(null),x=Mr(fg(e),y),v=R.useRef(null);R.useEffect(()=>{!a||!y.current||(m.current=!n)},[n,a]),R.useEffect(()=>{if(!a||!y.current)return;const _=Ui(y.current);return y.current.contains(_.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),m.current&&y.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),R.useEffect(()=>{if(!a||!y.current)return;const _=Ui(y.current),S=A=>{v.current=A,!(r||!o()||A.key!=="Tab")&&_.activeElement===y.current&&A.shiftKey&&(l.current=!0,u.current&&u.current.focus())},C=()=>{const A=y.current;if(A===null)return;if(!_.hasFocus()||!o()||l.current){l.current=!1;return}if(A.contains(_.activeElement)||r&&_.activeElement!==c.current&&_.activeElement!==u.current)return;if(_.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let L=[];if((_.activeElement===c.current||_.activeElement===u.current)&&(L=s(y.current)),L.length>0){var k,T;const N=!!((k=v.current)!=null&&k.shiftKey&&((T=v.current)==null?void 0:T.key)==="Tab"),z=L[0],D=L[L.length-1];typeof z!="string"&&typeof D!="string"&&(N?D.focus():z.focus())}else A.focus()};_.addEventListener("focusin",C),_.addEventListener("keydown",S,!0);const P=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&C()},50);return()=>{clearInterval(P),_.removeEventListener("focusin",C),_.removeEventListener("keydown",S,!0)}},[n,r,i,o,a,s]);const g=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0,h.current=_.target;const S=e.props.onFocus;S&&S(_)},b=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0};return E.jsxs(R.Fragment,{children:[E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),R.cloneElement(e,{ref:x,onFocus:g}),E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}function yJ(t){return typeof t=="function"?t():t}function vJ(t){return t?t.props.hasOwnProperty("in"):!1}const xJ=new cJ;function bJ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=xJ,closeAfterTransition:s=!1,onTransitionEnter:o,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:f}=t,h=R.useRef({}),m=R.useRef(null),y=R.useRef(null),x=Mr(y,f),[v,g]=R.useState(!u),b=vJ(l);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const S=()=>Ui(m.current),C=()=>(h.current.modalRef=y.current,h.current.mount=m.current,h.current),P=()=>{i.mount(C(),{disableScrollLock:r}),y.current&&(y.current.scrollTop=0)},A=Sa(()=>{const X=yJ(e)||S().body;i.add(C(),X),y.current&&P()}),L=R.useCallback(()=>i.isTopModal(C()),[i]),k=Sa(X=>{m.current=X,X&&(u&&L()?P():y.current&&Lp(y.current,_))}),T=R.useCallback(()=>{i.remove(C(),_)},[_,i]);R.useEffect(()=>()=>{T()},[T]),R.useEffect(()=>{u?A():(!b||!s)&&T()},[u,T,b,s,A]);const N=X=>Z=>{var F;(F=X.onKeyDown)==null||F.call(X,Z),!(Z.key!=="Escape"||Z.which===229||!L())&&(n||(Z.stopPropagation(),c&&c(Z,"escapeKeyDown")))},z=X=>Z=>{var F;(F=X.onClick)==null||F.call(X,Z),Z.target===Z.currentTarget&&c&&c(Z,"backdropClick")};return{getRootProps:(X={})=>{const Z=nU(t);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=W({},Z,X);return W({role:"presentation"},F,{onKeyDown:N(F),ref:x})},getBackdropProps:(X={})=>{const Z=X;return W({"aria-hidden":!0},Z,{onClick:z(Z),open:u})},getTransitionProps:()=>{const X=()=>{g(!1),o&&o()},Z=()=>{g(!0),a&&a(),s&&T()};return{onEnter:ZN(X,l==null?void 0:l.props.onEnter),onExited:ZN(Z,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:k,isTopModal:L,exited:v,hasTransition:b}}function _J(t){return Rt("MuiModal",t)}Ct("MuiModal",["root","hidden","backdrop"]);const wJ=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],SJ=t=>{const{open:e,exited:n,classes:r}=t;return At({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},_J,r)},MJ=Xe("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>W({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),EJ=Xe(fZ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),TJ=R.forwardRef(function(e,n){var r,i,s,o,a,l;const c=Pt({name:"MuiModal",props:e}),{BackdropComponent:u=EJ,BackdropProps:f,className:h,closeAfterTransition:m=!1,children:y,container:x,component:v,components:g={},componentsProps:b={},disableAutoFocus:_=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:C=!1,disablePortal:P=!1,disableRestoreFocus:A=!1,disableScrollLock:L=!1,hideBackdrop:k=!1,keepMounted:T=!1,onBackdropClick:N,open:z,slotProps:D,slots:B}=c,G=nt(c,wJ),X=W({},c,{closeAfterTransition:m,disableAutoFocus:_,disableEnforceFocus:S,disableEscapeKeyDown:C,disablePortal:P,disableRestoreFocus:A,disableScrollLock:L,hideBackdrop:k,keepMounted:T}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:q,portalRef:K,isTopModal:Q,exited:he,hasTransition:fe}=bJ(W({},X,{rootRef:n})),J=W({},X,{exited:he}),de=SJ(J),be={};if(y.props.tabIndex===void 0&&(be.tabIndex="-1"),fe){const{onEnter:oe,onExited:V}=q();be.onEnter=oe,be.onExited=V}const _e=(r=(i=B==null?void 0:B.root)!=null?i:g.Root)!=null?r:MJ,He=(s=(o=B==null?void 0:B.backdrop)!=null?o:g.Backdrop)!=null?s:u,at=(a=D==null?void 0:D.root)!=null?a:b.root,Ve=(l=D==null?void 0:D.backdrop)!=null?l:b.backdrop,$e=Ho({elementType:_e,externalSlotProps:at,externalForwardedProps:G,getSlotProps:Z,additionalProps:{ref:n,as:v},ownerState:J,className:lt(h,at==null?void 0:at.className,de==null?void 0:de.root,!J.open&&J.exited&&(de==null?void 0:de.hidden))}),ae=Ho({elementType:He,externalSlotProps:Ve,additionalProps:f,getSlotProps:oe=>F(W({},oe,{onClick:V=>{N&&N(V),oe!=null&&oe.onClick&&oe.onClick(V)}})),className:lt(Ve==null?void 0:Ve.className,f==null?void 0:f.className,de==null?void 0:de.backdrop),ownerState:J});return!T&&!z&&(!fe||he)?null:E.jsx(WK,{ref:K,container:x,disablePortal:P,children:E.jsxs(_e,W({},$e,{children:[!k&&u?E.jsx(He,W({},ae)):null,E.jsx(gJ,{disableEnforceFocus:S,disableAutoFocus:_,disableRestoreFocus:A,isEnabled:Q,open:z,children:R.cloneElement(y,be)})]}))})}),S4=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),CJ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],RJ=t=>{const{classes:e,disableUnderline:n}=t,i=At({root:["root",!n&&"underline"],input:["input"]},nZ,e);return W({},e,i)},AJ=Xe(Kb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...qb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return W({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${lc.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${lc.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${lc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${lc.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${lc.disabled}, .${lc.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${lc.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&W({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),PJ=Xe(Zb,{name:"MuiFilledInput",slot:"Input",overridesResolver:Yb})(({theme:t,ownerState:e})=>W({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),BR=R.forwardRef(function(e,n){var r,i,s,o;const a=Pt({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:m,slots:y={},type:x="text"}=a,v=nt(a,CJ),g=W({},a,{fullWidth:u,inputComponent:f,multiline:h,type:x}),b=RJ(a),_={root:{ownerState:g},input:{ownerState:g}},S=m??c?fi(_,m??c):_,C=(r=(i=y.root)!=null?i:l.Root)!=null?r:AJ,P=(s=(o=y.input)!=null?o:l.Input)!=null?s:PJ;return E.jsx(UR,W({slots:{root:C,input:P},componentsProps:S,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:x},v,{classes:b}))});BR.muiName="Input";function IJ(t){return Rt("MuiFormControl",t)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const NJ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],kJ=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${bt(n)}`,r&&"fullWidth"]};return At(i,IJ,e)},LJ=Xe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>W({},e.root,e[`margin${bt(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>W({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),wU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiFormControl"}),{children:i,className:s,color:o="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:y=!1,size:x="medium",variant:v="outlined"}=r,g=nt(r,NJ),b=W({},r,{color:o,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:y,size:x,variant:v}),_=kJ(b),[S,C]=R.useState(()=>{let D=!1;return i&&R.Children.forEach(i,B=>{if(!Dv(B,["Input","Select"]))return;const G=Dv(B,["Select"])?B.props.input:B;G&&YK(G.props)&&(D=!0)}),D}),[P,A]=R.useState(()=>{let D=!1;return i&&R.Children.forEach(i,B=>{Dv(B,["Input","Select"])&&(Rx(B.props,!0)||Rx(B.props.inputProps,!0))&&(D=!0)}),D}),[L,k]=R.useState(!1);l&&L&&k(!1);const T=u!==void 0&&!l?u:L;let N;const z=R.useMemo(()=>({adornedStart:S,setAdornedStart:C,color:o,disabled:l,error:c,filled:P,focused:T,fullWidth:f,hiddenLabel:h,size:x,onBlur:()=>{k(!1)},onEmpty:()=>{A(!1)},onFilled:()=>{A(!0)},onFocus:()=>{k(!0)},registerEffect:N,required:y,variant:v}),[S,o,l,c,P,T,f,h,N,y,x,v]);return E.jsx(zR.Provider,{value:z,children:E.jsx(LJ,W({as:a,ownerState:b,className:lt(_.root,s),ref:n},g,{children:i}))})}),lo=Kq({createStyledComponent:Xe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Pt({props:t,name:"MuiStack"})});function OJ(t){return Rt("MuiFormHelperText",t)}const M4=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var E4;const DJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],FJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:s,filled:o,focused:a,required:l}=t,c={root:["root",i&&"disabled",s&&"error",r&&`size${bt(r)}`,n&&"contained",a&&"focused",o&&"filled",l&&"required"]};return At(c,OJ,e)},zJ=Xe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${bt(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>W({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${M4.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${M4.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),UJ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiFormHelperText"}),{children:i,className:s,component:o="p"}=r,a=nt(r,DJ),l=Tu(),c=th({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=W({},r,{component:o,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=FJ(u);return E.jsx(zJ,W({as:o,ownerState:u,className:lt(f.root,s),ref:n},a,{children:i===" "?E4||(E4=E.jsx("span",{className:"notranslate",children:"​"})):i}))});function BJ(t){return Rt("MuiFormLabel",t)}const Op=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),jJ=["children","className","color","component","disabled","error","filled","focused","required"],VJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:s,filled:o,required:a}=t,l={root:["root",`color${bt(n)}`,i&&"disabled",s&&"error",o&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",s&&"error"]};return At(l,BJ,e)},$J=Xe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>W({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>W({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Op.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Op.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Op.error}`]:{color:(t.vars||t).palette.error.main}})),WJ=Xe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Op.error}`]:{color:(t.vars||t).palette.error.main}})),HJ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiFormLabel"}),{children:i,className:s,component:o="label"}=r,a=nt(r,jJ),l=Tu(),c=th({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=W({},r,{color:c.color||"primary",component:o,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=VJ(u);return E.jsxs($J,W({as:o,ownerState:u,className:lt(f.root,s),ref:n},a,{children:[i,c.required&&E.jsxs(WJ,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),T4=R.createContext();function GJ(t){return Rt("MuiGrid",t)}const XJ=[0,1,2,3,4,5,6,7,8,9,10],qJ=["column-reverse","column","row-reverse","row"],YJ=["nowrap","wrap-reverse","wrap"],Hh=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],wm=Ct("MuiGrid",["root","container","item","zeroMinWidth",...XJ.map(t=>`spacing-xs-${t}`),...qJ.map(t=>`direction-xs-${t}`),...YJ.map(t=>`wrap-xs-${t}`),...Hh.map(t=>`grid-xs-${t}`),...Hh.map(t=>`grid-sm-${t}`),...Hh.map(t=>`grid-md-${t}`),...Hh.map(t=>`grid-lg-${t}`),...Hh.map(t=>`grid-xl-${t}`)]),KJ=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function fd(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function ZJ({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let s={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)s={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const o=Gc({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof o=="object"?o[i]:o;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(e.container&&e.item&&e.columnSpacing!==0){const u=t.spacing(e.columnSpacing);if(u!=="0px"){const f=`calc(${l} + ${fd(u)})`;c={flexBasis:f,maxWidth:f}}}s=W({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,s):r[t.breakpoints.up(i)]=s,r},{})}function JJ({theme:t,ownerState:e}){const n=Gc({values:e.direction,breakpoints:t.breakpoints.values});return Vi({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${wm.item}`]={maxWidth:"none"}),i})}function SU({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,s)=>t[i]-t[s]);return r.slice(0,r.indexOf(n))}function QJ({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const s=Gc({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=SU({breakpoints:t.breakpoints.values,values:s})),i=Vi({theme:t},s,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{marginTop:`-${fd(u)}`,[`& > .${wm.item}`]:{paddingTop:fd(u)}}:(c=o)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${wm.item}`]:{paddingTop:0}}})}return i}function eQ({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const s=Gc({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=SU({breakpoints:t.breakpoints.values,values:s})),i=Vi({theme:t},s,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{width:`calc(100% + ${fd(u)})`,marginLeft:`-${fd(u)}`,[`& > .${wm.item}`]:{paddingLeft:fd(u)}}:(c=o)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${wm.item}`]:{paddingLeft:0}}})}return i}function tQ(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const s=t[i];Number(s)>0&&r.push(n[`spacing-${i}-${String(s)}`])}),r}const nQ=Xe("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:s,spacing:o,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=tQ(o,c,e));const f=[];return c.forEach(h=>{const m=n[h];m&&f.push(e[`grid-${h}-${String(m)}`])}),[e.root,r&&e.container,s&&e.item,l&&e.zeroMinWidth,...u,i!=="row"&&e[`direction-xs-${String(i)}`],a!=="wrap"&&e[`wrap-xs-${String(a)}`],...f]}})(({ownerState:t})=>W({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),JJ,QJ,eQ,ZJ);function rQ(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const s=`spacing-${r}-${String(i)}`;n.push(s)}}),n}const iQ=t=>{const{classes:e,container:n,direction:r,item:i,spacing:s,wrap:o,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=rQ(s,l));const u=[];l.forEach(h=>{const m=t[h];m&&u.push(`grid-${h}-${String(m)}`)});const f={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,o!=="wrap"&&`wrap-xs-${String(o)}`,...u]};return At(f,GJ,e)},Ca=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiGrid"}),{breakpoints:i}=Su(),s=ug(r),{className:o,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:h=!1,rowSpacing:m,spacing:y=0,wrap:x="wrap",zeroMinWidth:v=!1}=s,g=nt(s,KJ),b=m||y,_=l||y,S=R.useContext(T4),C=u?a||12:S,P={},A=W({},g);i.keys.forEach(T=>{g[T]!=null&&(P[T]=g[T],delete A[T])});const L=W({},s,{columns:C,container:u,direction:f,item:h,rowSpacing:b,columnSpacing:_,wrap:x,zeroMinWidth:v,spacing:y},P,{breakpoints:i.keys}),k=iQ(L);return E.jsx(T4.Provider,{value:C,children:E.jsx(nQ,W({ownerState:L,className:lt(k.root,o),as:c,ref:n},A))})}),sQ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function lT(t){return`scale(${t}, ${t**2})`}const oQ={entering:{opacity:1,transform:lT(1)},entered:{opacity:1,transform:"none"}},hM=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),MU=R.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:s,easing:o,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:y,timeout:x="auto",TransitionComponent:v=Zo}=e,g=nt(e,sQ),b=Jz(),_=R.useRef(),S=Su(),C=R.useRef(null),P=Mr(C,fg(s),n),A=G=>X=>{if(G){const Z=C.current;X===void 0?G(Z):G(Z,X)}},L=A(u),k=A((G,X)=>{xU(G);const{duration:Z,delay:F,easing:q}=Cx({style:y,timeout:x,easing:o},{mode:"enter"});let K;x==="auto"?(K=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=K):K=Z,G.style.transition=[S.transitions.create("opacity",{duration:K,delay:F}),S.transitions.create("transform",{duration:hM?K:K*.666,delay:F,easing:q})].join(","),l&&l(G,X)}),T=A(c),N=A(m),z=A(G=>{const{duration:X,delay:Z,easing:F}=Cx({style:y,timeout:x,easing:o},{mode:"exit"});let q;x==="auto"?(q=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=q):q=X,G.style.transition=[S.transitions.create("opacity",{duration:q,delay:Z}),S.transitions.create("transform",{duration:hM?q:q*.666,delay:hM?Z:Z||q*.333,easing:F})].join(","),G.style.opacity=0,G.style.transform=lT(.75),f&&f(G)}),D=A(h),B=G=>{x==="auto"&&b.start(_.current||0,G),r&&r(C.current,G)};return E.jsx(v,W({appear:i,in:a,nodeRef:C,onEnter:k,onEntered:T,onEntering:L,onExit:z,onExited:D,onExiting:N,addEndListener:B,timeout:x==="auto"?null:x},g,{children:(G,X)=>R.cloneElement(s,W({style:W({opacity:0,transform:lT(.75),visibility:G==="exited"&&!a?"hidden":void 0},oQ[G],y,s.props.style),ref:P},X))}))});MU.muiSupportAuto=!0;const aQ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],lQ=t=>{const{classes:e,disableUnderline:n}=t,i=At({root:["root",!n&&"underline"],input:["input"]},eZ,e);return W({},e,i)},cQ=Xe(Kb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...qb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),W({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Wh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Wh.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Wh.disabled}, .${Wh.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Wh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),uQ=Xe(Zb,{name:"MuiInput",slot:"Input",overridesResolver:Yb})({}),jR=R.forwardRef(function(e,n){var r,i,s,o;const a=Pt({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:m=!1,slotProps:y,slots:x={},type:v="text"}=a,g=nt(a,aQ),b=lQ(a),S={root:{ownerState:{disableUnderline:l}}},C=y??u?fi(y??u,S):S,P=(r=(i=x.root)!=null?i:c.Root)!=null?r:cQ,A=(s=(o=x.input)!=null?o:c.Input)!=null?s:uQ;return E.jsx(UR,W({slots:{root:P,input:A},slotProps:C,fullWidth:f,inputComponent:h,multiline:m,ref:n,type:v},g,{classes:b}))});jR.muiName="Input";function fQ(t){return Rt("MuiInputLabel",t)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const dQ=["disableAnimation","margin","shrink","variant","className"],hQ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:s,variant:o,required:a}=t,l={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&r!=="normal"&&`size${bt(r)}`,o],asterisk:[a&&"asterisk"]},c=At(l,fQ,e);return W({},e,c)},pQ=Xe(HJ,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Op.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>W({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&W({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&W({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&W({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),EU=R.forwardRef(function(e,n){const r=Pt({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:s,className:o}=r,a=nt(r,dQ),l=Tu();let c=s;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=th({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=W({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),h=hQ(f);return E.jsx(pQ,W({"data-shrink":c,ownerState:f,ref:n,className:lt(h.root,o)},a,{classes:h}))});function mQ(t){return Rt("MuiLink",t)}const gQ=Ct("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),TU={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},yQ=t=>TU[t]||t,vQ=({theme:t,ownerState:e})=>{const n=yQ(e.color),r=Ed(t,`palette.${n}`,!1)||e.color,i=Ed(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:In(r,.4)},xQ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],bQ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,s={root:["root",`underline${bt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return At(s,mQ,e)},_Q=Xe(ar,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${bt(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>W({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&W({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:vQ({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${gQ.focusVisible}`]:{outline:"auto"}})),C4=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiLink"}),{className:i,color:s="primary",component:o="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:f="inherit",sx:h}=r,m=nt(r,xQ),{isFocusVisibleRef:y,onBlur:x,onFocus:v,ref:g}=Qz(),[b,_]=R.useState(!1),S=Mr(n,g),C=k=>{x(k),y.current===!1&&_(!1),a&&a(k)},P=k=>{v(k),y.current===!0&&_(!0),l&&l(k)},A=W({},r,{color:s,component:o,focusVisible:b,underline:u,variant:f}),L=bQ(A);return E.jsx(_Q,W({color:s,className:lt(L.root,i),classes:c,component:o,onBlur:C,onFocus:P,ref:S,ownerState:A,variant:f,sx:[...Object.keys(TU).includes(s)?[]:[{color:s}],...Array.isArray(h)?h:[h]]},m))}),Uo=R.createContext({});function wQ(t){return Rt("MuiList",t)}Ct("MuiList",["root","padding","dense","subheader"]);const SQ=["children","className","component","dense","disablePadding","subheader"],MQ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return At({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},wQ,e)},EQ=Xe("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>W({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),CU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiList"}),{children:i,className:s,component:o="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=nt(r,SQ),f=R.useMemo(()=>({dense:a}),[a]),h=W({},r,{component:o,dense:a,disablePadding:l}),m=MQ(h);return E.jsx(Uo.Provider,{value:f,children:E.jsxs(EQ,W({as:o,className:lt(m.root,s),ref:n,ownerState:h},u,{children:[c,i]}))})});function TQ(t){return Rt("MuiListItem",t)}const Pf=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function CQ(t){return Rt("MuiListItemButton",t)}const If=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),RQ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],AQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},PQ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:s,divider:o,selected:a}=t,c=At({root:["root",r&&"dense",!s&&"gutters",o&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},CQ,n);return W({},n,c)},IQ=Xe(Eu,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:AQ})(({theme:t,ownerState:e})=>W({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${If.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${If.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${If.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${If.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${If.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),NQ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:s=!1,component:o="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:h=!1,className:m}=r,y=nt(r,RQ),x=R.useContext(Uo),v=R.useMemo(()=>({dense:l||x.dense||!1,alignItems:i,disableGutters:c}),[i,x.dense,l,c]),g=R.useRef(null);Fs(()=>{s&&g.current&&g.current.focus()},[s]);const b=W({},r,{alignItems:i,dense:v.dense,disableGutters:c,divider:u,selected:h}),_=PQ(b),S=Mr(g,n);return E.jsx(Uo.Provider,{value:v,children:E.jsx(IQ,W({ref:S,href:y.href||y.to,component:(y.href||y.to)&&o==="div"?"button":o,focusVisibleClassName:lt(_.focusVisible,f),ownerState:b,className:lt(_.root,m)},y,{classes:_,children:a}))})});function kQ(t){return Rt("MuiListItemSecondaryAction",t)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const LQ=["className"],OQ=t=>{const{disableGutters:e,classes:n}=t;return At({root:["root",e&&"disableGutters"]},kQ,n)},DQ=Xe("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>W({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),RU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,s=nt(r,LQ),o=R.useContext(Uo),a=W({},r,{disableGutters:o.disableGutters}),l=OQ(a);return E.jsx(DQ,W({className:lt(l.root,i),ownerState:a,ref:n},s))});RU.muiName="ListItemSecondaryAction";const FQ=["className"],zQ=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],UQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},BQ=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:s,disableGutters:o,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return At({root:["root",i&&"dense",!o&&"gutters",!a&&"padding",l&&"divider",s&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},TQ,r)},jQ=Xe("div",{name:"MuiListItem",slot:"Root",overridesResolver:UQ})(({theme:t,ownerState:e})=>W({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&W({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${If.root}`]:{paddingRight:48}},{[`&.${Pf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Pf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Pf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Pf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Pf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),VQ=Xe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),$Q=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:s=!1,button:o=!1,children:a,className:l,component:c,components:u={},componentsProps:f={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:y=!1,disabled:x=!1,disableGutters:v=!1,disablePadding:g=!1,divider:b=!1,focusVisibleClassName:_,secondaryAction:S,selected:C=!1,slotProps:P={},slots:A={}}=r,L=nt(r.ContainerProps,FQ),k=nt(r,zQ),T=R.useContext(Uo),N=R.useMemo(()=>({dense:y||T.dense||!1,alignItems:i,disableGutters:v}),[i,T.dense,y,v]),z=R.useRef(null);Fs(()=>{s&&z.current&&z.current.focus()},[s]);const D=R.Children.toArray(a),B=D.length&&Dv(D[D.length-1],["ListItemSecondaryAction"]),G=W({},r,{alignItems:i,autoFocus:s,button:o,dense:N.dense,disabled:x,disableGutters:v,disablePadding:g,divider:b,hasSecondaryAction:B,selected:C}),X=BQ(G),Z=Mr(z,n),F=A.root||u.Root||jQ,q=P.root||f.root||{},K=W({className:lt(X.root,q.className,l),disabled:x},k);let Q=c||"li";return o&&(K.component=c||"div",K.focusVisibleClassName=lt(Pf.focusVisible,_),Q=Eu),B?(Q=!K.component&&!c?"div":Q,h==="li"&&(Q==="li"?Q="div":K.component==="li"&&(K.component="div")),E.jsx(Uo.Provider,{value:N,children:E.jsxs(VQ,W({as:h,className:lt(X.container,m),ref:Z,ownerState:G},L,{children:[E.jsx(F,W({},q,!Td(F)&&{as:Q,ownerState:W({},G,q.ownerState)},K,{children:D})),D.pop()]}))})):E.jsx(Uo.Provider,{value:N,children:E.jsxs(F,W({},q,{as:Q,ref:Z},!Td(F)&&{ownerState:W({},G,q.ownerState)},K,{children:[D,S&&E.jsx(RU,{children:S})]}))})}),R4=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]);function WQ(t){return Rt("MuiListItemText",t)}const Ax=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),HQ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],GQ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:s}=t;return At({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},WQ,e)},XQ=Xe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Ax.primary}`]:e.primary},{[`& .${Ax.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>W({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),qQ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItemText"}),{children:i,className:s,disableTypography:o=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f}=r,h=nt(r,HQ),{dense:m}=R.useContext(Uo);let y=l??i,x=u;const v=W({},r,{disableTypography:o,inset:a,primary:!!y,secondary:!!x,dense:m}),g=GQ(v);return y!=null&&y.type!==ar&&!o&&(y=E.jsx(ar,W({variant:m?"body2":"body1",className:g.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:y}))),x!=null&&x.type!==ar&&!o&&(x=E.jsx(ar,W({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},f,{children:x}))),E.jsxs(XQ,W({className:lt(g.root,s),ownerState:v,ref:n},h,{children:[y,x]}))}),YQ=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function pM(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function A4(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function AU(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Gh(t,e,n,r,i,s){let o=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(o)return!1;o=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!AU(a,s)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const KQ=R.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:o,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu"}=e,h=nt(e,YQ),m=R.useRef(null),y=R.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Fs(()=>{i&&m.current.focus()},[i]),R.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:S})=>{const C=!m.current.style.width;if(_.clientHeight{const S=m.current,C=_.key,P=Ui(S).activeElement;if(C==="ArrowDown")_.preventDefault(),Gh(S,P,c,l,pM);else if(C==="ArrowUp")_.preventDefault(),Gh(S,P,c,l,A4);else if(C==="Home")_.preventDefault(),Gh(S,null,c,l,pM);else if(C==="End")_.preventDefault(),Gh(S,null,c,l,A4);else if(C.length===1){const A=y.current,L=C.toLowerCase(),k=performance.now();A.keys.length>0&&(k-A.lastTime>500?(A.keys=[],A.repeating=!0,A.previousKeyMatched=!0):A.repeating&&L!==A.keys[0]&&(A.repeating=!1)),A.lastTime=k,A.keys.push(L);const T=P&&!A.repeating&&AU(P,A);A.previousKeyMatched&&(T||Gh(S,P,!1,l,pM,A))?_.preventDefault():A.previousKeyMatched=!1}u&&u(_)},v=Mr(m,n);let g=-1;R.Children.forEach(o,(_,S)=>{if(!R.isValidElement(_)){g===S&&(g+=1,g>=o.length&&(g=-1));return}_.props.disabled||(f==="selectedMenu"&&_.props.selected||g===-1)&&(g=S),g===S&&(_.props.disabled||_.props.muiSkipListHighlight||_.type.muiSkipListHighlight)&&(g+=1,g>=o.length&&(g=-1))});const b=R.Children.map(o,(_,S)=>{if(S===g){const C={};return s&&(C.autoFocus=!0),_.props.tabIndex===void 0&&f==="selectedMenu"&&(C.tabIndex=0),R.cloneElement(_,C)}return _});return E.jsx(CU,W({role:"menu",ref:v,className:a,onKeyDown:x,tabIndex:i?0:-1},h,{children:b}))});function ZQ(t){return Rt("MuiPopover",t)}Ct("MuiPopover",["root","paper"]);const JQ=["onEntering"],QQ=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],eee=["slotProps"];function P4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function I4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function N4(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function mM(t){return typeof t=="function"?t():t}const tee=t=>{const{classes:e}=t;return At({root:["root"],paper:["paper"]},ZQ,e)},nee=Xe(TJ,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),PU=Xe(Mu,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),IU=R.forwardRef(function(e,n){var r,i,s;const o=Pt({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:h,className:m,container:y,elevation:x=8,marginThreshold:v=16,open:g,PaperProps:b={},slots:_,slotProps:S,transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:P=MU,transitionDuration:A="auto",TransitionProps:{onEntering:L}={},disableScrollLock:k=!1}=o,T=nt(o.TransitionProps,JQ),N=nt(o,QQ),z=(r=S==null?void 0:S.paper)!=null?r:b,D=R.useRef(),B=Mr(D,z.ref),G=W({},o,{anchorOrigin:c,anchorReference:f,elevation:x,marginThreshold:v,externalPaperSlotProps:z,transformOrigin:C,TransitionComponent:P,transitionDuration:A,TransitionProps:T}),X=tee(G),Z=R.useCallback(()=>{if(f==="anchorPosition")return u;const oe=mM(l),Ie=(oe&&oe.nodeType===1?oe:Ui(D.current).body).getBoundingClientRect();return{top:Ie.top+P4(Ie,c.vertical),left:Ie.left+I4(Ie,c.horizontal)}},[l,c.horizontal,c.vertical,u,f]),F=R.useCallback(oe=>({vertical:P4(oe,C.vertical),horizontal:I4(oe,C.horizontal)}),[C.horizontal,C.vertical]),q=R.useCallback(oe=>{const V={width:oe.offsetWidth,height:oe.offsetHeight},Ie=F(V);if(f==="none")return{top:null,left:null,transformOrigin:N4(Ie)};const Re=Z();let De=Re.top-Ie.vertical,ue=Re.left-Ie.horizontal;const Ye=De+V.height,ke=ue+V.width,$=Da(mM(l)),U=$.innerHeight-v,ne=$.innerWidth-v;if(v!==null&&DeU){const le=Ye-U;De-=le,Ie.vertical+=le}if(v!==null&&uene){const le=ke-ne;ue-=le,Ie.horizontal+=le}return{top:`${Math.round(De)}px`,left:`${Math.round(ue)}px`,transformOrigin:N4(Ie)}},[l,f,Z,F,v]),[K,Q]=R.useState(g),he=R.useCallback(()=>{const oe=D.current;if(!oe)return;const V=q(oe);V.top!==null&&(oe.style.top=V.top),V.left!==null&&(oe.style.left=V.left),oe.style.transformOrigin=V.transformOrigin,Q(!0)},[q]);R.useEffect(()=>(k&&window.addEventListener("scroll",he),()=>window.removeEventListener("scroll",he)),[l,k,he]);const fe=(oe,V)=>{L&&L(oe,V),he()},J=()=>{Q(!1)};R.useEffect(()=>{g&&he()}),R.useImperativeHandle(a,()=>g?{updatePosition:()=>{he()}}:null,[g,he]),R.useEffect(()=>{if(!g)return;const oe=Wb(()=>{he()}),V=Da(l);return V.addEventListener("resize",oe),()=>{oe.clear(),V.removeEventListener("resize",oe)}},[l,g,he]);let de=A;A==="auto"&&!P.muiSupportAuto&&(de=void 0);const be=y||(l?Ui(mM(l)).body:void 0),_e=(i=_==null?void 0:_.root)!=null?i:nee,He=(s=_==null?void 0:_.paper)!=null?s:PU,at=Ho({elementType:He,externalSlotProps:W({},z,{style:K?z.style:W({},z.style,{opacity:0})}),additionalProps:{elevation:x,ref:B},ownerState:G,className:lt(X.paper,z==null?void 0:z.className)}),Ve=Ho({elementType:_e,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:be,open:g},ownerState:G,className:lt(X.root,m)}),{slotProps:$e}=Ve,ae=nt(Ve,eee);return E.jsx(_e,W({},ae,!Td(_e)&&{slotProps:$e,disableScrollLock:k},{children:E.jsx(P,W({appear:!0,in:g,onEntering:fe,onExited:J,timeout:de},T,{children:E.jsx(He,W({},at,{children:h}))}))}))});function ree(t){return Rt("MuiMenu",t)}Ct("MuiMenu",["root","paper","list"]);const iee=["onEntering"],see=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],oee={vertical:"top",horizontal:"right"},aee={vertical:"top",horizontal:"left"},lee=t=>{const{classes:e}=t;return At({root:["root"],paper:["paper"],list:["list"]},ree,e)},cee=Xe(IU,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),uee=Xe(PU,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),fee=Xe(KQ,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),dee=R.forwardRef(function(e,n){var r,i;const s=Pt({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:f,open:h,PaperProps:m={},PopoverClasses:y,transitionDuration:x="auto",TransitionProps:{onEntering:v}={},variant:g="selectedMenu",slots:b={},slotProps:_={}}=s,S=nt(s.TransitionProps,iee),C=nt(s,see),P=AR(),A=W({},s,{autoFocus:o,disableAutoFocusItem:c,MenuListProps:u,onEntering:v,PaperProps:m,transitionDuration:x,TransitionProps:S,variant:g}),L=lee(A),k=o&&!c&&h,T=R.useRef(null),N=(F,q)=>{T.current&&T.current.adjustStyleForScrollbar(F,{direction:P?"rtl":"ltr"}),v&&v(F,q)},z=F=>{F.key==="Tab"&&(F.preventDefault(),f&&f(F,"tabKeyDown"))};let D=-1;R.Children.map(a,(F,q)=>{R.isValidElement(F)&&(F.props.disabled||(g==="selectedMenu"&&F.props.selected||D===-1)&&(D=q))});const B=(r=b.paper)!=null?r:uee,G=(i=_.paper)!=null?i:m,X=Ho({elementType:b.root,externalSlotProps:_.root,ownerState:A,className:[L.root,l]}),Z=Ho({elementType:B,externalSlotProps:G,ownerState:A,className:L.paper});return E.jsx(cee,W({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?oee:aee,slots:{paper:B,root:b.root},slotProps:{root:X,paper:Z},open:h,ref:n,transitionDuration:x,TransitionProps:W({onEntering:N},S),ownerState:A},C,{classes:y,children:E.jsx(fee,W({onKeyDown:z,actions:T,autoFocus:o&&(D===-1||c),autoFocusItem:k,variant:g},u,{className:lt(L.list,u.className),children:a}))}))});function hee(t){return Rt("MuiMenuItem",t)}const Xh=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),pee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],mee=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},gee=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:s,classes:o}=t,l=At({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},hee,o);return W({},o,l)},yee=Xe(Eu,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:mee})(({theme:t,ownerState:e})=>W({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xh.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Xh.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Xh.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Xh.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Xh.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${S4.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${S4.inset}`]:{marginLeft:52},[`& .${Ax.root}`]:{marginTop:0,marginBottom:0},[`& .${Ax.inset}`]:{paddingLeft:36},[`& .${R4.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&W({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${R4.root} svg`]:{fontSize:"1.25rem"}}))),k4=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:o=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:h}=r,m=nt(r,pee),y=R.useContext(Uo),x=R.useMemo(()=>({dense:o||y.dense||!1,disableGutters:l}),[y.dense,o,l]),v=R.useRef(null);Fs(()=>{i&&v.current&&v.current.focus()},[i]);const g=W({},r,{dense:x.dense,divider:a,disableGutters:l}),b=gee(r),_=Mr(v,n);let S;return r.disabled||(S=f!==void 0?f:-1),E.jsx(Uo.Provider,{value:x,children:E.jsx(yee,W({ref:_,role:u,tabIndex:S,component:s,focusVisibleClassName:lt(b.focusVisible,c),className:lt(b.root,h)},m,{ownerState:g,classes:b}))})});function vee(t){return Rt("MuiNativeSelect",t)}const VR=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),xee=["className","disabled","error","IconComponent","inputRef","variant"],bee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${bt(n)}`,s&&"iconOpen",r&&"disabled"]};return At(a,vee,e)},NU=({ownerState:t,theme:e})=>W({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":W({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${VR.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),_ee=Xe("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:mi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${VR.multiple}`]:e.multiple}]}})(NU),kU=({ownerState:t,theme:e})=>W({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${VR.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),wee=Xe("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${bt(n.variant)}`],n.open&&e.iconOpen]}})(kU),See=R.forwardRef(function(e,n){const{className:r,disabled:i,error:s,IconComponent:o,inputRef:a,variant:l="standard"}=e,c=nt(e,xee),u=W({},e,{disabled:i,variant:l,error:s}),f=bee(u);return E.jsxs(R.Fragment,{children:[E.jsx(_ee,W({ownerState:u,className:lt(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:E.jsx(wee,{as:o,ownerState:u,className:f.icon})]})});var L4;const Mee=["children","classes","className","label","notched"],Eee=Xe("fieldset",{shouldForwardProp:mi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Tee=Xe("legend",{shouldForwardProp:mi})(({ownerState:t,theme:e})=>W({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&W({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function Cee(t){const{className:e,label:n,notched:r}=t,i=nt(t,Mee),s=n!=null&&n!=="",o=W({},t,{notched:r,withLabel:s});return E.jsx(Eee,W({"aria-hidden":!0,className:e,ownerState:o},i,{children:E.jsx(Tee,{ownerState:o,children:s?E.jsx("span",{children:n}):L4||(L4=E.jsx("span",{className:"notranslate",children:"​"}))})}))}const Ree=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Aee=t=>{const{classes:e}=t,r=At({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tZ,e);return W({},e,r)},Pee=Xe(Kb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:qb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return W({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${il.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${il.focused} .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${il.error} .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${il.disabled} .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&W({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Iee=Xe(Cee,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Nee=Xe(Zb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Yb})(({theme:t,ownerState:e})=>W({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),$R=R.forwardRef(function(e,n){var r,i,s,o,a;const l=Pt({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:f="input",label:h,multiline:m=!1,notched:y,slots:x={},type:v="text"}=l,g=nt(l,Ree),b=Aee(l),_=Tu(),S=th({props:l,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),C=W({},l,{color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:_,fullWidth:u,hiddenLabel:S.hiddenLabel,multiline:m,size:S.size,type:v}),P=(r=(i=x.root)!=null?i:c.Root)!=null?r:Pee,A=(s=(o=x.input)!=null?o:c.Input)!=null?s:Nee;return E.jsx(UR,W({slots:{root:P,input:A},renderSuffix:L=>E.jsx(Iee,{ownerState:C,className:b.notchedOutline,label:h!=null&&h!==""&&S.required?a||(a=E.jsxs(R.Fragment,{children:[h," ","*"]})):h,notched:typeof y<"u"?y:!!(L.startAdornment||L.filled||L.focused)}),fullWidth:u,inputComponent:f,multiline:m,ref:n,type:v},g,{classes:W({},b,{notchedOutline:null})}))});$R.muiName="Input";function kee(t){return Rt("MuiSelect",t)}const qh=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var O4;const Lee=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Oee=Xe("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${qh.select}`]:e.select},{[`&.${qh.select}`]:e[n.variant]},{[`&.${qh.error}`]:e.error},{[`&.${qh.multiple}`]:e.multiple}]}})(NU,{[`&.${qh.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Dee=Xe("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${bt(n.variant)}`],n.open&&e.iconOpen]}})(kU),Fee=Xe("input",{shouldForwardProp:t=>vU(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function D4(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function zee(t){return t==null||typeof t=="string"&&!t.trim()}const Uee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${bt(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return At(a,kee,e)},Bee=R.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":s,autoFocus:o,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:y=!1,IconComponent:x,inputRef:v,labelId:g,MenuProps:b={},multiple:_,name:S,onBlur:C,onChange:P,onClose:A,onFocus:L,onOpen:k,open:T,readOnly:N,renderValue:z,SelectDisplayProps:D={},tabIndex:B,value:G,variant:X="standard"}=e,Z=nt(e,Lee),[F,q]=nT({controlled:G,default:f,name:"Select"}),[K,Q]=nT({controlled:T,default:u,name:"Select"}),he=R.useRef(null),fe=R.useRef(null),[J,de]=R.useState(null),{current:be}=R.useRef(T!=null),[_e,He]=R.useState(),at=Mr(n,v),Ve=R.useCallback(Oe=>{fe.current=Oe,Oe&&de(Oe)},[]),$e=J==null?void 0:J.parentNode;R.useImperativeHandle(at,()=>({focus:()=>{fe.current.focus()},node:he.current,value:F}),[F]),R.useEffect(()=>{u&&K&&J&&!be&&(He(a?null:$e.clientWidth),fe.current.focus())},[J,a]),R.useEffect(()=>{o&&fe.current.focus()},[o]),R.useEffect(()=>{if(!g)return;const Oe=Ui(fe.current).getElementById(g);if(Oe){const Ke=()=>{getSelection().isCollapsed&&fe.current.focus()};return Oe.addEventListener("click",Ke),()=>{Oe.removeEventListener("click",Ke)}}},[g]);const ae=(Oe,Ke)=>{Oe?k&&k(Ke):A&&A(Ke),be||(He(a?null:$e.clientWidth),Q(Oe))},oe=Oe=>{Oe.button===0&&(Oe.preventDefault(),fe.current.focus(),ae(!0,Oe))},V=Oe=>{ae(!1,Oe)},Ie=R.Children.toArray(l),Re=Oe=>{const Ke=Ie.find(ge=>ge.props.value===Oe.target.value);Ke!==void 0&&(q(Ke.props.value),P&&P(Oe,Ke))},De=Oe=>Ke=>{let ge;if(Ke.currentTarget.hasAttribute("tabindex")){if(_){ge=Array.isArray(F)?F.slice():[];const ze=F.indexOf(Oe.props.value);ze===-1?ge.push(Oe.props.value):ge.splice(ze,1)}else ge=Oe.props.value;if(Oe.props.onClick&&Oe.props.onClick(Ke),F!==ge&&(q(ge),P)){const ze=Ke.nativeEvent||Ke,Qe=new ze.constructor(ze.type,ze);Object.defineProperty(Qe,"target",{writable:!0,value:{value:ge,name:S}}),P(Qe,Oe)}_||ae(!1,Ke)}},ue=Oe=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Oe.key)!==-1&&(Oe.preventDefault(),ae(!0,Oe))},Ye=J!==null&&K,ke=Oe=>{!Ye&&C&&(Object.defineProperty(Oe,"target",{writable:!0,value:{value:F,name:S}}),C(Oe))};delete Z["aria-invalid"];let $,U;const ne=[];let le=!1;(Rx({value:F})||m)&&(z?$=z(F):le=!0);const Te=Ie.map(Oe=>{if(!R.isValidElement(Oe))return null;let Ke;if(_){if(!Array.isArray(F))throw new Error(Oa(2));Ke=F.some(ge=>D4(ge,Oe.props.value)),Ke&&le&&ne.push(Oe.props.children)}else Ke=D4(F,Oe.props.value),Ke&&le&&(U=Oe.props.children);return R.cloneElement(Oe,{"aria-selected":Ke?"true":"false",onClick:De(Oe),onKeyUp:ge=>{ge.key===" "&&ge.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(ge)},role:"option",selected:Ke,value:void 0,"data-value":Oe.props.value})});le&&(_?ne.length===0?$=null:$=ne.reduce((Oe,Ke,ge)=>(Oe.push(Ke),ge{const{classes:e}=t;return e},WR={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>mi(t)&&t!=="variant",slot:"Root"},Wee=Xe(jR,WR)(""),Hee=Xe($R,WR)(""),Gee=Xe(BR,WR)(""),HR=R.forwardRef(function(e,n){const r=Pt({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:s,classes:o={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=rZ,id:f,input:h,inputProps:m,label:y,labelId:x,MenuProps:v,multiple:g=!1,native:b=!1,onClose:_,onOpen:S,open:C,renderValue:P,SelectDisplayProps:A,variant:L="outlined"}=r,k=nt(r,jee),T=b?See:Bee,N=Tu(),z=th({props:r,muiFormControl:N,states:["variant","error"]}),D=z.variant||L,B=W({},r,{variant:D,classes:o}),G=$ee(B),X=nt(G,Vee),Z=h||{standard:E.jsx(Wee,{ownerState:B}),outlined:E.jsx(Hee,{label:y,ownerState:B}),filled:E.jsx(Gee,{ownerState:B})}[D],F=Mr(n,fg(Z));return E.jsx(R.Fragment,{children:R.cloneElement(Z,W({inputComponent:T,inputProps:W({children:s,error:z.error,IconComponent:u,variant:D,type:void 0,multiple:g},b?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:x,MenuProps:v,onClose:_,onOpen:S,open:C,renderValue:P,SelectDisplayProps:W({id:f},A)},m,{classes:m?fi(X,m.classes):X},h?h.props.inputProps:{})},(g&&b||c)&&D==="outlined"?{notched:!0}:{},{ref:F,className:lt(Z.props.className,a,G.root)},!h&&{variant:D},k))})});HR.muiName="Select";function Xee(t){return Rt("MuiTab",t)}const sl=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),qee=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Yee=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:s,label:o,selected:a,disabled:l}=t,c={root:["root",s&&o&&"labelIcon",`textColor${bt(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return At(c,Xee,e)},Kee=Xe(Eu,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${bt(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${sl.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>W({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${sl.iconWrapper}`]:W({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${sl.selected}`]:{opacity:1},[`&.${sl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${sl.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${sl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${sl.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${sl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),gM=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTab"}),{className:i,disabled:s=!1,disableFocusRipple:o=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:h,onClick:m,onFocus:y,selected:x,selectionFollowsFocus:v,textColor:g="inherit",value:b,wrapped:_=!1}=r,S=nt(r,qee),C=W({},r,{disabled:s,disableFocusRipple:o,selected:x,icon:!!l,iconPosition:c,label:!!f,fullWidth:a,textColor:g,wrapped:_}),P=Yee(C),A=l&&f&&R.isValidElement(l)?R.cloneElement(l,{className:lt(P.iconWrapper,l.props.className)}):l,L=T=>{!x&&h&&h(T,b),m&&m(T)},k=T=>{v&&!x&&h&&h(T,b),y&&y(T)};return E.jsxs(Kee,W({focusRipple:!o,className:lt(P.root,i),ref:n,role:"tab","aria-selected":x,disabled:s,onClick:L,onFocus:k,ownerState:C,tabIndex:x?0:-1},S,{children:[c==="top"||c==="start"?E.jsxs(R.Fragment,{children:[A,f]}):E.jsxs(R.Fragment,{children:[f,A]}),u]}))}),LU=R.createContext();function Zee(t){return Rt("MuiTable",t)}Ct("MuiTable",["root","stickyHeader"]);const Jee=["className","component","padding","size","stickyHeader"],Qee=t=>{const{classes:e,stickyHeader:n}=t;return At({root:["root",n&&"stickyHeader"]},Zee,e)},ete=Xe("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>W({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":W({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),F4="table",OU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTable"}),{className:i,component:s=F4,padding:o="normal",size:a="medium",stickyHeader:l=!1}=r,c=nt(r,Jee),u=W({},r,{component:s,padding:o,size:a,stickyHeader:l}),f=Qee(u),h=R.useMemo(()=>({padding:o,size:a,stickyHeader:l}),[o,a,l]);return E.jsx(LU.Provider,{value:h,children:E.jsx(ete,W({as:s,role:s===F4?null:"table",ref:n,className:lt(f.root,i),ownerState:u},c))})}),Jb=R.createContext();function tte(t){return Rt("MuiTableBody",t)}Ct("MuiTableBody",["root"]);const nte=["className","component"],rte=t=>{const{classes:e}=t;return At({root:["root"]},tte,e)},ite=Xe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),ste={variant:"body"},z4="tbody",DU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableBody"}),{className:i,component:s=z4}=r,o=nt(r,nte),a=W({},r,{component:s}),l=rte(a);return E.jsx(Jb.Provider,{value:ste,children:E.jsx(ite,W({className:lt(l.root,i),as:s,ref:n,role:s===z4?null:"rowgroup",ownerState:a},o))})});function ote(t){return Rt("MuiTableCell",t)}const Sm=Ct("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),ate=["align","className","component","padding","scope","size","sortDirection","variant"],lte=t=>{const{classes:e,variant:n,align:r,padding:i,size:s,stickyHeader:o}=t,a={root:["root",n,o&&"stickyHeader",r!=="inherit"&&`align${bt(r)}`,i!=="normal"&&`padding${bt(i)}`,`size${bt(s)}`]};return At(a,ote,e)},cte=Xe("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${bt(n.size)}`],n.padding!=="normal"&&e[`padding${bt(n.padding)}`],n.align!=="inherit"&&e[`align${bt(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>W({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid - ${t.palette.mode==="light"?fU(In(t.palette.divider,1),.88):uU(In(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${Sm.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),ko=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableCell"}),{align:i="inherit",className:s,component:o,padding:a,scope:l,size:c,sortDirection:u,variant:f}=r,h=nt(r,ate),m=R.useContext(LU),y=R.useContext(Jb),x=y&&y.variant==="head";let v;o?v=o:v=x?"th":"td";let g=l;v==="td"?g=void 0:!g&&x&&(g="col");const b=f||y&&y.variant,_=W({},r,{align:i,component:v,padding:a||(m&&m.padding?m.padding:"normal"),size:c||(m&&m.size?m.size:"medium"),sortDirection:u,stickyHeader:b==="head"&&m&&m.stickyHeader,variant:b}),S=lte(_);let C=null;return u&&(C=u==="asc"?"ascending":"descending"),E.jsx(cte,W({as:v,ref:n,className:lt(S.root,s),"aria-sort":C,scope:g,ownerState:_},h))});function ute(t){return Rt("MuiTableContainer",t)}Ct("MuiTableContainer",["root"]);const fte=["className","component"],dte=t=>{const{classes:e}=t;return At({root:["root"]},ute,e)},hte=Xe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),FU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableContainer"}),{className:i,component:s="div"}=r,o=nt(r,fte),a=W({},r,{component:s}),l=dte(a);return E.jsx(hte,W({ref:n,as:s,className:lt(l.root,i),ownerState:a},o))});function pte(t){return Rt("MuiTableHead",t)}Ct("MuiTableHead",["root"]);const mte=["className","component"],gte=t=>{const{classes:e}=t;return At({root:["root"]},pte,e)},yte=Xe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),vte={variant:"head"},U4="thead",zU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableHead"}),{className:i,component:s=U4}=r,o=nt(r,mte),a=W({},r,{component:s}),l=gte(a);return E.jsx(Jb.Provider,{value:vte,children:E.jsx(yte,W({as:s,className:lt(l.root,i),ref:n,role:s===U4?null:"rowgroup",ownerState:a},o))})});function xte(t){return Rt("MuiToolbar",t)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const bte=["className","component","disableGutters","variant"],_te=t=>{const{classes:e,disableGutters:n,variant:r}=t;return At({root:["root",!n&&"gutters",r]},xte,e)},wte=Xe("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>W({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),Ste=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiToolbar"}),{className:i,component:s="div",disableGutters:o=!1,variant:a="regular"}=r,l=nt(r,bte),c=W({},r,{component:s,disableGutters:o,variant:a}),u=_te(c);return E.jsx(wte,W({as:s,className:lt(u.root,i),ref:n,ownerState:c},l))}),Mte=eh(E.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Ete=eh(E.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Tte(t){return Rt("MuiTableRow",t)}const B4=Ct("MuiTableRow",["root","selected","hover","head","footer"]),Cte=["className","component","hover","selected"],Rte=t=>{const{classes:e,selected:n,hover:r,head:i,footer:s}=t;return At({root:["root",n&&"selected",r&&"hover",i&&"head",s&&"footer"]},Tte,e)},Ate=Xe("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${B4.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${B4.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),j4="tr",Qb=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableRow"}),{className:i,component:s=j4,hover:o=!1,selected:a=!1}=r,l=nt(r,Cte),c=R.useContext(Jb),u=W({},r,{component:s,hover:o,selected:a,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),f=Rte(u);return E.jsx(Ate,W({as:s,ref:n,className:lt(f.root,i),role:s===j4?null:"row",ownerState:u},l))});function Pte(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function Ite(t,e,n,r={},i=()=>{}){const{ease:s=Pte,duration:o=300}=r;let a=null;const l=e[t];let c=!1;const u=()=>{c=!0},f=h=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=h);const m=Math.min(1,(h-a)/o);if(e[t]=s(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(f)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(f),u)}const Nte=["onChange"],kte={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Lte(t){const{onChange:e}=t,n=nt(t,Nte),r=R.useRef(),i=R.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Fs(()=>{const o=Wb(()=>{const l=r.current;s(),l!==r.current&&e(r.current)}),a=Da(i.current);return a.addEventListener("resize",o),()=>{o.clear(),a.removeEventListener("resize",o)}},[e]),R.useEffect(()=>{s(),e(r.current)},[e]),E.jsx("div",W({style:kte},n,{ref:i}))}function Ote(t){return Rt("MuiTabScrollButton",t)}const Dte=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Fte=["className","slots","slotProps","direction","orientation","disabled"],zte=t=>{const{classes:e,orientation:n,disabled:r}=t;return At({root:["root",n,r&&"disabled"]},Ote,e)},Ute=Xe(Eu,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>W({width:40,flexShrink:0,opacity:.8,[`&.${Dte.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Bte=R.forwardRef(function(e,n){var r,i;const s=Pt({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:l={},direction:c}=s,u=nt(s,Fte),f=AR(),h=W({isRtl:f},s),m=zte(h),y=(r=a.StartScrollButtonIcon)!=null?r:Mte,x=(i=a.EndScrollButtonIcon)!=null?i:Ete,v=Ho({elementType:y,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),g=Ho({elementType:x,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return E.jsx(Ute,W({component:"div",className:lt(m.root,o),ref:n,role:null,ownerState:h,tabIndex:null},u,{children:c==="left"?E.jsx(y,W({},v)):E.jsx(x,W({},g))}))});function jte(t){return Rt("MuiTabs",t)}const yM=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Vte=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],V4=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,$4=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ay=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const s=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||s)i=n(t,i);else{i.focus();return}}},$te=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:o,scrollButtonsHideMobile:a,classes:l}=t;return At({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},jte,l)},Wte=Xe("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${yM.scrollButtons}`]:e.scrollButtons},{[`& .${yM.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>W({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${yM.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Hte=Xe("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>W({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Gte=Xe("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>W({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Xte=Xe("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>W({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),qte=Xe(Lte)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),W4={},Yte=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTabs"}),i=Su(),s=AR(),{"aria-label":o,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:y="primary",onChange:x,orientation:v="horizontal",ScrollButtonComponent:g=Bte,scrollButtons:b="auto",selectionFollowsFocus:_,slots:S={},slotProps:C={},TabIndicatorProps:P={},TabScrollButtonProps:A={},textColor:L="primary",value:k,variant:T="standard",visibleScrollbar:N=!1}=r,z=nt(r,Vte),D=T==="scrollable",B=v==="vertical",G=B?"scrollTop":"scrollLeft",X=B?"top":"left",Z=B?"bottom":"right",F=B?"clientHeight":"clientWidth",q=B?"height":"width",K=W({},r,{component:h,allowScrollButtonsMobile:m,indicatorColor:y,orientation:v,vertical:B,scrollButtons:b,textColor:L,variant:T,visibleScrollbar:N,fixed:!D,hideScrollbar:D&&!N,scrollableX:D&&!B,scrollableY:D&&B,centered:c&&!D,scrollButtonsHideMobile:!m}),Q=$te(K),he=Ho({elementType:S.StartScrollButtonIcon,externalSlotProps:C.startScrollButtonIcon,ownerState:K}),fe=Ho({elementType:S.EndScrollButtonIcon,externalSlotProps:C.endScrollButtonIcon,ownerState:K}),[J,de]=R.useState(!1),[be,_e]=R.useState(W4),[He,at]=R.useState(!1),[Ve,$e]=R.useState(!1),[ae,oe]=R.useState(!1),[V,Ie]=R.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,De=R.useRef(null),ue=R.useRef(null),Ye=()=>{const ge=De.current;let ze;if(ge){const mt=ge.getBoundingClientRect();ze={clientWidth:ge.clientWidth,scrollLeft:ge.scrollLeft,scrollTop:ge.scrollTop,scrollLeftNormalized:wq(ge,s?"rtl":"ltr"),scrollWidth:ge.scrollWidth,top:mt.top,bottom:mt.bottom,left:mt.left,right:mt.right}}let Qe;if(ge&&k!==!1){const mt=ue.current.children;if(mt.length>0){const ee=mt[Re.get(k)];Qe=ee?ee.getBoundingClientRect():null}}return{tabsMeta:ze,tabMeta:Qe}},ke=Sa(()=>{const{tabsMeta:ge,tabMeta:ze}=Ye();let Qe=0,mt;if(B)mt="top",ze&&ge&&(Qe=ze.top-ge.top+ge.scrollTop);else if(mt=s?"right":"left",ze&&ge){const Be=s?ge.scrollLeftNormalized+ge.clientWidth-ge.scrollWidth:ge.scrollLeft;Qe=(s?-1:1)*(ze[mt]-ge[mt]+Be)}const ee={[mt]:Qe,[q]:ze?ze[q]:0};if(isNaN(be[mt])||isNaN(be[q]))_e(ee);else{const Be=Math.abs(be[mt]-ee[mt]),ve=Math.abs(be[q]-ee[q]);(Be>=1||ve>=1)&&_e(ee)}}),$=(ge,{animation:ze=!0}={})=>{ze?Ite(G,De.current,ge,{duration:i.transitions.duration.standard}):De.current[G]=ge},U=ge=>{let ze=De.current[G];B?ze+=ge:(ze+=ge*(s?-1:1),ze*=s&&tU()==="reverse"?-1:1),$(ze)},ne=()=>{const ge=De.current[F];let ze=0;const Qe=Array.from(ue.current.children);for(let mt=0;mtge){mt===0&&(ze=ge);break}ze+=ee[F]}return ze},le=()=>{U(-1*ne())},Te=()=>{U(ne())},ye=R.useCallback(ge=>{Ie({overflow:null,scrollbarWidth:ge})},[]),Ge=()=>{const ge={};ge.scrollbarSizeListener=D?E.jsx(qte,{onChange:ye,className:lt(Q.scrollableX,Q.hideScrollbar)}):null;const Qe=D&&(b==="auto"&&(He||Ve)||b===!0);return ge.scrollButtonStart=Qe?E.jsx(g,W({slots:{StartScrollButtonIcon:S.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:he},orientation:v,direction:s?"right":"left",onClick:le,disabled:!He},A,{className:lt(Q.scrollButtons,A.className)})):null,ge.scrollButtonEnd=Qe?E.jsx(g,W({slots:{EndScrollButtonIcon:S.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:fe},orientation:v,direction:s?"left":"right",onClick:Te,disabled:!Ve},A,{className:lt(Q.scrollButtons,A.className)})):null,ge},Ae=Sa(ge=>{const{tabsMeta:ze,tabMeta:Qe}=Ye();if(!(!Qe||!ze)){if(Qe[X]ze[Z]){const mt=ze[G]+(Qe[Z]-ze[Z]);$(mt,{animation:ge})}}}),Ee=Sa(()=>{D&&b!==!1&&oe(!ae)});R.useEffect(()=>{const ge=Wb(()=>{De.current&&ke()});let ze;const Qe=Be=>{Be.forEach(ve=>{ve.removedNodes.forEach(Pe=>{var We;(We=ze)==null||We.unobserve(Pe)}),ve.addedNodes.forEach(Pe=>{var We;(We=ze)==null||We.observe(Pe)})}),ge(),Ee()},mt=Da(De.current);mt.addEventListener("resize",ge);let ee;return typeof ResizeObserver<"u"&&(ze=new ResizeObserver(ge),Array.from(ue.current.children).forEach(Be=>{ze.observe(Be)})),typeof MutationObserver<"u"&&(ee=new MutationObserver(Qe),ee.observe(ue.current,{childList:!0})),()=>{var Be,ve;ge.clear(),mt.removeEventListener("resize",ge),(Be=ee)==null||Be.disconnect(),(ve=ze)==null||ve.disconnect()}},[ke,Ee]),R.useEffect(()=>{const ge=Array.from(ue.current.children),ze=ge.length;if(typeof IntersectionObserver<"u"&&ze>0&&D&&b!==!1){const Qe=ge[0],mt=ge[ze-1],ee={root:De.current,threshold:.99},Be=Ze=>{at(!Ze[0].isIntersecting)},ve=new IntersectionObserver(Be,ee);ve.observe(Qe);const Pe=Ze=>{$e(!Ze[0].isIntersecting)},We=new IntersectionObserver(Pe,ee);return We.observe(mt),()=>{ve.disconnect(),We.disconnect()}}},[D,b,ae,u==null?void 0:u.length]),R.useEffect(()=>{de(!0)},[]),R.useEffect(()=>{ke()}),R.useEffect(()=>{Ae(W4!==be)},[Ae,be]),R.useImperativeHandle(l,()=>({updateIndicator:ke,updateScrollButtons:Ee}),[ke,Ee]);const _t=E.jsx(Xte,W({},P,{className:lt(Q.indicator,P.className),ownerState:K,style:W({},be,P.style)}));let Le=0;const it=R.Children.map(u,ge=>{if(!R.isValidElement(ge))return null;const ze=ge.props.value===void 0?Le:ge.props.value;Re.set(ze,Le);const Qe=ze===k;return Le+=1,R.cloneElement(ge,W({fullWidth:T==="fullWidth",indicator:Qe&&!J&&_t,selected:Qe,selectionFollowsFocus:_,onChange:x,textColor:L,value:ze},Le===1&&k===!1&&!ge.props.tabIndex?{tabIndex:0}:{}))}),Oe=ge=>{const ze=ue.current,Qe=Ui(ze).activeElement;if(Qe.getAttribute("role")!=="tab")return;let ee=v==="horizontal"?"ArrowLeft":"ArrowUp",Be=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&s&&(ee="ArrowRight",Be="ArrowLeft"),ge.key){case ee:ge.preventDefault(),ay(ze,Qe,$4);break;case Be:ge.preventDefault(),ay(ze,Qe,V4);break;case"Home":ge.preventDefault(),ay(ze,null,V4);break;case"End":ge.preventDefault(),ay(ze,null,$4);break}},Ke=Ge();return E.jsxs(Wte,W({className:lt(Q.root,f),ownerState:K,ref:n,as:h},z,{children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,E.jsxs(Hte,{className:Q.scroller,ownerState:K,style:{overflow:V.overflow,[B?`margin${s?"Left":"Right"}`:"marginBottom"]:N?void 0:-V.scrollbarWidth},ref:De,children:[E.jsx(Gte,{"aria-label":o,"aria-labelledby":a,"aria-orientation":v==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:K,onKeyDown:Oe,ref:ue,role:"tablist",children:it}),J&&_t]}),Ke.scrollButtonEnd]}))});function Kte(t){return Rt("MuiTextField",t)}Ct("MuiTextField",["root"]);const Zte=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Jte={standard:jR,filled:BR,outlined:$R},Qte=t=>{const{classes:e}=t;return At({root:["root"]},Kte,e)},ene=Xe(wU,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),tne=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:o,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:y,id:x,InputLabelProps:v,inputProps:g,InputProps:b,inputRef:_,label:S,maxRows:C,minRows:P,multiline:A=!1,name:L,onBlur:k,onChange:T,onFocus:N,placeholder:z,required:D=!1,rows:B,select:G=!1,SelectProps:X,type:Z,value:F,variant:q="outlined"}=r,K=nt(r,Zte),Q=W({},r,{autoFocus:s,color:l,disabled:u,error:f,fullWidth:m,multiline:A,required:D,select:G,variant:q}),he=Qte(Q),fe={};q==="outlined"&&(v&&typeof v.shrink<"u"&&(fe.notched=v.shrink),fe.label=S),G&&((!X||!X.native)&&(fe.id=void 0),fe["aria-describedby"]=void 0);const J=Zz(x),de=y&&J?`${J}-helper-text`:void 0,be=S&&J?`${J}-label`:void 0,_e=Jte[q],He=E.jsx(_e,W({"aria-describedby":de,autoComplete:i,autoFocus:s,defaultValue:c,fullWidth:m,multiline:A,name:L,rows:B,maxRows:C,minRows:P,type:Z,value:F,id:J,inputRef:_,onBlur:k,onChange:T,onFocus:N,placeholder:z,inputProps:g},fe,b));return E.jsxs(ene,W({className:lt(he.root,a),disabled:u,error:f,fullWidth:m,ref:n,required:D,color:l,variant:q,ownerState:Q},K,{children:[S!=null&&S!==""&&E.jsx(EU,W({htmlFor:J,id:be},v,{children:S})),G?E.jsx(HR,W({"aria-describedby":de,id:J,labelId:be,value:F,input:He},X,{children:o})):He,y&&E.jsx(UJ,W({id:de},h,{children:y}))]}))});/** +`),Rs.rippleVisible,TK,aT,({theme:t})=>t.transitions.easing.easeInOut,Rs.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Rs.child,Rs.childLeaving,CK,aT,({theme:t})=>t.transitions.easing.easeInOut,Rs.childPulsate,RK,({theme:t})=>t.transitions.easing.easeInOut),IK=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:o}=r,a=nt(r,MK),[l,c]=R.useState([]),u=R.useRef(0),f=R.useRef(null);R.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=R.useRef(!1),m=nU(),y=R.useRef(null),x=R.useRef(null),v=R.useCallback(S=>{const{pulsate:C,rippleX:P,rippleY:A,rippleSize:L,cb:k}=S;c(T=>[...T,E.jsx(PK,{classes:{ripple:lt(s.ripple,Rs.ripple),rippleVisible:lt(s.rippleVisible,Rs.rippleVisible),ripplePulsate:lt(s.ripplePulsate,Rs.ripplePulsate),child:lt(s.child,Rs.child),childLeaving:lt(s.childLeaving,Rs.childLeaving),childPulsate:lt(s.childPulsate,Rs.childPulsate)},timeout:aT,pulsate:C,rippleX:P,rippleY:A,rippleSize:L},u.current)]),u.current+=1,f.current=k},[s]),g=R.useCallback((S={},C={},P=()=>{})=>{const{pulsate:A=!1,center:L=i||C.pulsate,fakeElement:k=!1}=C;if((S==null?void 0:S.type)==="mousedown"&&h.current){h.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(h.current=!0);const T=k?null:x.current,N=T?T.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,D,B;if(L||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)z=Math.round(N.width/2),D=Math.round(N.height/2);else{const{clientX:G,clientY:X}=S.touches&&S.touches.length>0?S.touches[0]:S;z=Math.round(G-N.left),D=Math.round(X-N.top)}if(L)B=Math.sqrt((2*N.width**2+N.height**2)/3),B%2===0&&(B+=1);else{const G=Math.max(Math.abs((T?T.clientWidth:0)-z),z)*2+2,X=Math.max(Math.abs((T?T.clientHeight:0)-D),D)*2+2;B=Math.sqrt(G**2+X**2)}S!=null&&S.touches?y.current===null&&(y.current=()=>{v({pulsate:A,rippleX:z,rippleY:D,rippleSize:B,cb:P})},m.start(EK,()=>{y.current&&(y.current(),y.current=null)})):v({pulsate:A,rippleX:z,rippleY:D,rippleSize:B,cb:P})},[i,v,m]),b=R.useCallback(()=>{g({},{pulsate:!0})},[g]),_=R.useCallback((S,C)=>{if(m.clear(),(S==null?void 0:S.type)==="touchend"&&y.current){y.current(),y.current=null,m.start(0,()=>{_(S,C)});return}y.current=null,c(P=>P.length>0?P.slice(1):P),f.current=C},[m]);return R.useImperativeHandle(n,()=>({pulsate:b,start:g,stop:_}),[b,g,_]),E.jsx(AK,W({className:lt(Rs.root,s.root,o),ref:x},a,{children:E.jsx(OR,{component:null,exit:!0,children:l})}))});function NK(t){return Rt("MuiButtonBase",t)}const kK=Ct("MuiButtonBase",["root","disabled","focusVisible"]),LK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],OK=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,o=At({root:["root",e&&"disabled",n&&"focusVisible"]},NK,i);return n&&r&&(o.root+=` ${r}`),o},DK=Ge("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${kK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Eu=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:o,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:y,onClick:x,onContextMenu:v,onDragLeave:g,onFocus:b,onFocusVisible:_,onKeyDown:S,onKeyUp:C,onMouseDown:P,onMouseLeave:A,onMouseUp:L,onTouchEnd:k,onTouchMove:T,onTouchStart:N,tabIndex:z=0,TouchRippleProps:D,touchRippleRef:B,type:G}=r,X=nt(r,LK),Z=R.useRef(null),F=R.useRef(null),q=Mr(F,B),{isFocusVisibleRef:K,onFocus:Q,onBlur:he,ref:fe}=rU(),[J,de]=R.useState(!1);c&&J&&de(!1),R.useImperativeHandle(i,()=>({focusVisible:()=>{de(!0),Z.current.focus()}}),[]);const[be,_e]=R.useState(!1);R.useEffect(()=>{_e(!0)},[]);const Xe=be&&!u&&!c;R.useEffect(()=>{J&&h&&!u&&be&&F.current.pulsate()},[u,h,J,be]);function at(Ee,_t,Le=f){return Sa(it=>(_t&&_t(it),!Le&&F.current&&F.current[Ee](it),!0))}const Ve=at("start",P),$e=at("stop",v),ae=at("stop",g),oe=at("stop",L),V=at("stop",Ee=>{J&&Ee.preventDefault(),A&&A(Ee)}),Ie=at("start",N),Re=at("stop",k),De=at("stop",T),ue=at("stop",Ee=>{he(Ee),K.current===!1&&de(!1),y&&y(Ee)},!1),Ye=Sa(Ee=>{Z.current||(Z.current=Ee.currentTarget),Q(Ee),K.current===!0&&(de(!0),_&&_(Ee)),b&&b(Ee)}),ke=()=>{const Ee=Z.current;return l&&l!=="button"&&!(Ee.tagName==="A"&&Ee.href)},$=R.useRef(!1),U=Sa(Ee=>{h&&!$.current&&J&&F.current&&Ee.key===" "&&($.current=!0,F.current.stop(Ee,()=>{F.current.start(Ee)})),Ee.target===Ee.currentTarget&&ke()&&Ee.key===" "&&Ee.preventDefault(),S&&S(Ee),Ee.target===Ee.currentTarget&&ke()&&Ee.key==="Enter"&&!c&&(Ee.preventDefault(),x&&x(Ee))}),ne=Sa(Ee=>{h&&Ee.key===" "&&F.current&&J&&!Ee.defaultPrevented&&($.current=!1,F.current.stop(Ee,()=>{F.current.pulsate(Ee)})),C&&C(Ee),x&&Ee.target===Ee.currentTarget&&ke()&&Ee.key===" "&&!Ee.defaultPrevented&&x(Ee)});let le=l;le==="button"&&(X.href||X.to)&&(le=m);const Te={};le==="button"?(Te.type=G===void 0?"button":G,Te.disabled=c):(!X.href&&!X.to&&(Te.role="button"),c&&(Te["aria-disabled"]=c));const ye=Mr(n,fe,Z),He=W({},r,{centerRipple:s,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:z,focusVisible:J}),Ae=OK(He);return E.jsxs(DK,W({as:le,className:lt(Ae.root,a),ownerState:He,onBlur:ue,onClick:x,onContextMenu:$e,onFocus:Ye,onKeyDown:U,onKeyUp:ne,onMouseDown:Ve,onMouseLeave:V,onMouseUp:oe,onDragLeave:ae,onTouchEnd:Re,onTouchMove:De,onTouchStart:Ie,ref:ye,tabIndex:c?-1:z,type:G},Te,X,{children:[o,Xe?E.jsx(IK,W({ref:q,center:s},D)):null]}))});function FK(t){return Rt("MuiTypography",t)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const zK=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],UK=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=t,a={root:["root",s,t.align!=="inherit"&&`align${bt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return At(a,FK,o)},BK=Ge("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${bt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>W({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),vk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},jK={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},VK=t=>jK[t]||t,ar=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTypography"}),i=VK(r.color),s=ug(W({},r,{color:i})),{align:o="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=vk}=s,y=nt(s,zK),x=W({},s,{align:o,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:f,variant:h,variantMapping:m}),v=l||(f?"p":m[h]||vk[h])||"span",g=UK(x);return E.jsx(BK,W({as:v,ref:n,ownerState:x,className:lt(g.root,a)},y))});function $K(t){return Rt("MuiAppBar",t)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const WK=["className","color","enableColorOnDark","position"],HK=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${bt(e)}`,`position${bt(n)}`]};return At(i,$K,r)},iy=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,GK=Ge(Mu,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${bt(n.position)}`],e[`color${bt(n.color)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return W({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&W({},e.color==="default"&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&W({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&W({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:iy(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:iy(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:iy(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:iy(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},!["inherit","transparent"].includes(e.color)&&{backgroundColor:"var(--AppBar-background)"},{color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),XK=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiAppBar"}),{className:i,color:s="primary",enableColorOnDark:o=!1,position:a="fixed"}=r,l=nt(r,WK),c=W({},r,{color:s,position:a,enableColorOnDark:o}),u=HK(c);return E.jsx(GK,W({square:!0,component:"header",ownerState:c,elevation:4,className:lt(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function qK(t){return typeof t=="function"?t():t}const YK=R.forwardRef(function(e,n){const{children:r,container:i,disablePortal:s=!1}=e,[o,a]=R.useState(null),l=Mr(R.isValidElement(r)?fg(r):null,n);if(Fs(()=>{s||a(qK(i)||document.body)},[i,s]),Fs(()=>{if(o&&!s)return tT(n,o),()=>{tT(n,null)}},[n,o,s]),s){if(R.isValidElement(r)){const c={ref:l};return R.cloneElement(r,c)}return E.jsx(R.Fragment,{children:r})}return E.jsx(R.Fragment,{children:o&&Hl.createPortal(r,o)})}),KK=["onChange","maxRows","minRows","style","value"];function sy(t){return parseInt(t,10)||0}const ZK={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function JK(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const QK=R.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:s=1,style:o,value:a}=e,l=nt(e,KK),{current:c}=R.useRef(a!=null),u=R.useRef(null),f=Mr(n,u),h=R.useRef(null),m=R.useRef(null),y=R.useCallback(()=>{const g=u.current,_=Da(g).getComputedStyle(g);if(_.width==="0px")return{outerHeightStyle:0,overflowing:!1};const S=m.current;S.style.width=_.width,S.value=g.value||e.placeholder||"x",S.value.slice(-1)===` +`&&(S.value+=" ");const C=_.boxSizing,P=sy(_.paddingBottom)+sy(_.paddingTop),A=sy(_.borderBottomWidth)+sy(_.borderTopWidth),L=S.scrollHeight;S.value="x";const k=S.scrollHeight;let T=L;s&&(T=Math.max(Number(s)*k,T)),i&&(T=Math.min(Number(i)*k,T)),T=Math.max(T,k);const N=T+(C==="border-box"?P+A:0),z=Math.abs(T-L)<=1;return{outerHeightStyle:N,overflowing:z}},[i,s,e.placeholder]),x=R.useCallback(()=>{const g=y();if(JK(g))return;const b=g.outerHeightStyle,_=u.current;h.current!==b&&(h.current=b,_.style.height=`${b}px`),_.style.overflow=g.overflowing?"hidden":""},[y]);Fs(()=>{const g=()=>{x()};let b;const _=Wb(g),S=u.current,C=Da(S);C.addEventListener("resize",_);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(g),P.observe(S)),()=>{_.clear(),cancelAnimationFrame(b),C.removeEventListener("resize",_),P&&P.disconnect()}},[y,x]),Fs(()=>{x()});const v=g=>{c||x(),r&&r(g)};return E.jsxs(R.Fragment,{children:[E.jsx("textarea",W({value:a,onChange:v,ref:f,rows:s,style:o},l)),E.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:W({},ZK.shadow,o,{paddingTop:0,paddingBottom:0})})]})});function nh({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const DR=R.createContext(void 0);function Tu(){return R.useContext(DR)}function MU(t){return E.jsx(WX,W({},t,{defaultTheme:NR,themeId:Md}))}function xk(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Rx(t,e=!1){return t&&(xk(t.value)&&t.value!==""||e&&xk(t.defaultValue)&&t.defaultValue!=="")}function eZ(t){return t.startAdornment}function tZ(t){return Rt("MuiInputBase",t)}const Rd=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),nZ=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],qb=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${bt(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},Yb=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},rZ=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:s,focused:o,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:y}=t,x={root:["root",`color${bt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",o&&"focused",a&&"formControl",h&&h!=="medium"&&`size${bt(h)}`,u&&"multiline",m&&"adornedStart",s&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",y==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",s&&"inputAdornedEnd",f&&"readOnly"]};return At(x,tZ,e)},Kb=Ge("div",{name:"MuiInputBase",slot:"Root",overridesResolver:qb})(({theme:t,ownerState:e})=>W({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Rd.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&W({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),Zb=Ge("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Yb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=W({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return W({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Rd.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${Rd.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),iZ=E.jsx(MU,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),FR=R.forwardRef(function(e,n){var r;const i=Pt({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:o,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:y,fullWidth:x=!1,id:v,inputComponent:g="input",inputProps:b={},inputRef:_,maxRows:S,minRows:C,multiline:P=!1,name:A,onBlur:L,onChange:k,onClick:T,onFocus:N,onKeyDown:z,onKeyUp:D,placeholder:B,readOnly:G,renderSuffix:X,rows:Z,slotProps:F={},slots:q={},startAdornment:K,type:Q="text",value:he}=i,fe=nt(i,nZ),J=b.value!=null?b.value:he,{current:de}=R.useRef(J!=null),be=R.useRef(),_e=R.useCallback(Ae=>{},[]),Xe=Mr(be,_,b.ref,_e),[at,Ve]=R.useState(!1),$e=Tu(),ae=nh({props:i,muiFormControl:$e,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ae.focused=$e?$e.focused:at,R.useEffect(()=>{!$e&&h&&at&&(Ve(!1),L&&L())},[$e,h,at,L]);const oe=$e&&$e.onFilled,V=$e&&$e.onEmpty,Ie=R.useCallback(Ae=>{Rx(Ae)?oe&&oe():V&&V()},[oe,V]);Fs(()=>{de&&Ie({value:J})},[J,Ie,de]);const Re=Ae=>{if(ae.disabled){Ae.stopPropagation();return}N&&N(Ae),b.onFocus&&b.onFocus(Ae),$e&&$e.onFocus?$e.onFocus(Ae):Ve(!0)},De=Ae=>{L&&L(Ae),b.onBlur&&b.onBlur(Ae),$e&&$e.onBlur?$e.onBlur(Ae):Ve(!1)},ue=(Ae,...Ee)=>{if(!de){const _t=Ae.target||be.current;if(_t==null)throw new Error(Oa(1));Ie({value:_t.value})}b.onChange&&b.onChange(Ae,...Ee),k&&k(Ae,...Ee)};R.useEffect(()=>{Ie(be.current)},[]);const Ye=Ae=>{be.current&&Ae.currentTarget===Ae.target&&be.current.focus(),T&&T(Ae)};let ke=g,$=b;P&&ke==="input"&&(Z?$=W({type:void 0,minRows:Z,maxRows:Z},$):$=W({type:void 0,maxRows:S,minRows:C},$),ke=QK);const U=Ae=>{Ie(Ae.animationName==="mui-auto-fill-cancel"?be.current:{value:"x"})};R.useEffect(()=>{$e&&$e.setAdornedStart(!!K)},[$e,K]);const ne=W({},i,{color:ae.color||"primary",disabled:ae.disabled,endAdornment:y,error:ae.error,focused:ae.focused,formControl:$e,fullWidth:x,hiddenLabel:ae.hiddenLabel,multiline:P,size:ae.size,startAdornment:K,type:Q}),le=rZ(ne),Te=q.root||c.Root||Kb,ye=F.root||u.root||{},He=q.input||c.Input||Zb;return $=W({},$,(r=F.input)!=null?r:u.input),E.jsxs(R.Fragment,{children:[!m&&iZ,E.jsxs(Te,W({},ye,!Cd(Te)&&{ownerState:W({},ne,ye.ownerState)},{ref:n,onClick:Ye},fe,{className:lt(le.root,ye.className,l,G&&"MuiInputBase-readOnly"),children:[K,E.jsx(DR.Provider,{value:null,children:E.jsx(He,W({ownerState:ne,"aria-invalid":ae.error,"aria-describedby":s,autoComplete:o,autoFocus:a,defaultValue:f,disabled:ae.disabled,id:v,onAnimationStart:U,name:A,placeholder:B,readOnly:G,required:ae.required,rows:Z,value:J,onKeyDown:z,onKeyUp:D,type:Q},$,!Cd(He)&&{as:ke,ownerState:W({},ne,$.ownerState)},{ref:Xe,className:lt(le.input,$.className,G&&"MuiInputBase-readOnly"),onBlur:De,onChange:ue,onFocus:Re}))}),y,X?X(W({},ae,{startAdornment:K})):null]}))]})});function sZ(t){return Rt("MuiInput",t)}const Hh=W({},Rd,Ct("MuiInput",["root","underline","input"]));function oZ(t){return Rt("MuiOutlinedInput",t)}const il=W({},Rd,Ct("MuiOutlinedInput",["root","notchedOutline","input"]));function aZ(t){return Rt("MuiFilledInput",t)}const lc=W({},Rd,Ct("MuiFilledInput",["root","underline","input"])),lZ=th(E.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),cZ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],uZ={entering:{opacity:1},entered:{opacity:1}},fZ=R.forwardRef(function(e,n){const r=Su(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:a,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:y,onExiting:x,style:v,timeout:g=i,TransitionComponent:b=Zo}=e,_=nt(e,cZ),S=R.useRef(null),C=Mr(S,fg(a),n),P=B=>G=>{if(B){const X=S.current;G===void 0?B(X):B(X,G)}},A=P(h),L=P((B,G)=>{SU(B);const X=Cx({style:v,timeout:g,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",X),B.style.transition=r.transitions.create("opacity",X),u&&u(B,G)}),k=P(f),T=P(x),N=P(B=>{const G=Cx({style:v,timeout:g,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",G),B.style.transition=r.transitions.create("opacity",G),m&&m(B)}),z=P(y),D=B=>{s&&s(S.current,B)};return E.jsx(b,W({appear:o,in:c,nodeRef:S,onEnter:L,onEntered:k,onEntering:A,onExit:N,onExited:z,onExiting:T,addEndListener:D,timeout:g},_,{children:(B,G)=>R.cloneElement(a,W({style:W({opacity:0,visibility:B==="exited"&&!c?"hidden":void 0},uZ[B],v,a.props.style),ref:C},G))}))});function dZ(t){return Rt("MuiBackdrop",t)}Ct("MuiBackdrop",["root","invisible"]);const hZ=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],pZ=t=>{const{classes:e,invisible:n}=t;return At({root:["root",n&&"invisible"]},dZ,e)},mZ=Ge("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>W({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),gZ=R.forwardRef(function(e,n){var r,i,s;const o=Pt({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:f={},invisible:h=!1,open:m,slotProps:y={},slots:x={},TransitionComponent:v=fZ,transitionDuration:g}=o,b=nt(o,hZ),_=W({},o,{component:c,invisible:h}),S=pZ(_),C=(r=y.root)!=null?r:f.root;return E.jsx(v,W({in:m,timeout:g},b,{children:E.jsx(mZ,W({"aria-hidden":!0},C,{as:(i=(s=x.root)!=null?s:u.Root)!=null?i:c,className:lt(S.root,l,C==null?void 0:C.className),ownerState:W({},_,C==null?void 0:C.ownerState),classes:S,ref:n,children:a}))}))}),yZ=Ct("MuiBox",["root"]),vZ=IR(),Go=KX({themeId:Md,defaultTheme:vZ,defaultClassName:yZ.root,generateClassName:Vz.generate});function xZ(t){return Rt("MuiButton",t)}const oy=Ct("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),bZ=R.createContext({}),_Z=R.createContext(void 0),wZ=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],SZ=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:s,classes:o}=t,a={root:["root",s,`${s}${bt(e)}`,`size${bt(i)}`,`${s}Size${bt(i)}`,`color${bt(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${bt(i)}`],endIcon:["icon","endIcon",`iconSize${bt(i)}`]},l=At(a,xZ,o);return W({},o,l)},EU=t=>W({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),MZ=Ge(Eu,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${bt(n.color)}`],e[`size${bt(n.size)}`],e[`${n.variant}Size${bt(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],s=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return W({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":W({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:In(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:In(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:In(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":W({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${oy.focusVisible}`]:W({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${oy.disabled}`]:W({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${In(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${oy.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oy.disabled}`]:{boxShadow:"none"}}),EZ=Ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${bt(n.size)}`]]}})(({ownerState:t})=>W({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},EU(t))),TZ=Ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${bt(n.size)}`]]}})(({ownerState:t})=>W({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},EU(t))),du=R.forwardRef(function(e,n){const r=R.useContext(bZ),i=R.useContext(_Z),s=_m(r,e),o=Pt({props:s,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:y,focusVisibleClassName:x,fullWidth:v=!1,size:g="medium",startIcon:b,type:_,variant:S="text"}=o,C=nt(o,wZ),P=W({},o,{color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:v,size:g,type:_,variant:S}),A=SZ(P),L=b&&E.jsx(EZ,{className:A.startIcon,ownerState:P,children:b}),k=y&&E.jsx(TZ,{className:A.endIcon,ownerState:P,children:y}),T=i||"";return E.jsxs(MZ,W({ownerState:P,className:lt(r.className,A.root,u,T),component:c,disabled:f,focusRipple:!m,focusVisibleClassName:lt(A.focusVisible,x),ref:n,type:_},C,{classes:A,children:[L,a,k]}))});function CZ(t){return Rt("MuiCard",t)}Ct("MuiCard",["root"]);const RZ=["className","raised"],AZ=t=>{const{classes:e}=t;return At({root:["root"]},CZ,e)},PZ=Ge(Mu,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),IZ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiCard"}),{className:i,raised:s=!1}=r,o=nt(r,RZ),a=W({},r,{raised:s}),l=AZ(a);return E.jsx(PZ,W({className:lt(l.root,i),elevation:s?8:void 0,ref:n,ownerState:a},o))});function NZ(t){return Rt("MuiCardActions",t)}Ct("MuiCardActions",["root","spacing"]);const kZ=["disableSpacing","className"],LZ=t=>{const{classes:e,disableSpacing:n}=t;return At({root:["root",!n&&"spacing"]},NZ,e)},OZ=Ge("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>W({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),DZ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:s}=r,o=nt(r,kZ),a=W({},r,{disableSpacing:i}),l=LZ(a);return E.jsx(OZ,W({className:lt(l.root,s),ownerState:a,ref:n},o))});function FZ(t){return Rt("MuiCardContent",t)}Ct("MuiCardContent",["root"]);const zZ=["className","component"],UZ=t=>{const{classes:e}=t;return At({root:["root"]},FZ,e)},BZ=Ge("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),jZ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiCardContent"}),{className:i,component:s="div"}=r,o=nt(r,zZ),a=W({},r,{component:s}),l=UZ(a);return E.jsx(BZ,W({as:s,className:lt(l.root,i),ownerState:a,ref:n},o))});function VZ(t){return Rt("PrivateSwitchBase",t)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const $Z=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],WZ=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,s={root:["root",n&&"checked",r&&"disabled",i&&`edge${bt(i)}`],input:["input"]};return At(s,VZ,e)},HZ=Ge(Eu)(({ownerState:t})=>W({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),GZ=Ge("input",{shouldForwardProp:mi})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),XZ=R.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:s,className:o,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:h,inputProps:m,inputRef:y,name:x,onBlur:v,onChange:g,onFocus:b,readOnly:_,required:S=!1,tabIndex:C,type:P,value:A}=e,L=nt(e,$Z),[k,T]=nT({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),N=Tu(),z=q=>{b&&b(q),N&&N.onFocus&&N.onFocus(q)},D=q=>{v&&v(q),N&&N.onBlur&&N.onBlur(q)},B=q=>{if(q.nativeEvent.defaultPrevented)return;const K=q.target.checked;T(K),g&&g(q,K)};let G=l;N&&typeof G>"u"&&(G=N.disabled);const X=P==="checkbox"||P==="radio",Z=W({},e,{checked:k,disabled:G,disableFocusRipple:c,edge:u}),F=WZ(Z);return E.jsxs(HZ,W({component:"span",className:lt(F.root,o),centerRipple:!0,focusRipple:!c,disabled:G,tabIndex:null,role:void 0,onFocus:z,onBlur:D,ownerState:Z,ref:n},L,{children:[E.jsx(GZ,W({autoFocus:r,checked:i,defaultChecked:a,className:F.input,disabled:G,id:X?h:void 0,name:x,onChange:B,readOnly:_,ref:y,required:S,ownerState:Z,tabIndex:C,type:P},P==="checkbox"&&A===void 0?{}:{value:A},m)),k?s:f]}))}),qZ=th(E.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),YZ=th(E.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),KZ=th(E.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function ZZ(t){return Rt("MuiCheckbox",t)}const fM=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),JZ=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],QZ=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,s={root:["root",n&&"indeterminate",`color${bt(r)}`,`size${bt(i)}`]},o=At(s,ZZ,e);return W({},e,o)},eJ=Ge(XZ,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${bt(n.size)}`],n.color!=="default"&&e[`color${bt(n.color)}`]]}})(({theme:t,ownerState:e})=>W({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:In(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${fM.checked}, &.${fM.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${fM.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),tJ=E.jsx(YZ,{}),nJ=E.jsx(qZ,{}),rJ=E.jsx(KZ,{}),iJ=R.forwardRef(function(e,n){var r,i;const s=Pt({props:e,name:"MuiCheckbox"}),{checkedIcon:o=tJ,color:a="primary",icon:l=nJ,indeterminate:c=!1,indeterminateIcon:u=rJ,inputProps:f,size:h="medium",className:m}=s,y=nt(s,JZ),x=c?u:l,v=c?u:o,g=W({},s,{color:a,indeterminate:c,size:h}),b=QZ(g);return E.jsx(eJ,W({type:"checkbox",inputProps:W({"data-indeterminate":c},f),icon:R.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:h}),checkedIcon:R.cloneElement(v,{fontSize:(i=v.props.fontSize)!=null?i:h}),ownerState:g,ref:n,className:lt(b.root,m)},y,{classes:b}))}),sJ=Xq({createStyledComponent:Ge("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${bt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Pt({props:t,name:"MuiContainer"})}),oJ=(t,e)=>W({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),aJ=t=>W({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),lJ=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([o,a])=>{var l;r[t.getColorSchemeSelector(o).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=W({html:oJ(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:W({margin:0},aJ(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const s=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return s&&(i=[i,s]),i};function cJ(t){const e=Pt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return E.jsxs(R.Fragment,{children:[E.jsx(MU,{styles:i=>lJ(i,r)}),n]})}function uJ(t){const e=Ui(t);return e.body===t?Da(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Lp(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function bk(t){return parseInt(Da(t).getComputedStyle(t).paddingRight,10)||0}function fJ(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function _k(t,e,n,r,i){const s=[e,n,...r];[].forEach.call(t.children,o=>{const a=s.indexOf(o)===-1,l=!fJ(o);a&&l&&Lp(o,i)})}function dM(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function dJ(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(uJ(r)){const o=iU(Ui(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${bk(r)+o}px`;const a=Ui(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${bk(l)+o}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Ui(r).body;else{const o=r.parentElement,a=Da(r);s=(o==null?void 0:o.nodeName)==="HTML"&&a.getComputedStyle(o).overflowY==="scroll"?o:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:o,property:a})=>{s?o.style.setProperty(a,s):o.style.removeProperty(a)})}}function hJ(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class pJ{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Lp(e.modalRef,!1);const i=hJ(n);_k(n,e.mount,e.modalRef,i,!0);const s=dM(this.containers,o=>o.container===n);return s!==-1?(this.containers[s].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=dM(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=dJ(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=dM(this.containers,o=>o.modals.indexOf(e)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&Lp(e.modalRef,n),_k(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const o=s.modals[s.modals.length-1];o.modalRef&&Lp(o.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const mJ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function gJ(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function yJ(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function vJ(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||yJ(t))}function xJ(t){const e=[],n=[];return Array.from(t.querySelectorAll(mJ)).forEach((r,i)=>{const s=gJ(r);s===-1||!vJ(r)||(s===0?e.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function bJ(){return!0}function _J(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=xJ,isEnabled:o=bJ,open:a}=t,l=R.useRef(!1),c=R.useRef(null),u=R.useRef(null),f=R.useRef(null),h=R.useRef(null),m=R.useRef(!1),y=R.useRef(null),x=Mr(fg(e),y),v=R.useRef(null);R.useEffect(()=>{!a||!y.current||(m.current=!n)},[n,a]),R.useEffect(()=>{if(!a||!y.current)return;const _=Ui(y.current);return y.current.contains(_.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),m.current&&y.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),R.useEffect(()=>{if(!a||!y.current)return;const _=Ui(y.current),S=A=>{v.current=A,!(r||!o()||A.key!=="Tab")&&_.activeElement===y.current&&A.shiftKey&&(l.current=!0,u.current&&u.current.focus())},C=()=>{const A=y.current;if(A===null)return;if(!_.hasFocus()||!o()||l.current){l.current=!1;return}if(A.contains(_.activeElement)||r&&_.activeElement!==c.current&&_.activeElement!==u.current)return;if(_.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let L=[];if((_.activeElement===c.current||_.activeElement===u.current)&&(L=s(y.current)),L.length>0){var k,T;const N=!!((k=v.current)!=null&&k.shiftKey&&((T=v.current)==null?void 0:T.key)==="Tab"),z=L[0],D=L[L.length-1];typeof z!="string"&&typeof D!="string"&&(N?D.focus():z.focus())}else A.focus()};_.addEventListener("focusin",C),_.addEventListener("keydown",S,!0);const P=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&C()},50);return()=>{clearInterval(P),_.removeEventListener("focusin",C),_.removeEventListener("keydown",S,!0)}},[n,r,i,o,a,s]);const g=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0,h.current=_.target;const S=e.props.onFocus;S&&S(_)},b=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0};return E.jsxs(R.Fragment,{children:[E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),R.cloneElement(e,{ref:x,onFocus:g}),E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}function wJ(t){return typeof t=="function"?t():t}function SJ(t){return t?t.props.hasOwnProperty("in"):!1}const MJ=new pJ;function EJ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=MJ,closeAfterTransition:s=!1,onTransitionEnter:o,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:f}=t,h=R.useRef({}),m=R.useRef(null),y=R.useRef(null),x=Mr(y,f),[v,g]=R.useState(!u),b=SJ(l);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const S=()=>Ui(m.current),C=()=>(h.current.modalRef=y.current,h.current.mount=m.current,h.current),P=()=>{i.mount(C(),{disableScrollLock:r}),y.current&&(y.current.scrollTop=0)},A=Sa(()=>{const X=wJ(e)||S().body;i.add(C(),X),y.current&&P()}),L=R.useCallback(()=>i.isTopModal(C()),[i]),k=Sa(X=>{m.current=X,X&&(u&&L()?P():y.current&&Lp(y.current,_))}),T=R.useCallback(()=>{i.remove(C(),_)},[_,i]);R.useEffect(()=>()=>{T()},[T]),R.useEffect(()=>{u?A():(!b||!s)&&T()},[u,T,b,s,A]);const N=X=>Z=>{var F;(F=X.onKeyDown)==null||F.call(X,Z),!(Z.key!=="Escape"||Z.which===229||!L())&&(n||(Z.stopPropagation(),c&&c(Z,"escapeKeyDown")))},z=X=>Z=>{var F;(F=X.onClick)==null||F.call(X,Z),Z.target===Z.currentTarget&&c&&c(Z,"backdropClick")};return{getRootProps:(X={})=>{const Z=oU(t);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=W({},Z,X);return W({role:"presentation"},F,{onKeyDown:N(F),ref:x})},getBackdropProps:(X={})=>{const Z=X;return W({"aria-hidden":!0},Z,{onClick:z(Z),open:u})},getTransitionProps:()=>{const X=()=>{g(!1),o&&o()},Z=()=>{g(!0),a&&a(),s&&T()};return{onEnter:KN(X,l==null?void 0:l.props.onEnter),onExited:KN(Z,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:k,isTopModal:L,exited:v,hasTransition:b}}function TJ(t){return Rt("MuiModal",t)}Ct("MuiModal",["root","hidden","backdrop"]);const CJ=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],RJ=t=>{const{open:e,exited:n,classes:r}=t;return At({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},TJ,r)},AJ=Ge("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>W({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),PJ=Ge(gZ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),IJ=R.forwardRef(function(e,n){var r,i,s,o,a,l;const c=Pt({name:"MuiModal",props:e}),{BackdropComponent:u=PJ,BackdropProps:f,className:h,closeAfterTransition:m=!1,children:y,container:x,component:v,components:g={},componentsProps:b={},disableAutoFocus:_=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:C=!1,disablePortal:P=!1,disableRestoreFocus:A=!1,disableScrollLock:L=!1,hideBackdrop:k=!1,keepMounted:T=!1,onBackdropClick:N,open:z,slotProps:D,slots:B}=c,G=nt(c,CJ),X=W({},c,{closeAfterTransition:m,disableAutoFocus:_,disableEnforceFocus:S,disableEscapeKeyDown:C,disablePortal:P,disableRestoreFocus:A,disableScrollLock:L,hideBackdrop:k,keepMounted:T}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:q,portalRef:K,isTopModal:Q,exited:he,hasTransition:fe}=EJ(W({},X,{rootRef:n})),J=W({},X,{exited:he}),de=RJ(J),be={};if(y.props.tabIndex===void 0&&(be.tabIndex="-1"),fe){const{onEnter:oe,onExited:V}=q();be.onEnter=oe,be.onExited=V}const _e=(r=(i=B==null?void 0:B.root)!=null?i:g.Root)!=null?r:AJ,Xe=(s=(o=B==null?void 0:B.backdrop)!=null?o:g.Backdrop)!=null?s:u,at=(a=D==null?void 0:D.root)!=null?a:b.root,Ve=(l=D==null?void 0:D.backdrop)!=null?l:b.backdrop,$e=Ho({elementType:_e,externalSlotProps:at,externalForwardedProps:G,getSlotProps:Z,additionalProps:{ref:n,as:v},ownerState:J,className:lt(h,at==null?void 0:at.className,de==null?void 0:de.root,!J.open&&J.exited&&(de==null?void 0:de.hidden))}),ae=Ho({elementType:Xe,externalSlotProps:Ve,additionalProps:f,getSlotProps:oe=>F(W({},oe,{onClick:V=>{N&&N(V),oe!=null&&oe.onClick&&oe.onClick(V)}})),className:lt(Ve==null?void 0:Ve.className,f==null?void 0:f.className,de==null?void 0:de.backdrop),ownerState:J});return!T&&!z&&(!fe||he)?null:E.jsx(YK,{ref:K,container:x,disablePortal:P,children:E.jsxs(_e,W({},$e,{children:[!k&&u?E.jsx(Xe,W({},ae)):null,E.jsx(_J,{disableEnforceFocus:S,disableAutoFocus:_,disableRestoreFocus:A,isEnabled:Q,open:z,children:R.cloneElement(y,be)})]}))})}),wk=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),NJ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],kJ=t=>{const{classes:e,disableUnderline:n}=t,i=At({root:["root",!n&&"underline"],input:["input"]},aZ,e);return W({},e,i)},LJ=Ge(Kb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...qb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return W({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${lc.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${lc.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${lc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${lc.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${lc.disabled}, .${lc.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${lc.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&W({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),OJ=Ge(Zb,{name:"MuiFilledInput",slot:"Input",overridesResolver:Yb})(({theme:t,ownerState:e})=>W({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),zR=R.forwardRef(function(e,n){var r,i,s,o;const a=Pt({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:m,slots:y={},type:x="text"}=a,v=nt(a,NJ),g=W({},a,{fullWidth:u,inputComponent:f,multiline:h,type:x}),b=kJ(a),_={root:{ownerState:g},input:{ownerState:g}},S=m??c?fi(_,m??c):_,C=(r=(i=y.root)!=null?i:l.Root)!=null?r:LJ,P=(s=(o=y.input)!=null?o:l.Input)!=null?s:OJ;return E.jsx(FR,W({slots:{root:C,input:P},componentsProps:S,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:x},v,{classes:b}))});zR.muiName="Input";function DJ(t){return Rt("MuiFormControl",t)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const FJ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],zJ=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${bt(n)}`,r&&"fullWidth"]};return At(i,DJ,e)},UJ=Ge("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>W({},e.root,e[`margin${bt(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>W({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),TU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiFormControl"}),{children:i,className:s,color:o="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:y=!1,size:x="medium",variant:v="outlined"}=r,g=nt(r,FJ),b=W({},r,{color:o,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:y,size:x,variant:v}),_=zJ(b),[S,C]=R.useState(()=>{let D=!1;return i&&R.Children.forEach(i,B=>{if(!Dv(B,["Input","Select"]))return;const G=Dv(B,["Select"])?B.props.input:B;G&&eZ(G.props)&&(D=!0)}),D}),[P,A]=R.useState(()=>{let D=!1;return i&&R.Children.forEach(i,B=>{Dv(B,["Input","Select"])&&(Rx(B.props,!0)||Rx(B.props.inputProps,!0))&&(D=!0)}),D}),[L,k]=R.useState(!1);l&&L&&k(!1);const T=u!==void 0&&!l?u:L;let N;const z=R.useMemo(()=>({adornedStart:S,setAdornedStart:C,color:o,disabled:l,error:c,filled:P,focused:T,fullWidth:f,hiddenLabel:h,size:x,onBlur:()=>{k(!1)},onEmpty:()=>{A(!1)},onFilled:()=>{A(!0)},onFocus:()=>{k(!0)},registerEffect:N,required:y,variant:v}),[S,o,l,c,P,T,f,h,N,y,x,v]);return E.jsx(DR.Provider,{value:z,children:E.jsx(UJ,W({as:a,ownerState:b,className:lt(_.root,s),ref:n},g,{children:i}))})}),lo=tY({createStyledComponent:Ge("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Pt({props:t,name:"MuiStack"})});function BJ(t){return Rt("MuiFormHelperText",t)}const Sk=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Mk;const jJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],VJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:s,filled:o,focused:a,required:l}=t,c={root:["root",i&&"disabled",s&&"error",r&&`size${bt(r)}`,n&&"contained",a&&"focused",o&&"filled",l&&"required"]};return At(c,BJ,e)},$J=Ge("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${bt(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>W({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Sk.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Sk.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),WJ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiFormHelperText"}),{children:i,className:s,component:o="p"}=r,a=nt(r,jJ),l=Tu(),c=nh({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=W({},r,{component:o,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=VJ(u);return E.jsx($J,W({as:o,ownerState:u,className:lt(f.root,s),ref:n},a,{children:i===" "?Mk||(Mk=E.jsx("span",{className:"notranslate",children:"​"})):i}))});function HJ(t){return Rt("MuiFormLabel",t)}const Op=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),GJ=["children","className","color","component","disabled","error","filled","focused","required"],XJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:s,filled:o,required:a}=t,l={root:["root",`color${bt(n)}`,i&&"disabled",s&&"error",o&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",s&&"error"]};return At(l,HJ,e)},qJ=Ge("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>W({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>W({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Op.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Op.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Op.error}`]:{color:(t.vars||t).palette.error.main}})),YJ=Ge("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Op.error}`]:{color:(t.vars||t).palette.error.main}})),KJ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiFormLabel"}),{children:i,className:s,component:o="label"}=r,a=nt(r,GJ),l=Tu(),c=nh({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=W({},r,{color:c.color||"primary",component:o,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=XJ(u);return E.jsxs(qJ,W({as:o,ownerState:u,className:lt(f.root,s),ref:n},a,{children:[i,c.required&&E.jsxs(YJ,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),Ek=R.createContext();function ZJ(t){return Rt("MuiGrid",t)}const JJ=[0,1,2,3,4,5,6,7,8,9,10],QJ=["column-reverse","column","row-reverse","row"],eQ=["nowrap","wrap-reverse","wrap"],Gh=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],wm=Ct("MuiGrid",["root","container","item","zeroMinWidth",...JJ.map(t=>`spacing-xs-${t}`),...QJ.map(t=>`direction-xs-${t}`),...eQ.map(t=>`wrap-xs-${t}`),...Gh.map(t=>`grid-xs-${t}`),...Gh.map(t=>`grid-sm-${t}`),...Gh.map(t=>`grid-md-${t}`),...Gh.map(t=>`grid-lg-${t}`),...Gh.map(t=>`grid-xl-${t}`)]),tQ=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function dd(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function nQ({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let s={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)s={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const o=Gc({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof o=="object"?o[i]:o;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(e.container&&e.item&&e.columnSpacing!==0){const u=t.spacing(e.columnSpacing);if(u!=="0px"){const f=`calc(${l} + ${dd(u)})`;c={flexBasis:f,maxWidth:f}}}s=W({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,s):r[t.breakpoints.up(i)]=s,r},{})}function rQ({theme:t,ownerState:e}){const n=Gc({values:e.direction,breakpoints:t.breakpoints.values});return Vi({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${wm.item}`]={maxWidth:"none"}),i})}function CU({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,s)=>t[i]-t[s]);return r.slice(0,r.indexOf(n))}function iQ({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const s=Gc({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=CU({breakpoints:t.breakpoints.values,values:s})),i=Vi({theme:t},s,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{marginTop:`-${dd(u)}`,[`& > .${wm.item}`]:{paddingTop:dd(u)}}:(c=o)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${wm.item}`]:{paddingTop:0}}})}return i}function sQ({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const s=Gc({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=CU({breakpoints:t.breakpoints.values,values:s})),i=Vi({theme:t},s,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{width:`calc(100% + ${dd(u)})`,marginLeft:`-${dd(u)}`,[`& > .${wm.item}`]:{paddingLeft:dd(u)}}:(c=o)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${wm.item}`]:{paddingLeft:0}}})}return i}function oQ(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const s=t[i];Number(s)>0&&r.push(n[`spacing-${i}-${String(s)}`])}),r}const aQ=Ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:s,spacing:o,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=oQ(o,c,e));const f=[];return c.forEach(h=>{const m=n[h];m&&f.push(e[`grid-${h}-${String(m)}`])}),[e.root,r&&e.container,s&&e.item,l&&e.zeroMinWidth,...u,i!=="row"&&e[`direction-xs-${String(i)}`],a!=="wrap"&&e[`wrap-xs-${String(a)}`],...f]}})(({ownerState:t})=>W({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),rQ,iQ,sQ,nQ);function lQ(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const s=`spacing-${r}-${String(i)}`;n.push(s)}}),n}const cQ=t=>{const{classes:e,container:n,direction:r,item:i,spacing:s,wrap:o,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=lQ(s,l));const u=[];l.forEach(h=>{const m=t[h];m&&u.push(`grid-${h}-${String(m)}`)});const f={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,o!=="wrap"&&`wrap-xs-${String(o)}`,...u]};return At(f,ZJ,e)},Ca=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiGrid"}),{breakpoints:i}=Su(),s=ug(r),{className:o,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:h=!1,rowSpacing:m,spacing:y=0,wrap:x="wrap",zeroMinWidth:v=!1}=s,g=nt(s,tQ),b=m||y,_=l||y,S=R.useContext(Ek),C=u?a||12:S,P={},A=W({},g);i.keys.forEach(T=>{g[T]!=null&&(P[T]=g[T],delete A[T])});const L=W({},s,{columns:C,container:u,direction:f,item:h,rowSpacing:b,columnSpacing:_,wrap:x,zeroMinWidth:v,spacing:y},P,{breakpoints:i.keys}),k=cQ(L);return E.jsx(Ek.Provider,{value:C,children:E.jsx(aQ,W({ownerState:L,className:lt(k.root,o),as:c,ref:n},A))})}),uQ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function lT(t){return`scale(${t}, ${t**2})`}const fQ={entering:{opacity:1,transform:lT(1)},entered:{opacity:1,transform:"none"}},hM=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),RU=R.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:s,easing:o,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:y,timeout:x="auto",TransitionComponent:v=Zo}=e,g=nt(e,uQ),b=nU(),_=R.useRef(),S=Su(),C=R.useRef(null),P=Mr(C,fg(s),n),A=G=>X=>{if(G){const Z=C.current;X===void 0?G(Z):G(Z,X)}},L=A(u),k=A((G,X)=>{SU(G);const{duration:Z,delay:F,easing:q}=Cx({style:y,timeout:x,easing:o},{mode:"enter"});let K;x==="auto"?(K=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=K):K=Z,G.style.transition=[S.transitions.create("opacity",{duration:K,delay:F}),S.transitions.create("transform",{duration:hM?K:K*.666,delay:F,easing:q})].join(","),l&&l(G,X)}),T=A(c),N=A(m),z=A(G=>{const{duration:X,delay:Z,easing:F}=Cx({style:y,timeout:x,easing:o},{mode:"exit"});let q;x==="auto"?(q=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=q):q=X,G.style.transition=[S.transitions.create("opacity",{duration:q,delay:Z}),S.transitions.create("transform",{duration:hM?q:q*.666,delay:hM?Z:Z||q*.333,easing:F})].join(","),G.style.opacity=0,G.style.transform=lT(.75),f&&f(G)}),D=A(h),B=G=>{x==="auto"&&b.start(_.current||0,G),r&&r(C.current,G)};return E.jsx(v,W({appear:i,in:a,nodeRef:C,onEnter:k,onEntered:T,onEntering:L,onExit:z,onExited:D,onExiting:N,addEndListener:B,timeout:x==="auto"?null:x},g,{children:(G,X)=>R.cloneElement(s,W({style:W({opacity:0,transform:lT(.75),visibility:G==="exited"&&!a?"hidden":void 0},fQ[G],y,s.props.style),ref:P},X))}))});RU.muiSupportAuto=!0;const dQ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],hQ=t=>{const{classes:e,disableUnderline:n}=t,i=At({root:["root",!n&&"underline"],input:["input"]},sZ,e);return W({},e,i)},pQ=Ge(Kb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...qb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),W({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Hh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Hh.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Hh.disabled}, .${Hh.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Hh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),mQ=Ge(Zb,{name:"MuiInput",slot:"Input",overridesResolver:Yb})({}),UR=R.forwardRef(function(e,n){var r,i,s,o;const a=Pt({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:m=!1,slotProps:y,slots:x={},type:v="text"}=a,g=nt(a,dQ),b=hQ(a),S={root:{ownerState:{disableUnderline:l}}},C=y??u?fi(y??u,S):S,P=(r=(i=x.root)!=null?i:c.Root)!=null?r:pQ,A=(s=(o=x.input)!=null?o:c.Input)!=null?s:mQ;return E.jsx(FR,W({slots:{root:P,input:A},slotProps:C,fullWidth:f,inputComponent:h,multiline:m,ref:n,type:v},g,{classes:b}))});UR.muiName="Input";function gQ(t){return Rt("MuiInputLabel",t)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const yQ=["disableAnimation","margin","shrink","variant","className"],vQ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:s,variant:o,required:a}=t,l={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&r!=="normal"&&`size${bt(r)}`,o],asterisk:[a&&"asterisk"]},c=At(l,gQ,e);return W({},e,c)},xQ=Ge(KJ,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Op.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>W({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&W({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&W({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&W({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),AU=R.forwardRef(function(e,n){const r=Pt({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:s,className:o}=r,a=nt(r,yQ),l=Tu();let c=s;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=nh({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=W({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),h=vQ(f);return E.jsx(xQ,W({"data-shrink":c,ownerState:f,ref:n,className:lt(h.root,o)},a,{classes:h}))});function bQ(t){return Rt("MuiLink",t)}const _Q=Ct("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),PU={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},wQ=t=>PU[t]||t,SQ=({theme:t,ownerState:e})=>{const n=wQ(e.color),r=Td(t,`palette.${n}`,!1)||e.color,i=Td(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:In(r,.4)},MQ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],EQ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,s={root:["root",`underline${bt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return At(s,bQ,e)},TQ=Ge(ar,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${bt(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>W({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&W({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:SQ({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${_Q.focusVisible}`]:{outline:"auto"}})),Tk=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiLink"}),{className:i,color:s="primary",component:o="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:f="inherit",sx:h}=r,m=nt(r,MQ),{isFocusVisibleRef:y,onBlur:x,onFocus:v,ref:g}=rU(),[b,_]=R.useState(!1),S=Mr(n,g),C=k=>{x(k),y.current===!1&&_(!1),a&&a(k)},P=k=>{v(k),y.current===!0&&_(!0),l&&l(k)},A=W({},r,{color:s,component:o,focusVisible:b,underline:u,variant:f}),L=EQ(A);return E.jsx(TQ,W({color:s,className:lt(L.root,i),classes:c,component:o,onBlur:C,onFocus:P,ref:S,ownerState:A,variant:f,sx:[...Object.keys(PU).includes(s)?[]:[{color:s}],...Array.isArray(h)?h:[h]]},m))}),Uo=R.createContext({});function CQ(t){return Rt("MuiList",t)}Ct("MuiList",["root","padding","dense","subheader"]);const RQ=["children","className","component","dense","disablePadding","subheader"],AQ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return At({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},CQ,e)},PQ=Ge("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>W({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),IU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiList"}),{children:i,className:s,component:o="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=nt(r,RQ),f=R.useMemo(()=>({dense:a}),[a]),h=W({},r,{component:o,dense:a,disablePadding:l}),m=AQ(h);return E.jsx(Uo.Provider,{value:f,children:E.jsxs(PQ,W({as:o,className:lt(m.root,s),ref:n,ownerState:h},u,{children:[c,i]}))})});function IQ(t){return Rt("MuiListItem",t)}const Pf=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function NQ(t){return Rt("MuiListItemButton",t)}const If=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),kQ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],LQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},OQ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:s,divider:o,selected:a}=t,c=At({root:["root",r&&"dense",!s&&"gutters",o&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},NQ,n);return W({},n,c)},DQ=Ge(Eu,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:LQ})(({theme:t,ownerState:e})=>W({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${If.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${If.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${If.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${If.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${If.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),FQ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:s=!1,component:o="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:h=!1,className:m}=r,y=nt(r,kQ),x=R.useContext(Uo),v=R.useMemo(()=>({dense:l||x.dense||!1,alignItems:i,disableGutters:c}),[i,x.dense,l,c]),g=R.useRef(null);Fs(()=>{s&&g.current&&g.current.focus()},[s]);const b=W({},r,{alignItems:i,dense:v.dense,disableGutters:c,divider:u,selected:h}),_=OQ(b),S=Mr(g,n);return E.jsx(Uo.Provider,{value:v,children:E.jsx(DQ,W({ref:S,href:y.href||y.to,component:(y.href||y.to)&&o==="div"?"button":o,focusVisibleClassName:lt(_.focusVisible,f),ownerState:b,className:lt(_.root,m)},y,{classes:_,children:a}))})});function zQ(t){return Rt("MuiListItemSecondaryAction",t)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const UQ=["className"],BQ=t=>{const{disableGutters:e,classes:n}=t;return At({root:["root",e&&"disableGutters"]},zQ,n)},jQ=Ge("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>W({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),NU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,s=nt(r,UQ),o=R.useContext(Uo),a=W({},r,{disableGutters:o.disableGutters}),l=BQ(a);return E.jsx(jQ,W({className:lt(l.root,i),ownerState:a,ref:n},s))});NU.muiName="ListItemSecondaryAction";const VQ=["className"],$Q=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],WQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},HQ=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:s,disableGutters:o,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return At({root:["root",i&&"dense",!o&&"gutters",!a&&"padding",l&&"divider",s&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},IQ,r)},GQ=Ge("div",{name:"MuiListItem",slot:"Root",overridesResolver:WQ})(({theme:t,ownerState:e})=>W({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&W({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${If.root}`]:{paddingRight:48}},{[`&.${Pf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Pf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Pf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Pf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Pf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),XQ=Ge("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),qQ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:s=!1,button:o=!1,children:a,className:l,component:c,components:u={},componentsProps:f={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:y=!1,disabled:x=!1,disableGutters:v=!1,disablePadding:g=!1,divider:b=!1,focusVisibleClassName:_,secondaryAction:S,selected:C=!1,slotProps:P={},slots:A={}}=r,L=nt(r.ContainerProps,VQ),k=nt(r,$Q),T=R.useContext(Uo),N=R.useMemo(()=>({dense:y||T.dense||!1,alignItems:i,disableGutters:v}),[i,T.dense,y,v]),z=R.useRef(null);Fs(()=>{s&&z.current&&z.current.focus()},[s]);const D=R.Children.toArray(a),B=D.length&&Dv(D[D.length-1],["ListItemSecondaryAction"]),G=W({},r,{alignItems:i,autoFocus:s,button:o,dense:N.dense,disabled:x,disableGutters:v,disablePadding:g,divider:b,hasSecondaryAction:B,selected:C}),X=HQ(G),Z=Mr(z,n),F=A.root||u.Root||GQ,q=P.root||f.root||{},K=W({className:lt(X.root,q.className,l),disabled:x},k);let Q=c||"li";return o&&(K.component=c||"div",K.focusVisibleClassName=lt(Pf.focusVisible,_),Q=Eu),B?(Q=!K.component&&!c?"div":Q,h==="li"&&(Q==="li"?Q="div":K.component==="li"&&(K.component="div")),E.jsx(Uo.Provider,{value:N,children:E.jsxs(XQ,W({as:h,className:lt(X.container,m),ref:Z,ownerState:G},L,{children:[E.jsx(F,W({},q,!Cd(F)&&{as:Q,ownerState:W({},G,q.ownerState)},K,{children:D})),D.pop()]}))})):E.jsx(Uo.Provider,{value:N,children:E.jsxs(F,W({},q,{as:Q,ref:Z},!Cd(F)&&{ownerState:W({},G,q.ownerState)},K,{children:[D,S&&E.jsx(NU,{children:S})]}))})}),Ck=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]);function YQ(t){return Rt("MuiListItemText",t)}const Ax=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),KQ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ZQ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:s}=t;return At({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},YQ,e)},JQ=Ge("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Ax.primary}`]:e.primary},{[`& .${Ax.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>W({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),QQ=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiListItemText"}),{children:i,className:s,disableTypography:o=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f}=r,h=nt(r,KQ),{dense:m}=R.useContext(Uo);let y=l??i,x=u;const v=W({},r,{disableTypography:o,inset:a,primary:!!y,secondary:!!x,dense:m}),g=ZQ(v);return y!=null&&y.type!==ar&&!o&&(y=E.jsx(ar,W({variant:m?"body2":"body1",className:g.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:y}))),x!=null&&x.type!==ar&&!o&&(x=E.jsx(ar,W({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},f,{children:x}))),E.jsxs(JQ,W({className:lt(g.root,s),ownerState:v,ref:n},h,{children:[y,x]}))}),eee=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function pM(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function Rk(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function kU(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Xh(t,e,n,r,i,s){let o=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(o)return!1;o=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!kU(a,s)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const tee=R.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:o,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu"}=e,h=nt(e,eee),m=R.useRef(null),y=R.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Fs(()=>{i&&m.current.focus()},[i]),R.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:S})=>{const C=!m.current.style.width;if(_.clientHeight{const S=m.current,C=_.key,P=Ui(S).activeElement;if(C==="ArrowDown")_.preventDefault(),Xh(S,P,c,l,pM);else if(C==="ArrowUp")_.preventDefault(),Xh(S,P,c,l,Rk);else if(C==="Home")_.preventDefault(),Xh(S,null,c,l,pM);else if(C==="End")_.preventDefault(),Xh(S,null,c,l,Rk);else if(C.length===1){const A=y.current,L=C.toLowerCase(),k=performance.now();A.keys.length>0&&(k-A.lastTime>500?(A.keys=[],A.repeating=!0,A.previousKeyMatched=!0):A.repeating&&L!==A.keys[0]&&(A.repeating=!1)),A.lastTime=k,A.keys.push(L);const T=P&&!A.repeating&&kU(P,A);A.previousKeyMatched&&(T||Xh(S,P,!1,l,pM,A))?_.preventDefault():A.previousKeyMatched=!1}u&&u(_)},v=Mr(m,n);let g=-1;R.Children.forEach(o,(_,S)=>{if(!R.isValidElement(_)){g===S&&(g+=1,g>=o.length&&(g=-1));return}_.props.disabled||(f==="selectedMenu"&&_.props.selected||g===-1)&&(g=S),g===S&&(_.props.disabled||_.props.muiSkipListHighlight||_.type.muiSkipListHighlight)&&(g+=1,g>=o.length&&(g=-1))});const b=R.Children.map(o,(_,S)=>{if(S===g){const C={};return s&&(C.autoFocus=!0),_.props.tabIndex===void 0&&f==="selectedMenu"&&(C.tabIndex=0),R.cloneElement(_,C)}return _});return E.jsx(IU,W({role:"menu",ref:v,className:a,onKeyDown:x,tabIndex:i?0:-1},h,{children:b}))});function nee(t){return Rt("MuiPopover",t)}Ct("MuiPopover",["root","paper"]);const ree=["onEntering"],iee=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],see=["slotProps"];function Ak(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function Pk(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function Ik(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function mM(t){return typeof t=="function"?t():t}const oee=t=>{const{classes:e}=t;return At({root:["root"],paper:["paper"]},nee,e)},aee=Ge(IJ,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),LU=Ge(Mu,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),OU=R.forwardRef(function(e,n){var r,i,s;const o=Pt({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:h,className:m,container:y,elevation:x=8,marginThreshold:v=16,open:g,PaperProps:b={},slots:_,slotProps:S,transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:P=RU,transitionDuration:A="auto",TransitionProps:{onEntering:L}={},disableScrollLock:k=!1}=o,T=nt(o.TransitionProps,ree),N=nt(o,iee),z=(r=S==null?void 0:S.paper)!=null?r:b,D=R.useRef(),B=Mr(D,z.ref),G=W({},o,{anchorOrigin:c,anchorReference:f,elevation:x,marginThreshold:v,externalPaperSlotProps:z,transformOrigin:C,TransitionComponent:P,transitionDuration:A,TransitionProps:T}),X=oee(G),Z=R.useCallback(()=>{if(f==="anchorPosition")return u;const oe=mM(l),Ie=(oe&&oe.nodeType===1?oe:Ui(D.current).body).getBoundingClientRect();return{top:Ie.top+Ak(Ie,c.vertical),left:Ie.left+Pk(Ie,c.horizontal)}},[l,c.horizontal,c.vertical,u,f]),F=R.useCallback(oe=>({vertical:Ak(oe,C.vertical),horizontal:Pk(oe,C.horizontal)}),[C.horizontal,C.vertical]),q=R.useCallback(oe=>{const V={width:oe.offsetWidth,height:oe.offsetHeight},Ie=F(V);if(f==="none")return{top:null,left:null,transformOrigin:Ik(Ie)};const Re=Z();let De=Re.top-Ie.vertical,ue=Re.left-Ie.horizontal;const Ye=De+V.height,ke=ue+V.width,$=Da(mM(l)),U=$.innerHeight-v,ne=$.innerWidth-v;if(v!==null&&DeU){const le=Ye-U;De-=le,Ie.vertical+=le}if(v!==null&&uene){const le=ke-ne;ue-=le,Ie.horizontal+=le}return{top:`${Math.round(De)}px`,left:`${Math.round(ue)}px`,transformOrigin:Ik(Ie)}},[l,f,Z,F,v]),[K,Q]=R.useState(g),he=R.useCallback(()=>{const oe=D.current;if(!oe)return;const V=q(oe);V.top!==null&&(oe.style.top=V.top),V.left!==null&&(oe.style.left=V.left),oe.style.transformOrigin=V.transformOrigin,Q(!0)},[q]);R.useEffect(()=>(k&&window.addEventListener("scroll",he),()=>window.removeEventListener("scroll",he)),[l,k,he]);const fe=(oe,V)=>{L&&L(oe,V),he()},J=()=>{Q(!1)};R.useEffect(()=>{g&&he()}),R.useImperativeHandle(a,()=>g?{updatePosition:()=>{he()}}:null,[g,he]),R.useEffect(()=>{if(!g)return;const oe=Wb(()=>{he()}),V=Da(l);return V.addEventListener("resize",oe),()=>{oe.clear(),V.removeEventListener("resize",oe)}},[l,g,he]);let de=A;A==="auto"&&!P.muiSupportAuto&&(de=void 0);const be=y||(l?Ui(mM(l)).body:void 0),_e=(i=_==null?void 0:_.root)!=null?i:aee,Xe=(s=_==null?void 0:_.paper)!=null?s:LU,at=Ho({elementType:Xe,externalSlotProps:W({},z,{style:K?z.style:W({},z.style,{opacity:0})}),additionalProps:{elevation:x,ref:B},ownerState:G,className:lt(X.paper,z==null?void 0:z.className)}),Ve=Ho({elementType:_e,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:be,open:g},ownerState:G,className:lt(X.root,m)}),{slotProps:$e}=Ve,ae=nt(Ve,see);return E.jsx(_e,W({},ae,!Cd(_e)&&{slotProps:$e,disableScrollLock:k},{children:E.jsx(P,W({appear:!0,in:g,onEntering:fe,onExited:J,timeout:de},T,{children:E.jsx(Xe,W({},at,{children:h}))}))}))});function lee(t){return Rt("MuiMenu",t)}Ct("MuiMenu",["root","paper","list"]);const cee=["onEntering"],uee=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],fee={vertical:"top",horizontal:"right"},dee={vertical:"top",horizontal:"left"},hee=t=>{const{classes:e}=t;return At({root:["root"],paper:["paper"],list:["list"]},lee,e)},pee=Ge(OU,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),mee=Ge(LU,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),gee=Ge(tee,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),yee=R.forwardRef(function(e,n){var r,i;const s=Pt({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:f,open:h,PaperProps:m={},PopoverClasses:y,transitionDuration:x="auto",TransitionProps:{onEntering:v}={},variant:g="selectedMenu",slots:b={},slotProps:_={}}=s,S=nt(s.TransitionProps,cee),C=nt(s,uee),P=CR(),A=W({},s,{autoFocus:o,disableAutoFocusItem:c,MenuListProps:u,onEntering:v,PaperProps:m,transitionDuration:x,TransitionProps:S,variant:g}),L=hee(A),k=o&&!c&&h,T=R.useRef(null),N=(F,q)=>{T.current&&T.current.adjustStyleForScrollbar(F,{direction:P?"rtl":"ltr"}),v&&v(F,q)},z=F=>{F.key==="Tab"&&(F.preventDefault(),f&&f(F,"tabKeyDown"))};let D=-1;R.Children.map(a,(F,q)=>{R.isValidElement(F)&&(F.props.disabled||(g==="selectedMenu"&&F.props.selected||D===-1)&&(D=q))});const B=(r=b.paper)!=null?r:mee,G=(i=_.paper)!=null?i:m,X=Ho({elementType:b.root,externalSlotProps:_.root,ownerState:A,className:[L.root,l]}),Z=Ho({elementType:B,externalSlotProps:G,ownerState:A,className:L.paper});return E.jsx(pee,W({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?fee:dee,slots:{paper:B,root:b.root},slotProps:{root:X,paper:Z},open:h,ref:n,transitionDuration:x,TransitionProps:W({onEntering:N},S),ownerState:A},C,{classes:y,children:E.jsx(gee,W({onKeyDown:z,actions:T,autoFocus:o&&(D===-1||c),autoFocusItem:k,variant:g},u,{className:lt(L.list,u.className),children:a}))}))});function vee(t){return Rt("MuiMenuItem",t)}const qh=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],bee=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},_ee=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:s,classes:o}=t,l=At({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},vee,o);return W({},o,l)},wee=Ge(Eu,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:bee})(({theme:t,ownerState:e})=>W({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${qh.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${qh.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${qh.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${qh.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${qh.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${wk.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${wk.inset}`]:{marginLeft:52},[`& .${Ax.root}`]:{marginTop:0,marginBottom:0},[`& .${Ax.inset}`]:{paddingLeft:36},[`& .${Ck.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&W({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${Ck.root} svg`]:{fontSize:"1.25rem"}}))),Nk=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:o=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:h}=r,m=nt(r,xee),y=R.useContext(Uo),x=R.useMemo(()=>({dense:o||y.dense||!1,disableGutters:l}),[y.dense,o,l]),v=R.useRef(null);Fs(()=>{i&&v.current&&v.current.focus()},[i]);const g=W({},r,{dense:x.dense,divider:a,disableGutters:l}),b=_ee(r),_=Mr(v,n);let S;return r.disabled||(S=f!==void 0?f:-1),E.jsx(Uo.Provider,{value:x,children:E.jsx(wee,W({ref:_,role:u,tabIndex:S,component:s,focusVisibleClassName:lt(b.focusVisible,c),className:lt(b.root,h)},m,{ownerState:g,classes:b}))})});function See(t){return Rt("MuiNativeSelect",t)}const BR=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Mee=["className","disabled","error","IconComponent","inputRef","variant"],Eee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${bt(n)}`,s&&"iconOpen",r&&"disabled"]};return At(a,See,e)},DU=({ownerState:t,theme:e})=>W({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":W({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${BR.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),Tee=Ge("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:mi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${BR.multiple}`]:e.multiple}]}})(DU),FU=({ownerState:t,theme:e})=>W({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${BR.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),Cee=Ge("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${bt(n.variant)}`],n.open&&e.iconOpen]}})(FU),Ree=R.forwardRef(function(e,n){const{className:r,disabled:i,error:s,IconComponent:o,inputRef:a,variant:l="standard"}=e,c=nt(e,Mee),u=W({},e,{disabled:i,variant:l,error:s}),f=Eee(u);return E.jsxs(R.Fragment,{children:[E.jsx(Tee,W({ownerState:u,className:lt(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:E.jsx(Cee,{as:o,ownerState:u,className:f.icon})]})});var kk;const Aee=["children","classes","className","label","notched"],Pee=Ge("fieldset",{shouldForwardProp:mi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Iee=Ge("legend",{shouldForwardProp:mi})(({ownerState:t,theme:e})=>W({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&W({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function Nee(t){const{className:e,label:n,notched:r}=t,i=nt(t,Aee),s=n!=null&&n!=="",o=W({},t,{notched:r,withLabel:s});return E.jsx(Pee,W({"aria-hidden":!0,className:e,ownerState:o},i,{children:E.jsx(Iee,{ownerState:o,children:s?E.jsx("span",{children:n}):kk||(kk=E.jsx("span",{className:"notranslate",children:"​"}))})}))}const kee=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Lee=t=>{const{classes:e}=t,r=At({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},oZ,e);return W({},e,r)},Oee=Ge(Kb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:qb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return W({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${il.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${il.focused} .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${il.error} .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${il.disabled} .${il.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&W({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Dee=Ge(Nee,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Fee=Ge(Zb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Yb})(({theme:t,ownerState:e})=>W({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),jR=R.forwardRef(function(e,n){var r,i,s,o,a;const l=Pt({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:f="input",label:h,multiline:m=!1,notched:y,slots:x={},type:v="text"}=l,g=nt(l,kee),b=Lee(l),_=Tu(),S=nh({props:l,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),C=W({},l,{color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:_,fullWidth:u,hiddenLabel:S.hiddenLabel,multiline:m,size:S.size,type:v}),P=(r=(i=x.root)!=null?i:c.Root)!=null?r:Oee,A=(s=(o=x.input)!=null?o:c.Input)!=null?s:Fee;return E.jsx(FR,W({slots:{root:P,input:A},renderSuffix:L=>E.jsx(Dee,{ownerState:C,className:b.notchedOutline,label:h!=null&&h!==""&&S.required?a||(a=E.jsxs(R.Fragment,{children:[h," ","*"]})):h,notched:typeof y<"u"?y:!!(L.startAdornment||L.filled||L.focused)}),fullWidth:u,inputComponent:f,multiline:m,ref:n,type:v},g,{classes:W({},b,{notchedOutline:null})}))});jR.muiName="Input";function zee(t){return Rt("MuiSelect",t)}const Yh=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Lk;const Uee=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Bee=Ge("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Yh.select}`]:e.select},{[`&.${Yh.select}`]:e[n.variant]},{[`&.${Yh.error}`]:e.error},{[`&.${Yh.multiple}`]:e.multiple}]}})(DU,{[`&.${Yh.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),jee=Ge("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${bt(n.variant)}`],n.open&&e.iconOpen]}})(FU),Vee=Ge("input",{shouldForwardProp:t=>wU(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Ok(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function $ee(t){return t==null||typeof t=="string"&&!t.trim()}const Wee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${bt(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return At(a,zee,e)},Hee=R.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":s,autoFocus:o,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:y=!1,IconComponent:x,inputRef:v,labelId:g,MenuProps:b={},multiple:_,name:S,onBlur:C,onChange:P,onClose:A,onFocus:L,onOpen:k,open:T,readOnly:N,renderValue:z,SelectDisplayProps:D={},tabIndex:B,value:G,variant:X="standard"}=e,Z=nt(e,Uee),[F,q]=nT({controlled:G,default:f,name:"Select"}),[K,Q]=nT({controlled:T,default:u,name:"Select"}),he=R.useRef(null),fe=R.useRef(null),[J,de]=R.useState(null),{current:be}=R.useRef(T!=null),[_e,Xe]=R.useState(),at=Mr(n,v),Ve=R.useCallback(Oe=>{fe.current=Oe,Oe&&de(Oe)},[]),$e=J==null?void 0:J.parentNode;R.useImperativeHandle(at,()=>({focus:()=>{fe.current.focus()},node:he.current,value:F}),[F]),R.useEffect(()=>{u&&K&&J&&!be&&(Xe(a?null:$e.clientWidth),fe.current.focus())},[J,a]),R.useEffect(()=>{o&&fe.current.focus()},[o]),R.useEffect(()=>{if(!g)return;const Oe=Ui(fe.current).getElementById(g);if(Oe){const Ke=()=>{getSelection().isCollapsed&&fe.current.focus()};return Oe.addEventListener("click",Ke),()=>{Oe.removeEventListener("click",Ke)}}},[g]);const ae=(Oe,Ke)=>{Oe?k&&k(Ke):A&&A(Ke),be||(Xe(a?null:$e.clientWidth),Q(Oe))},oe=Oe=>{Oe.button===0&&(Oe.preventDefault(),fe.current.focus(),ae(!0,Oe))},V=Oe=>{ae(!1,Oe)},Ie=R.Children.toArray(l),Re=Oe=>{const Ke=Ie.find(ge=>ge.props.value===Oe.target.value);Ke!==void 0&&(q(Ke.props.value),P&&P(Oe,Ke))},De=Oe=>Ke=>{let ge;if(Ke.currentTarget.hasAttribute("tabindex")){if(_){ge=Array.isArray(F)?F.slice():[];const ze=F.indexOf(Oe.props.value);ze===-1?ge.push(Oe.props.value):ge.splice(ze,1)}else ge=Oe.props.value;if(Oe.props.onClick&&Oe.props.onClick(Ke),F!==ge&&(q(ge),P)){const ze=Ke.nativeEvent||Ke,Qe=new ze.constructor(ze.type,ze);Object.defineProperty(Qe,"target",{writable:!0,value:{value:ge,name:S}}),P(Qe,Oe)}_||ae(!1,Ke)}},ue=Oe=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Oe.key)!==-1&&(Oe.preventDefault(),ae(!0,Oe))},Ye=J!==null&&K,ke=Oe=>{!Ye&&C&&(Object.defineProperty(Oe,"target",{writable:!0,value:{value:F,name:S}}),C(Oe))};delete Z["aria-invalid"];let $,U;const ne=[];let le=!1;(Rx({value:F})||m)&&(z?$=z(F):le=!0);const Te=Ie.map(Oe=>{if(!R.isValidElement(Oe))return null;let Ke;if(_){if(!Array.isArray(F))throw new Error(Oa(2));Ke=F.some(ge=>Ok(ge,Oe.props.value)),Ke&&le&&ne.push(Oe.props.children)}else Ke=Ok(F,Oe.props.value),Ke&&le&&(U=Oe.props.children);return R.cloneElement(Oe,{"aria-selected":Ke?"true":"false",onClick:De(Oe),onKeyUp:ge=>{ge.key===" "&&ge.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(ge)},role:"option",selected:Ke,value:void 0,"data-value":Oe.props.value})});le&&(_?ne.length===0?$=null:$=ne.reduce((Oe,Ke,ge)=>(Oe.push(Ke),ge{const{classes:e}=t;return e},VR={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>mi(t)&&t!=="variant",slot:"Root"},Yee=Ge(UR,VR)(""),Kee=Ge(jR,VR)(""),Zee=Ge(zR,VR)(""),$R=R.forwardRef(function(e,n){const r=Pt({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:s,classes:o={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=lZ,id:f,input:h,inputProps:m,label:y,labelId:x,MenuProps:v,multiple:g=!1,native:b=!1,onClose:_,onOpen:S,open:C,renderValue:P,SelectDisplayProps:A,variant:L="outlined"}=r,k=nt(r,Gee),T=b?Ree:Hee,N=Tu(),z=nh({props:r,muiFormControl:N,states:["variant","error"]}),D=z.variant||L,B=W({},r,{variant:D,classes:o}),G=qee(B),X=nt(G,Xee),Z=h||{standard:E.jsx(Yee,{ownerState:B}),outlined:E.jsx(Kee,{label:y,ownerState:B}),filled:E.jsx(Zee,{ownerState:B})}[D],F=Mr(n,fg(Z));return E.jsx(R.Fragment,{children:R.cloneElement(Z,W({inputComponent:T,inputProps:W({children:s,error:z.error,IconComponent:u,variant:D,type:void 0,multiple:g},b?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:x,MenuProps:v,onClose:_,onOpen:S,open:C,renderValue:P,SelectDisplayProps:W({id:f},A)},m,{classes:m?fi(X,m.classes):X},h?h.props.inputProps:{})},(g&&b||c)&&D==="outlined"?{notched:!0}:{},{ref:F,className:lt(Z.props.className,a,G.root)},!h&&{variant:D},k))})});$R.muiName="Select";function Jee(t){return Rt("MuiTab",t)}const sl=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Qee=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ete=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:s,label:o,selected:a,disabled:l}=t,c={root:["root",s&&o&&"labelIcon",`textColor${bt(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return At(c,Jee,e)},tte=Ge(Eu,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${bt(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${sl.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>W({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${sl.iconWrapper}`]:W({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${sl.selected}`]:{opacity:1},[`&.${sl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${sl.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${sl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${sl.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${sl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),gM=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTab"}),{className:i,disabled:s=!1,disableFocusRipple:o=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:h,onClick:m,onFocus:y,selected:x,selectionFollowsFocus:v,textColor:g="inherit",value:b,wrapped:_=!1}=r,S=nt(r,Qee),C=W({},r,{disabled:s,disableFocusRipple:o,selected:x,icon:!!l,iconPosition:c,label:!!f,fullWidth:a,textColor:g,wrapped:_}),P=ete(C),A=l&&f&&R.isValidElement(l)?R.cloneElement(l,{className:lt(P.iconWrapper,l.props.className)}):l,L=T=>{!x&&h&&h(T,b),m&&m(T)},k=T=>{v&&!x&&h&&h(T,b),y&&y(T)};return E.jsxs(tte,W({focusRipple:!o,className:lt(P.root,i),ref:n,role:"tab","aria-selected":x,disabled:s,onClick:L,onFocus:k,ownerState:C,tabIndex:x?0:-1},S,{children:[c==="top"||c==="start"?E.jsxs(R.Fragment,{children:[A,f]}):E.jsxs(R.Fragment,{children:[f,A]}),u]}))}),zU=R.createContext();function nte(t){return Rt("MuiTable",t)}Ct("MuiTable",["root","stickyHeader"]);const rte=["className","component","padding","size","stickyHeader"],ite=t=>{const{classes:e,stickyHeader:n}=t;return At({root:["root",n&&"stickyHeader"]},nte,e)},ste=Ge("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>W({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":W({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),Dk="table",UU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTable"}),{className:i,component:s=Dk,padding:o="normal",size:a="medium",stickyHeader:l=!1}=r,c=nt(r,rte),u=W({},r,{component:s,padding:o,size:a,stickyHeader:l}),f=ite(u),h=R.useMemo(()=>({padding:o,size:a,stickyHeader:l}),[o,a,l]);return E.jsx(zU.Provider,{value:h,children:E.jsx(ste,W({as:s,role:s===Dk?null:"table",ref:n,className:lt(f.root,i),ownerState:u},c))})}),Jb=R.createContext();function ote(t){return Rt("MuiTableBody",t)}Ct("MuiTableBody",["root"]);const ate=["className","component"],lte=t=>{const{classes:e}=t;return At({root:["root"]},ote,e)},cte=Ge("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),ute={variant:"body"},Fk="tbody",BU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableBody"}),{className:i,component:s=Fk}=r,o=nt(r,ate),a=W({},r,{component:s}),l=lte(a);return E.jsx(Jb.Provider,{value:ute,children:E.jsx(cte,W({className:lt(l.root,i),as:s,ref:n,role:s===Fk?null:"rowgroup",ownerState:a},o))})});function fte(t){return Rt("MuiTableCell",t)}const Sm=Ct("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),dte=["align","className","component","padding","scope","size","sortDirection","variant"],hte=t=>{const{classes:e,variant:n,align:r,padding:i,size:s,stickyHeader:o}=t,a={root:["root",n,o&&"stickyHeader",r!=="inherit"&&`align${bt(r)}`,i!=="normal"&&`padding${bt(i)}`,`size${bt(s)}`]};return At(a,fte,e)},pte=Ge("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${bt(n.size)}`],n.padding!=="normal"&&e[`padding${bt(n.padding)}`],n.align!=="inherit"&&e[`align${bt(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>W({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid + ${t.palette.mode==="light"?mU(In(t.palette.divider,1),.88):pU(In(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${Sm.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),ko=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableCell"}),{align:i="inherit",className:s,component:o,padding:a,scope:l,size:c,sortDirection:u,variant:f}=r,h=nt(r,dte),m=R.useContext(zU),y=R.useContext(Jb),x=y&&y.variant==="head";let v;o?v=o:v=x?"th":"td";let g=l;v==="td"?g=void 0:!g&&x&&(g="col");const b=f||y&&y.variant,_=W({},r,{align:i,component:v,padding:a||(m&&m.padding?m.padding:"normal"),size:c||(m&&m.size?m.size:"medium"),sortDirection:u,stickyHeader:b==="head"&&m&&m.stickyHeader,variant:b}),S=hte(_);let C=null;return u&&(C=u==="asc"?"ascending":"descending"),E.jsx(pte,W({as:v,ref:n,className:lt(S.root,s),"aria-sort":C,scope:g,ownerState:_},h))});function mte(t){return Rt("MuiTableContainer",t)}Ct("MuiTableContainer",["root"]);const gte=["className","component"],yte=t=>{const{classes:e}=t;return At({root:["root"]},mte,e)},vte=Ge("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),jU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableContainer"}),{className:i,component:s="div"}=r,o=nt(r,gte),a=W({},r,{component:s}),l=yte(a);return E.jsx(vte,W({ref:n,as:s,className:lt(l.root,i),ownerState:a},o))});function xte(t){return Rt("MuiTableHead",t)}Ct("MuiTableHead",["root"]);const bte=["className","component"],_te=t=>{const{classes:e}=t;return At({root:["root"]},xte,e)},wte=Ge("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),Ste={variant:"head"},zk="thead",VU=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableHead"}),{className:i,component:s=zk}=r,o=nt(r,bte),a=W({},r,{component:s}),l=_te(a);return E.jsx(Jb.Provider,{value:Ste,children:E.jsx(wte,W({as:s,className:lt(l.root,i),ref:n,role:s===zk?null:"rowgroup",ownerState:a},o))})});function Mte(t){return Rt("MuiToolbar",t)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const Ete=["className","component","disableGutters","variant"],Tte=t=>{const{classes:e,disableGutters:n,variant:r}=t;return At({root:["root",!n&&"gutters",r]},Mte,e)},Cte=Ge("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>W({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),Rte=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiToolbar"}),{className:i,component:s="div",disableGutters:o=!1,variant:a="regular"}=r,l=nt(r,Ete),c=W({},r,{component:s,disableGutters:o,variant:a}),u=Tte(c);return E.jsx(Cte,W({as:s,className:lt(u.root,i),ref:n,ownerState:c},l))}),Ate=th(E.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Pte=th(E.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Ite(t){return Rt("MuiTableRow",t)}const Uk=Ct("MuiTableRow",["root","selected","hover","head","footer"]),Nte=["className","component","hover","selected"],kte=t=>{const{classes:e,selected:n,hover:r,head:i,footer:s}=t;return At({root:["root",n&&"selected",r&&"hover",i&&"head",s&&"footer"]},Ite,e)},Lte=Ge("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Uk.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Uk.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:In(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:In(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),Bk="tr",Qb=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTableRow"}),{className:i,component:s=Bk,hover:o=!1,selected:a=!1}=r,l=nt(r,Nte),c=R.useContext(Jb),u=W({},r,{component:s,hover:o,selected:a,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),f=kte(u);return E.jsx(Lte,W({as:s,ref:n,className:lt(f.root,i),role:s===Bk?null:"row",ownerState:u},l))});function Ote(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function Dte(t,e,n,r={},i=()=>{}){const{ease:s=Ote,duration:o=300}=r;let a=null;const l=e[t];let c=!1;const u=()=>{c=!0},f=h=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=h);const m=Math.min(1,(h-a)/o);if(e[t]=s(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(f)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(f),u)}const Fte=["onChange"],zte={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ute(t){const{onChange:e}=t,n=nt(t,Fte),r=R.useRef(),i=R.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Fs(()=>{const o=Wb(()=>{const l=r.current;s(),l!==r.current&&e(r.current)}),a=Da(i.current);return a.addEventListener("resize",o),()=>{o.clear(),a.removeEventListener("resize",o)}},[e]),R.useEffect(()=>{s(),e(r.current)},[e]),E.jsx("div",W({style:zte},n,{ref:i}))}function Bte(t){return Rt("MuiTabScrollButton",t)}const jte=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Vte=["className","slots","slotProps","direction","orientation","disabled"],$te=t=>{const{classes:e,orientation:n,disabled:r}=t;return At({root:["root",n,r&&"disabled"]},Bte,e)},Wte=Ge(Eu,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>W({width:40,flexShrink:0,opacity:.8,[`&.${jte.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Hte=R.forwardRef(function(e,n){var r,i;const s=Pt({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:l={},direction:c}=s,u=nt(s,Vte),f=CR(),h=W({isRtl:f},s),m=$te(h),y=(r=a.StartScrollButtonIcon)!=null?r:Ate,x=(i=a.EndScrollButtonIcon)!=null?i:Pte,v=Ho({elementType:y,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),g=Ho({elementType:x,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return E.jsx(Wte,W({component:"div",className:lt(m.root,o),ref:n,role:null,ownerState:h,tabIndex:null},u,{children:c==="left"?E.jsx(y,W({},v)):E.jsx(x,W({},g))}))});function Gte(t){return Rt("MuiTabs",t)}const yM=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Xte=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],jk=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,Vk=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ay=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const s=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||s)i=n(t,i);else{i.focus();return}}},qte=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:o,scrollButtonsHideMobile:a,classes:l}=t;return At({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Gte,l)},Yte=Ge("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${yM.scrollButtons}`]:e.scrollButtons},{[`& .${yM.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>W({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${yM.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Kte=Ge("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>W({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Zte=Ge("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>W({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Jte=Ge("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>W({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Qte=Ge(Ute)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),$k={},ene=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTabs"}),i=Su(),s=CR(),{"aria-label":o,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:y="primary",onChange:x,orientation:v="horizontal",ScrollButtonComponent:g=Hte,scrollButtons:b="auto",selectionFollowsFocus:_,slots:S={},slotProps:C={},TabIndicatorProps:P={},TabScrollButtonProps:A={},textColor:L="primary",value:k,variant:T="standard",visibleScrollbar:N=!1}=r,z=nt(r,Xte),D=T==="scrollable",B=v==="vertical",G=B?"scrollTop":"scrollLeft",X=B?"top":"left",Z=B?"bottom":"right",F=B?"clientHeight":"clientWidth",q=B?"height":"width",K=W({},r,{component:h,allowScrollButtonsMobile:m,indicatorColor:y,orientation:v,vertical:B,scrollButtons:b,textColor:L,variant:T,visibleScrollbar:N,fixed:!D,hideScrollbar:D&&!N,scrollableX:D&&!B,scrollableY:D&&B,centered:c&&!D,scrollButtonsHideMobile:!m}),Q=qte(K),he=Ho({elementType:S.StartScrollButtonIcon,externalSlotProps:C.startScrollButtonIcon,ownerState:K}),fe=Ho({elementType:S.EndScrollButtonIcon,externalSlotProps:C.endScrollButtonIcon,ownerState:K}),[J,de]=R.useState(!1),[be,_e]=R.useState($k),[Xe,at]=R.useState(!1),[Ve,$e]=R.useState(!1),[ae,oe]=R.useState(!1),[V,Ie]=R.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,De=R.useRef(null),ue=R.useRef(null),Ye=()=>{const ge=De.current;let ze;if(ge){const mt=ge.getBoundingClientRect();ze={clientWidth:ge.clientWidth,scrollLeft:ge.scrollLeft,scrollTop:ge.scrollTop,scrollLeftNormalized:Cq(ge,s?"rtl":"ltr"),scrollWidth:ge.scrollWidth,top:mt.top,bottom:mt.bottom,left:mt.left,right:mt.right}}let Qe;if(ge&&k!==!1){const mt=ue.current.children;if(mt.length>0){const ee=mt[Re.get(k)];Qe=ee?ee.getBoundingClientRect():null}}return{tabsMeta:ze,tabMeta:Qe}},ke=Sa(()=>{const{tabsMeta:ge,tabMeta:ze}=Ye();let Qe=0,mt;if(B)mt="top",ze&&ge&&(Qe=ze.top-ge.top+ge.scrollTop);else if(mt=s?"right":"left",ze&&ge){const Be=s?ge.scrollLeftNormalized+ge.clientWidth-ge.scrollWidth:ge.scrollLeft;Qe=(s?-1:1)*(ze[mt]-ge[mt]+Be)}const ee={[mt]:Qe,[q]:ze?ze[q]:0};if(isNaN(be[mt])||isNaN(be[q]))_e(ee);else{const Be=Math.abs(be[mt]-ee[mt]),ve=Math.abs(be[q]-ee[q]);(Be>=1||ve>=1)&&_e(ee)}}),$=(ge,{animation:ze=!0}={})=>{ze?Dte(G,De.current,ge,{duration:i.transitions.duration.standard}):De.current[G]=ge},U=ge=>{let ze=De.current[G];B?ze+=ge:(ze+=ge*(s?-1:1),ze*=s&&sU()==="reverse"?-1:1),$(ze)},ne=()=>{const ge=De.current[F];let ze=0;const Qe=Array.from(ue.current.children);for(let mt=0;mtge){mt===0&&(ze=ge);break}ze+=ee[F]}return ze},le=()=>{U(-1*ne())},Te=()=>{U(ne())},ye=R.useCallback(ge=>{Ie({overflow:null,scrollbarWidth:ge})},[]),He=()=>{const ge={};ge.scrollbarSizeListener=D?E.jsx(Qte,{onChange:ye,className:lt(Q.scrollableX,Q.hideScrollbar)}):null;const Qe=D&&(b==="auto"&&(Xe||Ve)||b===!0);return ge.scrollButtonStart=Qe?E.jsx(g,W({slots:{StartScrollButtonIcon:S.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:he},orientation:v,direction:s?"right":"left",onClick:le,disabled:!Xe},A,{className:lt(Q.scrollButtons,A.className)})):null,ge.scrollButtonEnd=Qe?E.jsx(g,W({slots:{EndScrollButtonIcon:S.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:fe},orientation:v,direction:s?"left":"right",onClick:Te,disabled:!Ve},A,{className:lt(Q.scrollButtons,A.className)})):null,ge},Ae=Sa(ge=>{const{tabsMeta:ze,tabMeta:Qe}=Ye();if(!(!Qe||!ze)){if(Qe[X]ze[Z]){const mt=ze[G]+(Qe[Z]-ze[Z]);$(mt,{animation:ge})}}}),Ee=Sa(()=>{D&&b!==!1&&oe(!ae)});R.useEffect(()=>{const ge=Wb(()=>{De.current&&ke()});let ze;const Qe=Be=>{Be.forEach(ve=>{ve.removedNodes.forEach(Pe=>{var We;(We=ze)==null||We.unobserve(Pe)}),ve.addedNodes.forEach(Pe=>{var We;(We=ze)==null||We.observe(Pe)})}),ge(),Ee()},mt=Da(De.current);mt.addEventListener("resize",ge);let ee;return typeof ResizeObserver<"u"&&(ze=new ResizeObserver(ge),Array.from(ue.current.children).forEach(Be=>{ze.observe(Be)})),typeof MutationObserver<"u"&&(ee=new MutationObserver(Qe),ee.observe(ue.current,{childList:!0})),()=>{var Be,ve;ge.clear(),mt.removeEventListener("resize",ge),(Be=ee)==null||Be.disconnect(),(ve=ze)==null||ve.disconnect()}},[ke,Ee]),R.useEffect(()=>{const ge=Array.from(ue.current.children),ze=ge.length;if(typeof IntersectionObserver<"u"&&ze>0&&D&&b!==!1){const Qe=ge[0],mt=ge[ze-1],ee={root:De.current,threshold:.99},Be=Ze=>{at(!Ze[0].isIntersecting)},ve=new IntersectionObserver(Be,ee);ve.observe(Qe);const Pe=Ze=>{$e(!Ze[0].isIntersecting)},We=new IntersectionObserver(Pe,ee);return We.observe(mt),()=>{ve.disconnect(),We.disconnect()}}},[D,b,ae,u==null?void 0:u.length]),R.useEffect(()=>{de(!0)},[]),R.useEffect(()=>{ke()}),R.useEffect(()=>{Ae($k!==be)},[Ae,be]),R.useImperativeHandle(l,()=>({updateIndicator:ke,updateScrollButtons:Ee}),[ke,Ee]);const _t=E.jsx(Jte,W({},P,{className:lt(Q.indicator,P.className),ownerState:K,style:W({},be,P.style)}));let Le=0;const it=R.Children.map(u,ge=>{if(!R.isValidElement(ge))return null;const ze=ge.props.value===void 0?Le:ge.props.value;Re.set(ze,Le);const Qe=ze===k;return Le+=1,R.cloneElement(ge,W({fullWidth:T==="fullWidth",indicator:Qe&&!J&&_t,selected:Qe,selectionFollowsFocus:_,onChange:x,textColor:L,value:ze},Le===1&&k===!1&&!ge.props.tabIndex?{tabIndex:0}:{}))}),Oe=ge=>{const ze=ue.current,Qe=Ui(ze).activeElement;if(Qe.getAttribute("role")!=="tab")return;let ee=v==="horizontal"?"ArrowLeft":"ArrowUp",Be=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&s&&(ee="ArrowRight",Be="ArrowLeft"),ge.key){case ee:ge.preventDefault(),ay(ze,Qe,Vk);break;case Be:ge.preventDefault(),ay(ze,Qe,jk);break;case"Home":ge.preventDefault(),ay(ze,null,jk);break;case"End":ge.preventDefault(),ay(ze,null,Vk);break}},Ke=He();return E.jsxs(Yte,W({className:lt(Q.root,f),ownerState:K,ref:n,as:h},z,{children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,E.jsxs(Kte,{className:Q.scroller,ownerState:K,style:{overflow:V.overflow,[B?`margin${s?"Left":"Right"}`:"marginBottom"]:N?void 0:-V.scrollbarWidth},ref:De,children:[E.jsx(Zte,{"aria-label":o,"aria-labelledby":a,"aria-orientation":v==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:K,onKeyDown:Oe,ref:ue,role:"tablist",children:it}),J&&_t]}),Ke.scrollButtonEnd]}))});function tne(t){return Rt("MuiTextField",t)}Ct("MuiTextField",["root"]);const nne=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],rne={standard:UR,filled:zR,outlined:jR},ine=t=>{const{classes:e}=t;return At({root:["root"]},tne,e)},sne=Ge(TU,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),one=R.forwardRef(function(e,n){const r=Pt({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:o,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:y,id:x,InputLabelProps:v,inputProps:g,InputProps:b,inputRef:_,label:S,maxRows:C,minRows:P,multiline:A=!1,name:L,onBlur:k,onChange:T,onFocus:N,placeholder:z,required:D=!1,rows:B,select:G=!1,SelectProps:X,type:Z,value:F,variant:q="outlined"}=r,K=nt(r,nne),Q=W({},r,{autoFocus:s,color:l,disabled:u,error:f,fullWidth:m,multiline:A,required:D,select:G,variant:q}),he=ine(Q),fe={};q==="outlined"&&(v&&typeof v.shrink<"u"&&(fe.notched=v.shrink),fe.label=S),G&&((!X||!X.native)&&(fe.id=void 0),fe["aria-describedby"]=void 0);const J=tU(x),de=y&&J?`${J}-helper-text`:void 0,be=S&&J?`${J}-label`:void 0,_e=rne[q],Xe=E.jsx(_e,W({"aria-describedby":de,autoComplete:i,autoFocus:s,defaultValue:c,fullWidth:m,multiline:A,name:L,rows:B,maxRows:C,minRows:P,type:Z,value:F,id:J,inputRef:_,onBlur:k,onChange:T,onFocus:N,placeholder:z,inputProps:g},fe,b));return E.jsxs(sne,W({className:lt(he.root,a),disabled:u,error:f,fullWidth:m,ref:n,required:D,color:l,variant:q,ownerState:Q},K,{children:[S!=null&&S!==""&&E.jsx(AU,W({htmlFor:J,id:be},v,{children:S})),G?E.jsx($R,W({"aria-describedby":de,id:J,labelId:be,value:F,input:Xe},X,{children:o})):Xe,y&&E.jsx(WJ,W({id:de},h,{children:y}))]}))});/** * @remix-run/router v1.22.0 * * Copyright (c) Remix Software Inc. @@ -141,7 +141,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Mm(){return Mm=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function GR(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function rne(){return Math.random().toString(36).substr(2,8)}function G4(t,e){return{usr:t.state,key:t.key,idx:e}}function cT(t,e,n,r){return n===void 0&&(n=null),Mm({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Cu(e):e,{state:n,key:e&&e.key||r||rne()})}function Px(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Cu(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function ine(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=wl.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Mm({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=wl.Pop;let v=u(),g=v==null?null:v-c;c=v,l&&l({action:a,location:x.location,delta:g})}function h(v,g){a=wl.Push;let b=cT(x.location,v,g);n(b,v),c=u()+1;let _=G4(b,c),S=x.createHref(b);try{o.pushState(_,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&l&&l({action:a,location:x.location,delta:1})}function m(v,g){a=wl.Replace;let b=cT(x.location,v,g);n(b,v),c=u();let _=G4(b,c),S=x.createHref(b);o.replaceState(_,"",S),s&&l&&l({action:a,location:x.location,delta:0})}function y(v){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof v=="string"?v:Px(v);return b=b.replace(/ $/,"%20"),Wn(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let x={get action(){return a},get location(){return t(i,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(H4,f),l=v,()=>{i.removeEventListener(H4,f),l=null}},createHref(v){return e(i,v)},createURL:y,encodeLocation(v){let g=y(v);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(v){return o.go(v)}};return x}var X4;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(X4||(X4={}));function sne(t,e,n){return n===void 0&&(n="/"),one(t,e,n)}function one(t,e,n,r){let i=typeof e=="string"?Cu(e):e,s=Rd(i.pathname||"/",n);if(s==null)return null;let o=UU(t);ane(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Wn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Nl([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(Wn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),UU(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:pne(c,s.index),routesMeta:u})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of BU(s.path))i(s,o,l)}),e}function BU(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=BU(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function ane(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:mne(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lne=/^:[\w-]+$/,cne=3,une=2,fne=1,dne=10,hne=-2,q4=t=>t==="*";function pne(t,e){let n=t.split("/"),r=n.length;return n.some(q4)&&(r+=hne),e&&(r+=une),n.filter(i=>!q4(i)).reduce((i,s)=>i+(lne.test(s)?cne:s===""?fne:dne),r)}function mne(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function gne(t,e,n){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a{let{paramName:h,isOptional:m}=u;if(h==="*"){let x=a[f]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const y=a[f];return m&&!y?c[h]=void 0:c[h]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function yne(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),GR(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function vne(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return GR(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Rd(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function xne(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Cu(t):t;return{pathname:n?n.startsWith("/")?n:bne(n,e):e,search:Sne(r),hash:Mne(i)}}function bne(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function vM(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function _ne(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function jU(t,e){let n=_ne(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function VU(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Cu(t):(i=Mm({},t),Wn(!i.pathname||!i.pathname.includes("?"),vM("?","pathname","search",i)),Wn(!i.pathname||!i.pathname.includes("#"),vM("#","pathname","hash",i)),Wn(!i.search||!i.search.includes("#"),vM("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=xne(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Nl=t=>t.join("/").replace(/\/\/+/g,"/"),wne=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Sne=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Mne=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Ene(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const $U=["post","put","patch","delete"];new Set($U);const Tne=["get",...$U];new Set(Tne);/** + */function Mm(){return Mm=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function WR(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function lne(){return Math.random().toString(36).substr(2,8)}function Hk(t,e){return{usr:t.state,key:t.key,idx:e}}function cT(t,e,n,r){return n===void 0&&(n=null),Mm({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Cu(e):e,{state:n,key:e&&e.key||r||lne()})}function Px(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Cu(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function cne(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=wl.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Mm({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=wl.Pop;let v=u(),g=v==null?null:v-c;c=v,l&&l({action:a,location:x.location,delta:g})}function h(v,g){a=wl.Push;let b=cT(x.location,v,g);n&&n(b,v),c=u()+1;let _=Hk(b,c),S=x.createHref(b);try{o.pushState(_,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&l&&l({action:a,location:x.location,delta:1})}function m(v,g){a=wl.Replace;let b=cT(x.location,v,g);n&&n(b,v),c=u();let _=Hk(b,c),S=x.createHref(b);o.replaceState(_,"",S),s&&l&&l({action:a,location:x.location,delta:0})}function y(v){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof v=="string"?v:Px(v);return b=b.replace(/ $/,"%20"),Wn(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let x={get action(){return a},get location(){return t(i,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Wk,f),l=v,()=>{i.removeEventListener(Wk,f),l=null}},createHref(v){return e(i,v)},createURL:y,encodeLocation(v){let g=y(v);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(v){return o.go(v)}};return x}var Gk;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Gk||(Gk={}));function une(t,e,n){return n===void 0&&(n="/"),fne(t,e,n)}function fne(t,e,n,r){let i=typeof e=="string"?Cu(e):e,s=Ad(i.pathname||"/",n);if(s==null)return null;let o=$U(t);dne(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Wn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Nl([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(Wn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),$U(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:xne(c,s.index),routesMeta:u})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of WU(s.path))i(s,o,l)}),e}function WU(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=WU(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function dne(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:bne(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const hne=/^:[\w-]+$/,pne=3,mne=2,gne=1,yne=10,vne=-2,Xk=t=>t==="*";function xne(t,e){let n=t.split("/"),r=n.length;return n.some(Xk)&&(r+=vne),e&&(r+=mne),n.filter(i=>!Xk(i)).reduce((i,s)=>i+(hne.test(s)?pne:s===""?gne:yne),r)}function bne(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function _ne(t,e,n){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a{let{paramName:h,isOptional:m}=u;if(h==="*"){let x=a[f]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const y=a[f];return m&&!y?c[h]=void 0:c[h]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function wne(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),WR(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function Sne(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return WR(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ad(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function Mne(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Cu(t):t;return{pathname:n?n.startsWith("/")?n:Ene(n,e):e,search:Rne(r),hash:Ane(i)}}function Ene(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function vM(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Tne(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function HU(t,e){let n=Tne(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function GU(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Cu(t):(i=Mm({},t),Wn(!i.pathname||!i.pathname.includes("?"),vM("?","pathname","search",i)),Wn(!i.pathname||!i.pathname.includes("#"),vM("#","pathname","hash",i)),Wn(!i.search||!i.search.includes("#"),vM("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=Mne(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Nl=t=>t.join("/").replace(/\/\/+/g,"/"),Cne=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Rne=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Ane=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Pne(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const XU=["post","put","patch","delete"];new Set(XU);const Ine=["get",...XU];new Set(Ine);/** * React Router v6.29.0 * * Copyright (c) Remix Software Inc. @@ -150,7 +150,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Em(){return Em=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),R.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=VU(c,JSON.parse(o),s,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Nl([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,o,s,t])}function n_(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=R.useContext(Gl),{matches:i}=R.useContext(Ru),{pathname:s}=nh(),o=JSON.stringify(jU(i,r.v7_relativeSplatPath));return R.useMemo(()=>VU(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function Pne(t,e){return Ine(t,e)}function Ine(t,e,n,r){hg()||Wn(!1);let{navigator:i,static:s}=R.useContext(Gl),{matches:o}=R.useContext(Ru),a=o[o.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=nh(),f;if(e){var h;let g=typeof e=="string"?Cu(e):e;c==="/"||(h=g.pathname)!=null&&h.startsWith(c)||Wn(!1),f=g}else f=u;let m=f.pathname||"/",y=m;if(c!=="/"){let g=c.replace(/^\//,"").split("/");y="/"+m.replace(/^\//,"").split("/").slice(g.length).join("/")}let x=sne(t,{pathname:y}),v=Dne(x&&x.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:Nl([c,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:Nl([c,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r);return e&&v?R.createElement(t_.Provider,{value:{location:Em({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:wl.Pop}},v):v}function Nne(){let t=Bne(),e=Ene(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},e),n?R.createElement("pre",{style:i},n):null,null)}const kne=R.createElement(Nne,null);class Lne extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?R.createElement(Ru.Provider,{value:this.props.routeContext},R.createElement(HU.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function One(t){let{routeContext:e,match:n,children:r}=t,i=R.useContext(e_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(Ru.Provider,{value:e},r)}function Dne(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Wn(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,f,h)=>{let m,y=!1,x=null,v=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||kne,l&&(c<0&&h===0?(y=!0,v=null):c===h&&(y=!0,v=f.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,h+1)),b=()=>{let _;return m?_=x:y?_=v:f.route.Component?_=R.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=u,R.createElement(One,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?R.createElement(Lne,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var XU=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(XU||{}),Ix=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Ix||{});function Fne(t){let e=R.useContext(e_);return e||Wn(!1),e}function zne(t){let e=R.useContext(WU);return e||Wn(!1),e}function Une(t){let e=R.useContext(Ru);return e||Wn(!1),e}function qU(t){let e=Une(),n=e.matches[e.matches.length-1];return n.route.id||Wn(!1),n.route.id}function Bne(){var t;let e=R.useContext(HU),n=zne(Ix.UseRouteError),r=qU(Ix.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function jne(){let{router:t}=Fne(XU.UseNavigateStable),e=qU(Ix.UseNavigateStable),n=R.useRef(!1);return GU(()=>{n.current=!0}),R.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Em({fromRouteId:e},s)))},[t,e])}function Vne(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function xp(t){Wn(!1)}function $ne(t){let{basename:e="/",children:n=null,location:r,navigationType:i=wl.Pop,navigator:s,static:o=!1,future:a}=t;hg()&&Wn(!1);let l=e.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:l,navigator:s,static:o,future:Em({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Cu(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:y="default"}=r,x=R.useMemo(()=>{let v=Rd(u,l);return v==null?null:{location:{pathname:v,search:f,hash:h,state:m,key:y},navigationType:i}},[l,u,f,h,m,y,i]);return x==null?null:R.createElement(Gl.Provider,{value:c},R.createElement(t_.Provider,{children:n,value:x}))}function Wne(t){let{children:e,location:n}=t;return Pne(fT(e),n)}new Promise(()=>{});function fT(t,e){e===void 0&&(e=[]);let n=[];return R.Children.forEach(t,(r,i)=>{if(!R.isValidElement(r))return;let s=[...e,i];if(r.type===R.Fragment){n.push.apply(n,fT(r.props.children,s));return}r.type!==xp&&Wn(!1),!r.props.index||!r.props.children||Wn(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=fT(r.props.children,s)),n.push(o)}),n}/** + */function Em(){return Em=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),R.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=GU(c,JSON.parse(o),s,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Nl([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,o,s,t])}function n_(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=R.useContext(Gl),{matches:i}=R.useContext(Ru),{pathname:s}=rh(),o=JSON.stringify(HU(i,r.v7_relativeSplatPath));return R.useMemo(()=>GU(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function One(t,e){return Dne(t,e)}function Dne(t,e,n,r){hg()||Wn(!1);let{navigator:i,static:s}=R.useContext(Gl),{matches:o}=R.useContext(Ru),a=o[o.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=rh(),f;if(e){var h;let g=typeof e=="string"?Cu(e):e;c==="/"||(h=g.pathname)!=null&&h.startsWith(c)||Wn(!1),f=g}else f=u;let m=f.pathname||"/",y=m;if(c!=="/"){let g=c.replace(/^\//,"").split("/");y="/"+m.replace(/^\//,"").split("/").slice(g.length).join("/")}let x=une(t,{pathname:y}),v=jne(x&&x.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:Nl([c,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:Nl([c,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r);return e&&v?R.createElement(t_.Provider,{value:{location:Em({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:wl.Pop}},v):v}function Fne(){let t=Hne(),e=Pne(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},e),n?R.createElement("pre",{style:i},n):null,null)}const zne=R.createElement(Fne,null);class Une extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?R.createElement(Ru.Provider,{value:this.props.routeContext},R.createElement(YU.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Bne(t){let{routeContext:e,match:n,children:r}=t,i=R.useContext(e_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(Ru.Provider,{value:e},r)}function jne(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Wn(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,f,h)=>{let m,y=!1,x=null,v=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||zne,l&&(c<0&&h===0?(Xne("route-fallback"),y=!0,v=null):c===h&&(y=!0,v=f.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,h+1)),b=()=>{let _;return m?_=x:y?_=v:f.route.Component?_=R.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=u,R.createElement(Bne,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?R.createElement(Une,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var ZU=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ZU||{}),Ix=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Ix||{});function Vne(t){let e=R.useContext(e_);return e||Wn(!1),e}function $ne(t){let e=R.useContext(qU);return e||Wn(!1),e}function Wne(t){let e=R.useContext(Ru);return e||Wn(!1),e}function JU(t){let e=Wne(),n=e.matches[e.matches.length-1];return n.route.id||Wn(!1),n.route.id}function Hne(){var t;let e=R.useContext(YU),n=$ne(Ix.UseRouteError),r=JU(Ix.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function Gne(){let{router:t}=Vne(ZU.UseNavigateStable),e=JU(Ix.UseNavigateStable),n=R.useRef(!1);return KU(()=>{n.current=!0}),R.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Em({fromRouteId:e},s)))},[t,e])}const qk={};function Xne(t,e,n){qk[t]||(qk[t]=!0)}function qne(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function bp(t){Wn(!1)}function Yne(t){let{basename:e="/",children:n=null,location:r,navigationType:i=wl.Pop,navigator:s,static:o=!1,future:a}=t;hg()&&Wn(!1);let l=e.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:l,navigator:s,static:o,future:Em({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Cu(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:y="default"}=r,x=R.useMemo(()=>{let v=Ad(u,l);return v==null?null:{location:{pathname:v,search:f,hash:h,state:m,key:y},navigationType:i}},[l,u,f,h,m,y,i]);return x==null?null:R.createElement(Gl.Provider,{value:c},R.createElement(t_.Provider,{children:n,value:x}))}function Kne(t){let{children:e,location:n}=t;return One(fT(e),n)}new Promise(()=>{});function fT(t,e){e===void 0&&(e=[]);let n=[];return R.Children.forEach(t,(r,i)=>{if(!R.isValidElement(r))return;let s=[...e,i];if(r.type===R.Fragment){n.push.apply(n,fT(r.props.children,s));return}r.type!==bp&&Wn(!1),!r.props.index||!r.props.children||Wn(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=fT(r.props.children,s)),n.push(o)}),n}/** * React Router DOM v6.29.0 * * Copyright (c) Remix Software Inc. @@ -159,36 +159,36 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Nx(){return Nx=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Hne(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Gne(t,e){return t.button===0&&(!e||e==="_self")&&!Hne(t)}const Xne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],qne=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Yne="6";try{window.__reactRouterVersion=Yne}catch{}const Kne=R.createContext({isTransitioning:!1}),Zne="startTransition",Y4=Jp[Zne];function Jne(t){let{basename:e,children:n,future:r,window:i}=t,s=R.useRef();s.current==null&&(s.current=nne({window:i,v5Compat:!0}));let o=s.current,[a,l]=R.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=R.useCallback(f=>{c&&Y4?Y4(()=>l(f)):l(f)},[l,c]);return R.useLayoutEffect(()=>o.listen(u),[o,u]),R.useEffect(()=>Vne(r),[r]),R.createElement($ne,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Qne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ere=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Uv=R.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,h=YU(e,Xne),{basename:m}=R.useContext(Gl),y,x=!1;if(typeof c=="string"&&ere.test(c)&&(y=c,Qne))try{let _=new URL(window.location.href),S=c.startsWith("//")?new URL(_.protocol+c):new URL(c),C=Rd(S.pathname,m);S.origin===_.origin&&C!=null?c=C+S.search+S.hash:x=!0}catch{}let v=Cne(c,{relative:i}),g=nre(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f});function b(_){r&&r(_),_.defaultPrevented||g(_)}return R.createElement("a",Nx({},h,{href:y||v,onClick:x||s?r:b,ref:n,target:l}))}),KU=R.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:l,viewTransition:c,children:u}=e,f=YU(e,qne),h=n_(l,{relative:f.relative}),m=nh(),y=R.useContext(WU),{navigator:x,basename:v}=R.useContext(Gl),g=y!=null&&rre(h)&&c===!0,b=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=m.pathname,S=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(_=_.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&v&&(S=Rd(S,v)||S);const C=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let P=_===b||!o&&_.startsWith(b)&&_.charAt(C)==="/",A=S!=null&&(S===b||!o&&S.startsWith(b)&&S.charAt(b.length)==="/"),L={isActive:P,isPending:A,isTransitioning:g},k=P?r:void 0,T;typeof s=="function"?T=s(L):T=[s,P?"active":null,A?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let N=typeof a=="function"?a(L):a;return R.createElement(Uv,Nx({},f,{"aria-current":k,className:T,ref:n,style:N,to:l,viewTransition:c}),typeof u=="function"?u(L):u)});var dT;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(dT||(dT={}));var K4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(K4||(K4={}));function tre(t){let e=R.useContext(e_);return e||Wn(!1),e}function nre(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=Rne(),c=nh(),u=n_(t,{relative:o});return R.useCallback(f=>{if(Gne(f,n)){f.preventDefault();let h=r!==void 0?r:Px(c)===Px(u);l(t,{replace:h,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,u,r,i,n,t,s,o,a])}function rre(t,e){e===void 0&&(e={});let n=R.useContext(Kne);n==null&&Wn(!1);let{basename:r}=tre(dT.useViewTransitionState),i=n_(t,{relative:e.relative});if(!n.isTransitioning)return!1;let s=Rd(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Rd(n.nextLocation.pathname,r)||n.nextLocation.pathname;return uT(i.pathname,o)!=null||uT(i.pathname,s)!=null}function ire(t){var n;const e=t.standard;return E.jsxs(TZ,{variant:"outlined",children:[E.jsxs(DZ,{children:[E.jsx(ar,{sx:{fontSize:14},color:"text.secondary",gutterBottom:!0,children:"XAS Metadata"}),E.jsx(ar,{variant:"h5",component:"div",children:e.sample.name}),E.jsx(ar,{variant:"h6",component:"div",children:e.sample.formula}),E.jsx(ar,{sx:{mb:1.5},color:"text.secondary",children:e.sample.prep}),E.jsxs(ar,{sx:{mb:1.5},children:["Measured at ",(n=e.facility)==null?void 0:n.name," on beamline"," ",e.beamline.name]}),E.jsx(ar,{sx:{mb:1.5},children:e.start_time})]}),t.showDownload&&E.jsx(IZ,{children:E.jsxs(lo,{children:[E.jsx(C4,{href:"/webxdiviewer/xdidata/"+String(e.location),download:String(e.id)+".xdi",children:"Download XDI"}),E.jsx(C4,{component:KU,to:"/xdi/"+String(e.location),children:"Persistent Link"})]})})]})}const pg=R.createContext({xdiFile:null,setXDIFile:()=>{},comparisonFiles:[],setComparisonFiles:()=>{}});function XR(t){const{children:e}=t;return E.jsx(pg.Provider,{value:t.value,children:e})}function sre(){const t=R.useContext(pg);return E.jsx(Go,{children:E.jsx(ar,{sx:{whiteSpace:"pre-line",overflow:"scroll",maxHeight:"20em"},children:t.xdiFile===null?"":t.xdiFile.rawText()})})}const xM=Xe(ko)(({theme:t})=>({[`&.${Sm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${Sm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),ore=Xe(Qb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function are(t){var e,n,r,i;return E.jsxs(ore,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(xM,{align:"left",children:((e=t.xdiFile)==null?void 0:e.element)??" "}),E.jsx(xM,{align:"center",children:((n=t.xdiFile)==null?void 0:n.edge)??""}),E.jsx(xM,{align:"center",children:((i=(r=t.xdiFile)==null?void 0:r.sample)==null?void 0:i.name)??""})]},t.key)}function lre(){const t=R.useContext(pg),e=()=>{const r=t.xdiFile;if(r!=null&&!t.comparisonFiles.some(i=>i.id==(r==null?void 0:r.id))){const s=[...t.comparisonFiles.length>=3?t.comparisonFiles.slice(1,3):t.comparisonFiles,r];t.setComparisonFiles(s)}},n=()=>{t.setComparisonFiles([])};return E.jsxs(Go,{children:[E.jsx(du,{variant:"contained",onClick:e,children:"Store Selected"}),E.jsx(du,{variant:"outlined",onClick:n,children:"Clear All"}),E.jsx(FU,{component:Mu,children:E.jsxs(OU,{sx:{minWidth:650},size:"small","aria-label":"a dense table",children:[E.jsx(zU,{children:E.jsxs(Qb,{children:[E.jsx(ko,{children:"Element"}),E.jsx(ko,{align:"center",children:"Edge"}),E.jsx(ko,{align:"center",children:"Name"})]})}),E.jsx(DU,{children:t.comparisonFiles.map((r,i)=>are({key:i,xdiFile:r}))})]})})]})}function bM(t){const{children:e,value:n,index:r,...i}=t;return E.jsx("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...i,children:n===r&&E.jsx(Go,{sx:{p:1},children:e})})}function _M(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}function qR(t){const[e,n]=R.useState(0),r=(i,s)=>{n(s)};return E.jsxs(Go,{sx:{width:"100%"},children:[E.jsx(Go,{sx:{borderBottom:1,borderColor:"divider"},children:E.jsxs(Yte,{value:e,onChange:r,"aria-label":"basic tabs example",children:[E.jsx(gM,{label:"Metadata",..._M(0)}),E.jsx(gM,{label:"Raw File",..._M(1)}),t.showCompare&&E.jsx(gM,{label:"Comparison",..._M(2)})]})}),E.jsx(bM,{value:e,index:0,children:E.jsx(ire,{standard:t.standard,showDownload:t.showDownload})}),E.jsx(bM,{value:e,index:1,children:E.jsx(sre,{})}),t.showCompare&&E.jsx(bM,{value:e,index:2,children:E.jsx(lre,{})})]})}const ZU=[{Number:"1",Type:"nonmetal","Atomic Weight":"1.008",Name:"Hydrogen",Symbol:"H","Melting Point":"-259","Boiling Point":"-253",Density:"0.09",Earth:"0.14",Group:"1","Electron Configuration":"1s1"},{Number:"2",Type:"noble gas","Atomic Weight":"4.003",Name:"Helium",Symbol:"He","Melting Point":"-272","Boiling Point":"-269",Density:"0.18",Earth:"",Group:"18","Electron Configuration":"1s2"},{Number:"3",Type:"alkali metal","Atomic Weight":"6.941",Name:"Lithium",Symbol:"Li","Melting Point":"180","Boiling Point":"1347",Density:"0.53",Earth:"",Group:"1","Electron Configuration":"[He] 2s1"},{Number:"4",Type:"alkaline earth metal","Atomic Weight":"9.012",Name:"Beryllium",Symbol:"Be","Melting Point":"1278","Boiling Point":"2970",Density:"1.85",Earth:"",Group:"2","Electron Configuration":"[He] 2s2"},{Number:"5",Type:"metalloid","Atomic Weight":"10.811",Name:"Boron",Symbol:"B","Melting Point":"2300","Boiling Point":"2550",Density:"2.34",Earth:"",Group:"13","Electron Configuration":"[He] 2s2 2p1"},{Number:"6",Type:"nonmetal","Atomic Weight":"12.011",Name:"Carbon",Symbol:"C","Melting Point":"3500","Boiling Point":"4827",Density:"2.26",Earth:"0.09",Group:"14","Electron Configuration":"[He] 2s2 2p2"},{Number:"7",Type:"nonmetal","Atomic Weight":"14.007",Name:"Nitrogen",Symbol:"N","Melting Point":"-210","Boiling Point":"-196",Density:"1.25",Earth:"",Group:"15","Electron Configuration":"[He] 2s2 2p3"},{Number:"8",Type:"nonmetal","Atomic Weight":"15.999",Name:"Oxygen",Symbol:"O","Melting Point":"-218","Boiling Point":"-183",Density:"1.43",Earth:"46.71",Group:"16","Electron Configuration":"[He] 2s2 2p4"},{Number:"9",Type:"halogen","Atomic Weight":"18.998",Name:"Fluorine",Symbol:"F","Melting Point":"-220","Boiling Point":"-188",Density:"1.7",Earth:"0.03",Group:"17","Electron Configuration":"[He] 2s2 2p5"},{Number:"10",Type:"noble gas","Atomic Weight":"20.18",Name:"Neon",Symbol:"Ne","Melting Point":"-249","Boiling Point":"-246",Density:"0.9",Earth:"",Group:"18","Electron Configuration":"[He] 2s2 2p6"},{Number:"11",Type:"alkali metal","Atomic Weight":"22.99",Name:"Sodium",Symbol:"Na","Melting Point":"98","Boiling Point":"883",Density:"0.97",Earth:"2.75",Group:"1","Electron Configuration":"[Ne] 3s1"},{Number:"12",Type:"alkaline earth metal","Atomic Weight":"24.305",Name:"Magnesium",Symbol:"Mg","Melting Point":"639","Boiling Point":"1090",Density:"1.74",Earth:"2.08",Group:"2","Electron Configuration":"[Ne] 3s2"},{Number:"13",Type:"post transition metal","Atomic Weight":"26.982",Name:"Aluminum",Symbol:"Al","Melting Point":"660","Boiling Point":"2467",Density:"2.7",Earth:"8.07",Group:"13","Electron Configuration":"[Ne] 3s2 3p1"},{Number:"14",Type:"metalloid","Atomic Weight":"28.086",Name:"Silicon",Symbol:"Si","Melting Point":"1410","Boiling Point":"2355",Density:"2.33",Earth:"27.69",Group:"14","Electron Configuration":"[Ne] 3s2 3p2"},{Number:"15",Type:"nonmetal","Atomic Weight":"30.974",Name:"Phosphorus",Symbol:"P","Melting Point":"44","Boiling Point":"280",Density:"1.82",Earth:"0.13",Group:"15","Electron Configuration":"[Ne] 3s2 3p3"},{Number:"16",Type:"nonmetal","Atomic Weight":"32.065",Name:"Sulfur",Symbol:"S","Melting Point":"113","Boiling Point":"445",Density:"2.07",Earth:"0.05",Group:"16","Electron Configuration":"[Ne] 3s2 3p4"},{Number:"17",Type:"halogen","Atomic Weight":"35.453",Name:"Chlorine",Symbol:"Cl","Melting Point":"-101","Boiling Point":"-35",Density:"3.21",Earth:"0.05",Group:"17","Electron Configuration":"[Ne] 3s2 3p5"},{Number:"18",Type:"noble gas","Atomic Weight":"39.948",Name:"Argon",Symbol:"Ar","Melting Point":"-189","Boiling Point":"-186",Density:"1.78",Earth:"",Group:"18","Electron Configuration":"[Ne] 3s2 3p6"},{Number:"19",Type:"alkali metal","Atomic Weight":"39.098",Name:"Potassium",Symbol:"K","Melting Point":"64","Boiling Point":"774",Density:"0.86",Earth:"2.58",Group:"1","Electron Configuration":"[Ar] 4s1"},{Number:"20",Type:"alkaline earth metal","Atomic Weight":"40.078",Name:"Calcium",Symbol:"Ca","Melting Point":"839","Boiling Point":"1484",Density:"1.55",Earth:"3.65",Group:"2","Electron Configuration":"[Ar] 4s2"},{Number:"21",Type:"transition metal","Atomic Weight":"44.956",Name:"Scandium",Symbol:"Sc","Melting Point":"1539","Boiling Point":"2832",Density:"2.99",Earth:"",Group:"3","Electron Configuration":"[Ar] 3d1 4s2"},{Number:"22",Type:"transition metal","Atomic Weight":"47.867",Name:"Titanium",Symbol:"Ti","Melting Point":"1660","Boiling Point":"3287",Density:"4.54",Earth:"0.62",Group:"4","Electron Configuration":"[Ar] 3d2 4s2"},{Number:"23",Type:"transition metal","Atomic Weight":"50.942",Name:"Vanadium",Symbol:"V","Melting Point":"1890","Boiling Point":"3380",Density:"6.11",Earth:"",Group:"5","Electron Configuration":"[Ar] 3d3 4s2"},{Number:"24",Type:"transition metal","Atomic Weight":"51.996",Name:"Chromium",Symbol:"Cr","Melting Point":"1857","Boiling Point":"2672",Density:"7.19",Earth:"0.04",Group:"6","Electron Configuration":"[Ar] 3d5 4s1"},{Number:"25",Type:"transition metal","Atomic Weight":"54.938",Name:"Manganese",Symbol:"Mn","Melting Point":"1245","Boiling Point":"1962",Density:"7.43",Earth:"0.09",Group:"7","Electron Configuration":"[Ar] 3d5 4s2"},{Number:"26",Type:"transition metal","Atomic Weight":"55.845",Name:"Iron",Symbol:"Fe","Melting Point":"1535","Boiling Point":"2750",Density:"7.87",Earth:"5.05",Group:"8","Electron Configuration":"[Ar] 3d6 4s2"},{Number:"27",Type:"transition metal","Atomic Weight":"58.933",Name:"Cobalt",Symbol:"Co","Melting Point":"1495","Boiling Point":"2870",Density:"8.9",Earth:"",Group:"9","Electron Configuration":"[Ar] 3d7 4s2"},{Number:"28",Type:"transition metal","Atomic Weight":"58.693",Name:"Nickel",Symbol:"Ni","Melting Point":"1453","Boiling Point":"2732",Density:"8.9",Earth:"0.02",Group:"10","Electron Configuration":"[Ar] 3d8 4s2"},{Number:"29",Type:"transition metal","Atomic Weight":"63.546",Name:"Copper",Symbol:"Cu","Melting Point":"1083","Boiling Point":"2567",Density:"8.96",Earth:"",Group:"11","Electron Configuration":"[Ar] 3d10 4s1"},{Number:"30",Type:"transition metal","Atomic Weight":"65.39",Name:"Zinc",Symbol:"Zn","Melting Point":"420","Boiling Point":"907",Density:"7.13",Earth:"",Group:"12","Electron Configuration":"[Ar] 3d10 4s2"},{Number:"31",Type:"post transition metal","Atomic Weight":"69.723",Name:"Gallium",Symbol:"Ga","Melting Point":"30","Boiling Point":"2403",Density:"5.91",Earth:"",Group:"13","Electron Configuration":"[Ar] 3d10 4s2 4p1"},{Number:"32",Type:"metalloid","Atomic Weight":"72.64",Name:"Germanium",Symbol:"Ge","Melting Point":"937","Boiling Point":"2830",Density:"5.32",Earth:"",Group:"14","Electron Configuration":"[Ar] 3d10 4s2 4p2"},{Number:"33",Type:"metalloid","Atomic Weight":"74.922",Name:"Arsenic",Symbol:"As","Melting Point":"81","Boiling Point":"613",Density:"5.72",Earth:"",Group:"15","Electron Configuration":"[Ar] 3d10 4s2 4p3"},{Number:"34",Type:"nonmetal","Atomic Weight":"78.96",Name:"Selenium",Symbol:"Se","Melting Point":"217","Boiling Point":"685",Density:"4.79",Earth:"",Group:"16","Electron Configuration":"[Ar] 3d10 4s2 4p4"},{Number:"35",Type:"halogen","Atomic Weight":"79.904",Name:"Bromine",Symbol:"Br","Melting Point":"-7","Boiling Point":"59",Density:"3.12",Earth:"",Group:"17","Electron Configuration":"[Ar] 3d10 4s2 4p5"},{Number:"36",Type:"noble gas","Atomic Weight":"83.8",Name:"Krypton",Symbol:"Kr","Melting Point":"-157","Boiling Point":"-153",Density:"3.75",Earth:"",Group:"18","Electron Configuration":"[Ar] 3d10 4s2 4p6"},{Number:"37",Type:"alkali metal","Atomic Weight":"85.468",Name:"Rubidium",Symbol:"Rb","Melting Point":"39","Boiling Point":"688",Density:"1.63",Earth:"",Group:"1","Electron Configuration":"[Kr] 5s1"},{Number:"38",Type:"alkaline earth metal","Atomic Weight":"87.62",Name:"Strontium",Symbol:"Sr","Melting Point":"769","Boiling Point":"1384",Density:"2.54",Earth:"",Group:"2","Electron Configuration":"[Kr] 5s2"},{Number:"39",Type:"transition metal","Atomic Weight":"88.906",Name:"Yttrium",Symbol:"Y","Melting Point":"1523","Boiling Point":"3337",Density:"4.47",Earth:"",Group:"3","Electron Configuration":"[Kr] 4d1 5s2"},{Number:"40",Type:"transition metal","Atomic Weight":"91.224",Name:"Zirconium",Symbol:"Zr","Melting Point":"1852","Boiling Point":"4377",Density:"6.51",Earth:"0.03",Group:"4","Electron Configuration":"[Kr] 4d2 5s2"},{Number:"41",Type:"transition metal","Atomic Weight":"92.906",Name:"Niobium",Symbol:"Nb","Melting Point":"2468","Boiling Point":"4927",Density:"8.57",Earth:"",Group:"5","Electron Configuration":"[Kr] 4d4 5s1"},{Number:"42",Type:"transition metal","Atomic Weight":"95.94",Name:"Molybdenum",Symbol:"Mo","Melting Point":"2617","Boiling Point":"4612",Density:"10.22",Earth:"",Group:"6","Electron Configuration":"[Kr] 4d5 5s1"},{Number:"43",Type:"transition metal","Atomic Weight":"98",Name:"Technetium",Symbol:"Tc","Melting Point":"2200","Boiling Point":"4877",Density:"11.5",Earth:"",Group:"7","Electron Configuration":"[Kr] 4d5 5s2"},{Number:"44",Type:"transition metal","Atomic Weight":"101.07",Name:"Ruthenium",Symbol:"Ru","Melting Point":"2250","Boiling Point":"3900",Density:"12.37",Earth:"",Group:"8","Electron Configuration":"[Kr] 4d7 5s1"},{Number:"45",Type:"transition metal","Atomic Weight":"102.906",Name:"Rhodium",Symbol:"Rh","Melting Point":"1966","Boiling Point":"3727",Density:"12.41",Earth:"",Group:"9","Electron Configuration":"[Kr] 4d8 5s1"},{Number:"46",Type:"transition metal","Atomic Weight":"106.42",Name:"Palladium",Symbol:"Pd","Melting Point":"1552","Boiling Point":"2927",Density:"12.02",Earth:"",Group:"10","Electron Configuration":"[Kr] 4d10"},{Number:"47",Type:"transition metal","Atomic Weight":"107.868",Name:"Silver",Symbol:"Ag","Melting Point":"962","Boiling Point":"2212",Density:"10.5",Earth:"",Group:"11","Electron Configuration":"[Kr] 4d10 5s1"},{Number:"48",Type:"transition metal","Atomic Weight":"112.411",Name:"Cadmium",Symbol:"Cd","Melting Point":"321","Boiling Point":"765",Density:"8.65",Earth:"",Group:"12","Electron Configuration":"[Kr] 4d10 5s2"},{Number:"49",Type:"post transition metal","Atomic Weight":"114.818",Name:"Indium",Symbol:"In","Melting Point":"157","Boiling Point":"2000",Density:"7.31",Earth:"",Group:"13","Electron Configuration":"[Kr] 4d10 5s2 5p1"},{Number:"50",Type:"post transition metal","Atomic Weight":"118.71",Name:"Tin",Symbol:"Sn","Melting Point":"232","Boiling Point":"2270",Density:"7.31",Earth:"",Group:"14","Electron Configuration":"[Kr] 4d10 5s2 5p2"},{Number:"51",Type:"metalloid","Atomic Weight":"121.76",Name:"Antimony",Symbol:"Sb","Melting Point":"630","Boiling Point":"1750",Density:"6.68",Earth:"",Group:"15","Electron Configuration":"[Kr] 4d10 5s2 5p3"},{Number:"52",Type:"metalloid","Atomic Weight":"127.6",Name:"Tellurium",Symbol:"Te","Melting Point":"449","Boiling Point":"990",Density:"6.24",Earth:"",Group:"16","Electron Configuration":"[Kr] 4d10 5s2 5p4"},{Number:"53",Type:"halogen","Atomic Weight":"126.905",Name:"Iodine",Symbol:"I","Melting Point":"114","Boiling Point":"184",Density:"4.93",Earth:"",Group:"17","Electron Configuration":"[Kr] 4d10 5s2 5p5"},{Number:"54",Type:"noble gas","Atomic Weight":"131.293",Name:"Xenon",Symbol:"Xe","Melting Point":"-112","Boiling Point":"-108",Density:"5.9",Earth:"",Group:"18","Electron Configuration":"[Kr] 4d10 5s2 5p6"},{Number:"55",Type:"alkali metal","Atomic Weight":"132.906",Name:"Cesium",Symbol:"Cs","Melting Point":"29","Boiling Point":"678",Density:"1.87",Earth:"",Group:"1","Electron Configuration":"[Xe] 6s1"},{Number:"56",Type:"alkaline earth metal","Atomic Weight":"137.327",Name:"Barium",Symbol:"Ba","Melting Point":"725","Boiling Point":"1140",Density:"3.59",Earth:"0.05",Group:"2","Electron Configuration":"[Xe] 6s2"},{Number:"57",Type:"lanthanide","Atomic Weight":"138.906",Name:"Lanthanum",Symbol:"La","Melting Point":"920","Boiling Point":"3469",Density:"6.15",Earth:"",Group:"3","Electron Configuration":"[Xe] 5d1 6s2"},{Number:"58",Type:"lanthanide","Atomic Weight":"140.116",Name:"Cerium",Symbol:"Ce","Melting Point":"795","Boiling Point":"3257",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f1 5d1 6s2"},{Number:"59",Type:"lanthanide","Atomic Weight":"140.908",Name:"Praseodymium",Symbol:"Pr","Melting Point":"935","Boiling Point":"3127",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f3 6s2"},{Number:"60",Type:"lanthanide","Atomic Weight":"144.24",Name:"Neodymium",Symbol:"Nd","Melting Point":"1010","Boiling Point":"3127",Density:"7.01",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f4 6s2"},{Number:"61",Type:"lanthanide","Atomic Weight":"145",Name:"Promethium",Symbol:"Pm","Melting Point":"1100","Boiling Point":"3000",Density:"7.3",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f5 6s2"},{Number:"62",Type:"lanthanide","Atomic Weight":"150.36",Name:"Samarium",Symbol:"Sm","Melting Point":"1072","Boiling Point":"1900",Density:"7.52",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f6 6s2"},{Number:"63",Type:"lanthanide","Atomic Weight":"151.964",Name:"Europium",Symbol:"Eu","Melting Point":"822","Boiling Point":"1597",Density:"5.24",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 6s2"},{Number:"64",Type:"lanthanide","Atomic Weight":"157.25",Name:"Gadolinium",Symbol:"Gd","Melting Point":"1311","Boiling Point":"3233",Density:"7.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 5d1 6s2"},{Number:"65",Type:"lanthanide","Atomic Weight":"158.925",Name:"Terbium",Symbol:"Tb","Melting Point":"1360","Boiling Point":"3041",Density:"8.23",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f9 6s2"},{Number:"66",Type:"lanthanide","Atomic Weight":"162.5",Name:"Dysprosium",Symbol:"Dy","Melting Point":"1412","Boiling Point":"2562",Density:"8.55",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f10 6s2"},{Number:"67",Type:"lanthanide","Atomic Weight":"164.93",Name:"Holmium",Symbol:"Ho","Melting Point":"1470","Boiling Point":"2720",Density:"8.8",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f11 6s2"},{Number:"68",Type:"lanthanide","Atomic Weight":"167.259",Name:"Erbium",Symbol:"Er","Melting Point":"1522","Boiling Point":"2510",Density:"9.07",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f12 6s2"},{Number:"69",Type:"lanthanide","Atomic Weight":"168.934",Name:"Thulium",Symbol:"Tm","Melting Point":"1545","Boiling Point":"1727",Density:"9.32",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f13 6s2"},{Number:"70",Type:"lanthanide","Atomic Weight":"173.04",Name:"Ytterbium",Symbol:"Yb","Melting Point":"824","Boiling Point":"1466",Density:"6.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 6s2"},{Number:"71",Type:"lanthanide","Atomic Weight":"174.967",Name:"Lutetium",Symbol:"Lu","Melting Point":"1656","Boiling Point":"3315",Density:"9.84",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 5d1 6s2"},{Number:"72",Type:"transition metal","Atomic Weight":"178.49",Name:"Hafnium",Symbol:"Hf","Melting Point":"2150","Boiling Point":"5400",Density:"13.31",Earth:"",Group:"4","Electron Configuration":"[Xe] 4f14 5d2 6s2"},{Number:"73",Type:"transition metal","Atomic Weight":"180.948",Name:"Tantalum",Symbol:"Ta","Melting Point":"2996","Boiling Point":"5425",Density:"16.65",Earth:"",Group:"5","Electron Configuration":"[Xe] 4f14 5d3 6s2"},{Number:"74",Type:"transition metal","Atomic Weight":"183.84",Name:"Tungsten",Symbol:"W","Melting Point":"3410","Boiling Point":"5660",Density:"19.35",Earth:"",Group:"6","Electron Configuration":"[Xe] 4f14 5d4 6s2"},{Number:"75",Type:"transition metal","Atomic Weight":"186.207",Name:"Rhenium",Symbol:"Re","Melting Point":"3180","Boiling Point":"5627",Density:"21.04",Earth:"",Group:"7","Electron Configuration":"[Xe] 4f14 5d5 6s2"},{Number:"76",Type:"transition metal","Atomic Weight":"190.23",Name:"Osmium",Symbol:"Os","Melting Point":"3045","Boiling Point":"5027",Density:"22.6",Earth:"",Group:"8","Electron Configuration":"[Xe] 4f14 5d6 6s2"},{Number:"77",Type:"transition metal","Atomic Weight":"192.217",Name:"Iridium",Symbol:"Ir","Melting Point":"2410","Boiling Point":"4527",Density:"22.4",Earth:"",Group:"9","Electron Configuration":"[Xe] 4f14 5d7 6s2"},{Number:"78",Type:"transition metal","Atomic Weight":"195.078",Name:"Platinum",Symbol:"Pt","Melting Point":"1772","Boiling Point":"3827",Density:"21.45",Earth:"",Group:"10","Electron Configuration":"[Xe] 4f14 5d9 6s1"},{Number:"79",Type:"transition metal","Atomic Weight":"196.967",Name:"Gold",Symbol:"Au","Melting Point":"1064","Boiling Point":"2807",Density:"19.32",Earth:"",Group:"11","Electron Configuration":"[Xe] 4f14 5d10 6s1"},{Number:"80",Type:"transition metal","Atomic Weight":"200.59",Name:"Mercury",Symbol:"Hg","Melting Point":"-39","Boiling Point":"357",Density:"13.55",Earth:"",Group:"12","Electron Configuration":"[Xe] 4f14 5d10 6s2"},{Number:"81",Type:"post transition metal","Atomic Weight":"204.383",Name:"Thallium",Symbol:"Tl","Melting Point":"303","Boiling Point":"1457",Density:"11.85",Earth:"",Group:"13","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p1"},{Number:"82",Type:"post transition metal","Atomic Weight":"207.2",Name:"Lead",Symbol:"Pb","Melting Point":"327","Boiling Point":"1740",Density:"11.35",Earth:"",Group:"14","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p2"},{Number:"83",Type:"post transition metal","Atomic Weight":"208.98",Name:"Bismuth",Symbol:"Bi","Melting Point":"271","Boiling Point":"1560",Density:"9.75",Earth:"",Group:"15","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p3"},{Number:"84",Type:"metalloid","Atomic Weight":"209",Name:"Polonium",Symbol:"Po","Melting Point":"254","Boiling Point":"962",Density:"9.3",Earth:"",Group:"16","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p4"},{Number:"85",Type:"halogen","Atomic Weight":"210",Name:"Astatine",Symbol:"At","Melting Point":"302","Boiling Point":"337",Density:"0",Earth:"",Group:"17","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p5"},{Number:"86",Type:"noble gas","Atomic Weight":"222",Name:"Radon",Symbol:"Rn","Melting Point":"-71","Boiling Point":"-62",Density:"9.73",Earth:"",Group:"18","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p6"},{Number:"87",Type:"alkali metal","Atomic Weight":"223",Name:"Francium",Symbol:"Fr","Melting Point":"27","Boiling Point":"677",Density:"0",Earth:"",Group:"1","Electron Configuration":"[Rn] 7s1"},{Number:"88",Type:"alkaline earth metal","Atomic Weight":"226",Name:"Radium",Symbol:"Ra","Melting Point":"700","Boiling Point":"1737",Density:"5.5",Earth:"",Group:"2","Electron Configuration":"[Rn] 7s2"},{Number:"89",Type:"actinide","Atomic Weight":"227",Name:"Actinium",Symbol:"Ac","Melting Point":"1050","Boiling Point":"3200",Density:"10.07",Earth:"",Group:"3","Electron Configuration":"[Rn] 6d1 7s2"},{Number:"90",Type:"actinide","Atomic Weight":"232.038",Name:"Thorium",Symbol:"Th","Melting Point":"1750","Boiling Point":"4790",Density:"11.72",Earth:"",Group:"102","Electron Configuration":"[Rn] 6d2 7s2"},{Number:"91",Type:"actinide","Atomic Weight":"231.036",Name:"Protactinium",Symbol:"Pa","Melting Point":"1568","Boiling Point":"0",Density:"15.4",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f2 6d1 7s2"},{Number:"92",Type:"actinide","Atomic Weight":"238.029",Name:"Uranium",Symbol:"U","Melting Point":"1132","Boiling Point":"3818",Density:"18.95",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f3 6d1 7s2"},{Number:"93",Type:"actinide","Atomic Weight":"237",Name:"Neptunium",Symbol:"Np","Melting Point":"640","Boiling Point":"3902",Density:"20.2",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f4 6d1 7s2"},{Number:"94",Type:"actinide","Atomic Weight":"244",Name:"Plutonium",Symbol:"Pu","Melting Point":"640","Boiling Point":"3235",Density:"19.84",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f6 7s2"},{Number:"95",Type:"actinide","Atomic Weight":"243",Name:"Americium",Symbol:"Am","Melting Point":"994","Boiling Point":"2607",Density:"13.67",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f7 7s2"},{Number:"96",Type:"actinide","Atomic Weight":"247",Name:"Curium",Symbol:"Cm","Melting Point":"1340","Boiling Point":"0",Density:"13.5",Earth:"",Group:"102","Electron Configuration":""},{Number:"97",Type:"actinide","Atomic Weight":"247",Name:"Berkelium",Symbol:"Bk","Melting Point":"986","Boiling Point":"0",Density:"14.78",Earth:"",Group:"102","Electron Configuration":""},{Number:"98",Type:"actinide","Atomic Weight":"251",Name:"Californium",Symbol:"Cf","Melting Point":"900","Boiling Point":"0",Density:"15.1",Earth:"",Group:"102","Electron Configuration":""},{Number:"99",Type:"actinide","Atomic Weight":"252",Name:"Einsteinium",Symbol:"Es","Melting Point":"860","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"100",Type:"actinide","Atomic Weight":"257",Name:"Fermium",Symbol:"Fm","Melting Point":"1527","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"101",Type:"actinide","Atomic Weight":"258",Name:"Mendelevium",Symbol:"Md","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"102",Type:"actinide","Atomic Weight":"259",Name:"Nobelium",Symbol:"No","Melting Point":"827","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"103",Type:"actinide","Atomic Weight":"262",Name:"Lawrencium",Symbol:"Lr","Melting Point":"1627","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"104",Type:"transition metal","Atomic Weight":"261",Name:"Rutherfordium",Symbol:"Rf","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"4","Electron Configuration":""},{Number:"105",Type:"transition metal","Atomic Weight":"262",Name:"Dubnium",Symbol:"Db","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"5","Electron Configuration":""},{Number:"106",Type:"transition metal","Atomic Weight":"266",Name:"Seaborgium",Symbol:"Sg","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"6","Electron Configuration":""},{Number:"107",Type:"transition metal","Atomic Weight":"264",Name:"Bohrium",Symbol:"Bh","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"7","Electron Configuration":""},{Number:"108",Type:"transition metal","Atomic Weight":"277",Name:"Hassium",Symbol:"Hs","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"8","Electron Configuration":""},{Number:"109",Type:"transition metal","Atomic Weight":"268",Name:"Meitnerium",Symbol:"Mt","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"9","Electron Configuration":""}];var Ac=function(){return Ac=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{o==null||o.apply(null,[l,a])},style:{backgroundColor:t.has(a.Symbol)?e:r,textAlign:"center",position:"relative",display:"flex",flexDirection:"column",border:"1px solid black",borderRadius:3,height:"100%",justifyContent:"center",alignItems:"center"},children:E.jsx("div",{className:"symbol",style:{color:t.has(a.Symbol)?n:e,fontSize:"small",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a.Symbol})}):E.jsx("div",{})}}function wre(t){const e=(a,l)=>{t.onClickElement(l.Symbol)},n=Su(),r=n.palette.background.default,i=n.palette.primary.main,s=n.palette.primary.contrastText,o=n.palette.primary.dark;return E.jsx(Go,{sx:{bgcolor:r},children:E.jsx(fre,{onClick:e,Element:_re({availableElements:t.availableElements,backgroundColor:i,textColor:s,disabledColor:o}),squareSize:t.elementSize,margin:0})})}function Sre(t){const e=t.availableElements,[n,r]=R.useState(null),i=Su(),s=Xz(i.breakpoints.down("lg")),o=f=>{r(f.currentTarget)},a=()=>{r(null)},l=!!n,c=l?"simple-popover":void 0,u=s?30:55;return E.jsxs(lo,{direction:"row",spacing:2,children:[E.jsxs(wU,{children:[E.jsx(EU,{id:"Element",children:"Element"}),E.jsxs(HR,{sx:{minWidth:150},labelId:"Element",id:"Element",value:t.selectedElement,label:"Element",onChange:f=>t.setSelectedElement(f.target.value),children:[E.jsx(k4,{value:"all",children:"All Elements"}),[...e].map((f,h)=>E.jsx(k4,{value:f,children:f},h))]})]}),E.jsx(du,{"aria-describedby":c,variant:"outlined",sx:{textTransform:"none"},onClick:o,children:"Periodic Table"}),E.jsx(IU,{id:c,open:l,anchorEl:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:E.jsx(wre,{availableElements:t.availableElements,onClickElement:f=>{t.availableElements.has(f)&&t.setSelectedElement(f),r(null)},elementSize:u})})]})}const ol=7,Yh=Xe(ko)(({theme:t})=>({[`&.${Sm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${Sm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Mre=Xe(Qb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function Ere(t){var n,r,i,s,o;const e=t.xasstandard===t.selected?"activeclicked":"";return E.jsxs(Mre,{onClick:()=>{t.setSelectedRow(t.key),t.updatePlot(t.xasstandard)},className:e,hover:!0,selected:t.selectedRow===t.key,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(Yh,{align:"left",children:((n=t.xasstandard)==null?void 0:n.element.symbol)??" "}),E.jsx(Yh,{align:"center",children:((r=t.xasstandard)==null?void 0:r.edge.name)??""}),E.jsx(Yh,{align:"center",children:((i=t.xasstandard)==null?void 0:i.sample.name)??""}),E.jsx(Yh,{align:"center",children:((s=t.xasstandard)==null?void 0:s.sample.prep)??""}),E.jsx(Yh,{align:"right",children:((o=t.xasstandard)==null?void 0:o.beamline.name)??""})]},t.key)}function Tre(t){const[e,n]=R.useState(-1),r=()=>{t.setOffset(t.offset+ol)},i=()=>{t.setOffset(t.offset-ol)},s=a=>{t.updatePlot(a.location),t.setSelectedStandard(a)};let o=[...t.standards];if(o.length<=ol)for(;o.lengthEre({key:l,xasstandard:a,selected:t.selectedStandard,updatePlot:s,selectedRow:e,setSelectedRow:n}))})]})}),E.jsxs(lo,{direction:"row",spacing:2,children:[E.jsx(du,{variant:"contained",disabled:t.offset===0,onClick:i,children:"<"}),E.jsx(du,{variant:"contained",disabled:t.standards.length"})]})]})}function Cre(t){const[e,n]=R.useState(),[r,i]=R.useState("all"),[s,o]=R.useState(0),a=t.standards.map(f=>f.element.symbol),l=new Set(a);let c=[];r!="all"?c=t.standards.filter(f=>f.element.symbol==r):c=t.standards;const u=f=>{i(f),o(0)};return E.jsxs(lo,{spacing:2,children:[E.jsx(Sre,{availableElements:l,selectedElement:r,setSelectedElement:u}),E.jsx(Tre,{standards:c,updatePlot:t.updatePlot,selectedStandard:e,setSelectedStandard:n,offset:s,setOffset:o}),e&&E.jsx(qR,{standard:e,showDownload:!0,showCompare:!0})]})}class Rre{constructor(e,n,r,i){Wt(this,"namespace");Wt(this,"tag");Wt(this,"value");Wt(this,"unit");this.namespace=e,this.tag=n,this.value=r,this.unit=i}}const ht=class ht{constructor(e,n,r,i,s,o,a,l,c,u){Wt(this,"element");Wt(this,"edge");Wt(this,"sample");Wt(this,"beamline");Wt(this,"date");Wt(this,"columns");Wt(this,"comments");Wt(this,"data");Wt(this,"raw");Wt(this,"id");this.element=e,this.edge=n,this.sample=r,this.beamline=i,this.date=s,this.columns=o,this.comments=a,this.data=l,this.raw=c,this.id=u}static parseFile(e,n){const r=e.split(` + */function Nx(){return Nx=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Zne(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Jne(t,e){return t.button===0&&(!e||e==="_self")&&!Zne(t)}const Qne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ere=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],tre="6";try{window.__reactRouterVersion=tre}catch{}const nre=R.createContext({isTransitioning:!1}),rre="startTransition",Yk=Jp[rre];function ire(t){let{basename:e,children:n,future:r,window:i}=t,s=R.useRef();s.current==null&&(s.current=ane({window:i,v5Compat:!0}));let o=s.current,[a,l]=R.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=R.useCallback(f=>{c&&Yk?Yk(()=>l(f)):l(f)},[l,c]);return R.useLayoutEffect(()=>o.listen(u),[o,u]),R.useEffect(()=>qne(r),[r]),R.createElement(Yne,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const sre=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ore=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Uv=R.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,h=QU(e,Qne),{basename:m}=R.useContext(Gl),y,x=!1;if(typeof c=="string"&&ore.test(c)&&(y=c,sre))try{let _=new URL(window.location.href),S=c.startsWith("//")?new URL(_.protocol+c):new URL(c),C=Ad(S.pathname,m);S.origin===_.origin&&C!=null?c=C+S.search+S.hash:x=!0}catch{}let v=Nne(c,{relative:i}),g=lre(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f});function b(_){r&&r(_),_.defaultPrevented||g(_)}return R.createElement("a",Nx({},h,{href:y||v,onClick:x||s?r:b,ref:n,target:l}))}),e6=R.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:l,viewTransition:c,children:u}=e,f=QU(e,ere),h=n_(l,{relative:f.relative}),m=rh(),y=R.useContext(qU),{navigator:x,basename:v}=R.useContext(Gl),g=y!=null&&cre(h)&&c===!0,b=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=m.pathname,S=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(_=_.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&v&&(S=Ad(S,v)||S);const C=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let P=_===b||!o&&_.startsWith(b)&&_.charAt(C)==="/",A=S!=null&&(S===b||!o&&S.startsWith(b)&&S.charAt(b.length)==="/"),L={isActive:P,isPending:A,isTransitioning:g},k=P?r:void 0,T;typeof s=="function"?T=s(L):T=[s,P?"active":null,A?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let N=typeof a=="function"?a(L):a;return R.createElement(Uv,Nx({},f,{"aria-current":k,className:T,ref:n,style:N,to:l,viewTransition:c}),typeof u=="function"?u(L):u)});var dT;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(dT||(dT={}));var Kk;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Kk||(Kk={}));function are(t){let e=R.useContext(e_);return e||Wn(!1),e}function lre(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=kne(),c=rh(),u=n_(t,{relative:o});return R.useCallback(f=>{if(Jne(f,n)){f.preventDefault();let h=r!==void 0?r:Px(c)===Px(u);l(t,{replace:h,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,u,r,i,n,t,s,o,a])}function cre(t,e){e===void 0&&(e={});let n=R.useContext(nre);n==null&&Wn(!1);let{basename:r}=are(dT.useViewTransitionState),i=n_(t,{relative:e.relative});if(!n.isTransitioning)return!1;let s=Ad(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ad(n.nextLocation.pathname,r)||n.nextLocation.pathname;return uT(i.pathname,o)!=null||uT(i.pathname,s)!=null}function ure(t){var n;const e=t.standard;return E.jsxs(IZ,{variant:"outlined",children:[E.jsxs(jZ,{children:[E.jsx(ar,{sx:{fontSize:14},color:"text.secondary",gutterBottom:!0,children:"XAS Metadata"}),E.jsx(ar,{variant:"h5",component:"div",children:e.sample.name}),E.jsx(ar,{variant:"h6",component:"div",children:e.sample.formula}),E.jsx(ar,{sx:{mb:1.5},color:"text.secondary",children:e.sample.prep}),E.jsxs(ar,{sx:{mb:1.5},children:["Measured at ",(n=e.facility)==null?void 0:n.name," on beamline"," ",e.beamline.name]}),E.jsx(ar,{sx:{mb:1.5},children:e.start_time})]}),t.showDownload&&E.jsx(DZ,{children:E.jsxs(lo,{children:[E.jsx(Tk,{href:"/webxdiviewer/xdidata/"+String(e.location),download:String(e.id)+".xdi",children:"Download XDI"}),E.jsx(Tk,{component:e6,to:"/xdi/"+String(e.location),children:"Persistent Link"})]})})]})}const pg=R.createContext({xdiFile:null,setXDIFile:()=>{},comparisonFiles:[],setComparisonFiles:()=>{}});function HR(t){const{children:e}=t;return E.jsx(pg.Provider,{value:t.value,children:e})}function fre(){const t=R.useContext(pg);return E.jsx(Go,{children:E.jsx(ar,{sx:{whiteSpace:"pre-line",overflow:"scroll",maxHeight:"20em"},children:t.xdiFile===null?"":t.xdiFile.rawText()})})}const xM=Ge(ko)(({theme:t})=>({[`&.${Sm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${Sm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),dre=Ge(Qb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function hre(t){var e,n,r,i;return E.jsxs(dre,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(xM,{align:"left",children:((e=t.xdiFile)==null?void 0:e.element)??" "}),E.jsx(xM,{align:"center",children:((n=t.xdiFile)==null?void 0:n.edge)??""}),E.jsx(xM,{align:"center",children:((i=(r=t.xdiFile)==null?void 0:r.sample)==null?void 0:i.name)??""})]},t.key)}function pre(){const t=R.useContext(pg),e=()=>{const r=t.xdiFile;if(r!=null&&!t.comparisonFiles.some(i=>i.id==(r==null?void 0:r.id))){const s=[...t.comparisonFiles.length>=3?t.comparisonFiles.slice(1,3):t.comparisonFiles,r];t.setComparisonFiles(s)}},n=()=>{t.setComparisonFiles([])};return E.jsxs(Go,{children:[E.jsx(du,{variant:"contained",onClick:e,children:"Store Selected"}),E.jsx(du,{variant:"outlined",onClick:n,children:"Clear All"}),E.jsx(jU,{component:Mu,children:E.jsxs(UU,{sx:{minWidth:650},size:"small","aria-label":"a dense table",children:[E.jsx(VU,{children:E.jsxs(Qb,{children:[E.jsx(ko,{children:"Element"}),E.jsx(ko,{align:"center",children:"Edge"}),E.jsx(ko,{align:"center",children:"Name"})]})}),E.jsx(BU,{children:t.comparisonFiles.map((r,i)=>hre({key:i,xdiFile:r}))})]})})]})}function bM(t){const{children:e,value:n,index:r,...i}=t;return E.jsx("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...i,children:n===r&&E.jsx(Go,{sx:{p:1},children:e})})}function _M(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}function GR(t){const[e,n]=R.useState(0),r=(i,s)=>{n(s)};return E.jsxs(Go,{sx:{width:"100%"},children:[E.jsx(Go,{sx:{borderBottom:1,borderColor:"divider"},children:E.jsxs(ene,{value:e,onChange:r,"aria-label":"basic tabs example",children:[E.jsx(gM,{label:"Metadata",..._M(0)}),E.jsx(gM,{label:"Raw File",..._M(1)}),t.showCompare&&E.jsx(gM,{label:"Comparison",..._M(2)})]})}),E.jsx(bM,{value:e,index:0,children:E.jsx(ure,{standard:t.standard,showDownload:t.showDownload})}),E.jsx(bM,{value:e,index:1,children:E.jsx(fre,{})}),t.showCompare&&E.jsx(bM,{value:e,index:2,children:E.jsx(pre,{})})]})}const t6=[{Number:"1",Type:"nonmetal","Atomic Weight":"1.008",Name:"Hydrogen",Symbol:"H","Melting Point":"-259","Boiling Point":"-253",Density:"0.09",Earth:"0.14",Group:"1","Electron Configuration":"1s1"},{Number:"2",Type:"noble gas","Atomic Weight":"4.003",Name:"Helium",Symbol:"He","Melting Point":"-272","Boiling Point":"-269",Density:"0.18",Earth:"",Group:"18","Electron Configuration":"1s2"},{Number:"3",Type:"alkali metal","Atomic Weight":"6.941",Name:"Lithium",Symbol:"Li","Melting Point":"180","Boiling Point":"1347",Density:"0.53",Earth:"",Group:"1","Electron Configuration":"[He] 2s1"},{Number:"4",Type:"alkaline earth metal","Atomic Weight":"9.012",Name:"Beryllium",Symbol:"Be","Melting Point":"1278","Boiling Point":"2970",Density:"1.85",Earth:"",Group:"2","Electron Configuration":"[He] 2s2"},{Number:"5",Type:"metalloid","Atomic Weight":"10.811",Name:"Boron",Symbol:"B","Melting Point":"2300","Boiling Point":"2550",Density:"2.34",Earth:"",Group:"13","Electron Configuration":"[He] 2s2 2p1"},{Number:"6",Type:"nonmetal","Atomic Weight":"12.011",Name:"Carbon",Symbol:"C","Melting Point":"3500","Boiling Point":"4827",Density:"2.26",Earth:"0.09",Group:"14","Electron Configuration":"[He] 2s2 2p2"},{Number:"7",Type:"nonmetal","Atomic Weight":"14.007",Name:"Nitrogen",Symbol:"N","Melting Point":"-210","Boiling Point":"-196",Density:"1.25",Earth:"",Group:"15","Electron Configuration":"[He] 2s2 2p3"},{Number:"8",Type:"nonmetal","Atomic Weight":"15.999",Name:"Oxygen",Symbol:"O","Melting Point":"-218","Boiling Point":"-183",Density:"1.43",Earth:"46.71",Group:"16","Electron Configuration":"[He] 2s2 2p4"},{Number:"9",Type:"halogen","Atomic Weight":"18.998",Name:"Fluorine",Symbol:"F","Melting Point":"-220","Boiling Point":"-188",Density:"1.7",Earth:"0.03",Group:"17","Electron Configuration":"[He] 2s2 2p5"},{Number:"10",Type:"noble gas","Atomic Weight":"20.18",Name:"Neon",Symbol:"Ne","Melting Point":"-249","Boiling Point":"-246",Density:"0.9",Earth:"",Group:"18","Electron Configuration":"[He] 2s2 2p6"},{Number:"11",Type:"alkali metal","Atomic Weight":"22.99",Name:"Sodium",Symbol:"Na","Melting Point":"98","Boiling Point":"883",Density:"0.97",Earth:"2.75",Group:"1","Electron Configuration":"[Ne] 3s1"},{Number:"12",Type:"alkaline earth metal","Atomic Weight":"24.305",Name:"Magnesium",Symbol:"Mg","Melting Point":"639","Boiling Point":"1090",Density:"1.74",Earth:"2.08",Group:"2","Electron Configuration":"[Ne] 3s2"},{Number:"13",Type:"post transition metal","Atomic Weight":"26.982",Name:"Aluminum",Symbol:"Al","Melting Point":"660","Boiling Point":"2467",Density:"2.7",Earth:"8.07",Group:"13","Electron Configuration":"[Ne] 3s2 3p1"},{Number:"14",Type:"metalloid","Atomic Weight":"28.086",Name:"Silicon",Symbol:"Si","Melting Point":"1410","Boiling Point":"2355",Density:"2.33",Earth:"27.69",Group:"14","Electron Configuration":"[Ne] 3s2 3p2"},{Number:"15",Type:"nonmetal","Atomic Weight":"30.974",Name:"Phosphorus",Symbol:"P","Melting Point":"44","Boiling Point":"280",Density:"1.82",Earth:"0.13",Group:"15","Electron Configuration":"[Ne] 3s2 3p3"},{Number:"16",Type:"nonmetal","Atomic Weight":"32.065",Name:"Sulfur",Symbol:"S","Melting Point":"113","Boiling Point":"445",Density:"2.07",Earth:"0.05",Group:"16","Electron Configuration":"[Ne] 3s2 3p4"},{Number:"17",Type:"halogen","Atomic Weight":"35.453",Name:"Chlorine",Symbol:"Cl","Melting Point":"-101","Boiling Point":"-35",Density:"3.21",Earth:"0.05",Group:"17","Electron Configuration":"[Ne] 3s2 3p5"},{Number:"18",Type:"noble gas","Atomic Weight":"39.948",Name:"Argon",Symbol:"Ar","Melting Point":"-189","Boiling Point":"-186",Density:"1.78",Earth:"",Group:"18","Electron Configuration":"[Ne] 3s2 3p6"},{Number:"19",Type:"alkali metal","Atomic Weight":"39.098",Name:"Potassium",Symbol:"K","Melting Point":"64","Boiling Point":"774",Density:"0.86",Earth:"2.58",Group:"1","Electron Configuration":"[Ar] 4s1"},{Number:"20",Type:"alkaline earth metal","Atomic Weight":"40.078",Name:"Calcium",Symbol:"Ca","Melting Point":"839","Boiling Point":"1484",Density:"1.55",Earth:"3.65",Group:"2","Electron Configuration":"[Ar] 4s2"},{Number:"21",Type:"transition metal","Atomic Weight":"44.956",Name:"Scandium",Symbol:"Sc","Melting Point":"1539","Boiling Point":"2832",Density:"2.99",Earth:"",Group:"3","Electron Configuration":"[Ar] 3d1 4s2"},{Number:"22",Type:"transition metal","Atomic Weight":"47.867",Name:"Titanium",Symbol:"Ti","Melting Point":"1660","Boiling Point":"3287",Density:"4.54",Earth:"0.62",Group:"4","Electron Configuration":"[Ar] 3d2 4s2"},{Number:"23",Type:"transition metal","Atomic Weight":"50.942",Name:"Vanadium",Symbol:"V","Melting Point":"1890","Boiling Point":"3380",Density:"6.11",Earth:"",Group:"5","Electron Configuration":"[Ar] 3d3 4s2"},{Number:"24",Type:"transition metal","Atomic Weight":"51.996",Name:"Chromium",Symbol:"Cr","Melting Point":"1857","Boiling Point":"2672",Density:"7.19",Earth:"0.04",Group:"6","Electron Configuration":"[Ar] 3d5 4s1"},{Number:"25",Type:"transition metal","Atomic Weight":"54.938",Name:"Manganese",Symbol:"Mn","Melting Point":"1245","Boiling Point":"1962",Density:"7.43",Earth:"0.09",Group:"7","Electron Configuration":"[Ar] 3d5 4s2"},{Number:"26",Type:"transition metal","Atomic Weight":"55.845",Name:"Iron",Symbol:"Fe","Melting Point":"1535","Boiling Point":"2750",Density:"7.87",Earth:"5.05",Group:"8","Electron Configuration":"[Ar] 3d6 4s2"},{Number:"27",Type:"transition metal","Atomic Weight":"58.933",Name:"Cobalt",Symbol:"Co","Melting Point":"1495","Boiling Point":"2870",Density:"8.9",Earth:"",Group:"9","Electron Configuration":"[Ar] 3d7 4s2"},{Number:"28",Type:"transition metal","Atomic Weight":"58.693",Name:"Nickel",Symbol:"Ni","Melting Point":"1453","Boiling Point":"2732",Density:"8.9",Earth:"0.02",Group:"10","Electron Configuration":"[Ar] 3d8 4s2"},{Number:"29",Type:"transition metal","Atomic Weight":"63.546",Name:"Copper",Symbol:"Cu","Melting Point":"1083","Boiling Point":"2567",Density:"8.96",Earth:"",Group:"11","Electron Configuration":"[Ar] 3d10 4s1"},{Number:"30",Type:"transition metal","Atomic Weight":"65.39",Name:"Zinc",Symbol:"Zn","Melting Point":"420","Boiling Point":"907",Density:"7.13",Earth:"",Group:"12","Electron Configuration":"[Ar] 3d10 4s2"},{Number:"31",Type:"post transition metal","Atomic Weight":"69.723",Name:"Gallium",Symbol:"Ga","Melting Point":"30","Boiling Point":"2403",Density:"5.91",Earth:"",Group:"13","Electron Configuration":"[Ar] 3d10 4s2 4p1"},{Number:"32",Type:"metalloid","Atomic Weight":"72.64",Name:"Germanium",Symbol:"Ge","Melting Point":"937","Boiling Point":"2830",Density:"5.32",Earth:"",Group:"14","Electron Configuration":"[Ar] 3d10 4s2 4p2"},{Number:"33",Type:"metalloid","Atomic Weight":"74.922",Name:"Arsenic",Symbol:"As","Melting Point":"81","Boiling Point":"613",Density:"5.72",Earth:"",Group:"15","Electron Configuration":"[Ar] 3d10 4s2 4p3"},{Number:"34",Type:"nonmetal","Atomic Weight":"78.96",Name:"Selenium",Symbol:"Se","Melting Point":"217","Boiling Point":"685",Density:"4.79",Earth:"",Group:"16","Electron Configuration":"[Ar] 3d10 4s2 4p4"},{Number:"35",Type:"halogen","Atomic Weight":"79.904",Name:"Bromine",Symbol:"Br","Melting Point":"-7","Boiling Point":"59",Density:"3.12",Earth:"",Group:"17","Electron Configuration":"[Ar] 3d10 4s2 4p5"},{Number:"36",Type:"noble gas","Atomic Weight":"83.8",Name:"Krypton",Symbol:"Kr","Melting Point":"-157","Boiling Point":"-153",Density:"3.75",Earth:"",Group:"18","Electron Configuration":"[Ar] 3d10 4s2 4p6"},{Number:"37",Type:"alkali metal","Atomic Weight":"85.468",Name:"Rubidium",Symbol:"Rb","Melting Point":"39","Boiling Point":"688",Density:"1.63",Earth:"",Group:"1","Electron Configuration":"[Kr] 5s1"},{Number:"38",Type:"alkaline earth metal","Atomic Weight":"87.62",Name:"Strontium",Symbol:"Sr","Melting Point":"769","Boiling Point":"1384",Density:"2.54",Earth:"",Group:"2","Electron Configuration":"[Kr] 5s2"},{Number:"39",Type:"transition metal","Atomic Weight":"88.906",Name:"Yttrium",Symbol:"Y","Melting Point":"1523","Boiling Point":"3337",Density:"4.47",Earth:"",Group:"3","Electron Configuration":"[Kr] 4d1 5s2"},{Number:"40",Type:"transition metal","Atomic Weight":"91.224",Name:"Zirconium",Symbol:"Zr","Melting Point":"1852","Boiling Point":"4377",Density:"6.51",Earth:"0.03",Group:"4","Electron Configuration":"[Kr] 4d2 5s2"},{Number:"41",Type:"transition metal","Atomic Weight":"92.906",Name:"Niobium",Symbol:"Nb","Melting Point":"2468","Boiling Point":"4927",Density:"8.57",Earth:"",Group:"5","Electron Configuration":"[Kr] 4d4 5s1"},{Number:"42",Type:"transition metal","Atomic Weight":"95.94",Name:"Molybdenum",Symbol:"Mo","Melting Point":"2617","Boiling Point":"4612",Density:"10.22",Earth:"",Group:"6","Electron Configuration":"[Kr] 4d5 5s1"},{Number:"43",Type:"transition metal","Atomic Weight":"98",Name:"Technetium",Symbol:"Tc","Melting Point":"2200","Boiling Point":"4877",Density:"11.5",Earth:"",Group:"7","Electron Configuration":"[Kr] 4d5 5s2"},{Number:"44",Type:"transition metal","Atomic Weight":"101.07",Name:"Ruthenium",Symbol:"Ru","Melting Point":"2250","Boiling Point":"3900",Density:"12.37",Earth:"",Group:"8","Electron Configuration":"[Kr] 4d7 5s1"},{Number:"45",Type:"transition metal","Atomic Weight":"102.906",Name:"Rhodium",Symbol:"Rh","Melting Point":"1966","Boiling Point":"3727",Density:"12.41",Earth:"",Group:"9","Electron Configuration":"[Kr] 4d8 5s1"},{Number:"46",Type:"transition metal","Atomic Weight":"106.42",Name:"Palladium",Symbol:"Pd","Melting Point":"1552","Boiling Point":"2927",Density:"12.02",Earth:"",Group:"10","Electron Configuration":"[Kr] 4d10"},{Number:"47",Type:"transition metal","Atomic Weight":"107.868",Name:"Silver",Symbol:"Ag","Melting Point":"962","Boiling Point":"2212",Density:"10.5",Earth:"",Group:"11","Electron Configuration":"[Kr] 4d10 5s1"},{Number:"48",Type:"transition metal","Atomic Weight":"112.411",Name:"Cadmium",Symbol:"Cd","Melting Point":"321","Boiling Point":"765",Density:"8.65",Earth:"",Group:"12","Electron Configuration":"[Kr] 4d10 5s2"},{Number:"49",Type:"post transition metal","Atomic Weight":"114.818",Name:"Indium",Symbol:"In","Melting Point":"157","Boiling Point":"2000",Density:"7.31",Earth:"",Group:"13","Electron Configuration":"[Kr] 4d10 5s2 5p1"},{Number:"50",Type:"post transition metal","Atomic Weight":"118.71",Name:"Tin",Symbol:"Sn","Melting Point":"232","Boiling Point":"2270",Density:"7.31",Earth:"",Group:"14","Electron Configuration":"[Kr] 4d10 5s2 5p2"},{Number:"51",Type:"metalloid","Atomic Weight":"121.76",Name:"Antimony",Symbol:"Sb","Melting Point":"630","Boiling Point":"1750",Density:"6.68",Earth:"",Group:"15","Electron Configuration":"[Kr] 4d10 5s2 5p3"},{Number:"52",Type:"metalloid","Atomic Weight":"127.6",Name:"Tellurium",Symbol:"Te","Melting Point":"449","Boiling Point":"990",Density:"6.24",Earth:"",Group:"16","Electron Configuration":"[Kr] 4d10 5s2 5p4"},{Number:"53",Type:"halogen","Atomic Weight":"126.905",Name:"Iodine",Symbol:"I","Melting Point":"114","Boiling Point":"184",Density:"4.93",Earth:"",Group:"17","Electron Configuration":"[Kr] 4d10 5s2 5p5"},{Number:"54",Type:"noble gas","Atomic Weight":"131.293",Name:"Xenon",Symbol:"Xe","Melting Point":"-112","Boiling Point":"-108",Density:"5.9",Earth:"",Group:"18","Electron Configuration":"[Kr] 4d10 5s2 5p6"},{Number:"55",Type:"alkali metal","Atomic Weight":"132.906",Name:"Cesium",Symbol:"Cs","Melting Point":"29","Boiling Point":"678",Density:"1.87",Earth:"",Group:"1","Electron Configuration":"[Xe] 6s1"},{Number:"56",Type:"alkaline earth metal","Atomic Weight":"137.327",Name:"Barium",Symbol:"Ba","Melting Point":"725","Boiling Point":"1140",Density:"3.59",Earth:"0.05",Group:"2","Electron Configuration":"[Xe] 6s2"},{Number:"57",Type:"lanthanide","Atomic Weight":"138.906",Name:"Lanthanum",Symbol:"La","Melting Point":"920","Boiling Point":"3469",Density:"6.15",Earth:"",Group:"3","Electron Configuration":"[Xe] 5d1 6s2"},{Number:"58",Type:"lanthanide","Atomic Weight":"140.116",Name:"Cerium",Symbol:"Ce","Melting Point":"795","Boiling Point":"3257",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f1 5d1 6s2"},{Number:"59",Type:"lanthanide","Atomic Weight":"140.908",Name:"Praseodymium",Symbol:"Pr","Melting Point":"935","Boiling Point":"3127",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f3 6s2"},{Number:"60",Type:"lanthanide","Atomic Weight":"144.24",Name:"Neodymium",Symbol:"Nd","Melting Point":"1010","Boiling Point":"3127",Density:"7.01",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f4 6s2"},{Number:"61",Type:"lanthanide","Atomic Weight":"145",Name:"Promethium",Symbol:"Pm","Melting Point":"1100","Boiling Point":"3000",Density:"7.3",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f5 6s2"},{Number:"62",Type:"lanthanide","Atomic Weight":"150.36",Name:"Samarium",Symbol:"Sm","Melting Point":"1072","Boiling Point":"1900",Density:"7.52",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f6 6s2"},{Number:"63",Type:"lanthanide","Atomic Weight":"151.964",Name:"Europium",Symbol:"Eu","Melting Point":"822","Boiling Point":"1597",Density:"5.24",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 6s2"},{Number:"64",Type:"lanthanide","Atomic Weight":"157.25",Name:"Gadolinium",Symbol:"Gd","Melting Point":"1311","Boiling Point":"3233",Density:"7.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 5d1 6s2"},{Number:"65",Type:"lanthanide","Atomic Weight":"158.925",Name:"Terbium",Symbol:"Tb","Melting Point":"1360","Boiling Point":"3041",Density:"8.23",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f9 6s2"},{Number:"66",Type:"lanthanide","Atomic Weight":"162.5",Name:"Dysprosium",Symbol:"Dy","Melting Point":"1412","Boiling Point":"2562",Density:"8.55",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f10 6s2"},{Number:"67",Type:"lanthanide","Atomic Weight":"164.93",Name:"Holmium",Symbol:"Ho","Melting Point":"1470","Boiling Point":"2720",Density:"8.8",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f11 6s2"},{Number:"68",Type:"lanthanide","Atomic Weight":"167.259",Name:"Erbium",Symbol:"Er","Melting Point":"1522","Boiling Point":"2510",Density:"9.07",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f12 6s2"},{Number:"69",Type:"lanthanide","Atomic Weight":"168.934",Name:"Thulium",Symbol:"Tm","Melting Point":"1545","Boiling Point":"1727",Density:"9.32",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f13 6s2"},{Number:"70",Type:"lanthanide","Atomic Weight":"173.04",Name:"Ytterbium",Symbol:"Yb","Melting Point":"824","Boiling Point":"1466",Density:"6.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 6s2"},{Number:"71",Type:"lanthanide","Atomic Weight":"174.967",Name:"Lutetium",Symbol:"Lu","Melting Point":"1656","Boiling Point":"3315",Density:"9.84",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 5d1 6s2"},{Number:"72",Type:"transition metal","Atomic Weight":"178.49",Name:"Hafnium",Symbol:"Hf","Melting Point":"2150","Boiling Point":"5400",Density:"13.31",Earth:"",Group:"4","Electron Configuration":"[Xe] 4f14 5d2 6s2"},{Number:"73",Type:"transition metal","Atomic Weight":"180.948",Name:"Tantalum",Symbol:"Ta","Melting Point":"2996","Boiling Point":"5425",Density:"16.65",Earth:"",Group:"5","Electron Configuration":"[Xe] 4f14 5d3 6s2"},{Number:"74",Type:"transition metal","Atomic Weight":"183.84",Name:"Tungsten",Symbol:"W","Melting Point":"3410","Boiling Point":"5660",Density:"19.35",Earth:"",Group:"6","Electron Configuration":"[Xe] 4f14 5d4 6s2"},{Number:"75",Type:"transition metal","Atomic Weight":"186.207",Name:"Rhenium",Symbol:"Re","Melting Point":"3180","Boiling Point":"5627",Density:"21.04",Earth:"",Group:"7","Electron Configuration":"[Xe] 4f14 5d5 6s2"},{Number:"76",Type:"transition metal","Atomic Weight":"190.23",Name:"Osmium",Symbol:"Os","Melting Point":"3045","Boiling Point":"5027",Density:"22.6",Earth:"",Group:"8","Electron Configuration":"[Xe] 4f14 5d6 6s2"},{Number:"77",Type:"transition metal","Atomic Weight":"192.217",Name:"Iridium",Symbol:"Ir","Melting Point":"2410","Boiling Point":"4527",Density:"22.4",Earth:"",Group:"9","Electron Configuration":"[Xe] 4f14 5d7 6s2"},{Number:"78",Type:"transition metal","Atomic Weight":"195.078",Name:"Platinum",Symbol:"Pt","Melting Point":"1772","Boiling Point":"3827",Density:"21.45",Earth:"",Group:"10","Electron Configuration":"[Xe] 4f14 5d9 6s1"},{Number:"79",Type:"transition metal","Atomic Weight":"196.967",Name:"Gold",Symbol:"Au","Melting Point":"1064","Boiling Point":"2807",Density:"19.32",Earth:"",Group:"11","Electron Configuration":"[Xe] 4f14 5d10 6s1"},{Number:"80",Type:"transition metal","Atomic Weight":"200.59",Name:"Mercury",Symbol:"Hg","Melting Point":"-39","Boiling Point":"357",Density:"13.55",Earth:"",Group:"12","Electron Configuration":"[Xe] 4f14 5d10 6s2"},{Number:"81",Type:"post transition metal","Atomic Weight":"204.383",Name:"Thallium",Symbol:"Tl","Melting Point":"303","Boiling Point":"1457",Density:"11.85",Earth:"",Group:"13","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p1"},{Number:"82",Type:"post transition metal","Atomic Weight":"207.2",Name:"Lead",Symbol:"Pb","Melting Point":"327","Boiling Point":"1740",Density:"11.35",Earth:"",Group:"14","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p2"},{Number:"83",Type:"post transition metal","Atomic Weight":"208.98",Name:"Bismuth",Symbol:"Bi","Melting Point":"271","Boiling Point":"1560",Density:"9.75",Earth:"",Group:"15","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p3"},{Number:"84",Type:"metalloid","Atomic Weight":"209",Name:"Polonium",Symbol:"Po","Melting Point":"254","Boiling Point":"962",Density:"9.3",Earth:"",Group:"16","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p4"},{Number:"85",Type:"halogen","Atomic Weight":"210",Name:"Astatine",Symbol:"At","Melting Point":"302","Boiling Point":"337",Density:"0",Earth:"",Group:"17","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p5"},{Number:"86",Type:"noble gas","Atomic Weight":"222",Name:"Radon",Symbol:"Rn","Melting Point":"-71","Boiling Point":"-62",Density:"9.73",Earth:"",Group:"18","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p6"},{Number:"87",Type:"alkali metal","Atomic Weight":"223",Name:"Francium",Symbol:"Fr","Melting Point":"27","Boiling Point":"677",Density:"0",Earth:"",Group:"1","Electron Configuration":"[Rn] 7s1"},{Number:"88",Type:"alkaline earth metal","Atomic Weight":"226",Name:"Radium",Symbol:"Ra","Melting Point":"700","Boiling Point":"1737",Density:"5.5",Earth:"",Group:"2","Electron Configuration":"[Rn] 7s2"},{Number:"89",Type:"actinide","Atomic Weight":"227",Name:"Actinium",Symbol:"Ac","Melting Point":"1050","Boiling Point":"3200",Density:"10.07",Earth:"",Group:"3","Electron Configuration":"[Rn] 6d1 7s2"},{Number:"90",Type:"actinide","Atomic Weight":"232.038",Name:"Thorium",Symbol:"Th","Melting Point":"1750","Boiling Point":"4790",Density:"11.72",Earth:"",Group:"102","Electron Configuration":"[Rn] 6d2 7s2"},{Number:"91",Type:"actinide","Atomic Weight":"231.036",Name:"Protactinium",Symbol:"Pa","Melting Point":"1568","Boiling Point":"0",Density:"15.4",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f2 6d1 7s2"},{Number:"92",Type:"actinide","Atomic Weight":"238.029",Name:"Uranium",Symbol:"U","Melting Point":"1132","Boiling Point":"3818",Density:"18.95",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f3 6d1 7s2"},{Number:"93",Type:"actinide","Atomic Weight":"237",Name:"Neptunium",Symbol:"Np","Melting Point":"640","Boiling Point":"3902",Density:"20.2",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f4 6d1 7s2"},{Number:"94",Type:"actinide","Atomic Weight":"244",Name:"Plutonium",Symbol:"Pu","Melting Point":"640","Boiling Point":"3235",Density:"19.84",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f6 7s2"},{Number:"95",Type:"actinide","Atomic Weight":"243",Name:"Americium",Symbol:"Am","Melting Point":"994","Boiling Point":"2607",Density:"13.67",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f7 7s2"},{Number:"96",Type:"actinide","Atomic Weight":"247",Name:"Curium",Symbol:"Cm","Melting Point":"1340","Boiling Point":"0",Density:"13.5",Earth:"",Group:"102","Electron Configuration":""},{Number:"97",Type:"actinide","Atomic Weight":"247",Name:"Berkelium",Symbol:"Bk","Melting Point":"986","Boiling Point":"0",Density:"14.78",Earth:"",Group:"102","Electron Configuration":""},{Number:"98",Type:"actinide","Atomic Weight":"251",Name:"Californium",Symbol:"Cf","Melting Point":"900","Boiling Point":"0",Density:"15.1",Earth:"",Group:"102","Electron Configuration":""},{Number:"99",Type:"actinide","Atomic Weight":"252",Name:"Einsteinium",Symbol:"Es","Melting Point":"860","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"100",Type:"actinide","Atomic Weight":"257",Name:"Fermium",Symbol:"Fm","Melting Point":"1527","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"101",Type:"actinide","Atomic Weight":"258",Name:"Mendelevium",Symbol:"Md","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"102",Type:"actinide","Atomic Weight":"259",Name:"Nobelium",Symbol:"No","Melting Point":"827","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"103",Type:"actinide","Atomic Weight":"262",Name:"Lawrencium",Symbol:"Lr","Melting Point":"1627","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"104",Type:"transition metal","Atomic Weight":"261",Name:"Rutherfordium",Symbol:"Rf","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"4","Electron Configuration":""},{Number:"105",Type:"transition metal","Atomic Weight":"262",Name:"Dubnium",Symbol:"Db","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"5","Electron Configuration":""},{Number:"106",Type:"transition metal","Atomic Weight":"266",Name:"Seaborgium",Symbol:"Sg","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"6","Electron Configuration":""},{Number:"107",Type:"transition metal","Atomic Weight":"264",Name:"Bohrium",Symbol:"Bh","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"7","Electron Configuration":""},{Number:"108",Type:"transition metal","Atomic Weight":"277",Name:"Hassium",Symbol:"Hs","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"8","Electron Configuration":""},{Number:"109",Type:"transition metal","Atomic Weight":"268",Name:"Meitnerium",Symbol:"Mt","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"9","Electron Configuration":""}];var Ac=function(){return Ac=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{o==null||o.apply(null,[l,a])},style:{backgroundColor:t.has(a.Symbol)?e:r,textAlign:"center",position:"relative",display:"flex",flexDirection:"column",border:"1px solid black",borderRadius:3,height:"100%",justifyContent:"center",alignItems:"center"},children:E.jsx("div",{className:"symbol",style:{color:t.has(a.Symbol)?n:e,fontSize:"small",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a.Symbol})}):E.jsx("div",{})}}function Rre(t){const e=(a,l)=>{t.onClickElement(l.Symbol)},n=Su(),r=n.palette.background.default,i=n.palette.primary.main,s=n.palette.primary.contrastText,o=n.palette.primary.dark;return E.jsx(Go,{sx:{bgcolor:r},children:E.jsx(yre,{onClick:e,Element:Cre({availableElements:t.availableElements,backgroundColor:i,textColor:s,disabledColor:o}),squareSize:t.elementSize,margin:0})})}function Are(t){const e=t.availableElements,[n,r]=R.useState(null),i=Su(),s=Zz(i.breakpoints.down("lg")),o=f=>{r(f.currentTarget)},a=()=>{r(null)},l=!!n,c=l?"simple-popover":void 0,u=s?30:55;return E.jsxs(lo,{direction:"row",spacing:2,children:[E.jsxs(TU,{children:[E.jsx(AU,{id:"Element",children:"Element"}),E.jsxs($R,{sx:{minWidth:150},labelId:"Element",id:"Element",value:t.selectedElement,label:"Element",onChange:f=>t.setSelectedElement(f.target.value),children:[E.jsx(Nk,{value:"all",children:"All Elements"}),[...e].map((f,h)=>E.jsx(Nk,{value:f,children:f},h))]})]}),E.jsx(du,{"aria-describedby":c,variant:"outlined",sx:{textTransform:"none"},onClick:o,children:"Periodic Table"}),E.jsx(OU,{id:c,open:l,anchorEl:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:E.jsx(Rre,{availableElements:t.availableElements,onClickElement:f=>{t.availableElements.has(f)&&t.setSelectedElement(f),r(null)},elementSize:u})})]})}const ol=7,Kh=Ge(ko)(({theme:t})=>({[`&.${Sm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${Sm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Pre=Ge(Qb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function Ire(t){var n,r,i,s,o;const e=t.xasstandard===t.selected?"activeclicked":"";return E.jsxs(Pre,{onClick:()=>{t.setSelectedRow(t.key),t.updatePlot(t.xasstandard)},className:e,hover:!0,selected:t.selectedRow===t.key,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(Kh,{align:"left",children:((n=t.xasstandard)==null?void 0:n.element.symbol)??" "}),E.jsx(Kh,{align:"center",children:((r=t.xasstandard)==null?void 0:r.edge.name)??""}),E.jsx(Kh,{align:"center",children:((i=t.xasstandard)==null?void 0:i.sample.name)??""}),E.jsx(Kh,{align:"center",children:((s=t.xasstandard)==null?void 0:s.sample.prep)??""}),E.jsx(Kh,{align:"right",children:((o=t.xasstandard)==null?void 0:o.beamline.name)??""})]},t.key)}function Nre(t){const[e,n]=R.useState(-1),r=()=>{t.setOffset(t.offset+ol)},i=()=>{t.setOffset(t.offset-ol)},s=a=>{t.updatePlot(a.location),t.setSelectedStandard(a)};let o=[...t.standards];if(o.length<=ol)for(;o.lengthIre({key:l,xasstandard:a,selected:t.selectedStandard,updatePlot:s,selectedRow:e,setSelectedRow:n}))})]})}),E.jsxs(lo,{direction:"row",spacing:2,children:[E.jsx(du,{variant:"contained",disabled:t.offset===0,onClick:i,children:"<"}),E.jsx(du,{variant:"contained",disabled:t.standards.length"})]})]})}function kre(t){const[e,n]=R.useState(),[r,i]=R.useState("all"),[s,o]=R.useState(0),a=t.standards.map(f=>f.element.symbol),l=new Set(a);let c=[];r!="all"?c=t.standards.filter(f=>f.element.symbol==r):c=t.standards;const u=f=>{i(f),o(0)};return E.jsxs(lo,{spacing:2,children:[E.jsx(Are,{availableElements:l,selectedElement:r,setSelectedElement:u}),E.jsx(Nre,{standards:c,updatePlot:t.updatePlot,selectedStandard:e,setSelectedStandard:n,offset:s,setOffset:o}),e&&E.jsx(GR,{standard:e,showDownload:!0,showCompare:!0})]})}class Lre{constructor(e,n,r,i){Wt(this,"namespace");Wt(this,"tag");Wt(this,"value");Wt(this,"unit");this.namespace=e,this.tag=n,this.value=r,this.unit=i}}const ht=class ht{constructor(e,n,r,i,s,o,a,l,c,u){Wt(this,"element");Wt(this,"edge");Wt(this,"sample");Wt(this,"beamline");Wt(this,"date");Wt(this,"columns");Wt(this,"comments");Wt(this,"data");Wt(this,"raw");Wt(this,"id");this.element=e,this.edge=n,this.sample=r,this.beamline=i,this.date=s,this.columns=o,this.comments=a,this.data=l,this.raw=c,this.id=u}static parseFile(e,n){const r=e.split(` `),i={},s=[];let o=null,a=null,l=null,c=null;const u=[];let f=!1,h="";for(let y=0;yMath.log2(y/m.itrans[x]))),!("murefer"in m)&&"irefer"in m&&"i0"in m&&(m.murefer=m.i0.map((y,x)=>Math.log2(y/m.irefer[x]))),!("mufluor"in m)&&"ifluor"in m&&"i0"in m&&(m.mufluor=m.i0.map((y,x)=>m.ifluor[x]/y)),new ht(a,l,i,o,c,s,h,m,e,n)}static checkHeaderLine(e){const n=e.slice(1).trim();if(n.slice(0,3)!="XDI")throw new Error("XDI header not matched by: "+n)}muTrans(){return ht.MUSPEC[0]in this.data?this.data[ht.MUSPEC[0]]:null}muFluor(){return ht.MUSPEC[1]in this.data?this.data[ht.MUSPEC[1]]:null}energy(){return this.data[ht.ENERGY]}build_sample(){return this.sample?{name:"name"in this.sample?this.sample.name:"Unknown name",prep:"prep"in this.sample?this.sample.prep:"Unknown prep",formula:"formula"in this.sample?this.sample.formula:"Unknown formula"}:null}muRefer(){return ht.MUREFER in this.data?this.data[ht.MUREFER]:null}rawText(){return this.raw}checkValid(){if(!this.columns.includes(ht.ENERGY))throw new Error("Required column energy is missing!");const e=this.columns.includes(ht.I0);if(!(this.columns.includes(ht.IREFER)&&e)||!this.columns.includes(ht.MUREFER))throw new Error("Required reference data is missing!");const n=(s,o)=>o.some(a=>s.includes(a));return!!(n(this.columns,ht.MUSPEC)||n(this.columns,ht.ISPEC)&&e)}static parseMetadataLine(e){const n=e.slice(1).trim(),r=n.indexOf(ht.HEADER_SPLIT_TOKEN),i=n.slice(0,r).trim(),s=n.slice(r+1).trim(),o=i.indexOf("."),a=i.slice(0,o),l=i.slice(o+1).toLowerCase(),c=a===ht.COLUMN;let u=s,f=null;if(c){const h=s.split(" ");u=h[0].trim(),f=c&&h.length>1?h[1].trim():null}return new Rre(a,l,u,f)}};Wt(ht,"COMMENT_TOKEN","#"),Wt(ht,"HEADER_SPLIT_TOKEN",":"),Wt(ht,"NAMESPACE_SEPARATOR","."),Wt(ht,"SAMPLE","Sample"),Wt(ht,"ELEMENT","Element"),Wt(ht,"BEAMLINE","Beamline"),Wt(ht,"SCAN","Scan"),Wt(ht,"SYMBOL","symbol"),Wt(ht,"EDGE","edge"),Wt(ht,"PREP","prep"),Wt(ht,"STOICHIOMETRY","stoichiometry"),Wt(ht,"COLUMN","Column"),Wt(ht,"START_TIME","start_time"),Wt(ht,"NAME","name"),Wt(ht,"ENERGY","energy"),Wt(ht,"IREFER","irefer"),Wt(ht,"MUREFER","murefer"),Wt(ht,"TRANS","trans"),Wt(ht,"FLUOR","fluor"),Wt(ht,"MU","mu"),Wt(ht,"I","i"),Wt(ht,"I0","i0"),Wt(ht,"MUSPEC",[ht.MU+ht.TRANS,ht.MU+ht.FLUOR]),Wt(ht,"ISPEC",[ht.I+ht.TRANS,ht.I+ht.FLUOR]);let Ad=ht;const Are="/webxdiviewer/xdidata/db.json";function Pre(){const[t,e]=R.useState([]);return R.useEffect(()=>{Fn.get(Are).then(n=>{e(n.data)})},[]),t}const YR=R.createContext([]);function Ire(t){const{children:e}=t,n=Pre();return E.jsx(YR.Provider,{value:n,children:e})}function vr(t){const e=R.useRef(t);return e.current=t,R.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function KR(t){const e=vr(t);R.useEffect(()=>()=>{e.current()},[])}const kx=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function e6(t){const e=vr(t),n=R.useRef(0),r=R.useCallback(()=>{kx&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return KR(r),[R.useMemo(()=>{const i=(...s)=>{kx&&(r(),n.current=requestAnimationFrame(()=>{e.current(...s),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function Nre(t,e,n,r=!1){const i=R.useRef(),s=R.useRef();return KR(()=>{i.current&&(clearTimeout(i.current),i.current=void 0)}),R.useMemo(()=>{const o=(l,c)=>{s.current=void 0,t.apply(l,c),i.current=setTimeout(()=>{i.current=void 0,!r&&s.current&&(o(s.current.this,s.current.args),s.current=void 0)},n)},a=function(...l){if(i.current){s.current={args:l,this:this};return}o(this,l)};return Object.defineProperties(a,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__throttled__${n}`}}),a},[n,r,...e])}function t6(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function n6(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const kre=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Lre(t=!1){const e=R.useRef(t),n=R.useCallback(()=>e.current,[]);return R.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const Ore=t=>(t+1)%Number.MAX_SAFE_INTEGER;function r6(){const[,t]=R.useState(0);return R.useCallback(()=>{t(Ore)},[])}function Dre(t,e){return typeof t=="function"?t(e):t}const wM=Map.prototype;function Fre(t){const e=R.useRef(),n=r6();if(!e.current){const r=new Map(t);e.current=r,r.set=(...i)=>(wM.set.apply(r,i),n(),r),r.clear=(...i)=>{wM.clear.apply(r,i),n()},r.delete=(...i)=>{const s=wM.delete.apply(r,i);return n(),s}}return e.current}function Z4(t){const e=R.useRef();return R.useEffect(()=>{e.current=t}),e.current}function zre(t){const[e,n]=R.useState(t),[r,i]=e6(n);return KR(i),[e,r]}function r_(t=!1,e=!0){const[n,r]=R.useState(t),i=vr(e);return[n,R.useCallback(s=>{r(o=>s===void 0||i.current&&typeof s=="object"&&(s.constructor.name==="SyntheticBaseEvent"||typeof s._reactName=="string")?!o:!!Dre(s,o))},[])]}function Ure(t,e,n){const r=vr(e),i=vr(n);return R.useMemo(()=>{let s=t;return{get current(){return i.current===void 0?s:i.current(s)},set current(o){s=r.current===void 0?o:r.current(o)}}},[])}let ly;function Bre(){if(!kx)return;if(ly)return ly;const t=new Map,e=new ResizeObserver(n=>{var r;for(const i of n)(r=t.get(i.target))==null||r.forEach(s=>setTimeout(()=>{s(i)},0))});return ly={observer:e,subscribe(n,r){let i=t.get(n);i||(i=new Set,t.set(n,i),e.observe(n)),i.add(r)},unsubscribe(n,r){const i=t.get(n);i&&(i.delete(r),i.size===0&&(t.delete(n),e.unobserve(n)))}},ly}function jre(t,e,n=!0){const r=n&&Bre(),i=vr(e),s=t&&"current"in t?t.current:t;R.useEffect(()=>{const o=t&&"current"in t?t.current:t;if(!r||!o)return;let a=!0;const l=(...c)=>{a&&i.current(...c)};return r.subscribe(o,l),()=>{a=!1,r.unsubscribe(o,l)}},[s,r])}function Vre(t=!0){const[e,n]=R.useState(null),r=Ure(null,a=>(n(a),a)),[i,s]=R.useState(),[o]=e6(a=>{s({width:a.contentRect.width,height:a.contentRect.height})});return jre(e,o,t),[i,r]}function Xc(t,...e){const n=Lre(),r=vr(e[1]),i=R.useMemo(()=>function(...s){n()&&(typeof r.current=="function"?r.current.apply(this,s):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,s))},[]);R.useEffect(()=>{const s=$re(t)?t.current:t;if(!s)return;const o=e.slice(2);return t6(s,e[0],i,...o),()=>{n6(s,e[0],i,...o)}},[t,e[0]])}function $re(t){return t!==null&&typeof t=="object"&&kre(t,"current")}const Wre=t=>e=>e.key===t,Hre=kx?window:null;function i6(t,e,n=[],r={}){const{event:i="keydown",target:s=Hre,eventOptions:o}=r,a=vr(e),l=R.useMemo(()=>{const c=Wre(t);return function(u){c(u)&&a.current.call(this,u)}},n);Xc(s,i,l,o)}const Gre=["mousedown","touchstart"];function Xre(t,e,n=Gre){const r=vr(e),i=vr(t);R.useEffect(()=>{function s(o){if(!i.current.current)return;const{target:a}=o,l=r.current;(!a||a&&!i.current.current.contains(a))&&l.call(this,o)}for(const o of n)t6(document,o,s,{passive:!0});return()=>{for(const o of n)n6(document,o,s,{passive:!0})}},[...n])}function Bv(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function qre(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function s6(t){let e,n,r;t.length!==2?(e=Bv,n=(a,l)=>Bv(t(a),l),r=(a,l)=>t(a)-l):(e=t===Bv||t===qre?t:Yre,n=t,r=t);function i(a,l,c=0,u=a.length){if(c>>1;n(a[f],l)<0?c=f+1:u=f}while(c>>1;n(a[f],l)<=0?c=f+1:u=f}while(cc&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:i,center:o,right:s}}function Yre(){return 0}function Kre(t){return t===null?NaN:+t}const Zre=s6(Bv),Jre=Zre.right;s6(Kre).center;const Qre=Math.sqrt(50),eie=Math.sqrt(10),tie=Math.sqrt(2);function Lx(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=Qre?10:s>=eie?5:s>=tie?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/o,a=Math.round(t*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,i)*o,a=Math.round(t/c),l=Math.round(e/c),a*ce&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const a=s-i+1,l=new Array(a);if(r)if(o<0)for(let c=0;c=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ox(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Pd(t){return t=Ox(Math.abs(t)),t?t[1]:NaN}function rie(t,e){return function(n,r){for(var i=n.length,s=[],o=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[o=(o+1)%t.length];return s.reverse().join(e)}}function iie(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var sie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Tm(t){if(!(e=sie.exec(t)))throw new Error("invalid format: "+t);var e;return new ZR({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Tm.prototype=ZR.prototype;function ZR(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}ZR.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function oie(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var l6;function aie(t,e){var n=Ox(t,e);if(!n)return t+"";var r=n[0],i=n[1],s=i-(l6=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ox(t,Math.max(0,e+s-1))[0]}function J4(t,e){var n=Ox(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Q4={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:nie,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>J4(t*100,e),r:J4,s:aie,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ek(t){return t}var tk=Array.prototype.map,nk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lie(t){var e=t.grouping===void 0||t.thousands===void 0?ek:rie(tk.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?ek:iie(tk.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=Tm(f);var h=f.fill,m=f.align,y=f.sign,x=f.symbol,v=f.zero,g=f.width,b=f.comma,_=f.precision,S=f.trim,C=f.type;C==="n"?(b=!0,C="g"):Q4[C]||(_===void 0&&(_=12),S=!0,C="g"),(v||h==="0"&&m==="=")&&(v=!0,h="0",m="=");var P=x==="$"?n:x==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",A=x==="$"?r:/[%p]/.test(C)?o:"",L=Q4[C],k=/[defgprs%]/.test(C);_=_===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function T(N){var z=P,D=A,B,G,X;if(C==="c")D=L(N)+D,N="";else{N=+N;var Z=N<0||1/N<0;if(N=isNaN(N)?l:L(Math.abs(N),_),S&&(N=oie(N)),Z&&+N==0&&y!=="+"&&(Z=!1),z=(Z?y==="("?y:a:y==="-"||y==="("?"":y)+z,D=(C==="s"?nk[8+l6/3]:"")+D+(Z&&y==="("?")":""),k){for(B=-1,G=N.length;++BX||X>57){D=(X===46?i+N.slice(B+1):N.slice(B))+D,N=N.slice(0,B);break}}}b&&!v&&(N=e(N,1/0));var F=z.length+N.length+D.length,q=F>1)+z+N+D+q.slice(F);break;default:N=q+z+N+D;break}return s(N)}return T.toString=function(){return f+""},T}function u(f,h){var m=c((f=Tm(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(Pd(h)/3)))*3,x=Math.pow(10,-y),v=nk[8+y/3];return function(g){return m(x*g)+v}}return{format:c,formatPrefix:u}}var cy,Jo,c6;cie({thousands:",",grouping:[3],currency:["$",""]});function cie(t){return cy=lie(t),Jo=cy.format,c6=cy.formatPrefix,cy}function uie(t){return Math.max(0,-Pd(Math.abs(t)))}function fie(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Pd(e)/3)))*3-Pd(Math.abs(t)))}function die(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Pd(e)-Pd(t))+1}function hie(t){for(var e=new Array(t),n=0;nMath.log2(y/m.itrans[x]))),!("murefer"in m)&&"irefer"in m&&"i0"in m&&(m.murefer=m.i0.map((y,x)=>Math.log2(y/m.irefer[x]))),!("mufluor"in m)&&"ifluor"in m&&"i0"in m&&(m.mufluor=m.i0.map((y,x)=>m.ifluor[x]/y)),new ht(a,l,i,o,c,s,h,m,e,n)}static checkHeaderLine(e){const n=e.slice(1).trim();if(n.slice(0,3)!="XDI")throw new Error("XDI header not matched by: "+n)}muTrans(){return ht.MUSPEC[0]in this.data?this.data[ht.MUSPEC[0]]:null}muFluor(){return ht.MUSPEC[1]in this.data?this.data[ht.MUSPEC[1]]:null}energy(){return this.data[ht.ENERGY]}build_sample(){return this.sample?{name:"name"in this.sample?this.sample.name:"Unknown name",prep:"prep"in this.sample?this.sample.prep:"Unknown prep",formula:"formula"in this.sample?this.sample.formula:"Unknown formula"}:null}muRefer(){return ht.MUREFER in this.data?this.data[ht.MUREFER]:null}rawText(){return this.raw}checkValid(){if(!this.columns.includes(ht.ENERGY))throw new Error("Required column energy is missing!");const e=this.columns.includes(ht.I0);if(!(this.columns.includes(ht.IREFER)&&e)||!this.columns.includes(ht.MUREFER))throw new Error("Required reference data is missing!");const n=(s,o)=>o.some(a=>s.includes(a));return!!(n(this.columns,ht.MUSPEC)||n(this.columns,ht.ISPEC)&&e)}static parseMetadataLine(e){const n=e.slice(1).trim(),r=n.indexOf(ht.HEADER_SPLIT_TOKEN),i=n.slice(0,r).trim(),s=n.slice(r+1).trim(),o=i.indexOf("."),a=i.slice(0,o),l=i.slice(o+1).toLowerCase(),c=a===ht.COLUMN;let u=s,f=null;if(c){const h=s.split(" ");u=h[0].trim(),f=c&&h.length>1?h[1].trim():null}return new Lre(a,l,u,f)}};Wt(ht,"COMMENT_TOKEN","#"),Wt(ht,"HEADER_SPLIT_TOKEN",":"),Wt(ht,"NAMESPACE_SEPARATOR","."),Wt(ht,"SAMPLE","Sample"),Wt(ht,"ELEMENT","Element"),Wt(ht,"BEAMLINE","Beamline"),Wt(ht,"SCAN","Scan"),Wt(ht,"SYMBOL","symbol"),Wt(ht,"EDGE","edge"),Wt(ht,"PREP","prep"),Wt(ht,"STOICHIOMETRY","stoichiometry"),Wt(ht,"COLUMN","Column"),Wt(ht,"START_TIME","start_time"),Wt(ht,"NAME","name"),Wt(ht,"ENERGY","energy"),Wt(ht,"IREFER","irefer"),Wt(ht,"MUREFER","murefer"),Wt(ht,"TRANS","trans"),Wt(ht,"FLUOR","fluor"),Wt(ht,"MU","mu"),Wt(ht,"I","i"),Wt(ht,"I0","i0"),Wt(ht,"MUSPEC",[ht.MU+ht.TRANS,ht.MU+ht.FLUOR]),Wt(ht,"ISPEC",[ht.I+ht.TRANS,ht.I+ht.FLUOR]);let Pd=ht;const Ore="/webxdiviewer/xdidata/db.json";function Dre(){const[t,e]=R.useState([]);return R.useEffect(()=>{Nn.get(Ore).then(n=>{e(n.data)})},[]),t}const XR=R.createContext([]);function Fre(t){const{children:e}=t,n=Dre();return E.jsx(XR.Provider,{value:n,children:e})}function vr(t){const e=R.useRef(t);return e.current=t,R.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function qR(t){const e=vr(t);R.useEffect(()=>()=>{e.current()},[])}const kx=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function i6(t){const e=vr(t),n=R.useRef(0),r=R.useCallback(()=>{kx&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return qR(r),[R.useMemo(()=>{const i=(...s)=>{kx&&(r(),n.current=requestAnimationFrame(()=>{e.current(...s),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function zre(t,e,n,r=!1){const i=R.useRef(),s=R.useRef();return qR(()=>{i.current&&(clearTimeout(i.current),i.current=void 0)}),R.useMemo(()=>{const o=(l,c)=>{s.current=void 0,t.apply(l,c),i.current=setTimeout(()=>{i.current=void 0,!r&&s.current&&(o(s.current.this,s.current.args),s.current=void 0)},n)},a=function(...l){if(i.current){s.current={args:l,this:this};return}o(this,l)};return Object.defineProperties(a,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__throttled__${n}`}}),a},[n,r,...e])}function s6(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function o6(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const Ure=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Bre(t=!1){const e=R.useRef(t),n=R.useCallback(()=>e.current,[]);return R.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const jre=t=>(t+1)%Number.MAX_SAFE_INTEGER;function a6(){const[,t]=R.useState(0);return R.useCallback(()=>{t(jre)},[])}function Vre(t,e){return typeof t=="function"?t(e):t}const wM=Map.prototype;function $re(t){const e=R.useRef(),n=a6();if(!e.current){const r=new Map(t);e.current=r,r.set=(...i)=>(wM.set.apply(r,i),n(),r),r.clear=(...i)=>{wM.clear.apply(r,i),n()},r.delete=(...i)=>{const s=wM.delete.apply(r,i);return n(),s}}return e.current}function Zk(t){const e=R.useRef();return R.useEffect(()=>{e.current=t}),e.current}function Wre(t){const[e,n]=R.useState(t),[r,i]=i6(n);return qR(i),[e,r]}function r_(t=!1,e=!0){const[n,r]=R.useState(t),i=vr(e);return[n,R.useCallback(s=>{r(o=>s===void 0||i.current&&typeof s=="object"&&(s.constructor.name==="SyntheticBaseEvent"||typeof s._reactName=="string")?!o:!!Vre(s,o))},[])]}function Hre(t,e,n){const r=vr(e),i=vr(n);return R.useMemo(()=>{let s=t;return{get current(){return i.current===void 0?s:i.current(s)},set current(o){s=r.current===void 0?o:r.current(o)}}},[])}let ly;function Gre(){if(!kx)return;if(ly)return ly;const t=new Map,e=new ResizeObserver(n=>{var r;for(const i of n)(r=t.get(i.target))==null||r.forEach(s=>setTimeout(()=>{s(i)},0))});return ly={observer:e,subscribe(n,r){let i=t.get(n);i||(i=new Set,t.set(n,i),e.observe(n)),i.add(r)},unsubscribe(n,r){const i=t.get(n);i&&(i.delete(r),i.size===0&&(t.delete(n),e.unobserve(n)))}},ly}function Xre(t,e,n=!0){const r=n&&Gre(),i=vr(e),s=t&&"current"in t?t.current:t;R.useEffect(()=>{const o=t&&"current"in t?t.current:t;if(!r||!o)return;let a=!0;const l=(...c)=>{a&&i.current(...c)};return r.subscribe(o,l),()=>{a=!1,r.unsubscribe(o,l)}},[s,r])}function qre(t=!0){const[e,n]=R.useState(null),r=Hre(null,a=>(n(a),a)),[i,s]=R.useState(),[o]=i6(a=>{s({width:a.contentRect.width,height:a.contentRect.height})});return Xre(e,o,t),[i,r]}function Xc(t,...e){const n=Bre(),r=vr(e[1]),i=R.useMemo(()=>function(...s){n()&&(typeof r.current=="function"?r.current.apply(this,s):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,s))},[]);R.useEffect(()=>{const s=Yre(t)?t.current:t;if(!s)return;const o=e.slice(2);return s6(s,e[0],i,...o),()=>{o6(s,e[0],i,...o)}},[t,e[0]])}function Yre(t){return t!==null&&typeof t=="object"&&Ure(t,"current")}const Kre=t=>e=>e.key===t,Zre=kx?window:null;function l6(t,e,n=[],r={}){const{event:i="keydown",target:s=Zre,eventOptions:o}=r,a=vr(e),l=R.useMemo(()=>{const c=Kre(t);return function(u){c(u)&&a.current.call(this,u)}},n);Xc(s,i,l,o)}const Jre=["mousedown","touchstart"];function Qre(t,e,n=Jre){const r=vr(e),i=vr(t);R.useEffect(()=>{function s(o){if(!i.current.current)return;const{target:a}=o,l=r.current;(!a||a&&!i.current.current.contains(a))&&l.call(this,o)}for(const o of n)s6(document,o,s,{passive:!0});return()=>{for(const o of n)o6(document,o,s,{passive:!0})}},[...n])}function Bv(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function eie(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function c6(t){let e,n,r;t.length!==2?(e=Bv,n=(a,l)=>Bv(t(a),l),r=(a,l)=>t(a)-l):(e=t===Bv||t===eie?t:tie,n=t,r=t);function i(a,l,c=0,u=a.length){if(c>>1;n(a[f],l)<0?c=f+1:u=f}while(c>>1;n(a[f],l)<=0?c=f+1:u=f}while(cc&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:i,center:o,right:s}}function tie(){return 0}function nie(t){return t===null?NaN:+t}const rie=c6(Bv),iie=rie.right;c6(nie).center;const sie=Math.sqrt(50),oie=Math.sqrt(10),aie=Math.sqrt(2);function Lx(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=sie?10:s>=oie?5:s>=aie?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/o,a=Math.round(t*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,i)*o,a=Math.round(t/c),l=Math.round(e/c),a*ce&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const a=s-i+1,l=new Array(a);if(r)if(o<0)for(let c=0;c=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ox(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Id(t){return t=Ox(Math.abs(t)),t?t[1]:NaN}function cie(t,e){return function(n,r){for(var i=n.length,s=[],o=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[o=(o+1)%t.length];return s.reverse().join(e)}}function uie(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var fie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Tm(t){if(!(e=fie.exec(t)))throw new Error("invalid format: "+t);var e;return new YR({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Tm.prototype=YR.prototype;function YR(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}YR.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function die(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var d6;function hie(t,e){var n=Ox(t,e);if(!n)return t+"";var r=n[0],i=n[1],s=i-(d6=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ox(t,Math.max(0,e+s-1))[0]}function Jk(t,e){var n=Ox(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Qk={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:lie,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Jk(t*100,e),r:Jk,s:hie,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function e4(t){return t}var t4=Array.prototype.map,n4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pie(t){var e=t.grouping===void 0||t.thousands===void 0?e4:cie(t4.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?e4:uie(t4.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=Tm(f);var h=f.fill,m=f.align,y=f.sign,x=f.symbol,v=f.zero,g=f.width,b=f.comma,_=f.precision,S=f.trim,C=f.type;C==="n"?(b=!0,C="g"):Qk[C]||(_===void 0&&(_=12),S=!0,C="g"),(v||h==="0"&&m==="=")&&(v=!0,h="0",m="=");var P=x==="$"?n:x==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",A=x==="$"?r:/[%p]/.test(C)?o:"",L=Qk[C],k=/[defgprs%]/.test(C);_=_===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function T(N){var z=P,D=A,B,G,X;if(C==="c")D=L(N)+D,N="";else{N=+N;var Z=N<0||1/N<0;if(N=isNaN(N)?l:L(Math.abs(N),_),S&&(N=die(N)),Z&&+N==0&&y!=="+"&&(Z=!1),z=(Z?y==="("?y:a:y==="-"||y==="("?"":y)+z,D=(C==="s"?n4[8+d6/3]:"")+D+(Z&&y==="("?")":""),k){for(B=-1,G=N.length;++BX||X>57){D=(X===46?i+N.slice(B+1):N.slice(B))+D,N=N.slice(0,B);break}}}b&&!v&&(N=e(N,1/0));var F=z.length+N.length+D.length,q=F>1)+z+N+D+q.slice(F);break;default:N=q+z+N+D;break}return s(N)}return T.toString=function(){return f+""},T}function u(f,h){var m=c((f=Tm(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(Id(h)/3)))*3,x=Math.pow(10,-y),v=n4[8+y/3];return function(g){return m(x*g)+v}}return{format:c,formatPrefix:u}}var cy,Jo,h6;mie({thousands:",",grouping:[3],currency:["$",""]});function mie(t){return cy=pie(t),Jo=cy.format,h6=cy.formatPrefix,cy}function gie(t){return Math.max(0,-Id(Math.abs(t)))}function yie(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Id(e)/3)))*3-Id(Math.abs(t)))}function vie(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Id(e)-Id(t))+1}function xie(t){for(var e=new Array(t),n=0;n * @license MIT - */var mie=function(t){return t!=null&&(u6(t)||gie(t)||!!t._isBuffer)};function u6(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function gie(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&u6(t.slice(0,0))}var yie=pie,vie=mie,xie=typeof Float64Array<"u";function bie(t,e){return t[0]-e[0]}function _ie(){var t=this.stride,e=new Array(t.length),n;for(n=0;nMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):e===3&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+n+"_set("+o.join(",")+",v){"),r?i.push("return this.data.set("+a+",v)}"):i.push("return this.data["+a+"]=v}"),i.push("proto.get=function "+n+"_get("+o.join(",")+"){"),r?i.push("return this.data.get("+a+")}"):i.push("return this.data["+a+"]}"),i.push("proto.index=function "+n+"_index(",o.join(),"){return "+a+"}"),i.push("proto.hi=function "+n+"_hi("+o.join(",")+"){return new "+n+"(this.data,"+s.map(function(v){return["(typeof i",v,"!=='number'||i",v,"<0)?this.shape[",v,"]:i",v,"|0"].join("")}).join(",")+","+s.map(function(v){return"this.stride["+v+"]"}).join(",")+",this.offset)}");var u=s.map(function(v){return"a"+v+"=this.shape["+v+"]"}),f=s.map(function(v){return"c"+v+"=this.stride["+v+"]"});i.push("proto.lo=function "+n+"_lo("+o.join(",")+"){var b=this.offset,d=0,"+u.join(",")+","+f.join(","));for(var h=0;h=0){d=i"+h+"|0;b+=c"+h+"*d;a"+h+"-=d}");i.push("return new "+n+"(this.data,"+s.map(function(v){return"a"+v}).join(",")+","+s.map(function(v){return"c"+v}).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+o.join(",")+"){var "+s.map(function(v){return"a"+v+"=this.shape["+v+"]"}).join(",")+","+s.map(function(v){return"b"+v+"=this.stride["+v+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var h=0;h=0){c=(c+this.stride["+h+"]*i"+h+")|0}else{a.push(this.shape["+h+"]);b.push(this.stride["+h+"])}");i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+s.map(function(v){return"shape["+v+"]"}).join(",")+","+s.map(function(v){return"stride["+v+"]"}).join(",")+",offset)}");var x=new Function("CTOR_LIST","ORDER",i.join(` -`));return x(Dx[t],_ie)}function Sie(t){if(vie(t))return"buffer";if(xie)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(t)?"array":"generic"}var Dx={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};function Mie(t,e,n,r){if(t===void 0){var c=Dx.array[0];return c([])}else typeof t=="number"&&(t=[t]);e===void 0&&(e=[t.length]);var i=e.length;if(n===void 0){n=new Array(i);for(var s=i-1,o=1;s>=0;--s)n[s]=o,o*=e[s]}if(r===void 0){r=0;for(var s=0;s0,o=[],a=[],l=0,c=0,u,f;for(u=0;u0&&o.push("var "+a.join(",")),u=r-1;u>=0;--u)l=t[u],o.push(["for(i",u,"=0;i",u,"0&&o.push(["index[",c,"]-=s",c].join("")),o.push(["++index[",l,"]"].join(""))),o.push("}")}return o.join(` -`)}function Nie(t,e,n,r){for(var i=e.length,s=n.arrayArgs.length,o=n.blockSize,a=n.indexArgs.length>0,l=[],c=0;c0;){"].join("")),l.push(["if(j",c,"<",o,"){"].join("")),l.push(["s",e[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",e[c],"=",o].join("")),l.push(["j",c,"-=",o,"}"].join("")),a&&l.push(["index[",e[c],"]=j",c].join(""));for(var c=0;cMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):e===3&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+n+"_set("+o.join(",")+",v){"),r?i.push("return this.data.set("+a+",v)}"):i.push("return this.data["+a+"]=v}"),i.push("proto.get=function "+n+"_get("+o.join(",")+"){"),r?i.push("return this.data.get("+a+")}"):i.push("return this.data["+a+"]}"),i.push("proto.index=function "+n+"_index(",o.join(),"){return "+a+"}"),i.push("proto.hi=function "+n+"_hi("+o.join(",")+"){return new "+n+"(this.data,"+s.map(function(v){return["(typeof i",v,"!=='number'||i",v,"<0)?this.shape[",v,"]:i",v,"|0"].join("")}).join(",")+","+s.map(function(v){return"this.stride["+v+"]"}).join(",")+",this.offset)}");var u=s.map(function(v){return"a"+v+"=this.shape["+v+"]"}),f=s.map(function(v){return"c"+v+"=this.stride["+v+"]"});i.push("proto.lo=function "+n+"_lo("+o.join(",")+"){var b=this.offset,d=0,"+u.join(",")+","+f.join(","));for(var h=0;h=0){d=i"+h+"|0;b+=c"+h+"*d;a"+h+"-=d}");i.push("return new "+n+"(this.data,"+s.map(function(v){return"a"+v}).join(",")+","+s.map(function(v){return"c"+v}).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+o.join(",")+"){var "+s.map(function(v){return"a"+v+"=this.shape["+v+"]"}).join(",")+","+s.map(function(v){return"b"+v+"=this.stride["+v+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var h=0;h=0){c=(c+this.stride["+h+"]*i"+h+")|0}else{a.push(this.shape["+h+"]);b.push(this.stride["+h+"])}");i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+s.map(function(v){return"shape["+v+"]"}).join(",")+","+s.map(function(v){return"stride["+v+"]"}).join(",")+",offset)}");var x=new Function("CTOR_LIST","ORDER",i.join(` +`));return x(Dx[t],Cie)}function Aie(t){if(Mie(t))return"buffer";if(Eie)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(t)?"array":"generic"}var Dx={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};function Pie(t,e,n,r){if(t===void 0){var c=Dx.array[0];return c([])}else typeof t=="number"&&(t=[t]);e===void 0&&(e=[t.length]);var i=e.length;if(n===void 0){n=new Array(i);for(var s=i-1,o=1;s>=0;--s)n[s]=o,o*=e[s]}if(r===void 0){r=0;for(var s=0;s0,o=[],a=[],l=0,c=0,u,f;for(u=0;u0&&o.push("var "+a.join(",")),u=r-1;u>=0;--u)l=t[u],o.push(["for(i",u,"=0;i",u,"0&&o.push(["index[",c,"]-=s",c].join("")),o.push(["++index[",l,"]"].join(""))),o.push("}")}return o.join(` +`)}function zie(t,e,n,r){for(var i=e.length,s=n.arrayArgs.length,o=n.blockSize,a=n.indexArgs.length>0,l=[],c=0;c0;){"].join("")),l.push(["if(j",c,"<",o,"){"].join("")),l.push(["s",e[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",e[c],"=",o].join("")),l.push(["j",c,"-=",o,"}"].join("")),a&&l.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}function Oie(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,r=new Array(t.arrayArgs.length),i=new Array(t.arrayArgs.length),s=0;s0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var v=new Array(n),s=0;s0&&y.push("var "+x.join(","));for(var s=0;s3&&y.push(SM(t.pre,t,i));var S=SM(t.body,t,i),C=kie(u);C3&&y.push(SM(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: +`).trim()}function Bie(t){for(var e=new Array(t.length),n=!0,r=0;r0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}function jie(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,r=new Array(t.arrayArgs.length),i=new Array(t.arrayArgs.length),s=0;s0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var v=new Array(n),s=0;s0&&y.push("var "+x.join(","));for(var s=0;s3&&y.push(SM(t.pre,t,i));var S=SM(t.body,t,i),C=Uie(u);C3&&y.push(SM(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: `+y.join(` `)+` -----------`);var P=[t.funcName||"unnamed","_cwise_loop_",r[0].join("s"),"m",C,Lie(i)].join(""),A=new Function(["function ",P,"(",m.join(","),"){",y.join(` -`),"} return ",P].join(""));return A()}var Die=Oie,Fie=Die;function zie(t){var e=["'use strict'","var CACHED={}"],n=[],r=t.funcName+"_cwise_thunk";e.push(["return function ",r,"(",t.shimArgs.join(","),"){"].join(""));for(var i=[],s=[],o=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],a=[],l=[],c=0;c0&&(a.push("array"+t.arrayArgs[0]+".shape.length===array"+u+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),l.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+u+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+a.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;c0&&(a.push("array"+t.arrayArgs[0]+".shape.length===array"+u+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),l.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+u+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+a.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var c=0;c0)throw new Error("cwise: pre() block may not reference array args");if(r0)throw new Error("cwise: post() block may not reference array args")}else if(i==="scalar")e.scalarArgs.push(r),e.shimArgs.push("scalar"+r);else if(i==="index"){if(e.indexArgs.push(r),r0)throw new Error("cwise: pre() block may not reference array index");if(r0)throw new Error("cwise: post() block may not reference array index")}else if(i==="shape"){if(e.shapeArgs.push(r),rn.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,Bie(e)}var $ie=Vie;(function(t){var e=$ie,n={body:"",args:[],thisVars:[],localVars:[]};function r(h){if(!h)return n;for(var m=0;m>",rrshift:">>>"};(function(){for(var h in o){var m=o[h];t[h]=s({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"eq"]=s({args:["array","array"],body:{args:["a","b"],body:"a"+m+"=b"},rvalue:!0,funcName:h+"eq"}),t[h+"s"]=s({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"seq"]=s({args:["array","scalar"],body:{args:["a","s"],body:"a"+m+"=s"},rvalue:!0,funcName:h+"seq"})}})();var a={not:"!",bnot:"~",neg:"-",recip:"1.0/"};(function(){for(var h in a){var m=a[h];t[h]=s({args:["array","array"],body:{args:["a","b"],body:"a="+m+"b"},funcName:h}),t[h+"eq"]=s({args:["array"],body:{args:["a"],body:"a="+m+"a"},rvalue:!0,count:2,funcName:h+"eq"})}})();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};(function(){for(var h in l){var m=l[h];t[h]=s({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"s"]=s({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"eq"]=s({args:["array","array"],body:{args:["a","b"],body:"a=a"+m+"b"},rvalue:!0,count:2,funcName:h+"eq"}),t[h+"seq"]=s({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+m+"s"},rvalue:!0,count:2,funcName:h+"seq"})}})();var c=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];(function(){for(var h=0;hthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),t.norm1=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),t.sup=e({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),t.inf=e({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),t.random=s({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),t.assign=s({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=s({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),t.equals=e({args:["array","array"],pre:n,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})})(Tie);/** +`));return f($ie.bind(void 0,t))}var Hie=Wie,Gie=Hie;function Xie(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function qie(t){var e=new Xie;e.pre=t.pre,e.body=t.body,e.post=t.post;var n=t.args.slice(0);e.argTypes=n;for(var r=0;r0)throw new Error("cwise: pre() block may not reference array args");if(r0)throw new Error("cwise: post() block may not reference array args")}else if(i==="scalar")e.scalarArgs.push(r),e.shimArgs.push("scalar"+r);else if(i==="index"){if(e.indexArgs.push(r),r0)throw new Error("cwise: pre() block may not reference array index");if(r0)throw new Error("cwise: post() block may not reference array index")}else if(i==="shape"){if(e.shapeArgs.push(r),rn.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,Gie(e)}var Yie=qie;(function(t){var e=Yie,n={body:"",args:[],thisVars:[],localVars:[]};function r(h){if(!h)return n;for(var m=0;m>",rrshift:">>>"};(function(){for(var h in o){var m=o[h];t[h]=s({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"eq"]=s({args:["array","array"],body:{args:["a","b"],body:"a"+m+"=b"},funcName:h+"eq"}),t[h+"s"]=s({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"seq"]=s({args:["array","scalar"],body:{args:["a","s"],body:"a"+m+"=s"},funcName:h+"seq"})}})();var a={not:"!",bnot:"~",neg:"-",recip:"1.0/"};(function(){for(var h in a){var m=a[h];t[h]=s({args:["array","array"],body:{args:["a","b"],body:"a="+m+"b"},funcName:h}),t[h+"eq"]=s({args:["array"],body:{args:["a"],body:"a="+m+"a"},funcName:h+"eq"})}})();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};(function(){for(var h in l){var m=l[h];t[h]=s({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"s"]=s({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"eq"]=s({args:["array","array"],body:{args:["a","b"],body:"a=a"+m+"b"},funcName:h+"eq"}),t[h+"seq"]=s({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+m+"s"},funcName:h+"seq"})}})();var c=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];(function(){for(var h=0;hthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),t.norm1=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),t.sup=e({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),t.inf=e({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),t.random=s({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),t.assign=s({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=s({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),t.equals=e({args:["array","array"],pre:n,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})})(Nie);/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT - */const i_="173",Wie={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Hie={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},h6=0,gT=1,p6=2,Gie=3,m6=0,s_=1,Dp=2,Qs=3,Fa=0,di=1,ro=2,Ra=0,qc=1,yT=2,vT=3,xT=4,g6=5,xl=100,y6=101,v6=102,x6=103,b6=104,_6=200,w6=201,S6=202,M6=203,Fx=204,zx=205,E6=206,T6=207,C6=208,R6=209,A6=210,P6=211,I6=212,N6=213,k6=214,Ux=0,Bx=1,jx=2,hu=3,Vx=4,$x=5,Wx=6,Hx=7,mg=0,L6=1,O6=2,Bo=0,D6=1,F6=2,z6=3,JR=4,U6=5,B6=6,j6=7,bT="attached",V6="detached",gg=300,za=301,Fl=302,Cm=303,Rm=304,rh=306,Am=1e3,Li=1001,Pm=1002,Sr=1003,QR=1004,Xie=1004,Yf=1005,qie=1005,cr=1006,Fp=1007,Yie=1007,Lo=1008,Kie=1008,$i=1009,eA=1010,tA=1011,Id=1012,o_=1013,Ua=1014,li=1015,Au=1016,a_=1017,l_=1018,pu=1020,nA=35902,rA=1021,iA=1022,Ir=1023,sA=1024,oA=1025,Yc=1026,mu=1027,yg=1028,vg=1029,aA=1030,c_=1031,Zie=1032,u_=1033,zp=33776,Up=33777,Bp=33778,jp=33779,Gx=35840,Xx=35841,qx=35842,Yx=35843,Kx=36196,Zx=37492,Jx=37496,Qx=37808,e1=37809,t1=37810,n1=37811,r1=37812,i1=37813,s1=37814,o1=37815,a1=37816,l1=37817,c1=37818,u1=37819,f1=37820,d1=37821,Vp=36492,h1=36494,p1=36495,lA=36283,m1=36284,g1=36285,y1=36286,$6=2200,W6=2201,H6=2202,Im=2300,v1=2301,jv=2302,zc=2400,Uc=2401,Nm=2402,f_=2500,cA=2501,Jie=0,Qie=1,ese=2,G6=3200,X6=3201,tse=3202,nse=3203,Xl=0,q6=1,xa="",Ti="srgb",gu="srgb-linear",km="linear",mn="srgb",rse=0,Tc=7680,ise=7681,sse=7682,ose=7683,ase=34055,lse=34056,cse=5386,use=512,fse=513,dse=514,hse=515,pse=516,mse=517,gse=518,_T=519,Y6=512,K6=513,Z6=514,uA=515,J6=516,Q6=517,eB=518,tB=519,Lm=35044,yse=35048,vse=35040,xse=35045,bse=35049,_se=35041,wse=35046,Sse=35050,Mse=35042,Ese="100",wT="300 es",so=2e3,Om=2001,Tse={COMPUTE:"compute",RENDER:"render"};class Qo{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){const r=this._listeners;return r===void 0?!1:r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){const r=this._listeners;if(r===void 0)return;const i=r[e];if(i!==void 0){const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}dispatchEvent(e){const n=this._listeners;if(n===void 0)return;const r=n[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let s=0,o=i.length;s>8&255]+Vr[t>>16&255]+Vr[t>>24&255]+"-"+Vr[e&255]+Vr[e>>8&255]+"-"+Vr[e>>16&15|64]+Vr[e>>24&255]+"-"+Vr[n&63|128]+Vr[n>>8&255]+"-"+Vr[n>>16&255]+Vr[n>>24&255]+Vr[r&255]+Vr[r>>8&255]+Vr[r>>16&255]+Vr[r>>24&255]).toLowerCase()}function Nt(t,e,n){return Math.max(e,Math.min(n,t))}function fA(t,e){return(t%e+e)%e}function Cse(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function Rse(t,e,n){return t!==e?(n-t)/(e-t):0}function $p(t,e,n){return(1-n)*t+n*e}function Ase(t,e,n,r){return $p(t,e,1-Math.exp(-n*r))}function Pse(t,e=1){return e-Math.abs(fA(t,e*2)-e)}function Ise(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Nse(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function kse(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Lse(t,e){return t+Math.random()*(e-t)}function Ose(t){return t*(.5-Math.random())}function Dse(t){t!==void 0&&(rk=t);let e=rk+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Fse(t){return t*Kc}function zse(t){return t*Nd}function Use(t){return(t&t-1)===0&&t!==0}function Bse(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function jse(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Vse(t,e,n,r,i){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((e+r)/2),u=o((e+r)/2),f=s((e-r)/2),h=o((e-r)/2),m=s((r-e)/2),y=o((r-e)/2);switch(i){case"XYX":t.set(a*u,l*f,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*f,a*c);break;case"ZXZ":t.set(l*f,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*y,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*y,a*c);break;case"ZYZ":t.set(l*y,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ai(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const nB={DEG2RAD:Kc,RAD2DEG:Nd,generateUUID:os,clamp:Nt,euclideanModulo:fA,mapLinear:Cse,inverseLerp:Rse,lerp:$p,damp:Ase,pingpong:Pse,smoothstep:Ise,smootherstep:Nse,randInt:kse,randFloat:Lse,randFloatSpread:Ose,seededRandom:Dse,degToRad:Fse,radToDeg:zse,isPowerOfTwo:Use,ceilPowerOfTwo:Bse,floorPowerOfTwo:jse,setQuaternionFromProperEuler:Vse,normalize:zt,denormalize:ai};class Ne{constructor(e=0,n=0){Ne.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Nt(this.x,e.x,n.x),this.y=Nt(this.y,e.y,n.y),this}clampScalar(e,n){return this.x=Nt(this.x,e,n),this.y=Nt(this.y,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Nt(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Nt(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*r-o*i+e.x,this.y=s*i+o*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Dt{constructor(e,n,r,i,s,o,a,l,c){Dt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c)}set(e,n,r,i,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=s,u[5]=l,u[6]=r,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[3],l=r[6],c=r[1],u=r[4],f=r[7],h=r[2],m=r[5],y=r[8],x=i[0],v=i[3],g=i[6],b=i[1],_=i[4],S=i[7],C=i[2],P=i[5],A=i[8];return s[0]=o*x+a*b+l*C,s[3]=o*v+a*_+l*P,s[6]=o*g+a*S+l*A,s[1]=c*x+u*b+f*C,s[4]=c*v+u*_+f*P,s[7]=c*g+u*S+f*A,s[2]=h*x+m*b+y*C,s[5]=h*v+m*_+y*P,s[8]=h*g+m*S+y*A,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-r*s*u+r*a*l+i*s*c-i*o*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*s,m=c*s-o*l,y=n*f+r*h+i*m;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/y;return e[0]=f*x,e[1]=(i*c-u*r)*x,e[2]=(a*r-i*o)*x,e[3]=h*x,e[4]=(u*n-i*l)*x,e[5]=(i*s-a*n)*x,e[6]=m*x,e[7]=(r*l-c*n)*x,e[8]=(o*n-r*s)*x,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(r*l,r*c,-r*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(MM.makeScale(e,n)),this}rotate(e){return this.premultiply(MM.makeRotation(-e)),this}translate(e,n){return this.premultiply(MM.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const MM=new Dt;function rB(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const $se={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Kf(t,e){return new $se[t](e)}function Dm(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function iB(){const t=Dm("canvas");return t.style.display="block",t}const ik={};function Nf(t){t in ik||(ik[t]=!0,console.warn(t))}function Wse(t,e,n){return new Promise(function(r,i){function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:r()}}setTimeout(s,n)})}function Hse(t){const e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function Gse(t){const e=t.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const sk=new Dt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ok=new Dt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Xse(){const t={enabled:!0,workingColorSpace:gu,spaces:{},convert:function(i,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===mn&&(i.r=Aa(i.r),i.g=Aa(i.g),i.b=Aa(i.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[s].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===mn&&(i.r=dd(i.r),i.g=dd(i.g),i.b=dd(i.b))),i},fromWorkingColorSpace:function(i,s){return this.convert(i,this.workingColorSpace,s)},toWorkingColorSpace:function(i,s){return this.convert(i,s,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===xa?km:this.spaces[i].transfer},getLuminanceCoefficients:function(i,s=this.workingColorSpace){return i.fromArray(this.spaces[s].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,s,o){return i.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return t.define({[gu]:{primaries:e,whitePoint:r,transfer:km,toXYZ:sk,fromXYZ:ok,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Ti},outputColorSpaceConfig:{drawingBufferColorSpace:Ti}},[Ti]:{primaries:e,whitePoint:r,transfer:mn,toXYZ:sk,fromXYZ:ok,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Ti}}}),t}const tn=Xse();function Aa(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function dd(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let sf;class sB{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{sf===void 0&&(sf=Dm("canvas")),sf.width=e.width,sf.height=e.height;const r=sf.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=sf}return n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Dm("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),s=i.data;for(let o=0;o0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==gg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Am:e.x=e.x-Math.floor(e.x);break;case Li:e.x=e.x<0?0:1;break;case Pm:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Am:e.y=e.y-Math.floor(e.y);break;case Li:e.y=e.y<0?0:1;break;case Pm:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Hn.DEFAULT_IMAGE=null;Hn.DEFAULT_MAPPING=gg;Hn.DEFAULT_ANISOTROPY=1;class nn{constructor(e=0,n=0,r=0,i=1){nn.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i+o[12]*s,this.y=o[1]*n+o[5]*r+o[9]*i+o[13]*s,this.z=o[2]*n+o[6]*r+o[10]*i+o[14]*s,this.w=o[3]*n+o[7]*r+o[11]*i+o[15]*s,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,s;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],m=l[5],y=l[9],x=l[2],v=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-x)<.01&&Math.abs(y-v)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+x)<.1&&Math.abs(y+v)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const _=(c+1)/2,S=(m+1)/2,C=(g+1)/2,P=(u+h)/4,A=(f+x)/4,L=(y+v)/4;return _>S&&_>C?_<.01?(r=0,i=.707106781,s=.707106781):(r=Math.sqrt(_),i=P/r,s=A/r):S>C?S<.01?(r=.707106781,i=0,s=.707106781):(i=Math.sqrt(S),r=P/i,s=L/i):C<.01?(r=.707106781,i=.707106781,s=0):(s=Math.sqrt(C),r=A/s,i=L/s),this.set(r,i,s,n),this}let b=Math.sqrt((v-y)*(v-y)+(f-x)*(f-x)+(h-u)*(h-u));return Math.abs(b)<.001&&(b=1),this.x=(v-y)/b,this.y=(f-x)/b,this.z=(h-u)/b,this.w=Math.acos((c+m+g-1)/2),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Nt(this.x,e.x,n.x),this.y=Nt(this.y,e.y,n.y),this.z=Nt(this.z,e.z,n.z),this.w=Nt(this.w,e.w,n.w),this}clampScalar(e,n){return this.x=Nt(this.x,e,n),this.y=Nt(this.y,e,n),this.z=Nt(this.z,e,n),this.w=Nt(this.w,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Nt(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class d_ extends Qo{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new nn(0,0,e,n),this.scissorTest=!1,this.viewport=new nn(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const s=new Hn(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);s.flipY=!1,s.generateMipmaps=r.generateMipmaps,s.internalFormat=r.internalFormat,this.textures=[];const o=r.count;for(let a=0;a=0?1:-1,_=1-g*g;if(_>Number.EPSILON){const C=Math.sqrt(_),P=Math.atan2(C,g*b);v=Math.sin(v*P)/C,a=Math.sin(a*P)/C}const S=a*b;if(l=l*v+h*S,c=c*v+m*S,u=u*v+y*S,f=f*v+x*S,v===1-a){const C=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=C,c*=C,u*=C,f*=C}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,s,o){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],f=s[o],h=s[o+1],m=s[o+2],y=s[o+3];return e[n]=a*y+u*f+l*m-c*h,e[n+1]=l*y+u*h+c*f-a*m,e[n+2]=c*y+u*m+a*h-l*f,e[n+3]=u*y-a*f-l*h-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const r=e._x,i=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),f=a(s/2),h=l(r/2),m=l(i/2),y=l(s/2);switch(o){case"XYZ":this._x=h*u*f+c*m*y,this._y=c*m*f-h*u*y,this._z=c*u*y+h*m*f,this._w=c*u*f-h*m*y;break;case"YXZ":this._x=h*u*f+c*m*y,this._y=c*m*f-h*u*y,this._z=c*u*y-h*m*f,this._w=c*u*f+h*m*y;break;case"ZXY":this._x=h*u*f-c*m*y,this._y=c*m*f+h*u*y,this._z=c*u*y+h*m*f,this._w=c*u*f-h*m*y;break;case"ZYX":this._x=h*u*f-c*m*y,this._y=c*m*f+h*u*y,this._z=c*u*y-h*m*f,this._w=c*u*f+h*m*y;break;case"YZX":this._x=h*u*f+c*m*y,this._y=c*m*f+h*u*y,this._z=c*u*y-h*m*f,this._w=c*u*f-h*m*y;break;case"XZY":this._x=h*u*f-c*m*y,this._y=c*m*f-h*u*y,this._z=c*u*y+h*m*f,this._w=c*u*f+h*m*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],h=r+a+f;if(h>0){const m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-i)*m}else if(r>a&&r>f){const m=2*Math.sqrt(1+r-a-f);this._w=(u-l)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(s+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-r-f);this._w=(s-c)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-r-a);this._w=(o-i)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Nt(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+o*a+i*c-s*l,this._y=i*u+o*l+s*a-r*c,this._z=s*u+o*c+r*l-i*a,this._w=o*u-r*a-i*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,s=this._z,o=this._w;let a=o*e._w+r*e._x+i*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=r,this._y=i,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=o*f+this._w*h,this._x=r*f+this._x*h,this._y=i*f+this._y*h,this._z=s*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),s=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class H{constructor(e=0,n=0,r=0){H.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(ak.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(ak.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[3]*r+s[6]*i,this.y=s[1]*n+s[4]*r+s[7]*i,this.z=s[2]*n+s[5]*r+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=e.elements,o=1/(s[3]*n+s[7]*r+s[11]*i+s[15]);return this.x=(s[0]*n+s[4]*r+s[8]*i+s[12])*o,this.y=(s[1]*n+s[5]*r+s[9]*i+s[13])*o,this.z=(s[2]*n+s[6]*r+s[10]*i+s[14])*o,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*r),u=2*(a*n-s*i),f=2*(s*r-o*n);return this.x=n+l*c+o*f-a*u,this.y=r+l*u+a*c-s*f,this.z=i+l*f+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i,this.y=s[1]*n+s[5]*r+s[9]*i,this.z=s[2]*n+s[6]*r+s[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Nt(this.x,e.x,n.x),this.y=Nt(this.y,e.y,n.y),this.z=Nt(this.z,e.z,n.z),this}clampScalar(e,n){return this.x=Nt(this.x,e,n),this.y=Nt(this.y,e,n),this.z=Nt(this.z,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Nt(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=i*l-s*a,this.y=s*o-r*l,this.z=r*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return TM.copy(this).projectOnVector(e),this.sub(TM)}reflect(e){return this.sub(TM.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Nt(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(e),this.y=n,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const TM=new H,ak=new Bi;class kr{constructor(e=new H(1/0,1/0,1/0),n=new H(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,qs),qs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Kh),fy.subVectors(this.max,Kh),of.subVectors(e.a,Kh),af.subVectors(e.b,Kh),lf.subVectors(e.c,Kh),al.subVectors(af,of),ll.subVectors(lf,af),cc.subVectors(of,lf);let n=[0,-al.z,al.y,0,-ll.z,ll.y,0,-cc.z,cc.y,al.z,0,-al.x,ll.z,0,-ll.x,cc.z,0,-cc.x,-al.y,al.x,0,-ll.y,ll.x,0,-cc.y,cc.x,0];return!CM(n,of,af,lf,fy)||(n=[1,0,0,0,1,0,0,0,1],!CM(n,of,af,lf,fy))?!1:(dy.crossVectors(al,ll),n=[dy.x,dy.y,dy.z],CM(n,of,af,lf,fy))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,qs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(qs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ca[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ca[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ca[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ca[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ca[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ca[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ca[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ca[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ca),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ca=[new H,new H,new H,new H,new H,new H,new H,new H],qs=new H,uy=new kr,of=new H,af=new H,lf=new H,al=new H,ll=new H,cc=new H,Kh=new H,fy=new H,dy=new H,uc=new H;function CM(t,e,n,r,i){for(let s=0,o=t.length-3;s<=o;s+=3){uc.fromArray(t,s);const a=i.x*Math.abs(uc.x)+i.y*Math.abs(uc.y)+i.z*Math.abs(uc.z),l=e.dot(uc),c=n.dot(uc),u=r.dot(uc);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const Jse=new kr,Zh=new H,RM=new H;class Kr{constructor(e=new H,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):Jse.setFromPoints(e).getCenter(r);let i=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Zh.subVectors(e,this.center);const n=Zh.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(Zh,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(RM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Zh.copy(e.center).add(RM)),this.expandByPoint(Zh.copy(e.center).sub(RM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ua=new H,AM=new H,hy=new H,cl=new H,PM=new H,py=new H,IM=new H;class ih{constructor(e=new H,n=new H(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ua)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=ua.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ua.copy(this.origin).addScaledVector(this.direction,n),ua.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){AM.copy(e).add(n).multiplyScalar(.5),hy.copy(n).sub(e).normalize(),cl.copy(this.origin).sub(AM);const s=e.distanceTo(n)*.5,o=-this.direction.dot(hy),a=cl.dot(this.direction),l=-cl.dot(hy),c=cl.lengthSq(),u=Math.abs(1-o*o);let f,h,m,y;if(u>0)if(f=o*l-a,h=o*a-l,y=s*u,f>=0)if(h>=-y)if(h<=y){const x=1/u;f*=x,h*=x,m=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;else h<=-y?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),m=-f*f+h*(h+2*l)+c):h<=y?(f=0,h=Math.min(Math.max(-s,-l),s),m=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),m=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(AM).addScaledVector(hy,h),m}intersectSphere(e,n){ua.subVectors(e.center,this.origin);const r=ua.dot(this.direction),i=ua.dot(ua)-r*r,s=e.radius*e.radius;if(i>s)return null;const o=Math.sqrt(s-i),a=r-o,l=r+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(s=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(s=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),r>o||s>i||((s>r||isNaN(r))&&(r=s),(o=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,ua)!==null}intersectTriangle(e,n,r,i,s){PM.subVectors(n,e),py.subVectors(r,e),IM.crossVectors(PM,py);let o=this.direction.dot(IM),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;cl.subVectors(this.origin,e);const l=a*this.direction.dot(py.crossVectors(cl,py));if(l<0)return null;const c=a*this.direction.dot(PM.cross(cl));if(c<0||l+c>o)return null;const u=-a*cl.dot(IM);return u<0?null:this.at(u/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Tt{constructor(e,n,r,i,s,o,a,l,c,u,f,h,m,y,x,v){Tt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c,u,f,h,m,y,x,v)}set(e,n,r,i,s,o,a,l,c,u,f,h,m,y,x,v){const g=this.elements;return g[0]=e,g[4]=n,g[8]=r,g[12]=i,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=m,g[7]=y,g[11]=x,g[15]=v,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 Tt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/cf.setFromMatrixColumn(e,0).length(),s=1/cf.setFromMatrixColumn(e,1).length(),o=1/cf.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*s,n[5]=r[5]*s,n[6]=r[6]*s,n[7]=0,n[8]=r[8]*o,n[9]=r[9]*o,n[10]=r[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,s=e.z,o=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const h=o*u,m=o*f,y=a*u,x=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+y*c,n[5]=h-x*c,n[9]=-a*l,n[2]=x-h*c,n[6]=y+m*c,n[10]=o*l}else if(e.order==="YXZ"){const h=l*u,m=l*f,y=c*u,x=c*f;n[0]=h+x*a,n[4]=y*a-m,n[8]=o*c,n[1]=o*f,n[5]=o*u,n[9]=-a,n[2]=m*a-y,n[6]=x+h*a,n[10]=o*l}else if(e.order==="ZXY"){const h=l*u,m=l*f,y=c*u,x=c*f;n[0]=h-x*a,n[4]=-o*f,n[8]=y+m*a,n[1]=m+y*a,n[5]=o*u,n[9]=x-h*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const h=o*u,m=o*f,y=a*u,x=a*f;n[0]=l*u,n[4]=y*c-m,n[8]=h*c+x,n[1]=l*f,n[5]=x*c+h,n[9]=m*c-y,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const h=o*l,m=o*c,y=a*l,x=a*c;n[0]=l*u,n[4]=x-h*f,n[8]=y*f+m,n[1]=f,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+y,n[10]=h-x*f}else if(e.order==="XZY"){const h=o*l,m=o*c,y=a*l,x=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+x,n[5]=o*u,n[9]=m*f-y,n[2]=y*f-m,n[6]=a*u,n[10]=x*f+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Qse,e,eoe)}lookAt(e,n,r){const i=this.elements;return Ki.subVectors(e,n),Ki.lengthSq()===0&&(Ki.z=1),Ki.normalize(),ul.crossVectors(r,Ki),ul.lengthSq()===0&&(Math.abs(r.z)===1?Ki.x+=1e-4:Ki.z+=1e-4,Ki.normalize(),ul.crossVectors(r,Ki)),ul.normalize(),my.crossVectors(Ki,ul),i[0]=ul.x,i[4]=my.x,i[8]=Ki.x,i[1]=ul.y,i[5]=my.y,i[9]=Ki.y,i[2]=ul.z,i[6]=my.z,i[10]=Ki.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[4],l=r[8],c=r[12],u=r[1],f=r[5],h=r[9],m=r[13],y=r[2],x=r[6],v=r[10],g=r[14],b=r[3],_=r[7],S=r[11],C=r[15],P=i[0],A=i[4],L=i[8],k=i[12],T=i[1],N=i[5],z=i[9],D=i[13],B=i[2],G=i[6],X=i[10],Z=i[14],F=i[3],q=i[7],K=i[11],Q=i[15];return s[0]=o*P+a*T+l*B+c*F,s[4]=o*A+a*N+l*G+c*q,s[8]=o*L+a*z+l*X+c*K,s[12]=o*k+a*D+l*Z+c*Q,s[1]=u*P+f*T+h*B+m*F,s[5]=u*A+f*N+h*G+m*q,s[9]=u*L+f*z+h*X+m*K,s[13]=u*k+f*D+h*Z+m*Q,s[2]=y*P+x*T+v*B+g*F,s[6]=y*A+x*N+v*G+g*q,s[10]=y*L+x*z+v*X+g*K,s[14]=y*k+x*D+v*Z+g*Q,s[3]=b*P+_*T+S*B+C*F,s[7]=b*A+_*N+S*G+C*q,s[11]=b*L+_*z+S*X+C*K,s[15]=b*k+_*D+S*Z+C*Q,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],m=e[14],y=e[3],x=e[7],v=e[11],g=e[15];return y*(+s*l*f-i*c*f-s*a*h+r*c*h+i*a*m-r*l*m)+x*(+n*l*m-n*c*h+s*o*h-i*o*m+i*c*u-s*l*u)+v*(+n*c*f-n*a*m-s*o*f+r*o*m+s*a*u-r*c*u)+g*(-i*a*u-n*l*f+n*a*h+i*o*f-r*o*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],m=e[11],y=e[12],x=e[13],v=e[14],g=e[15],b=f*v*c-x*h*c+x*l*m-a*v*m-f*l*g+a*h*g,_=y*h*c-u*v*c-y*l*m+o*v*m+u*l*g-o*h*g,S=u*x*c-y*f*c+y*a*m-o*x*m-u*a*g+o*f*g,C=y*f*l-u*x*l-y*a*h+o*x*h+u*a*v-o*f*v,P=n*b+r*_+i*S+s*C;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/P;return e[0]=b*A,e[1]=(x*h*s-f*v*s-x*i*m+r*v*m+f*i*g-r*h*g)*A,e[2]=(a*v*s-x*l*s+x*i*c-r*v*c-a*i*g+r*l*g)*A,e[3]=(f*l*s-a*h*s-f*i*c+r*h*c+a*i*m-r*l*m)*A,e[4]=_*A,e[5]=(u*v*s-y*h*s+y*i*m-n*v*m-u*i*g+n*h*g)*A,e[6]=(y*l*s-o*v*s-y*i*c+n*v*c+o*i*g-n*l*g)*A,e[7]=(o*h*s-u*l*s+u*i*c-n*h*c-o*i*m+n*l*m)*A,e[8]=S*A,e[9]=(y*f*s-u*x*s-y*r*m+n*x*m+u*r*g-n*f*g)*A,e[10]=(o*x*s-y*a*s+y*r*c-n*x*c-o*r*g+n*a*g)*A,e[11]=(u*a*s-o*f*s-u*r*c+n*f*c+o*r*m-n*a*m)*A,e[12]=C*A,e[13]=(u*x*i-y*f*i+y*r*h-n*x*h-u*r*v+n*f*v)*A,e[14]=(y*a*i-o*x*i-y*r*l+n*x*l+o*r*v-n*a*v)*A,e[15]=(o*f*i-u*a*i+u*r*l-n*f*l-o*r*h+n*a*h)*A,this}scale(e){const n=this.elements,r=e.x,i=e.y,s=e.z;return n[0]*=r,n[4]*=i,n[8]*=s,n[1]*=r,n[5]*=i,n[9]*=s,n[2]*=r,n[6]*=i,n[10]*=s,n[3]*=r,n[7]*=i,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),s=1-r,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*o,0,c*l-i*a,u*l+i*o,s*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,s,o){return this.set(1,r,s,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,u=o+o,f=a+a,h=s*c,m=s*u,y=s*f,x=o*u,v=o*f,g=a*f,b=l*c,_=l*u,S=l*f,C=r.x,P=r.y,A=r.z;return i[0]=(1-(x+g))*C,i[1]=(m+S)*C,i[2]=(y-_)*C,i[3]=0,i[4]=(m-S)*P,i[5]=(1-(h+g))*P,i[6]=(v+b)*P,i[7]=0,i[8]=(y+_)*A,i[9]=(v-b)*A,i[10]=(1-(h+x))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let s=cf.set(i[0],i[1],i[2]).length();const o=cf.set(i[4],i[5],i[6]).length(),a=cf.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],Ys.copy(this);const c=1/s,u=1/o,f=1/a;return Ys.elements[0]*=c,Ys.elements[1]*=c,Ys.elements[2]*=c,Ys.elements[4]*=u,Ys.elements[5]*=u,Ys.elements[6]*=u,Ys.elements[8]*=f,Ys.elements[9]*=f,Ys.elements[10]*=f,n.setFromRotationMatrix(Ys),r.x=s,r.y=o,r.z=a,this}makePerspective(e,n,r,i,s,o,a=so){const l=this.elements,c=2*s/(n-e),u=2*s/(r-i),f=(n+e)/(n-e),h=(r+i)/(r-i);let m,y;if(a===so)m=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===Om)m=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=y,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,s,o,a=so){const l=this.elements,c=1/(n-e),u=1/(r-i),f=1/(o-s),h=(n+e)*c,m=(r+i)*u;let y,x;if(a===so)y=(o+s)*f,x=-2*f;else if(a===Om)y=s*f,x=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=x,l[14]=-y,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const cf=new H,Ys=new Tt,Qse=new H(0,0,0),eoe=new H(1,1,1),ul=new H,my=new H,Ki=new H,lk=new Tt,ck=new Bi;class cs{constructor(e=0,n=0,r=0,i=cs.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],u=i[9],f=i[2],h=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Nt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Nt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Nt(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Nt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Nt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Nt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return lk.makeRotationFromQuaternion(e),this.setFromRotationMatrix(lk,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return ck.setFromEuler(this),this.setFromQuaternion(ck,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}cs.DEFAULT_ORDER="XYZ";class Zc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),m.length>0&&(r.animations=m),y.length>0&&(r.nodes=y)}return r.object=i,r;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,n,r,i,s){Ks.subVectors(i,n),da.subVectors(r,n),kM.subVectors(e,n);const o=Ks.dot(Ks),a=Ks.dot(da),l=Ks.dot(kM),c=da.dot(da),u=da.dot(kM),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,m=(c*l-a*u)*h,y=(o*u-a*l)*h;return s.set(1-m-y,y,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,ha)===null?!1:ha.x>=0&&ha.y>=0&&ha.x+ha.y<=1}static getInterpolation(e,n,r,i,s,o,a,l){return this.getBarycoord(e,n,r,i,ha)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,ha.x),l.addScaledVector(o,ha.y),l.addScaledVector(a,ha.z),l)}static getInterpolatedAttribute(e,n,r,i,s,o){return FM.setScalar(0),zM.setScalar(0),UM.setScalar(0),FM.fromBufferAttribute(e,n),zM.fromBufferAttribute(e,r),UM.fromBufferAttribute(e,i),o.setScalar(0),o.addScaledVector(FM,s.x),o.addScaledVector(zM,s.y),o.addScaledVector(UM,s.z),o}static isFrontFacing(e,n,r,i){return Ks.subVectors(r,n),da.subVectors(e,n),Ks.cross(da).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ks.subVectors(this.c,this.b),da.subVectors(this.a,this.b),Ks.cross(da).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ii.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ii.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,s){return Ii.getInterpolation(e,this.a,this.b,this.c,n,r,i,s)}containsPoint(e){return Ii.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ii.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,s=this.c;let o,a;df.subVectors(i,r),hf.subVectors(s,r),LM.subVectors(e,r);const l=df.dot(LM),c=hf.dot(LM);if(l<=0&&c<=0)return n.copy(r);OM.subVectors(e,i);const u=df.dot(OM),f=hf.dot(OM);if(u>=0&&f<=u)return n.copy(i);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(r).addScaledVector(df,o);DM.subVectors(e,s);const m=df.dot(DM),y=hf.dot(DM);if(y>=0&&m<=y)return n.copy(s);const x=m*c-l*y;if(x<=0&&c>=0&&y<=0)return a=c/(c-y),n.copy(r).addScaledVector(hf,a);const v=u*y-m*f;if(v<=0&&f-u>=0&&m-y>=0)return mk.subVectors(s,i),a=(f-u)/(f-u+(m-y)),n.copy(i).addScaledVector(mk,a);const g=1/(v+x+h);return o=x*g,a=h*g,n.copy(r).addScaledVector(df,o).addScaledVector(hf,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const oB={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},fl={h:0,s:0,l:0},yy={h:0,s:0,l:0};function BM(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}let ot=class{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Ti){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,tn.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=tn.workingColorSpace){return this.r=e,this.g=n,this.b=r,tn.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=tn.workingColorSpace){if(e=fA(e,1),n=Nt(n,0,1),r=Nt(r,0,1),n===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;this.r=BM(o,s,e+1/3),this.g=BM(o,s,e),this.b=BM(o,s,e-1/3)}return tn.toWorkingColorSpace(this,i),this}setStyle(e,n=Ti){function r(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Ti){const r=oB[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Aa(e.r),this.g=Aa(e.g),this.b=Aa(e.b),this}copyLinearToSRGB(e){return this.r=dd(e.r),this.g=dd(e.g),this.b=dd(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ti){return tn.fromWorkingColorSpace($r.copy(this),e),Math.round(Nt($r.r*255,0,255))*65536+Math.round(Nt($r.g*255,0,255))*256+Math.round(Nt($r.b*255,0,255))}getHexString(e=Ti){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=tn.workingColorSpace){tn.fromWorkingColorSpace($r.copy(this),n);const r=$r.r,i=$r.g,s=$r.b,o=Math.max(r,i,s),a=Math.min(r,i,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case r:l=(i-s)/f+(i0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==qc&&(r.blending=this.blending),this.side!==Fa&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==Fx&&(r.blendSrc=this.blendSrc),this.blendDst!==zx&&(r.blendDst=this.blendDst),this.blendEquation!==xl&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==hu&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_T&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Tc&&(r.stencilFail=this.stencilFail),this.stencilZFail!==Tc&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==Tc&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=i(e.textures),o=i(e.images);s.length>0&&(r.textures=s),o.length>0&&(r.images=o)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let s=0;s!==i;++s)r[s]=n[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class ql extends Jr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ot(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 cs,this.combine=mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const ba=ooe();function ooe(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(r[l]=1024>>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,s[l]=c|u}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ei(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Nt(t,-65504,65504),ba.floatView[0]=t;const e=ba.uint32View[0],n=e>>23&511;return ba.baseTable[n]+((e&8388607)>>ba.shiftTable[n])}function bp(t){const e=t>>10;return ba.uint32View[0]=ba.mantissaTable[ba.offsetTable[e]+(t&1023)]+ba.exponentTable[e],ba.floatView[0]}const aoe={toHalfFloat:Ei,fromHalfFloat:bp},Qn=new H,vy=new Ne;let loe=0;class yn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:loe++}),this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Lm,this.updateRanges=[],this.gpuType=li,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,s=this.itemSize;in.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let r=0,i=n.length;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(i[l]=u,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,m=f.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s(e.far-e.near)**2))&&(gk.copy(s).invert(),fc.copy(e.ray).applyMatrix4(gk),!(r.boundingBox!==null&&fc.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,fc)))}_computeIntersections(e,n,r){let i;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,h=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let y=0,x=h.length;yn.far?null:{distance:c,point:My.clone(),object:t}}function Ey(t,e,n,r,i,s,o,a,l,c){t.getVertexPosition(a,by),t.getVertexPosition(l,_y),t.getVertexPosition(c,wy);const u=goe(t,e,n,r,by,_y,wy,vk);if(u){const f=new H;Ii.getBarycoord(vk,by,_y,wy,f),i&&(u.uv=Ii.getInterpolatedAttribute(i,a,l,c,f,new Ne)),s&&(u.uv1=Ii.getInterpolatedAttribute(s,a,l,c,f,new Ne)),o&&(u.normal=Ii.getInterpolatedAttribute(o,a,l,c,f,new H),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new H,materialIndex:0};Ii.getNormal(by,_y,wy,h.normal),u.face=h,u.barycoord=f}return u}class Pu extends Bt{constructor(e=1,n=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,m=0;y("z","y","x",-1,-1,r,n,e,o,s,0),y("z","y","x",1,-1,r,n,-e,o,s,1),y("x","z","y",1,1,e,r,n,i,o,2),y("x","z","y",1,-1,e,r,-n,i,o,3),y("x","y","z",1,-1,e,n,r,i,s,4),y("x","y","z",-1,-1,e,n,-r,i,s,5),this.setIndex(l),this.setAttribute("position",new pt(c,3)),this.setAttribute("normal",new pt(u,3)),this.setAttribute("uv",new pt(f,2));function y(x,v,g,b,_,S,C,P,A,L,k){const T=S/A,N=C/L,z=S/2,D=C/2,B=P/2,G=A+1,X=L+1;let Z=0,F=0;const q=new H;for(let K=0;K0?1:-1,u.push(q.x,q.y,q.z),f.push(he/A),f.push(1-K/L),Z+=1}}for(let K=0;K>8&255]+Vr[t>>16&255]+Vr[t>>24&255]+"-"+Vr[e&255]+Vr[e>>8&255]+"-"+Vr[e>>16&15|64]+Vr[e>>24&255]+"-"+Vr[n&63|128]+Vr[n>>8&255]+"-"+Vr[n>>16&255]+Vr[n>>24&255]+Vr[r&255]+Vr[r>>8&255]+Vr[r>>16&255]+Vr[r>>24&255]).toLowerCase()}function Nt(t,e,n){return Math.max(e,Math.min(n,t))}function cA(t,e){return(t%e+e)%e}function Ose(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function Dse(t,e,n){return t!==e?(n-t)/(e-t):0}function $p(t,e,n){return(1-n)*t+n*e}function Fse(t,e,n,r){return $p(t,e,1-Math.exp(-n*r))}function zse(t,e=1){return e-Math.abs(cA(t,e*2)-e)}function Use(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Bse(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function jse(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Vse(t,e){return t+Math.random()*(e-t)}function $se(t){return t*(.5-Math.random())}function Wse(t){t!==void 0&&(r4=t);let e=r4+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Hse(t){return t*Kc}function Gse(t){return t*kd}function Xse(t){return(t&t-1)===0&&t!==0}function qse(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Yse(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Kse(t,e,n,r,i){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((e+r)/2),u=o((e+r)/2),f=s((e-r)/2),h=o((e-r)/2),m=s((r-e)/2),y=o((r-e)/2);switch(i){case"XYX":t.set(a*u,l*f,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*f,a*c);break;case"ZXZ":t.set(l*f,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*y,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*y,a*c);break;case"ZYZ":t.set(l*y,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ai(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const sB={DEG2RAD:Kc,RAD2DEG:kd,generateUUID:os,clamp:Nt,euclideanModulo:cA,mapLinear:Ose,inverseLerp:Dse,lerp:$p,damp:Fse,pingpong:zse,smoothstep:Use,smootherstep:Bse,randInt:jse,randFloat:Vse,randFloatSpread:$se,seededRandom:Wse,degToRad:Hse,radToDeg:Gse,isPowerOfTwo:Xse,ceilPowerOfTwo:qse,floorPowerOfTwo:Yse,setQuaternionFromProperEuler:Kse,normalize:zt,denormalize:ai};class Ne{constructor(e=0,n=0){Ne.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Nt(this.x,e.x,n.x),this.y=Nt(this.y,e.y,n.y),this}clampScalar(e,n){return this.x=Nt(this.x,e,n),this.y=Nt(this.y,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Nt(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Nt(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*r-o*i+e.x,this.y=s*i+o*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Dt{constructor(e,n,r,i,s,o,a,l,c){Dt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c)}set(e,n,r,i,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=s,u[5]=l,u[6]=r,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[3],l=r[6],c=r[1],u=r[4],f=r[7],h=r[2],m=r[5],y=r[8],x=i[0],v=i[3],g=i[6],b=i[1],_=i[4],S=i[7],C=i[2],P=i[5],A=i[8];return s[0]=o*x+a*b+l*C,s[3]=o*v+a*_+l*P,s[6]=o*g+a*S+l*A,s[1]=c*x+u*b+f*C,s[4]=c*v+u*_+f*P,s[7]=c*g+u*S+f*A,s[2]=h*x+m*b+y*C,s[5]=h*v+m*_+y*P,s[8]=h*g+m*S+y*A,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-r*s*u+r*a*l+i*s*c-i*o*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*s,m=c*s-o*l,y=n*f+r*h+i*m;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/y;return e[0]=f*x,e[1]=(i*c-u*r)*x,e[2]=(a*r-i*o)*x,e[3]=h*x,e[4]=(u*n-i*l)*x,e[5]=(i*s-a*n)*x,e[6]=m*x,e[7]=(r*l-c*n)*x,e[8]=(o*n-r*s)*x,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(r*l,r*c,-r*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(MM.makeScale(e,n)),this}rotate(e){return this.premultiply(MM.makeRotation(-e)),this}translate(e,n){return this.premultiply(MM.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const MM=new Dt;function oB(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const Zse={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Kf(t,e){return new Zse[t](e)}function Dm(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function aB(){const t=Dm("canvas");return t.style.display="block",t}const i4={};function Nf(t){t in i4||(i4[t]=!0,console.warn(t))}function Jse(t,e,n){return new Promise(function(r,i){function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:r()}}setTimeout(s,n)})}function Qse(t){const e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function eoe(t){const e=t.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const s4=new Dt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),o4=new Dt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function toe(){const t={enabled:!0,workingColorSpace:gu,spaces:{},convert:function(i,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===mn&&(i.r=Aa(i.r),i.g=Aa(i.g),i.b=Aa(i.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[s].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===mn&&(i.r=hd(i.r),i.g=hd(i.g),i.b=hd(i.b))),i},fromWorkingColorSpace:function(i,s){return this.convert(i,this.workingColorSpace,s)},toWorkingColorSpace:function(i,s){return this.convert(i,s,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===xa?km:this.spaces[i].transfer},getLuminanceCoefficients:function(i,s=this.workingColorSpace){return i.fromArray(this.spaces[s].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,s,o){return i.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return t.define({[gu]:{primaries:e,whitePoint:r,transfer:km,toXYZ:s4,fromXYZ:o4,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Ti},outputColorSpaceConfig:{drawingBufferColorSpace:Ti}},[Ti]:{primaries:e,whitePoint:r,transfer:mn,toXYZ:s4,fromXYZ:o4,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Ti}}}),t}const tn=toe();function Aa(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function hd(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let sf;class lB{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{sf===void 0&&(sf=Dm("canvas")),sf.width=e.width,sf.height=e.height;const r=sf.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=sf}return n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Dm("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),s=i.data;for(let o=0;o0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==gg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Am:e.x=e.x-Math.floor(e.x);break;case Li:e.x=e.x<0?0:1;break;case Pm:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Am:e.y=e.y-Math.floor(e.y);break;case Li:e.y=e.y<0?0:1;break;case Pm:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Hn.DEFAULT_IMAGE=null;Hn.DEFAULT_MAPPING=gg;Hn.DEFAULT_ANISOTROPY=1;class nn{constructor(e=0,n=0,r=0,i=1){nn.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i+o[12]*s,this.y=o[1]*n+o[5]*r+o[9]*i+o[13]*s,this.z=o[2]*n+o[6]*r+o[10]*i+o[14]*s,this.w=o[3]*n+o[7]*r+o[11]*i+o[15]*s,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,s;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],m=l[5],y=l[9],x=l[2],v=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-x)<.01&&Math.abs(y-v)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+x)<.1&&Math.abs(y+v)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const _=(c+1)/2,S=(m+1)/2,C=(g+1)/2,P=(u+h)/4,A=(f+x)/4,L=(y+v)/4;return _>S&&_>C?_<.01?(r=0,i=.707106781,s=.707106781):(r=Math.sqrt(_),i=P/r,s=A/r):S>C?S<.01?(r=.707106781,i=0,s=.707106781):(i=Math.sqrt(S),r=P/i,s=L/i):C<.01?(r=.707106781,i=.707106781,s=0):(s=Math.sqrt(C),r=A/s,i=L/s),this.set(r,i,s,n),this}let b=Math.sqrt((v-y)*(v-y)+(f-x)*(f-x)+(h-u)*(h-u));return Math.abs(b)<.001&&(b=1),this.x=(v-y)/b,this.y=(f-x)/b,this.z=(h-u)/b,this.w=Math.acos((c+m+g-1)/2),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Nt(this.x,e.x,n.x),this.y=Nt(this.y,e.y,n.y),this.z=Nt(this.z,e.z,n.z),this.w=Nt(this.w,e.w,n.w),this}clampScalar(e,n){return this.x=Nt(this.x,e,n),this.y=Nt(this.y,e,n),this.z=Nt(this.z,e,n),this.w=Nt(this.w,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Nt(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class d_ extends Qo{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new nn(0,0,e,n),this.scissorTest=!1,this.viewport=new nn(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const s=new Hn(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);s.flipY=!1,s.generateMipmaps=r.generateMipmaps,s.internalFormat=r.internalFormat,this.textures=[];const o=r.count;for(let a=0;a=0?1:-1,_=1-g*g;if(_>Number.EPSILON){const C=Math.sqrt(_),P=Math.atan2(C,g*b);v=Math.sin(v*P)/C,a=Math.sin(a*P)/C}const S=a*b;if(l=l*v+h*S,c=c*v+m*S,u=u*v+y*S,f=f*v+x*S,v===1-a){const C=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=C,c*=C,u*=C,f*=C}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,s,o){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],f=s[o],h=s[o+1],m=s[o+2],y=s[o+3];return e[n]=a*y+u*f+l*m-c*h,e[n+1]=l*y+u*h+c*f-a*m,e[n+2]=c*y+u*m+a*h-l*f,e[n+3]=u*y-a*f-l*h-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const r=e._x,i=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),f=a(s/2),h=l(r/2),m=l(i/2),y=l(s/2);switch(o){case"XYZ":this._x=h*u*f+c*m*y,this._y=c*m*f-h*u*y,this._z=c*u*y+h*m*f,this._w=c*u*f-h*m*y;break;case"YXZ":this._x=h*u*f+c*m*y,this._y=c*m*f-h*u*y,this._z=c*u*y-h*m*f,this._w=c*u*f+h*m*y;break;case"ZXY":this._x=h*u*f-c*m*y,this._y=c*m*f+h*u*y,this._z=c*u*y+h*m*f,this._w=c*u*f-h*m*y;break;case"ZYX":this._x=h*u*f-c*m*y,this._y=c*m*f+h*u*y,this._z=c*u*y-h*m*f,this._w=c*u*f+h*m*y;break;case"YZX":this._x=h*u*f+c*m*y,this._y=c*m*f+h*u*y,this._z=c*u*y-h*m*f,this._w=c*u*f-h*m*y;break;case"XZY":this._x=h*u*f-c*m*y,this._y=c*m*f-h*u*y,this._z=c*u*y+h*m*f,this._w=c*u*f+h*m*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],h=r+a+f;if(h>0){const m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-i)*m}else if(r>a&&r>f){const m=2*Math.sqrt(1+r-a-f);this._w=(u-l)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(s+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-r-f);this._w=(s-c)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-r-a);this._w=(o-i)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Nt(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+o*a+i*c-s*l,this._y=i*u+o*l+s*a-r*c,this._z=s*u+o*c+r*l-i*a,this._w=o*u-r*a-i*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,s=this._z,o=this._w;let a=o*e._w+r*e._x+i*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=r,this._y=i,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=o*f+this._w*h,this._x=r*f+this._x*h,this._y=i*f+this._y*h,this._z=s*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),s=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class H{constructor(e=0,n=0,r=0){H.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(a4.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(a4.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[3]*r+s[6]*i,this.y=s[1]*n+s[4]*r+s[7]*i,this.z=s[2]*n+s[5]*r+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=e.elements,o=1/(s[3]*n+s[7]*r+s[11]*i+s[15]);return this.x=(s[0]*n+s[4]*r+s[8]*i+s[12])*o,this.y=(s[1]*n+s[5]*r+s[9]*i+s[13])*o,this.z=(s[2]*n+s[6]*r+s[10]*i+s[14])*o,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*r),u=2*(a*n-s*i),f=2*(s*r-o*n);return this.x=n+l*c+o*f-a*u,this.y=r+l*u+a*c-s*f,this.z=i+l*f+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i,this.y=s[1]*n+s[5]*r+s[9]*i,this.z=s[2]*n+s[6]*r+s[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Nt(this.x,e.x,n.x),this.y=Nt(this.y,e.y,n.y),this.z=Nt(this.z,e.z,n.z),this}clampScalar(e,n){return this.x=Nt(this.x,e,n),this.y=Nt(this.y,e,n),this.z=Nt(this.z,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Nt(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=i*l-s*a,this.y=s*o-r*l,this.z=r*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return TM.copy(this).projectOnVector(e),this.sub(TM)}reflect(e){return this.sub(TM.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Nt(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(e),this.y=n,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const TM=new H,a4=new Bi;class kr{constructor(e=new H(1/0,1/0,1/0),n=new H(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,qs),qs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Zh),fy.subVectors(this.max,Zh),of.subVectors(e.a,Zh),af.subVectors(e.b,Zh),lf.subVectors(e.c,Zh),al.subVectors(af,of),ll.subVectors(lf,af),cc.subVectors(of,lf);let n=[0,-al.z,al.y,0,-ll.z,ll.y,0,-cc.z,cc.y,al.z,0,-al.x,ll.z,0,-ll.x,cc.z,0,-cc.x,-al.y,al.x,0,-ll.y,ll.x,0,-cc.y,cc.x,0];return!CM(n,of,af,lf,fy)||(n=[1,0,0,0,1,0,0,0,1],!CM(n,of,af,lf,fy))?!1:(dy.crossVectors(al,ll),n=[dy.x,dy.y,dy.z],CM(n,of,af,lf,fy))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,qs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(qs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ca[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ca[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ca[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ca[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ca[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ca[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ca[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ca[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ca),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ca=[new H,new H,new H,new H,new H,new H,new H,new H],qs=new H,uy=new kr,of=new H,af=new H,lf=new H,al=new H,ll=new H,cc=new H,Zh=new H,fy=new H,dy=new H,uc=new H;function CM(t,e,n,r,i){for(let s=0,o=t.length-3;s<=o;s+=3){uc.fromArray(t,s);const a=i.x*Math.abs(uc.x)+i.y*Math.abs(uc.y)+i.z*Math.abs(uc.z),l=e.dot(uc),c=n.dot(uc),u=r.dot(uc);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const ooe=new kr,Jh=new H,RM=new H;class Kr{constructor(e=new H,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):ooe.setFromPoints(e).getCenter(r);let i=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Jh.subVectors(e,this.center);const n=Jh.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(Jh,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(RM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Jh.copy(e.center).add(RM)),this.expandByPoint(Jh.copy(e.center).sub(RM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ua=new H,AM=new H,hy=new H,cl=new H,PM=new H,py=new H,IM=new H;class sh{constructor(e=new H,n=new H(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ua)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=ua.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ua.copy(this.origin).addScaledVector(this.direction,n),ua.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){AM.copy(e).add(n).multiplyScalar(.5),hy.copy(n).sub(e).normalize(),cl.copy(this.origin).sub(AM);const s=e.distanceTo(n)*.5,o=-this.direction.dot(hy),a=cl.dot(this.direction),l=-cl.dot(hy),c=cl.lengthSq(),u=Math.abs(1-o*o);let f,h,m,y;if(u>0)if(f=o*l-a,h=o*a-l,y=s*u,f>=0)if(h>=-y)if(h<=y){const x=1/u;f*=x,h*=x,m=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;else h<=-y?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),m=-f*f+h*(h+2*l)+c):h<=y?(f=0,h=Math.min(Math.max(-s,-l),s),m=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),m=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(AM).addScaledVector(hy,h),m}intersectSphere(e,n){ua.subVectors(e.center,this.origin);const r=ua.dot(this.direction),i=ua.dot(ua)-r*r,s=e.radius*e.radius;if(i>s)return null;const o=Math.sqrt(s-i),a=r-o,l=r+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(s=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(s=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),r>o||s>i||((s>r||isNaN(r))&&(r=s),(o=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,ua)!==null}intersectTriangle(e,n,r,i,s){PM.subVectors(n,e),py.subVectors(r,e),IM.crossVectors(PM,py);let o=this.direction.dot(IM),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;cl.subVectors(this.origin,e);const l=a*this.direction.dot(py.crossVectors(cl,py));if(l<0)return null;const c=a*this.direction.dot(PM.cross(cl));if(c<0||l+c>o)return null;const u=-a*cl.dot(IM);return u<0?null:this.at(u/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Tt{constructor(e,n,r,i,s,o,a,l,c,u,f,h,m,y,x,v){Tt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c,u,f,h,m,y,x,v)}set(e,n,r,i,s,o,a,l,c,u,f,h,m,y,x,v){const g=this.elements;return g[0]=e,g[4]=n,g[8]=r,g[12]=i,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=m,g[7]=y,g[11]=x,g[15]=v,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 Tt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/cf.setFromMatrixColumn(e,0).length(),s=1/cf.setFromMatrixColumn(e,1).length(),o=1/cf.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*s,n[5]=r[5]*s,n[6]=r[6]*s,n[7]=0,n[8]=r[8]*o,n[9]=r[9]*o,n[10]=r[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,s=e.z,o=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const h=o*u,m=o*f,y=a*u,x=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+y*c,n[5]=h-x*c,n[9]=-a*l,n[2]=x-h*c,n[6]=y+m*c,n[10]=o*l}else if(e.order==="YXZ"){const h=l*u,m=l*f,y=c*u,x=c*f;n[0]=h+x*a,n[4]=y*a-m,n[8]=o*c,n[1]=o*f,n[5]=o*u,n[9]=-a,n[2]=m*a-y,n[6]=x+h*a,n[10]=o*l}else if(e.order==="ZXY"){const h=l*u,m=l*f,y=c*u,x=c*f;n[0]=h-x*a,n[4]=-o*f,n[8]=y+m*a,n[1]=m+y*a,n[5]=o*u,n[9]=x-h*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const h=o*u,m=o*f,y=a*u,x=a*f;n[0]=l*u,n[4]=y*c-m,n[8]=h*c+x,n[1]=l*f,n[5]=x*c+h,n[9]=m*c-y,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const h=o*l,m=o*c,y=a*l,x=a*c;n[0]=l*u,n[4]=x-h*f,n[8]=y*f+m,n[1]=f,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+y,n[10]=h-x*f}else if(e.order==="XZY"){const h=o*l,m=o*c,y=a*l,x=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+x,n[5]=o*u,n[9]=m*f-y,n[2]=y*f-m,n[6]=a*u,n[10]=x*f+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(aoe,e,loe)}lookAt(e,n,r){const i=this.elements;return Ki.subVectors(e,n),Ki.lengthSq()===0&&(Ki.z=1),Ki.normalize(),ul.crossVectors(r,Ki),ul.lengthSq()===0&&(Math.abs(r.z)===1?Ki.x+=1e-4:Ki.z+=1e-4,Ki.normalize(),ul.crossVectors(r,Ki)),ul.normalize(),my.crossVectors(Ki,ul),i[0]=ul.x,i[4]=my.x,i[8]=Ki.x,i[1]=ul.y,i[5]=my.y,i[9]=Ki.y,i[2]=ul.z,i[6]=my.z,i[10]=Ki.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[4],l=r[8],c=r[12],u=r[1],f=r[5],h=r[9],m=r[13],y=r[2],x=r[6],v=r[10],g=r[14],b=r[3],_=r[7],S=r[11],C=r[15],P=i[0],A=i[4],L=i[8],k=i[12],T=i[1],N=i[5],z=i[9],D=i[13],B=i[2],G=i[6],X=i[10],Z=i[14],F=i[3],q=i[7],K=i[11],Q=i[15];return s[0]=o*P+a*T+l*B+c*F,s[4]=o*A+a*N+l*G+c*q,s[8]=o*L+a*z+l*X+c*K,s[12]=o*k+a*D+l*Z+c*Q,s[1]=u*P+f*T+h*B+m*F,s[5]=u*A+f*N+h*G+m*q,s[9]=u*L+f*z+h*X+m*K,s[13]=u*k+f*D+h*Z+m*Q,s[2]=y*P+x*T+v*B+g*F,s[6]=y*A+x*N+v*G+g*q,s[10]=y*L+x*z+v*X+g*K,s[14]=y*k+x*D+v*Z+g*Q,s[3]=b*P+_*T+S*B+C*F,s[7]=b*A+_*N+S*G+C*q,s[11]=b*L+_*z+S*X+C*K,s[15]=b*k+_*D+S*Z+C*Q,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],m=e[14],y=e[3],x=e[7],v=e[11],g=e[15];return y*(+s*l*f-i*c*f-s*a*h+r*c*h+i*a*m-r*l*m)+x*(+n*l*m-n*c*h+s*o*h-i*o*m+i*c*u-s*l*u)+v*(+n*c*f-n*a*m-s*o*f+r*o*m+s*a*u-r*c*u)+g*(-i*a*u-n*l*f+n*a*h+i*o*f-r*o*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],m=e[11],y=e[12],x=e[13],v=e[14],g=e[15],b=f*v*c-x*h*c+x*l*m-a*v*m-f*l*g+a*h*g,_=y*h*c-u*v*c-y*l*m+o*v*m+u*l*g-o*h*g,S=u*x*c-y*f*c+y*a*m-o*x*m-u*a*g+o*f*g,C=y*f*l-u*x*l-y*a*h+o*x*h+u*a*v-o*f*v,P=n*b+r*_+i*S+s*C;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/P;return e[0]=b*A,e[1]=(x*h*s-f*v*s-x*i*m+r*v*m+f*i*g-r*h*g)*A,e[2]=(a*v*s-x*l*s+x*i*c-r*v*c-a*i*g+r*l*g)*A,e[3]=(f*l*s-a*h*s-f*i*c+r*h*c+a*i*m-r*l*m)*A,e[4]=_*A,e[5]=(u*v*s-y*h*s+y*i*m-n*v*m-u*i*g+n*h*g)*A,e[6]=(y*l*s-o*v*s-y*i*c+n*v*c+o*i*g-n*l*g)*A,e[7]=(o*h*s-u*l*s+u*i*c-n*h*c-o*i*m+n*l*m)*A,e[8]=S*A,e[9]=(y*f*s-u*x*s-y*r*m+n*x*m+u*r*g-n*f*g)*A,e[10]=(o*x*s-y*a*s+y*r*c-n*x*c-o*r*g+n*a*g)*A,e[11]=(u*a*s-o*f*s-u*r*c+n*f*c+o*r*m-n*a*m)*A,e[12]=C*A,e[13]=(u*x*i-y*f*i+y*r*h-n*x*h-u*r*v+n*f*v)*A,e[14]=(y*a*i-o*x*i-y*r*l+n*x*l+o*r*v-n*a*v)*A,e[15]=(o*f*i-u*a*i+u*r*l-n*f*l-o*r*h+n*a*h)*A,this}scale(e){const n=this.elements,r=e.x,i=e.y,s=e.z;return n[0]*=r,n[4]*=i,n[8]*=s,n[1]*=r,n[5]*=i,n[9]*=s,n[2]*=r,n[6]*=i,n[10]*=s,n[3]*=r,n[7]*=i,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),s=1-r,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*o,0,c*l-i*a,u*l+i*o,s*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,s,o){return this.set(1,r,s,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,u=o+o,f=a+a,h=s*c,m=s*u,y=s*f,x=o*u,v=o*f,g=a*f,b=l*c,_=l*u,S=l*f,C=r.x,P=r.y,A=r.z;return i[0]=(1-(x+g))*C,i[1]=(m+S)*C,i[2]=(y-_)*C,i[3]=0,i[4]=(m-S)*P,i[5]=(1-(h+g))*P,i[6]=(v+b)*P,i[7]=0,i[8]=(y+_)*A,i[9]=(v-b)*A,i[10]=(1-(h+x))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let s=cf.set(i[0],i[1],i[2]).length();const o=cf.set(i[4],i[5],i[6]).length(),a=cf.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],Ys.copy(this);const c=1/s,u=1/o,f=1/a;return Ys.elements[0]*=c,Ys.elements[1]*=c,Ys.elements[2]*=c,Ys.elements[4]*=u,Ys.elements[5]*=u,Ys.elements[6]*=u,Ys.elements[8]*=f,Ys.elements[9]*=f,Ys.elements[10]*=f,n.setFromRotationMatrix(Ys),r.x=s,r.y=o,r.z=a,this}makePerspective(e,n,r,i,s,o,a=so){const l=this.elements,c=2*s/(n-e),u=2*s/(r-i),f=(n+e)/(n-e),h=(r+i)/(r-i);let m,y;if(a===so)m=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===Om)m=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=y,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,s,o,a=so){const l=this.elements,c=1/(n-e),u=1/(r-i),f=1/(o-s),h=(n+e)*c,m=(r+i)*u;let y,x;if(a===so)y=(o+s)*f,x=-2*f;else if(a===Om)y=s*f,x=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=x,l[14]=-y,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const cf=new H,Ys=new Tt,aoe=new H(0,0,0),loe=new H(1,1,1),ul=new H,my=new H,Ki=new H,l4=new Tt,c4=new Bi;class cs{constructor(e=0,n=0,r=0,i=cs.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],u=i[9],f=i[2],h=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Nt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Nt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Nt(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Nt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Nt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Nt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return l4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(l4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return c4.setFromEuler(this),this.setFromQuaternion(c4,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}cs.DEFAULT_ORDER="XYZ";class Zc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),m.length>0&&(r.animations=m),y.length>0&&(r.nodes=y)}return r.object=i,r;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,n,r,i,s){Ks.subVectors(i,n),da.subVectors(r,n),kM.subVectors(e,n);const o=Ks.dot(Ks),a=Ks.dot(da),l=Ks.dot(kM),c=da.dot(da),u=da.dot(kM),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,m=(c*l-a*u)*h,y=(o*u-a*l)*h;return s.set(1-m-y,y,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,ha)===null?!1:ha.x>=0&&ha.y>=0&&ha.x+ha.y<=1}static getInterpolation(e,n,r,i,s,o,a,l){return this.getBarycoord(e,n,r,i,ha)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,ha.x),l.addScaledVector(o,ha.y),l.addScaledVector(a,ha.z),l)}static getInterpolatedAttribute(e,n,r,i,s,o){return FM.setScalar(0),zM.setScalar(0),UM.setScalar(0),FM.fromBufferAttribute(e,n),zM.fromBufferAttribute(e,r),UM.fromBufferAttribute(e,i),o.setScalar(0),o.addScaledVector(FM,s.x),o.addScaledVector(zM,s.y),o.addScaledVector(UM,s.z),o}static isFrontFacing(e,n,r,i){return Ks.subVectors(r,n),da.subVectors(e,n),Ks.cross(da).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ks.subVectors(this.c,this.b),da.subVectors(this.a,this.b),Ks.cross(da).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ii.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ii.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,s){return Ii.getInterpolation(e,this.a,this.b,this.c,n,r,i,s)}containsPoint(e){return Ii.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ii.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,s=this.c;let o,a;df.subVectors(i,r),hf.subVectors(s,r),LM.subVectors(e,r);const l=df.dot(LM),c=hf.dot(LM);if(l<=0&&c<=0)return n.copy(r);OM.subVectors(e,i);const u=df.dot(OM),f=hf.dot(OM);if(u>=0&&f<=u)return n.copy(i);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(r).addScaledVector(df,o);DM.subVectors(e,s);const m=df.dot(DM),y=hf.dot(DM);if(y>=0&&m<=y)return n.copy(s);const x=m*c-l*y;if(x<=0&&c>=0&&y<=0)return a=c/(c-y),n.copy(r).addScaledVector(hf,a);const v=u*y-m*f;if(v<=0&&f-u>=0&&m-y>=0)return m4.subVectors(s,i),a=(f-u)/(f-u+(m-y)),n.copy(i).addScaledVector(m4,a);const g=1/(v+x+h);return o=x*g,a=h*g,n.copy(r).addScaledVector(df,o).addScaledVector(hf,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const cB={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},fl={h:0,s:0,l:0},yy={h:0,s:0,l:0};function BM(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}let ot=class{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Ti){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,tn.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=tn.workingColorSpace){return this.r=e,this.g=n,this.b=r,tn.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=tn.workingColorSpace){if(e=cA(e,1),n=Nt(n,0,1),r=Nt(r,0,1),n===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;this.r=BM(o,s,e+1/3),this.g=BM(o,s,e),this.b=BM(o,s,e-1/3)}return tn.toWorkingColorSpace(this,i),this}setStyle(e,n=Ti){function r(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Ti){const r=cB[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Aa(e.r),this.g=Aa(e.g),this.b=Aa(e.b),this}copyLinearToSRGB(e){return this.r=hd(e.r),this.g=hd(e.g),this.b=hd(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ti){return tn.fromWorkingColorSpace($r.copy(this),e),Math.round(Nt($r.r*255,0,255))*65536+Math.round(Nt($r.g*255,0,255))*256+Math.round(Nt($r.b*255,0,255))}getHexString(e=Ti){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=tn.workingColorSpace){tn.fromWorkingColorSpace($r.copy(this),n);const r=$r.r,i=$r.g,s=$r.b,o=Math.max(r,i,s),a=Math.min(r,i,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case r:l=(i-s)/f+(i0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==qc&&(r.blending=this.blending),this.side!==Fa&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==Fx&&(r.blendSrc=this.blendSrc),this.blendDst!==zx&&(r.blendDst=this.blendDst),this.blendEquation!==xl&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==hu&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==bT&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Tc&&(r.stencilFail=this.stencilFail),this.stencilZFail!==Tc&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==Tc&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=i(e.textures),o=i(e.images);s.length>0&&(r.textures=s),o.length>0&&(r.images=o)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let s=0;s!==i;++s)r[s]=n[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class ql extends Jr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ot(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 cs,this.combine=mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const ba=poe();function poe(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(r[l]=1024>>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,s[l]=c|u}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ei(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Nt(t,-65504,65504),ba.floatView[0]=t;const e=ba.uint32View[0],n=e>>23&511;return ba.baseTable[n]+((e&8388607)>>ba.shiftTable[n])}function _p(t){const e=t>>10;return ba.uint32View[0]=ba.mantissaTable[ba.offsetTable[e]+(t&1023)]+ba.exponentTable[e],ba.floatView[0]}const moe={toHalfFloat:Ei,fromHalfFloat:_p},Qn=new H,vy=new Ne;let goe=0;class yn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:goe++}),this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Lm,this.updateRanges=[],this.gpuType=li,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,s=this.itemSize;in.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let r=0,i=n.length;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(i[l]=u,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,m=f.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s(e.far-e.near)**2))&&(g4.copy(s).invert(),fc.copy(e.ray).applyMatrix4(g4),!(r.boundingBox!==null&&fc.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,fc)))}_computeIntersections(e,n,r){let i;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,h=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let y=0,x=h.length;yn.far?null:{distance:c,point:My.clone(),object:t}}function Ey(t,e,n,r,i,s,o,a,l,c){t.getVertexPosition(a,by),t.getVertexPosition(l,_y),t.getVertexPosition(c,wy);const u=Moe(t,e,n,r,by,_y,wy,v4);if(u){const f=new H;Ii.getBarycoord(v4,by,_y,wy,f),i&&(u.uv=Ii.getInterpolatedAttribute(i,a,l,c,f,new Ne)),s&&(u.uv1=Ii.getInterpolatedAttribute(s,a,l,c,f,new Ne)),o&&(u.normal=Ii.getInterpolatedAttribute(o,a,l,c,f,new H),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new H,materialIndex:0};Ii.getNormal(by,_y,wy,h.normal),u.face=h,u.barycoord=f}return u}class Pu extends Bt{constructor(e=1,n=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,m=0;y("z","y","x",-1,-1,r,n,e,o,s,0),y("z","y","x",1,-1,r,n,-e,o,s,1),y("x","z","y",1,1,e,r,n,i,o,2),y("x","z","y",1,-1,e,r,-n,i,o,3),y("x","y","z",1,-1,e,n,r,i,s,4),y("x","y","z",-1,-1,e,n,-r,i,s,5),this.setIndex(l),this.setAttribute("position",new pt(c,3)),this.setAttribute("normal",new pt(u,3)),this.setAttribute("uv",new pt(f,2));function y(x,v,g,b,_,S,C,P,A,L,k){const T=S/A,N=C/L,z=S/2,D=C/2,B=P/2,G=A+1,X=L+1;let Z=0,F=0;const q=new H;for(let K=0;K0?1:-1,u.push(q.x,q.y,q.z),f.push(he/A),f.push(1-K/L),Z+=1}}for(let K=0;K0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class bg extends on{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Tt,this.projectionMatrix=new Tt,this.projectionMatrixInverse=new Tt,this.coordinateSystem=so}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const dl=new H,xk=new Ne,bk=new Ne;class xr extends bg{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=Nd*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Kc*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Nd*2*Math.atan(Math.tan(Kc*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,r){dl.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(dl.x,dl.y).multiplyScalar(-e/dl.z),dl.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(dl.x,dl.y).multiplyScalar(-e/dl.z)}getViewSize(e,n){return this.getViewBounds(e,xk,bk),n.subVectors(bk,xk)}setViewOffset(e,n,r,i,s,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Kc*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,s=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*i/l,n-=o.offsetY*r/c,i*=o.width/l,r*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const mf=-90,gf=1;class cB extends on{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new xr(mf,gf,e,n);i.layers=this.layers,this.add(i);const s=new xr(mf,gf,e,n);s.layers=this.layers,this.add(s);const o=new xr(mf,gf,e,n);o.layers=this.layers,this.add(o);const a=new xr(mf,gf,e,n);a.layers=this.layers,this.add(a);const l=new xr(mf,gf,e,n);l.layers=this.layers,this.add(l);const c=new xr(mf,gf,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===so)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Om)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,s),e.setRenderTarget(r,1,i),e.render(n,o),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=x,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(f,h,m),e.xr.enabled=y,r.texture.needsPMREMUpdate=!0}}class _g extends Hn{constructor(e,n,r,i,s,o,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:za,super(e,n,r,i,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class uB extends Xo{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new _g(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:cr}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class uo extends Jr{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Toe,this.fragmentShader=Coe,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ld(e.uniforms),this.uniformsGroups=Eoe(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?n.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[i]={type:"m4",value:o.toArray()}:n.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class bg extends on{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Tt,this.projectionMatrix=new Tt,this.projectionMatrixInverse=new Tt,this.coordinateSystem=so}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const dl=new H,x4=new Ne,b4=new Ne;class xr extends bg{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=kd*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Kc*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return kd*2*Math.atan(Math.tan(Kc*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,r){dl.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(dl.x,dl.y).multiplyScalar(-e/dl.z),dl.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(dl.x,dl.y).multiplyScalar(-e/dl.z)}getViewSize(e,n){return this.getViewBounds(e,x4,b4),n.subVectors(b4,x4)}setViewOffset(e,n,r,i,s,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Kc*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,s=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*i/l,n-=o.offsetY*r/c,i*=o.width/l,r*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const mf=-90,gf=1;class dB extends on{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new xr(mf,gf,e,n);i.layers=this.layers,this.add(i);const s=new xr(mf,gf,e,n);s.layers=this.layers,this.add(s);const o=new xr(mf,gf,e,n);o.layers=this.layers,this.add(o);const a=new xr(mf,gf,e,n);a.layers=this.layers,this.add(a);const l=new xr(mf,gf,e,n);l.layers=this.layers,this.add(l);const c=new xr(mf,gf,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===so)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Om)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,s),e.setRenderTarget(r,1,i),e.render(n,o),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=x,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(f,h,m),e.xr.enabled=y,r.texture.needsPMREMUpdate=!0}}class _g extends Hn{constructor(e,n,r,i,s,o,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:za,super(e,n,r,i,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class hB extends Xo{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new _g(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:cr}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -223,13 +223,13 @@ Error generating stack: `+s.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new Pu(5,5,5),s=new uo({name:"CubemapFromEquirect",uniforms:kd(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:di,blending:Ra});s.uniforms.tEquirect.value=n;const o=new nr(i,s),a=n.minFilter;return n.minFilter===Lo&&(n.minFilter=cr),new cB(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,r,i){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,r,i);e.setRenderTarget(s)}}let Zf=class extends on{constructor(){super(),this.isGroup=!0,this.type="Group"}};const boe={type:"move"};class Vv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Zf,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 Zf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Zf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const x of e.hand.values()){const v=n.getJointPose(x,r),g=this._getHandJoint(c,x);v!==null&&(g.matrix.fromArray(v.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=v.radius),g.visible=v!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),m=.02,y=.005;c.inputState.pinching&&h>m+y?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=m-y&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,r),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(boe)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Zf;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class p_{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new ot(e),this.density=n}clone(){return new p_(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class m_{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new ot(e),this.near=n,this.far=r}clone(){return new m_(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class pA extends on{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 cs,this.environmentIntensity=1,this.environmentRotation=new cs,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class g_{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Lm,this.updateRanges=[],this.version=0,this.uuid=os()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,s=this.stride;ie.far||n.push({distance:l,point:ep.clone(),uv:Ii.getInterpolation(ep,Ty,np,Cy,_k,$M,wk,new Ne),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ry(t,e,n,r,i,s){bf.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(tp.x=s*bf.x-i*bf.y,tp.y=i*bf.x+s*bf.y):tp.copy(bf),t.copy(e),t.x+=tp.x,t.y+=tp.y,t.applyMatrix4(fB)}const Ay=new H,Sk=new H;class hB extends on{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){Ay.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Ay);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){Ay.setFromMatrixPosition(e.matrixWorld),Sk.setFromMatrixPosition(this.matrixWorld);const r=Ay.distanceTo(Sk)/e.zoom;n[0].object.visible=!0;let i,s;for(i=1,s=n.length;i=o)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i1?null:n.copy(e.start).addScaledVector(r,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||Eoe.getNormalMatrix(e),i=this.coplanarPoint(GM).applyMatrix4(e),s=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const dc=new Kr,Ny=new H;class wg{constructor(e=new gl,n=new gl,r=new gl,i=new gl,s=new gl,o=new gl){this.planes=[e,n,r,i,s,o]}set(e,n,r,i,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=so){const r=this.planes,i=e.elements,s=i[0],o=i[1],a=i[2],l=i[3],c=i[4],u=i[5],f=i[6],h=i[7],m=i[8],y=i[9],x=i[10],v=i[11],g=i[12],b=i[13],_=i[14],S=i[15];if(r[0].setComponents(l-s,h-c,v-m,S-g).normalize(),r[1].setComponents(l+s,h+c,v+m,S+g).normalize(),r[2].setComponents(l+o,h+u,v+y,S+b).normalize(),r[3].setComponents(l-o,h-u,v-y,S-b).normalize(),r[4].setComponents(l-a,h-f,v-x,S-_).normalize(),n===so)r[5].setComponents(l+a,h+f,v+x,S+_).normalize();else if(n===Om)r[5].setComponents(a,f,x,_).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),dc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),dc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(dc)}intersectsSprite(e){return dc.center.set(0,0,0),dc.radius=.7071067811865476,dc.applyMatrix4(e.matrixWorld),this.intersectsSphere(dc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(r)0?e.max.x:e.min.x,Ny.y=i.normal.y>0?e.max.y:e.min.y,Ny.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Ny)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function XM(t,e){return t-e}function Toe(t,e){return t.z-e.z}function Coe(t,e){return e.z-t.z}class Roe{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,n,r,i){const s=this.pool,o=this.list;this.index>=s.length&&s.push({start:-1,count:-1,z:-1,index:-1});const a=s[this.index];o.push(a),this.index++,a.start=e,a.count=n,a.z=r,a.index=i}reset(){this.list.length=0,this.index=0}}const Mi=new Tt,Aoe=new ot(1,1,1),qM=new wg,ky=new kr,hc=new Kr,sp=new H,Nk=new H,Poe=new H,YM=new Roe,Wr=new nr,Ly=[];function Ioe(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let s=0;s65535?new Uint32Array(i):new Uint16Array(i);n.setIndex(new yn(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(!e.hasAttribute(r))throw new Error(`THREE.BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),s=n.getAttribute(r);if(i.itemSize!==s.itemSize||i.normalized!==s.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const n=this._instanceInfo;if(e<0||e>=n.length||n[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const n=this._geometryInfo;if(e<0||e>=n.length||n[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.boundingBox,n=this._instanceInfo;e.makeEmpty();for(let r=0,i=n.length;r=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const r={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(XM),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=r):(i=this._instanceInfo.length,this._instanceInfo.push(r));const s=this._matricesTexture;Mi.identity().toArray(s.image.data,i*16),s.needsUpdate=!0;const o=this._colorsTexture;return o&&(Aoe.toArray(o.image.data,i*4),o.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,n=-1,r=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},s=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=n===-1?e.getAttribute("position").count:n;const o=e.getIndex();if(o!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=r===-1?o.count:r),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(XM),l=this._availableGeometryIds.shift(),s[l]=i):(l=this._geometryCount,this._geometryCount++,s.push(i)),this.setGeometryAt(l,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,l}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,s=r.getIndex(),o=n.getIndex(),a=this._geometryInfo[e];if(i&&o.count>a.reservedIndexCount||n.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=n.getAttribute("position").count;for(const u in r.attributes){const f=n.getAttribute(u),h=r.getAttribute(u);Ioe(f,h,l);const m=f.itemSize;for(let y=f.count,x=c;y=n.length||n[e].active===!1)return this;const r=this._instanceInfo;for(let i=0,s=r.length;ia).sort((o,a)=>r[o].vertexStart-r[a].vertexStart),s=this.geometry;for(let o=0,a=r.length;o=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const s=new kr,o=r.index,a=r.attributes.position;for(let l=i.start,c=i.start+i.count;l=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const s=new Kr;this.getBoundingBoxAt(e,ky),ky.getCenter(s.center);const o=r.index,a=r.attributes.position;let l=0;for(let c=i.start,u=i.start+i.count;ca.active);if(Math.max(...r.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${n}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...r.map(l=>l.indexStart+l.reservedIndexCount))>n)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${n}. Cannot shrink further.`);const s=this.geometry;s.dispose(),this._maxVertexCount=e,this._maxIndexCount=n,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new Bt,this._initializeGeometry(s));const o=this.geometry;s.index&&pc(s.index.array,o.index.array);for(const a in s.attributes)pc(s.attributes[a].array,o.attributes[a].array)}raycast(e,n){const r=this._instanceInfo,i=this._geometryInfo,s=this.matrixWorld,o=this.geometry;Wr.material=this.material,Wr.geometry.index=o.index,Wr.geometry.attributes=o.attributes,Wr.geometry.boundingBox===null&&(Wr.geometry.boundingBox=new kr),Wr.geometry.boundingSphere===null&&(Wr.geometry.boundingSphere=new Kr);for(let a=0,l=r.length;a({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null,boundingSphere:n.boundingSphere!==null?n.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(n=>({...n})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,r,i,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=i.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,m=this._indirectTexture,y=m.image.data;h&&(Mi.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),qM.setFromProjectionMatrix(Mi,e.coordinateSystem));let x=0;if(this.sortObjects){Mi.copy(this.matrixWorld).invert(),sp.setFromMatrixPosition(r.matrixWorld).applyMatrix4(Mi),Nk.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(Mi);for(let b=0,_=l.length;b<_;b++)if(l[b].visible&&l[b].active){const S=l[b].geometryIndex;this.getMatrixAt(b,Mi),this.getBoundingSphereAt(S,hc).applyMatrix4(Mi);let C=!1;if(h&&(C=!qM.intersectsSphere(hc)),!C){const P=f[S],A=Poe.subVectors(hc.center,sp).dot(Nk);YM.push(P.start,P.count,A,b)}}const v=YM.list,g=this.customSort;g===null?v.sort(s.transparent?Coe:Toe):g.call(this,v,r);for(let b=0,_=v.length;b<_;b++){const S=v[b];c[x]=S.start*a,u[x]=S.count,y[x]=S.index,x++}YM.reset()}else for(let v=0,g=l.length;v0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;sr)return;KM.applyMatrix4(t.matrixWorld);const c=e.ray.origin.distanceTo(KM);if(!(ce.far))return{distance:c,point:Lk.clone().applyMatrix4(t.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:t}}const Ok=new H,Dk=new H;class ea extends Ba{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,r=[];for(let i=0,s=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;si.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class xB extends Hn{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:cr,this.magFilter=s!==void 0?s:cr,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class Noe extends xB{constructor(e,n,r,i,s,o,a,l){super({},e,n,r,i,s,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class koe extends Hn{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=Sr,this.minFilter=Sr,this.generateMipmaps=!1,this.needsUpdate=!0}}class v_ extends Hn{constructor(e,n,r,i,s,o,a,l,c,u,f,h){super(null,o,a,l,c,u,i,s,f,h),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Loe extends v_{constructor(e,n,r,i,s,o){super(e,n,r,s,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Li,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class Ooe extends v_{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,za),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class Doe extends Hn{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class vA extends Hn{constructor(e,n,r,i,s,o,a,l,c,u=Yc){if(u!==Yc&&u!==mu)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&u===Yc&&(r=Ua),r===void 0&&u===mu&&(r=pu),super(null,i,s,o,a,l,u,r,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:Sr,this.minFilter=l!==void 0?l:Sr,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class mo{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),s=0;n.push(0);for(let o=1;o<=e;o++)r=this.getPoint(o/e),s+=r.distanceTo(i),n.push(s),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const s=r.length;let o;n?o=n:o=e*r[s-1];let a=0,l=s-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===o)return i/(s-1);const u=r[i],h=r[i+1]-u,m=(o-u)/h;return(i+m)/(s-1)}getTangent(e,n){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const o=this.getPoint(i),a=this.getPoint(s),l=n||(o.isVector2?new Ne:new H);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new H,i=[],s=[],o=[],a=new H,l=new Tt;for(let m=0;m<=e;m++){const y=m/e;i[m]=this.getTangentAt(y,new H)}s[0]=new H,o[0]=new H;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),f=Math.abs(i[0].y),h=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),f<=c&&(c=f,r.set(0,1,0)),h<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),s[0].crossVectors(i[0],a),o[0].crossVectors(i[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(Nt(i[m-1].dot(i[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,y))}o[m].crossVectors(i[m],s[m])}if(n===!0){let m=Math.acos(Nt(s[0].dot(s[e]),-1,1));m/=e,i[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(i[y],m*y)),o[y].crossVectors(i[y],s[y])}return{tangents:i,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class x_ extends mo{constructor(e=0,n=0,r=1,i=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new Ne){const r=n,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%s]:(Uy.subVectors(i[0],i[1]).add(i[0]),c=Uy);const f=i[a%s],h=i[(a+1)%s];if(this.closed||a+2i.length-2?i.length-1:o+1],f=i[o>i.length-3?i.length-1:o+2];return r.set(Uk(a,l.x,c.x,u.x,f.x),Uk(a,l.y,c.y,u.y,f.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const o=i[s]-r,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Sg extends Bt{constructor(e=[new Ne(0,-.5),new Ne(.5,0),new Ne(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=Nt(i,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/n,f=new H,h=new Ne,m=new H,y=new H,x=new H;let v=0,g=0;for(let b=0;b<=e.length-1;b++)switch(b){case 0:v=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-v,m.z=g*0,x.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(x.x,x.y,x.z);break;default:v=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-v,m.z=g*0,y.copy(m),m.x+=x.x,m.y+=x.y,m.z+=x.z,m.normalize(),l.push(m.x,m.y,m.z),x.copy(y)}for(let b=0;b<=n;b++){const _=r+b*u*i,S=Math.sin(_),C=Math.cos(_);for(let P=0;P<=e.length-1;P++){f.x=e[P].x*S,f.y=e[P].y,f.z=e[P].x*C,o.push(f.x,f.y,f.z),h.x=b/n,h.y=P/(e.length-1),a.push(h.x,h.y);const A=l[3*P+0]*S,L=l[3*P+1],k=l[3*P+0]*C;c.push(A,L,k)}}for(let b=0;b0&&_(!0),n>0&&_(!1)),this.setIndex(u),this.setAttribute("position",new pt(f,3)),this.setAttribute("normal",new pt(h,3)),this.setAttribute("uv",new pt(m,2));function b(){const S=new H,C=new H;let P=0;const A=(n-e)/r;for(let L=0;L<=s;L++){const k=[],T=L/s,N=T*(n-e)+e;for(let z=0;z<=i;z++){const D=z/i,B=D*l+a,G=Math.sin(B),X=Math.cos(B);C.x=N*G,C.y=-T*r+v,C.z=N*X,f.push(C.x,C.y,C.z),S.set(G,A,X).normalize(),h.push(S.x,S.y,S.z),m.push(D,1-T),k.push(y++)}x.push(k)}for(let L=0;L0||k!==0)&&(u.push(T,N,D),P+=3),(n>0||k!==s-1)&&(u.push(N,z,D),P+=3)}c.addGroup(g,P,0),g+=P}function _(S){const C=y,P=new Ne,A=new H;let L=0;const k=S===!0?e:n,T=S===!0?1:-1;for(let z=1;z<=i;z++)f.push(0,v*T,0),h.push(0,T,0),m.push(.5,.5),y++;const N=y;for(let z=0;z<=i;z++){const B=z/i*l+a,G=Math.cos(B),X=Math.sin(B);A.x=k*X,A.y=v*T,A.z=k*G,f.push(A.x,A.y,A.z),h.push(0,T,0),P.x=G*.5+.5,P.y=X*.5*T+.5,m.push(P.x,P.y),y++}for(let z=0;z.9&&A<.1&&(_<.2&&(o[b+0]+=1),S<.2&&(o[b+2]+=1),C<.2&&(o[b+4]+=1))}}function h(b){s.push(b.x,b.y,b.z)}function m(b,_){const S=b*3;_.x=e[S+0],_.y=e[S+1],_.z=e[S+2]}function y(){const b=new H,_=new H,S=new H,C=new H,P=new Ne,A=new Ne,L=new Ne;for(let k=0,T=0;k80*n){a=c=t[0],l=u=t[1];for(let y=n;yc&&(c=f),h>u&&(u=h);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return zm(s,o,n,a,l,m,0),o}};function TB(t,e,n,r,i){let s,o;if(i===oae(t,e,n,r)>0)for(s=e;s=e;s-=r)o=Bk(s,t[s],t[s+1],o);return o&&M_(o,o.next)&&(Bm(o),o=o.next),o}function vu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(M_(n,n.next)||Ln(n.prev,n,n.next)===0)){if(Bm(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function zm(t,e,n,r,i,s,o){if(!t)return;!o&&s&&eae(t,r,i,s);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?Goe(t,r,i,s):Hoe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Bm(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=Xoe(vu(t),e,n),zm(t,e,n,r,i,s,2)):o===2&&qoe(t,e,n,r,i,s):zm(vu(t),e,n,r,i,s,1);break}}}function Hoe(t){const e=t.prev,n=t,r=t.next;if(Ln(e,n,r)>=0)return!1;const i=e.x,s=n.x,o=r.x,a=e.y,l=n.y,c=r.y,u=is?i>o?i:o:s>o?s:o,m=a>l?a>c?a:c:l>c?l:c;let y=r.next;for(;y!==e;){if(y.x>=u&&y.x<=h&&y.y>=f&&y.y<=m&&Jf(i,a,s,l,o,c,y.x,y.y)&&Ln(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function Goe(t,e,n,r){const i=t.prev,s=t,o=t.next;if(Ln(i,s,o)>=0)return!1;const a=i.x,l=s.x,c=o.x,u=i.y,f=s.y,h=o.y,m=al?a>c?a:c:l>c?l:c,v=u>f?u>h?u:h:f>h?f:h,g=MT(m,y,e,n,r),b=MT(x,v,e,n,r);let _=t.prevZ,S=t.nextZ;for(;_&&_.z>=g&&S&&S.z<=b;){if(_.x>=m&&_.x<=x&&_.y>=y&&_.y<=v&&_!==i&&_!==o&&Jf(a,u,l,f,c,h,_.x,_.y)&&Ln(_.prev,_,_.next)>=0||(_=_.prevZ,S.x>=m&&S.x<=x&&S.y>=y&&S.y<=v&&S!==i&&S!==o&&Jf(a,u,l,f,c,h,S.x,S.y)&&Ln(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;_&&_.z>=g;){if(_.x>=m&&_.x<=x&&_.y>=y&&_.y<=v&&_!==i&&_!==o&&Jf(a,u,l,f,c,h,_.x,_.y)&&Ln(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;S&&S.z<=b;){if(S.x>=m&&S.x<=x&&S.y>=y&&S.y<=v&&S!==i&&S!==o&&Jf(a,u,l,f,c,h,S.x,S.y)&&Ln(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function Xoe(t,e,n){let r=t;do{const i=r.prev,s=r.next.next;!M_(i,s)&&CB(i,r,r.next,s)&&Um(i,s)&&Um(s,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),Bm(r),Bm(r.next),r=t=s),r=r.next}while(r!==t);return vu(r)}function qoe(t,e,n,r,i,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&rae(o,a)){let l=RB(o,a);o=vu(o,o.next),l=vu(l,l.next),zm(o,e,n,r,i,s,0),zm(l,e,n,r,i,s,0);return}a=a.next}o=o.next}while(o!==t)}function Yoe(t,e,n,r){const i=[];let s,o,a,l,c;for(s=0,o=e.length;s=n.next.y&&n.next.y!==n.y){const h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=s&&h>r&&(r=h,i=n.x=n.x&&n.x>=l&&s!==n.x&&Jf(oi.x||n.x===i.x&&Qoe(i,n)))&&(i=n,u=f)),n=n.next;while(n!==a);return i}function Qoe(t,e){return Ln(t.prev,t,e.prev)<0&&Ln(e.next,t,t.next)<0}function eae(t,e,n,r){let i=t;do i.z===0&&(i.z=MT(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,tae(i)}function tae(t){let e,n,r,i,s,o,a,l,c=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;n=r}s.nextZ=null,c*=2}while(o>1);return t}function MT(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function nae(t){let e=t,n=t;do(e.x=(t-o)*(s-a)&&(t-o)*(r-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(i-o)*(r-a)}function rae(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!iae(t,e)&&(Um(t,e)&&Um(e,t)&&sae(t,e)&&(Ln(t.prev,t,e.prev)||Ln(t,e.prev,e))||M_(t,e)&&Ln(t.prev,t,t.next)>0&&Ln(e.prev,e,e.next)>0)}function Ln(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function M_(t,e){return t.x===e.x&&t.y===e.y}function CB(t,e,n,r){const i=Wy(Ln(t,e,n)),s=Wy(Ln(t,e,r)),o=Wy(Ln(n,r,t)),a=Wy(Ln(n,r,e));return!!(i!==s&&o!==a||i===0&&$y(t,n,e)||s===0&&$y(t,r,e)||o===0&&$y(n,t,r)||a===0&&$y(n,e,r))}function $y(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Wy(t){return t>0?1:t<0?-1:0}function iae(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&CB(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Um(t,e){return Ln(t.prev,t,t.next)<0?Ln(t,e,t.next)>=0&&Ln(t,t.prev,e)>=0:Ln(t,e,t.prev)<0||Ln(t,t.next,e)<0}function sae(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function RB(t,e){const n=new ET(t.i,t.x,t.y),r=new ET(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function Bk(t,e,n,r){const i=new ET(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Bm(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ET(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function oae(t,e,n,r){let i=0;for(let s=e,o=n-r;s2&&t[e-1].equals(t[0])&&t.pop()}function Vk(t,e){for(let n=0;nNumber.EPSILON){const le=Math.sqrt(U),Te=Math.sqrt(ke*ke+$*$),ye=oe.x-Ye/le,Ge=oe.y+ue/le,Ae=V.x-$/Te,Ee=V.y+ke/Te,_t=((Ae-ye)*$-(Ee-Ge)*ke)/(ue*$-Ye*ke);Ie=ye+ue*_t-ae.x,Re=Ge+Ye*_t-ae.y;const Le=Ie*Ie+Re*Re;if(Le<=2)return new Ne(Ie,Re);De=Math.sqrt(Le/2)}else{let le=!1;ue>Number.EPSILON?ke>Number.EPSILON&&(le=!0):ue<-Number.EPSILON?ke<-Number.EPSILON&&(le=!0):Math.sign(Ye)===Math.sign($)&&(le=!0),le?(Ie=-Ye,Re=ue,De=Math.sqrt(U)):(Ie=ue,Re=Ye,De=Math.sqrt(U/2))}return new Ne(Ie/De,Re/De)}const q=[];for(let ae=0,oe=B.length,V=oe-1,Ie=ae+1;ae=0;ae--){const oe=ae/v,V=m*Math.cos(oe*Math.PI/2),Ie=y*Math.sin(oe*Math.PI/2)+x;for(let Re=0,De=B.length;Re=0;){const Ie=V;let Re=V-1;Re<0&&(Re=ae.length-1);for(let De=0,ue=u+v*2;De0)&&m.push(_,S,P),(g!==r-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class kB extends Jr{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new ot(16777215),this.specular=new ot(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ot(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new cs,this.combine=mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class LB extends Jr{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ot(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ot(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class OB extends Jr{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class DB extends Jr{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new ot(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ot(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new cs,this.combine=mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class TA extends Jr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=G6,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class CA extends Jr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class FB extends Jr{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ot(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class zB extends gi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function jc(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function UB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function BB(t){function e(i,s){return t[i]-t[s]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function TT(t,e,n){const r=t.length,i=new t.constructor(r);for(let s=0,o=0;o!==r;++s){const a=n[s]*e;for(let l=0;l!==e;++l)i[o++]=t[a+l]}return i}function RA(t,e,n,r){let i=1,s=t[0];for(;s!==void 0&&s[r]===void 0;)s=t[i++];if(s===void 0)return;let o=s[r];if(o!==void 0)if(Array.isArray(o))do o=s[r],o!==void 0&&(e.push(s.time),n.push.apply(n,o)),s=t[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[r],o!==void 0&&(e.push(s.time),o.toArray(n,n.length)),s=t[i++];while(s!==void 0);else do o=s[r],o!==void 0&&(e.push(s.time),n.push(o)),s=t[i++];while(s!==void 0)}function uae(t,e,n,r,i=30){const s=t.clone();s.name=e;const o=[];for(let l=0;l=r)){f.push(c.times[m]);for(let x=0;xs.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const g=y*f+u,b=g+f-u;x=a.values.slice(g,b)}else{const g=a.createInterpolant(),b=u,_=f-u;g.evaluate(s),x=g.resultBuffer.slice(b,_)}l==="quaternion"&&new Bi().fromArray(x).normalize().conjugate().toArray(x);const v=c.times.length;for(let g=0;g=s)){const a=n[1];e=s)break t}o=r,r=0;break n}break e}for(;r>>1;en;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=r.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,s=r.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&UB(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===jv,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*r,l=o*r,c=0;c!==r;++c)n[l+c]=n[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}go.prototype.TimeBufferType=Float32Array;go.prototype.ValueBufferType=Float32Array;go.prototype.DefaultInterpolation=v1;class Iu extends go{constructor(e,n,r){super(e,n,r)}}Iu.prototype.ValueTypeName="bool";Iu.prototype.ValueBufferType=Array;Iu.prototype.DefaultInterpolation=Im;Iu.prototype.InterpolantFactoryMethodLinear=void 0;Iu.prototype.InterpolantFactoryMethodSmooth=void 0;class PA extends go{}PA.prototype.ValueTypeName="color";class jm extends go{}jm.prototype.ValueTypeName="number";class $B extends Tg{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)Bi.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Cg extends go{InterpolantFactoryMethodLinear(e){return new $B(this.times,this.values,this.getValueSize(),e)}}Cg.prototype.ValueTypeName="quaternion";Cg.prototype.InterpolantFactoryMethodSmooth=void 0;class Nu extends go{constructor(e,n,r){super(e,n,r)}}Nu.prototype.ValueTypeName="string";Nu.prototype.ValueBufferType=Array;Nu.prototype.DefaultInterpolation=Im;Nu.prototype.InterpolantFactoryMethodLinear=void 0;Nu.prototype.InterpolantFactoryMethodSmooth=void 0;class Vm extends go{}Vm.prototype.ValueTypeName="vector";class $m{constructor(e="",n=-1,r=[],i=f_){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=os(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let o=0,a=r.length;o!==a;++o)n.push(pae(r[o]).scale(i));const s=new this(e.name,e.duration,n,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=r.length;s!==o;++s)n.push(go.toJSON(r[s]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const s=n.length,o=[];for(let a=0;a1){const f=u[1];let h=i[f];h||(i[f]=h=[]),h.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,h,m,y,x){if(m.length!==0){const v=[],g=[];RA(m,v,g,y),v.length!==0&&x.push(new f(h,v,g))}},i=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{n&&n(s),this.manager.itemEnd(e)},0),s;if(pa[e]!==void 0){pa[e].push({onLoad:n,onProgress:r,onError:i});return}pa[e]=[],pa[e].push({onLoad:n,onProgress:r,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=pa[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=h?parseInt(h):0,y=m!==0;let x=0;const v=new ReadableStream({start(g){b();function b(){f.read().then(({done:_,value:S})=>{if(_)g.close();else{x+=S.byteLength;const C=new ProgressEvent("progress",{lengthComputable:y,loaded:x,total:m});for(let P=0,A=u.length;P{g.error(_)})}}});return new Response(v)}else throw new mae(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,m=new TextDecoder(h);return c.arrayBuffer().then(y=>m.decode(y))}}}).then(c=>{Ma.add(e,c);const u=pa[e];delete pa[e];for(let f=0,h=u.length;f{const u=pa[e];if(u===void 0)throw this.manager.itemError(e),c;delete pa[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class gae extends Wi{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new ja(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(i.uniforms[s]={},o.type){case"t":i.uniforms[s].value=r(o.value);break;case"c":i.uniforms[s].value=new ot().setHex(o.value);break;case"v2":i.uniforms[s].value=new Ne().fromArray(o.value);break;case"v3":i.uniforms[s].value=new H().fromArray(o.value);break;case"v4":i.uniforms[s].value=new nn().fromArray(o.value);break;case"m3":i.uniforms[s].value=new Dt().fromArray(o.value);break;case"m4":i.uniforms[s].value=new Tt().fromArray(o.value);break;default:i.uniforms[s].value=o.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)i.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),i.normalScale=new Ne().fromArray(s)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Ne().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return k_.createMaterialFromType(e)}static createMaterialFromType(e){const n={ShadowMaterial:PB,SpriteMaterial:mA,RawShaderMaterial:IB,ShaderMaterial:uo,PointsMaterial:yA,MeshPhysicalMaterial:NB,MeshStandardMaterial:EA,MeshPhongMaterial:kB,MeshToonMaterial:LB,MeshNormalMaterial:OB,MeshLambertMaterial:DB,MeshDepthMaterial:TA,MeshDistanceMaterial:CA,MeshBasicMaterial:ql,MeshMatcapMaterial:FB,LineDashedMaterial:zB,LineBasicMaterial:gi,Material:Jr};return new n[e]}}class CT{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new IA(n);s=new Wm(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new Wm(this.manager),i.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const v=new kr;v.min.fromArray(x.boxMin),v.max.fromArray(x.boxMax);const g=new Kr;return g.radius=x.sphereRadius,g.center.fromArray(x.sphereCenter),{boxInitialized:x.boxInitialized,box:v,sphereInitialized:x.sphereInitialized,sphere:g}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":o=new hB;break;case"Line":o=new Ba(a(e.geometry),l(e.material));break;case"LineLoop":o=new yB(a(e.geometry),l(e.material));break;case"LineSegments":o=new ea(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new vB(a(e.geometry),l(e.material));break;case"Sprite":o=new dB(l(e.material));break;case"Group":o=new Zf;break;case"Bone":o=new gA;break;default:o=new on}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let m=0;m"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Ma.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{n&&n(c),s.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return Ma.add(e,c),n&&n(c),s.manager.itemEnd(e),c}).catch(function(c){i&&i(c),Ma.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Ma.add(e,l),s.manager.itemStart(e)}}let Hy;class kA{static getContext(){return Hy===void 0&&(Hy=new(window.AudioContext||window.webkitAudioContext)),Hy}static setContext(e){Hy=e}}class Cae extends Wi{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new ja(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);kA.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),s.manager.itemError(e)}}}const Kk=new Tt,Zk=new Tt,mc=new Tt;class Rae{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new xr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new xr,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,mc.copy(e.projectionMatrix);const i=n.eyeSep/2,s=i*n.near/n.focus,o=n.near*Math.tan(Kc*n.fov*.5)/n.zoom;let a,l;Zk.elements[12]=-i,Kk.elements[12]=i,a=-o*n.aspect+s,l=o*n.aspect+s,mc.elements[0]=2*n.near/(l-a),mc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(mc),a=-o*n.aspect-s,l=o*n.aspect-s,mc.elements[0]=2*n.near/(l-a),mc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(mc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Zk),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Kk)}}class t8 extends xr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e,this.index=0}}class LA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Jk(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=Jk();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function Jk(){return performance.now()}const gc=new H,Qk=new Bi,Aae=new H,yc=new H;class Pae extends on{constructor(){super(),this.type="AudioListener",this.context=kA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new LA}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(gc,Qk,Aae),yc.set(0,0,-1).applyQuaternion(Qk),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(gc.x,i),n.positionY.linearRampToValueAtTime(gc.y,i),n.positionZ.linearRampToValueAtTime(gc.z,i),n.forwardX.linearRampToValueAtTime(yc.x,i),n.forwardY.linearRampToValueAtTime(yc.y,i),n.forwardZ.linearRampToValueAtTime(yc.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(gc.x,gc.y,gc.z),n.setOrientation(yc.x,yc.y,yc.z,r.x,r.y,r.z)}}class n8 extends on{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let s=r,o=i;s!==o;++s)n[s]=n[i+s%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let o=0;o!==s;++o)e[n+o]=e[r+o]}_slerp(e,n,r,i){Bi.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,s){const o=this._workIndex*s;Bi.multiplyQuaternionsFlat(e,o,e,n,e,r),Bi.slerpFlat(e,n,e,n,e,o,i)}_lerp(e,n,r,i,s){const o=1-i;for(let a=0;a!==s;++a){const l=n+a;e[l]=e[l]*o+e[r+a]*i}}_lerpAdditive(e,n,r,i,s){for(let o=0;o!==s;++o){const a=n+o;e[a]=e[a]+e[r+o]*i}}}const OA="\\[\\]\\.:\\/",Lae=new RegExp("["+OA+"]","g"),DA="[^"+OA+"]",Oae="[^"+OA.replace("\\.","")+"]",Dae=/((?:WC+[\/:])*)/.source.replace("WC",DA),Fae=/(WCOD+)?/.source.replace("WCOD",Oae),zae=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",DA),Uae=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",DA),Bae=new RegExp("^"+Dae+Fae+zae+Uae+"$"),jae=["material","materials","bones","map"];class Vae{constructor(e,n,r){const i=r||rn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=r.length;i!==s;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class rn{constructor(e,n,r){this.path=n,this.parsedPath=r||rn.parseTrackName(n),this.node=rn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new rn.Composite(e,n,r):new rn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Lae,"")}static parseTrackName(e){const n=Bae.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=r.nodeName.substring(i+1);jae.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(s){for(let o=0;o=s){const f=s++,h=e[f];n[h.uuid]=u,e[u]=h,n[c]=f,e[f]=l;for(let m=0,y=i;m!==y;++m){const x=r[m],v=x[f],g=x[u];x[u]=v,x[f]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=n[u];if(f!==void 0)if(delete n[u],f0&&(n[m.uuid]=f),e[f]=m,e.pop();for(let y=0,x=i;y!==x;++y){const v=r[y];v[f]=v[h],v.pop()}}}this.nCachedObjects_=s}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const s=this._bindings;if(i!==void 0)return s[i];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);i=s.length,r[e]=i,o.push(e),a.push(n),s.push(f);for(let h=u,m=l.length;h!==m;++h){const y=l[h];f[h]=new rn(y,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];n[c]=r,o[r]=l,o.pop(),s[r]=s[a],s.pop(),i[r]=i[a],i.pop()}}}class i8{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const s=n.tracks,o=s.length,a=new Array(o),l={endingStart:zc,endingEnd:zc};for(let c=0;c!==o;++c){const u=s[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=W6,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,s=e._clip.duration,o=s/i,a=i/s;e.warp(1,o,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,s=i.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+r,c[0]=e/o,c[1]=n/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const o=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case cA:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case f_:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,s=this._loopCount;const o=r===H6;if(e===0)return s===-1?i:o&&(s&1)===1?n-i:i;if(r===$6){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(o&&(s&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Uc,i.endingEnd=Uc):(e?i.endingStart=this.zeroSlopeAtStart?Uc:zc:i.endingStart=Nm,n?i.endingEnd=this.zeroSlopeAtEnd?Uc:zc:i.endingEnd=Nm)}_scheduleFading(e,n,r){const i=this._mixer,s=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=n,a[1]=s+e,l[1]=r,this}}const Wae=new Float32Array(1);class Hae extends Qo{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,s=i.length,o=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==s;++f){const h=i[f],m=h.name;let y=u[m];if(y!==void 0)++y.referenceCount,o[f]=y;else{if(y=o[f],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,m));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;y=new r8(rn.create(r,m,x),h.ValueTypeName,h.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,m),o[f]=y}a[f].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let n=0;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,rL).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const iL=new H,Gy=new H;class tle{constructor(e=new H,n=new H){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){iL.subVectors(e,this.start),Gy.subVectors(this.end,this.start);const r=Gy.dot(Gy);let s=Gy.dot(iL)/r;return n&&(s=Nt(s,0,1)),s}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const sL=new H;class nle extends on{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Bt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{uL.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(uL,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class mle extends ea{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Bt;i.setAttribute("position",new pt(n,3)),i.setAttribute("color",new pt(r,3));const s=new gi({vertexColors:!0,toneMapped:!1});super(i,s),this.type="AxesHelper"}setColors(e,n,r){const i=new ot,s=this.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(n),i.toArray(s,6),i.toArray(s,9),i.set(r),i.toArray(s,12),i.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class gle{constructor(){this.type="ShapePath",this.color=new ot,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Fm,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,s,o){return this.currentPath.bezierCurveTo(e,n,r,i,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const b=[];for(let _=0,S=g.length;_Number.EPSILON){if(T<0&&(A=b[P],k=-k,L=b[C],T=-T),g.yL.y)continue;if(g.y===A.y){if(g.x===A.x)return!0}else{const N=T*(g.x-A.x)-k*(g.y-A.y);if(N===0)return!0;if(N<0)continue;S=!S}}else{if(g.y!==A.y)continue;if(L.x<=g.x&&g.x<=A.x||A.x<=g.x&&g.x<=L.x)return!0}}return S}const i=jo.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new Jc,l.curves=a.curves,c.push(l),c;let u=!i(s[0].getPoints());u=e?!u:u;const f=[],h=[];let m=[],y=0,x;h[y]=void 0,m[y]=[];for(let g=0,b=s.length;g1){let g=!1,b=0;for(let _=0,S=h.length;_0&&g===!1&&(m=f)}let v;for(let g=0,b=h.length;ge?(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}function xle(t,e){const n=t.image&&t.image.width?t.image.width/t.image.height:1;return n>e?(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}function ble(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function AT(t,e,n,r){const i=_le(r);switch(n){case rA:return t*e;case sA:return t*e;case oA:return t*e*2;case yg:return t*e/i.components*i.byteLength;case vg:return t*e/i.components*i.byteLength;case aA:return t*e*2/i.components*i.byteLength;case c_:return t*e*2/i.components*i.byteLength;case iA:return t*e*3/i.components*i.byteLength;case Ir:return t*e*4/i.components*i.byteLength;case u_:return t*e*4/i.components*i.byteLength;case zp:case Up:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Bp:case jp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Xx:case Yx:return Math.max(t,16)*Math.max(e,8)/4;case Gx:case qx:return Math.max(t,8)*Math.max(e,8)/2;case Kx:case Zx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Jx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Qx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case e1:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case t1:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case n1:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case r1:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case i1:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case s1:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case o1:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case a1:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case l1:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case c1:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case u1:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case f1:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case d1:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Vp:case h1:case p1:return Math.ceil(t/4)*Math.ceil(e/4)*16;case lA:case m1:return Math.ceil(t/4)*Math.ceil(e/4)*8;case g1:case y1:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function _le(t){switch(t){case $i:case eA:return{byteLength:1,components:1};case Id:case tA:case Au:return{byteLength:2,components:1};case a_:case l_:return{byteLength:2,components:4};case Ua:case o_:case li:return{byteLength:4,components:1};case nA:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const wle={contain:vle,cover:xle,fill:ble,getByteLength:AT};typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:i_}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=i_);/** + `},i=new Pu(5,5,5),s=new uo({name:"CubemapFromEquirect",uniforms:Ld(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:di,blending:Ra});s.uniforms.tEquirect.value=n;const o=new nr(i,s),a=n.minFilter;return n.minFilter===Lo&&(n.minFilter=cr),new dB(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,r,i){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,r,i);e.setRenderTarget(s)}}let Zf=class extends on{constructor(){super(),this.isGroup=!0,this.type="Group"}};const Roe={type:"move"};class Vv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Zf,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 Zf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Zf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const x of e.hand.values()){const v=n.getJointPose(x,r),g=this._getHandJoint(c,x);v!==null&&(g.matrix.fromArray(v.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=v.radius),g.visible=v!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),m=.02,y=.005;c.inputState.pinching&&h>m+y?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=m-y&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,r),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Roe)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Zf;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class p_{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new ot(e),this.density=n}clone(){return new p_(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class m_{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new ot(e),this.near=n,this.far=r}clone(){return new m_(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class dA extends on{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 cs,this.environmentIntensity=1,this.environmentRotation=new cs,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class g_{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Lm,this.updateRanges=[],this.version=0,this.uuid=os()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,s=this.stride;ie.far||n.push({distance:l,point:tp.clone(),uv:Ii.getInterpolation(tp,Ty,rp,Cy,_4,$M,w4,new Ne),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ry(t,e,n,r,i,s){bf.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(np.x=s*bf.x-i*bf.y,np.y=i*bf.x+s*bf.y):np.copy(bf),t.copy(e),t.x+=np.x,t.y+=np.y,t.applyMatrix4(pB)}const Ay=new H,S4=new H;class gB extends on{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){Ay.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Ay);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){Ay.setFromMatrixPosition(e.matrixWorld),S4.setFromMatrixPosition(this.matrixWorld);const r=Ay.distanceTo(S4)/e.zoom;n[0].object.visible=!0;let i,s;for(i=1,s=n.length;i=o)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i1?null:n.copy(e.start).addScaledVector(r,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||koe.getNormalMatrix(e),i=this.coplanarPoint(GM).applyMatrix4(e),s=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const dc=new Kr,Ny=new H;class wg{constructor(e=new gl,n=new gl,r=new gl,i=new gl,s=new gl,o=new gl){this.planes=[e,n,r,i,s,o]}set(e,n,r,i,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=so){const r=this.planes,i=e.elements,s=i[0],o=i[1],a=i[2],l=i[3],c=i[4],u=i[5],f=i[6],h=i[7],m=i[8],y=i[9],x=i[10],v=i[11],g=i[12],b=i[13],_=i[14],S=i[15];if(r[0].setComponents(l-s,h-c,v-m,S-g).normalize(),r[1].setComponents(l+s,h+c,v+m,S+g).normalize(),r[2].setComponents(l+o,h+u,v+y,S+b).normalize(),r[3].setComponents(l-o,h-u,v-y,S-b).normalize(),r[4].setComponents(l-a,h-f,v-x,S-_).normalize(),n===so)r[5].setComponents(l+a,h+f,v+x,S+_).normalize();else if(n===Om)r[5].setComponents(a,f,x,_).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),dc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),dc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(dc)}intersectsSprite(e){return dc.center.set(0,0,0),dc.radius=.7071067811865476,dc.applyMatrix4(e.matrixWorld),this.intersectsSphere(dc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(r)0?e.max.x:e.min.x,Ny.y=i.normal.y>0?e.max.y:e.min.y,Ny.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Ny)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function XM(t,e){return t-e}function Loe(t,e){return t.z-e.z}function Ooe(t,e){return e.z-t.z}class Doe{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,n,r,i){const s=this.pool,o=this.list;this.index>=s.length&&s.push({start:-1,count:-1,z:-1,index:-1});const a=s[this.index];o.push(a),this.index++,a.start=e,a.count=n,a.z=r,a.index=i}reset(){this.list.length=0,this.index=0}}const Mi=new Tt,Foe=new ot(1,1,1),qM=new wg,ky=new kr,hc=new Kr,op=new H,N4=new H,zoe=new H,YM=new Doe,Wr=new nr,Ly=[];function Uoe(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let s=0;s65535?new Uint32Array(i):new Uint16Array(i);n.setIndex(new yn(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(!e.hasAttribute(r))throw new Error(`THREE.BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),s=n.getAttribute(r);if(i.itemSize!==s.itemSize||i.normalized!==s.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const n=this._instanceInfo;if(e<0||e>=n.length||n[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const n=this._geometryInfo;if(e<0||e>=n.length||n[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.boundingBox,n=this._instanceInfo;e.makeEmpty();for(let r=0,i=n.length;r=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const r={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(XM),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=r):(i=this._instanceInfo.length,this._instanceInfo.push(r));const s=this._matricesTexture;Mi.identity().toArray(s.image.data,i*16),s.needsUpdate=!0;const o=this._colorsTexture;return o&&(Foe.toArray(o.image.data,i*4),o.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,n=-1,r=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},s=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=n===-1?e.getAttribute("position").count:n;const o=e.getIndex();if(o!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=r===-1?o.count:r),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(XM),l=this._availableGeometryIds.shift(),s[l]=i):(l=this._geometryCount,this._geometryCount++,s.push(i)),this.setGeometryAt(l,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,l}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,s=r.getIndex(),o=n.getIndex(),a=this._geometryInfo[e];if(i&&o.count>a.reservedIndexCount||n.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=n.getAttribute("position").count;for(const u in r.attributes){const f=n.getAttribute(u),h=r.getAttribute(u);Uoe(f,h,l);const m=f.itemSize;for(let y=f.count,x=c;y=n.length||n[e].active===!1)return this;const r=this._instanceInfo;for(let i=0,s=r.length;ia).sort((o,a)=>r[o].vertexStart-r[a].vertexStart),s=this.geometry;for(let o=0,a=r.length;o=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const s=new kr,o=r.index,a=r.attributes.position;for(let l=i.start,c=i.start+i.count;l=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const s=new Kr;this.getBoundingBoxAt(e,ky),ky.getCenter(s.center);const o=r.index,a=r.attributes.position;let l=0;for(let c=i.start,u=i.start+i.count;ca.active);if(Math.max(...r.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${n}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...r.map(l=>l.indexStart+l.reservedIndexCount))>n)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${n}. Cannot shrink further.`);const s=this.geometry;s.dispose(),this._maxVertexCount=e,this._maxIndexCount=n,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new Bt,this._initializeGeometry(s));const o=this.geometry;s.index&&pc(s.index.array,o.index.array);for(const a in s.attributes)pc(s.attributes[a].array,o.attributes[a].array)}raycast(e,n){const r=this._instanceInfo,i=this._geometryInfo,s=this.matrixWorld,o=this.geometry;Wr.material=this.material,Wr.geometry.index=o.index,Wr.geometry.attributes=o.attributes,Wr.geometry.boundingBox===null&&(Wr.geometry.boundingBox=new kr),Wr.geometry.boundingSphere===null&&(Wr.geometry.boundingSphere=new Kr);for(let a=0,l=r.length;a({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null,boundingSphere:n.boundingSphere!==null?n.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(n=>({...n})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,r,i,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=i.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,m=this._indirectTexture,y=m.image.data;h&&(Mi.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),qM.setFromProjectionMatrix(Mi,e.coordinateSystem));let x=0;if(this.sortObjects){Mi.copy(this.matrixWorld).invert(),op.setFromMatrixPosition(r.matrixWorld).applyMatrix4(Mi),N4.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(Mi);for(let b=0,_=l.length;b<_;b++)if(l[b].visible&&l[b].active){const S=l[b].geometryIndex;this.getMatrixAt(b,Mi),this.getBoundingSphereAt(S,hc).applyMatrix4(Mi);let C=!1;if(h&&(C=!qM.intersectsSphere(hc)),!C){const P=f[S],A=zoe.subVectors(hc.center,op).dot(N4);YM.push(P.start,P.count,A,b)}}const v=YM.list,g=this.customSort;g===null?v.sort(s.transparent?Ooe:Loe):g.call(this,v,r);for(let b=0,_=v.length;b<_;b++){const S=v[b];c[x]=S.start*a,u[x]=S.count,y[x]=S.index,x++}YM.reset()}else for(let v=0,g=l.length;v0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;sr)return;KM.applyMatrix4(t.matrixWorld);const c=e.ray.origin.distanceTo(KM);if(!(ce.far))return{distance:c,point:L4.clone().applyMatrix4(t.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:t}}const O4=new H,D4=new H;class ea extends Ba{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,r=[];for(let i=0,s=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;si.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class wB extends Hn{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:cr,this.magFilter=s!==void 0?s:cr,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class Boe extends wB{constructor(e,n,r,i,s,o,a,l){super({},e,n,r,i,s,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class joe extends Hn{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=Sr,this.minFilter=Sr,this.generateMipmaps=!1,this.needsUpdate=!0}}class v_ extends Hn{constructor(e,n,r,i,s,o,a,l,c,u,f,h){super(null,o,a,l,c,u,i,s,f,h),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Voe extends v_{constructor(e,n,r,i,s,o){super(e,n,r,s,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Li,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class $oe extends v_{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,za),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class Woe extends Hn{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class gA extends Hn{constructor(e,n,r,i,s,o,a,l,c,u=Yc){if(u!==Yc&&u!==mu)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&u===Yc&&(r=Ua),r===void 0&&u===mu&&(r=pu),super(null,i,s,o,a,l,u,r,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:Sr,this.minFilter=l!==void 0?l:Sr,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class mo{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),s=0;n.push(0);for(let o=1;o<=e;o++)r=this.getPoint(o/e),s+=r.distanceTo(i),n.push(s),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const s=r.length;let o;n?o=n:o=e*r[s-1];let a=0,l=s-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===o)return i/(s-1);const u=r[i],h=r[i+1]-u,m=(o-u)/h;return(i+m)/(s-1)}getTangent(e,n){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const o=this.getPoint(i),a=this.getPoint(s),l=n||(o.isVector2?new Ne:new H);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new H,i=[],s=[],o=[],a=new H,l=new Tt;for(let m=0;m<=e;m++){const y=m/e;i[m]=this.getTangentAt(y,new H)}s[0]=new H,o[0]=new H;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),f=Math.abs(i[0].y),h=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),f<=c&&(c=f,r.set(0,1,0)),h<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),s[0].crossVectors(i[0],a),o[0].crossVectors(i[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(Nt(i[m-1].dot(i[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,y))}o[m].crossVectors(i[m],s[m])}if(n===!0){let m=Math.acos(Nt(s[0].dot(s[e]),-1,1));m/=e,i[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(i[y],m*y)),o[y].crossVectors(i[y],s[y])}return{tangents:i,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class x_ extends mo{constructor(e=0,n=0,r=1,i=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new Ne){const r=n,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%s]:(Uy.subVectors(i[0],i[1]).add(i[0]),c=Uy);const f=i[a%s],h=i[(a+1)%s];if(this.closed||a+2i.length-2?i.length-1:o+1],f=i[o>i.length-3?i.length-1:o+2];return r.set(U4(a,l.x,c.x,u.x,f.x),U4(a,l.y,c.y,u.y,f.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const o=i[s]-r,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Sg extends Bt{constructor(e=[new Ne(0,-.5),new Ne(.5,0),new Ne(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=Nt(i,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/n,f=new H,h=new Ne,m=new H,y=new H,x=new H;let v=0,g=0;for(let b=0;b<=e.length-1;b++)switch(b){case 0:v=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-v,m.z=g*0,x.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(x.x,x.y,x.z);break;default:v=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-v,m.z=g*0,y.copy(m),m.x+=x.x,m.y+=x.y,m.z+=x.z,m.normalize(),l.push(m.x,m.y,m.z),x.copy(y)}for(let b=0;b<=n;b++){const _=r+b*u*i,S=Math.sin(_),C=Math.cos(_);for(let P=0;P<=e.length-1;P++){f.x=e[P].x*S,f.y=e[P].y,f.z=e[P].x*C,o.push(f.x,f.y,f.z),h.x=b/n,h.y=P/(e.length-1),a.push(h.x,h.y);const A=l[3*P+0]*S,L=l[3*P+1],k=l[3*P+0]*C;c.push(A,L,k)}}for(let b=0;b0&&_(!0),n>0&&_(!1)),this.setIndex(u),this.setAttribute("position",new pt(f,3)),this.setAttribute("normal",new pt(h,3)),this.setAttribute("uv",new pt(m,2));function b(){const S=new H,C=new H;let P=0;const A=(n-e)/r;for(let L=0;L<=s;L++){const k=[],T=L/s,N=T*(n-e)+e;for(let z=0;z<=i;z++){const D=z/i,B=D*l+a,G=Math.sin(B),X=Math.cos(B);C.x=N*G,C.y=-T*r+v,C.z=N*X,f.push(C.x,C.y,C.z),S.set(G,A,X).normalize(),h.push(S.x,S.y,S.z),m.push(D,1-T),k.push(y++)}x.push(k)}for(let L=0;L0||k!==0)&&(u.push(T,N,D),P+=3),(n>0||k!==s-1)&&(u.push(N,z,D),P+=3)}c.addGroup(g,P,0),g+=P}function _(S){const C=y,P=new Ne,A=new H;let L=0;const k=S===!0?e:n,T=S===!0?1:-1;for(let z=1;z<=i;z++)f.push(0,v*T,0),h.push(0,T,0),m.push(.5,.5),y++;const N=y;for(let z=0;z<=i;z++){const B=z/i*l+a,G=Math.cos(B),X=Math.sin(B);A.x=k*X,A.y=v*T,A.z=k*G,f.push(A.x,A.y,A.z),h.push(0,T,0),P.x=G*.5+.5,P.y=X*.5*T+.5,m.push(P.x,P.y),y++}for(let z=0;z.9&&A<.1&&(_<.2&&(o[b+0]+=1),S<.2&&(o[b+2]+=1),C<.2&&(o[b+4]+=1))}}function h(b){s.push(b.x,b.y,b.z)}function m(b,_){const S=b*3;_.x=e[S+0],_.y=e[S+1],_.z=e[S+2]}function y(){const b=new H,_=new H,S=new H,C=new H,P=new Ne,A=new Ne,L=new Ne;for(let k=0,T=0;k80*n){a=c=t[0],l=u=t[1];for(let y=n;yc&&(c=f),h>u&&(u=h);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return zm(s,o,n,a,l,m,0),o}};function AB(t,e,n,r,i){let s,o;if(i===pae(t,e,n,r)>0)for(s=e;s=e;s-=r)o=B4(s,t[s],t[s+1],o);return o&&M_(o,o.next)&&(Bm(o),o=o.next),o}function vu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(M_(n,n.next)||On(n.prev,n,n.next)===0)){if(Bm(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function zm(t,e,n,r,i,s,o){if(!t)return;!o&&s&&lae(t,r,i,s);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?eae(t,r,i,s):Qoe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Bm(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=tae(vu(t),e,n),zm(t,e,n,r,i,s,2)):o===2&&nae(t,e,n,r,i,s):zm(vu(t),e,n,r,i,s,1);break}}}function Qoe(t){const e=t.prev,n=t,r=t.next;if(On(e,n,r)>=0)return!1;const i=e.x,s=n.x,o=r.x,a=e.y,l=n.y,c=r.y,u=is?i>o?i:o:s>o?s:o,m=a>l?a>c?a:c:l>c?l:c;let y=r.next;for(;y!==e;){if(y.x>=u&&y.x<=h&&y.y>=f&&y.y<=m&&Jf(i,a,s,l,o,c,y.x,y.y)&&On(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function eae(t,e,n,r){const i=t.prev,s=t,o=t.next;if(On(i,s,o)>=0)return!1;const a=i.x,l=s.x,c=o.x,u=i.y,f=s.y,h=o.y,m=al?a>c?a:c:l>c?l:c,v=u>f?u>h?u:h:f>h?f:h,g=ST(m,y,e,n,r),b=ST(x,v,e,n,r);let _=t.prevZ,S=t.nextZ;for(;_&&_.z>=g&&S&&S.z<=b;){if(_.x>=m&&_.x<=x&&_.y>=y&&_.y<=v&&_!==i&&_!==o&&Jf(a,u,l,f,c,h,_.x,_.y)&&On(_.prev,_,_.next)>=0||(_=_.prevZ,S.x>=m&&S.x<=x&&S.y>=y&&S.y<=v&&S!==i&&S!==o&&Jf(a,u,l,f,c,h,S.x,S.y)&&On(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;_&&_.z>=g;){if(_.x>=m&&_.x<=x&&_.y>=y&&_.y<=v&&_!==i&&_!==o&&Jf(a,u,l,f,c,h,_.x,_.y)&&On(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;S&&S.z<=b;){if(S.x>=m&&S.x<=x&&S.y>=y&&S.y<=v&&S!==i&&S!==o&&Jf(a,u,l,f,c,h,S.x,S.y)&&On(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function tae(t,e,n){let r=t;do{const i=r.prev,s=r.next.next;!M_(i,s)&&PB(i,r,r.next,s)&&Um(i,s)&&Um(s,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),Bm(r),Bm(r.next),r=t=s),r=r.next}while(r!==t);return vu(r)}function nae(t,e,n,r,i,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&fae(o,a)){let l=IB(o,a);o=vu(o,o.next),l=vu(l,l.next),zm(o,e,n,r,i,s,0),zm(l,e,n,r,i,s,0);return}a=a.next}o=o.next}while(o!==t)}function rae(t,e,n,r){const i=[];let s,o,a,l,c;for(s=0,o=e.length;s=n.next.y&&n.next.y!==n.y){const h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=s&&h>r&&(r=h,i=n.x=n.x&&n.x>=l&&s!==n.x&&Jf(oi.x||n.x===i.x&&aae(i,n)))&&(i=n,u=f)),n=n.next;while(n!==a);return i}function aae(t,e){return On(t.prev,t,e.prev)<0&&On(e.next,t,t.next)<0}function lae(t,e,n,r){let i=t;do i.z===0&&(i.z=ST(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,cae(i)}function cae(t){let e,n,r,i,s,o,a,l,c=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;n=r}s.nextZ=null,c*=2}while(o>1);return t}function ST(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function uae(t){let e=t,n=t;do(e.x=(t-o)*(s-a)&&(t-o)*(r-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(i-o)*(r-a)}function fae(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!dae(t,e)&&(Um(t,e)&&Um(e,t)&&hae(t,e)&&(On(t.prev,t,e.prev)||On(t,e.prev,e))||M_(t,e)&&On(t.prev,t,t.next)>0&&On(e.prev,e,e.next)>0)}function On(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function M_(t,e){return t.x===e.x&&t.y===e.y}function PB(t,e,n,r){const i=Wy(On(t,e,n)),s=Wy(On(t,e,r)),o=Wy(On(n,r,t)),a=Wy(On(n,r,e));return!!(i!==s&&o!==a||i===0&&$y(t,n,e)||s===0&&$y(t,r,e)||o===0&&$y(n,t,r)||a===0&&$y(n,e,r))}function $y(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Wy(t){return t>0?1:t<0?-1:0}function dae(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&PB(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Um(t,e){return On(t.prev,t,t.next)<0?On(t,e,t.next)>=0&&On(t,t.prev,e)>=0:On(t,e,t.prev)<0||On(t,t.next,e)<0}function hae(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function IB(t,e){const n=new MT(t.i,t.x,t.y),r=new MT(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function B4(t,e,n,r){const i=new MT(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Bm(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function MT(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function pae(t,e,n,r){let i=0;for(let s=e,o=n-r;s2&&t[e-1].equals(t[0])&&t.pop()}function V4(t,e){for(let n=0;nNumber.EPSILON){const le=Math.sqrt(U),Te=Math.sqrt(ke*ke+$*$),ye=oe.x-Ye/le,He=oe.y+ue/le,Ae=V.x-$/Te,Ee=V.y+ke/Te,_t=((Ae-ye)*$-(Ee-He)*ke)/(ue*$-Ye*ke);Ie=ye+ue*_t-ae.x,Re=He+Ye*_t-ae.y;const Le=Ie*Ie+Re*Re;if(Le<=2)return new Ne(Ie,Re);De=Math.sqrt(Le/2)}else{let le=!1;ue>Number.EPSILON?ke>Number.EPSILON&&(le=!0):ue<-Number.EPSILON?ke<-Number.EPSILON&&(le=!0):Math.sign(Ye)===Math.sign($)&&(le=!0),le?(Ie=-Ye,Re=ue,De=Math.sqrt(U)):(Ie=ue,Re=Ye,De=Math.sqrt(U/2))}return new Ne(Ie/De,Re/De)}const q=[];for(let ae=0,oe=B.length,V=oe-1,Ie=ae+1;ae=0;ae--){const oe=ae/v,V=m*Math.cos(oe*Math.PI/2),Ie=y*Math.sin(oe*Math.PI/2)+x;for(let Re=0,De=B.length;Re=0;){const Ie=V;let Re=V-1;Re<0&&(Re=ae.length-1);for(let De=0,ue=u+v*2;De0)&&m.push(_,S,P),(g!==r-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class DB extends Jr{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new ot(16777215),this.specular=new ot(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ot(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new cs,this.combine=mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class FB extends Jr{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ot(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ot(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class zB extends Jr{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class UB extends Jr{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new ot(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ot(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new cs,this.combine=mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MA extends Jr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Y6,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class EA extends Jr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class BB extends Jr{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ot(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class jB extends gi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function jc(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function VB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $B(t){function e(i,s){return t[i]-t[s]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function ET(t,e,n){const r=t.length,i=new t.constructor(r);for(let s=0,o=0;o!==r;++s){const a=n[s]*e;for(let l=0;l!==e;++l)i[o++]=t[a+l]}return i}function TA(t,e,n,r){let i=1,s=t[0];for(;s!==void 0&&s[r]===void 0;)s=t[i++];if(s===void 0)return;let o=s[r];if(o!==void 0)if(Array.isArray(o))do o=s[r],o!==void 0&&(e.push(s.time),n.push.apply(n,o)),s=t[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[r],o!==void 0&&(e.push(s.time),o.toArray(n,n.length)),s=t[i++];while(s!==void 0);else do o=s[r],o!==void 0&&(e.push(s.time),n.push(o)),s=t[i++];while(s!==void 0)}function vae(t,e,n,r,i=30){const s=t.clone();s.name=e;const o=[];for(let l=0;l=r)){f.push(c.times[m]);for(let x=0;xs.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const g=y*f+u,b=g+f-u;x=a.values.slice(g,b)}else{const g=a.createInterpolant(),b=u,_=f-u;g.evaluate(s),x=g.resultBuffer.slice(b,_)}l==="quaternion"&&new Bi().fromArray(x).normalize().conjugate().toArray(x);const v=c.times.length;for(let g=0;g=s)){const a=n[1];e=s)break t}o=r,r=0;break n}break e}for(;r>>1;en;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=r.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,s=r.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&VB(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===jv,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*r,l=o*r,c=0;c!==r;++c)n[l+c]=n[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}go.prototype.TimeBufferType=Float32Array;go.prototype.ValueBufferType=Float32Array;go.prototype.DefaultInterpolation=v1;class Iu extends go{constructor(e,n,r){super(e,n,r)}}Iu.prototype.ValueTypeName="bool";Iu.prototype.ValueBufferType=Array;Iu.prototype.DefaultInterpolation=Im;Iu.prototype.InterpolantFactoryMethodLinear=void 0;Iu.prototype.InterpolantFactoryMethodSmooth=void 0;class RA extends go{}RA.prototype.ValueTypeName="color";class jm extends go{}jm.prototype.ValueTypeName="number";class GB extends Tg{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)Bi.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Cg extends go{InterpolantFactoryMethodLinear(e){return new GB(this.times,this.values,this.getValueSize(),e)}}Cg.prototype.ValueTypeName="quaternion";Cg.prototype.InterpolantFactoryMethodSmooth=void 0;class Nu extends go{constructor(e,n,r){super(e,n,r)}}Nu.prototype.ValueTypeName="string";Nu.prototype.ValueBufferType=Array;Nu.prototype.DefaultInterpolation=Im;Nu.prototype.InterpolantFactoryMethodLinear=void 0;Nu.prototype.InterpolantFactoryMethodSmooth=void 0;class Vm extends go{}Vm.prototype.ValueTypeName="vector";class $m{constructor(e="",n=-1,r=[],i=f_){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=os(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let o=0,a=r.length;o!==a;++o)n.push(wae(r[o]).scale(i));const s=new this(e.name,e.duration,n,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=r.length;s!==o;++s)n.push(go.toJSON(r[s]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const s=n.length,o=[];for(let a=0;a1){const f=u[1];let h=i[f];h||(i[f]=h=[]),h.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,h,m,y,x){if(m.length!==0){const v=[],g=[];TA(m,v,g,y),v.length!==0&&x.push(new f(h,v,g))}},i=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{n&&n(s),this.manager.itemEnd(e)},0),s;if(pa[e]!==void 0){pa[e].push({onLoad:n,onProgress:r,onError:i});return}pa[e]=[],pa[e].push({onLoad:n,onProgress:r,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=pa[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=h?parseInt(h):0,y=m!==0;let x=0;const v=new ReadableStream({start(g){b();function b(){f.read().then(({done:_,value:S})=>{if(_)g.close();else{x+=S.byteLength;const C=new ProgressEvent("progress",{lengthComputable:y,loaded:x,total:m});for(let P=0,A=u.length;P{g.error(_)})}}});return new Response(v)}else throw new Sae(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,m=new TextDecoder(h);return c.arrayBuffer().then(y=>m.decode(y))}}}).then(c=>{Ma.add(e,c);const u=pa[e];delete pa[e];for(let f=0,h=u.length;f{const u=pa[e];if(u===void 0)throw this.manager.itemError(e),c;delete pa[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Mae extends Wi{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new ja(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(i.uniforms[s]={},o.type){case"t":i.uniforms[s].value=r(o.value);break;case"c":i.uniforms[s].value=new ot().setHex(o.value);break;case"v2":i.uniforms[s].value=new Ne().fromArray(o.value);break;case"v3":i.uniforms[s].value=new H().fromArray(o.value);break;case"v4":i.uniforms[s].value=new nn().fromArray(o.value);break;case"m3":i.uniforms[s].value=new Dt().fromArray(o.value);break;case"m4":i.uniforms[s].value=new Tt().fromArray(o.value);break;default:i.uniforms[s].value=o.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)i.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),i.normalScale=new Ne().fromArray(s)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Ne().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return k_.createMaterialFromType(e)}static createMaterialFromType(e){const n={ShadowMaterial:kB,SpriteMaterial:hA,RawShaderMaterial:LB,ShaderMaterial:uo,PointsMaterial:mA,MeshPhysicalMaterial:OB,MeshStandardMaterial:SA,MeshPhongMaterial:DB,MeshToonMaterial:FB,MeshNormalMaterial:zB,MeshLambertMaterial:UB,MeshDepthMaterial:MA,MeshDistanceMaterial:EA,MeshBasicMaterial:ql,MeshMatcapMaterial:BB,LineDashedMaterial:jB,LineBasicMaterial:gi,Material:Jr};return new n[e]}}class TT{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new AA(n);s=new Wm(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new Wm(this.manager),i.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const v=new kr;v.min.fromArray(x.boxMin),v.max.fromArray(x.boxMax);const g=new Kr;return g.radius=x.sphereRadius,g.center.fromArray(x.sphereCenter),{boxInitialized:x.boxInitialized,box:v,sphereInitialized:x.sphereInitialized,sphere:g}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":o=new gB;break;case"Line":o=new Ba(a(e.geometry),l(e.material));break;case"LineLoop":o=new bB(a(e.geometry),l(e.material));break;case"LineSegments":o=new ea(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new _B(a(e.geometry),l(e.material));break;case"Sprite":o=new mB(l(e.material));break;case"Group":o=new Zf;break;case"Bone":o=new pA;break;default:o=new on}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let m=0;m"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Ma.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{n&&n(c),s.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return Ma.add(e,c),n&&n(c),s.manager.itemEnd(e),c}).catch(function(c){i&&i(c),Ma.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Ma.add(e,l),s.manager.itemStart(e)}}let Hy;class IA{static getContext(){return Hy===void 0&&(Hy=new(window.AudioContext||window.webkitAudioContext)),Hy}static setContext(e){Hy=e}}class Oae extends Wi{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new ja(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);IA.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),s.manager.itemError(e)}}}const K4=new Tt,Z4=new Tt,mc=new Tt;class Dae{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new xr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new xr,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,mc.copy(e.projectionMatrix);const i=n.eyeSep/2,s=i*n.near/n.focus,o=n.near*Math.tan(Kc*n.fov*.5)/n.zoom;let a,l;Z4.elements[12]=-i,K4.elements[12]=i,a=-o*n.aspect+s,l=o*n.aspect+s,mc.elements[0]=2*n.near/(l-a),mc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(mc),a=-o*n.aspect-s,l=o*n.aspect-s,mc.elements[0]=2*n.near/(l-a),mc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(mc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Z4),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(K4)}}class i8 extends xr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e,this.index=0}}class NA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=J4(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=J4();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function J4(){return performance.now()}const gc=new H,Q4=new Bi,Fae=new H,yc=new H;class zae extends on{constructor(){super(),this.type="AudioListener",this.context=IA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new NA}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(gc,Q4,Fae),yc.set(0,0,-1).applyQuaternion(Q4),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(gc.x,i),n.positionY.linearRampToValueAtTime(gc.y,i),n.positionZ.linearRampToValueAtTime(gc.z,i),n.forwardX.linearRampToValueAtTime(yc.x,i),n.forwardY.linearRampToValueAtTime(yc.y,i),n.forwardZ.linearRampToValueAtTime(yc.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(gc.x,gc.y,gc.z),n.setOrientation(yc.x,yc.y,yc.z,r.x,r.y,r.z)}}class s8 extends on{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let s=r,o=i;s!==o;++s)n[s]=n[i+s%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let o=0;o!==s;++o)e[n+o]=e[r+o]}_slerp(e,n,r,i){Bi.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,s){const o=this._workIndex*s;Bi.multiplyQuaternionsFlat(e,o,e,n,e,r),Bi.slerpFlat(e,n,e,n,e,o,i)}_lerp(e,n,r,i,s){const o=1-i;for(let a=0;a!==s;++a){const l=n+a;e[l]=e[l]*o+e[r+a]*i}}_lerpAdditive(e,n,r,i,s){for(let o=0;o!==s;++o){const a=n+o;e[a]=e[a]+e[r+o]*i}}}const kA="\\[\\]\\.:\\/",Vae=new RegExp("["+kA+"]","g"),LA="[^"+kA+"]",$ae="[^"+kA.replace("\\.","")+"]",Wae=/((?:WC+[\/:])*)/.source.replace("WC",LA),Hae=/(WCOD+)?/.source.replace("WCOD",$ae),Gae=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",LA),Xae=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",LA),qae=new RegExp("^"+Wae+Hae+Gae+Xae+"$"),Yae=["material","materials","bones","map"];class Kae{constructor(e,n,r){const i=r||rn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=r.length;i!==s;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class rn{constructor(e,n,r){this.path=n,this.parsedPath=r||rn.parseTrackName(n),this.node=rn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new rn.Composite(e,n,r):new rn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Vae,"")}static parseTrackName(e){const n=qae.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=r.nodeName.substring(i+1);Yae.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(s){for(let o=0;o=s){const f=s++,h=e[f];n[h.uuid]=u,e[u]=h,n[c]=f,e[f]=l;for(let m=0,y=i;m!==y;++m){const x=r[m],v=x[f],g=x[u];x[u]=v,x[f]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=n[u];if(f!==void 0)if(delete n[u],f0&&(n[m.uuid]=f),e[f]=m,e.pop();for(let y=0,x=i;y!==x;++y){const v=r[y];v[f]=v[h],v.pop()}}}this.nCachedObjects_=s}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const s=this._bindings;if(i!==void 0)return s[i];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);i=s.length,r[e]=i,o.push(e),a.push(n),s.push(f);for(let h=u,m=l.length;h!==m;++h){const y=l[h];f[h]=new rn(y,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];n[c]=r,o[r]=l,o.pop(),s[r]=s[a],s.pop(),i[r]=i[a],i.pop()}}}class a8{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const s=n.tracks,o=s.length,a=new Array(o),l={endingStart:zc,endingEnd:zc};for(let c=0;c!==o;++c){const u=s[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=X6,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,s=e._clip.duration,o=s/i,a=i/s;e.warp(1,o,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,s=i.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+r,c[0]=e/o,c[1]=n/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const o=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case aA:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case f_:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,s=this._loopCount;const o=r===q6;if(e===0)return s===-1?i:o&&(s&1)===1?n-i:i;if(r===G6){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(o&&(s&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Uc,i.endingEnd=Uc):(e?i.endingStart=this.zeroSlopeAtStart?Uc:zc:i.endingStart=Nm,n?i.endingEnd=this.zeroSlopeAtEnd?Uc:zc:i.endingEnd=Nm)}_scheduleFading(e,n,r){const i=this._mixer,s=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=n,a[1]=s+e,l[1]=r,this}}const Jae=new Float32Array(1);class Qae extends Qo{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,s=i.length,o=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==s;++f){const h=i[f],m=h.name;let y=u[m];if(y!==void 0)++y.referenceCount,o[f]=y;else{if(y=o[f],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,m));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;y=new o8(rn.create(r,m,x),h.ValueTypeName,h.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,m),o[f]=y}a[f].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let n=0;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,rL).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const iL=new H,Gy=new H;class cle{constructor(e=new H,n=new H){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){iL.subVectors(e,this.start),Gy.subVectors(this.end,this.start);const r=Gy.dot(Gy);let s=Gy.dot(iL)/r;return n&&(s=Nt(s,0,1)),s}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const sL=new H;class ule extends on{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Bt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{uL.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(uL,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Sle extends ea{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Bt;i.setAttribute("position",new pt(n,3)),i.setAttribute("color",new pt(r,3));const s=new gi({vertexColors:!0,toneMapped:!1});super(i,s),this.type="AxesHelper"}setColors(e,n,r){const i=new ot,s=this.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(n),i.toArray(s,6),i.toArray(s,9),i.set(r),i.toArray(s,12),i.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Mle{constructor(){this.type="ShapePath",this.color=new ot,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Fm,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,s,o){return this.currentPath.bezierCurveTo(e,n,r,i,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const b=[];for(let _=0,S=g.length;_Number.EPSILON){if(T<0&&(A=b[P],k=-k,L=b[C],T=-T),g.yL.y)continue;if(g.y===A.y){if(g.x===A.x)return!0}else{const N=T*(g.x-A.x)-k*(g.y-A.y);if(N===0)return!0;if(N<0)continue;S=!S}}else{if(g.y!==A.y)continue;if(L.x<=g.x&&g.x<=A.x||A.x<=g.x&&g.x<=L.x)return!0}}return S}const i=jo.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new Jc,l.curves=a.curves,c.push(l),c;let u=!i(s[0].getPoints());u=e?!u:u;const f=[],h=[];let m=[],y=0,x;h[y]=void 0,m[y]=[];for(let g=0,b=s.length;g1){let g=!1,b=0;for(let _=0,S=h.length;_0&&g===!1&&(m=f)}let v;for(let g=0,b=h.length;ge?(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}function Cle(t,e){const n=t.image&&t.image.width?t.image.width/t.image.height:1;return n>e?(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}function Rle(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function RT(t,e,n,r){const i=Ale(r);switch(n){case tA:return t*e;case rA:return t*e;case iA:return t*e*2;case yg:return t*e/i.components*i.byteLength;case vg:return t*e/i.components*i.byteLength;case sA:return t*e*2/i.components*i.byteLength;case c_:return t*e*2/i.components*i.byteLength;case nA:return t*e*3/i.components*i.byteLength;case Ir:return t*e*4/i.components*i.byteLength;case u_:return t*e*4/i.components*i.byteLength;case zp:case Up:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Bp:case jp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Xx:case Yx:return Math.max(t,16)*Math.max(e,8)/4;case Gx:case qx:return Math.max(t,8)*Math.max(e,8)/2;case Kx:case Zx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Jx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Qx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case e1:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case t1:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case n1:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case r1:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case i1:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case s1:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case o1:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case a1:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case l1:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case c1:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case u1:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case f1:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case d1:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Vp:case h1:case p1:return Math.ceil(t/4)*Math.ceil(e/4)*16;case oA:case m1:return Math.ceil(t/4)*Math.ceil(e/4)*8;case g1:case y1:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function Ale(t){switch(t){case $i:case JR:return{byteLength:1,components:1};case Nd:case QR:case Au:return{byteLength:2,components:1};case a_:case l_:return{byteLength:2,components:4};case Ua:case o_:case li:return{byteLength:4,components:1};case eA:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const Ple={contain:Tle,cover:Cle,fill:Rle,getByteLength:RT};typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:i_}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=i_);/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT - */function a8(){let t=null,e=!1,n=null,r=null;function i(s,o){n(s,o),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function Sle(t){const e=new WeakMap;function n(a,l){const c=a.array,u=a.usage,f=c.byteLength,h=t.createBuffer();t.bindBuffer(l,h),t.bufferData(l,c,u),a.onUploadCallback();let m;if(c instanceof Float32Array)m=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=t.HALF_FLOAT:m=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=t.SHORT;else if(c instanceof Uint32Array)m=t.UNSIGNED_INT;else if(c instanceof Int32Array)m=t.INT;else if(c instanceof Int8Array)m=t.BYTE;else if(c instanceof Uint8Array)m=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:m,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:f}}function r(a,l,c){const u=l.array,f=l.updateRanges;if(t.bindBuffer(c,a),f.length===0)t.bufferSubData(c,0,u);else{f.sort((m,y)=>m.start-y.start);let h=0;for(let m=1;mm.start-y.start);let h=0;for(let m=1;m 0 +#endif`,Xle=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -479,26 +479,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve if ( clipped ) discard; #endif #endif -#endif`,Ble=`#if NUM_CLIPPING_PLANES > 0 +#endif`,qle=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,jle=`#if NUM_CLIPPING_PLANES > 0 +#endif`,Yle=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,Vle=`#if NUM_CLIPPING_PLANES > 0 +#endif`,Kle=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,$le=`#if defined( USE_COLOR_ALPHA ) +#endif`,Zle=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,Wle=`#if defined( USE_COLOR_ALPHA ) +#endif`,Jle=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,Hle=`#if defined( USE_COLOR_ALPHA ) +#endif`,Qle=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) varying vec3 vColor; -#endif`,Gle=`#if defined( USE_COLOR_ALPHA ) +#endif`,ece=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) vColor = vec3( 1.0 ); @@ -512,7 +512,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #ifdef USE_BATCHING_COLOR vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); vColor.xyz *= batchingColor.xyz; -#endif`,Xle=`#define PI 3.141592653589793 +#endif`,tce=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -586,7 +586,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,qle=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,nce=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -679,7 +679,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,Yle=`vec3 transformedNormal = objectNormal; +#endif`,rce=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -708,21 +708,21 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,Kle=`#ifdef USE_DISPLACEMENTMAP +#endif`,ice=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,Zle=`#ifdef USE_DISPLACEMENTMAP +#endif`,sce=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,Jle=`#ifdef USE_EMISSIVEMAP +#endif`,oce=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE emissiveColor = sRGBTransferEOTF( emissiveColor ); #endif totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,Qle=`#ifdef USE_EMISSIVEMAP +#endif`,ace=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,ece="gl_FragColor = linearToOutputTexel( gl_FragColor );",tce=`vec4 LinearTransferOETF( in vec4 value ) { +#endif`,lce="gl_FragColor = linearToOutputTexel( gl_FragColor );",cce=`vec4 LinearTransferOETF( in vec4 value ) { return value; } vec4 sRGBTransferEOTF( in vec4 value ) { @@ -730,7 +730,7 @@ vec4 sRGBTransferEOTF( in vec4 value ) { } vec4 sRGBTransferOETF( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,nce=`#ifdef USE_ENVMAP +}`,uce=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -759,7 +759,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,rce=`#ifdef USE_ENVMAP +#endif`,fce=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -769,7 +769,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,ice=`#ifdef USE_ENVMAP +#endif`,dce=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -780,7 +780,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,sce=`#ifdef USE_ENVMAP +#endif`,hce=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -791,7 +791,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,oce=`#ifdef USE_ENVMAP +#endif`,pce=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -808,18 +808,18 @@ vec4 sRGBTransferOETF( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,ace=`#ifdef USE_FOG +#endif`,mce=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,lce=`#ifdef USE_FOG +#endif`,gce=`#ifdef USE_FOG varying float vFogDepth; -#endif`,cce=`#ifdef USE_FOG +#endif`,yce=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,uce=`#ifdef USE_FOG +#endif`,vce=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -828,7 +828,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,fce=`#ifdef USE_GRADIENTMAP +#endif`,xce=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -840,12 +840,12 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,dce=`#ifdef USE_LIGHTMAP +}`,bce=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,hce=`LambertMaterial material; +#endif`,_ce=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,pce=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,wce=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -859,7 +859,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,mce=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Sce=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -975,7 +975,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,gce=`#ifdef USE_ENVMAP +#endif`,Mce=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1008,8 +1008,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,yce=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,vce=`varying vec3 vViewPosition; +#endif`,Ece=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,Tce=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1021,11 +1021,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,xce=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Cce=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,bce=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Rce=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1042,7 +1042,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,_ce=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Ace=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1128,7 +1128,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,wce=`struct PhysicalMaterial { +#endif`,Pce=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1429,7 +1429,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,Sce=` +}`,Ice=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1544,7 +1544,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,Mce=`#if defined( RE_IndirectDiffuse ) +#endif`,Nce=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1563,32 +1563,32 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,Ece=`#if defined( RE_IndirectDiffuse ) +#endif`,kce=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,Tce=`#if defined( USE_LOGDEPTHBUF ) +#endif`,Lce=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,Cce=`#if defined( USE_LOGDEPTHBUF ) +#endif`,Oce=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,Rce=`#ifdef USE_LOGDEPTHBUF +#endif`,Dce=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; -#endif`,Ace=`#ifdef USE_LOGDEPTHBUF +#endif`,Fce=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,Pce=`#ifdef USE_MAP +#endif`,zce=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,Ice=`#ifdef USE_MAP +#endif`,Uce=`#ifdef USE_MAP uniform sampler2D map; -#endif`,Nce=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,Bce=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1600,7 +1600,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,kce=`#if defined( USE_POINTS_UV ) +#endif`,jce=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1612,19 +1612,19 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,Lce=`float metalnessFactor = metalness; +#endif`,Vce=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,Oce=`#ifdef USE_METALNESSMAP +#endif`,$ce=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,Dce=`#ifdef USE_INSTANCING_MORPH +#endif`,Wce=`#ifdef USE_INSTANCING_MORPH float morphTargetInfluences[ MORPHTARGETS_COUNT ]; float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; } -#endif`,Fce=`#if defined( USE_MORPHCOLORS ) +#endif`,Hce=`#if defined( USE_MORPHCOLORS ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1633,12 +1633,12 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,zce=`#ifdef USE_MORPHNORMALS +#endif`,Gce=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; } -#endif`,Uce=`#ifdef USE_MORPHTARGETS +#endif`,Xce=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1652,12 +1652,12 @@ IncidentLight directLight; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } -#endif`,Bce=`#ifdef USE_MORPHTARGETS +#endif`,qce=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; } -#endif`,jce=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,Yce=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1698,7 +1698,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,Vce=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,Kce=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1713,25 +1713,25 @@ vec3 nonPerturbedNormal = normal;`,Vce=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,$ce=`#ifndef FLAT_SHADED +#endif`,Zce=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,Wce=`#ifndef FLAT_SHADED +#endif`,Jce=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,Hce=`#ifndef FLAT_SHADED +#endif`,Qce=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,Gce=`#ifdef USE_NORMALMAP +#endif`,eue=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1753,13 +1753,13 @@ vec3 nonPerturbedNormal = normal;`,Vce=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,Xce=`#ifdef USE_CLEARCOAT +#endif`,tue=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,qce=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,nue=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,Yce=`#ifdef USE_CLEARCOATMAP +#endif`,rue=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1768,18 +1768,18 @@ vec3 nonPerturbedNormal = normal;`,Vce=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,Kce=`#ifdef USE_IRIDESCENCEMAP +#endif`,iue=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,Zce=`#ifdef OPAQUE +#endif`,sue=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Jce=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,oue=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1848,9 +1848,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,Qce=`#ifdef PREMULTIPLIED_ALPHA +}`,aue=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,eue=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,lue=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1858,22 +1858,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,cue=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,nue=`#ifdef DITHERING +#endif`,uue=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,rue=`float roughnessFactor = roughness; +#endif`,fue=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,iue=`#ifdef USE_ROUGHNESSMAP +#endif`,due=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,sue=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,hue=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2059,7 +2059,7 @@ gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING } return mix( 1.0, shadow, shadowIntensity ); } -#endif`,oue=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,pue=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2100,7 +2100,7 @@ gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,aue=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,mue=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -2132,7 +2132,7 @@ gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,lue=`float getShadowMask() { +#endif`,gue=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2164,12 +2164,12 @@ gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING #endif #endif return shadow; -}`,cue=`#ifdef USE_SKINNING +}`,yue=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,uue=`#ifdef USE_SKINNING +#endif`,vue=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2184,7 +2184,7 @@ gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,fue=`#ifdef USE_SKINNING +#endif`,xue=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2192,7 +2192,7 @@ gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,due=`#ifdef USE_SKINNING +#endif`,bue=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2203,17 +2203,17 @@ gl_Position = projectionMatrix * mvPosition;`,tue=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,hue=`float specularStrength; +#endif`,_ue=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,pue=`#ifdef USE_SPECULARMAP +#endif`,wue=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,mue=`#if defined( TONE_MAPPING ) +#endif`,Sue=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,gue=`#ifndef saturate +#endif`,Mue=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2310,7 +2310,7 @@ vec3 NeutralToneMapping( vec3 color ) { float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); return mix( color, vec3( newPeak ), g ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,yue=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,Eue=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2331,7 +2331,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,yue=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,vue=`#ifdef USE_TRANSMISSION +#endif`,Tue=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2457,7 +2457,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,yue=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,xue=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,Cue=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2527,7 +2527,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,yue=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,bue=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,Rue=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2621,7 +2621,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,yue=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,_ue=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,Aue=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2692,7 +2692,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,yue=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,wue=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,Pue=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2701,12 +2701,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,yue=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const Sue=`varying vec2 vUv; +#endif`;const Iue=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,Mue=`uniform sampler2D t2D; +}`,Nue=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2718,14 +2718,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,Eue=`varying vec3 vWorldDirection; +}`,kue=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,Tue=`#ifdef ENVMAP_TYPE_CUBE +}`,Lue=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2748,14 +2748,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,Cue=`varying vec3 vWorldDirection; +}`,Oue=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,Rue=`uniform samplerCube tCube; +}`,Due=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2765,7 +2765,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,Aue=`#include +}`,Fue=`#include #include #include #include @@ -2792,7 +2792,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,Pue=`#if DEPTH_PACKING == 3200 +}`,zue=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2826,7 +2826,7 @@ void main() { #elif DEPTH_PACKING == 3203 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); #endif -}`,Iue=`#define DISTANCE +}`,Uue=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2853,7 +2853,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,Nue=`#define DISTANCE +}`,Bue=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2877,13 +2877,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,kue=`varying vec3 vWorldDirection; +}`,jue=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,Lue=`uniform sampler2D tEquirect; +}`,Vue=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2892,7 +2892,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,Oue=`uniform float scale; +}`,$ue=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2914,7 +2914,7 @@ void main() { #include #include #include -}`,Due=`uniform vec3 diffuse; +}`,Wue=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2942,7 +2942,7 @@ void main() { #include #include #include -}`,Fue=`#include +}`,Hue=`#include #include #include #include @@ -2974,7 +2974,7 @@ void main() { #include #include #include -}`,zue=`uniform vec3 diffuse; +}`,Gue=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -3022,7 +3022,7 @@ void main() { #include #include #include -}`,Uue=`#define LAMBERT +}`,Xue=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -3061,7 +3061,7 @@ void main() { #include #include #include -}`,Bue=`#define LAMBERT +}`,que=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3118,7 +3118,7 @@ void main() { #include #include #include -}`,jue=`#define MATCAP +}`,Yue=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3152,7 +3152,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,Vue=`#define MATCAP +}`,Kue=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3198,7 +3198,7 @@ void main() { #include #include #include -}`,$ue=`#define NORMAL +}`,Zue=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3231,7 +3231,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,Wue=`#define NORMAL +}`,Jue=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3253,7 +3253,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,Hue=`#define PHONG +}`,Que=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3292,7 +3292,7 @@ void main() { #include #include #include -}`,Gue=`#define PHONG +}`,efe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3351,7 +3351,7 @@ void main() { #include #include #include -}`,Xue=`#define STANDARD +}`,tfe=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3394,7 +3394,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,que=`#define STANDARD +}`,nfe=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3519,7 +3519,7 @@ void main() { #include #include #include -}`,Yue=`#define TOON +}`,rfe=`#define TOON varying vec3 vViewPosition; #include #include @@ -3556,7 +3556,7 @@ void main() { #include #include #include -}`,Kue=`#define TOON +}`,ife=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3609,7 +3609,7 @@ void main() { #include #include #include -}`,Zue=`uniform float size; +}`,sfe=`uniform float size; uniform float scale; #include #include @@ -3640,7 +3640,7 @@ void main() { #include #include #include -}`,Jue=`uniform vec3 diffuse; +}`,ofe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3665,7 +3665,7 @@ void main() { #include #include #include -}`,Que=`#include +}`,afe=`#include #include #include #include @@ -3688,7 +3688,7 @@ void main() { #include #include #include -}`,efe=`uniform vec3 color; +}`,lfe=`uniform vec3 color; uniform float opacity; #include #include @@ -3704,7 +3704,7 @@ void main() { #include #include #include -}`,tfe=`uniform float rotation; +}`,cfe=`uniform float rotation; uniform vec2 center; #include #include @@ -3728,7 +3728,7 @@ void main() { #include #include #include -}`,nfe=`uniform vec3 diffuse; +}`,ufe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3753,7 +3753,7 @@ void main() { #include #include #include -}`,jt={alphahash_fragment:Mle,alphahash_pars_fragment:Ele,alphamap_fragment:Tle,alphamap_pars_fragment:Cle,alphatest_fragment:Rle,alphatest_pars_fragment:Ale,aomap_fragment:Ple,aomap_pars_fragment:Ile,batching_pars_vertex:Nle,batching_vertex:kle,begin_vertex:Lle,beginnormal_vertex:Ole,bsdfs:Dle,iridescence_fragment:Fle,bumpmap_pars_fragment:zle,clipping_planes_fragment:Ule,clipping_planes_pars_fragment:Ble,clipping_planes_pars_vertex:jle,clipping_planes_vertex:Vle,color_fragment:$le,color_pars_fragment:Wle,color_pars_vertex:Hle,color_vertex:Gle,common:Xle,cube_uv_reflection_fragment:qle,defaultnormal_vertex:Yle,displacementmap_pars_vertex:Kle,displacementmap_vertex:Zle,emissivemap_fragment:Jle,emissivemap_pars_fragment:Qle,colorspace_fragment:ece,colorspace_pars_fragment:tce,envmap_fragment:nce,envmap_common_pars_fragment:rce,envmap_pars_fragment:ice,envmap_pars_vertex:sce,envmap_physical_pars_fragment:gce,envmap_vertex:oce,fog_vertex:ace,fog_pars_vertex:lce,fog_fragment:cce,fog_pars_fragment:uce,gradientmap_pars_fragment:fce,lightmap_pars_fragment:dce,lights_lambert_fragment:hce,lights_lambert_pars_fragment:pce,lights_pars_begin:mce,lights_toon_fragment:yce,lights_toon_pars_fragment:vce,lights_phong_fragment:xce,lights_phong_pars_fragment:bce,lights_physical_fragment:_ce,lights_physical_pars_fragment:wce,lights_fragment_begin:Sce,lights_fragment_maps:Mce,lights_fragment_end:Ece,logdepthbuf_fragment:Tce,logdepthbuf_pars_fragment:Cce,logdepthbuf_pars_vertex:Rce,logdepthbuf_vertex:Ace,map_fragment:Pce,map_pars_fragment:Ice,map_particle_fragment:Nce,map_particle_pars_fragment:kce,metalnessmap_fragment:Lce,metalnessmap_pars_fragment:Oce,morphinstance_vertex:Dce,morphcolor_vertex:Fce,morphnormal_vertex:zce,morphtarget_pars_vertex:Uce,morphtarget_vertex:Bce,normal_fragment_begin:jce,normal_fragment_maps:Vce,normal_pars_fragment:$ce,normal_pars_vertex:Wce,normal_vertex:Hce,normalmap_pars_fragment:Gce,clearcoat_normal_fragment_begin:Xce,clearcoat_normal_fragment_maps:qce,clearcoat_pars_fragment:Yce,iridescence_pars_fragment:Kce,opaque_fragment:Zce,packing:Jce,premultiplied_alpha_fragment:Qce,project_vertex:eue,dithering_fragment:tue,dithering_pars_fragment:nue,roughnessmap_fragment:rue,roughnessmap_pars_fragment:iue,shadowmap_pars_fragment:sue,shadowmap_pars_vertex:oue,shadowmap_vertex:aue,shadowmask_pars_fragment:lue,skinbase_vertex:cue,skinning_pars_vertex:uue,skinning_vertex:fue,skinnormal_vertex:due,specularmap_fragment:hue,specularmap_pars_fragment:pue,tonemapping_fragment:mue,tonemapping_pars_fragment:gue,transmission_fragment:yue,transmission_pars_fragment:vue,uv_pars_fragment:xue,uv_pars_vertex:bue,uv_vertex:_ue,worldpos_vertex:wue,background_vert:Sue,background_frag:Mue,backgroundCube_vert:Eue,backgroundCube_frag:Tue,cube_vert:Cue,cube_frag:Rue,depth_vert:Aue,depth_frag:Pue,distanceRGBA_vert:Iue,distanceRGBA_frag:Nue,equirect_vert:kue,equirect_frag:Lue,linedashed_vert:Oue,linedashed_frag:Due,meshbasic_vert:Fue,meshbasic_frag:zue,meshlambert_vert:Uue,meshlambert_frag:Bue,meshmatcap_vert:jue,meshmatcap_frag:Vue,meshnormal_vert:$ue,meshnormal_frag:Wue,meshphong_vert:Hue,meshphong_frag:Gue,meshphysical_vert:Xue,meshphysical_frag:que,meshtoon_vert:Yue,meshtoon_frag:Kue,points_vert:Zue,points_frag:Jue,shadow_vert:Que,shadow_frag:efe,sprite_vert:tfe,sprite_frag:nfe},tt={common:{diffuse:{value:new ot(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Dt},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Dt}},envmap:{envMap:{value:null},envMapRotation:{value:new Dt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Dt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Dt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Dt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Dt},normalScale:{value:new Ne(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Dt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Dt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Dt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Dt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ot(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 ot(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0},uvTransform:{value:new Dt}},sprite:{diffuse:{value:new ot(16777215)},opacity:{value:1},center:{value:new Ne(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Dt},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0}}},no={basic:{uniforms:ri([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.fog]),vertexShader:jt.meshbasic_vert,fragmentShader:jt.meshbasic_frag},lambert:{uniforms:ri([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,tt.lights,{emissive:{value:new ot(0)}}]),vertexShader:jt.meshlambert_vert,fragmentShader:jt.meshlambert_frag},phong:{uniforms:ri([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,tt.lights,{emissive:{value:new ot(0)},specular:{value:new ot(1118481)},shininess:{value:30}}]),vertexShader:jt.meshphong_vert,fragmentShader:jt.meshphong_frag},standard:{uniforms:ri([tt.common,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.roughnessmap,tt.metalnessmap,tt.fog,tt.lights,{emissive:{value:new ot(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag},toon:{uniforms:ri([tt.common,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.gradientmap,tt.fog,tt.lights,{emissive:{value:new ot(0)}}]),vertexShader:jt.meshtoon_vert,fragmentShader:jt.meshtoon_frag},matcap:{uniforms:ri([tt.common,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,{matcap:{value:null}}]),vertexShader:jt.meshmatcap_vert,fragmentShader:jt.meshmatcap_frag},points:{uniforms:ri([tt.points,tt.fog]),vertexShader:jt.points_vert,fragmentShader:jt.points_frag},dashed:{uniforms:ri([tt.common,tt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:jt.linedashed_vert,fragmentShader:jt.linedashed_frag},depth:{uniforms:ri([tt.common,tt.displacementmap]),vertexShader:jt.depth_vert,fragmentShader:jt.depth_frag},normal:{uniforms:ri([tt.common,tt.bumpmap,tt.normalmap,tt.displacementmap,{opacity:{value:1}}]),vertexShader:jt.meshnormal_vert,fragmentShader:jt.meshnormal_frag},sprite:{uniforms:ri([tt.sprite,tt.fog]),vertexShader:jt.sprite_vert,fragmentShader:jt.sprite_frag},background:{uniforms:{uvTransform:{value:new Dt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:jt.background_vert,fragmentShader:jt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Dt}},vertexShader:jt.backgroundCube_vert,fragmentShader:jt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:jt.cube_vert,fragmentShader:jt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:jt.equirect_vert,fragmentShader:jt.equirect_frag},distanceRGBA:{uniforms:ri([tt.common,tt.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:jt.distanceRGBA_vert,fragmentShader:jt.distanceRGBA_frag},shadow:{uniforms:ri([tt.lights,tt.fog,{color:{value:new ot(0)},opacity:{value:1}}]),vertexShader:jt.shadow_vert,fragmentShader:jt.shadow_frag}};no.physical={uniforms:ri([no.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Dt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Dt},clearcoatNormalScale:{value:new Ne(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Dt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Dt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Dt},sheen:{value:0},sheenColor:{value:new ot(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Dt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Dt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Dt},transmissionSamplerSize:{value:new Ne},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Dt},attenuationDistance:{value:0},attenuationColor:{value:new ot(0)},specularColor:{value:new ot(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Dt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Dt},anisotropyVector:{value:new Ne},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Dt}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag};const Jy={r:0,b:0,g:0},bc=new cs,rfe=new Tt;function ife(t,e,n,r,i,s,o){const a=new ot(0);let l=s===!0?0:1,c,u,f=null,h=0,m=null;function y(_){let S=_.isScene===!0?_.background:null;return S&&S.isTexture&&(S=(_.backgroundBlurriness>0?n:e).get(S)),S}function x(_){let S=!1;const C=y(_);C===null?g(a,l):C&&C.isColor&&(g(C,1),S=!0);const P=t.xr.getEnvironmentBlendMode();P==="additive"?r.buffers.color.setClear(0,0,0,1,o):P==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,o),(t.autoClear||S)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function v(_,S){const C=y(S);C&&(C.isCubeTexture||C.mapping===rh)?(u===void 0&&(u=new nr(new Pu(1,1,1),new uo({name:"BackgroundCubeMaterial",uniforms:kd(no.backgroundCube.uniforms),vertexShader:no.backgroundCube.vertexShader,fragmentShader:no.backgroundCube.fragmentShader,side:di,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(P,A,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),bc.copy(S.backgroundRotation),bc.x*=-1,bc.y*=-1,bc.z*=-1,C.isCubeTexture&&C.isRenderTargetTexture===!1&&(bc.y*=-1,bc.z*=-1),u.material.uniforms.envMap.value=C,u.material.uniforms.flipEnvMap.value=C.isCubeTexture&&C.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(rfe.makeRotationFromEuler(bc)),u.material.toneMapped=tn.getTransfer(C.colorSpace)!==mn,(f!==C||h!==C.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=C,h=C.version,m=t.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null)):C&&C.isTexture&&(c===void 0&&(c=new nr(new oh(2,2),new uo({name:"BackgroundMaterial",uniforms:kd(no.background.uniforms),vertexShader:no.background.vertexShader,fragmentShader:no.background.fragmentShader,side:Fa,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=C,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=tn.getTransfer(C.colorSpace)!==mn,C.matrixAutoUpdate===!0&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(f!==C||h!==C.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=C,h=C.version,m=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null))}function g(_,S){_.getRGB(Jy,aB(t)),r.buffers.color.setClear(Jy.r,Jy.g,Jy.b,S,o)}function b(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(_,S=1){a.set(_),l=S,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(_){l=_,g(a,l)},render:x,addToRenderList:v,dispose:b}}function sfe(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=h(null);let s=i,o=!1;function a(T,N,z,D,B){let G=!1;const X=f(D,z,N);s!==X&&(s=X,c(s.object)),G=m(T,D,z,B),G&&y(T,D,z,B),B!==null&&e.update(B,t.ELEMENT_ARRAY_BUFFER),(G||o)&&(o=!1,S(T,N,z,D),B!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(B).buffer))}function l(){return t.createVertexArray()}function c(T){return t.bindVertexArray(T)}function u(T){return t.deleteVertexArray(T)}function f(T,N,z){const D=z.wireframe===!0;let B=r[T.id];B===void 0&&(B={},r[T.id]=B);let G=B[N.id];G===void 0&&(G={},B[N.id]=G);let X=G[D];return X===void 0&&(X=h(l()),G[D]=X),X}function h(T){const N=[],z=[],D=[];for(let B=0;B=0){const K=B[F];let Q=G[F];if(Q===void 0&&(F==="instanceMatrix"&&T.instanceMatrix&&(Q=T.instanceMatrix),F==="instanceColor"&&T.instanceColor&&(Q=T.instanceColor)),K===void 0||K.attribute!==Q||Q&&K.data!==Q.data)return!0;X++}return s.attributesNum!==X||s.index!==D}function y(T,N,z,D){const B={},G=N.attributes;let X=0;const Z=z.getAttributes();for(const F in Z)if(Z[F].location>=0){let K=G[F];K===void 0&&(F==="instanceMatrix"&&T.instanceMatrix&&(K=T.instanceMatrix),F==="instanceColor"&&T.instanceColor&&(K=T.instanceColor));const Q={};Q.attribute=K,K&&K.data&&(Q.data=K.data),B[F]=Q,X++}s.attributes=B,s.attributesNum=X,s.index=D}function x(){const T=s.newAttributes;for(let N=0,z=T.length;N=0){let q=B[Z];if(q===void 0&&(Z==="instanceMatrix"&&T.instanceMatrix&&(q=T.instanceMatrix),Z==="instanceColor"&&T.instanceColor&&(q=T.instanceColor)),q!==void 0){const K=q.normalized,Q=q.itemSize,he=e.get(q);if(he===void 0)continue;const fe=he.buffer,J=he.type,de=he.bytesPerElement,be=J===t.INT||J===t.UNSIGNED_INT||q.gpuType===o_;if(q.isInterleavedBufferAttribute){const _e=q.data,He=_e.stride,at=q.offset;if(_e.isInstancedInterleavedBuffer){for(let Ve=0;Ve0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=n.logarithmicDepthBuffer===!0,h=n.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),m=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),y=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=t.getParameter(t.MAX_TEXTURE_SIZE),v=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),g=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),S=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),C=y>0,P=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:m,maxVertexTextures:y,maxTextureSize:x,maxCubemapSize:v,maxAttributes:g,maxVertexUniforms:b,maxVaryings:_,maxFragmentUniforms:S,vertexTextures:C,maxSamples:P}}function lfe(t){const e=this;let n=null,r=0,i=!1,s=!1;const o=new gl,a=new Dt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const m=f.length!==0||h||r!==0||i;return i=h,r=f.length,m},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,m){const y=f.clippingPlanes,x=f.clipIntersection,v=f.clipShadows,g=t.get(f);if(!i||y===null||y.length===0||s&&!v)s?u(null):c();else{const b=s?0:r,_=b*4;let S=g.clippingState||null;l.value=S,S=u(y,h,_,m);for(let C=0;C!==_;++C)S[C]=n[C];g.clippingState=S,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(f,h,m,y){const x=f!==null?f.length:0;let v=null;if(x!==0){if(v=l.value,y!==!0||v===null){const g=m+x*4,b=h.matrixWorldInverse;a.getNormalMatrix(b),(v===null||v.length0){const c=new uB(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",i),n(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:r,dispose:s}}const Qf=4,fL=[.125,.215,.35,.446,.526,.582],Pc=20,sE=new Rg,dL=new ot;let oE=null,aE=0,lE=0,cE=!1;const Cc=(1+Math.sqrt(5))/2,wf=1/Cc,hL=[new H(-Cc,wf,0),new H(Cc,wf,0),new H(-wf,0,Cc),new H(wf,0,Cc),new H(0,Cc,-wf),new H(0,Cc,wf),new H(-1,1,-1),new H(1,1,-1),new H(-1,1,1),new H(1,1,1)];class PT{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){oE=this._renderer.getRenderTarget(),aE=this._renderer.getActiveCubeFace(),lE=this._renderer.getActiveMipmapLevel(),cE=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,r,i,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=gL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=mL(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?_:0,_,_),u.setRenderTarget(i),x&&u.render(y,a),u.render(e,a)}y.geometry.dispose(),y.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=v}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===za||e.mapping===Fl;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=gL()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=mL());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new nr(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Qy(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(o,sE)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;sPc&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${v} samples when the maximum is set to ${Pc}`);const g=[];let b=0;for(let A=0;A_-Qf?i-_+Qf:0),P=4*(this._cubeSize-S);Qy(n,C,P,3*S,2*S),l.setRenderTarget(n),l.render(f,sE)}}function ufe(t){const e=[],n=[],r=[];let i=t;const s=t-Qf+1+fL.length;for(let o=0;ot-Qf?l=fL[o-t+Qf-1]:o===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],m=6,y=6,x=3,v=2,g=1,b=new Float32Array(x*y*m),_=new Float32Array(v*y*m),S=new Float32Array(g*y*m);for(let P=0;P2?0:-1,k=[A,L,0,A+2/3,L,0,A+2/3,L+1,0,A,L,0,A+2/3,L+1,0,A,L+1,0];b.set(k,x*y*P),_.set(h,v*y*P);const T=[P,P,P,P,P,P];S.set(T,g*y*P)}const C=new Bt;C.setAttribute("position",new yn(b,x)),C.setAttribute("uv",new yn(_,v)),C.setAttribute("faceIndex",new yn(S,g)),e.push(C),i>Qf&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function pL(t,e,n){const r=new Xo(t,e,n);return r.texture.mapping=rh,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Qy(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function ffe(t,e,n){const r=new Float32Array(Pc),i=new H(0,1,0);return new uo({name:"SphericalGaussianBlur",defines:{n:Pc,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:UA(),fragmentShader:` +}`,jt={alphahash_fragment:Nle,alphahash_pars_fragment:kle,alphamap_fragment:Lle,alphamap_pars_fragment:Ole,alphatest_fragment:Dle,alphatest_pars_fragment:Fle,aomap_fragment:zle,aomap_pars_fragment:Ule,batching_pars_vertex:Ble,batching_vertex:jle,begin_vertex:Vle,beginnormal_vertex:$le,bsdfs:Wle,iridescence_fragment:Hle,bumpmap_pars_fragment:Gle,clipping_planes_fragment:Xle,clipping_planes_pars_fragment:qle,clipping_planes_pars_vertex:Yle,clipping_planes_vertex:Kle,color_fragment:Zle,color_pars_fragment:Jle,color_pars_vertex:Qle,color_vertex:ece,common:tce,cube_uv_reflection_fragment:nce,defaultnormal_vertex:rce,displacementmap_pars_vertex:ice,displacementmap_vertex:sce,emissivemap_fragment:oce,emissivemap_pars_fragment:ace,colorspace_fragment:lce,colorspace_pars_fragment:cce,envmap_fragment:uce,envmap_common_pars_fragment:fce,envmap_pars_fragment:dce,envmap_pars_vertex:hce,envmap_physical_pars_fragment:Mce,envmap_vertex:pce,fog_vertex:mce,fog_pars_vertex:gce,fog_fragment:yce,fog_pars_fragment:vce,gradientmap_pars_fragment:xce,lightmap_pars_fragment:bce,lights_lambert_fragment:_ce,lights_lambert_pars_fragment:wce,lights_pars_begin:Sce,lights_toon_fragment:Ece,lights_toon_pars_fragment:Tce,lights_phong_fragment:Cce,lights_phong_pars_fragment:Rce,lights_physical_fragment:Ace,lights_physical_pars_fragment:Pce,lights_fragment_begin:Ice,lights_fragment_maps:Nce,lights_fragment_end:kce,logdepthbuf_fragment:Lce,logdepthbuf_pars_fragment:Oce,logdepthbuf_pars_vertex:Dce,logdepthbuf_vertex:Fce,map_fragment:zce,map_pars_fragment:Uce,map_particle_fragment:Bce,map_particle_pars_fragment:jce,metalnessmap_fragment:Vce,metalnessmap_pars_fragment:$ce,morphinstance_vertex:Wce,morphcolor_vertex:Hce,morphnormal_vertex:Gce,morphtarget_pars_vertex:Xce,morphtarget_vertex:qce,normal_fragment_begin:Yce,normal_fragment_maps:Kce,normal_pars_fragment:Zce,normal_pars_vertex:Jce,normal_vertex:Qce,normalmap_pars_fragment:eue,clearcoat_normal_fragment_begin:tue,clearcoat_normal_fragment_maps:nue,clearcoat_pars_fragment:rue,iridescence_pars_fragment:iue,opaque_fragment:sue,packing:oue,premultiplied_alpha_fragment:aue,project_vertex:lue,dithering_fragment:cue,dithering_pars_fragment:uue,roughnessmap_fragment:fue,roughnessmap_pars_fragment:due,shadowmap_pars_fragment:hue,shadowmap_pars_vertex:pue,shadowmap_vertex:mue,shadowmask_pars_fragment:gue,skinbase_vertex:yue,skinning_pars_vertex:vue,skinning_vertex:xue,skinnormal_vertex:bue,specularmap_fragment:_ue,specularmap_pars_fragment:wue,tonemapping_fragment:Sue,tonemapping_pars_fragment:Mue,transmission_fragment:Eue,transmission_pars_fragment:Tue,uv_pars_fragment:Cue,uv_pars_vertex:Rue,uv_vertex:Aue,worldpos_vertex:Pue,background_vert:Iue,background_frag:Nue,backgroundCube_vert:kue,backgroundCube_frag:Lue,cube_vert:Oue,cube_frag:Due,depth_vert:Fue,depth_frag:zue,distanceRGBA_vert:Uue,distanceRGBA_frag:Bue,equirect_vert:jue,equirect_frag:Vue,linedashed_vert:$ue,linedashed_frag:Wue,meshbasic_vert:Hue,meshbasic_frag:Gue,meshlambert_vert:Xue,meshlambert_frag:que,meshmatcap_vert:Yue,meshmatcap_frag:Kue,meshnormal_vert:Zue,meshnormal_frag:Jue,meshphong_vert:Que,meshphong_frag:efe,meshphysical_vert:tfe,meshphysical_frag:nfe,meshtoon_vert:rfe,meshtoon_frag:ife,points_vert:sfe,points_frag:ofe,shadow_vert:afe,shadow_frag:lfe,sprite_vert:cfe,sprite_frag:ufe},tt={common:{diffuse:{value:new ot(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Dt},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Dt}},envmap:{envMap:{value:null},envMapRotation:{value:new Dt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Dt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Dt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Dt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Dt},normalScale:{value:new Ne(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Dt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Dt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Dt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Dt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ot(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 ot(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0},uvTransform:{value:new Dt}},sprite:{diffuse:{value:new ot(16777215)},opacity:{value:1},center:{value:new Ne(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Dt},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0}}},no={basic:{uniforms:ri([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.fog]),vertexShader:jt.meshbasic_vert,fragmentShader:jt.meshbasic_frag},lambert:{uniforms:ri([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,tt.lights,{emissive:{value:new ot(0)}}]),vertexShader:jt.meshlambert_vert,fragmentShader:jt.meshlambert_frag},phong:{uniforms:ri([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,tt.lights,{emissive:{value:new ot(0)},specular:{value:new ot(1118481)},shininess:{value:30}}]),vertexShader:jt.meshphong_vert,fragmentShader:jt.meshphong_frag},standard:{uniforms:ri([tt.common,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.roughnessmap,tt.metalnessmap,tt.fog,tt.lights,{emissive:{value:new ot(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag},toon:{uniforms:ri([tt.common,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.gradientmap,tt.fog,tt.lights,{emissive:{value:new ot(0)}}]),vertexShader:jt.meshtoon_vert,fragmentShader:jt.meshtoon_frag},matcap:{uniforms:ri([tt.common,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,{matcap:{value:null}}]),vertexShader:jt.meshmatcap_vert,fragmentShader:jt.meshmatcap_frag},points:{uniforms:ri([tt.points,tt.fog]),vertexShader:jt.points_vert,fragmentShader:jt.points_frag},dashed:{uniforms:ri([tt.common,tt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:jt.linedashed_vert,fragmentShader:jt.linedashed_frag},depth:{uniforms:ri([tt.common,tt.displacementmap]),vertexShader:jt.depth_vert,fragmentShader:jt.depth_frag},normal:{uniforms:ri([tt.common,tt.bumpmap,tt.normalmap,tt.displacementmap,{opacity:{value:1}}]),vertexShader:jt.meshnormal_vert,fragmentShader:jt.meshnormal_frag},sprite:{uniforms:ri([tt.sprite,tt.fog]),vertexShader:jt.sprite_vert,fragmentShader:jt.sprite_frag},background:{uniforms:{uvTransform:{value:new Dt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:jt.background_vert,fragmentShader:jt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Dt}},vertexShader:jt.backgroundCube_vert,fragmentShader:jt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:jt.cube_vert,fragmentShader:jt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:jt.equirect_vert,fragmentShader:jt.equirect_frag},distanceRGBA:{uniforms:ri([tt.common,tt.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:jt.distanceRGBA_vert,fragmentShader:jt.distanceRGBA_frag},shadow:{uniforms:ri([tt.lights,tt.fog,{color:{value:new ot(0)},opacity:{value:1}}]),vertexShader:jt.shadow_vert,fragmentShader:jt.shadow_frag}};no.physical={uniforms:ri([no.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Dt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Dt},clearcoatNormalScale:{value:new Ne(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Dt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Dt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Dt},sheen:{value:0},sheenColor:{value:new ot(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Dt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Dt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Dt},transmissionSamplerSize:{value:new Ne},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Dt},attenuationDistance:{value:0},attenuationColor:{value:new ot(0)},specularColor:{value:new ot(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Dt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Dt},anisotropyVector:{value:new Ne},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Dt}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag};const Jy={r:0,b:0,g:0},bc=new cs,ffe=new Tt;function dfe(t,e,n,r,i,s,o){const a=new ot(0);let l=s===!0?0:1,c,u,f=null,h=0,m=null;function y(_){let S=_.isScene===!0?_.background:null;return S&&S.isTexture&&(S=(_.backgroundBlurriness>0?n:e).get(S)),S}function x(_){let S=!1;const C=y(_);C===null?g(a,l):C&&C.isColor&&(g(C,1),S=!0);const P=t.xr.getEnvironmentBlendMode();P==="additive"?r.buffers.color.setClear(0,0,0,1,o):P==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,o),(t.autoClear||S)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function v(_,S){const C=y(S);C&&(C.isCubeTexture||C.mapping===ih)?(u===void 0&&(u=new nr(new Pu(1,1,1),new uo({name:"BackgroundCubeMaterial",uniforms:Ld(no.backgroundCube.uniforms),vertexShader:no.backgroundCube.vertexShader,fragmentShader:no.backgroundCube.fragmentShader,side:di,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(P,A,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),bc.copy(S.backgroundRotation),bc.x*=-1,bc.y*=-1,bc.z*=-1,C.isCubeTexture&&C.isRenderTargetTexture===!1&&(bc.y*=-1,bc.z*=-1),u.material.uniforms.envMap.value=C,u.material.uniforms.flipEnvMap.value=C.isCubeTexture&&C.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(ffe.makeRotationFromEuler(bc)),u.material.toneMapped=tn.getTransfer(C.colorSpace)!==mn,(f!==C||h!==C.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=C,h=C.version,m=t.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null)):C&&C.isTexture&&(c===void 0&&(c=new nr(new ah(2,2),new uo({name:"BackgroundMaterial",uniforms:Ld(no.background.uniforms),vertexShader:no.background.vertexShader,fragmentShader:no.background.fragmentShader,side:Fa,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=C,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=tn.getTransfer(C.colorSpace)!==mn,C.matrixAutoUpdate===!0&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(f!==C||h!==C.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=C,h=C.version,m=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null))}function g(_,S){_.getRGB(Jy,uB(t)),r.buffers.color.setClear(Jy.r,Jy.g,Jy.b,S,o)}function b(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(_,S=1){a.set(_),l=S,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(_){l=_,g(a,l)},render:x,addToRenderList:v,dispose:b}}function hfe(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=h(null);let s=i,o=!1;function a(T,N,z,D,B){let G=!1;const X=f(D,z,N);s!==X&&(s=X,c(s.object)),G=m(T,D,z,B),G&&y(T,D,z,B),B!==null&&e.update(B,t.ELEMENT_ARRAY_BUFFER),(G||o)&&(o=!1,S(T,N,z,D),B!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(B).buffer))}function l(){return t.createVertexArray()}function c(T){return t.bindVertexArray(T)}function u(T){return t.deleteVertexArray(T)}function f(T,N,z){const D=z.wireframe===!0;let B=r[T.id];B===void 0&&(B={},r[T.id]=B);let G=B[N.id];G===void 0&&(G={},B[N.id]=G);let X=G[D];return X===void 0&&(X=h(l()),G[D]=X),X}function h(T){const N=[],z=[],D=[];for(let B=0;B=0){const K=B[F];let Q=G[F];if(Q===void 0&&(F==="instanceMatrix"&&T.instanceMatrix&&(Q=T.instanceMatrix),F==="instanceColor"&&T.instanceColor&&(Q=T.instanceColor)),K===void 0||K.attribute!==Q||Q&&K.data!==Q.data)return!0;X++}return s.attributesNum!==X||s.index!==D}function y(T,N,z,D){const B={},G=N.attributes;let X=0;const Z=z.getAttributes();for(const F in Z)if(Z[F].location>=0){let K=G[F];K===void 0&&(F==="instanceMatrix"&&T.instanceMatrix&&(K=T.instanceMatrix),F==="instanceColor"&&T.instanceColor&&(K=T.instanceColor));const Q={};Q.attribute=K,K&&K.data&&(Q.data=K.data),B[F]=Q,X++}s.attributes=B,s.attributesNum=X,s.index=D}function x(){const T=s.newAttributes;for(let N=0,z=T.length;N=0){let q=B[Z];if(q===void 0&&(Z==="instanceMatrix"&&T.instanceMatrix&&(q=T.instanceMatrix),Z==="instanceColor"&&T.instanceColor&&(q=T.instanceColor)),q!==void 0){const K=q.normalized,Q=q.itemSize,he=e.get(q);if(he===void 0)continue;const fe=he.buffer,J=he.type,de=he.bytesPerElement,be=J===t.INT||J===t.UNSIGNED_INT||q.gpuType===o_;if(q.isInterleavedBufferAttribute){const _e=q.data,Xe=_e.stride,at=q.offset;if(_e.isInstancedInterleavedBuffer){for(let Ve=0;Ve0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=n.logarithmicDepthBuffer===!0,h=n.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),m=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),y=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=t.getParameter(t.MAX_TEXTURE_SIZE),v=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),g=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),S=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),C=y>0,P=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:m,maxVertexTextures:y,maxTextureSize:x,maxCubemapSize:v,maxAttributes:g,maxVertexUniforms:b,maxVaryings:_,maxFragmentUniforms:S,vertexTextures:C,maxSamples:P}}function gfe(t){const e=this;let n=null,r=0,i=!1,s=!1;const o=new gl,a=new Dt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const m=f.length!==0||h||r!==0||i;return i=h,r=f.length,m},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,m){const y=f.clippingPlanes,x=f.clipIntersection,v=f.clipShadows,g=t.get(f);if(!i||y===null||y.length===0||s&&!v)s?u(null):c();else{const b=s?0:r,_=b*4;let S=g.clippingState||null;l.value=S,S=u(y,h,_,m);for(let C=0;C!==_;++C)S[C]=n[C];g.clippingState=S,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(f,h,m,y){const x=f!==null?f.length:0;let v=null;if(x!==0){if(v=l.value,y!==!0||v===null){const g=m+x*4,b=h.matrixWorldInverse;a.getNormalMatrix(b),(v===null||v.length0){const c=new hB(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",i),n(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:r,dispose:s}}const Qf=4,fL=[.125,.215,.35,.446,.526,.582],Pc=20,sE=new Rg,dL=new ot;let oE=null,aE=0,lE=0,cE=!1;const Cc=(1+Math.sqrt(5))/2,wf=1/Cc,hL=[new H(-Cc,wf,0),new H(Cc,wf,0),new H(-wf,0,Cc),new H(wf,0,Cc),new H(0,Cc,-wf),new H(0,Cc,wf),new H(-1,1,-1),new H(1,1,-1),new H(-1,1,1),new H(1,1,1)];class AT{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){oE=this._renderer.getRenderTarget(),aE=this._renderer.getActiveCubeFace(),lE=this._renderer.getActiveMipmapLevel(),cE=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,r,i,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=gL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=mL(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?_:0,_,_),u.setRenderTarget(i),x&&u.render(y,a),u.render(e,a)}y.geometry.dispose(),y.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=v}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===za||e.mapping===Fl;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=gL()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=mL());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new nr(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Qy(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(o,sE)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;sPc&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${v} samples when the maximum is set to ${Pc}`);const g=[];let b=0;for(let A=0;A_-Qf?i-_+Qf:0),P=4*(this._cubeSize-S);Qy(n,C,P,3*S,2*S),l.setRenderTarget(n),l.render(f,sE)}}function vfe(t){const e=[],n=[],r=[];let i=t;const s=t-Qf+1+fL.length;for(let o=0;ot-Qf?l=fL[o-t+Qf-1]:o===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],m=6,y=6,x=3,v=2,g=1,b=new Float32Array(x*y*m),_=new Float32Array(v*y*m),S=new Float32Array(g*y*m);for(let P=0;P2?0:-1,k=[A,L,0,A+2/3,L,0,A+2/3,L+1,0,A,L,0,A+2/3,L+1,0,A,L+1,0];b.set(k,x*y*P),_.set(h,v*y*P);const T=[P,P,P,P,P,P];S.set(T,g*y*P)}const C=new Bt;C.setAttribute("position",new yn(b,x)),C.setAttribute("uv",new yn(_,v)),C.setAttribute("faceIndex",new yn(S,g)),e.push(C),i>Qf&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function pL(t,e,n){const r=new Xo(t,e,n);return r.texture.mapping=ih,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Qy(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function xfe(t,e,n){const r=new Float32Array(Pc),i=new H(0,1,0);return new uo({name:"SphericalGaussianBlur",defines:{n:Pc,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:FA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3813,7 +3813,7 @@ void main() { } } - `,blending:Ra,depthTest:!1,depthWrite:!1})}function mL(){return new uo({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:UA(),fragmentShader:` + `,blending:Ra,depthTest:!1,depthWrite:!1})}function mL(){return new uo({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:FA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3832,7 +3832,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Ra,depthTest:!1,depthWrite:!1})}function gL(){return new uo({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:UA(),fragmentShader:` + `,blending:Ra,depthTest:!1,depthWrite:!1})}function gL(){return new uo({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:FA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3848,7 +3848,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Ra,depthTest:!1,depthWrite:!1})}function UA(){return` + `,blending:Ra,depthTest:!1,depthWrite:!1})}function FA(){return` precision mediump float; precision mediump int; @@ -3903,17 +3903,17 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function dfe(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===Cm||l===Rm,u=l===za||l===Fl;if(c||u){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return n===null&&(n=new PT(t)),f=c?n.fromEquirectangular(a,f):n.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const m=a.image;return c&&m&&m.height>0||u&&m&&i(m)?(n===null&&(n=new PT(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(P=Math.ceil(C/e.maxTextureSize),C=e.maxTextureSize);const A=new Float32Array(C*P*4*f),L=new xg(A,C,P,f);L.type=li,L.needsUpdate=!0;const k=S*4;for(let N=0;N0)return t;const i=e*n;let s=vL[i];if(s===void 0&&(s=new Float32Array(i),vL[i]=s),e!==0){r.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n0||u&&m&&i(m)?(n===null&&(n=new AT(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(P=Math.ceil(C/e.maxTextureSize),C=e.maxTextureSize);const A=new Float32Array(C*P*4*f),L=new xg(A,C,P,f);L.type=li,L.needsUpdate=!0;const k=S*4;for(let N=0;N0)return t;const i=e*n;let s=vL[i];if(s===void 0&&(s=new Float32Array(i),vL[i]=s),e!==0){r.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[o]}`)}return r.join(` -`)}const EL=new Dt;function dde(t){tn._getMatrix(EL,tn.workingColorSpace,t);const e=`mat3( ${EL.elements.map(n=>n.toFixed(4))} )`;switch(tn.getTransfer(t)){case km:return[e,"LinearTransferOETF"];case mn:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function TL(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const s=/ERROR: 0:(\d+)/.exec(i);if(s){const o=parseInt(s[1]);return n.toUpperCase()+` +`)}const EL=new Dt;function bde(t){tn._getMatrix(EL,tn.workingColorSpace,t);const e=`mat3( ${EL.elements.map(n=>n.toFixed(4))} )`;switch(tn.getTransfer(t)){case km:return[e,"LinearTransferOETF"];case mn:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function TL(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const s=/ERROR: 0:(\d+)/.exec(i);if(s){const o=parseInt(s[1]);return n.toUpperCase()+` `+i+` -`+fde(t.getShaderSource(e),o)}else return i}function hde(t,e){const n=dde(e);return[`vec4 ${t}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join(` -`)}function pde(t,e){let n;switch(e){case D6:n="Linear";break;case F6:n="Reinhard";break;case z6:n="Cineon";break;case JR:n="ACESFilmic";break;case B6:n="AgX";break;case j6:n="Neutral";break;case U6:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const ev=new H;function mde(){tn.getLuminanceCoefficients(ev);const t=ev.x.toFixed(4),e=ev.y.toFixed(4),n=ev.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${t}, ${e}, ${n} );`," return dot( weights, rgb );","}"].join(` -`)}function gde(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(_p).join(` -`)}function yde(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` -`)}function vde(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function IT(t){return t.replace(xde,_de)}const bde=new Map;function _de(t,e){let n=jt[e];if(n===void 0){const r=bde.get(e);if(r!==void 0)n=jt[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return IT(n)}const wde=/#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 AL(t){return t.replace(wde,Sde)}function Sde(t,e,n,r){let i="";for(let s=parseInt(e);s/gm;function PT(t){return t.replace(Cde,Ade)}const Rde=new Map;function Ade(t,e){let n=jt[e];if(n===void 0){const r=Rde.get(e);if(r!==void 0)n=jt[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return PT(n)}const Pde=/#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 AL(t){return t.replace(Pde,Ide)}function Ide(t,e,n,r){let i="";for(let s=parseInt(e);s0&&(v+=` -`),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y].filter(_p).join(` +`),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y].filter(wp).join(` `),g.length>0&&(g+=` `)):(v=[PL(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","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",` -`].filter(_p).join(` -`),g=[PL(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Bo?"#define TONE_MAPPING":"",n.toneMapping!==Bo?jt.tonemapping_pars_fragment:"",n.toneMapping!==Bo?pde("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",jt.colorspace_pars_fragment,hde("linearToOutputTexel",n.outputColorSpace),mde(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` -`].filter(_p).join(` -`)),o=IT(o),o=CL(o,n),o=RL(o,n),a=IT(a),a=CL(a,n),a=RL(a,n),o=AL(o),a=AL(a),n.isRawShaderMaterial!==!0&&(b=`#version 300 es +`].filter(wp).join(` +`),g=[PL(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Bo?"#define TONE_MAPPING":"",n.toneMapping!==Bo?jt.tonemapping_pars_fragment:"",n.toneMapping!==Bo?wde("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",jt.colorspace_pars_fragment,_de("linearToOutputTexel",n.outputColorSpace),Sde(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`].filter(wp).join(` +`)),o=PT(o),o=CL(o,n),o=RL(o,n),a=PT(a),a=CL(a,n),a=RL(a,n),o=AL(o),a=AL(a),n.isRawShaderMaterial!==!0&&(b=`#version 300 es `,v=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+v,g=["#define varying in",n.glslVersion===wT?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===wT?"":"#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(` +`+v,g=["#define varying in",n.glslVersion===_T?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===_T?"":"#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(` `)+` `+g);const _=b+v+o,S=b+g+a,C=ML(i,i.VERTEX_SHADER,_),P=ML(i,i.FRAGMENT_SHADER,S);i.attachShader(x,C),i.attachShader(x,P),n.index0AttributeName!==void 0?i.bindAttribLocation(x,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function A(N){if(t.debug.checkShaderErrors){const z=i.getProgramInfoLog(x).trim(),D=i.getShaderInfoLog(C).trim(),B=i.getShaderInfoLog(P).trim();let G=!0,X=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(G=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,x,C,P);else{const Z=TL(i,C,"vertex"),F=TL(i,P,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` @@ -3954,9 +3954,9 @@ Material Type: `+N.type+` Program Info Log: `+z+` `+Z+` -`+F)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(D===""||B==="")&&(X=!1);X&&(N.diagnostics={runnable:G,programLog:z,vertexShader:{log:D,prefix:v},fragmentShader:{log:B,prefix:g}})}i.deleteShader(C),i.deleteShader(P),L=new $v(i,x),k=vde(i,x)}let L;this.getUniforms=function(){return L===void 0&&A(this),L};let k;this.getAttributes=function(){return k===void 0&&A(this),k};let T=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return T===!1&&(T=i.getProgramParameter(x,cde)),T},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=ude++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=C,this.fragmentShader=P,this}let Pde=0;class Ide{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),s=this._getShaderStage(r),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new Nde(e),n.set(e,r)),r}}class Nde{constructor(e){this.id=Pde++,this.code=e,this.usedTimes=0}}function kde(t,e,n,r,i,s,o){const a=new Zc,l=new Ide,c=new Set,u=[],f=i.logarithmicDepthBuffer,h=i.vertexTextures;let m=i.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function x(k){return c.add(k),k===0?"uv":`uv${k}`}function v(k,T,N,z,D){const B=z.fog,G=D.geometry,X=k.isMeshStandardMaterial?z.environment:null,Z=(k.isMeshStandardMaterial?n:e).get(k.envMap||X),F=Z&&Z.mapping===rh?Z.image.height:null,q=y[k.type];k.precision!==null&&(m=i.getMaxPrecision(k.precision),m!==k.precision&&console.warn("THREE.WebGLProgram.getParameters:",k.precision,"not supported, using",m,"instead."));const K=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,Q=K!==void 0?K.length:0;let he=0;G.morphAttributes.position!==void 0&&(he=1),G.morphAttributes.normal!==void 0&&(he=2),G.morphAttributes.color!==void 0&&(he=3);let fe,J,de,be;if(q){const an=no[q];fe=an.vertexShader,J=an.fragmentShader}else fe=k.vertexShader,J=k.fragmentShader,l.update(k),de=l.getVertexShaderID(k),be=l.getFragmentShaderID(k);const _e=t.getRenderTarget(),He=t.state.buffers.depth.getReversed(),at=D.isInstancedMesh===!0,Ve=D.isBatchedMesh===!0,$e=!!k.map,ae=!!k.matcap,oe=!!Z,V=!!k.aoMap,Ie=!!k.lightMap,Re=!!k.bumpMap,De=!!k.normalMap,ue=!!k.displacementMap,Ye=!!k.emissiveMap,ke=!!k.metalnessMap,$=!!k.roughnessMap,U=k.anisotropy>0,ne=k.clearcoat>0,le=k.dispersion>0,Te=k.iridescence>0,ye=k.sheen>0,Ge=k.transmission>0,Ae=U&&!!k.anisotropyMap,Ee=ne&&!!k.clearcoatMap,_t=ne&&!!k.clearcoatNormalMap,Le=ne&&!!k.clearcoatRoughnessMap,it=Te&&!!k.iridescenceMap,Oe=Te&&!!k.iridescenceThicknessMap,Ke=ye&&!!k.sheenColorMap,ge=ye&&!!k.sheenRoughnessMap,ze=!!k.specularMap,Qe=!!k.specularColorMap,mt=!!k.specularIntensityMap,ee=Ge&&!!k.transmissionMap,Be=Ge&&!!k.thicknessMap,ve=!!k.gradientMap,Pe=!!k.alphaMap,We=k.alphaTest>0,Ze=!!k.alphaHash,It=!!k.extensions;let Cn=Bo;k.toneMapped&&(_e===null||_e.isXRRenderTarget===!0)&&(Cn=t.toneMapping);const rr={shaderID:q,shaderType:k.type,shaderName:k.name,vertexShader:fe,fragmentShader:J,defines:k.defines,customVertexShaderID:de,customFragmentShaderID:be,isRawShaderMaterial:k.isRawShaderMaterial===!0,glslVersion:k.glslVersion,precision:m,batching:Ve,batchingColor:Ve&&D._colorsTexture!==null,instancing:at,instancingColor:at&&D.instanceColor!==null,instancingMorph:at&&D.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:_e===null?t.outputColorSpace:_e.isXRRenderTarget===!0?_e.texture.colorSpace:gu,alphaToCoverage:!!k.alphaToCoverage,map:$e,matcap:ae,envMap:oe,envMapMode:oe&&Z.mapping,envMapCubeUVHeight:F,aoMap:V,lightMap:Ie,bumpMap:Re,normalMap:De,displacementMap:h&&ue,emissiveMap:Ye,normalMapObjectSpace:De&&k.normalMapType===q6,normalMapTangentSpace:De&&k.normalMapType===Xl,metalnessMap:ke,roughnessMap:$,anisotropy:U,anisotropyMap:Ae,clearcoat:ne,clearcoatMap:Ee,clearcoatNormalMap:_t,clearcoatRoughnessMap:Le,dispersion:le,iridescence:Te,iridescenceMap:it,iridescenceThicknessMap:Oe,sheen:ye,sheenColorMap:Ke,sheenRoughnessMap:ge,specularMap:ze,specularColorMap:Qe,specularIntensityMap:mt,transmission:Ge,transmissionMap:ee,thicknessMap:Be,gradientMap:ve,opaque:k.transparent===!1&&k.blending===qc&&k.alphaToCoverage===!1,alphaMap:Pe,alphaTest:We,alphaHash:Ze,combine:k.combine,mapUv:$e&&x(k.map.channel),aoMapUv:V&&x(k.aoMap.channel),lightMapUv:Ie&&x(k.lightMap.channel),bumpMapUv:Re&&x(k.bumpMap.channel),normalMapUv:De&&x(k.normalMap.channel),displacementMapUv:ue&&x(k.displacementMap.channel),emissiveMapUv:Ye&&x(k.emissiveMap.channel),metalnessMapUv:ke&&x(k.metalnessMap.channel),roughnessMapUv:$&&x(k.roughnessMap.channel),anisotropyMapUv:Ae&&x(k.anisotropyMap.channel),clearcoatMapUv:Ee&&x(k.clearcoatMap.channel),clearcoatNormalMapUv:_t&&x(k.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Le&&x(k.clearcoatRoughnessMap.channel),iridescenceMapUv:it&&x(k.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&x(k.iridescenceThicknessMap.channel),sheenColorMapUv:Ke&&x(k.sheenColorMap.channel),sheenRoughnessMapUv:ge&&x(k.sheenRoughnessMap.channel),specularMapUv:ze&&x(k.specularMap.channel),specularColorMapUv:Qe&&x(k.specularColorMap.channel),specularIntensityMapUv:mt&&x(k.specularIntensityMap.channel),transmissionMapUv:ee&&x(k.transmissionMap.channel),thicknessMapUv:Be&&x(k.thicknessMap.channel),alphaMapUv:Pe&&x(k.alphaMap.channel),vertexTangents:!!G.attributes.tangent&&(De||U),vertexColors:k.vertexColors,vertexAlphas:k.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,pointsUvs:D.isPoints===!0&&!!G.attributes.uv&&($e||Pe),fog:!!B,useFog:k.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:k.flatShading===!0,sizeAttenuation:k.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:He,skinning:D.isSkinnedMesh===!0,morphTargets:G.morphAttributes.position!==void 0,morphNormals:G.morphAttributes.normal!==void 0,morphColors:G.morphAttributes.color!==void 0,morphTargetsCount:Q,morphTextureStride:he,numDirLights:T.directional.length,numPointLights:T.point.length,numSpotLights:T.spot.length,numSpotLightMaps:T.spotLightMap.length,numRectAreaLights:T.rectArea.length,numHemiLights:T.hemi.length,numDirLightShadows:T.directionalShadowMap.length,numPointLightShadows:T.pointShadowMap.length,numSpotLightShadows:T.spotShadowMap.length,numSpotLightShadowsWithMaps:T.numSpotLightShadowsWithMaps,numLightProbes:T.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:k.dithering,shadowMapEnabled:t.shadowMap.enabled&&N.length>0,shadowMapType:t.shadowMap.type,toneMapping:Cn,decodeVideoTexture:$e&&k.map.isVideoTexture===!0&&tn.getTransfer(k.map.colorSpace)===mn,decodeVideoTextureEmissive:Ye&&k.emissiveMap.isVideoTexture===!0&&tn.getTransfer(k.emissiveMap.colorSpace)===mn,premultipliedAlpha:k.premultipliedAlpha,doubleSided:k.side===ro,flipSided:k.side===di,useDepthPacking:k.depthPacking>=0,depthPacking:k.depthPacking||0,index0AttributeName:k.index0AttributeName,extensionClipCullDistance:It&&k.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(It&&k.extensions.multiDraw===!0||Ve)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:k.customProgramCacheKey()};return rr.vertexUv1s=c.has(1),rr.vertexUv2s=c.has(2),rr.vertexUv3s=c.has(3),c.clear(),rr}function g(k){const T=[];if(k.shaderID?T.push(k.shaderID):(T.push(k.customVertexShaderID),T.push(k.customFragmentShaderID)),k.defines!==void 0)for(const N in k.defines)T.push(N),T.push(k.defines[N]);return k.isRawShaderMaterial===!1&&(b(T,k),_(T,k),T.push(t.outputColorSpace)),T.push(k.customProgramCacheKey),T.join()}function b(k,T){k.push(T.precision),k.push(T.outputColorSpace),k.push(T.envMapMode),k.push(T.envMapCubeUVHeight),k.push(T.mapUv),k.push(T.alphaMapUv),k.push(T.lightMapUv),k.push(T.aoMapUv),k.push(T.bumpMapUv),k.push(T.normalMapUv),k.push(T.displacementMapUv),k.push(T.emissiveMapUv),k.push(T.metalnessMapUv),k.push(T.roughnessMapUv),k.push(T.anisotropyMapUv),k.push(T.clearcoatMapUv),k.push(T.clearcoatNormalMapUv),k.push(T.clearcoatRoughnessMapUv),k.push(T.iridescenceMapUv),k.push(T.iridescenceThicknessMapUv),k.push(T.sheenColorMapUv),k.push(T.sheenRoughnessMapUv),k.push(T.specularMapUv),k.push(T.specularColorMapUv),k.push(T.specularIntensityMapUv),k.push(T.transmissionMapUv),k.push(T.thicknessMapUv),k.push(T.combine),k.push(T.fogExp2),k.push(T.sizeAttenuation),k.push(T.morphTargetsCount),k.push(T.morphAttributeCount),k.push(T.numDirLights),k.push(T.numPointLights),k.push(T.numSpotLights),k.push(T.numSpotLightMaps),k.push(T.numHemiLights),k.push(T.numRectAreaLights),k.push(T.numDirLightShadows),k.push(T.numPointLightShadows),k.push(T.numSpotLightShadows),k.push(T.numSpotLightShadowsWithMaps),k.push(T.numLightProbes),k.push(T.shadowMapType),k.push(T.toneMapping),k.push(T.numClippingPlanes),k.push(T.numClipIntersection),k.push(T.depthPacking)}function _(k,T){a.disableAll(),T.supportsVertexTextures&&a.enable(0),T.instancing&&a.enable(1),T.instancingColor&&a.enable(2),T.instancingMorph&&a.enable(3),T.matcap&&a.enable(4),T.envMap&&a.enable(5),T.normalMapObjectSpace&&a.enable(6),T.normalMapTangentSpace&&a.enable(7),T.clearcoat&&a.enable(8),T.iridescence&&a.enable(9),T.alphaTest&&a.enable(10),T.vertexColors&&a.enable(11),T.vertexAlphas&&a.enable(12),T.vertexUv1s&&a.enable(13),T.vertexUv2s&&a.enable(14),T.vertexUv3s&&a.enable(15),T.vertexTangents&&a.enable(16),T.anisotropy&&a.enable(17),T.alphaHash&&a.enable(18),T.batching&&a.enable(19),T.dispersion&&a.enable(20),T.batchingColor&&a.enable(21),k.push(a.mask),a.disableAll(),T.fog&&a.enable(0),T.useFog&&a.enable(1),T.flatShading&&a.enable(2),T.logarithmicDepthBuffer&&a.enable(3),T.reverseDepthBuffer&&a.enable(4),T.skinning&&a.enable(5),T.morphTargets&&a.enable(6),T.morphNormals&&a.enable(7),T.morphColors&&a.enable(8),T.premultipliedAlpha&&a.enable(9),T.shadowMapEnabled&&a.enable(10),T.doubleSided&&a.enable(11),T.flipSided&&a.enable(12),T.useDepthPacking&&a.enable(13),T.dithering&&a.enable(14),T.transmission&&a.enable(15),T.sheen&&a.enable(16),T.opaque&&a.enable(17),T.pointsUvs&&a.enable(18),T.decodeVideoTexture&&a.enable(19),T.decodeVideoTextureEmissive&&a.enable(20),T.alphaToCoverage&&a.enable(21),k.push(a.mask)}function S(k){const T=y[k.type];let N;if(T){const z=no[T];N=lB.clone(z.uniforms)}else N=k.uniforms;return N}function C(k,T){let N;for(let z=0,D=u.length;z0?r.push(g):m.transparent===!0?i.push(g):n.push(g)}function l(f,h,m,y,x,v){const g=o(f,h,m,y,x,v);m.transmission>0?r.unshift(g):m.transparent===!0?i.unshift(g):n.unshift(g)}function c(f,h){n.length>1&&n.sort(f||Ode),r.length>1&&r.sort(h||IL),i.length>1&&i.sort(h||IL)}function u(){for(let f=e,h=t.length;f=s.length?(o=new NL,s.push(o)):o=s[i],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function Fde(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new H,color:new ot};break;case"SpotLight":n={position:new H,direction:new H,color:new ot,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new H,color:new ot,distance:0,decay:0};break;case"HemisphereLight":n={direction:new H,skyColor:new ot,groundColor:new ot};break;case"RectAreaLight":n={color:new ot,position:new H,halfWidth:new H,halfHeight:new H};break}return t[e.id]=n,n}}}function zde(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let Ude=0;function Bde(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function jde(t){const e=new Fde,n=zde(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)r.probe.push(new H);const i=new H,s=new Tt,o=new Tt;function a(c){let u=0,f=0,h=0;for(let k=0;k<9;k++)r.probe[k].set(0,0,0);let m=0,y=0,x=0,v=0,g=0,b=0,_=0,S=0,C=0,P=0,A=0;c.sort(Bde);for(let k=0,T=c.length;k0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=tt.LTC_FLOAT_1,r.rectAreaLTC2=tt.LTC_FLOAT_2):(r.rectAreaLTC1=tt.LTC_HALF_1,r.rectAreaLTC2=tt.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=f,r.ambient[2]=h;const L=r.hash;(L.directionalLength!==m||L.pointLength!==y||L.spotLength!==x||L.rectAreaLength!==v||L.hemiLength!==g||L.numDirectionalShadows!==b||L.numPointShadows!==_||L.numSpotShadows!==S||L.numSpotMaps!==C||L.numLightProbes!==A)&&(r.directional.length=m,r.spot.length=x,r.rectArea.length=v,r.point.length=y,r.hemi.length=g,r.directionalShadow.length=b,r.directionalShadowMap.length=b,r.pointShadow.length=_,r.pointShadowMap.length=_,r.spotShadow.length=S,r.spotShadowMap.length=S,r.directionalShadowMatrix.length=b,r.pointShadowMatrix.length=_,r.spotLightMatrix.length=S+C-P,r.spotLightMap.length=C,r.numSpotLightShadowsWithMaps=P,r.numLightProbes=A,L.directionalLength=m,L.pointLength=y,L.spotLength=x,L.rectAreaLength=v,L.hemiLength=g,L.numDirectionalShadows=b,L.numPointShadows=_,L.numSpotShadows=S,L.numSpotMaps=C,L.numLightProbes=A,r.version=Ude++)}function l(c,u){let f=0,h=0,m=0,y=0,x=0;const v=u.matrixWorldInverse;for(let g=0,b=c.length;g=o.length?(a=new kL(t),o.push(a)):a=o[s],a}function r(){e=new WeakMap}return{get:n,dispose:r}}const $de=`void main() { +`+F)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(D===""||B==="")&&(X=!1);X&&(N.diagnostics={runnable:G,programLog:z,vertexShader:{log:D,prefix:v},fragmentShader:{log:B,prefix:g}})}i.deleteShader(C),i.deleteShader(P),L=new $v(i,x),k=Tde(i,x)}let L;this.getUniforms=function(){return L===void 0&&A(this),L};let k;this.getAttributes=function(){return k===void 0&&A(this),k};let T=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return T===!1&&(T=i.getProgramParameter(x,yde)),T},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=vde++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=C,this.fragmentShader=P,this}let zde=0;class Ude{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),s=this._getShaderStage(r),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new Bde(e),n.set(e,r)),r}}class Bde{constructor(e){this.id=zde++,this.code=e,this.usedTimes=0}}function jde(t,e,n,r,i,s,o){const a=new Zc,l=new Ude,c=new Set,u=[],f=i.logarithmicDepthBuffer,h=i.vertexTextures;let m=i.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function x(k){return c.add(k),k===0?"uv":`uv${k}`}function v(k,T,N,z,D){const B=z.fog,G=D.geometry,X=k.isMeshStandardMaterial?z.environment:null,Z=(k.isMeshStandardMaterial?n:e).get(k.envMap||X),F=Z&&Z.mapping===ih?Z.image.height:null,q=y[k.type];k.precision!==null&&(m=i.getMaxPrecision(k.precision),m!==k.precision&&console.warn("THREE.WebGLProgram.getParameters:",k.precision,"not supported, using",m,"instead."));const K=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,Q=K!==void 0?K.length:0;let he=0;G.morphAttributes.position!==void 0&&(he=1),G.morphAttributes.normal!==void 0&&(he=2),G.morphAttributes.color!==void 0&&(he=3);let fe,J,de,be;if(q){const an=no[q];fe=an.vertexShader,J=an.fragmentShader}else fe=k.vertexShader,J=k.fragmentShader,l.update(k),de=l.getVertexShaderID(k),be=l.getFragmentShaderID(k);const _e=t.getRenderTarget(),Xe=t.state.buffers.depth.getReversed(),at=D.isInstancedMesh===!0,Ve=D.isBatchedMesh===!0,$e=!!k.map,ae=!!k.matcap,oe=!!Z,V=!!k.aoMap,Ie=!!k.lightMap,Re=!!k.bumpMap,De=!!k.normalMap,ue=!!k.displacementMap,Ye=!!k.emissiveMap,ke=!!k.metalnessMap,$=!!k.roughnessMap,U=k.anisotropy>0,ne=k.clearcoat>0,le=k.dispersion>0,Te=k.iridescence>0,ye=k.sheen>0,He=k.transmission>0,Ae=U&&!!k.anisotropyMap,Ee=ne&&!!k.clearcoatMap,_t=ne&&!!k.clearcoatNormalMap,Le=ne&&!!k.clearcoatRoughnessMap,it=Te&&!!k.iridescenceMap,Oe=Te&&!!k.iridescenceThicknessMap,Ke=ye&&!!k.sheenColorMap,ge=ye&&!!k.sheenRoughnessMap,ze=!!k.specularMap,Qe=!!k.specularColorMap,mt=!!k.specularIntensityMap,ee=He&&!!k.transmissionMap,Be=He&&!!k.thicknessMap,ve=!!k.gradientMap,Pe=!!k.alphaMap,We=k.alphaTest>0,Ze=!!k.alphaHash,It=!!k.extensions;let Cn=Bo;k.toneMapped&&(_e===null||_e.isXRRenderTarget===!0)&&(Cn=t.toneMapping);const rr={shaderID:q,shaderType:k.type,shaderName:k.name,vertexShader:fe,fragmentShader:J,defines:k.defines,customVertexShaderID:de,customFragmentShaderID:be,isRawShaderMaterial:k.isRawShaderMaterial===!0,glslVersion:k.glslVersion,precision:m,batching:Ve,batchingColor:Ve&&D._colorsTexture!==null,instancing:at,instancingColor:at&&D.instanceColor!==null,instancingMorph:at&&D.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:_e===null?t.outputColorSpace:_e.isXRRenderTarget===!0?_e.texture.colorSpace:gu,alphaToCoverage:!!k.alphaToCoverage,map:$e,matcap:ae,envMap:oe,envMapMode:oe&&Z.mapping,envMapCubeUVHeight:F,aoMap:V,lightMap:Ie,bumpMap:Re,normalMap:De,displacementMap:h&&ue,emissiveMap:Ye,normalMapObjectSpace:De&&k.normalMapType===Z6,normalMapTangentSpace:De&&k.normalMapType===Xl,metalnessMap:ke,roughnessMap:$,anisotropy:U,anisotropyMap:Ae,clearcoat:ne,clearcoatMap:Ee,clearcoatNormalMap:_t,clearcoatRoughnessMap:Le,dispersion:le,iridescence:Te,iridescenceMap:it,iridescenceThicknessMap:Oe,sheen:ye,sheenColorMap:Ke,sheenRoughnessMap:ge,specularMap:ze,specularColorMap:Qe,specularIntensityMap:mt,transmission:He,transmissionMap:ee,thicknessMap:Be,gradientMap:ve,opaque:k.transparent===!1&&k.blending===qc&&k.alphaToCoverage===!1,alphaMap:Pe,alphaTest:We,alphaHash:Ze,combine:k.combine,mapUv:$e&&x(k.map.channel),aoMapUv:V&&x(k.aoMap.channel),lightMapUv:Ie&&x(k.lightMap.channel),bumpMapUv:Re&&x(k.bumpMap.channel),normalMapUv:De&&x(k.normalMap.channel),displacementMapUv:ue&&x(k.displacementMap.channel),emissiveMapUv:Ye&&x(k.emissiveMap.channel),metalnessMapUv:ke&&x(k.metalnessMap.channel),roughnessMapUv:$&&x(k.roughnessMap.channel),anisotropyMapUv:Ae&&x(k.anisotropyMap.channel),clearcoatMapUv:Ee&&x(k.clearcoatMap.channel),clearcoatNormalMapUv:_t&&x(k.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Le&&x(k.clearcoatRoughnessMap.channel),iridescenceMapUv:it&&x(k.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&x(k.iridescenceThicknessMap.channel),sheenColorMapUv:Ke&&x(k.sheenColorMap.channel),sheenRoughnessMapUv:ge&&x(k.sheenRoughnessMap.channel),specularMapUv:ze&&x(k.specularMap.channel),specularColorMapUv:Qe&&x(k.specularColorMap.channel),specularIntensityMapUv:mt&&x(k.specularIntensityMap.channel),transmissionMapUv:ee&&x(k.transmissionMap.channel),thicknessMapUv:Be&&x(k.thicknessMap.channel),alphaMapUv:Pe&&x(k.alphaMap.channel),vertexTangents:!!G.attributes.tangent&&(De||U),vertexColors:k.vertexColors,vertexAlphas:k.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,pointsUvs:D.isPoints===!0&&!!G.attributes.uv&&($e||Pe),fog:!!B,useFog:k.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:k.flatShading===!0,sizeAttenuation:k.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:Xe,skinning:D.isSkinnedMesh===!0,morphTargets:G.morphAttributes.position!==void 0,morphNormals:G.morphAttributes.normal!==void 0,morphColors:G.morphAttributes.color!==void 0,morphTargetsCount:Q,morphTextureStride:he,numDirLights:T.directional.length,numPointLights:T.point.length,numSpotLights:T.spot.length,numSpotLightMaps:T.spotLightMap.length,numRectAreaLights:T.rectArea.length,numHemiLights:T.hemi.length,numDirLightShadows:T.directionalShadowMap.length,numPointLightShadows:T.pointShadowMap.length,numSpotLightShadows:T.spotShadowMap.length,numSpotLightShadowsWithMaps:T.numSpotLightShadowsWithMaps,numLightProbes:T.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:k.dithering,shadowMapEnabled:t.shadowMap.enabled&&N.length>0,shadowMapType:t.shadowMap.type,toneMapping:Cn,decodeVideoTexture:$e&&k.map.isVideoTexture===!0&&tn.getTransfer(k.map.colorSpace)===mn,decodeVideoTextureEmissive:Ye&&k.emissiveMap.isVideoTexture===!0&&tn.getTransfer(k.emissiveMap.colorSpace)===mn,premultipliedAlpha:k.premultipliedAlpha,doubleSided:k.side===ro,flipSided:k.side===di,useDepthPacking:k.depthPacking>=0,depthPacking:k.depthPacking||0,index0AttributeName:k.index0AttributeName,extensionClipCullDistance:It&&k.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(It&&k.extensions.multiDraw===!0||Ve)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:k.customProgramCacheKey()};return rr.vertexUv1s=c.has(1),rr.vertexUv2s=c.has(2),rr.vertexUv3s=c.has(3),c.clear(),rr}function g(k){const T=[];if(k.shaderID?T.push(k.shaderID):(T.push(k.customVertexShaderID),T.push(k.customFragmentShaderID)),k.defines!==void 0)for(const N in k.defines)T.push(N),T.push(k.defines[N]);return k.isRawShaderMaterial===!1&&(b(T,k),_(T,k),T.push(t.outputColorSpace)),T.push(k.customProgramCacheKey),T.join()}function b(k,T){k.push(T.precision),k.push(T.outputColorSpace),k.push(T.envMapMode),k.push(T.envMapCubeUVHeight),k.push(T.mapUv),k.push(T.alphaMapUv),k.push(T.lightMapUv),k.push(T.aoMapUv),k.push(T.bumpMapUv),k.push(T.normalMapUv),k.push(T.displacementMapUv),k.push(T.emissiveMapUv),k.push(T.metalnessMapUv),k.push(T.roughnessMapUv),k.push(T.anisotropyMapUv),k.push(T.clearcoatMapUv),k.push(T.clearcoatNormalMapUv),k.push(T.clearcoatRoughnessMapUv),k.push(T.iridescenceMapUv),k.push(T.iridescenceThicknessMapUv),k.push(T.sheenColorMapUv),k.push(T.sheenRoughnessMapUv),k.push(T.specularMapUv),k.push(T.specularColorMapUv),k.push(T.specularIntensityMapUv),k.push(T.transmissionMapUv),k.push(T.thicknessMapUv),k.push(T.combine),k.push(T.fogExp2),k.push(T.sizeAttenuation),k.push(T.morphTargetsCount),k.push(T.morphAttributeCount),k.push(T.numDirLights),k.push(T.numPointLights),k.push(T.numSpotLights),k.push(T.numSpotLightMaps),k.push(T.numHemiLights),k.push(T.numRectAreaLights),k.push(T.numDirLightShadows),k.push(T.numPointLightShadows),k.push(T.numSpotLightShadows),k.push(T.numSpotLightShadowsWithMaps),k.push(T.numLightProbes),k.push(T.shadowMapType),k.push(T.toneMapping),k.push(T.numClippingPlanes),k.push(T.numClipIntersection),k.push(T.depthPacking)}function _(k,T){a.disableAll(),T.supportsVertexTextures&&a.enable(0),T.instancing&&a.enable(1),T.instancingColor&&a.enable(2),T.instancingMorph&&a.enable(3),T.matcap&&a.enable(4),T.envMap&&a.enable(5),T.normalMapObjectSpace&&a.enable(6),T.normalMapTangentSpace&&a.enable(7),T.clearcoat&&a.enable(8),T.iridescence&&a.enable(9),T.alphaTest&&a.enable(10),T.vertexColors&&a.enable(11),T.vertexAlphas&&a.enable(12),T.vertexUv1s&&a.enable(13),T.vertexUv2s&&a.enable(14),T.vertexUv3s&&a.enable(15),T.vertexTangents&&a.enable(16),T.anisotropy&&a.enable(17),T.alphaHash&&a.enable(18),T.batching&&a.enable(19),T.dispersion&&a.enable(20),T.batchingColor&&a.enable(21),k.push(a.mask),a.disableAll(),T.fog&&a.enable(0),T.useFog&&a.enable(1),T.flatShading&&a.enable(2),T.logarithmicDepthBuffer&&a.enable(3),T.reverseDepthBuffer&&a.enable(4),T.skinning&&a.enable(5),T.morphTargets&&a.enable(6),T.morphNormals&&a.enable(7),T.morphColors&&a.enable(8),T.premultipliedAlpha&&a.enable(9),T.shadowMapEnabled&&a.enable(10),T.doubleSided&&a.enable(11),T.flipSided&&a.enable(12),T.useDepthPacking&&a.enable(13),T.dithering&&a.enable(14),T.transmission&&a.enable(15),T.sheen&&a.enable(16),T.opaque&&a.enable(17),T.pointsUvs&&a.enable(18),T.decodeVideoTexture&&a.enable(19),T.decodeVideoTextureEmissive&&a.enable(20),T.alphaToCoverage&&a.enable(21),k.push(a.mask)}function S(k){const T=y[k.type];let N;if(T){const z=no[T];N=fB.clone(z.uniforms)}else N=k.uniforms;return N}function C(k,T){let N;for(let z=0,D=u.length;z0?r.push(g):m.transparent===!0?i.push(g):n.push(g)}function l(f,h,m,y,x,v){const g=o(f,h,m,y,x,v);m.transmission>0?r.unshift(g):m.transparent===!0?i.unshift(g):n.unshift(g)}function c(f,h){n.length>1&&n.sort(f||$de),r.length>1&&r.sort(h||IL),i.length>1&&i.sort(h||IL)}function u(){for(let f=e,h=t.length;f=s.length?(o=new NL,s.push(o)):o=s[i],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function Hde(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new H,color:new ot};break;case"SpotLight":n={position:new H,direction:new H,color:new ot,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new H,color:new ot,distance:0,decay:0};break;case"HemisphereLight":n={direction:new H,skyColor:new ot,groundColor:new ot};break;case"RectAreaLight":n={color:new ot,position:new H,halfWidth:new H,halfHeight:new H};break}return t[e.id]=n,n}}}function Gde(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let Xde=0;function qde(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Yde(t){const e=new Hde,n=Gde(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)r.probe.push(new H);const i=new H,s=new Tt,o=new Tt;function a(c){let u=0,f=0,h=0;for(let k=0;k<9;k++)r.probe[k].set(0,0,0);let m=0,y=0,x=0,v=0,g=0,b=0,_=0,S=0,C=0,P=0,A=0;c.sort(qde);for(let k=0,T=c.length;k0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=tt.LTC_FLOAT_1,r.rectAreaLTC2=tt.LTC_FLOAT_2):(r.rectAreaLTC1=tt.LTC_HALF_1,r.rectAreaLTC2=tt.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=f,r.ambient[2]=h;const L=r.hash;(L.directionalLength!==m||L.pointLength!==y||L.spotLength!==x||L.rectAreaLength!==v||L.hemiLength!==g||L.numDirectionalShadows!==b||L.numPointShadows!==_||L.numSpotShadows!==S||L.numSpotMaps!==C||L.numLightProbes!==A)&&(r.directional.length=m,r.spot.length=x,r.rectArea.length=v,r.point.length=y,r.hemi.length=g,r.directionalShadow.length=b,r.directionalShadowMap.length=b,r.pointShadow.length=_,r.pointShadowMap.length=_,r.spotShadow.length=S,r.spotShadowMap.length=S,r.directionalShadowMatrix.length=b,r.pointShadowMatrix.length=_,r.spotLightMatrix.length=S+C-P,r.spotLightMap.length=C,r.numSpotLightShadowsWithMaps=P,r.numLightProbes=A,L.directionalLength=m,L.pointLength=y,L.spotLength=x,L.rectAreaLength=v,L.hemiLength=g,L.numDirectionalShadows=b,L.numPointShadows=_,L.numSpotShadows=S,L.numSpotMaps=C,L.numLightProbes=A,r.version=Xde++)}function l(c,u){let f=0,h=0,m=0,y=0,x=0;const v=u.matrixWorldInverse;for(let g=0,b=c.length;g=o.length?(a=new kL(t),o.push(a)):a=o[s],a}function r(){e=new WeakMap}return{get:n,dispose:r}}const Zde=`void main() { gl_Position = vec4( position, 1.0 ); -}`,Wde=`uniform sampler2D shadow_pass; +}`,Jde=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3982,12 +3982,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function Hde(t,e,n){let r=new wg;const i=new Ne,s=new Ne,o=new nn,a=new TA({depthPacking:X6}),l=new CA,c={},u=n.maxTextureSize,f={[Fa]:di,[di]:Fa,[ro]:ro},h=new uo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ne},radius:{value:4}},vertexShader:$de,fragmentShader:Wde}),m=h.clone();m.defines.HORIZONTAL_PASS=1;const y=new Bt;y.setAttribute("position",new yn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new nr(y,h),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=s_;let g=this.type;this.render=function(P,A,L){if(v.enabled===!1||v.autoUpdate===!1&&v.needsUpdate===!1||P.length===0)return;const k=t.getRenderTarget(),T=t.getActiveCubeFace(),N=t.getActiveMipmapLevel(),z=t.state;z.setBlending(Ra),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const D=g!==Qs&&this.type===Qs,B=g===Qs&&this.type!==Qs;for(let G=0,X=P.length;Gu||i.y>u)&&(i.x>u&&(s.x=Math.floor(u/q.x),i.x=s.x*q.x,F.mapSize.x=s.x),i.y>u&&(s.y=Math.floor(u/q.y),i.y=s.y*q.y,F.mapSize.y=s.y)),F.map===null||D===!0||B===!0){const Q=this.type!==Qs?{minFilter:Sr,magFilter:Sr}:{};F.map!==null&&F.map.dispose(),F.map=new Xo(i.x,i.y,Q),F.map.texture.name=Z.name+".shadowMap",F.camera.updateProjectionMatrix()}t.setRenderTarget(F.map),t.clear();const K=F.getViewportCount();for(let Q=0;Q0||A.map&&A.alphaTest>0){const z=T.uuid,D=A.uuid;let B=c[z];B===void 0&&(B={},c[z]=B);let G=B[D];G===void 0&&(G=T.clone(),B[D]=G,A.addEventListener("dispose",C)),T=G}if(T.visible=A.visible,T.wireframe=A.wireframe,k===Qs?T.side=A.shadowSide!==null?A.shadowSide:A.side:T.side=A.shadowSide!==null?A.shadowSide:f[A.side],T.alphaMap=A.alphaMap,T.alphaTest=A.alphaTest,T.map=A.map,T.clipShadows=A.clipShadows,T.clippingPlanes=A.clippingPlanes,T.clipIntersection=A.clipIntersection,T.displacementMap=A.displacementMap,T.displacementScale=A.displacementScale,T.displacementBias=A.displacementBias,T.wireframeLinewidth=A.wireframeLinewidth,T.linewidth=A.linewidth,L.isPointLight===!0&&T.isMeshDistanceMaterial===!0){const z=t.properties.get(T);z.light=L}return T}function S(P,A,L,k,T){if(P.visible===!1)return;if(P.layers.test(A.layers)&&(P.isMesh||P.isLine||P.isPoints)&&(P.castShadow||P.receiveShadow&&T===Qs)&&(!P.frustumCulled||r.intersectsObject(P))){P.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,P.matrixWorld);const D=e.update(P),B=P.material;if(Array.isArray(B)){const G=D.groups;for(let X=0,Z=G.length;X=1):F.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),X=Z>=2);let q=null,K={};const Q=t.getParameter(t.SCISSOR_BOX),he=t.getParameter(t.VIEWPORT),fe=new nn().fromArray(Q),J=new nn().fromArray(he);function de(ee,Be,ve,Pe){const We=new Uint8Array(4),Ze=t.createTexture();t.bindTexture(ee,Ze),t.texParameteri(ee,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(ee,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let It=0;It"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Ne,u=new WeakMap;let f;const h=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y($,U){return m?new OffscreenCanvas($,U):Dm("canvas")}function x($,U,ne){let le=1;const Te=ke($);if((Te.width>ne||Te.height>ne)&&(le=ne/Math.max(Te.width,Te.height)),le<1)if(typeof HTMLImageElement<"u"&&$ instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&$ instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&$ instanceof ImageBitmap||typeof VideoFrame<"u"&&$ instanceof VideoFrame){const ye=Math.floor(le*Te.width),Ge=Math.floor(le*Te.height);f===void 0&&(f=y(ye,Ge));const Ae=U?y(ye,Ge):f;return Ae.width=ye,Ae.height=Ge,Ae.getContext("2d").drawImage($,0,0,ye,Ge),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+ye+"x"+Ge+")."),Ae}else return"data"in $&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),$;return $}function v($){return $.generateMipmaps}function g($){t.generateMipmap($)}function b($){return $.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:$.isWebGL3DRenderTarget?t.TEXTURE_3D:$.isWebGLArrayRenderTarget||$.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function _($,U,ne,le,Te=!1){if($!==null){if(t[$]!==void 0)return t[$];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+$+"'")}let ye=U;if(U===t.RED&&(ne===t.FLOAT&&(ye=t.R32F),ne===t.HALF_FLOAT&&(ye=t.R16F),ne===t.UNSIGNED_BYTE&&(ye=t.R8)),U===t.RED_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.R8UI),ne===t.UNSIGNED_SHORT&&(ye=t.R16UI),ne===t.UNSIGNED_INT&&(ye=t.R32UI),ne===t.BYTE&&(ye=t.R8I),ne===t.SHORT&&(ye=t.R16I),ne===t.INT&&(ye=t.R32I)),U===t.RG&&(ne===t.FLOAT&&(ye=t.RG32F),ne===t.HALF_FLOAT&&(ye=t.RG16F),ne===t.UNSIGNED_BYTE&&(ye=t.RG8)),U===t.RG_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.RG8UI),ne===t.UNSIGNED_SHORT&&(ye=t.RG16UI),ne===t.UNSIGNED_INT&&(ye=t.RG32UI),ne===t.BYTE&&(ye=t.RG8I),ne===t.SHORT&&(ye=t.RG16I),ne===t.INT&&(ye=t.RG32I)),U===t.RGB_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.RGB8UI),ne===t.UNSIGNED_SHORT&&(ye=t.RGB16UI),ne===t.UNSIGNED_INT&&(ye=t.RGB32UI),ne===t.BYTE&&(ye=t.RGB8I),ne===t.SHORT&&(ye=t.RGB16I),ne===t.INT&&(ye=t.RGB32I)),U===t.RGBA_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.RGBA8UI),ne===t.UNSIGNED_SHORT&&(ye=t.RGBA16UI),ne===t.UNSIGNED_INT&&(ye=t.RGBA32UI),ne===t.BYTE&&(ye=t.RGBA8I),ne===t.SHORT&&(ye=t.RGBA16I),ne===t.INT&&(ye=t.RGBA32I)),U===t.RGB&&ne===t.UNSIGNED_INT_5_9_9_9_REV&&(ye=t.RGB9_E5),U===t.RGBA){const Ge=Te?km:tn.getTransfer(le);ne===t.FLOAT&&(ye=t.RGBA32F),ne===t.HALF_FLOAT&&(ye=t.RGBA16F),ne===t.UNSIGNED_BYTE&&(ye=Ge===mn?t.SRGB8_ALPHA8:t.RGBA8),ne===t.UNSIGNED_SHORT_4_4_4_4&&(ye=t.RGBA4),ne===t.UNSIGNED_SHORT_5_5_5_1&&(ye=t.RGB5_A1)}return(ye===t.R16F||ye===t.R32F||ye===t.RG16F||ye===t.RG32F||ye===t.RGBA16F||ye===t.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function S($,U){let ne;return $?U===null||U===Ua||U===pu?ne=t.DEPTH24_STENCIL8:U===li?ne=t.DEPTH32F_STENCIL8:U===Id&&(ne=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):U===null||U===Ua||U===pu?ne=t.DEPTH_COMPONENT24:U===li?ne=t.DEPTH_COMPONENT32F:U===Id&&(ne=t.DEPTH_COMPONENT16),ne}function C($,U){return v($)===!0||$.isFramebufferTexture&&$.minFilter!==Sr&&$.minFilter!==cr?Math.log2(Math.max(U.width,U.height))+1:$.mipmaps!==void 0&&$.mipmaps.length>0?$.mipmaps.length:$.isCompressedTexture&&Array.isArray($.image)?U.mipmaps.length:1}function P($){const U=$.target;U.removeEventListener("dispose",P),L(U),U.isVideoTexture&&u.delete(U)}function A($){const U=$.target;U.removeEventListener("dispose",A),T(U)}function L($){const U=r.get($);if(U.__webglInit===void 0)return;const ne=$.source,le=h.get(ne);if(le){const Te=le[U.__cacheKey];Te.usedTimes--,Te.usedTimes===0&&k($),Object.keys(le).length===0&&h.delete(ne)}r.remove($)}function k($){const U=r.get($);t.deleteTexture(U.__webglTexture);const ne=$.source,le=h.get(ne);delete le[U.__cacheKey],o.memory.textures--}function T($){const U=r.get($);if($.depthTexture&&($.depthTexture.dispose(),r.remove($.depthTexture)),$.isWebGLCubeRenderTarget)for(let le=0;le<6;le++){if(Array.isArray(U.__webglFramebuffer[le]))for(let Te=0;Te=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+$+" texture units while this GPU supports only "+i.maxTextures),N+=1,$}function B($){const U=[];return U.push($.wrapS),U.push($.wrapT),U.push($.wrapR||0),U.push($.magFilter),U.push($.minFilter),U.push($.anisotropy),U.push($.internalFormat),U.push($.format),U.push($.type),U.push($.generateMipmaps),U.push($.premultiplyAlpha),U.push($.flipY),U.push($.unpackAlignment),U.push($.colorSpace),U.join()}function G($,U){const ne=r.get($);if($.isVideoTexture&&ue($),$.isRenderTargetTexture===!1&&$.version>0&&ne.__version!==$.version){const le=$.image;if(le===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(le.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{J(ne,$,U);return}}n.bindTexture(t.TEXTURE_2D,ne.__webglTexture,t.TEXTURE0+U)}function X($,U){const ne=r.get($);if($.version>0&&ne.__version!==$.version){J(ne,$,U);return}n.bindTexture(t.TEXTURE_2D_ARRAY,ne.__webglTexture,t.TEXTURE0+U)}function Z($,U){const ne=r.get($);if($.version>0&&ne.__version!==$.version){J(ne,$,U);return}n.bindTexture(t.TEXTURE_3D,ne.__webglTexture,t.TEXTURE0+U)}function F($,U){const ne=r.get($);if($.version>0&&ne.__version!==$.version){de(ne,$,U);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ne.__webglTexture,t.TEXTURE0+U)}const q={[Am]:t.REPEAT,[Li]:t.CLAMP_TO_EDGE,[Pm]:t.MIRRORED_REPEAT},K={[Sr]:t.NEAREST,[QR]:t.NEAREST_MIPMAP_NEAREST,[Yf]:t.NEAREST_MIPMAP_LINEAR,[cr]:t.LINEAR,[Fp]:t.LINEAR_MIPMAP_NEAREST,[Lo]:t.LINEAR_MIPMAP_LINEAR},Q={[Y6]:t.NEVER,[tB]:t.ALWAYS,[K6]:t.LESS,[uA]:t.LEQUAL,[Z6]:t.EQUAL,[eB]:t.GEQUAL,[J6]:t.GREATER,[Q6]:t.NOTEQUAL};function he($,U){if(U.type===li&&e.has("OES_texture_float_linear")===!1&&(U.magFilter===cr||U.magFilter===Fp||U.magFilter===Yf||U.magFilter===Lo||U.minFilter===cr||U.minFilter===Fp||U.minFilter===Yf||U.minFilter===Lo)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri($,t.TEXTURE_WRAP_S,q[U.wrapS]),t.texParameteri($,t.TEXTURE_WRAP_T,q[U.wrapT]),($===t.TEXTURE_3D||$===t.TEXTURE_2D_ARRAY)&&t.texParameteri($,t.TEXTURE_WRAP_R,q[U.wrapR]),t.texParameteri($,t.TEXTURE_MAG_FILTER,K[U.magFilter]),t.texParameteri($,t.TEXTURE_MIN_FILTER,K[U.minFilter]),U.compareFunction&&(t.texParameteri($,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri($,t.TEXTURE_COMPARE_FUNC,Q[U.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(U.magFilter===Sr||U.minFilter!==Yf&&U.minFilter!==Lo||U.type===li&&e.has("OES_texture_float_linear")===!1)return;if(U.anisotropy>1||r.get(U).__currentAnisotropy){const ne=e.get("EXT_texture_filter_anisotropic");t.texParameterf($,ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(U.anisotropy,i.getMaxAnisotropy())),r.get(U).__currentAnisotropy=U.anisotropy}}}function fe($,U){let ne=!1;$.__webglInit===void 0&&($.__webglInit=!0,U.addEventListener("dispose",P));const le=U.source;let Te=h.get(le);Te===void 0&&(Te={},h.set(le,Te));const ye=B(U);if(ye!==$.__cacheKey){Te[ye]===void 0&&(Te[ye]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,ne=!0),Te[ye].usedTimes++;const Ge=Te[$.__cacheKey];Ge!==void 0&&(Te[$.__cacheKey].usedTimes--,Ge.usedTimes===0&&k(U)),$.__cacheKey=ye,$.__webglTexture=Te[ye].texture}return ne}function J($,U,ne){let le=t.TEXTURE_2D;(U.isDataArrayTexture||U.isCompressedArrayTexture)&&(le=t.TEXTURE_2D_ARRAY),U.isData3DTexture&&(le=t.TEXTURE_3D);const Te=fe($,U),ye=U.source;n.bindTexture(le,$.__webglTexture,t.TEXTURE0+ne);const Ge=r.get(ye);if(ye.version!==Ge.__version||Te===!0){n.activeTexture(t.TEXTURE0+ne);const Ae=tn.getPrimaries(tn.workingColorSpace),Ee=U.colorSpace===xa?null:tn.getPrimaries(U.colorSpace),_t=U.colorSpace===xa||Ae===Ee?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,U.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,U.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,_t);let Le=x(U.image,!1,i.maxTextureSize);Le=Ye(U,Le);const it=s.convert(U.format,U.colorSpace),Oe=s.convert(U.type);let Ke=_(U.internalFormat,it,Oe,U.colorSpace,U.isVideoTexture);he(le,U);let ge;const ze=U.mipmaps,Qe=U.isVideoTexture!==!0,mt=Ge.__version===void 0||Te===!0,ee=ye.dataReady,Be=C(U,Le);if(U.isDepthTexture)Ke=S(U.format===mu,U.type),mt&&(Qe?n.texStorage2D(t.TEXTURE_2D,1,Ke,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,Ke,Le.width,Le.height,0,it,Oe,null));else if(U.isDataTexture)if(ze.length>0){Qe&&mt&&n.texStorage2D(t.TEXTURE_2D,Be,Ke,ze[0].width,ze[0].height);for(let ve=0,Pe=ze.length;ve0){const We=AT(ge.width,ge.height,U.format,U.type);for(const Ze of U.layerUpdates){const It=ge.data.subarray(Ze*We/ge.data.BYTES_PER_ELEMENT,(Ze+1)*We/ge.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ve,0,0,Ze,ge.width,ge.height,1,it,It)}U.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ve,0,0,0,ge.width,ge.height,Le.depth,it,ge.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,ve,Ke,ge.width,ge.height,Le.depth,0,ge.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Qe?ee&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,ve,0,0,0,ge.width,ge.height,Le.depth,it,Oe,ge.data):n.texImage3D(t.TEXTURE_2D_ARRAY,ve,Ke,ge.width,ge.height,Le.depth,0,it,Oe,ge.data)}else{Qe&&mt&&n.texStorage2D(t.TEXTURE_2D,Be,Ke,ze[0].width,ze[0].height);for(let ve=0,Pe=ze.length;ve0){const ve=AT(Le.width,Le.height,U.format,U.type);for(const Pe of U.layerUpdates){const We=Le.data.subarray(Pe*ve/Le.data.BYTES_PER_ELEMENT,(Pe+1)*ve/Le.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Pe,Le.width,Le.height,1,it,Oe,We)}U.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Le.width,Le.height,Le.depth,it,Oe,Le.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Ke,Le.width,Le.height,Le.depth,0,it,Oe,Le.data);else if(U.isData3DTexture)Qe?(mt&&n.texStorage3D(t.TEXTURE_3D,Be,Ke,Le.width,Le.height,Le.depth),ee&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Le.width,Le.height,Le.depth,it,Oe,Le.data)):n.texImage3D(t.TEXTURE_3D,0,Ke,Le.width,Le.height,Le.depth,0,it,Oe,Le.data);else if(U.isFramebufferTexture){if(mt)if(Qe)n.texStorage2D(t.TEXTURE_2D,Be,Ke,Le.width,Le.height);else{let ve=Le.width,Pe=Le.height;for(let We=0;We>=1,Pe>>=1}}else if(ze.length>0){if(Qe&&mt){const ve=ke(ze[0]);n.texStorage2D(t.TEXTURE_2D,Be,Ke,ve.width,ve.height)}for(let ve=0,Pe=ze.length;ve0&&Be++;const Pe=ke(it[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Be,ze,Pe.width,Pe.height)}for(let Pe=0;Pe<6;Pe++)if(Le){Qe?ee&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,it[Pe].width,it[Pe].height,Ke,ge,it[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,ze,it[Pe].width,it[Pe].height,0,Ke,ge,it[Pe].data);for(let We=0;We>ye),Oe=Math.max(1,U.height>>ye);Te===t.TEXTURE_3D||Te===t.TEXTURE_2D_ARRAY?n.texImage3D(Te,ye,Ee,it,Oe,U.depth,0,Ge,Ae,null):n.texImage2D(Te,ye,Ee,it,Oe,0,Ge,Ae,null)}n.bindFramebuffer(t.FRAMEBUFFER,$),De(U)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,le,Te,Le.__webglTexture,0,Re(U)):(Te===t.TEXTURE_2D||Te>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,le,Te,Le.__webglTexture,ye),n.bindFramebuffer(t.FRAMEBUFFER,null)}function _e($,U,ne){if(t.bindRenderbuffer(t.RENDERBUFFER,$),U.depthBuffer){const le=U.depthTexture,Te=le&&le.isDepthTexture?le.type:null,ye=S(U.stencilBuffer,Te),Ge=U.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ae=Re(U);De(U)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ye,U.width,U.height):ne?t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ye,U.width,U.height):t.renderbufferStorage(t.RENDERBUFFER,ye,U.width,U.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ge,t.RENDERBUFFER,$)}else{const le=U.textures;for(let Te=0;Te{delete U.__boundDepthTexture,delete U.__depthDisposeCallback,le.removeEventListener("dispose",Te)};le.addEventListener("dispose",Te),U.__depthDisposeCallback=Te}U.__boundDepthTexture=le}if($.depthTexture&&!U.__autoAllocateDepthBuffer){if(ne)throw new Error("target.depthTexture not supported in Cube render targets");He(U.__webglFramebuffer,$)}else if(ne){U.__webglDepthbuffer=[];for(let le=0;le<6;le++)if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer[le]),U.__webglDepthbuffer[le]===void 0)U.__webglDepthbuffer[le]=t.createRenderbuffer(),_e(U.__webglDepthbuffer[le],$,!1);else{const Te=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ye=U.__webglDepthbuffer[le];t.bindRenderbuffer(t.RENDERBUFFER,ye),t.framebufferRenderbuffer(t.FRAMEBUFFER,Te,t.RENDERBUFFER,ye)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer),U.__webglDepthbuffer===void 0)U.__webglDepthbuffer=t.createRenderbuffer(),_e(U.__webglDepthbuffer,$,!1);else{const le=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Te=U.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,Te),t.framebufferRenderbuffer(t.FRAMEBUFFER,le,t.RENDERBUFFER,Te)}n.bindFramebuffer(t.FRAMEBUFFER,null)}function Ve($,U,ne){const le=r.get($);U!==void 0&&be(le.__webglFramebuffer,$,$.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ne!==void 0&&at($)}function $e($){const U=$.texture,ne=r.get($),le=r.get(U);$.addEventListener("dispose",A);const Te=$.textures,ye=$.isWebGLCubeRenderTarget===!0,Ge=Te.length>1;if(Ge||(le.__webglTexture===void 0&&(le.__webglTexture=t.createTexture()),le.__version=U.version,o.memory.textures++),ye){ne.__webglFramebuffer=[];for(let Ae=0;Ae<6;Ae++)if(U.mipmaps&&U.mipmaps.length>0){ne.__webglFramebuffer[Ae]=[];for(let Ee=0;Ee0){ne.__webglFramebuffer=[];for(let Ae=0;Ae0&&De($)===!1){ne.__webglMultisampledFramebuffer=t.createFramebuffer(),ne.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Ae=0;Ae0)for(let Ee=0;Ee0)for(let Ee=0;Ee0){if(De($)===!1){const U=$.textures,ne=$.width,le=$.height;let Te=t.COLOR_BUFFER_BIT;const ye=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ge=r.get($),Ae=U.length>1;if(Ae)for(let Ee=0;Ee0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&U.__useRenderToTexture!==!1}function ue($){const U=o.render.frame;u.get($)!==U&&(u.set($,U),$.update())}function Ye($,U){const ne=$.colorSpace,le=$.format,Te=$.type;return $.isCompressedTexture===!0||$.isVideoTexture===!0||ne!==gu&&ne!==xa&&(tn.getTransfer(ne)===mn?(le!==Ir||Te!==$i)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),U}function ke($){return typeof HTMLImageElement<"u"&&$ instanceof HTMLImageElement?(c.width=$.naturalWidth||$.width,c.height=$.naturalHeight||$.height):typeof VideoFrame<"u"&&$ instanceof VideoFrame?(c.width=$.displayWidth,c.height=$.displayHeight):(c.width=$.width,c.height=$.height),c}this.allocateTextureUnit=D,this.resetTextureUnits=z,this.setTexture2D=G,this.setTexture2DArray=X,this.setTexture3D=Z,this.setTextureCube=F,this.rebindTextures=Ve,this.setupRenderTarget=$e,this.updateRenderTargetMipmap=ae,this.updateMultisampleRenderTarget=Ie,this.setupDepthRenderbuffer=at,this.setupFrameBufferTexture=be,this.useMultisampledRTT=De}function d8(t,e){function n(r,i=xa){let s;const o=tn.getTransfer(i);if(r===$i)return t.UNSIGNED_BYTE;if(r===a_)return t.UNSIGNED_SHORT_4_4_4_4;if(r===l_)return t.UNSIGNED_SHORT_5_5_5_1;if(r===nA)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===eA)return t.BYTE;if(r===tA)return t.SHORT;if(r===Id)return t.UNSIGNED_SHORT;if(r===o_)return t.INT;if(r===Ua)return t.UNSIGNED_INT;if(r===li)return t.FLOAT;if(r===Au)return t.HALF_FLOAT;if(r===rA)return t.ALPHA;if(r===iA)return t.RGB;if(r===Ir)return t.RGBA;if(r===sA)return t.LUMINANCE;if(r===oA)return t.LUMINANCE_ALPHA;if(r===Yc)return t.DEPTH_COMPONENT;if(r===mu)return t.DEPTH_STENCIL;if(r===yg)return t.RED;if(r===vg)return t.RED_INTEGER;if(r===aA)return t.RG;if(r===c_)return t.RG_INTEGER;if(r===u_)return t.RGBA_INTEGER;if(r===zp||r===Up||r===Bp||r===jp)if(o===mn)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(r===zp)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Up)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Bp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===jp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(r===zp)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Up)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Bp)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===jp)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===Gx||r===Xx||r===qx||r===Yx)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(r===Gx)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===Xx)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===qx)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===Yx)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===Kx||r===Zx||r===Jx)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(r===Kx||r===Zx)return o===mn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(r===Jx)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===Qx||r===e1||r===t1||r===n1||r===r1||r===i1||r===s1||r===o1||r===a1||r===l1||r===c1||r===u1||r===f1||r===d1)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(r===Qx)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===e1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===t1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===n1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===r1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===i1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===s1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===o1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===a1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===l1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===c1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===u1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===f1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===d1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Vp||r===h1||r===p1)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(r===Vp)return o===mn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===h1)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===p1)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===lA||r===m1||r===g1||r===y1)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(r===Vp)return s.COMPRESSED_RED_RGTC1_EXT;if(r===m1)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===g1)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===y1)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===pu?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}const Yde=` +}`;function Qde(t,e,n){let r=new wg;const i=new Ne,s=new Ne,o=new nn,a=new MA({depthPacking:K6}),l=new EA,c={},u=n.maxTextureSize,f={[Fa]:di,[di]:Fa,[ro]:ro},h=new uo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ne},radius:{value:4}},vertexShader:Zde,fragmentShader:Jde}),m=h.clone();m.defines.HORIZONTAL_PASS=1;const y=new Bt;y.setAttribute("position",new yn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new nr(y,h),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=s_;let g=this.type;this.render=function(P,A,L){if(v.enabled===!1||v.autoUpdate===!1&&v.needsUpdate===!1||P.length===0)return;const k=t.getRenderTarget(),T=t.getActiveCubeFace(),N=t.getActiveMipmapLevel(),z=t.state;z.setBlending(Ra),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const D=g!==Qs&&this.type===Qs,B=g===Qs&&this.type!==Qs;for(let G=0,X=P.length;Gu||i.y>u)&&(i.x>u&&(s.x=Math.floor(u/q.x),i.x=s.x*q.x,F.mapSize.x=s.x),i.y>u&&(s.y=Math.floor(u/q.y),i.y=s.y*q.y,F.mapSize.y=s.y)),F.map===null||D===!0||B===!0){const Q=this.type!==Qs?{minFilter:Sr,magFilter:Sr}:{};F.map!==null&&F.map.dispose(),F.map=new Xo(i.x,i.y,Q),F.map.texture.name=Z.name+".shadowMap",F.camera.updateProjectionMatrix()}t.setRenderTarget(F.map),t.clear();const K=F.getViewportCount();for(let Q=0;Q0||A.map&&A.alphaTest>0){const z=T.uuid,D=A.uuid;let B=c[z];B===void 0&&(B={},c[z]=B);let G=B[D];G===void 0&&(G=T.clone(),B[D]=G,A.addEventListener("dispose",C)),T=G}if(T.visible=A.visible,T.wireframe=A.wireframe,k===Qs?T.side=A.shadowSide!==null?A.shadowSide:A.side:T.side=A.shadowSide!==null?A.shadowSide:f[A.side],T.alphaMap=A.alphaMap,T.alphaTest=A.alphaTest,T.map=A.map,T.clipShadows=A.clipShadows,T.clippingPlanes=A.clippingPlanes,T.clipIntersection=A.clipIntersection,T.displacementMap=A.displacementMap,T.displacementScale=A.displacementScale,T.displacementBias=A.displacementBias,T.wireframeLinewidth=A.wireframeLinewidth,T.linewidth=A.linewidth,L.isPointLight===!0&&T.isMeshDistanceMaterial===!0){const z=t.properties.get(T);z.light=L}return T}function S(P,A,L,k,T){if(P.visible===!1)return;if(P.layers.test(A.layers)&&(P.isMesh||P.isLine||P.isPoints)&&(P.castShadow||P.receiveShadow&&T===Qs)&&(!P.frustumCulled||r.intersectsObject(P))){P.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,P.matrixWorld);const D=e.update(P),B=P.material;if(Array.isArray(B)){const G=D.groups;for(let X=0,Z=G.length;X=1):F.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),X=Z>=2);let q=null,K={};const Q=t.getParameter(t.SCISSOR_BOX),he=t.getParameter(t.VIEWPORT),fe=new nn().fromArray(Q),J=new nn().fromArray(he);function de(ee,Be,ve,Pe){const We=new Uint8Array(4),Ze=t.createTexture();t.bindTexture(ee,Ze),t.texParameteri(ee,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(ee,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let It=0;It"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Ne,u=new WeakMap;let f;const h=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y($,U){return m?new OffscreenCanvas($,U):Dm("canvas")}function x($,U,ne){let le=1;const Te=ke($);if((Te.width>ne||Te.height>ne)&&(le=ne/Math.max(Te.width,Te.height)),le<1)if(typeof HTMLImageElement<"u"&&$ instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&$ instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&$ instanceof ImageBitmap||typeof VideoFrame<"u"&&$ instanceof VideoFrame){const ye=Math.floor(le*Te.width),He=Math.floor(le*Te.height);f===void 0&&(f=y(ye,He));const Ae=U?y(ye,He):f;return Ae.width=ye,Ae.height=He,Ae.getContext("2d").drawImage($,0,0,ye,He),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+ye+"x"+He+")."),Ae}else return"data"in $&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.height+")."),$;return $}function v($){return $.generateMipmaps}function g($){t.generateMipmap($)}function b($){return $.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:$.isWebGL3DRenderTarget?t.TEXTURE_3D:$.isWebGLArrayRenderTarget||$.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function _($,U,ne,le,Te=!1){if($!==null){if(t[$]!==void 0)return t[$];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+$+"'")}let ye=U;if(U===t.RED&&(ne===t.FLOAT&&(ye=t.R32F),ne===t.HALF_FLOAT&&(ye=t.R16F),ne===t.UNSIGNED_BYTE&&(ye=t.R8)),U===t.RED_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.R8UI),ne===t.UNSIGNED_SHORT&&(ye=t.R16UI),ne===t.UNSIGNED_INT&&(ye=t.R32UI),ne===t.BYTE&&(ye=t.R8I),ne===t.SHORT&&(ye=t.R16I),ne===t.INT&&(ye=t.R32I)),U===t.RG&&(ne===t.FLOAT&&(ye=t.RG32F),ne===t.HALF_FLOAT&&(ye=t.RG16F),ne===t.UNSIGNED_BYTE&&(ye=t.RG8)),U===t.RG_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.RG8UI),ne===t.UNSIGNED_SHORT&&(ye=t.RG16UI),ne===t.UNSIGNED_INT&&(ye=t.RG32UI),ne===t.BYTE&&(ye=t.RG8I),ne===t.SHORT&&(ye=t.RG16I),ne===t.INT&&(ye=t.RG32I)),U===t.RGB_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.RGB8UI),ne===t.UNSIGNED_SHORT&&(ye=t.RGB16UI),ne===t.UNSIGNED_INT&&(ye=t.RGB32UI),ne===t.BYTE&&(ye=t.RGB8I),ne===t.SHORT&&(ye=t.RGB16I),ne===t.INT&&(ye=t.RGB32I)),U===t.RGBA_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ye=t.RGBA8UI),ne===t.UNSIGNED_SHORT&&(ye=t.RGBA16UI),ne===t.UNSIGNED_INT&&(ye=t.RGBA32UI),ne===t.BYTE&&(ye=t.RGBA8I),ne===t.SHORT&&(ye=t.RGBA16I),ne===t.INT&&(ye=t.RGBA32I)),U===t.RGB&&ne===t.UNSIGNED_INT_5_9_9_9_REV&&(ye=t.RGB9_E5),U===t.RGBA){const He=Te?km:tn.getTransfer(le);ne===t.FLOAT&&(ye=t.RGBA32F),ne===t.HALF_FLOAT&&(ye=t.RGBA16F),ne===t.UNSIGNED_BYTE&&(ye=He===mn?t.SRGB8_ALPHA8:t.RGBA8),ne===t.UNSIGNED_SHORT_4_4_4_4&&(ye=t.RGBA4),ne===t.UNSIGNED_SHORT_5_5_5_1&&(ye=t.RGB5_A1)}return(ye===t.R16F||ye===t.R32F||ye===t.RG16F||ye===t.RG32F||ye===t.RGBA16F||ye===t.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function S($,U){let ne;return $?U===null||U===Ua||U===pu?ne=t.DEPTH24_STENCIL8:U===li?ne=t.DEPTH32F_STENCIL8:U===Nd&&(ne=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):U===null||U===Ua||U===pu?ne=t.DEPTH_COMPONENT24:U===li?ne=t.DEPTH_COMPONENT32F:U===Nd&&(ne=t.DEPTH_COMPONENT16),ne}function C($,U){return v($)===!0||$.isFramebufferTexture&&$.minFilter!==Sr&&$.minFilter!==cr?Math.log2(Math.max(U.width,U.height))+1:$.mipmaps!==void 0&&$.mipmaps.length>0?$.mipmaps.length:$.isCompressedTexture&&Array.isArray($.image)?U.mipmaps.length:1}function P($){const U=$.target;U.removeEventListener("dispose",P),L(U),U.isVideoTexture&&u.delete(U)}function A($){const U=$.target;U.removeEventListener("dispose",A),T(U)}function L($){const U=r.get($);if(U.__webglInit===void 0)return;const ne=$.source,le=h.get(ne);if(le){const Te=le[U.__cacheKey];Te.usedTimes--,Te.usedTimes===0&&k($),Object.keys(le).length===0&&h.delete(ne)}r.remove($)}function k($){const U=r.get($);t.deleteTexture(U.__webglTexture);const ne=$.source,le=h.get(ne);delete le[U.__cacheKey],o.memory.textures--}function T($){const U=r.get($);if($.depthTexture&&($.depthTexture.dispose(),r.remove($.depthTexture)),$.isWebGLCubeRenderTarget)for(let le=0;le<6;le++){if(Array.isArray(U.__webglFramebuffer[le]))for(let Te=0;Te=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+$+" texture units while this GPU supports only "+i.maxTextures),N+=1,$}function B($){const U=[];return U.push($.wrapS),U.push($.wrapT),U.push($.wrapR||0),U.push($.magFilter),U.push($.minFilter),U.push($.anisotropy),U.push($.internalFormat),U.push($.format),U.push($.type),U.push($.generateMipmaps),U.push($.premultiplyAlpha),U.push($.flipY),U.push($.unpackAlignment),U.push($.colorSpace),U.join()}function G($,U){const ne=r.get($);if($.isVideoTexture&&ue($),$.isRenderTargetTexture===!1&&$.version>0&&ne.__version!==$.version){const le=$.image;if(le===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(le.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{J(ne,$,U);return}}n.bindTexture(t.TEXTURE_2D,ne.__webglTexture,t.TEXTURE0+U)}function X($,U){const ne=r.get($);if($.version>0&&ne.__version!==$.version){J(ne,$,U);return}n.bindTexture(t.TEXTURE_2D_ARRAY,ne.__webglTexture,t.TEXTURE0+U)}function Z($,U){const ne=r.get($);if($.version>0&&ne.__version!==$.version){J(ne,$,U);return}n.bindTexture(t.TEXTURE_3D,ne.__webglTexture,t.TEXTURE0+U)}function F($,U){const ne=r.get($);if($.version>0&&ne.__version!==$.version){de(ne,$,U);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ne.__webglTexture,t.TEXTURE0+U)}const q={[Am]:t.REPEAT,[Li]:t.CLAMP_TO_EDGE,[Pm]:t.MIRRORED_REPEAT},K={[Sr]:t.NEAREST,[ZR]:t.NEAREST_MIPMAP_NEAREST,[Yf]:t.NEAREST_MIPMAP_LINEAR,[cr]:t.LINEAR,[Fp]:t.LINEAR_MIPMAP_NEAREST,[Lo]:t.LINEAR_MIPMAP_LINEAR},Q={[J6]:t.NEVER,[iB]:t.ALWAYS,[Q6]:t.LESS,[lA]:t.LEQUAL,[eB]:t.EQUAL,[rB]:t.GEQUAL,[tB]:t.GREATER,[nB]:t.NOTEQUAL};function he($,U){if(U.type===li&&e.has("OES_texture_float_linear")===!1&&(U.magFilter===cr||U.magFilter===Fp||U.magFilter===Yf||U.magFilter===Lo||U.minFilter===cr||U.minFilter===Fp||U.minFilter===Yf||U.minFilter===Lo)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri($,t.TEXTURE_WRAP_S,q[U.wrapS]),t.texParameteri($,t.TEXTURE_WRAP_T,q[U.wrapT]),($===t.TEXTURE_3D||$===t.TEXTURE_2D_ARRAY)&&t.texParameteri($,t.TEXTURE_WRAP_R,q[U.wrapR]),t.texParameteri($,t.TEXTURE_MAG_FILTER,K[U.magFilter]),t.texParameteri($,t.TEXTURE_MIN_FILTER,K[U.minFilter]),U.compareFunction&&(t.texParameteri($,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri($,t.TEXTURE_COMPARE_FUNC,Q[U.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(U.magFilter===Sr||U.minFilter!==Yf&&U.minFilter!==Lo||U.type===li&&e.has("OES_texture_float_linear")===!1)return;if(U.anisotropy>1||r.get(U).__currentAnisotropy){const ne=e.get("EXT_texture_filter_anisotropic");t.texParameterf($,ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(U.anisotropy,i.getMaxAnisotropy())),r.get(U).__currentAnisotropy=U.anisotropy}}}function fe($,U){let ne=!1;$.__webglInit===void 0&&($.__webglInit=!0,U.addEventListener("dispose",P));const le=U.source;let Te=h.get(le);Te===void 0&&(Te={},h.set(le,Te));const ye=B(U);if(ye!==$.__cacheKey){Te[ye]===void 0&&(Te[ye]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,ne=!0),Te[ye].usedTimes++;const He=Te[$.__cacheKey];He!==void 0&&(Te[$.__cacheKey].usedTimes--,He.usedTimes===0&&k(U)),$.__cacheKey=ye,$.__webglTexture=Te[ye].texture}return ne}function J($,U,ne){let le=t.TEXTURE_2D;(U.isDataArrayTexture||U.isCompressedArrayTexture)&&(le=t.TEXTURE_2D_ARRAY),U.isData3DTexture&&(le=t.TEXTURE_3D);const Te=fe($,U),ye=U.source;n.bindTexture(le,$.__webglTexture,t.TEXTURE0+ne);const He=r.get(ye);if(ye.version!==He.__version||Te===!0){n.activeTexture(t.TEXTURE0+ne);const Ae=tn.getPrimaries(tn.workingColorSpace),Ee=U.colorSpace===xa?null:tn.getPrimaries(U.colorSpace),_t=U.colorSpace===xa||Ae===Ee?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,U.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,U.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,_t);let Le=x(U.image,!1,i.maxTextureSize);Le=Ye(U,Le);const it=s.convert(U.format,U.colorSpace),Oe=s.convert(U.type);let Ke=_(U.internalFormat,it,Oe,U.colorSpace,U.isVideoTexture);he(le,U);let ge;const ze=U.mipmaps,Qe=U.isVideoTexture!==!0,mt=He.__version===void 0||Te===!0,ee=ye.dataReady,Be=C(U,Le);if(U.isDepthTexture)Ke=S(U.format===mu,U.type),mt&&(Qe?n.texStorage2D(t.TEXTURE_2D,1,Ke,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,Ke,Le.width,Le.height,0,it,Oe,null));else if(U.isDataTexture)if(ze.length>0){Qe&&mt&&n.texStorage2D(t.TEXTURE_2D,Be,Ke,ze[0].width,ze[0].height);for(let ve=0,Pe=ze.length;ve0){const We=RT(ge.width,ge.height,U.format,U.type);for(const Ze of U.layerUpdates){const It=ge.data.subarray(Ze*We/ge.data.BYTES_PER_ELEMENT,(Ze+1)*We/ge.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ve,0,0,Ze,ge.width,ge.height,1,it,It)}U.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ve,0,0,0,ge.width,ge.height,Le.depth,it,ge.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,ve,Ke,ge.width,ge.height,Le.depth,0,ge.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Qe?ee&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,ve,0,0,0,ge.width,ge.height,Le.depth,it,Oe,ge.data):n.texImage3D(t.TEXTURE_2D_ARRAY,ve,Ke,ge.width,ge.height,Le.depth,0,it,Oe,ge.data)}else{Qe&&mt&&n.texStorage2D(t.TEXTURE_2D,Be,Ke,ze[0].width,ze[0].height);for(let ve=0,Pe=ze.length;ve0){const ve=RT(Le.width,Le.height,U.format,U.type);for(const Pe of U.layerUpdates){const We=Le.data.subarray(Pe*ve/Le.data.BYTES_PER_ELEMENT,(Pe+1)*ve/Le.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Pe,Le.width,Le.height,1,it,Oe,We)}U.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Le.width,Le.height,Le.depth,it,Oe,Le.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Ke,Le.width,Le.height,Le.depth,0,it,Oe,Le.data);else if(U.isData3DTexture)Qe?(mt&&n.texStorage3D(t.TEXTURE_3D,Be,Ke,Le.width,Le.height,Le.depth),ee&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Le.width,Le.height,Le.depth,it,Oe,Le.data)):n.texImage3D(t.TEXTURE_3D,0,Ke,Le.width,Le.height,Le.depth,0,it,Oe,Le.data);else if(U.isFramebufferTexture){if(mt)if(Qe)n.texStorage2D(t.TEXTURE_2D,Be,Ke,Le.width,Le.height);else{let ve=Le.width,Pe=Le.height;for(let We=0;We>=1,Pe>>=1}}else if(ze.length>0){if(Qe&&mt){const ve=ke(ze[0]);n.texStorage2D(t.TEXTURE_2D,Be,Ke,ve.width,ve.height)}for(let ve=0,Pe=ze.length;ve0&&Be++;const Pe=ke(it[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Be,ze,Pe.width,Pe.height)}for(let Pe=0;Pe<6;Pe++)if(Le){Qe?ee&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,it[Pe].width,it[Pe].height,Ke,ge,it[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,ze,it[Pe].width,it[Pe].height,0,Ke,ge,it[Pe].data);for(let We=0;We>ye),Oe=Math.max(1,U.height>>ye);Te===t.TEXTURE_3D||Te===t.TEXTURE_2D_ARRAY?n.texImage3D(Te,ye,Ee,it,Oe,U.depth,0,He,Ae,null):n.texImage2D(Te,ye,Ee,it,Oe,0,He,Ae,null)}n.bindFramebuffer(t.FRAMEBUFFER,$),De(U)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,le,Te,Le.__webglTexture,0,Re(U)):(Te===t.TEXTURE_2D||Te>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,le,Te,Le.__webglTexture,ye),n.bindFramebuffer(t.FRAMEBUFFER,null)}function _e($,U,ne){if(t.bindRenderbuffer(t.RENDERBUFFER,$),U.depthBuffer){const le=U.depthTexture,Te=le&&le.isDepthTexture?le.type:null,ye=S(U.stencilBuffer,Te),He=U.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ae=Re(U);De(U)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ye,U.width,U.height):ne?t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ye,U.width,U.height):t.renderbufferStorage(t.RENDERBUFFER,ye,U.width,U.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,He,t.RENDERBUFFER,$)}else{const le=U.textures;for(let Te=0;Te{delete U.__boundDepthTexture,delete U.__depthDisposeCallback,le.removeEventListener("dispose",Te)};le.addEventListener("dispose",Te),U.__depthDisposeCallback=Te}U.__boundDepthTexture=le}if($.depthTexture&&!U.__autoAllocateDepthBuffer){if(ne)throw new Error("target.depthTexture not supported in Cube render targets");Xe(U.__webglFramebuffer,$)}else if(ne){U.__webglDepthbuffer=[];for(let le=0;le<6;le++)if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer[le]),U.__webglDepthbuffer[le]===void 0)U.__webglDepthbuffer[le]=t.createRenderbuffer(),_e(U.__webglDepthbuffer[le],$,!1);else{const Te=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ye=U.__webglDepthbuffer[le];t.bindRenderbuffer(t.RENDERBUFFER,ye),t.framebufferRenderbuffer(t.FRAMEBUFFER,Te,t.RENDERBUFFER,ye)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer),U.__webglDepthbuffer===void 0)U.__webglDepthbuffer=t.createRenderbuffer(),_e(U.__webglDepthbuffer,$,!1);else{const le=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Te=U.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,Te),t.framebufferRenderbuffer(t.FRAMEBUFFER,le,t.RENDERBUFFER,Te)}n.bindFramebuffer(t.FRAMEBUFFER,null)}function Ve($,U,ne){const le=r.get($);U!==void 0&&be(le.__webglFramebuffer,$,$.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ne!==void 0&&at($)}function $e($){const U=$.texture,ne=r.get($),le=r.get(U);$.addEventListener("dispose",A);const Te=$.textures,ye=$.isWebGLCubeRenderTarget===!0,He=Te.length>1;if(He||(le.__webglTexture===void 0&&(le.__webglTexture=t.createTexture()),le.__version=U.version,o.memory.textures++),ye){ne.__webglFramebuffer=[];for(let Ae=0;Ae<6;Ae++)if(U.mipmaps&&U.mipmaps.length>0){ne.__webglFramebuffer[Ae]=[];for(let Ee=0;Ee0){ne.__webglFramebuffer=[];for(let Ae=0;Ae0&&De($)===!1){ne.__webglMultisampledFramebuffer=t.createFramebuffer(),ne.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Ae=0;Ae0)for(let Ee=0;Ee0)for(let Ee=0;Ee0){if(De($)===!1){const U=$.textures,ne=$.width,le=$.height;let Te=t.COLOR_BUFFER_BIT;const ye=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,He=r.get($),Ae=U.length>1;if(Ae)for(let Ee=0;Ee0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&U.__useRenderToTexture!==!1}function ue($){const U=o.render.frame;u.get($)!==U&&(u.set($,U),$.update())}function Ye($,U){const ne=$.colorSpace,le=$.format,Te=$.type;return $.isCompressedTexture===!0||$.isVideoTexture===!0||ne!==gu&&ne!==xa&&(tn.getTransfer(ne)===mn?(le!==Ir||Te!==$i)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),U}function ke($){return typeof HTMLImageElement<"u"&&$ instanceof HTMLImageElement?(c.width=$.naturalWidth||$.width,c.height=$.naturalHeight||$.height):typeof VideoFrame<"u"&&$ instanceof VideoFrame?(c.width=$.displayWidth,c.height=$.displayHeight):(c.width=$.width,c.height=$.height),c}this.allocateTextureUnit=D,this.resetTextureUnits=z,this.setTexture2D=G,this.setTexture2DArray=X,this.setTexture3D=Z,this.setTextureCube=F,this.rebindTextures=Ve,this.setupRenderTarget=$e,this.updateRenderTargetMipmap=ae,this.updateMultisampleRenderTarget=Ie,this.setupDepthRenderbuffer=at,this.setupFrameBufferTexture=be,this.useMultisampledRTT=De}function m8(t,e){function n(r,i=xa){let s;const o=tn.getTransfer(i);if(r===$i)return t.UNSIGNED_BYTE;if(r===a_)return t.UNSIGNED_SHORT_4_4_4_4;if(r===l_)return t.UNSIGNED_SHORT_5_5_5_1;if(r===eA)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===JR)return t.BYTE;if(r===QR)return t.SHORT;if(r===Nd)return t.UNSIGNED_SHORT;if(r===o_)return t.INT;if(r===Ua)return t.UNSIGNED_INT;if(r===li)return t.FLOAT;if(r===Au)return t.HALF_FLOAT;if(r===tA)return t.ALPHA;if(r===nA)return t.RGB;if(r===Ir)return t.RGBA;if(r===rA)return t.LUMINANCE;if(r===iA)return t.LUMINANCE_ALPHA;if(r===Yc)return t.DEPTH_COMPONENT;if(r===mu)return t.DEPTH_STENCIL;if(r===yg)return t.RED;if(r===vg)return t.RED_INTEGER;if(r===sA)return t.RG;if(r===c_)return t.RG_INTEGER;if(r===u_)return t.RGBA_INTEGER;if(r===zp||r===Up||r===Bp||r===jp)if(o===mn)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(r===zp)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Up)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Bp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===jp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(r===zp)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Up)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Bp)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===jp)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===Gx||r===Xx||r===qx||r===Yx)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(r===Gx)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===Xx)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===qx)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===Yx)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===Kx||r===Zx||r===Jx)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(r===Kx||r===Zx)return o===mn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(r===Jx)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===Qx||r===e1||r===t1||r===n1||r===r1||r===i1||r===s1||r===o1||r===a1||r===l1||r===c1||r===u1||r===f1||r===d1)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(r===Qx)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===e1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===t1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===n1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===r1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===i1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===s1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===o1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===a1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===l1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===c1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===u1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===f1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===d1)return o===mn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Vp||r===h1||r===p1)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(r===Vp)return o===mn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===h1)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===p1)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===oA||r===m1||r===g1||r===y1)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(r===Vp)return s.COMPRESSED_RED_RGTC1_EXT;if(r===m1)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===g1)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===y1)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===pu?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}const rhe=` void main() { gl_Position = vec4( position, 1.0 ); -}`,Kde=` +}`,ihe=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -4006,7 +4006,7 @@ void main() { } -}`;class Zde{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,r){if(this.texture===null){const i=new Hn,s=e.properties.get(i);s.__webglTexture=n.texture,(n.depthNear!==r.depthNear||n.depthFar!==r.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,r=new uo({vertexShader:Yde,fragmentShader:Kde,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new nr(new oh(20,20),r)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Jde extends Qo{constructor(e,n){super();const r=this;let i=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,m=null,y=null;const x=new Zde,v=n.getContextAttributes();let g=null,b=null;const _=[],S=[],C=new Ne;let P=null;const A=new xr;A.viewport=new nn;const L=new xr;L.viewport=new nn;const k=[A,L],T=new t8;let N=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(J){let de=_[J];return de===void 0&&(de=new Vv,_[J]=de),de.getTargetRaySpace()},this.getControllerGrip=function(J){let de=_[J];return de===void 0&&(de=new Vv,_[J]=de),de.getGripSpace()},this.getHand=function(J){let de=_[J];return de===void 0&&(de=new Vv,_[J]=de),de.getHandSpace()};function D(J){const de=S.indexOf(J.inputSource);if(de===-1)return;const be=_[de];be!==void 0&&(be.update(J.inputSource,J.frame,c||o),be.dispatchEvent({type:J.type,data:J.inputSource}))}function B(){i.removeEventListener("select",D),i.removeEventListener("selectstart",D),i.removeEventListener("selectend",D),i.removeEventListener("squeeze",D),i.removeEventListener("squeezestart",D),i.removeEventListener("squeezeend",D),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",G);for(let J=0;J<_.length;J++){const de=S[J];de!==null&&(S[J]=null,_[J].disconnect(de))}N=null,z=null,x.reset(),e.setRenderTarget(g),m=null,h=null,f=null,i=null,b=null,fe.stop(),r.isPresenting=!1,e.setPixelRatio(P),e.setSize(C.width,C.height,!1),r.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(J){s=J,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(J){a=J,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(J){c=J},this.getBaseLayer=function(){return h!==null?h:m},this.getBinding=function(){return f},this.getFrame=function(){return y},this.getSession=function(){return i},this.setSession=async function(J){if(i=J,i!==null){if(g=e.getRenderTarget(),i.addEventListener("select",D),i.addEventListener("selectstart",D),i.addEventListener("selectend",D),i.addEventListener("squeeze",D),i.addEventListener("squeezestart",D),i.addEventListener("squeezeend",D),i.addEventListener("end",B),i.addEventListener("inputsourceschange",G),v.xrCompatible!==!0&&await n.makeXRCompatible(),P=e.getPixelRatio(),e.getSize(C),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let be=null,_e=null,He=null;v.depth&&(He=v.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,be=v.stencil?mu:Yc,_e=v.stencil?pu:Ua);const at={colorFormat:n.RGBA8,depthFormat:He,scaleFactor:s};f=new XRWebGLBinding(i,n),h=f.createProjectionLayer(at),i.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),b=new Xo(h.textureWidth,h.textureHeight,{format:Ir,type:$i,depthTexture:new vA(h.textureWidth,h.textureHeight,_e,void 0,void 0,void 0,void 0,void 0,void 0,be),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:h.ignoreDepthValues===!1})}else{const be={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(i,n,be),i.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),b=new Xo(m.framebufferWidth,m.framebufferHeight,{format:Ir,type:$i,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),fe.setContext(i),fe.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return x.getDepthTexture()};function G(J){for(let de=0;de=0&&(S[_e]=null,_[_e].disconnect(be))}for(let de=0;de=S.length){S.push(be),_e=at;break}else if(S[at]===null){S[at]=be,_e=at;break}if(_e===-1)break}const He=_[_e];He&&He.connect(be)}}const X=new H,Z=new H;function F(J,de,be){X.setFromMatrixPosition(de.matrixWorld),Z.setFromMatrixPosition(be.matrixWorld);const _e=X.distanceTo(Z),He=de.projectionMatrix.elements,at=be.projectionMatrix.elements,Ve=He[14]/(He[10]-1),$e=He[14]/(He[10]+1),ae=(He[9]+1)/He[5],oe=(He[9]-1)/He[5],V=(He[8]-1)/He[0],Ie=(at[8]+1)/at[0],Re=Ve*V,De=Ve*Ie,ue=_e/(-V+Ie),Ye=ue*-V;if(de.matrixWorld.decompose(J.position,J.quaternion,J.scale),J.translateX(Ye),J.translateZ(ue),J.matrixWorld.compose(J.position,J.quaternion,J.scale),J.matrixWorldInverse.copy(J.matrixWorld).invert(),He[10]===-1)J.projectionMatrix.copy(de.projectionMatrix),J.projectionMatrixInverse.copy(de.projectionMatrixInverse);else{const ke=Ve+ue,$=$e+ue,U=Re-Ye,ne=De+(_e-Ye),le=ae*$e/$*ke,Te=oe*$e/$*ke;J.projectionMatrix.makePerspective(U,ne,le,Te,ke,$),J.projectionMatrixInverse.copy(J.projectionMatrix).invert()}}function q(J,de){de===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(de.matrixWorld,J.matrix),J.matrixWorldInverse.copy(J.matrixWorld).invert()}this.updateCamera=function(J){if(i===null)return;let de=J.near,be=J.far;x.texture!==null&&(x.depthNear>0&&(de=x.depthNear),x.depthFar>0&&(be=x.depthFar)),T.near=L.near=A.near=de,T.far=L.far=A.far=be,(N!==T.near||z!==T.far)&&(i.updateRenderState({depthNear:T.near,depthFar:T.far}),N=T.near,z=T.far),A.layers.mask=J.layers.mask|2,L.layers.mask=J.layers.mask|4,T.layers.mask=A.layers.mask|L.layers.mask;const _e=J.parent,He=T.cameras;q(T,_e);for(let at=0;at0&&(v.alphaTest.value=g.alphaTest);const b=e.get(g),_=b.envMap,S=b.envMapRotation;_&&(v.envMap.value=_,_c.copy(S),_c.x*=-1,_c.y*=-1,_c.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(_c.y*=-1,_c.z*=-1),v.envMapRotation.value.setFromMatrix4(Qde.makeRotationFromEuler(_c)),v.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=g.reflectivity,v.ior.value=g.ior,v.refractionRatio.value=g.refractionRatio),g.lightMap&&(v.lightMap.value=g.lightMap,v.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,v.lightMapTransform)),g.aoMap&&(v.aoMap.value=g.aoMap,v.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,v.aoMapTransform))}function o(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,g.map&&(v.map.value=g.map,n(g.map,v.mapTransform))}function a(v,g){v.dashSize.value=g.dashSize,v.totalSize.value=g.dashSize+g.gapSize,v.scale.value=g.scale}function l(v,g,b,_){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.size.value=g.size*b,v.scale.value=_*.5,g.map&&(v.map.value=g.map,n(g.map,v.uvTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,n(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function c(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.rotation.value=g.rotation,g.map&&(v.map.value=g.map,n(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,n(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function u(v,g){v.specular.value.copy(g.specular),v.shininess.value=Math.max(g.shininess,1e-4)}function f(v,g){g.gradientMap&&(v.gradientMap.value=g.gradientMap)}function h(v,g){v.metalness.value=g.metalness,g.metalnessMap&&(v.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,v.metalnessMapTransform)),v.roughness.value=g.roughness,g.roughnessMap&&(v.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,v.roughnessMapTransform)),g.envMap&&(v.envMapIntensity.value=g.envMapIntensity)}function m(v,g,b){v.ior.value=g.ior,g.sheen>0&&(v.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),v.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(v.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,v.sheenColorMapTransform)),g.sheenRoughnessMap&&(v.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,v.sheenRoughnessMapTransform))),g.clearcoat>0&&(v.clearcoat.value=g.clearcoat,v.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(v.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,v.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(v.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===di&&v.clearcoatNormalScale.value.negate())),g.dispersion>0&&(v.dispersion.value=g.dispersion),g.iridescence>0&&(v.iridescence.value=g.iridescence,v.iridescenceIOR.value=g.iridescenceIOR,v.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(v.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,v.iridescenceMapTransform)),g.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),g.transmission>0&&(v.transmission.value=g.transmission,v.transmissionSamplerMap.value=b.texture,v.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(v.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,v.transmissionMapTransform)),v.thickness.value=g.thickness,g.thicknessMap&&(v.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=g.attenuationDistance,v.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(v.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(v.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=g.specularIntensity,v.specularColor.value.copy(g.specularColor),g.specularColorMap&&(v.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,v.specularColorMapTransform)),g.specularIntensityMap&&(v.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,v.specularIntensityMapTransform))}function y(v,g){g.matcap&&(v.matcap.value=g.matcap)}function x(v,g){const b=e.get(g).light;v.referencePosition.value.setFromMatrixPosition(b.matrixWorld),v.nearDistance.value=b.shadow.camera.near,v.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function the(t,e,n,r){let i={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,_){const S=_.program;r.uniformBlockBinding(b,S)}function c(b,_){let S=i[b.id];S===void 0&&(y(b),S=u(b),i[b.id]=S,b.addEventListener("dispose",v));const C=_.program;r.updateUBOMapping(b,C);const P=e.render.frame;s[b.id]!==P&&(h(b),s[b.id]=P)}function u(b){const _=f();b.__bindingPointIndex=_;const S=t.createBuffer(),C=b.__size,P=b.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,C,P),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,S),S}function f(){for(let b=0;b0&&(S+=C-P),b.__size=S,b.__cache={},this}function x(b){const _={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(_.boundary=4,_.storage=4):b.isVector2?(_.boundary=8,_.storage=8):b.isVector3||b.isColor?(_.boundary=16,_.storage=12):b.isVector4?(_.boundary=16,_.storage=16):b.isMatrix3?(_.boundary=48,_.storage=48):b.isMatrix4?(_.boundary=64,_.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),_}function v(b){const _=b.target;_.removeEventListener("dispose",v);const S=o.indexOf(_.__bindingPointIndex);o.splice(S,1),t.deleteBuffer(i[_.id]),delete i[_.id],delete s[_.id]}function g(){for(const b in i)t.deleteBuffer(i[b]);o=[],i={},s={}}return{bind:l,update:c,dispose:g}}class h8{constructor(e={}){const{canvas:n=iB(),context:r=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let m;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");m=r.getContextAttributes().alpha}else m=o;const y=new Uint32Array(4),x=new Int32Array(4);let v=null,g=null;const b=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Ti,this.toneMapping=Bo,this.toneMappingExposure=1;const S=this;let C=!1,P=0,A=0,L=null,k=-1,T=null;const N=new nn,z=new nn;let D=null;const B=new ot(0);let G=0,X=n.width,Z=n.height,F=1,q=null,K=null;const Q=new nn(0,0,X,Z),he=new nn(0,0,X,Z);let fe=!1;const J=new wg;let de=!1,be=!1;this.transmissionResolutionScale=1;const _e=new Tt,He=new Tt,at=new H,Ve=new nn,$e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ae=!1;function oe(){return L===null?F:1}let V=r;function Ie(j,re){return n.getContext(j,re)}try{const j={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${i_}`),n.addEventListener("webglcontextlost",Pe,!1),n.addEventListener("webglcontextrestored",We,!1),n.addEventListener("webglcontextcreationerror",Ze,!1),V===null){const re="webgl2";if(V=Ie(re,j),V===null)throw Ie(re)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(j){throw console.error("THREE.WebGLRenderer: "+j.message),j}let Re,De,ue,Ye,ke,$,U,ne,le,Te,ye,Ge,Ae,Ee,_t,Le,it,Oe,Ke,ge,ze,Qe,mt,ee;function Be(){Re=new hfe(V),Re.init(),Qe=new d8(V,Re),De=new afe(V,Re,e,Qe),ue=new Xde(V,Re),De.reverseDepthBuffer&&h&&ue.buffers.depth.setReversed(!0),Ye=new gfe(V),ke=new Lde,$=new qde(V,Re,ue,ke,De,Qe,Ye),U=new cfe(S),ne=new dfe(S),le=new Sle(V),mt=new sfe(V,le),Te=new pfe(V,le,Ye,mt),ye=new vfe(V,Te,le,Ye),Ke=new yfe(V,De,$),Le=new lfe(ke),Ge=new kde(S,U,ne,Re,De,mt,Le),Ae=new ehe(S,ke),Ee=new Dde,_t=new Vde(Re),Oe=new ife(S,U,ne,ue,ye,m,l),it=new Hde(S,ye,De),ee=new the(V,Ye,De,ue),ge=new ofe(V,Re,Ye),ze=new mfe(V,Re,Ye),Ye.programs=Ge.programs,S.capabilities=De,S.extensions=Re,S.properties=ke,S.renderLists=Ee,S.shadowMap=it,S.state=ue,S.info=Ye}Be();const ve=new Jde(S,V);this.xr=ve,this.getContext=function(){return V},this.getContextAttributes=function(){return V.getContextAttributes()},this.forceContextLoss=function(){const j=Re.get("WEBGL_lose_context");j&&j.loseContext()},this.forceContextRestore=function(){const j=Re.get("WEBGL_lose_context");j&&j.restoreContext()},this.getPixelRatio=function(){return F},this.setPixelRatio=function(j){j!==void 0&&(F=j,this.setSize(X,Z,!1))},this.getSize=function(j){return j.set(X,Z)},this.setSize=function(j,re,pe=!0){if(ve.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=j,Z=re,n.width=Math.floor(j*F),n.height=Math.floor(re*F),pe===!0&&(n.style.width=j+"px",n.style.height=re+"px"),this.setViewport(0,0,j,re)},this.getDrawingBufferSize=function(j){return j.set(X*F,Z*F).floor()},this.setDrawingBufferSize=function(j,re,pe){X=j,Z=re,F=pe,n.width=Math.floor(j*pe),n.height=Math.floor(re*pe),this.setViewport(0,0,j,re)},this.getCurrentViewport=function(j){return j.copy(N)},this.getViewport=function(j){return j.copy(Q)},this.setViewport=function(j,re,pe,me){j.isVector4?Q.set(j.x,j.y,j.z,j.w):Q.set(j,re,pe,me),ue.viewport(N.copy(Q).multiplyScalar(F).round())},this.getScissor=function(j){return j.copy(he)},this.setScissor=function(j,re,pe,me){j.isVector4?he.set(j.x,j.y,j.z,j.w):he.set(j,re,pe,me),ue.scissor(z.copy(he).multiplyScalar(F).round())},this.getScissorTest=function(){return fe},this.setScissorTest=function(j){ue.setScissorTest(fe=j)},this.setOpaqueSort=function(j){q=j},this.setTransparentSort=function(j){K=j},this.getClearColor=function(j){return j.copy(Oe.getClearColor())},this.setClearColor=function(){Oe.setClearColor.apply(Oe,arguments)},this.getClearAlpha=function(){return Oe.getClearAlpha()},this.setClearAlpha=function(){Oe.setClearAlpha.apply(Oe,arguments)},this.clear=function(j=!0,re=!0,pe=!0){let me=0;if(j){let ie=!1;if(L!==null){const Fe=L.texture.format;ie=Fe===u_||Fe===c_||Fe===vg}if(ie){const Fe=L.texture.type,et=Fe===$i||Fe===Ua||Fe===Id||Fe===pu||Fe===a_||Fe===l_,ct=Oe.getClearColor(),ut=Oe.getClearAlpha(),St=ct.r,wt=ct.g,qe=ct.b;et?(y[0]=St,y[1]=wt,y[2]=qe,y[3]=ut,V.clearBufferuiv(V.COLOR,0,y)):(x[0]=St,x[1]=wt,x[2]=qe,x[3]=ut,V.clearBufferiv(V.COLOR,0,x))}else me|=V.COLOR_BUFFER_BIT}re&&(me|=V.DEPTH_BUFFER_BIT),pe&&(me|=V.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),V.clear(me)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",Pe,!1),n.removeEventListener("webglcontextrestored",We,!1),n.removeEventListener("webglcontextcreationerror",Ze,!1),Oe.dispose(),Ee.dispose(),_t.dispose(),ke.dispose(),U.dispose(),ne.dispose(),ye.dispose(),mt.dispose(),ee.dispose(),Ge.dispose(),ve.dispose(),ve.removeEventListener("sessionstart",Ug),ve.removeEventListener("sessionend",Bg),vo.stop()};function Pe(j){j.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),C=!0}function We(){console.log("THREE.WebGLRenderer: Context Restored."),C=!1;const j=Ye.autoReset,re=it.enabled,pe=it.autoUpdate,me=it.needsUpdate,ie=it.type;Be(),Ye.autoReset=j,it.enabled=re,it.autoUpdate=pe,it.needsUpdate=me,it.type=ie}function Ze(j){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",j.statusMessage)}function It(j){const re=j.target;re.removeEventListener("dispose",It),Cn(re)}function Cn(j){rr(j),ke.remove(j)}function rr(j){const re=ke.get(j).programs;re!==void 0&&(re.forEach(function(pe){Ge.releaseProgram(pe)}),j.isShaderMaterial&&Ge.releaseShaderCache(j))}this.renderBufferDirect=function(j,re,pe,me,ie,Fe){re===null&&(re=$e);const et=ie.isMesh&&ie.matrixWorld.determinant()<0,ct=mw(j,re,pe,me,ie);ue.setMaterial(me,et);let ut=pe.index,St=1;if(me.wireframe===!0){if(ut=Te.getWireframeAttribute(pe),ut===void 0)return;St=2}const wt=pe.drawRange,qe=pe.attributes.position;let gt=wt.start*St,Ht=(wt.start+wt.count)*St;Fe!==null&&(gt=Math.max(gt,Fe.start*St),Ht=Math.min(Ht,(Fe.start+Fe.count)*St)),ut!==null?(gt=Math.max(gt,0),Ht=Math.min(Ht,ut.count)):qe!=null&&(gt=Math.max(gt,0),Ht=Math.min(Ht,qe.count));const qt=Ht-gt;if(qt<0||qt===1/0)return;mt.setup(ie,me,ct,pe,ut);let Yt,Vt=ge;if(ut!==null&&(Yt=le.get(ut),Vt=ze,Vt.setIndex(Yt)),ie.isMesh)me.wireframe===!0?(ue.setLineWidth(me.wireframeLinewidth*oe()),Vt.setMode(V.LINES)):Vt.setMode(V.TRIANGLES);else if(ie.isLine){let yt=me.linewidth;yt===void 0&&(yt=1),ue.setLineWidth(yt*oe()),ie.isLineSegments?Vt.setMode(V.LINES):ie.isLineLoop?Vt.setMode(V.LINE_LOOP):Vt.setMode(V.LINE_STRIP)}else ie.isPoints?Vt.setMode(V.POINTS):ie.isSprite&&Vt.setMode(V.TRIANGLES);if(ie.isBatchedMesh)if(ie._multiDrawInstances!==null)Vt.renderMultiDrawInstances(ie._multiDrawStarts,ie._multiDrawCounts,ie._multiDrawCount,ie._multiDrawInstances);else if(Re.get("WEBGL_multi_draw"))Vt.renderMultiDraw(ie._multiDrawStarts,ie._multiDrawCounts,ie._multiDrawCount);else{const yt=ie._multiDrawStarts,ln=ie._multiDrawCounts,Qt=ie._multiDrawCount,vi=ut?le.get(ut).bytesPerElement:1,na=ke.get(me).currentProgram.getUniforms();for(let dr=0;dr{function Fe(){if(me.forEach(function(et){ke.get(et).currentProgram.isReady()&&me.delete(et)}),me.size===0){ie(j);return}setTimeout(Fe,10)}Re.get("KHR_parallel_shader_compile")!==null?Fe():setTimeout(Fe,10)})};let yi=null;function $s(j){yi&&yi(j)}function Ug(){vo.stop()}function Bg(){vo.start()}const vo=new a8;vo.setAnimationLoop($s),typeof self<"u"&&vo.setContext(self),this.setAnimationLoop=function(j){yi=j,ve.setAnimationLoop(j),j===null?vo.stop():vo.start()},ve.addEventListener("sessionstart",Ug),ve.addEventListener("sessionend",Bg),this.render=function(j,re){if(re!==void 0&&re.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(C===!0)return;if(j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),re.parent===null&&re.matrixWorldAutoUpdate===!0&&re.updateMatrixWorld(),ve.enabled===!0&&ve.isPresenting===!0&&(ve.cameraAutoUpdate===!0&&ve.updateCamera(re),re=ve.getCamera()),j.isScene===!0&&j.onBeforeRender(S,j,re,L),g=_t.get(j,_.length),g.init(re),_.push(g),He.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),J.setFromProjectionMatrix(He),be=this.localClippingEnabled,de=Le.init(this.clippingPlanes,be),v=Ee.get(j,b.length),v.init(),b.push(v),ve.enabled===!0&&ve.isPresenting===!0){const Fe=S.xr.getDepthSensingMesh();Fe!==null&&Jl(Fe,re,-1/0,S.sortObjects)}Jl(j,re,0,S.sortObjects),v.finish(),S.sortObjects===!0&&v.sort(q,K),ae=ve.enabled===!1||ve.isPresenting===!1||ve.hasDepthSensing()===!1,ae&&Oe.addToRenderList(v,j),this.info.render.frame++,de===!0&&Le.beginShadows();const pe=g.state.shadowsArray;it.render(pe,j,re),de===!0&&Le.endShadows(),this.info.autoReset===!0&&this.info.reset();const me=v.opaque,ie=v.transmissive;if(g.setupLights(),re.isArrayCamera){const Fe=re.cameras;if(ie.length>0)for(let et=0,ct=Fe.length;et0&&Ga(me,ie,j,re),ae&&Oe.render(j),jg(v,j,re);L!==null&&A===0&&($.updateMultisampleRenderTarget(L),$.updateRenderTargetMipmap(L)),j.isScene===!0&&j.onAfterRender(S,j,re),mt.resetDefaultState(),k=-1,T=null,_.pop(),_.length>0?(g=_[_.length-1],de===!0&&Le.setGlobalState(S.clippingPlanes,g.state.camera)):g=null,b.pop(),b.length>0?v=b[b.length-1]:v=null};function Jl(j,re,pe,me){if(j.visible===!1)return;if(j.layers.test(re.layers)){if(j.isGroup)pe=j.renderOrder;else if(j.isLOD)j.autoUpdate===!0&&j.update(re);else if(j.isLight)g.pushLight(j),j.castShadow&&g.pushShadow(j);else if(j.isSprite){if(!j.frustumCulled||J.intersectsSprite(j)){me&&Ve.setFromMatrixPosition(j.matrixWorld).applyMatrix4(He);const et=ye.update(j),ct=j.material;ct.visible&&v.push(j,et,ct,pe,Ve.z,null)}}else if((j.isMesh||j.isLine||j.isPoints)&&(!j.frustumCulled||J.intersectsObject(j))){const et=ye.update(j),ct=j.material;if(me&&(j.boundingSphere!==void 0?(j.boundingSphere===null&&j.computeBoundingSphere(),Ve.copy(j.boundingSphere.center)):(et.boundingSphere===null&&et.computeBoundingSphere(),Ve.copy(et.boundingSphere.center)),Ve.applyMatrix4(j.matrixWorld).applyMatrix4(He)),Array.isArray(ct)){const ut=et.groups;for(let St=0,wt=ut.length;St0&&Du(ie,re,pe),Fe.length>0&&Du(Fe,re,pe),et.length>0&&Du(et,re,pe),ue.buffers.depth.setTest(!0),ue.buffers.depth.setMask(!0),ue.buffers.color.setMask(!0),ue.setPolygonOffset(!1)}function Ga(j,re,pe,me){if((pe.isScene===!0?pe.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[me.id]===void 0&&(g.state.transmissionRenderTarget[me.id]=new Xo(1,1,{generateMipmaps:!0,type:Re.has("EXT_color_buffer_half_float")||Re.has("EXT_color_buffer_float")?Au:$i,minFilter:Lo,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:tn.workingColorSpace}));const Fe=g.state.transmissionRenderTarget[me.id],et=me.viewport||N;Fe.setSize(et.z*S.transmissionResolutionScale,et.w*S.transmissionResolutionScale);const ct=S.getRenderTarget();S.setRenderTarget(Fe),S.getClearColor(B),G=S.getClearAlpha(),G<1&&S.setClearColor(16777215,.5),S.clear(),ae&&Oe.render(pe);const ut=S.toneMapping;S.toneMapping=Bo;const St=me.viewport;if(me.viewport!==void 0&&(me.viewport=void 0),g.setupLightsView(me),de===!0&&Le.setGlobalState(S.clippingPlanes,me),Du(j,pe,me),$.updateMultisampleRenderTarget(Fe),$.updateRenderTargetMipmap(Fe),Re.has("WEBGL_multisampled_render_to_texture")===!1){let wt=!1;for(let qe=0,gt=re.length;qe0),qe=!!pe.morphAttributes.position,gt=!!pe.morphAttributes.normal,Ht=!!pe.morphAttributes.color;let qt=Bo;me.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(qt=S.toneMapping);const Yt=pe.morphAttributes.position||pe.morphAttributes.normal||pe.morphAttributes.color,Vt=Yt!==void 0?Yt.length:0,yt=ke.get(me),ln=g.state.lights;if(de===!0&&(be===!0||j!==T)){const Cr=j===T&&me.id===k;Le.setState(me,j,Cr)}let Qt=!1;me.version===yt.__version?(yt.needsLights&&yt.lightsStateVersion!==ln.state.version||yt.outputColorSpace!==ct||ie.isBatchedMesh&&yt.batching===!1||!ie.isBatchedMesh&&yt.batching===!0||ie.isBatchedMesh&&yt.batchingColor===!0&&ie.colorTexture===null||ie.isBatchedMesh&&yt.batchingColor===!1&&ie.colorTexture!==null||ie.isInstancedMesh&&yt.instancing===!1||!ie.isInstancedMesh&&yt.instancing===!0||ie.isSkinnedMesh&&yt.skinning===!1||!ie.isSkinnedMesh&&yt.skinning===!0||ie.isInstancedMesh&&yt.instancingColor===!0&&ie.instanceColor===null||ie.isInstancedMesh&&yt.instancingColor===!1&&ie.instanceColor!==null||ie.isInstancedMesh&&yt.instancingMorph===!0&&ie.morphTexture===null||ie.isInstancedMesh&&yt.instancingMorph===!1&&ie.morphTexture!==null||yt.envMap!==ut||me.fog===!0&&yt.fog!==Fe||yt.numClippingPlanes!==void 0&&(yt.numClippingPlanes!==Le.numPlanes||yt.numIntersection!==Le.numIntersection)||yt.vertexAlphas!==St||yt.vertexTangents!==wt||yt.morphTargets!==qe||yt.morphNormals!==gt||yt.morphColors!==Ht||yt.toneMapping!==qt||yt.morphTargetsCount!==Vt)&&(Qt=!0):(Qt=!0,yt.__version=me.version);let vi=yt.currentProgram;Qt===!0&&(vi=Fu(me,re,ie));let na=!1,dr=!1,Xa=!1;const Jt=vi.getUniforms(),xi=yt.uniforms;if(ue.useProgram(vi.program)&&(na=!0,dr=!0,Xa=!0),me.id!==k&&(k=me.id,dr=!0),na||T!==j){ue.buffers.depth.getReversed()?(_e.copy(j.projectionMatrix),Hse(_e),Gse(_e),Jt.setValue(V,"projectionMatrix",_e)):Jt.setValue(V,"projectionMatrix",j.projectionMatrix),Jt.setValue(V,"viewMatrix",j.matrixWorldInverse);const ir=Jt.map.cameraPosition;ir!==void 0&&ir.setValue(V,at.setFromMatrixPosition(j.matrixWorld)),De.logarithmicDepthBuffer&&Jt.setValue(V,"logDepthBufFC",2/(Math.log(j.far+1)/Math.LN2)),(me.isMeshPhongMaterial||me.isMeshToonMaterial||me.isMeshLambertMaterial||me.isMeshBasicMaterial||me.isMeshStandardMaterial||me.isShaderMaterial)&&Jt.setValue(V,"isOrthographic",j.isOrthographicCamera===!0),T!==j&&(T=j,dr=!0,Xa=!0)}if(ie.isSkinnedMesh){Jt.setOptional(V,ie,"bindMatrix"),Jt.setOptional(V,ie,"bindMatrixInverse");const Cr=ie.skeleton;Cr&&(Cr.boneTexture===null&&Cr.computeBoneTexture(),Jt.setValue(V,"boneTexture",Cr.boneTexture,$))}ie.isBatchedMesh&&(Jt.setOptional(V,ie,"batchingTexture"),Jt.setValue(V,"batchingTexture",ie._matricesTexture,$),Jt.setOptional(V,ie,"batchingIdTexture"),Jt.setValue(V,"batchingIdTexture",ie._indirectTexture,$),Jt.setOptional(V,ie,"batchingColorTexture"),ie._colorsTexture!==null&&Jt.setValue(V,"batchingColorTexture",ie._colorsTexture,$));const bi=pe.morphAttributes;if((bi.position!==void 0||bi.normal!==void 0||bi.color!==void 0)&&Ke.update(ie,pe,vi),(dr||yt.receiveShadow!==ie.receiveShadow)&&(yt.receiveShadow=ie.receiveShadow,Jt.setValue(V,"receiveShadow",ie.receiveShadow)),me.isMeshGouraudMaterial&&me.envMap!==null&&(xi.envMap.value=ut,xi.flipEnvMap.value=ut.isCubeTexture&&ut.isRenderTargetTexture===!1?-1:1),me.isMeshStandardMaterial&&me.envMap===null&&re.environment!==null&&(xi.envMapIntensity.value=re.environmentIntensity),dr&&(Jt.setValue(V,"toneMappingExposure",S.toneMappingExposure),yt.needsLights&&gw(xi,Xa),Fe&&me.fog===!0&&Ae.refreshFogUniforms(xi,Fe),Ae.refreshMaterialUniforms(xi,me,F,Z,g.state.transmissionRenderTarget[j.id]),$v.upload(V,$g(yt),xi,$)),me.isShaderMaterial&&me.uniformsNeedUpdate===!0&&($v.upload(V,$g(yt),xi,$),me.uniformsNeedUpdate=!1),me.isSpriteMaterial&&Jt.setValue(V,"center",ie.center),Jt.setValue(V,"modelViewMatrix",ie.modelViewMatrix),Jt.setValue(V,"normalMatrix",ie.normalMatrix),Jt.setValue(V,"modelMatrix",ie.matrixWorld),me.isShaderMaterial||me.isRawShaderMaterial){const Cr=me.uniformsGroups;for(let ir=0,qa=Cr.length;ir0&&$.useMultisampledRTT(j)===!1?ie=ke.get(j).__webglMultisampledFramebuffer:Array.isArray(wt)?ie=wt[pe]:ie=wt,N.copy(j.viewport),z.copy(j.scissor),D=j.scissorTest}else N.copy(Q).multiplyScalar(F).floor(),z.copy(he).multiplyScalar(F).floor(),D=fe;if(pe!==0&&(ie=yw),ue.bindFramebuffer(V.FRAMEBUFFER,ie)&&me&&ue.drawBuffers(j,ie),ue.viewport(N),ue.scissor(z),ue.setScissorTest(D),Fe){const ut=ke.get(j.texture);V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_CUBE_MAP_POSITIVE_X+re,ut.__webglTexture,pe)}else if(et){const ut=ke.get(j.texture),St=re;V.framebufferTextureLayer(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,ut.__webglTexture,pe,St)}else if(j!==null&&pe!==0){const ut=ke.get(j.texture);V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_2D,ut.__webglTexture,pe)}k=-1},this.readRenderTargetPixels=function(j,re,pe,me,ie,Fe,et){if(!(j&&j.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ct=ke.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&et!==void 0&&(ct=ct[et]),ct){ue.bindFramebuffer(V.FRAMEBUFFER,ct);try{const ut=j.texture,St=ut.format,wt=ut.type;if(!De.textureFormatReadable(St)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!De.textureTypeReadable(wt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=j.width-me&&pe>=0&&pe<=j.height-ie&&V.readPixels(re,pe,me,ie,Qe.convert(St),Qe.convert(wt),Fe)}finally{const ut=L!==null?ke.get(L).__webglFramebuffer:null;ue.bindFramebuffer(V.FRAMEBUFFER,ut)}}},this.readRenderTargetPixelsAsync=async function(j,re,pe,me,ie,Fe,et){if(!(j&&j.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ct=ke.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&et!==void 0&&(ct=ct[et]),ct){const ut=j.texture,St=ut.format,wt=ut.type;if(!De.textureFormatReadable(St))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!De.textureTypeReadable(wt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(re>=0&&re<=j.width-me&&pe>=0&&pe<=j.height-ie){ue.bindFramebuffer(V.FRAMEBUFFER,ct);const qe=V.createBuffer();V.bindBuffer(V.PIXEL_PACK_BUFFER,qe),V.bufferData(V.PIXEL_PACK_BUFFER,Fe.byteLength,V.STREAM_READ),V.readPixels(re,pe,me,ie,Qe.convert(St),Qe.convert(wt),0);const gt=L!==null?ke.get(L).__webglFramebuffer:null;ue.bindFramebuffer(V.FRAMEBUFFER,gt);const Ht=V.fenceSync(V.SYNC_GPU_COMMANDS_COMPLETE,0);return V.flush(),await Wse(V,Ht,4),V.bindBuffer(V.PIXEL_PACK_BUFFER,qe),V.getBufferSubData(V.PIXEL_PACK_BUFFER,0,Fe),V.deleteBuffer(qe),V.deleteSync(Ht),Fe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(j,re=null,pe=0){j.isTexture!==!0&&(Nf("WebGLRenderer: copyFramebufferToTexture function signature has changed."),re=arguments[0]||null,j=arguments[1]);const me=Math.pow(2,-pe),ie=Math.floor(j.image.width*me),Fe=Math.floor(j.image.height*me),et=re!==null?re.x:0,ct=re!==null?re.y:0;$.setTexture2D(j,0),V.copyTexSubImage2D(V.TEXTURE_2D,pe,0,0,et,ct,ie,Fe),ue.unbindTexture()};const vw=V.createFramebuffer(),xw=V.createFramebuffer();this.copyTextureToTexture=function(j,re,pe=null,me=null,ie=0,Fe=null){j.isTexture!==!0&&(Nf("WebGLRenderer: copyTextureToTexture function signature has changed."),me=arguments[0]||null,j=arguments[1],re=arguments[2],Fe=arguments[3]||0,pe=null),Fe===null&&(ie!==0?(Nf("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Fe=ie,ie=0):Fe=0);let et,ct,ut,St,wt,qe,gt,Ht,qt;const Yt=j.isCompressedTexture?j.mipmaps[Fe]:j.image;if(pe!==null)et=pe.max.x-pe.min.x,ct=pe.max.y-pe.min.y,ut=pe.isBox3?pe.max.z-pe.min.z:1,St=pe.min.x,wt=pe.min.y,qe=pe.isBox3?pe.min.z:0;else{const bi=Math.pow(2,-ie);et=Math.floor(Yt.width*bi),ct=Math.floor(Yt.height*bi),j.isDataArrayTexture?ut=Yt.depth:j.isData3DTexture?ut=Math.floor(Yt.depth*bi):ut=1,St=0,wt=0,qe=0}me!==null?(gt=me.x,Ht=me.y,qt=me.z):(gt=0,Ht=0,qt=0);const Vt=Qe.convert(re.format),yt=Qe.convert(re.type);let ln;re.isData3DTexture?($.setTexture3D(re,0),ln=V.TEXTURE_3D):re.isDataArrayTexture||re.isCompressedArrayTexture?($.setTexture2DArray(re,0),ln=V.TEXTURE_2D_ARRAY):($.setTexture2D(re,0),ln=V.TEXTURE_2D),V.pixelStorei(V.UNPACK_FLIP_Y_WEBGL,re.flipY),V.pixelStorei(V.UNPACK_PREMULTIPLY_ALPHA_WEBGL,re.premultiplyAlpha),V.pixelStorei(V.UNPACK_ALIGNMENT,re.unpackAlignment);const Qt=V.getParameter(V.UNPACK_ROW_LENGTH),vi=V.getParameter(V.UNPACK_IMAGE_HEIGHT),na=V.getParameter(V.UNPACK_SKIP_PIXELS),dr=V.getParameter(V.UNPACK_SKIP_ROWS),Xa=V.getParameter(V.UNPACK_SKIP_IMAGES);V.pixelStorei(V.UNPACK_ROW_LENGTH,Yt.width),V.pixelStorei(V.UNPACK_IMAGE_HEIGHT,Yt.height),V.pixelStorei(V.UNPACK_SKIP_PIXELS,St),V.pixelStorei(V.UNPACK_SKIP_ROWS,wt),V.pixelStorei(V.UNPACK_SKIP_IMAGES,qe);const Jt=j.isDataArrayTexture||j.isData3DTexture,xi=re.isDataArrayTexture||re.isData3DTexture;if(j.isDepthTexture){const bi=ke.get(j),Cr=ke.get(re),ir=ke.get(bi.__renderTarget),qa=ke.get(Cr.__renderTarget);ue.bindFramebuffer(V.READ_FRAMEBUFFER,ir.__webglFramebuffer),ue.bindFramebuffer(V.DRAW_FRAMEBUFFER,qa.__webglFramebuffer);for(let Hi=0;Hi=0&&(S[_e]=null,_[_e].disconnect(be))}for(let de=0;de=S.length){S.push(be),_e=at;break}else if(S[at]===null){S[at]=be,_e=at;break}if(_e===-1)break}const Xe=_[_e];Xe&&Xe.connect(be)}}const X=new H,Z=new H;function F(J,de,be){X.setFromMatrixPosition(de.matrixWorld),Z.setFromMatrixPosition(be.matrixWorld);const _e=X.distanceTo(Z),Xe=de.projectionMatrix.elements,at=be.projectionMatrix.elements,Ve=Xe[14]/(Xe[10]-1),$e=Xe[14]/(Xe[10]+1),ae=(Xe[9]+1)/Xe[5],oe=(Xe[9]-1)/Xe[5],V=(Xe[8]-1)/Xe[0],Ie=(at[8]+1)/at[0],Re=Ve*V,De=Ve*Ie,ue=_e/(-V+Ie),Ye=ue*-V;if(de.matrixWorld.decompose(J.position,J.quaternion,J.scale),J.translateX(Ye),J.translateZ(ue),J.matrixWorld.compose(J.position,J.quaternion,J.scale),J.matrixWorldInverse.copy(J.matrixWorld).invert(),Xe[10]===-1)J.projectionMatrix.copy(de.projectionMatrix),J.projectionMatrixInverse.copy(de.projectionMatrixInverse);else{const ke=Ve+ue,$=$e+ue,U=Re-Ye,ne=De+(_e-Ye),le=ae*$e/$*ke,Te=oe*$e/$*ke;J.projectionMatrix.makePerspective(U,ne,le,Te,ke,$),J.projectionMatrixInverse.copy(J.projectionMatrix).invert()}}function q(J,de){de===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(de.matrixWorld,J.matrix),J.matrixWorldInverse.copy(J.matrixWorld).invert()}this.updateCamera=function(J){if(i===null)return;let de=J.near,be=J.far;x.texture!==null&&(x.depthNear>0&&(de=x.depthNear),x.depthFar>0&&(be=x.depthFar)),T.near=L.near=A.near=de,T.far=L.far=A.far=be,(N!==T.near||z!==T.far)&&(i.updateRenderState({depthNear:T.near,depthFar:T.far}),N=T.near,z=T.far),A.layers.mask=J.layers.mask|2,L.layers.mask=J.layers.mask|4,T.layers.mask=A.layers.mask|L.layers.mask;const _e=J.parent,Xe=T.cameras;q(T,_e);for(let at=0;at0&&(v.alphaTest.value=g.alphaTest);const b=e.get(g),_=b.envMap,S=b.envMapRotation;_&&(v.envMap.value=_,_c.copy(S),_c.x*=-1,_c.y*=-1,_c.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(_c.y*=-1,_c.z*=-1),v.envMapRotation.value.setFromMatrix4(ahe.makeRotationFromEuler(_c)),v.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=g.reflectivity,v.ior.value=g.ior,v.refractionRatio.value=g.refractionRatio),g.lightMap&&(v.lightMap.value=g.lightMap,v.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,v.lightMapTransform)),g.aoMap&&(v.aoMap.value=g.aoMap,v.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,v.aoMapTransform))}function o(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,g.map&&(v.map.value=g.map,n(g.map,v.mapTransform))}function a(v,g){v.dashSize.value=g.dashSize,v.totalSize.value=g.dashSize+g.gapSize,v.scale.value=g.scale}function l(v,g,b,_){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.size.value=g.size*b,v.scale.value=_*.5,g.map&&(v.map.value=g.map,n(g.map,v.uvTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,n(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function c(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.rotation.value=g.rotation,g.map&&(v.map.value=g.map,n(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,n(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function u(v,g){v.specular.value.copy(g.specular),v.shininess.value=Math.max(g.shininess,1e-4)}function f(v,g){g.gradientMap&&(v.gradientMap.value=g.gradientMap)}function h(v,g){v.metalness.value=g.metalness,g.metalnessMap&&(v.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,v.metalnessMapTransform)),v.roughness.value=g.roughness,g.roughnessMap&&(v.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,v.roughnessMapTransform)),g.envMap&&(v.envMapIntensity.value=g.envMapIntensity)}function m(v,g,b){v.ior.value=g.ior,g.sheen>0&&(v.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),v.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(v.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,v.sheenColorMapTransform)),g.sheenRoughnessMap&&(v.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,v.sheenRoughnessMapTransform))),g.clearcoat>0&&(v.clearcoat.value=g.clearcoat,v.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(v.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,v.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(v.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===di&&v.clearcoatNormalScale.value.negate())),g.dispersion>0&&(v.dispersion.value=g.dispersion),g.iridescence>0&&(v.iridescence.value=g.iridescence,v.iridescenceIOR.value=g.iridescenceIOR,v.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(v.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,v.iridescenceMapTransform)),g.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),g.transmission>0&&(v.transmission.value=g.transmission,v.transmissionSamplerMap.value=b.texture,v.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(v.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,v.transmissionMapTransform)),v.thickness.value=g.thickness,g.thicknessMap&&(v.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=g.attenuationDistance,v.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(v.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(v.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=g.specularIntensity,v.specularColor.value.copy(g.specularColor),g.specularColorMap&&(v.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,v.specularColorMapTransform)),g.specularIntensityMap&&(v.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,v.specularIntensityMapTransform))}function y(v,g){g.matcap&&(v.matcap.value=g.matcap)}function x(v,g){const b=e.get(g).light;v.referencePosition.value.setFromMatrixPosition(b.matrixWorld),v.nearDistance.value=b.shadow.camera.near,v.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function che(t,e,n,r){let i={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,_){const S=_.program;r.uniformBlockBinding(b,S)}function c(b,_){let S=i[b.id];S===void 0&&(y(b),S=u(b),i[b.id]=S,b.addEventListener("dispose",v));const C=_.program;r.updateUBOMapping(b,C);const P=e.render.frame;s[b.id]!==P&&(h(b),s[b.id]=P)}function u(b){const _=f();b.__bindingPointIndex=_;const S=t.createBuffer(),C=b.__size,P=b.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,C,P),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,S),S}function f(){for(let b=0;b0&&(S+=C-P),b.__size=S,b.__cache={},this}function x(b){const _={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(_.boundary=4,_.storage=4):b.isVector2?(_.boundary=8,_.storage=8):b.isVector3||b.isColor?(_.boundary=16,_.storage=12):b.isVector4?(_.boundary=16,_.storage=16):b.isMatrix3?(_.boundary=48,_.storage=48):b.isMatrix4?(_.boundary=64,_.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),_}function v(b){const _=b.target;_.removeEventListener("dispose",v);const S=o.indexOf(_.__bindingPointIndex);o.splice(S,1),t.deleteBuffer(i[_.id]),delete i[_.id],delete s[_.id]}function g(){for(const b in i)t.deleteBuffer(i[b]);o=[],i={},s={}}return{bind:l,update:c,dispose:g}}class g8{constructor(e={}){const{canvas:n=aB(),context:r=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let m;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");m=r.getContextAttributes().alpha}else m=o;const y=new Uint32Array(4),x=new Int32Array(4);let v=null,g=null;const b=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Ti,this.toneMapping=Bo,this.toneMappingExposure=1;const S=this;let C=!1,P=0,A=0,L=null,k=-1,T=null;const N=new nn,z=new nn;let D=null;const B=new ot(0);let G=0,X=n.width,Z=n.height,F=1,q=null,K=null;const Q=new nn(0,0,X,Z),he=new nn(0,0,X,Z);let fe=!1;const J=new wg;let de=!1,be=!1;this.transmissionResolutionScale=1;const _e=new Tt,Xe=new Tt,at=new H,Ve=new nn,$e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ae=!1;function oe(){return L===null?F:1}let V=r;function Ie(j,re){return n.getContext(j,re)}try{const j={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${i_}`),n.addEventListener("webglcontextlost",Pe,!1),n.addEventListener("webglcontextrestored",We,!1),n.addEventListener("webglcontextcreationerror",Ze,!1),V===null){const re="webgl2";if(V=Ie(re,j),V===null)throw Ie(re)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(j){throw console.error("THREE.WebGLRenderer: "+j.message),j}let Re,De,ue,Ye,ke,$,U,ne,le,Te,ye,He,Ae,Ee,_t,Le,it,Oe,Ke,ge,ze,Qe,mt,ee;function Be(){Re=new _fe(V),Re.init(),Qe=new m8(V,Re),De=new mfe(V,Re,e,Qe),ue=new the(V,Re),De.reverseDepthBuffer&&h&&ue.buffers.depth.setReversed(!0),Ye=new Mfe(V),ke=new Vde,$=new nhe(V,Re,ue,ke,De,Qe,Ye),U=new yfe(S),ne=new bfe(S),le=new Ile(V),mt=new hfe(V,le),Te=new wfe(V,le,Ye,mt),ye=new Tfe(V,Te,le,Ye),Ke=new Efe(V,De,$),Le=new gfe(ke),He=new jde(S,U,ne,Re,De,mt,Le),Ae=new lhe(S,ke),Ee=new Wde,_t=new Kde(Re),Oe=new dfe(S,U,ne,ue,ye,m,l),it=new Qde(S,ye,De),ee=new che(V,Ye,De,ue),ge=new pfe(V,Re,Ye),ze=new Sfe(V,Re,Ye),Ye.programs=He.programs,S.capabilities=De,S.extensions=Re,S.properties=ke,S.renderLists=Ee,S.shadowMap=it,S.state=ue,S.info=Ye}Be();const ve=new ohe(S,V);this.xr=ve,this.getContext=function(){return V},this.getContextAttributes=function(){return V.getContextAttributes()},this.forceContextLoss=function(){const j=Re.get("WEBGL_lose_context");j&&j.loseContext()},this.forceContextRestore=function(){const j=Re.get("WEBGL_lose_context");j&&j.restoreContext()},this.getPixelRatio=function(){return F},this.setPixelRatio=function(j){j!==void 0&&(F=j,this.setSize(X,Z,!1))},this.getSize=function(j){return j.set(X,Z)},this.setSize=function(j,re,pe=!0){if(ve.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=j,Z=re,n.width=Math.floor(j*F),n.height=Math.floor(re*F),pe===!0&&(n.style.width=j+"px",n.style.height=re+"px"),this.setViewport(0,0,j,re)},this.getDrawingBufferSize=function(j){return j.set(X*F,Z*F).floor()},this.setDrawingBufferSize=function(j,re,pe){X=j,Z=re,F=pe,n.width=Math.floor(j*pe),n.height=Math.floor(re*pe),this.setViewport(0,0,j,re)},this.getCurrentViewport=function(j){return j.copy(N)},this.getViewport=function(j){return j.copy(Q)},this.setViewport=function(j,re,pe,me){j.isVector4?Q.set(j.x,j.y,j.z,j.w):Q.set(j,re,pe,me),ue.viewport(N.copy(Q).multiplyScalar(F).round())},this.getScissor=function(j){return j.copy(he)},this.setScissor=function(j,re,pe,me){j.isVector4?he.set(j.x,j.y,j.z,j.w):he.set(j,re,pe,me),ue.scissor(z.copy(he).multiplyScalar(F).round())},this.getScissorTest=function(){return fe},this.setScissorTest=function(j){ue.setScissorTest(fe=j)},this.setOpaqueSort=function(j){q=j},this.setTransparentSort=function(j){K=j},this.getClearColor=function(j){return j.copy(Oe.getClearColor())},this.setClearColor=function(){Oe.setClearColor.apply(Oe,arguments)},this.getClearAlpha=function(){return Oe.getClearAlpha()},this.setClearAlpha=function(){Oe.setClearAlpha.apply(Oe,arguments)},this.clear=function(j=!0,re=!0,pe=!0){let me=0;if(j){let ie=!1;if(L!==null){const Fe=L.texture.format;ie=Fe===u_||Fe===c_||Fe===vg}if(ie){const Fe=L.texture.type,et=Fe===$i||Fe===Ua||Fe===Nd||Fe===pu||Fe===a_||Fe===l_,ct=Oe.getClearColor(),ut=Oe.getClearAlpha(),St=ct.r,wt=ct.g,qe=ct.b;et?(y[0]=St,y[1]=wt,y[2]=qe,y[3]=ut,V.clearBufferuiv(V.COLOR,0,y)):(x[0]=St,x[1]=wt,x[2]=qe,x[3]=ut,V.clearBufferiv(V.COLOR,0,x))}else me|=V.COLOR_BUFFER_BIT}re&&(me|=V.DEPTH_BUFFER_BIT),pe&&(me|=V.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),V.clear(me)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",Pe,!1),n.removeEventListener("webglcontextrestored",We,!1),n.removeEventListener("webglcontextcreationerror",Ze,!1),Oe.dispose(),Ee.dispose(),_t.dispose(),ke.dispose(),U.dispose(),ne.dispose(),ye.dispose(),mt.dispose(),ee.dispose(),He.dispose(),ve.dispose(),ve.removeEventListener("sessionstart",Ug),ve.removeEventListener("sessionend",Bg),vo.stop()};function Pe(j){j.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),C=!0}function We(){console.log("THREE.WebGLRenderer: Context Restored."),C=!1;const j=Ye.autoReset,re=it.enabled,pe=it.autoUpdate,me=it.needsUpdate,ie=it.type;Be(),Ye.autoReset=j,it.enabled=re,it.autoUpdate=pe,it.needsUpdate=me,it.type=ie}function Ze(j){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",j.statusMessage)}function It(j){const re=j.target;re.removeEventListener("dispose",It),Cn(re)}function Cn(j){rr(j),ke.remove(j)}function rr(j){const re=ke.get(j).programs;re!==void 0&&(re.forEach(function(pe){He.releaseProgram(pe)}),j.isShaderMaterial&&He.releaseShaderCache(j))}this.renderBufferDirect=function(j,re,pe,me,ie,Fe){re===null&&(re=$e);const et=ie.isMesh&&ie.matrixWorld.determinant()<0,ct=mw(j,re,pe,me,ie);ue.setMaterial(me,et);let ut=pe.index,St=1;if(me.wireframe===!0){if(ut=Te.getWireframeAttribute(pe),ut===void 0)return;St=2}const wt=pe.drawRange,qe=pe.attributes.position;let gt=wt.start*St,Ht=(wt.start+wt.count)*St;Fe!==null&&(gt=Math.max(gt,Fe.start*St),Ht=Math.min(Ht,(Fe.start+Fe.count)*St)),ut!==null?(gt=Math.max(gt,0),Ht=Math.min(Ht,ut.count)):qe!=null&&(gt=Math.max(gt,0),Ht=Math.min(Ht,qe.count));const qt=Ht-gt;if(qt<0||qt===1/0)return;mt.setup(ie,me,ct,pe,ut);let Yt,Vt=ge;if(ut!==null&&(Yt=le.get(ut),Vt=ze,Vt.setIndex(Yt)),ie.isMesh)me.wireframe===!0?(ue.setLineWidth(me.wireframeLinewidth*oe()),Vt.setMode(V.LINES)):Vt.setMode(V.TRIANGLES);else if(ie.isLine){let yt=me.linewidth;yt===void 0&&(yt=1),ue.setLineWidth(yt*oe()),ie.isLineSegments?Vt.setMode(V.LINES):ie.isLineLoop?Vt.setMode(V.LINE_LOOP):Vt.setMode(V.LINE_STRIP)}else ie.isPoints?Vt.setMode(V.POINTS):ie.isSprite&&Vt.setMode(V.TRIANGLES);if(ie.isBatchedMesh)if(ie._multiDrawInstances!==null)Vt.renderMultiDrawInstances(ie._multiDrawStarts,ie._multiDrawCounts,ie._multiDrawCount,ie._multiDrawInstances);else if(Re.get("WEBGL_multi_draw"))Vt.renderMultiDraw(ie._multiDrawStarts,ie._multiDrawCounts,ie._multiDrawCount);else{const yt=ie._multiDrawStarts,ln=ie._multiDrawCounts,Qt=ie._multiDrawCount,vi=ut?le.get(ut).bytesPerElement:1,na=ke.get(me).currentProgram.getUniforms();for(let dr=0;dr{function Fe(){if(me.forEach(function(et){ke.get(et).currentProgram.isReady()&&me.delete(et)}),me.size===0){ie(j);return}setTimeout(Fe,10)}Re.get("KHR_parallel_shader_compile")!==null?Fe():setTimeout(Fe,10)})};let yi=null;function $s(j){yi&&yi(j)}function Ug(){vo.stop()}function Bg(){vo.start()}const vo=new u8;vo.setAnimationLoop($s),typeof self<"u"&&vo.setContext(self),this.setAnimationLoop=function(j){yi=j,ve.setAnimationLoop(j),j===null?vo.stop():vo.start()},ve.addEventListener("sessionstart",Ug),ve.addEventListener("sessionend",Bg),this.render=function(j,re){if(re!==void 0&&re.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(C===!0)return;if(j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),re.parent===null&&re.matrixWorldAutoUpdate===!0&&re.updateMatrixWorld(),ve.enabled===!0&&ve.isPresenting===!0&&(ve.cameraAutoUpdate===!0&&ve.updateCamera(re),re=ve.getCamera()),j.isScene===!0&&j.onBeforeRender(S,j,re,L),g=_t.get(j,_.length),g.init(re),_.push(g),Xe.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),J.setFromProjectionMatrix(Xe),be=this.localClippingEnabled,de=Le.init(this.clippingPlanes,be),v=Ee.get(j,b.length),v.init(),b.push(v),ve.enabled===!0&&ve.isPresenting===!0){const Fe=S.xr.getDepthSensingMesh();Fe!==null&&Jl(Fe,re,-1/0,S.sortObjects)}Jl(j,re,0,S.sortObjects),v.finish(),S.sortObjects===!0&&v.sort(q,K),ae=ve.enabled===!1||ve.isPresenting===!1||ve.hasDepthSensing()===!1,ae&&Oe.addToRenderList(v,j),this.info.render.frame++,de===!0&&Le.beginShadows();const pe=g.state.shadowsArray;it.render(pe,j,re),de===!0&&Le.endShadows(),this.info.autoReset===!0&&this.info.reset();const me=v.opaque,ie=v.transmissive;if(g.setupLights(),re.isArrayCamera){const Fe=re.cameras;if(ie.length>0)for(let et=0,ct=Fe.length;et0&&Ga(me,ie,j,re),ae&&Oe.render(j),jg(v,j,re);L!==null&&A===0&&($.updateMultisampleRenderTarget(L),$.updateRenderTargetMipmap(L)),j.isScene===!0&&j.onAfterRender(S,j,re),mt.resetDefaultState(),k=-1,T=null,_.pop(),_.length>0?(g=_[_.length-1],de===!0&&Le.setGlobalState(S.clippingPlanes,g.state.camera)):g=null,b.pop(),b.length>0?v=b[b.length-1]:v=null};function Jl(j,re,pe,me){if(j.visible===!1)return;if(j.layers.test(re.layers)){if(j.isGroup)pe=j.renderOrder;else if(j.isLOD)j.autoUpdate===!0&&j.update(re);else if(j.isLight)g.pushLight(j),j.castShadow&&g.pushShadow(j);else if(j.isSprite){if(!j.frustumCulled||J.intersectsSprite(j)){me&&Ve.setFromMatrixPosition(j.matrixWorld).applyMatrix4(Xe);const et=ye.update(j),ct=j.material;ct.visible&&v.push(j,et,ct,pe,Ve.z,null)}}else if((j.isMesh||j.isLine||j.isPoints)&&(!j.frustumCulled||J.intersectsObject(j))){const et=ye.update(j),ct=j.material;if(me&&(j.boundingSphere!==void 0?(j.boundingSphere===null&&j.computeBoundingSphere(),Ve.copy(j.boundingSphere.center)):(et.boundingSphere===null&&et.computeBoundingSphere(),Ve.copy(et.boundingSphere.center)),Ve.applyMatrix4(j.matrixWorld).applyMatrix4(Xe)),Array.isArray(ct)){const ut=et.groups;for(let St=0,wt=ut.length;St0&&Du(ie,re,pe),Fe.length>0&&Du(Fe,re,pe),et.length>0&&Du(et,re,pe),ue.buffers.depth.setTest(!0),ue.buffers.depth.setMask(!0),ue.buffers.color.setMask(!0),ue.setPolygonOffset(!1)}function Ga(j,re,pe,me){if((pe.isScene===!0?pe.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[me.id]===void 0&&(g.state.transmissionRenderTarget[me.id]=new Xo(1,1,{generateMipmaps:!0,type:Re.has("EXT_color_buffer_half_float")||Re.has("EXT_color_buffer_float")?Au:$i,minFilter:Lo,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:tn.workingColorSpace}));const Fe=g.state.transmissionRenderTarget[me.id],et=me.viewport||N;Fe.setSize(et.z*S.transmissionResolutionScale,et.w*S.transmissionResolutionScale);const ct=S.getRenderTarget();S.setRenderTarget(Fe),S.getClearColor(B),G=S.getClearAlpha(),G<1&&S.setClearColor(16777215,.5),S.clear(),ae&&Oe.render(pe);const ut=S.toneMapping;S.toneMapping=Bo;const St=me.viewport;if(me.viewport!==void 0&&(me.viewport=void 0),g.setupLightsView(me),de===!0&&Le.setGlobalState(S.clippingPlanes,me),Du(j,pe,me),$.updateMultisampleRenderTarget(Fe),$.updateRenderTargetMipmap(Fe),Re.has("WEBGL_multisampled_render_to_texture")===!1){let wt=!1;for(let qe=0,gt=re.length;qe0),qe=!!pe.morphAttributes.position,gt=!!pe.morphAttributes.normal,Ht=!!pe.morphAttributes.color;let qt=Bo;me.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(qt=S.toneMapping);const Yt=pe.morphAttributes.position||pe.morphAttributes.normal||pe.morphAttributes.color,Vt=Yt!==void 0?Yt.length:0,yt=ke.get(me),ln=g.state.lights;if(de===!0&&(be===!0||j!==T)){const Cr=j===T&&me.id===k;Le.setState(me,j,Cr)}let Qt=!1;me.version===yt.__version?(yt.needsLights&&yt.lightsStateVersion!==ln.state.version||yt.outputColorSpace!==ct||ie.isBatchedMesh&&yt.batching===!1||!ie.isBatchedMesh&&yt.batching===!0||ie.isBatchedMesh&&yt.batchingColor===!0&&ie.colorTexture===null||ie.isBatchedMesh&&yt.batchingColor===!1&&ie.colorTexture!==null||ie.isInstancedMesh&&yt.instancing===!1||!ie.isInstancedMesh&&yt.instancing===!0||ie.isSkinnedMesh&&yt.skinning===!1||!ie.isSkinnedMesh&&yt.skinning===!0||ie.isInstancedMesh&&yt.instancingColor===!0&&ie.instanceColor===null||ie.isInstancedMesh&&yt.instancingColor===!1&&ie.instanceColor!==null||ie.isInstancedMesh&&yt.instancingMorph===!0&&ie.morphTexture===null||ie.isInstancedMesh&&yt.instancingMorph===!1&&ie.morphTexture!==null||yt.envMap!==ut||me.fog===!0&&yt.fog!==Fe||yt.numClippingPlanes!==void 0&&(yt.numClippingPlanes!==Le.numPlanes||yt.numIntersection!==Le.numIntersection)||yt.vertexAlphas!==St||yt.vertexTangents!==wt||yt.morphTargets!==qe||yt.morphNormals!==gt||yt.morphColors!==Ht||yt.toneMapping!==qt||yt.morphTargetsCount!==Vt)&&(Qt=!0):(Qt=!0,yt.__version=me.version);let vi=yt.currentProgram;Qt===!0&&(vi=Fu(me,re,ie));let na=!1,dr=!1,Xa=!1;const Jt=vi.getUniforms(),xi=yt.uniforms;if(ue.useProgram(vi.program)&&(na=!0,dr=!0,Xa=!0),me.id!==k&&(k=me.id,dr=!0),na||T!==j){ue.buffers.depth.getReversed()?(_e.copy(j.projectionMatrix),Qse(_e),eoe(_e),Jt.setValue(V,"projectionMatrix",_e)):Jt.setValue(V,"projectionMatrix",j.projectionMatrix),Jt.setValue(V,"viewMatrix",j.matrixWorldInverse);const ir=Jt.map.cameraPosition;ir!==void 0&&ir.setValue(V,at.setFromMatrixPosition(j.matrixWorld)),De.logarithmicDepthBuffer&&Jt.setValue(V,"logDepthBufFC",2/(Math.log(j.far+1)/Math.LN2)),(me.isMeshPhongMaterial||me.isMeshToonMaterial||me.isMeshLambertMaterial||me.isMeshBasicMaterial||me.isMeshStandardMaterial||me.isShaderMaterial)&&Jt.setValue(V,"isOrthographic",j.isOrthographicCamera===!0),T!==j&&(T=j,dr=!0,Xa=!0)}if(ie.isSkinnedMesh){Jt.setOptional(V,ie,"bindMatrix"),Jt.setOptional(V,ie,"bindMatrixInverse");const Cr=ie.skeleton;Cr&&(Cr.boneTexture===null&&Cr.computeBoneTexture(),Jt.setValue(V,"boneTexture",Cr.boneTexture,$))}ie.isBatchedMesh&&(Jt.setOptional(V,ie,"batchingTexture"),Jt.setValue(V,"batchingTexture",ie._matricesTexture,$),Jt.setOptional(V,ie,"batchingIdTexture"),Jt.setValue(V,"batchingIdTexture",ie._indirectTexture,$),Jt.setOptional(V,ie,"batchingColorTexture"),ie._colorsTexture!==null&&Jt.setValue(V,"batchingColorTexture",ie._colorsTexture,$));const bi=pe.morphAttributes;if((bi.position!==void 0||bi.normal!==void 0||bi.color!==void 0)&&Ke.update(ie,pe,vi),(dr||yt.receiveShadow!==ie.receiveShadow)&&(yt.receiveShadow=ie.receiveShadow,Jt.setValue(V,"receiveShadow",ie.receiveShadow)),me.isMeshGouraudMaterial&&me.envMap!==null&&(xi.envMap.value=ut,xi.flipEnvMap.value=ut.isCubeTexture&&ut.isRenderTargetTexture===!1?-1:1),me.isMeshStandardMaterial&&me.envMap===null&&re.environment!==null&&(xi.envMapIntensity.value=re.environmentIntensity),dr&&(Jt.setValue(V,"toneMappingExposure",S.toneMappingExposure),yt.needsLights&&gw(xi,Xa),Fe&&me.fog===!0&&Ae.refreshFogUniforms(xi,Fe),Ae.refreshMaterialUniforms(xi,me,F,Z,g.state.transmissionRenderTarget[j.id]),$v.upload(V,$g(yt),xi,$)),me.isShaderMaterial&&me.uniformsNeedUpdate===!0&&($v.upload(V,$g(yt),xi,$),me.uniformsNeedUpdate=!1),me.isSpriteMaterial&&Jt.setValue(V,"center",ie.center),Jt.setValue(V,"modelViewMatrix",ie.modelViewMatrix),Jt.setValue(V,"normalMatrix",ie.normalMatrix),Jt.setValue(V,"modelMatrix",ie.matrixWorld),me.isShaderMaterial||me.isRawShaderMaterial){const Cr=me.uniformsGroups;for(let ir=0,qa=Cr.length;ir0&&$.useMultisampledRTT(j)===!1?ie=ke.get(j).__webglMultisampledFramebuffer:Array.isArray(wt)?ie=wt[pe]:ie=wt,N.copy(j.viewport),z.copy(j.scissor),D=j.scissorTest}else N.copy(Q).multiplyScalar(F).floor(),z.copy(he).multiplyScalar(F).floor(),D=fe;if(pe!==0&&(ie=yw),ue.bindFramebuffer(V.FRAMEBUFFER,ie)&&me&&ue.drawBuffers(j,ie),ue.viewport(N),ue.scissor(z),ue.setScissorTest(D),Fe){const ut=ke.get(j.texture);V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_CUBE_MAP_POSITIVE_X+re,ut.__webglTexture,pe)}else if(et){const ut=ke.get(j.texture),St=re;V.framebufferTextureLayer(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,ut.__webglTexture,pe,St)}else if(j!==null&&pe!==0){const ut=ke.get(j.texture);V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_2D,ut.__webglTexture,pe)}k=-1},this.readRenderTargetPixels=function(j,re,pe,me,ie,Fe,et){if(!(j&&j.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ct=ke.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&et!==void 0&&(ct=ct[et]),ct){ue.bindFramebuffer(V.FRAMEBUFFER,ct);try{const ut=j.texture,St=ut.format,wt=ut.type;if(!De.textureFormatReadable(St)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!De.textureTypeReadable(wt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=j.width-me&&pe>=0&&pe<=j.height-ie&&V.readPixels(re,pe,me,ie,Qe.convert(St),Qe.convert(wt),Fe)}finally{const ut=L!==null?ke.get(L).__webglFramebuffer:null;ue.bindFramebuffer(V.FRAMEBUFFER,ut)}}},this.readRenderTargetPixelsAsync=async function(j,re,pe,me,ie,Fe,et){if(!(j&&j.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ct=ke.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&et!==void 0&&(ct=ct[et]),ct){const ut=j.texture,St=ut.format,wt=ut.type;if(!De.textureFormatReadable(St))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!De.textureTypeReadable(wt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(re>=0&&re<=j.width-me&&pe>=0&&pe<=j.height-ie){ue.bindFramebuffer(V.FRAMEBUFFER,ct);const qe=V.createBuffer();V.bindBuffer(V.PIXEL_PACK_BUFFER,qe),V.bufferData(V.PIXEL_PACK_BUFFER,Fe.byteLength,V.STREAM_READ),V.readPixels(re,pe,me,ie,Qe.convert(St),Qe.convert(wt),0);const gt=L!==null?ke.get(L).__webglFramebuffer:null;ue.bindFramebuffer(V.FRAMEBUFFER,gt);const Ht=V.fenceSync(V.SYNC_GPU_COMMANDS_COMPLETE,0);return V.flush(),await Jse(V,Ht,4),V.bindBuffer(V.PIXEL_PACK_BUFFER,qe),V.getBufferSubData(V.PIXEL_PACK_BUFFER,0,Fe),V.deleteBuffer(qe),V.deleteSync(Ht),Fe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(j,re=null,pe=0){j.isTexture!==!0&&(Nf("WebGLRenderer: copyFramebufferToTexture function signature has changed."),re=arguments[0]||null,j=arguments[1]);const me=Math.pow(2,-pe),ie=Math.floor(j.image.width*me),Fe=Math.floor(j.image.height*me),et=re!==null?re.x:0,ct=re!==null?re.y:0;$.setTexture2D(j,0),V.copyTexSubImage2D(V.TEXTURE_2D,pe,0,0,et,ct,ie,Fe),ue.unbindTexture()};const vw=V.createFramebuffer(),xw=V.createFramebuffer();this.copyTextureToTexture=function(j,re,pe=null,me=null,ie=0,Fe=null){j.isTexture!==!0&&(Nf("WebGLRenderer: copyTextureToTexture function signature has changed."),me=arguments[0]||null,j=arguments[1],re=arguments[2],Fe=arguments[3]||0,pe=null),Fe===null&&(ie!==0?(Nf("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Fe=ie,ie=0):Fe=0);let et,ct,ut,St,wt,qe,gt,Ht,qt;const Yt=j.isCompressedTexture?j.mipmaps[Fe]:j.image;if(pe!==null)et=pe.max.x-pe.min.x,ct=pe.max.y-pe.min.y,ut=pe.isBox3?pe.max.z-pe.min.z:1,St=pe.min.x,wt=pe.min.y,qe=pe.isBox3?pe.min.z:0;else{const bi=Math.pow(2,-ie);et=Math.floor(Yt.width*bi),ct=Math.floor(Yt.height*bi),j.isDataArrayTexture?ut=Yt.depth:j.isData3DTexture?ut=Math.floor(Yt.depth*bi):ut=1,St=0,wt=0,qe=0}me!==null?(gt=me.x,Ht=me.y,qt=me.z):(gt=0,Ht=0,qt=0);const Vt=Qe.convert(re.format),yt=Qe.convert(re.type);let ln;re.isData3DTexture?($.setTexture3D(re,0),ln=V.TEXTURE_3D):re.isDataArrayTexture||re.isCompressedArrayTexture?($.setTexture2DArray(re,0),ln=V.TEXTURE_2D_ARRAY):($.setTexture2D(re,0),ln=V.TEXTURE_2D),V.pixelStorei(V.UNPACK_FLIP_Y_WEBGL,re.flipY),V.pixelStorei(V.UNPACK_PREMULTIPLY_ALPHA_WEBGL,re.premultiplyAlpha),V.pixelStorei(V.UNPACK_ALIGNMENT,re.unpackAlignment);const Qt=V.getParameter(V.UNPACK_ROW_LENGTH),vi=V.getParameter(V.UNPACK_IMAGE_HEIGHT),na=V.getParameter(V.UNPACK_SKIP_PIXELS),dr=V.getParameter(V.UNPACK_SKIP_ROWS),Xa=V.getParameter(V.UNPACK_SKIP_IMAGES);V.pixelStorei(V.UNPACK_ROW_LENGTH,Yt.width),V.pixelStorei(V.UNPACK_IMAGE_HEIGHT,Yt.height),V.pixelStorei(V.UNPACK_SKIP_PIXELS,St),V.pixelStorei(V.UNPACK_SKIP_ROWS,wt),V.pixelStorei(V.UNPACK_SKIP_IMAGES,qe);const Jt=j.isDataArrayTexture||j.isData3DTexture,xi=re.isDataArrayTexture||re.isData3DTexture;if(j.isDepthTexture){const bi=ke.get(j),Cr=ke.get(re),ir=ke.get(bi.__renderTarget),qa=ke.get(Cr.__renderTarget);ue.bindFramebuffer(V.READ_FRAMEBUFFER,ir.__webglFramebuffer),ue.bindFramebuffer(V.DRAW_FRAMEBUFFER,qa.__webglFramebuffer);for(let Hi=0;Hi{const f=typeof c=="function"?c(e):c;if(f!==e){const h=e;e=u?f:Object.assign({},e,f),n.forEach(m=>m(e,h))}},i=()=>e,s=(c,u=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=u(e);function m(){const y=u(e);if(!f(h,y)){const x=h;c(h=y,x)}}return n.add(m),()=>n.delete(m)},l={setState:r,getState:i,subscribe:(c,u,f)=>u||f?s(c,u,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const ihe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),LL=ihe?R.useEffect:R.useLayoutEffect;function she(t){const e=typeof t=="function"?rhe(t):t,n=(r=e.getState,i=Object.is)=>{const[,s]=R.useReducer(v=>v+1,0),o=e.getState(),a=R.useRef(o),l=R.useRef(r),c=R.useRef(i),u=R.useRef(!1),f=R.useRef();f.current===void 0&&(f.current=r(o));let h,m=!1;(a.current!==o||l.current!==r||c.current!==i||u.current)&&(h=r(o),m=!i(f.current,h)),LL(()=>{m&&(f.current=h),a.current=o,l.current=r,c.current=i,u.current=!1});const y=R.useRef(o);LL(()=>{const v=()=>{try{const b=e.getState(),_=l.current(b);c.current(f.current,_)||(a.current=b,f.current=_,s())}catch{u.current=!0,s()}},g=e.subscribe(v);return e.getState()!==y.current&&v(),g},[]);const x=m?h:f.current;return R.useDebugValue(x),x};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var m8={exports:{}},g8={exports:{}},y8={};/** + */ku.ConcurrentRoot=1;ku.ContinuousEventPriority=4;ku.DefaultEventPriority=16;ku.DiscreteEventPriority=1;ku.IdleEventPriority=536870912;ku.LegacyRoot=0;y8.exports=ku;var ed=y8.exports;function fhe(t){let e;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(e):c;if(f!==e){const h=e;e=u?f:Object.assign({},e,f),n.forEach(m=>m(e,h))}},i=()=>e,s=(c,u=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=u(e);function m(){const y=u(e);if(!f(h,y)){const x=h;c(h=y,x)}}return n.add(m),()=>n.delete(m)},l={setState:r,getState:i,subscribe:(c,u,f)=>u||f?s(c,u,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const dhe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),LL=dhe?R.useEffect:R.useLayoutEffect;function hhe(t){const e=typeof t=="function"?fhe(t):t,n=(r=e.getState,i=Object.is)=>{const[,s]=R.useReducer(v=>v+1,0),o=e.getState(),a=R.useRef(o),l=R.useRef(r),c=R.useRef(i),u=R.useRef(!1),f=R.useRef();f.current===void 0&&(f.current=r(o));let h,m=!1;(a.current!==o||l.current!==r||c.current!==i||u.current)&&(h=r(o),m=!i(f.current,h)),LL(()=>{m&&(f.current=h),a.current=o,l.current=r,c.current=i,u.current=!1});const y=R.useRef(o);LL(()=>{const v=()=>{try{const b=e.getState(),_=l.current(b);c.current(f.current,_)||(a.current=b,f.current=_,s())}catch{u.current=!0,s()}},g=e.subscribe(v);return e.getState()!==y.current&&v(),g},[]);const x=m?h:f.current;return R.useDebugValue(x),x};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var v8={exports:{}},x8={exports:{}},b8={};/** * @license React * scheduler.production.min.js * @@ -4022,7 +4022,7 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(F,q){var K=F.length;F.push(q);e:for(;0>>1,he=F[Q];if(0>>1;Qi(de,K))bei(_e,de)?(F[Q]=_e,F[be]=K,Q=be):(F[Q]=de,F[J]=K,Q=J);else if(bei(_e,K))F[Q]=_e,F[be]=K,Q=be;else break e}}return q}function i(F,q){var K=F.sortIndex-q.sortIndex;return K!==0?K:F.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(F){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=F)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(F){if(x=!1,_(F),!y)if(n(l)!==null)y=!0,X(C);else{var q=n(c);q!==null&&Z(S,q.startTime-F)}}function C(F,q){y=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(q),f=n(l);f!==null&&(!(f.expirationTime>q)||F&&!N());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,h=f.priorityLevel;var he=Q(f.expirationTime<=q);q=t.unstable_now(),typeof he=="function"?f.callback=he:f===n(l)&&r(l),_(q)}else r(l);f=n(l)}if(f!==null)var fe=!0;else{var J=n(c);J!==null&&Z(S,J.startTime-q),fe=!1}return fe}finally{f=null,h=K,m=!1}}var P=!1,A=null,L=-1,k=5,T=-1;function N(){return!(t.unstable_now()-TF||125Q?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-Q))):(F.sortIndex=he,e(l,F),y||m||(y=!0,X(C))),F},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(F){var q=h;return function(){var K=h;h=q;try{return F.apply(this,arguments)}finally{h=K}}}})(y8);g8.exports=y8;var NT=g8.exports;/** + */(function(t){function e(F,q){var K=F.length;F.push(q);e:for(;0>>1,he=F[Q];if(0>>1;Qi(de,K))bei(_e,de)?(F[Q]=_e,F[be]=K,Q=be):(F[Q]=de,F[J]=K,Q=J);else if(bei(_e,K))F[Q]=_e,F[be]=K,Q=be;else break e}}return q}function i(F,q){var K=F.sortIndex-q.sortIndex;return K!==0?K:F.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(F){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=F)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(F){if(x=!1,_(F),!y)if(n(l)!==null)y=!0,X(C);else{var q=n(c);q!==null&&Z(S,q.startTime-F)}}function C(F,q){y=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(q),f=n(l);f!==null&&(!(f.expirationTime>q)||F&&!N());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,h=f.priorityLevel;var he=Q(f.expirationTime<=q);q=t.unstable_now(),typeof he=="function"?f.callback=he:f===n(l)&&r(l),_(q)}else r(l);f=n(l)}if(f!==null)var fe=!0;else{var J=n(c);J!==null&&Z(S,J.startTime-q),fe=!1}return fe}finally{f=null,h=K,m=!1}}var P=!1,A=null,L=-1,k=5,T=-1;function N(){return!(t.unstable_now()-TF||125Q?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-Q))):(F.sortIndex=he,e(l,F),y||m||(y=!0,X(C))),F},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(F){var q=h;return function(){var K=h;h=q;try{return F.apply(this,arguments)}finally{h=K}}}})(b8);x8.exports=b8;var IT=x8.exports;/** * @license React * react-reconciler.production.min.js * @@ -4030,21 +4030,21 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ohe=function(e){var n={},r=R,i=NT,s=Object.assign;function o(d){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+d,w=1;wte||I[Y]!==O[te]){var Me=` -`+I[Y].replace(" at new "," at ");return d.displayName&&Me.includes("")&&(Me=Me.replace("",d.displayName)),Me}while(1<=Y&&0<=te);break}}}finally{Fe=!1,Error.prepareStackTrace=w}return(d=d?d.displayName||d.name:"")?ie(d):""}var ct=Object.prototype.hasOwnProperty,ut=[],St=-1;function wt(d){return{current:d}}function qe(d){0>St||(d.current=ut[St],ut[St]=null,St--)}function gt(d,p){St++,ut[St]=d.current,d.current=p}var Ht={},qt=wt(Ht),Yt=wt(!1),Vt=Ht;function yt(d,p){var w=d.type.contextTypes;if(!w)return Ht;var M=d.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===p)return M.__reactInternalMemoizedMaskedChildContext;var I={},O;for(O in w)I[O]=p[O];return M&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=p,d.__reactInternalMemoizedMaskedChildContext=I),I}function ln(d){return d=d.childContextTypes,d!=null}function Qt(){qe(Yt),qe(qt)}function vi(d,p,w){if(qt.current!==Ht)throw Error(o(168));gt(qt,p),gt(Yt,w)}function na(d,p,w){var M=d.stateNode;if(p=p.childContextTypes,typeof M.getChildContext!="function")return w;M=M.getChildContext();for(var I in M)if(!(I in p))throw Error(o(108,L(d)||"Unknown",I));return s({},w,M)}function dr(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ht,Vt=qt.current,gt(qt,d),gt(Yt,Yt.current),!0}function Xa(d,p,w){var M=d.stateNode;if(!M)throw Error(o(169));w?(d=na(d,p,Vt),M.__reactInternalMemoizedMergedChildContext=d,qe(Yt),qe(qt),gt(qt,d)):qe(Yt),gt(Yt,w)}var Jt=Math.clz32?Math.clz32:Cr,xi=Math.log,bi=Math.LN2;function Cr(d){return d>>>=0,d===0?32:31-(xi(d)/bi|0)|0}var ir=64,qa=4194304;function Hi(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Gg(d,p){var w=d.pendingLanes;if(w===0)return 0;var M=0,I=d.suspendedLanes,O=d.pingedLanes,Y=w&268435455;if(Y!==0){var te=Y&~I;te!==0?M=Hi(te):(O&=Y,O!==0&&(M=Hi(O)))}else Y=w&~I,Y!==0?M=Hi(Y):O!==0&&(M=Hi(O));if(M===0)return 0;if(p!==0&&p!==M&&!(p&I)&&(I=M&-M,O=p&-p,I>=O||I===16&&(O&4194240)!==0))return p;if(M&4&&(M|=w&16),p=d.entangledLanes,p!==0)for(d=d.entanglements,p&=M;0w;w++)p.push(d);return p}function mh(d,p,w){d.pendingLanes|=p,p!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,p=31-Jt(p),d[p]=w}function V7(d,p){var w=d.pendingLanes&~p;d.pendingLanes=p,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=p,d.mutableReadLanes&=p,d.entangledLanes&=p,p=d.entanglements;var M=d.eventTimes;for(d=d.expirationTimes;0>=Y,I-=Y,sa=1<<32-Jt(p)+I|w<un?(mr=Lt,Lt=null):mr=Lt.sibling;var fn=Mt(ce,Lt,xe[un],st);if(fn===null){Lt===null&&(Lt=mr);break}d&&Lt&&fn.alternate===null&&p(ce,Lt),se=O(fn,se,un),$t===null?vt=fn:$t.sibling=fn,$t=fn,Lt=mr}if(un===xe.length)return w(ce,Lt),Rn&&ec(ce,un),vt;if(Lt===null){for(;unun?(mr=Lt,Lt=null):mr=Lt.sibling;var nl=Mt(ce,Lt,fn.value,st);if(nl===null){Lt===null&&(Lt=mr);break}d&&Lt&&nl.alternate===null&&p(ce,Lt),se=O(nl,se,un),$t===null?vt=nl:$t.sibling=nl,$t=nl,Lt=mr}if(fn.done)return w(ce,Lt),Rn&&ec(ce,un),vt;if(Lt===null){for(;!fn.done;un++,fn=xe.next())fn=kt(ce,fn.value,st),fn!==null&&(se=O(fn,se,un),$t===null?vt=fn:$t.sibling=fn,$t=fn);return Rn&&ec(ce,un),vt}for(Lt=M(ce,Lt);!fn.done;un++,fn=xe.next())fn=bn(Lt,ce,un,fn.value,st),fn!==null&&(d&&fn.alternate!==null&&Lt.delete(fn.key===null?un:fn.key),se=O(fn,se,un),$t===null?vt=fn:$t.sibling=fn,$t=fn);return d&&Lt.forEach(function(Cj){return p(ce,Cj)}),Rn&&ec(ce,un),vt}function ws(ce,se,xe,st){if(typeof xe=="object"&&xe!==null&&xe.type===u&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case l:e:{for(var vt=xe.key,$t=se;$t!==null;){if($t.key===vt){if(vt=xe.type,vt===u){if($t.tag===7){w(ce,$t.sibling),se=I($t,xe.props.children),se.return=ce,ce=se;break e}}else if($t.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===_&&ZP(vt)===$t.type){w(ce,$t.sibling),se=I($t,xe.props),se.ref=vh(ce,$t,xe),se.return=ce,ce=se;break e}w(ce,$t);break}else p(ce,$t);$t=$t.sibling}xe.type===u?(se=ac(xe.props.children,ce.mode,st,xe.key),se.return=ce,ce=se):(st=L0(xe.type,xe.key,xe.props,null,ce.mode,st),st.ref=vh(ce,se,xe),st.return=ce,ce=st)}return Y(ce);case c:e:{for($t=xe.key;se!==null;){if(se.key===$t)if(se.tag===4&&se.stateNode.containerInfo===xe.containerInfo&&se.stateNode.implementation===xe.implementation){w(ce,se.sibling),se=I(se,xe.children||[]),se.return=ce,ce=se;break e}else{w(ce,se);break}else p(ce,se);se=se.sibling}se=wS(xe,ce.mode,st),se.return=ce,ce=se}return Y(ce);case _:return $t=xe._init,ws(ce,se,$t(xe._payload),st)}if(G(xe))return xt(ce,se,xe,st);if(P(xe))return Ur(ce,se,xe,st);r0(ce,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"?(xe=""+xe,se!==null&&se.tag===6?(w(ce,se.sibling),se=I(se,xe),se.return=ce,ce=se):(w(ce,se),se=_S(xe,ce.mode,st),se.return=ce,ce=se),Y(ce)):w(ce,se)}return ws}var $u=JP(!0),QP=JP(!1),xh={},vs=wt(xh),bh=wt(xh),Wu=wt(xh);function So(d){if(d===xh)throw Error(o(174));return d}function Uw(d,p){gt(Wu,p),gt(bh,d),gt(vs,xh),d=Z(p),qe(vs),gt(vs,d)}function Hu(){qe(vs),qe(bh),qe(Wu)}function e3(d){var p=So(Wu.current),w=So(vs.current);p=F(w,d.type,p),w!==p&&(gt(bh,d),gt(vs,p))}function Bw(d){bh.current===d&&(qe(vs),qe(bh))}var Nn=wt(0);function i0(d){for(var p=d;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||vo(w)||Jl(w)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var jw=[];function Vw(){for(var d=0;dw?w:4,d(!0);var M=xs.transition;xs.transition={};try{d(!1),p()}finally{cn=w,xs.transition=M}}function p3(){return Mo().memoizedState}function ej(d,p,w){var M=Qa(d);w={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null},m3(d)?g3(p,w):(y3(d,p,w),w=ei(),d=bs(d,M,w),d!==null&&v3(d,p,M))}function tj(d,p,w){var M=Qa(d),I={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null};if(m3(d))g3(p,I);else{y3(d,p,I);var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=p.lastRenderedReducer,O!==null))try{var Y=p.lastRenderedState,te=O(Y,w);if(I.hasEagerState=!0,I.eagerState=te,bo(te,Y))return}catch{}finally{}w=ei(),d=bs(d,M,w),d!==null&&v3(d,p,M)}}function m3(d){var p=d.alternate;return d===Un||p!==null&&p===Un}function g3(d,p){_h=o0=!0;var w=d.pending;w===null?p.next=p:(p.next=w.next,w.next=p),d.pending=p}function y3(d,p,w){Zn!==null&&d.mode&1&&!(Gt&2)?(d=p.interleaved,d===null?(w.next=w,wo===null?wo=[p]:wo.push(p)):(w.next=d.next,d.next=w),p.interleaved=w):(d=p.pending,d===null?w.next=w:(w.next=d.next,d.next=w),p.pending=w)}function v3(d,p,w){if(w&4194240){var M=p.lanes;M&=d.pendingLanes,w|=M,p.lanes=w,ww(d,w)}}var f0={readContext:ms,useCallback:Fr,useContext:Fr,useEffect:Fr,useImperativeHandle:Fr,useInsertionEffect:Fr,useLayoutEffect:Fr,useMemo:Fr,useReducer:Fr,useRef:Fr,useState:Fr,useDebugValue:Fr,useDeferredValue:Fr,useTransition:Fr,useMutableSource:Fr,useSyncExternalStore:Fr,useId:Fr,unstable_isNewReconciler:!1},nj={readContext:ms,useCallback:function(d,p){return aa().memoizedState=[d,p===void 0?null:p],d},useContext:ms,useEffect:Xw,useImperativeHandle:function(d,p,w){return w=w!=null?w.concat([d]):null,c0(4194308,4,u3.bind(null,p,d),w)},useLayoutEffect:function(d,p){return c0(4194308,4,d,p)},useInsertionEffect:function(d,p){return c0(4,2,d,p)},useMemo:function(d,p){var w=aa();return p=p===void 0?null:p,d=d(),w.memoizedState=[d,p],d},useReducer:function(d,p,w){var M=aa();return p=w!==void 0?w(p):p,M.memoizedState=M.baseState=p,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:p},M.queue=d,d=d.dispatch=ej.bind(null,Un,d),[M.memoizedState,d]},useRef:function(d){var p=aa();return d={current:d},p.memoizedState=d},useState:Gw,useDebugValue:qw,useDeferredValue:function(d){var p=Gw(d),w=p[0],M=p[1];return Xw(function(){var I=xs.transition;xs.transition={};try{M(d)}finally{xs.transition=I}},[d]),w},useTransition:function(){var d=Gw(!1),p=d[0];return d=Q7.bind(null,d[1]),aa().memoizedState=d,[p,d]},useMutableSource:function(){},useSyncExternalStore:function(d,p,w){var M=Un,I=aa();if(Rn){if(w===void 0)throw Error(o(407));w=w()}else{if(w=p(),Zn===null)throw Error(o(349));Gu&30||r3(M,p,w)}I.memoizedState=w;var O={value:w,getSnapshot:p};return I.queue=O,Xw(s3.bind(null,M,O,d),[d]),M.flags|=2048,Sh(9,i3.bind(null,M,O,w,p),void 0,null),w},useId:function(){var d=aa(),p=Zn.identifierPrefix;if(Rn){var w=oa,M=sa;w=(M&~(1<<32-Jt(M)-1)).toString(32)+w,p=":"+p+"R"+w,w=wh++,0")&&(Me=Me.replace("",d.displayName)),Me}while(1<=Y&&0<=te);break}}}finally{Fe=!1,Error.prepareStackTrace=w}return(d=d?d.displayName||d.name:"")?ie(d):""}var ct=Object.prototype.hasOwnProperty,ut=[],St=-1;function wt(d){return{current:d}}function qe(d){0>St||(d.current=ut[St],ut[St]=null,St--)}function gt(d,p){St++,ut[St]=d.current,d.current=p}var Ht={},qt=wt(Ht),Yt=wt(!1),Vt=Ht;function yt(d,p){var w=d.type.contextTypes;if(!w)return Ht;var M=d.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===p)return M.__reactInternalMemoizedMaskedChildContext;var I={},O;for(O in w)I[O]=p[O];return M&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=p,d.__reactInternalMemoizedMaskedChildContext=I),I}function ln(d){return d=d.childContextTypes,d!=null}function Qt(){qe(Yt),qe(qt)}function vi(d,p,w){if(qt.current!==Ht)throw Error(o(168));gt(qt,p),gt(Yt,w)}function na(d,p,w){var M=d.stateNode;if(p=p.childContextTypes,typeof M.getChildContext!="function")return w;M=M.getChildContext();for(var I in M)if(!(I in p))throw Error(o(108,L(d)||"Unknown",I));return s({},w,M)}function dr(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ht,Vt=qt.current,gt(qt,d),gt(Yt,Yt.current),!0}function Xa(d,p,w){var M=d.stateNode;if(!M)throw Error(o(169));w?(d=na(d,p,Vt),M.__reactInternalMemoizedMergedChildContext=d,qe(Yt),qe(qt),gt(qt,d)):qe(Yt),gt(Yt,w)}var Jt=Math.clz32?Math.clz32:Cr,xi=Math.log,bi=Math.LN2;function Cr(d){return d>>>=0,d===0?32:31-(xi(d)/bi|0)|0}var ir=64,qa=4194304;function Hi(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Gg(d,p){var w=d.pendingLanes;if(w===0)return 0;var M=0,I=d.suspendedLanes,O=d.pingedLanes,Y=w&268435455;if(Y!==0){var te=Y&~I;te!==0?M=Hi(te):(O&=Y,O!==0&&(M=Hi(O)))}else Y=w&~I,Y!==0?M=Hi(Y):O!==0&&(M=Hi(O));if(M===0)return 0;if(p!==0&&p!==M&&!(p&I)&&(I=M&-M,O=p&-p,I>=O||I===16&&(O&4194240)!==0))return p;if(M&4&&(M|=w&16),p=d.entangledLanes,p!==0)for(d=d.entanglements,p&=M;0w;w++)p.push(d);return p}function gh(d,p,w){d.pendingLanes|=p,p!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,p=31-Jt(p),d[p]=w}function G7(d,p){var w=d.pendingLanes&~p;d.pendingLanes=p,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=p,d.mutableReadLanes&=p,d.entangledLanes&=p,p=d.entanglements;var M=d.eventTimes;for(d=d.expirationTimes;0>=Y,I-=Y,sa=1<<32-Jt(p)+I|w<un?(mr=Lt,Lt=null):mr=Lt.sibling;var fn=Mt(ce,Lt,xe[un],st);if(fn===null){Lt===null&&(Lt=mr);break}d&&Lt&&fn.alternate===null&&p(ce,Lt),se=O(fn,se,un),$t===null?vt=fn:$t.sibling=fn,$t=fn,Lt=mr}if(un===xe.length)return w(ce,Lt),Rn&&ec(ce,un),vt;if(Lt===null){for(;unun?(mr=Lt,Lt=null):mr=Lt.sibling;var nl=Mt(ce,Lt,fn.value,st);if(nl===null){Lt===null&&(Lt=mr);break}d&&Lt&&nl.alternate===null&&p(ce,Lt),se=O(nl,se,un),$t===null?vt=nl:$t.sibling=nl,$t=nl,Lt=mr}if(fn.done)return w(ce,Lt),Rn&&ec(ce,un),vt;if(Lt===null){for(;!fn.done;un++,fn=xe.next())fn=kt(ce,fn.value,st),fn!==null&&(se=O(fn,se,un),$t===null?vt=fn:$t.sibling=fn,$t=fn);return Rn&&ec(ce,un),vt}for(Lt=M(ce,Lt);!fn.done;un++,fn=xe.next())fn=bn(Lt,ce,un,fn.value,st),fn!==null&&(d&&fn.alternate!==null&&Lt.delete(fn.key===null?un:fn.key),se=O(fn,se,un),$t===null?vt=fn:$t.sibling=fn,$t=fn);return d&&Lt.forEach(function(Ij){return p(ce,Ij)}),Rn&&ec(ce,un),vt}function ws(ce,se,xe,st){if(typeof xe=="object"&&xe!==null&&xe.type===u&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case l:e:{for(var vt=xe.key,$t=se;$t!==null;){if($t.key===vt){if(vt=xe.type,vt===u){if($t.tag===7){w(ce,$t.sibling),se=I($t,xe.props.children),se.return=ce,ce=se;break e}}else if($t.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===_&&YP(vt)===$t.type){w(ce,$t.sibling),se=I($t,xe.props),se.ref=xh(ce,$t,xe),se.return=ce,ce=se;break e}w(ce,$t);break}else p(ce,$t);$t=$t.sibling}xe.type===u?(se=ac(xe.props.children,ce.mode,st,xe.key),se.return=ce,ce=se):(st=L0(xe.type,xe.key,xe.props,null,ce.mode,st),st.ref=xh(ce,se,xe),st.return=ce,ce=st)}return Y(ce);case c:e:{for($t=xe.key;se!==null;){if(se.key===$t)if(se.tag===4&&se.stateNode.containerInfo===xe.containerInfo&&se.stateNode.implementation===xe.implementation){w(ce,se.sibling),se=I(se,xe.children||[]),se.return=ce,ce=se;break e}else{w(ce,se);break}else p(ce,se);se=se.sibling}se=wS(xe,ce.mode,st),se.return=ce,ce=se}return Y(ce);case _:return $t=xe._init,ws(ce,se,$t(xe._payload),st)}if(G(xe))return xt(ce,se,xe,st);if(P(xe))return Ur(ce,se,xe,st);r0(ce,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"?(xe=""+xe,se!==null&&se.tag===6?(w(ce,se.sibling),se=I(se,xe),se.return=ce,ce=se):(w(ce,se),se=_S(xe,ce.mode,st),se.return=ce,ce=se),Y(ce)):w(ce,se)}return ws}var $u=KP(!0),ZP=KP(!1),bh={},vs=wt(bh),_h=wt(bh),Wu=wt(bh);function So(d){if(d===bh)throw Error(o(174));return d}function Uw(d,p){gt(Wu,p),gt(_h,d),gt(vs,bh),d=Z(p),qe(vs),gt(vs,d)}function Hu(){qe(vs),qe(_h),qe(Wu)}function JP(d){var p=So(Wu.current),w=So(vs.current);p=F(w,d.type,p),w!==p&&(gt(_h,d),gt(vs,p))}function Bw(d){_h.current===d&&(qe(vs),qe(_h))}var kn=wt(0);function i0(d){for(var p=d;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||vo(w)||Jl(w)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var jw=[];function Vw(){for(var d=0;dw?w:4,d(!0);var M=xs.transition;xs.transition={};try{d(!1),p()}finally{cn=w,xs.transition=M}}function d3(){return Mo().memoizedState}function ij(d,p,w){var M=Qa(d);w={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null},h3(d)?p3(p,w):(m3(d,p,w),w=ei(),d=bs(d,M,w),d!==null&&g3(d,p,M))}function sj(d,p,w){var M=Qa(d),I={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null};if(h3(d))p3(p,I);else{m3(d,p,I);var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=p.lastRenderedReducer,O!==null))try{var Y=p.lastRenderedState,te=O(Y,w);if(I.hasEagerState=!0,I.eagerState=te,bo(te,Y))return}catch{}finally{}w=ei(),d=bs(d,M,w),d!==null&&g3(d,p,M)}}function h3(d){var p=d.alternate;return d===Un||p!==null&&p===Un}function p3(d,p){wh=o0=!0;var w=d.pending;w===null?p.next=p:(p.next=w.next,w.next=p),d.pending=p}function m3(d,p,w){Zn!==null&&d.mode&1&&!(Gt&2)?(d=p.interleaved,d===null?(w.next=w,wo===null?wo=[p]:wo.push(p)):(w.next=d.next,d.next=w),p.interleaved=w):(d=p.pending,d===null?w.next=w:(w.next=d.next,d.next=w),p.pending=w)}function g3(d,p,w){if(w&4194240){var M=p.lanes;M&=d.pendingLanes,w|=M,p.lanes=w,ww(d,w)}}var f0={readContext:ms,useCallback:Fr,useContext:Fr,useEffect:Fr,useImperativeHandle:Fr,useInsertionEffect:Fr,useLayoutEffect:Fr,useMemo:Fr,useReducer:Fr,useRef:Fr,useState:Fr,useDebugValue:Fr,useDeferredValue:Fr,useTransition:Fr,useMutableSource:Fr,useSyncExternalStore:Fr,useId:Fr,unstable_isNewReconciler:!1},oj={readContext:ms,useCallback:function(d,p){return aa().memoizedState=[d,p===void 0?null:p],d},useContext:ms,useEffect:Xw,useImperativeHandle:function(d,p,w){return w=w!=null?w.concat([d]):null,c0(4194308,4,l3.bind(null,p,d),w)},useLayoutEffect:function(d,p){return c0(4194308,4,d,p)},useInsertionEffect:function(d,p){return c0(4,2,d,p)},useMemo:function(d,p){var w=aa();return p=p===void 0?null:p,d=d(),w.memoizedState=[d,p],d},useReducer:function(d,p,w){var M=aa();return p=w!==void 0?w(p):p,M.memoizedState=M.baseState=p,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:p},M.queue=d,d=d.dispatch=ij.bind(null,Un,d),[M.memoizedState,d]},useRef:function(d){var p=aa();return d={current:d},p.memoizedState=d},useState:Gw,useDebugValue:qw,useDeferredValue:function(d){var p=Gw(d),w=p[0],M=p[1];return Xw(function(){var I=xs.transition;xs.transition={};try{M(d)}finally{xs.transition=I}},[d]),w},useTransition:function(){var d=Gw(!1),p=d[0];return d=rj.bind(null,d[1]),aa().memoizedState=d,[p,d]},useMutableSource:function(){},useSyncExternalStore:function(d,p,w){var M=Un,I=aa();if(Rn){if(w===void 0)throw Error(o(407));w=w()}else{if(w=p(),Zn===null)throw Error(o(349));Gu&30||t3(M,p,w)}I.memoizedState=w;var O={value:w,getSnapshot:p};return I.queue=O,Xw(r3.bind(null,M,O,d),[d]),M.flags|=2048,Mh(9,n3.bind(null,M,O,w,p),void 0,null),w},useId:function(){var d=aa(),p=Zn.identifierPrefix;if(Rn){var w=oa,M=sa;w=(M&~(1<<32-Jt(M)-1)).toString(32)+w,p=":"+p+"R"+w,w=Sh++,0hS&&(p.flags|=128,M=!0,Ch(I,!1),p.lanes=4194304)}else{if(!M)if(d=i0(O),d!==null){if(p.flags|=128,M=!0,d=d.updateQueue,d!==null&&(p.updateQueue=d,p.flags|=4),Ch(I,!0),I.tail===null&&I.tailMode==="hidden"&&!O.alternate&&!Rn)return zr(p),null}else 2*hr()-I.renderingStartTime>hS&&w!==1073741824&&(p.flags|=128,M=!0,Ch(I,!1),p.lanes=4194304);I.isBackwards?(O.sibling=p.child,p.child=O):(d=I.last,d!==null?d.sibling=O:p.child=O,I.last=O)}return I.tail!==null?(p=I.tail,I.rendering=p,I.tail=p.sibling,I.renderingStartTime=hr(),p.sibling=null,d=Nn.current,gt(Nn,M?d&1|2:d&1),p):(zr(p),null);case 22:case 23:return vS(),M=p.memoizedState!==null,d!==null&&d.memoizedState!==null!==M&&(p.flags|=8192),M&&p.mode&1?Yi&1073741824&&(zr(p),$e&&p.subtreeFlags&6&&(p.flags|=8192)):zr(p),null;case 24:return null;case 25:return null}throw Error(o(156,p.tag))}var aj=a.ReactCurrentOwner,qi=!1;function Qr(d,p,w,M){p.child=d===null?QP(p,null,w,M):$u(p,d.child,w,M)}function T3(d,p,w,M,I){w=w.render;var O=p.ref;return Uu(p,I),M=Ww(d,p,w,M,O,I),w=Hw(),d!==null&&!qi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,la(d,p,I)):(Rn&&w&&Lw(p),p.flags|=1,Qr(d,p,M,I),p.child)}function C3(d,p,w,M,I){if(d===null){var O=w.type;return typeof O=="function"&&!bS(O)&&O.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=O,R3(d,p,O,M,I)):(d=L0(w.type,null,M,p,p.mode,I),d.ref=p.ref,d.return=p,p.child=d)}if(O=d.child,!(d.lanes&I)){var Y=O.memoizedProps;if(w=w.compare,w=w!==null?w:Yg,w(Y,M)&&d.ref===p.ref)return la(d,p,I)}return p.flags|=1,d=tl(O,M),d.ref=p.ref,d.return=p,p.child=d}function R3(d,p,w,M,I){if(d!==null&&Yg(d.memoizedProps,M)&&d.ref===p.ref)if(qi=!1,(d.lanes&I)!==0)d.flags&131072&&(qi=!0);else return p.lanes=d.lanes,la(d,p,I);return Zw(d,p,w,M,I)}function A3(d,p,w){var M=p.pendingProps,I=M.children,O=d!==null?d.memoizedState:null;if(M.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},gt(Xu,Yi),Yi|=w;else if(w&1073741824)p.memoizedState={baseLanes:0,cachePool:null},M=O!==null?O.baseLanes:w,gt(Xu,Yi),Yi|=M;else return d=O!==null?O.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:d,cachePool:null},p.updateQueue=null,gt(Xu,Yi),Yi|=d,null;else O!==null?(M=O.baseLanes|w,p.memoizedState=null):M=w,gt(Xu,Yi),Yi|=M;return Qr(d,p,I,w),p.child}function P3(d,p){var w=p.ref;(d===null&&w!==null||d!==null&&d.ref!==w)&&(p.flags|=512,p.flags|=2097152)}function Zw(d,p,w,M,I){var O=ln(w)?Vt:qt.current;return O=yt(p,O),Uu(p,I),w=Ww(d,p,w,M,O,I),M=Hw(),d!==null&&!qi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,la(d,p,I)):(Rn&&M&&Lw(p),p.flags|=1,Qr(d,p,w,I),p.child)}function I3(d,p,w,M,I){if(ln(w)){var O=!0;dr(p)}else O=!1;if(Uu(p,I),p.stateNode===null)d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),HP(p,w,M),kw(p,w,M,I),M=!0;else if(d===null){var Y=p.stateNode,te=p.memoizedProps;Y.props=te;var Me=Y.context,je=w.contextType;typeof je=="object"&&je!==null?je=ms(je):(je=ln(w)?Vt:qt.current,je=yt(p,je));var dt=w.getDerivedStateFromProps,kt=typeof dt=="function"||typeof Y.getSnapshotBeforeUpdate=="function";kt||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==M||Me!==je)&&GP(p,Y,M,je),Ya=!1;var Mt=p.memoizedState;Y.state=Mt,Qg(p,M,Y,I),Me=p.memoizedState,te!==M||Mt!==Me||Yt.current||Ya?(typeof dt=="function"&&(Nw(p,w,dt,M),Me=p.memoizedState),(te=Ya||WP(p,w,te,M,Mt,Me,je))?(kt||typeof Y.UNSAFE_componentWillMount!="function"&&typeof Y.componentWillMount!="function"||(typeof Y.componentWillMount=="function"&&Y.componentWillMount(),typeof Y.UNSAFE_componentWillMount=="function"&&Y.UNSAFE_componentWillMount()),typeof Y.componentDidMount=="function"&&(p.flags|=4194308)):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=M,p.memoizedState=Me),Y.props=M,Y.state=Me,Y.context=je,M=te):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),M=!1)}else{Y=p.stateNode,BP(d,p),te=p.memoizedProps,je=p.type===p.elementType?te:Ws(p.type,te),Y.props=je,kt=p.pendingProps,Mt=Y.context,Me=w.contextType,typeof Me=="object"&&Me!==null?Me=ms(Me):(Me=ln(w)?Vt:qt.current,Me=yt(p,Me));var bn=w.getDerivedStateFromProps;(dt=typeof bn=="function"||typeof Y.getSnapshotBeforeUpdate=="function")||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==kt||Mt!==Me)&&GP(p,Y,M,Me),Ya=!1,Mt=p.memoizedState,Y.state=Mt,Qg(p,M,Y,I);var xt=p.memoizedState;te!==kt||Mt!==xt||Yt.current||Ya?(typeof bn=="function"&&(Nw(p,w,bn,M),xt=p.memoizedState),(je=Ya||WP(p,w,je,M,Mt,xt,Me)||!1)?(dt||typeof Y.UNSAFE_componentWillUpdate!="function"&&typeof Y.componentWillUpdate!="function"||(typeof Y.componentWillUpdate=="function"&&Y.componentWillUpdate(M,xt,Me),typeof Y.UNSAFE_componentWillUpdate=="function"&&Y.UNSAFE_componentWillUpdate(M,xt,Me)),typeof Y.componentDidUpdate=="function"&&(p.flags|=4),typeof Y.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=1024),p.memoizedProps=M,p.memoizedState=xt),Y.props=M,Y.state=xt,Y.context=Me,M=je):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=1024),M=!1)}return Jw(d,p,w,M,O,I)}function Jw(d,p,w,M,I,O){P3(d,p);var Y=(p.flags&128)!==0;if(!M&&!Y)return I&&Xa(p,w,!1),la(d,p,O);M=p.stateNode,aj.current=p;var te=Y&&typeof w.getDerivedStateFromError!="function"?null:M.render();return p.flags|=1,d!==null&&Y?(p.child=$u(p,d.child,null,O),p.child=$u(p,null,te,O)):Qr(d,p,te,O),p.memoizedState=M.state,I&&Xa(p,w,!0),p.child}function N3(d){var p=d.stateNode;p.pendingContext?vi(d,p.pendingContext,p.pendingContext!==p.context):p.context&&vi(d,p.context,!1),Uw(d,p.containerInfo)}function k3(d,p,w,M,I){return Vu(),zw(I),p.flags|=256,Qr(d,p,w,M),p.child}var p0={dehydrated:null,treeContext:null,retryLane:0};function m0(d){return{baseLanes:d,cachePool:null}}function L3(d,p,w){var M=p.pendingProps,I=Nn.current,O=!1,Y=(p.flags&128)!==0,te;if((te=Y)||(te=d!==null&&d.memoizedState===null?!1:(I&2)!==0),te?(O=!0,p.flags&=-129):(d===null||d.memoizedState!==null)&&(I|=1),gt(Nn,I&1),d===null)return Fw(p),d=p.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(p.mode&1?Jl(d)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(I=M.children,d=M.fallback,O?(M=p.mode,O=p.child,I={mode:"hidden",children:I},!(M&1)&&O!==null?(O.childLanes=0,O.pendingProps=I):O=O0(I,M,0,null),d=ac(d,M,w,null),O.return=p,d.return=p,O.sibling=d,p.child=O,p.child.memoizedState=m0(w),p.memoizedState=p0,d):Qw(p,I));if(I=d.memoizedState,I!==null){if(te=I.dehydrated,te!==null){if(Y)return p.flags&256?(p.flags&=-257,g0(d,p,w,Error(o(422)))):p.memoizedState!==null?(p.child=d.child,p.flags|=128,null):(O=M.fallback,I=p.mode,M=O0({mode:"visible",children:M.children},I,0,null),O=ac(O,I,w,null),O.flags|=2,M.return=p,O.return=p,M.sibling=O,p.child=M,p.mode&1&&$u(p,d.child,null,w),p.child.memoizedState=m0(w),p.memoizedState=p0,O);if(!(p.mode&1))p=g0(d,p,w,null);else if(Jl(te))p=g0(d,p,w,Error(o(419)));else if(M=(w&d.childLanes)!==0,qi||M){if(M=Zn,M!==null){switch(w&-w){case 4:O=2;break;case 16:O=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:O=32;break;case 536870912:O=268435456;break;default:O=0}M=O&(M.suspendedLanes|w)?0:O,M!==0&&M!==I.retryLane&&(I.retryLane=M,bs(d,M,-1))}xS(),p=g0(d,p,w,Error(o(421)))}else vo(te)?(p.flags|=128,p.child=d.child,p=bj.bind(null,d),jg(te,p),p=null):(w=I.treeContext,oe&&(Xi=Fu(te),Gi=p,Rn=!0,Hs=null,gh=!1,w!==null&&(gs[ys++]=sa,gs[ys++]=oa,gs[ys++]=Ql,sa=w.id,oa=w.overflow,Ql=p)),p=Qw(p,p.pendingProps.children),p.flags|=4096);return p}return O?(M=D3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?m0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=p0,M):(w=O3(d,p,M.children,w),p.memoizedState=null,w)}return O?(M=D3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?m0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=p0,M):(w=O3(d,p,M.children,w),p.memoizedState=null,w)}function Qw(d,p){return p=O0({mode:"visible",children:p},d.mode,0,null),p.return=d,d.child=p}function O3(d,p,w,M){var I=d.child;return d=I.sibling,w=tl(I,{mode:"visible",children:w}),!(p.mode&1)&&(w.lanes=M),w.return=p,w.sibling=null,d!==null&&(M=p.deletions,M===null?(p.deletions=[d],p.flags|=16):M.push(d)),p.child=w}function D3(d,p,w,M,I){var O=p.mode;d=d.child;var Y=d.sibling,te={mode:"hidden",children:w};return!(O&1)&&p.child!==d?(w=p.child,w.childLanes=0,w.pendingProps=te,p.deletions=null):(w=tl(d,te),w.subtreeFlags=d.subtreeFlags&14680064),Y!==null?M=tl(Y,M):(M=ac(M,O,I,null),M.flags|=2),M.return=p,w.return=p,w.sibling=M,p.child=w,M}function g0(d,p,w,M){return M!==null&&zw(M),$u(p,d.child,null,w),d=Qw(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function F3(d,p,w){d.lanes|=p;var M=d.alternate;M!==null&&(M.lanes|=p),Pw(d.return,p,w)}function eS(d,p,w,M,I){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:M,tail:w,tailMode:I}:(O.isBackwards=p,O.rendering=null,O.renderingStartTime=0,O.last=M,O.tail=w,O.tailMode=I)}function z3(d,p,w){var M=p.pendingProps,I=M.revealOrder,O=M.tail;if(Qr(d,p,M.children,w),M=Nn.current,M&2)M=M&1|2,p.flags|=128;else{if(d!==null&&d.flags&128)e:for(d=p.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&F3(d,w,p);else if(d.tag===19)F3(d,w,p);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===p)break e;for(;d.sibling===null;){if(d.return===null||d.return===p)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}M&=1}if(gt(Nn,M),!(p.mode&1))p.memoizedState=null;else switch(I){case"forwards":for(w=p.child,I=null;w!==null;)d=w.alternate,d!==null&&i0(d)===null&&(I=w),w=w.sibling;w=I,w===null?(I=p.child,p.child=null):(I=w.sibling,w.sibling=null),eS(p,!1,I,w,O);break;case"backwards":for(w=null,I=p.child,p.child=null;I!==null;){if(d=I.alternate,d!==null&&i0(d)===null){p.child=I;break}d=I.sibling,I.sibling=w,w=I,I=d}eS(p,!0,w,null,O);break;case"together":eS(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function la(d,p,w){if(d!==null&&(p.dependencies=d.dependencies),qu|=p.lanes,!(w&p.childLanes))return null;if(d!==null&&p.child!==d.child)throw Error(o(153));if(p.child!==null){for(d=p.child,w=tl(d,d.pendingProps),p.child=w,w.return=p;d.sibling!==null;)d=d.sibling,w=w.sibling=tl(d,d.pendingProps),w.return=p;w.sibling=null}return p.child}function lj(d,p,w){switch(p.tag){case 3:N3(p),Vu();break;case 5:e3(p);break;case 1:ln(p.type)&&dr(p);break;case 4:Uw(p,p.stateNode.containerInfo);break;case 10:UP(p,p.type._context,p.memoizedProps.value);break;case 13:var M=p.memoizedState;if(M!==null)return M.dehydrated!==null?(gt(Nn,Nn.current&1),p.flags|=128,null):w&p.child.childLanes?L3(d,p,w):(gt(Nn,Nn.current&1),d=la(d,p,w),d!==null?d.sibling:null);gt(Nn,Nn.current&1);break;case 19:if(M=(w&p.childLanes)!==0,d.flags&128){if(M)return z3(d,p,w);p.flags|=128}var I=p.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),gt(Nn,Nn.current),M)break;return null;case 22:case 23:return p.lanes=0,A3(d,p,w)}return la(d,p,w)}function cj(d,p){switch(Ow(p),p.tag){case 1:return ln(p.type)&&Qt(),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return Hu(),qe(Yt),qe(qt),Vw(),d=p.flags,d&65536&&!(d&128)?(p.flags=d&-65537|128,p):null;case 5:return Bw(p),null;case 13:if(qe(Nn),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(o(340));Vu()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return qe(Nn),null;case 4:return Hu(),null;case 10:return Aw(p.type._context),null;case 22:case 23:return vS(),null;case 24:return null;default:return null}}var y0=!1,nc=!1,uj=typeof WeakSet=="function"?WeakSet:Set,rt=null;function v0(d,p){var w=d.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(M){Si(d,p,M)}else w.current=null}function tS(d,p,w){try{w()}catch(M){Si(d,p,M)}}var U3=!1;function fj(d,p){for(q(d.containerInfo),rt=p;rt!==null;)if(d=rt,p=d.child,(d.subtreeFlags&1028)!==0&&p!==null)p.return=d,rt=p;else for(;rt!==null;){d=rt;try{var w=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var M=w.memoizedProps,I=w.memoizedState,O=d.stateNode,Y=O.getSnapshotBeforeUpdate(d.elementType===d.type?M:Ws(d.type,M),I);O.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:$e&&Pe(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(te){Si(d,d.return,te)}if(p=d.sibling,p!==null){p.return=d.return,rt=p;break}rt=d.return}return w=U3,U3=!1,w}function rc(d,p,w){var M=p.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var I=M=M.next;do{if((I.tag&d)===d){var O=I.destroy;I.destroy=void 0,O!==void 0&&tS(p,w,O)}I=I.next}while(I!==M)}}function Rh(d,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var w=p=p.next;do{if((w.tag&d)===d){var M=w.create;w.destroy=M()}w=w.next}while(w!==p)}}function nS(d){var p=d.ref;if(p!==null){var w=d.stateNode;switch(d.tag){case 5:d=X(w);break;default:d=w}typeof p=="function"?p(d):p.current=d}}function B3(d,p,w){if(xo&&typeof xo.onCommitFiberUnmount=="function")try{xo.onCommitFiberUnmount(Xg,p)}catch{}switch(p.tag){case 0:case 11:case 14:case 15:if(d=p.updateQueue,d!==null&&(d=d.lastEffect,d!==null)){var M=d=d.next;do{var I=M,O=I.destroy;I=I.tag,O!==void 0&&(I&2||I&4)&&tS(p,w,O),M=M.next}while(M!==d)}break;case 1:if(v0(p,w),d=p.stateNode,typeof d.componentWillUnmount=="function")try{d.props=p.memoizedProps,d.state=p.memoizedState,d.componentWillUnmount()}catch(Y){Si(p,w,Y)}break;case 5:v0(p,w);break;case 4:$e?G3(d,p,w):ae&&ae&&(p=p.stateNode.containerInfo,w=Ze(p),rr(p,w))}}function j3(d,p,w){for(var M=p;;)if(B3(d,M,w),M.child===null||$e&&M.tag===4){if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function V3(d){var p=d.alternate;p!==null&&(d.alternate=null,V3(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&De(p)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function $3(d){return d.tag===5||d.tag===3||d.tag===4}function W3(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||$3(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function H3(d){if($e){e:{for(var p=d.return;p!==null;){if($3(p))break e;p=p.return}throw Error(o(160))}var w=p;switch(w.tag){case 5:p=w.stateNode,w.flags&32&&(Qe(p),w.flags&=-33),w=W3(d),iS(d,w,p);break;case 3:case 4:p=w.stateNode.containerInfo,w=W3(d),rS(d,w,p);break;default:throw Error(o(161))}}}function rS(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Ke(w,d,p):Ee(w,d);else if(M!==4&&(d=d.child,d!==null))for(rS(d,p,w),d=d.sibling;d!==null;)rS(d,p,w),d=d.sibling}function iS(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Oe(w,d,p):Ae(w,d);else if(M!==4&&(d=d.child,d!==null))for(iS(d,p,w),d=d.sibling;d!==null;)iS(d,p,w),d=d.sibling}function G3(d,p,w){for(var M=p,I=!1,O,Y;;){if(!I){I=M.return;e:for(;;){if(I===null)throw Error(o(160));switch(O=I.stateNode,I.tag){case 5:Y=!1;break e;case 3:O=O.containerInfo,Y=!0;break e;case 4:O=O.containerInfo,Y=!0;break e}I=I.return}I=!0}if(M.tag===5||M.tag===6)j3(d,M,w),Y?ze(O,M.stateNode):ge(O,M.stateNode);else if(M.tag===18)Y?xw(O,M.stateNode):vw(O,M.stateNode);else if(M.tag===4){if(M.child!==null){O=M.stateNode.containerInfo,Y=!0,M.child.return=M,M=M.child;continue}}else if(B3(d,M,w),M.child!==null){M.child.return=M,M=M.child;continue}if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return,M.tag===4&&(I=!1)}M.sibling.return=M.return,M=M.sibling}}function sS(d,p){if($e){switch(p.tag){case 0:case 11:case 14:case 15:rc(3,p,p.return),Rh(3,p),rc(5,p,p.return);return;case 1:return;case 5:var w=p.stateNode;if(w!=null){var M=p.memoizedProps;d=d!==null?d.memoizedProps:M;var I=p.type,O=p.updateQueue;p.updateQueue=null,O!==null&&it(w,O,I,d,M,p)}return;case 6:if(p.stateNode===null)throw Error(o(162));w=p.memoizedProps,_t(p.stateNode,d!==null?d.memoizedProps:w,w);return;case 3:oe&&d!==null&&d.memoizedState.isDehydrated&&Hg(p.stateNode.containerInfo);return;case 12:return;case 13:x0(p);return;case 19:x0(p);return;case 17:return}throw Error(o(163))}switch(p.tag){case 0:case 11:case 14:case 15:rc(3,p,p.return),Rh(3,p),rc(5,p,p.return);return;case 12:return;case 13:x0(p);return;case 19:x0(p);return;case 3:oe&&d!==null&&d.memoizedState.isDehydrated&&Hg(p.stateNode.containerInfo);break;case 22:case 23:return}e:if(ae){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,rr(p.containerInfo,p.pendingChildren);break e}throw Error(o(163))}}function x0(d){var p=d.updateQueue;if(p!==null){d.updateQueue=null;var w=d.stateNode;w===null&&(w=d.stateNode=new uj),p.forEach(function(M){var I=_j.bind(null,d,M);w.has(M)||(w.add(M),M.then(I,I))})}}function dj(d,p){for(rt=p;rt!==null;){p=rt;var w=p.deletions;if(w!==null)for(var M=0;M";case _0:return":has("+(lS(d)||"")+")";case w0:return'[role="'+d.value+'"]';case M0:return'"'+d.value+'"';case S0:return'[data-testname="'+d.value+'"]';default:throw Error(o(365))}}function Z3(d,p){var w=[];d=[d,0];for(var M=0;MI&&(I=Y),M&=~O}if(M=I,M=hr()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*pj(M/1960))-M,10d?16:d,Ja===null)var M=!1;else{if(d=Ja,Ja=null,A0=0,Gt&6)throw Error(o(331));var I=Gt;for(Gt|=4,rt=d.current;rt!==null;){var O=rt,Y=O.child;if(rt.flags&16){var te=O.deletions;if(te!==null){for(var Me=0;Mehr()-dS?ic(d,0):fS|=w),wi(d,p)}function oI(d,p){p===0&&(d.mode&1?(p=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):p=1);var w=ei();d=N0(d,p),d!==null&&(mh(d,p,w),wi(d,w))}function bj(d){var p=d.memoizedState,w=0;p!==null&&(w=p.retryLane),oI(d,w)}function _j(d,p){var w=0;switch(d.tag){case 13:var M=d.stateNode,I=d.memoizedState;I!==null&&(w=I.retryLane);break;case 19:M=d.stateNode;break;default:throw Error(o(314))}M!==null&&M.delete(p),oI(d,w)}var aI;aI=function(d,p,w){if(d!==null)if(d.memoizedProps!==p.pendingProps||Yt.current)qi=!0;else{if(!(d.lanes&w)&&!(p.flags&128))return qi=!1,lj(d,p,w);qi=!!(d.flags&131072)}else qi=!1,Rn&&p.flags&1048576&&XP(p,n0,p.index);switch(p.lanes=0,p.tag){case 2:var M=p.type;d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps;var I=yt(p,qt.current);Uu(p,w),I=Ww(null,p,M,d,I,w);var O=Hw();return p.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,ln(M)?(O=!0,dr(p)):O=!1,p.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Iw(p),I.updater=e0,p.stateNode=I,I._reactInternals=p,kw(p,M,d,w),p=Jw(null,p,M,!0,O,w)):(p.tag=0,Rn&&O&&Lw(p),Qr(null,p,I,w),p=p.child),p;case 16:M=p.elementType;e:{switch(d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps,I=M._init,M=I(M._payload),p.type=M,I=p.tag=Sj(M),d=Ws(M,d),I){case 0:p=Zw(null,p,M,d,w);break e;case 1:p=I3(null,p,M,d,w);break e;case 11:p=T3(null,p,M,d,w);break e;case 14:p=C3(null,p,M,Ws(M.type,d),w);break e}throw Error(o(306,M,""))}return p;case 0:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),Zw(d,p,M,I,w);case 1:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),I3(d,p,M,I,w);case 3:e:{if(N3(p),d===null)throw Error(o(387));M=p.pendingProps,O=p.memoizedState,I=O.element,BP(d,p),Qg(p,M,null,w);var Y=p.memoizedState;if(M=Y.element,oe&&O.isDehydrated)if(O={element:M,isDehydrated:!1,cache:Y.cache,transitions:Y.transitions},p.updateQueue.baseState=O,p.memoizedState=O,p.flags&256){I=Error(o(423)),p=k3(d,p,M,w,I);break e}else if(M!==I){I=Error(o(424)),p=k3(d,p,M,w,I);break e}else for(oe&&(Xi=Vg(p.stateNode.containerInfo),Gi=p,Rn=!0,Hs=null,gh=!1),w=QP(p,null,M,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Vu(),M===I){p=la(d,p,w);break e}Qr(d,p,M,w)}p=p.child}return p;case 5:return e3(p),d===null&&Fw(p),M=p.type,I=p.pendingProps,O=d!==null?d.memoizedProps:null,Y=I.children,de(M,I)?Y=null:O!==null&&de(M,O)&&(p.flags|=32),P3(d,p),Qr(d,p,Y,w),p.child;case 6:return d===null&&Fw(p),null;case 13:return L3(d,p,w);case 4:return Uw(p,p.stateNode.containerInfo),M=p.pendingProps,d===null?p.child=$u(p,null,M,w):Qr(d,p,M,w),p.child;case 11:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),T3(d,p,M,I,w);case 7:return Qr(d,p,p.pendingProps,w),p.child;case 8:return Qr(d,p,p.pendingProps.children,w),p.child;case 12:return Qr(d,p,p.pendingProps.children,w),p.child;case 10:e:{if(M=p.type._context,I=p.pendingProps,O=p.memoizedProps,Y=I.value,UP(p,M,Y),O!==null)if(bo(O.value,Y)){if(O.children===I.children&&!Yt.current){p=la(d,p,w);break e}}else for(O=p.child,O!==null&&(O.return=p);O!==null;){var te=O.dependencies;if(te!==null){Y=O.child;for(var Me=te.firstContext;Me!==null;){if(Me.context===M){if(O.tag===1){Me=ia(-1,w&-w),Me.tag=2;var je=O.updateQueue;if(je!==null){je=je.shared;var dt=je.pending;dt===null?Me.next=Me:(Me.next=dt.next,dt.next=Me),je.pending=Me}}O.lanes|=w,Me=O.alternate,Me!==null&&(Me.lanes|=w),Pw(O.return,w,p),te.lanes|=w;break}Me=Me.next}}else if(O.tag===10)Y=O.type===p.type?null:O.child;else if(O.tag===18){if(Y=O.return,Y===null)throw Error(o(341));Y.lanes|=w,te=Y.alternate,te!==null&&(te.lanes|=w),Pw(Y,w,p),Y=O.sibling}else Y=O.child;if(Y!==null)Y.return=O;else for(Y=O;Y!==null;){if(Y===p){Y=null;break}if(O=Y.sibling,O!==null){O.return=Y.return,Y=O;break}Y=Y.return}O=Y}Qr(d,p,I.children,w),p=p.child}return p;case 9:return I=p.type,M=p.pendingProps.children,Uu(p,w),I=ms(I),M=M(I),p.flags|=1,Qr(d,p,M,w),p.child;case 14:return M=p.type,I=Ws(M,p.pendingProps),I=Ws(M.type,I),C3(d,p,M,I,w);case 15:return R3(d,p,p.type,p.pendingProps,w);case 17:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,ln(M)?(d=!0,dr(p)):d=!1,Uu(p,w),HP(p,M,I),kw(p,M,I,w),Jw(null,p,M,!0,d,w);case 19:return z3(d,p,w);case 22:return A3(d,p,w)}throw Error(o(156,p.tag))};function lI(d,p){return Sw(d,p)}function wj(d,p,w,M){this.tag=d,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _s(d,p,w,M){return new wj(d,p,w,M)}function bS(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Sj(d){if(typeof d=="function")return bS(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===b)return 14}return 2}function tl(d,p){var w=d.alternate;return w===null?(w=_s(d.tag,p,d.key,d.mode),w.elementType=d.elementType,w.type=d.type,w.stateNode=d.stateNode,w.alternate=d,d.alternate=w):(w.pendingProps=p,w.type=d.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=d.flags&14680064,w.childLanes=d.childLanes,w.lanes=d.lanes,w.child=d.child,w.memoizedProps=d.memoizedProps,w.memoizedState=d.memoizedState,w.updateQueue=d.updateQueue,p=d.dependencies,w.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},w.sibling=d.sibling,w.index=d.index,w.ref=d.ref,w}function L0(d,p,w,M,I,O){var Y=2;if(M=d,typeof d=="function")bS(d)&&(Y=1);else if(typeof d=="string")Y=5;else e:switch(d){case u:return ac(w.children,I,O,p);case f:Y=8,I|=8;break;case h:return d=_s(12,w,p,I|2),d.elementType=h,d.lanes=O,d;case v:return d=_s(13,w,p,I),d.elementType=v,d.lanes=O,d;case g:return d=_s(19,w,p,I),d.elementType=g,d.lanes=O,d;case S:return O0(w,I,O,p);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case m:Y=10;break e;case y:Y=9;break e;case x:Y=11;break e;case b:Y=14;break e;case _:Y=16,M=null;break e}throw Error(o(130,d==null?d:typeof d,""))}return p=_s(Y,w,p,I),p.elementType=d,p.type=M,p.lanes=O,p}function ac(d,p,w,M){return d=_s(7,d,M,p),d.lanes=w,d}function O0(d,p,w,M){return d=_s(22,d,M,p),d.elementType=S,d.lanes=w,d.stateNode={},d}function _S(d,p,w){return d=_s(6,d,null,p),d.lanes=w,d}function wS(d,p,w){return p=_s(4,d.children!==null?d.children:[],d.key,p),p.lanes=w,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}function Mj(d,p,w,M,I){this.tag=p,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=at,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_w(0),this.expirationTimes=_w(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_w(0),this.identifierPrefix=M,this.onRecoverableError=I,oe&&(this.mutableSourceEagerHydrationData=null)}function cI(d,p,w,M,I,O,Y,te,Me){return d=new Mj(d,p,w,te,Me),p===1?(p=1,O===!0&&(p|=8)):p=0,O=_s(3,null,null,p),d.current=O,O.stateNode=d,O.memoizedState={element:M,isDehydrated:w,cache:null,transitions:null},Iw(O),d}function uI(d){if(!d)return Ht;d=d._reactInternals;e:{if(k(d)!==d||d.tag!==1)throw Error(o(170));var p=d;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(ln(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(o(171))}if(d.tag===1){var w=d.type;if(ln(w))return na(d,w,p)}return p}function fI(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(o(188)):(d=Object.keys(d).join(","),Error(o(268,d)));return d=z(p),d===null?null:d.stateNode}function dI(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var w=d.retryLane;d.retryLane=w!==0&&w=je&&O>=kt&&I<=dt&&Y<=Mt){d.splice(p,1);break}else if(M!==je||w.width!==Me.width||MtY){if(!(O!==kt||w.height!==Me.height||dtI)){je>M&&(Me.width+=je-M,Me.x=M),dtO&&(Me.height+=kt-O,Me.y=O),Mtw&&(w=Y)),YhS&&(p.flags|=128,M=!0,Rh(I,!1),p.lanes=4194304)}else{if(!M)if(d=i0(O),d!==null){if(p.flags|=128,M=!0,d=d.updateQueue,d!==null&&(p.updateQueue=d,p.flags|=4),Rh(I,!0),I.tail===null&&I.tailMode==="hidden"&&!O.alternate&&!Rn)return zr(p),null}else 2*hr()-I.renderingStartTime>hS&&w!==1073741824&&(p.flags|=128,M=!0,Rh(I,!1),p.lanes=4194304);I.isBackwards?(O.sibling=p.child,p.child=O):(d=I.last,d!==null?d.sibling=O:p.child=O,I.last=O)}return I.tail!==null?(p=I.tail,I.rendering=p,I.tail=p.sibling,I.renderingStartTime=hr(),p.sibling=null,d=kn.current,gt(kn,M?d&1|2:d&1),p):(zr(p),null);case 22:case 23:return vS(),M=p.memoizedState!==null,d!==null&&d.memoizedState!==null!==M&&(p.flags|=8192),M&&p.mode&1?Yi&1073741824&&(zr(p),$e&&p.subtreeFlags&6&&(p.flags|=8192)):zr(p),null;case 24:return null;case 25:return null}throw Error(o(156,p.tag))}var fj=a.ReactCurrentOwner,qi=!1;function Qr(d,p,w,M){p.child=d===null?ZP(p,null,w,M):$u(p,d.child,w,M)}function M3(d,p,w,M,I){w=w.render;var O=p.ref;return Uu(p,I),M=Ww(d,p,w,M,O,I),w=Hw(),d!==null&&!qi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,la(d,p,I)):(Rn&&w&&Lw(p),p.flags|=1,Qr(d,p,M,I),p.child)}function E3(d,p,w,M,I){if(d===null){var O=w.type;return typeof O=="function"&&!bS(O)&&O.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=O,T3(d,p,O,M,I)):(d=L0(w.type,null,M,p,p.mode,I),d.ref=p.ref,d.return=p,p.child=d)}if(O=d.child,!(d.lanes&I)){var Y=O.memoizedProps;if(w=w.compare,w=w!==null?w:Yg,w(Y,M)&&d.ref===p.ref)return la(d,p,I)}return p.flags|=1,d=tl(O,M),d.ref=p.ref,d.return=p,p.child=d}function T3(d,p,w,M,I){if(d!==null&&Yg(d.memoizedProps,M)&&d.ref===p.ref)if(qi=!1,(d.lanes&I)!==0)d.flags&131072&&(qi=!0);else return p.lanes=d.lanes,la(d,p,I);return Zw(d,p,w,M,I)}function C3(d,p,w){var M=p.pendingProps,I=M.children,O=d!==null?d.memoizedState:null;if(M.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},gt(Xu,Yi),Yi|=w;else if(w&1073741824)p.memoizedState={baseLanes:0,cachePool:null},M=O!==null?O.baseLanes:w,gt(Xu,Yi),Yi|=M;else return d=O!==null?O.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:d,cachePool:null},p.updateQueue=null,gt(Xu,Yi),Yi|=d,null;else O!==null?(M=O.baseLanes|w,p.memoizedState=null):M=w,gt(Xu,Yi),Yi|=M;return Qr(d,p,I,w),p.child}function R3(d,p){var w=p.ref;(d===null&&w!==null||d!==null&&d.ref!==w)&&(p.flags|=512,p.flags|=2097152)}function Zw(d,p,w,M,I){var O=ln(w)?Vt:qt.current;return O=yt(p,O),Uu(p,I),w=Ww(d,p,w,M,O,I),M=Hw(),d!==null&&!qi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,la(d,p,I)):(Rn&&M&&Lw(p),p.flags|=1,Qr(d,p,w,I),p.child)}function A3(d,p,w,M,I){if(ln(w)){var O=!0;dr(p)}else O=!1;if(Uu(p,I),p.stateNode===null)d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),$P(p,w,M),kw(p,w,M,I),M=!0;else if(d===null){var Y=p.stateNode,te=p.memoizedProps;Y.props=te;var Me=Y.context,je=w.contextType;typeof je=="object"&&je!==null?je=ms(je):(je=ln(w)?Vt:qt.current,je=yt(p,je));var dt=w.getDerivedStateFromProps,kt=typeof dt=="function"||typeof Y.getSnapshotBeforeUpdate=="function";kt||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==M||Me!==je)&&WP(p,Y,M,je),Ya=!1;var Mt=p.memoizedState;Y.state=Mt,Qg(p,M,Y,I),Me=p.memoizedState,te!==M||Mt!==Me||Yt.current||Ya?(typeof dt=="function"&&(Nw(p,w,dt,M),Me=p.memoizedState),(te=Ya||VP(p,w,te,M,Mt,Me,je))?(kt||typeof Y.UNSAFE_componentWillMount!="function"&&typeof Y.componentWillMount!="function"||(typeof Y.componentWillMount=="function"&&Y.componentWillMount(),typeof Y.UNSAFE_componentWillMount=="function"&&Y.UNSAFE_componentWillMount()),typeof Y.componentDidMount=="function"&&(p.flags|=4194308)):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=M,p.memoizedState=Me),Y.props=M,Y.state=Me,Y.context=je,M=te):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),M=!1)}else{Y=p.stateNode,zP(d,p),te=p.memoizedProps,je=p.type===p.elementType?te:Ws(p.type,te),Y.props=je,kt=p.pendingProps,Mt=Y.context,Me=w.contextType,typeof Me=="object"&&Me!==null?Me=ms(Me):(Me=ln(w)?Vt:qt.current,Me=yt(p,Me));var bn=w.getDerivedStateFromProps;(dt=typeof bn=="function"||typeof Y.getSnapshotBeforeUpdate=="function")||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==kt||Mt!==Me)&&WP(p,Y,M,Me),Ya=!1,Mt=p.memoizedState,Y.state=Mt,Qg(p,M,Y,I);var xt=p.memoizedState;te!==kt||Mt!==xt||Yt.current||Ya?(typeof bn=="function"&&(Nw(p,w,bn,M),xt=p.memoizedState),(je=Ya||VP(p,w,je,M,Mt,xt,Me)||!1)?(dt||typeof Y.UNSAFE_componentWillUpdate!="function"&&typeof Y.componentWillUpdate!="function"||(typeof Y.componentWillUpdate=="function"&&Y.componentWillUpdate(M,xt,Me),typeof Y.UNSAFE_componentWillUpdate=="function"&&Y.UNSAFE_componentWillUpdate(M,xt,Me)),typeof Y.componentDidUpdate=="function"&&(p.flags|=4),typeof Y.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=1024),p.memoizedProps=M,p.memoizedState=xt),Y.props=M,Y.state=xt,Y.context=Me,M=je):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&Mt===d.memoizedState||(p.flags|=1024),M=!1)}return Jw(d,p,w,M,O,I)}function Jw(d,p,w,M,I,O){R3(d,p);var Y=(p.flags&128)!==0;if(!M&&!Y)return I&&Xa(p,w,!1),la(d,p,O);M=p.stateNode,fj.current=p;var te=Y&&typeof w.getDerivedStateFromError!="function"?null:M.render();return p.flags|=1,d!==null&&Y?(p.child=$u(p,d.child,null,O),p.child=$u(p,null,te,O)):Qr(d,p,te,O),p.memoizedState=M.state,I&&Xa(p,w,!0),p.child}function P3(d){var p=d.stateNode;p.pendingContext?vi(d,p.pendingContext,p.pendingContext!==p.context):p.context&&vi(d,p.context,!1),Uw(d,p.containerInfo)}function I3(d,p,w,M,I){return Vu(),zw(I),p.flags|=256,Qr(d,p,w,M),p.child}var p0={dehydrated:null,treeContext:null,retryLane:0};function m0(d){return{baseLanes:d,cachePool:null}}function N3(d,p,w){var M=p.pendingProps,I=kn.current,O=!1,Y=(p.flags&128)!==0,te;if((te=Y)||(te=d!==null&&d.memoizedState===null?!1:(I&2)!==0),te?(O=!0,p.flags&=-129):(d===null||d.memoizedState!==null)&&(I|=1),gt(kn,I&1),d===null)return Fw(p),d=p.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(p.mode&1?Jl(d)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(I=M.children,d=M.fallback,O?(M=p.mode,O=p.child,I={mode:"hidden",children:I},!(M&1)&&O!==null?(O.childLanes=0,O.pendingProps=I):O=O0(I,M,0,null),d=ac(d,M,w,null),O.return=p,d.return=p,O.sibling=d,p.child=O,p.child.memoizedState=m0(w),p.memoizedState=p0,d):Qw(p,I));if(I=d.memoizedState,I!==null){if(te=I.dehydrated,te!==null){if(Y)return p.flags&256?(p.flags&=-257,g0(d,p,w,Error(o(422)))):p.memoizedState!==null?(p.child=d.child,p.flags|=128,null):(O=M.fallback,I=p.mode,M=O0({mode:"visible",children:M.children},I,0,null),O=ac(O,I,w,null),O.flags|=2,M.return=p,O.return=p,M.sibling=O,p.child=M,p.mode&1&&$u(p,d.child,null,w),p.child.memoizedState=m0(w),p.memoizedState=p0,O);if(!(p.mode&1))p=g0(d,p,w,null);else if(Jl(te))p=g0(d,p,w,Error(o(419)));else if(M=(w&d.childLanes)!==0,qi||M){if(M=Zn,M!==null){switch(w&-w){case 4:O=2;break;case 16:O=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:O=32;break;case 536870912:O=268435456;break;default:O=0}M=O&(M.suspendedLanes|w)?0:O,M!==0&&M!==I.retryLane&&(I.retryLane=M,bs(d,M,-1))}xS(),p=g0(d,p,w,Error(o(421)))}else vo(te)?(p.flags|=128,p.child=d.child,p=Mj.bind(null,d),jg(te,p),p=null):(w=I.treeContext,oe&&(Xi=Fu(te),Gi=p,Rn=!0,Hs=null,yh=!1,w!==null&&(gs[ys++]=sa,gs[ys++]=oa,gs[ys++]=Ql,sa=w.id,oa=w.overflow,Ql=p)),p=Qw(p,p.pendingProps.children),p.flags|=4096);return p}return O?(M=L3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?m0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=p0,M):(w=k3(d,p,M.children,w),p.memoizedState=null,w)}return O?(M=L3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?m0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=p0,M):(w=k3(d,p,M.children,w),p.memoizedState=null,w)}function Qw(d,p){return p=O0({mode:"visible",children:p},d.mode,0,null),p.return=d,d.child=p}function k3(d,p,w,M){var I=d.child;return d=I.sibling,w=tl(I,{mode:"visible",children:w}),!(p.mode&1)&&(w.lanes=M),w.return=p,w.sibling=null,d!==null&&(M=p.deletions,M===null?(p.deletions=[d],p.flags|=16):M.push(d)),p.child=w}function L3(d,p,w,M,I){var O=p.mode;d=d.child;var Y=d.sibling,te={mode:"hidden",children:w};return!(O&1)&&p.child!==d?(w=p.child,w.childLanes=0,w.pendingProps=te,p.deletions=null):(w=tl(d,te),w.subtreeFlags=d.subtreeFlags&14680064),Y!==null?M=tl(Y,M):(M=ac(M,O,I,null),M.flags|=2),M.return=p,w.return=p,w.sibling=M,p.child=w,M}function g0(d,p,w,M){return M!==null&&zw(M),$u(p,d.child,null,w),d=Qw(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function O3(d,p,w){d.lanes|=p;var M=d.alternate;M!==null&&(M.lanes|=p),Pw(d.return,p,w)}function eS(d,p,w,M,I){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:M,tail:w,tailMode:I}:(O.isBackwards=p,O.rendering=null,O.renderingStartTime=0,O.last=M,O.tail=w,O.tailMode=I)}function D3(d,p,w){var M=p.pendingProps,I=M.revealOrder,O=M.tail;if(Qr(d,p,M.children,w),M=kn.current,M&2)M=M&1|2,p.flags|=128;else{if(d!==null&&d.flags&128)e:for(d=p.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&O3(d,w,p);else if(d.tag===19)O3(d,w,p);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===p)break e;for(;d.sibling===null;){if(d.return===null||d.return===p)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}M&=1}if(gt(kn,M),!(p.mode&1))p.memoizedState=null;else switch(I){case"forwards":for(w=p.child,I=null;w!==null;)d=w.alternate,d!==null&&i0(d)===null&&(I=w),w=w.sibling;w=I,w===null?(I=p.child,p.child=null):(I=w.sibling,w.sibling=null),eS(p,!1,I,w,O);break;case"backwards":for(w=null,I=p.child,p.child=null;I!==null;){if(d=I.alternate,d!==null&&i0(d)===null){p.child=I;break}d=I.sibling,I.sibling=w,w=I,I=d}eS(p,!0,w,null,O);break;case"together":eS(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function la(d,p,w){if(d!==null&&(p.dependencies=d.dependencies),qu|=p.lanes,!(w&p.childLanes))return null;if(d!==null&&p.child!==d.child)throw Error(o(153));if(p.child!==null){for(d=p.child,w=tl(d,d.pendingProps),p.child=w,w.return=p;d.sibling!==null;)d=d.sibling,w=w.sibling=tl(d,d.pendingProps),w.return=p;w.sibling=null}return p.child}function dj(d,p,w){switch(p.tag){case 3:P3(p),Vu();break;case 5:JP(p);break;case 1:ln(p.type)&&dr(p);break;case 4:Uw(p,p.stateNode.containerInfo);break;case 10:FP(p,p.type._context,p.memoizedProps.value);break;case 13:var M=p.memoizedState;if(M!==null)return M.dehydrated!==null?(gt(kn,kn.current&1),p.flags|=128,null):w&p.child.childLanes?N3(d,p,w):(gt(kn,kn.current&1),d=la(d,p,w),d!==null?d.sibling:null);gt(kn,kn.current&1);break;case 19:if(M=(w&p.childLanes)!==0,d.flags&128){if(M)return D3(d,p,w);p.flags|=128}var I=p.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),gt(kn,kn.current),M)break;return null;case 22:case 23:return p.lanes=0,C3(d,p,w)}return la(d,p,w)}function hj(d,p){switch(Ow(p),p.tag){case 1:return ln(p.type)&&Qt(),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return Hu(),qe(Yt),qe(qt),Vw(),d=p.flags,d&65536&&!(d&128)?(p.flags=d&-65537|128,p):null;case 5:return Bw(p),null;case 13:if(qe(kn),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(o(340));Vu()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return qe(kn),null;case 4:return Hu(),null;case 10:return Aw(p.type._context),null;case 22:case 23:return vS(),null;case 24:return null;default:return null}}var y0=!1,nc=!1,pj=typeof WeakSet=="function"?WeakSet:Set,rt=null;function v0(d,p){var w=d.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(M){Si(d,p,M)}else w.current=null}function tS(d,p,w){try{w()}catch(M){Si(d,p,M)}}var F3=!1;function mj(d,p){for(q(d.containerInfo),rt=p;rt!==null;)if(d=rt,p=d.child,(d.subtreeFlags&1028)!==0&&p!==null)p.return=d,rt=p;else for(;rt!==null;){d=rt;try{var w=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var M=w.memoizedProps,I=w.memoizedState,O=d.stateNode,Y=O.getSnapshotBeforeUpdate(d.elementType===d.type?M:Ws(d.type,M),I);O.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:$e&&Pe(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(te){Si(d,d.return,te)}if(p=d.sibling,p!==null){p.return=d.return,rt=p;break}rt=d.return}return w=F3,F3=!1,w}function rc(d,p,w){var M=p.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var I=M=M.next;do{if((I.tag&d)===d){var O=I.destroy;I.destroy=void 0,O!==void 0&&tS(p,w,O)}I=I.next}while(I!==M)}}function Ah(d,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var w=p=p.next;do{if((w.tag&d)===d){var M=w.create;w.destroy=M()}w=w.next}while(w!==p)}}function nS(d){var p=d.ref;if(p!==null){var w=d.stateNode;switch(d.tag){case 5:d=X(w);break;default:d=w}typeof p=="function"?p(d):p.current=d}}function z3(d,p,w){if(xo&&typeof xo.onCommitFiberUnmount=="function")try{xo.onCommitFiberUnmount(Xg,p)}catch{}switch(p.tag){case 0:case 11:case 14:case 15:if(d=p.updateQueue,d!==null&&(d=d.lastEffect,d!==null)){var M=d=d.next;do{var I=M,O=I.destroy;I=I.tag,O!==void 0&&(I&2||I&4)&&tS(p,w,O),M=M.next}while(M!==d)}break;case 1:if(v0(p,w),d=p.stateNode,typeof d.componentWillUnmount=="function")try{d.props=p.memoizedProps,d.state=p.memoizedState,d.componentWillUnmount()}catch(Y){Si(p,w,Y)}break;case 5:v0(p,w);break;case 4:$e?W3(d,p,w):ae&&ae&&(p=p.stateNode.containerInfo,w=Ze(p),rr(p,w))}}function U3(d,p,w){for(var M=p;;)if(z3(d,M,w),M.child===null||$e&&M.tag===4){if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function B3(d){var p=d.alternate;p!==null&&(d.alternate=null,B3(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&De(p)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function j3(d){return d.tag===5||d.tag===3||d.tag===4}function V3(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||j3(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function $3(d){if($e){e:{for(var p=d.return;p!==null;){if(j3(p))break e;p=p.return}throw Error(o(160))}var w=p;switch(w.tag){case 5:p=w.stateNode,w.flags&32&&(Qe(p),w.flags&=-33),w=V3(d),iS(d,w,p);break;case 3:case 4:p=w.stateNode.containerInfo,w=V3(d),rS(d,w,p);break;default:throw Error(o(161))}}}function rS(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Ke(w,d,p):Ee(w,d);else if(M!==4&&(d=d.child,d!==null))for(rS(d,p,w),d=d.sibling;d!==null;)rS(d,p,w),d=d.sibling}function iS(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Oe(w,d,p):Ae(w,d);else if(M!==4&&(d=d.child,d!==null))for(iS(d,p,w),d=d.sibling;d!==null;)iS(d,p,w),d=d.sibling}function W3(d,p,w){for(var M=p,I=!1,O,Y;;){if(!I){I=M.return;e:for(;;){if(I===null)throw Error(o(160));switch(O=I.stateNode,I.tag){case 5:Y=!1;break e;case 3:O=O.containerInfo,Y=!0;break e;case 4:O=O.containerInfo,Y=!0;break e}I=I.return}I=!0}if(M.tag===5||M.tag===6)U3(d,M,w),Y?ze(O,M.stateNode):ge(O,M.stateNode);else if(M.tag===18)Y?xw(O,M.stateNode):vw(O,M.stateNode);else if(M.tag===4){if(M.child!==null){O=M.stateNode.containerInfo,Y=!0,M.child.return=M,M=M.child;continue}}else if(z3(d,M,w),M.child!==null){M.child.return=M,M=M.child;continue}if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return,M.tag===4&&(I=!1)}M.sibling.return=M.return,M=M.sibling}}function sS(d,p){if($e){switch(p.tag){case 0:case 11:case 14:case 15:rc(3,p,p.return),Ah(3,p),rc(5,p,p.return);return;case 1:return;case 5:var w=p.stateNode;if(w!=null){var M=p.memoizedProps;d=d!==null?d.memoizedProps:M;var I=p.type,O=p.updateQueue;p.updateQueue=null,O!==null&&it(w,O,I,d,M,p)}return;case 6:if(p.stateNode===null)throw Error(o(162));w=p.memoizedProps,_t(p.stateNode,d!==null?d.memoizedProps:w,w);return;case 3:oe&&d!==null&&d.memoizedState.isDehydrated&&Hg(p.stateNode.containerInfo);return;case 12:return;case 13:x0(p);return;case 19:x0(p);return;case 17:return}throw Error(o(163))}switch(p.tag){case 0:case 11:case 14:case 15:rc(3,p,p.return),Ah(3,p),rc(5,p,p.return);return;case 12:return;case 13:x0(p);return;case 19:x0(p);return;case 3:oe&&d!==null&&d.memoizedState.isDehydrated&&Hg(p.stateNode.containerInfo);break;case 22:case 23:return}e:if(ae){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,rr(p.containerInfo,p.pendingChildren);break e}throw Error(o(163))}}function x0(d){var p=d.updateQueue;if(p!==null){d.updateQueue=null;var w=d.stateNode;w===null&&(w=d.stateNode=new pj),p.forEach(function(M){var I=Ej.bind(null,d,M);w.has(M)||(w.add(M),M.then(I,I))})}}function gj(d,p){for(rt=p;rt!==null;){p=rt;var w=p.deletions;if(w!==null)for(var M=0;M";case _0:return":has("+(lS(d)||"")+")";case w0:return'[role="'+d.value+'"]';case M0:return'"'+d.value+'"';case S0:return'[data-testname="'+d.value+'"]';default:throw Error(o(365))}}function Y3(d,p){var w=[];d=[d,0];for(var M=0;MI&&(I=Y),M&=~O}if(M=I,M=hr()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*vj(M/1960))-M,10d?16:d,Ja===null)var M=!1;else{if(d=Ja,Ja=null,A0=0,Gt&6)throw Error(o(331));var I=Gt;for(Gt|=4,rt=d.current;rt!==null;){var O=rt,Y=O.child;if(rt.flags&16){var te=O.deletions;if(te!==null){for(var Me=0;Mehr()-dS?ic(d,0):fS|=w),wi(d,p)}function iI(d,p){p===0&&(d.mode&1?(p=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):p=1);var w=ei();d=N0(d,p),d!==null&&(gh(d,p,w),wi(d,w))}function Mj(d){var p=d.memoizedState,w=0;p!==null&&(w=p.retryLane),iI(d,w)}function Ej(d,p){var w=0;switch(d.tag){case 13:var M=d.stateNode,I=d.memoizedState;I!==null&&(w=I.retryLane);break;case 19:M=d.stateNode;break;default:throw Error(o(314))}M!==null&&M.delete(p),iI(d,w)}var sI;sI=function(d,p,w){if(d!==null)if(d.memoizedProps!==p.pendingProps||Yt.current)qi=!0;else{if(!(d.lanes&w)&&!(p.flags&128))return qi=!1,dj(d,p,w);qi=!!(d.flags&131072)}else qi=!1,Rn&&p.flags&1048576&&HP(p,n0,p.index);switch(p.lanes=0,p.tag){case 2:var M=p.type;d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps;var I=yt(p,qt.current);Uu(p,w),I=Ww(null,p,M,d,I,w);var O=Hw();return p.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,ln(M)?(O=!0,dr(p)):O=!1,p.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Iw(p),I.updater=e0,p.stateNode=I,I._reactInternals=p,kw(p,M,d,w),p=Jw(null,p,M,!0,O,w)):(p.tag=0,Rn&&O&&Lw(p),Qr(null,p,I,w),p=p.child),p;case 16:M=p.elementType;e:{switch(d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps,I=M._init,M=I(M._payload),p.type=M,I=p.tag=Cj(M),d=Ws(M,d),I){case 0:p=Zw(null,p,M,d,w);break e;case 1:p=A3(null,p,M,d,w);break e;case 11:p=M3(null,p,M,d,w);break e;case 14:p=E3(null,p,M,Ws(M.type,d),w);break e}throw Error(o(306,M,""))}return p;case 0:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),Zw(d,p,M,I,w);case 1:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),A3(d,p,M,I,w);case 3:e:{if(P3(p),d===null)throw Error(o(387));M=p.pendingProps,O=p.memoizedState,I=O.element,zP(d,p),Qg(p,M,null,w);var Y=p.memoizedState;if(M=Y.element,oe&&O.isDehydrated)if(O={element:M,isDehydrated:!1,cache:Y.cache,transitions:Y.transitions},p.updateQueue.baseState=O,p.memoizedState=O,p.flags&256){I=Error(o(423)),p=I3(d,p,M,w,I);break e}else if(M!==I){I=Error(o(424)),p=I3(d,p,M,w,I);break e}else for(oe&&(Xi=Vg(p.stateNode.containerInfo),Gi=p,Rn=!0,Hs=null,yh=!1),w=ZP(p,null,M,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Vu(),M===I){p=la(d,p,w);break e}Qr(d,p,M,w)}p=p.child}return p;case 5:return JP(p),d===null&&Fw(p),M=p.type,I=p.pendingProps,O=d!==null?d.memoizedProps:null,Y=I.children,de(M,I)?Y=null:O!==null&&de(M,O)&&(p.flags|=32),R3(d,p),Qr(d,p,Y,w),p.child;case 6:return d===null&&Fw(p),null;case 13:return N3(d,p,w);case 4:return Uw(p,p.stateNode.containerInfo),M=p.pendingProps,d===null?p.child=$u(p,null,M,w):Qr(d,p,M,w),p.child;case 11:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),M3(d,p,M,I,w);case 7:return Qr(d,p,p.pendingProps,w),p.child;case 8:return Qr(d,p,p.pendingProps.children,w),p.child;case 12:return Qr(d,p,p.pendingProps.children,w),p.child;case 10:e:{if(M=p.type._context,I=p.pendingProps,O=p.memoizedProps,Y=I.value,FP(p,M,Y),O!==null)if(bo(O.value,Y)){if(O.children===I.children&&!Yt.current){p=la(d,p,w);break e}}else for(O=p.child,O!==null&&(O.return=p);O!==null;){var te=O.dependencies;if(te!==null){Y=O.child;for(var Me=te.firstContext;Me!==null;){if(Me.context===M){if(O.tag===1){Me=ia(-1,w&-w),Me.tag=2;var je=O.updateQueue;if(je!==null){je=je.shared;var dt=je.pending;dt===null?Me.next=Me:(Me.next=dt.next,dt.next=Me),je.pending=Me}}O.lanes|=w,Me=O.alternate,Me!==null&&(Me.lanes|=w),Pw(O.return,w,p),te.lanes|=w;break}Me=Me.next}}else if(O.tag===10)Y=O.type===p.type?null:O.child;else if(O.tag===18){if(Y=O.return,Y===null)throw Error(o(341));Y.lanes|=w,te=Y.alternate,te!==null&&(te.lanes|=w),Pw(Y,w,p),Y=O.sibling}else Y=O.child;if(Y!==null)Y.return=O;else for(Y=O;Y!==null;){if(Y===p){Y=null;break}if(O=Y.sibling,O!==null){O.return=Y.return,Y=O;break}Y=Y.return}O=Y}Qr(d,p,I.children,w),p=p.child}return p;case 9:return I=p.type,M=p.pendingProps.children,Uu(p,w),I=ms(I),M=M(I),p.flags|=1,Qr(d,p,M,w),p.child;case 14:return M=p.type,I=Ws(M,p.pendingProps),I=Ws(M.type,I),E3(d,p,M,I,w);case 15:return T3(d,p,p.type,p.pendingProps,w);case 17:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:Ws(M,I),d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,ln(M)?(d=!0,dr(p)):d=!1,Uu(p,w),$P(p,M,I),kw(p,M,I,w),Jw(null,p,M,!0,d,w);case 19:return D3(d,p,w);case 22:return C3(d,p,w)}throw Error(o(156,p.tag))};function oI(d,p){return Sw(d,p)}function Tj(d,p,w,M){this.tag=d,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _s(d,p,w,M){return new Tj(d,p,w,M)}function bS(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Cj(d){if(typeof d=="function")return bS(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===b)return 14}return 2}function tl(d,p){var w=d.alternate;return w===null?(w=_s(d.tag,p,d.key,d.mode),w.elementType=d.elementType,w.type=d.type,w.stateNode=d.stateNode,w.alternate=d,d.alternate=w):(w.pendingProps=p,w.type=d.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=d.flags&14680064,w.childLanes=d.childLanes,w.lanes=d.lanes,w.child=d.child,w.memoizedProps=d.memoizedProps,w.memoizedState=d.memoizedState,w.updateQueue=d.updateQueue,p=d.dependencies,w.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},w.sibling=d.sibling,w.index=d.index,w.ref=d.ref,w}function L0(d,p,w,M,I,O){var Y=2;if(M=d,typeof d=="function")bS(d)&&(Y=1);else if(typeof d=="string")Y=5;else e:switch(d){case u:return ac(w.children,I,O,p);case f:Y=8,I|=8;break;case h:return d=_s(12,w,p,I|2),d.elementType=h,d.lanes=O,d;case v:return d=_s(13,w,p,I),d.elementType=v,d.lanes=O,d;case g:return d=_s(19,w,p,I),d.elementType=g,d.lanes=O,d;case S:return O0(w,I,O,p);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case m:Y=10;break e;case y:Y=9;break e;case x:Y=11;break e;case b:Y=14;break e;case _:Y=16,M=null;break e}throw Error(o(130,d==null?d:typeof d,""))}return p=_s(Y,w,p,I),p.elementType=d,p.type=M,p.lanes=O,p}function ac(d,p,w,M){return d=_s(7,d,M,p),d.lanes=w,d}function O0(d,p,w,M){return d=_s(22,d,M,p),d.elementType=S,d.lanes=w,d.stateNode={},d}function _S(d,p,w){return d=_s(6,d,null,p),d.lanes=w,d}function wS(d,p,w){return p=_s(4,d.children!==null?d.children:[],d.key,p),p.lanes=w,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}function Rj(d,p,w,M,I){this.tag=p,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=at,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_w(0),this.expirationTimes=_w(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_w(0),this.identifierPrefix=M,this.onRecoverableError=I,oe&&(this.mutableSourceEagerHydrationData=null)}function aI(d,p,w,M,I,O,Y,te,Me){return d=new Rj(d,p,w,te,Me),p===1?(p=1,O===!0&&(p|=8)):p=0,O=_s(3,null,null,p),d.current=O,O.stateNode=d,O.memoizedState={element:M,isDehydrated:w,cache:null,transitions:null},Iw(O),d}function lI(d){if(!d)return Ht;d=d._reactInternals;e:{if(k(d)!==d||d.tag!==1)throw Error(o(170));var p=d;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(ln(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(o(171))}if(d.tag===1){var w=d.type;if(ln(w))return na(d,w,p)}return p}function cI(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(o(188)):(d=Object.keys(d).join(","),Error(o(268,d)));return d=z(p),d===null?null:d.stateNode}function uI(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var w=d.retryLane;d.retryLane=w!==0&&w=je&&O>=kt&&I<=dt&&Y<=Mt){d.splice(p,1);break}else if(M!==je||w.width!==Me.width||MtY){if(!(O!==kt||w.height!==Me.height||dtI)){je>M&&(Me.width+=je-M,Me.x=M),dtO&&(Me.height+=kt-O,Me.y=O),Mtw&&(w=Y)),Y ")+` No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return X(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:Ej,findFiberByHostInstance:d.findFiberByHostInstance||Tj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)d=!0;else{try{Xg=p.inject(d),xo=p}catch{}d=!!p.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,p,w,M){if(!ke)throw Error(o(363));d=cS(d,p);var I=Ge(d,w,M).disconnect;return{disconnect:function(){I()}}},n.registerMutableSourceForHydration=function(d,p){var w=p._getVersion;w=w(p._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[p,w]:d.mutableSourceEagerHydrationData.push(p,w)},n.runWithPriority=function(d,p){var w=cn;try{return cn=d,p()}finally{cn=w}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,p,w,M){var I=p.current,O=ei(),Y=Qa(I);return w=uI(w),p.context===null?p.context=w:p.pendingContext=w,p=ia(O,Y),p.payload={element:d},M=M===void 0?null:M,M!==null&&(p.callback=M),Ka(I,p),d=bs(I,Y,O),d!==null&&Jg(d,I,Y),Y},n};m8.exports=ohe;var ahe=m8.exports;const lhe=Va(ahe),BA={},v8=t=>void Object.assign(BA,t);function che(t,e){function n(u,{args:f=[],attach:h,...m},y){let x=`${u[0].toUpperCase()}${u.slice(1)}`,v;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;v=kf(g,{type:u,root:y,attach:h,primitive:!0})}else{const g=BA[x];if(!g)throw new Error(`R3F: ${x} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(f))throw new Error("R3F: The args prop must be an array!");v=kf(new g(...f),{type:u,root:y,attach:h,memoizedProps:{args:f}})}return v.__r3f.attach===void 0&&(v.isBufferGeometry?v.__r3f.attach="geometry":v.isMaterial&&(v.__r3f.attach="material")),x!=="inject"&&hE(v,m),v}function r(u,f){let h=!1;if(f){var m,y;(m=f.__r3f)!=null&&m.attach?dE(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),h=!0),h||(y=u.__r3f)==null||y.objects.push(f),f.__r3f||kf(f,{}),f.__r3f.parent=u,LT(f),Lf(f)}}function i(u,f,h){let m=!1;if(f){var y,x;if((y=f.__r3f)!=null&&y.attach)dE(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){f.parent=u,f.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:f});const v=u.children.filter(b=>b!==f),g=v.indexOf(h);u.children=[...v.slice(0,g),f,...v.slice(g)],m=!0}m||(x=u.__r3f)==null||x.objects.push(f),f.__r3f||kf(f,{}),f.__r3f.parent=u,LT(f),Lf(f)}}function s(u,f,h=!1){u&&[...u].forEach(m=>o(f,m,h))}function o(u,f,h){if(f){var m,y,x;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==f)),(y=f.__r3f)!=null&&y.attach)UL(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var v;u.remove(f),(v=f.__r3f)!=null&&v.root&&ghe(Wv(f),f)}const b=(x=f.__r3f)==null?void 0:x.primitive,_=!b&&(h===void 0?f.dispose!==null:h);if(!b){var g;s((g=f.__r3f)==null?void 0:g.objects,f,_),s(f.children,f,_)}if(delete f.__r3f,_&&f.dispose&&f.type!=="Scene"){const S=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?NT.unstable_scheduleCallback(NT.unstable_IdlePriority,S):S()}Lf(u)}}function a(u,f,h,m){var y;const x=(y=u.__r3f)==null?void 0:y.parent;if(!x)return;const v=n(f,h,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&r(v,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>r(v,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||o(x,u),v.parent&&(v.__r3f.autoRemovedBeforeAppend=!0),r(x,v),v.raycast&&v.__r3f.eventCount&&Wv(v).getState().internal.interaction.push(v),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=v,g.ref&&(typeof g.ref=="function"?g.ref(v):g.ref.current=v))})}const l=()=>{};return{reconciler:lhe({createInstance:n,removeChild:o,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,f)=>{if(!f)return;const h=u.getState().scene;h.__r3f&&(h.__r3f.root=u,r(h,f))},removeChildFromContainer:(u,f)=>{f&&o(u.getState().scene,f)},insertInContainerBefore:(u,f,h)=>{if(!f||!h)return;const m=u.getState().scene;m.__r3f&&i(m,f,h)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var f;return!!((f=u==null?void 0:u.__r3f)!=null?f:{}).handlers},prepareUpdate(u,f,h,m){var y;if(((y=u==null?void 0:u.__r3f)!=null?y:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:v=[],children:g,...b}=m,{args:_=[],children:S,...C}=h;if(!Array.isArray(v))throw new Error("R3F: the args prop must be an array!");if(v.some((A,L)=>A!==_[L]))return[!0];const P=E8(u,b,C,!0);return P.changes.length?[!1,P]:null}},commitUpdate(u,[f,h],m,y,x,v){f?a(u,m,x,v):hE(u,h)},commitMount(u,f,h,m){var y;const x=(y=u.__r3f)!=null?y:{};u.raycast&&x.handlers&&x.eventCount&&Wv(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>kf(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:h,parent:m}=(f=u.__r3f)!=null?f:{};h&&m&&UL(m,u,h),u.isObject3D&&(u.visible=!1),Lf(u)},unhideInstance(u,f){var h;const{attach:m,parent:y}=(h=u.__r3f)!=null?h:{};m&&y&&dE(y,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Lf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e(),beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&En.fun(performance.now)?performance.now:En.fun(Date.now)?Date.now:()=>0,scheduleTimeout:En.fun(setTimeout)?setTimeout:void 0,cancelTimeout:En.fun(clearTimeout)?clearTimeout:void 0}),applyProps:hE}}var OL,DL;const fE=t=>"colorSpace"in t||"outputColorSpace"in t,x8=()=>{var t;return(t=BA.ColorManagement)!=null?t:null},b8=t=>t&&t.isOrthographicCamera,uhe=t=>t&&t.hasOwnProperty("current"),Ag=typeof window<"u"&&((OL=window.document)!=null&&OL.createElement||((DL=window.navigator)==null?void 0:DL.product)==="ReactNative")?R.useLayoutEffect:R.useEffect;function _8(t){const e=R.useRef(t);return Ag(()=>void(e.current=t),[t]),e}function fhe({set:t}){return Ag(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class w8 extends R.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}w8.getDerivedStateFromError=()=>({error:!0});const S8="__default",FL=new Map,dhe=t=>t&&!!t.memoized&&!!t.changes;function M8(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const lp=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function Wv(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const En={obj:t=>t===Object(t)&&!En.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(En.str(t)||En.num(t)||En.boo(t))return t===e;const s=En.obj(t);if(s&&r==="reference")return t===e;const o=En.arr(t);if(o&&n==="reference")return t===e;if((o||s)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(s&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!En.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(En.und(a)){if(o&&t.length===0&&e.length===0||s&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function hhe(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function kf(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function kT(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((s,o)=>s[o],t),{target:n,key:i}}else return{target:n,key:e}}const zL=/-\d+$/;function dE(t,e,n){if(En.str(n)){if(zL.test(n)){const s=n.replace(zL,""),{target:o,key:a}=kT(t,s);Array.isArray(o[a])||(o[a]=[])}const{target:r,key:i}=kT(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function UL(t,e,n){var r,i;if(En.str(n)){const{target:s,key:o}=kT(t,n),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function E8(t,{children:e,key:n,ref:r,...i},{children:s,key:o,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(i),h=[];if(c){const y=Object.keys(l);for(let x=0;x{var v;if((v=t.__r3f)!=null&&v.primitive&&y==="object"||En.equ(x,l[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return h.push([y,x,!0,[]]);let g=[];y.includes("-")&&(g=y.split("-")),h.push([y,x,!1,g]);for(const b in i){const _=i[b];b.startsWith(`${y}-`)&&h.push([b,_,!1,b.split("-")])}});const m={...i};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(m.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(m.attach=u.memoizedProps.attach),{memoized:m,changes:h}}function hE(t,e){var n;const r=t.__r3f,i=r==null?void 0:r.root,s=i==null||i.getState==null?void 0:i.getState(),{memoized:o,changes:a}=dhe(e)?e:E8(t,e),l=r==null?void 0:r.eventCount;t.__r3f&&(t.__r3f.memoizedProps=o);for(let h=0;h_[S],t),!(b&&b.set))){const[_,...S]=v.reverse();g=S.reverse().reduce((C,P)=>C[P],t),m=_}if(y===S8+"remove")if(g.constructor){let _=FL.get(g.constructor);_||(_=new g.constructor,FL.set(g.constructor,_)),y=_[m]}else y=0;if(x&&r)y?r.handlers[m]=y:delete r.handlers[m],r.eventCount=Object.keys(r.handlers).length;else if(b&&b.set&&(b.copy||b instanceof Zc)){if(Array.isArray(y))b.fromArray?b.fromArray(y):b.set(...y);else if(b.copy&&y&&y.constructor&&b.constructor===y.constructor)b.copy(y);else if(y!==void 0){var c;const _=(c=b)==null?void 0:c.isColor;!_&&b.setScalar?b.setScalar(y):b instanceof Zc&&y instanceof Zc?b.mask=y.mask:b.set(y),!x8()&&s&&!s.linear&&_&&b.convertSRGBToLinear()}}else{var u;if(g[m]=y,(u=g[m])!=null&&u.isTexture&&g[m].format===Ir&&g[m].type===$i&&s){const _=g[m];fE(_)&&fE(s.gl)?_.colorSpace=s.gl.outputColorSpace:_.encoding=s.gl.outputEncoding}}Lf(t)}if(r&&r.parent&&t.raycast&&l!==r.eventCount){const h=Wv(t).getState().internal,m=h.interaction.indexOf(t);m>-1&&h.interaction.splice(m,1),r.eventCount&&h.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&<(t),t}function Lf(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function LT(t){t.onUpdate==null||t.onUpdate(t)}function phe(t,e){t.manual||(b8(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function tv(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function mhe(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return wp.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return wp.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return wp.ContinuousEventPriority;default:return wp.DefaultEventPriority}}function T8(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function ghe(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{T8(n.capturedMap,e,r,i)})}function yhe(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],f=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+f*f))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var f;return(f=c.__r3f)==null?void 0:f.handlers["onPointer"+u]}))}function r(l,c){const u=t.getState(),f=new Set,h=[],m=c?c(u.internal.interaction):u.internal.interaction;for(let g=0;g{const _=lp(g.object),S=lp(b.object);return!_||!S?g.distance-b.distance:S.events.priority-_.events.priority||g.distance-b.distance}).filter(g=>{const b=tv(g);return f.has(b)?!1:(f.add(b),!0)});u.events.filter&&(x=u.events.filter(x,u));for(const g of x){let b=g.object;for(;b;){var v;(v=b.__r3f)!=null&&v.eventCount&&h.push({...g,eventObject:b}),b=b.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let g of u.internal.capturedMap.get(l.pointerId).values())f.has(tv(g.intersection))||h.push(g.intersection);return h}function i(l,c,u,f){const h=t.getState();if(l.length){const m={stopped:!1};for(const y of l){const x=lp(y.object)||h,{raycaster:v,pointer:g,camera:b,internal:_}=x,S=new H(g.x,g.y,0).unproject(b),C=T=>{var N,z;return(N=(z=_.capturedMap.get(T))==null?void 0:z.has(y.eventObject))!=null?N:!1},P=T=>{const N={intersection:y,target:c.target};_.capturedMap.has(T)?_.capturedMap.get(T).set(y.eventObject,N):_.capturedMap.set(T,new Map([[y.eventObject,N]])),c.target.setPointerCapture(T)},A=T=>{const N=_.capturedMap.get(T);N&&T8(_.capturedMap,y.eventObject,N,T)};let L={};for(let T in c){let N=c[T];typeof N!="function"&&(L[T]=N)}let k={...y,...L,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:S,ray:v.ray,camera:b,stopPropagation(){const T="pointerId"in c&&_.capturedMap.get(c.pointerId);if((!T||T.has(y.eventObject))&&(k.stopped=m.stopped=!0,_.hovered.size&&Array.from(_.hovered.values()).find(N=>N.eventObject===y.eventObject))){const N=l.slice(0,l.indexOf(y));s([...N,y])}},target:{hasPointerCapture:C,setPointerCapture:P,releasePointerCapture:A},currentTarget:{hasPointerCapture:C,setPointerCapture:P,releasePointerCapture:A},nativeEvent:c};if(f(k),m.stopped===!0)break}}return l}function s(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(f=>f.object===u.object&&f.index===u.index&&f.instanceId===u.instanceId)){const h=u.eventObject.__r3f,m=h==null?void 0:h.handlers;if(c.hovered.delete(tv(u)),h!=null&&h.eventCount){const y={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(y),m.onPointerLeave==null||m.onPointerLeave(y)}}}function o(l,c){for(let u=0;us([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),s([]))})}}return function(u){const{onPointerMissed:f,internal:h}=t.getState();h.lastEvent.current=u;const m=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",v=r(u,m?n:void 0),g=y?e(u):0;l==="onPointerDown"&&(h.initialClick=[u.offsetX,u.offsetY],h.initialHits=v.map(_=>_.eventObject)),y&&!v.length&&g<=2&&(o(u,h.interaction),f&&f(u)),m&&s(v);function b(_){const S=_.eventObject,C=S.__r3f,P=C==null?void 0:C.handlers;if(C!=null&&C.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const A=tv(_),L=h.hovered.get(A);L?L.stopped&&_.stopPropagation():(h.hovered.set(A,_),P.onPointerOver==null||P.onPointerOver(_),P.onPointerEnter==null||P.onPointerEnter(_))}P.onPointerMove==null||P.onPointerMove(_)}else{const A=P[l];A?(!y||h.initialHits.includes(S))&&(o(u,h.interaction.filter(L=>!h.initialHits.includes(L))),A(_)):y&&h.initialHits.includes(S)&&o(u,h.interaction.filter(L=>!h.initialHits.includes(L)))}}i(v,u,g,b)}}return{handlePointer:a}}const C8=t=>!!(t!=null&&t.render),R8=R.createContext(null),vhe=(t,e)=>{const n=she((a,l)=>{const c=new H,u=new H,f=new H;function h(g=l().camera,b=u,_=l().size){const{width:S,height:C,top:P,left:A}=_,L=S/C;b.isVector3?f.copy(b):f.set(...b);const k=g.getWorldPosition(c).distanceTo(f);if(b8(g))return{width:S/g.zoom,height:C/g.zoom,top:P,left:A,factor:1,distance:k,aspect:L};{const T=g.fov*Math.PI/180,N=2*Math.tan(T/2)*k,z=N*(S/C);return{width:z,height:N,top:P,left:A,factor:S/z,distance:k,aspect:L}}}let m;const y=g=>a(b=>({performance:{...b.performance,current:g}})),x=new Ne;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>t(l(),g),advance:(g,b)=>e(g,b,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new LA,pointer:x,mouse:x,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&y(g.performance.min),m=setTimeout(()=>y(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:h},setEvents:g=>a(b=>({...b,events:{...b.events,...g}})),setSize:(g,b,_,S,C)=>{const P=l().camera,A={width:g,height:b,top:S||0,left:C||0,updateStyle:_};a(L=>({size:A,viewport:{...L.viewport,...h(P,u,A)}}))},setDpr:g=>a(b=>{const _=M8(g);return{viewport:{...b.viewport,dpr:_,initialDpr:b.viewport.initialDpr||_}}}),setFrameloop:(g="always")=>{const b=l().clock;b.stop(),b.elapsedTime=0,g!=="never"&&(b.start(),b.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:R.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,b,_)=>{const S=l().internal;return S.priority=S.priority+(b>0?1:0),S.subscribers.push({ref:g,priority:b,store:_}),S.subscribers=S.subscribers.sort((C,P)=>C.priority-P.priority),()=>{const C=l().internal;C!=null&&C.subscribers&&(C.priority=C.priority-(b>0?1:0),C.subscribers=C.subscribers.filter(P=>P.ref!==g))}}}}}),r=n.getState();let i=r.size,s=r.viewport.dpr,o=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:f}=n.getState();if(l.width!==i.width||l.height!==i.height||c.dpr!==s){var h;i=l,s=c.dpr,phe(a,l),u.setPixelRatio(c.dpr);const m=(h=l.updateStyle)!=null?h:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,m)}a!==o&&(o=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let nv,xhe=new Set,bhe=new Set,_he=new Set;function pE(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function cp(t,e){switch(t){case"before":return pE(xhe,e);case"after":return pE(bhe,e);case"tail":return pE(_he,e)}}let mE,gE;function yE(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),mE=e.internal.subscribers,nv=0;nv0)&&!((u=s.gl.xr)!=null&&u.isPresenting)&&(r+=yE(c,s))}if(n=!1,cp("after",c),r===0)return cp("tail",c),e=!1,cancelAnimationFrame(i)}function a(c,u=1){var f;if(!c)return t.forEach(h=>a(h.store.getState(),u));(f=c.gl.xr)!=null&&f.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,u=!0,f,h){if(u&&cp("before",c),f)yE(c,f,h);else for(const m of t.values())yE(c,m.store.getState());u&&cp("after",c)}return{loop:o,invalidate:a,advance:l}}function A8(){const t=R.useContext(R8);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Er(t=n=>n,e){return A8()(t,e)}function jA(t,e=0){const n=A8(),r=n.getState().internal.subscribe,i=_8(t);return Ag(()=>r(i,e,n),[e,r,n]),null}const Od=new Map,{invalidate:BL,advance:jL}=whe(Od),{reconciler:w1,applyProps:Sf}=che(Od,mhe),Mf={objects:"shallow",strict:!1},She=(t,e)=>{const n=typeof t=="function"?t(e):t;return C8(n)?n:new h8({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function Mhe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:s,left:o,updateStyle:a=n}=e;return{width:r,height:i,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:s,left:o}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:s,left:o,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function Ehe(t){const e=Od.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,s=r||vhe(BL,jL),o=n||w1.createContainer(s,wp.ConcurrentRoot,null,!1,null,"",i,null);e||Od.set(t,{fiber:o,store:s});let a,l=!1,c;return{configure(u={}){let{gl:f,size:h,scene:m,events:y,onCreated:x,shadows:v=!1,linear:g=!1,flat:b=!1,legacy:_=!1,orthographic:S=!1,frameloop:C="always",dpr:P=[1,2],performance:A,raycaster:L,camera:k,onPointerMissed:T}=u,N=s.getState(),z=N.gl;N.gl||N.set({gl:z=She(f,t)});let D=N.raycaster;D||N.set({raycaster:D=new s8});const{params:B,...G}=L||{};if(En.equ(G,D,Mf)||Sf(D,{...G}),En.equ(B,D.params,Mf)||Sf(D,{params:{...D.params,...B}}),!N.camera||N.camera===c&&!En.equ(c,k,Mf)){c=k;const K=k instanceof bg,Q=K?k:S?new Rg(0,0,0,0,.1,1e3):new xr(75,0,.1,1e3);K||(Q.position.z=5,k&&(Sf(Q,k),("aspect"in k||"left"in k||"right"in k||"bottom"in k||"top"in k)&&(Q.manual=!0,Q.updateProjectionMatrix())),!N.camera&&!(k!=null&&k.rotation)&&Q.lookAt(0,0,0)),N.set({camera:Q}),D.camera=Q}if(!N.scene){let K;m!=null&&m.isScene?K=m:(K=new pA,m&&Sf(K,m)),N.set({scene:kf(K)})}if(!N.xr){var X;const K=(fe,J)=>{const de=s.getState();de.frameloop!=="never"&&jL(fe,!0,de,J)},Q=()=>{const fe=s.getState();fe.gl.xr.enabled=fe.gl.xr.isPresenting,fe.gl.xr.setAnimationLoop(fe.gl.xr.isPresenting?K:null),fe.gl.xr.isPresenting||BL(fe)},he={connect(){const fe=s.getState().gl;fe.xr.addEventListener("sessionstart",Q),fe.xr.addEventListener("sessionend",Q)},disconnect(){const fe=s.getState().gl;fe.xr.removeEventListener("sessionstart",Q),fe.xr.removeEventListener("sessionend",Q)}};typeof((X=z.xr)==null?void 0:X.addEventListener)=="function"&&he.connect(),N.set({xr:he})}if(z.shadowMap){const K=z.shadowMap.enabled,Q=z.shadowMap.type;if(z.shadowMap.enabled=!!v,En.boo(v))z.shadowMap.type=Dp;else if(En.str(v)){var Z;const he={basic:m6,percentage:s_,soft:Dp,variance:Qs};z.shadowMap.type=(Z=he[v])!=null?Z:Dp}else En.obj(v)&&Object.assign(z.shadowMap,v);(K!==z.shadowMap.enabled||Q!==z.shadowMap.type)&&(z.shadowMap.needsUpdate=!0)}const F=x8();F&&("enabled"in F?F.enabled=!_:"legacyMode"in F&&(F.legacyMode=_)),l||Sf(z,{outputEncoding:g?3e3:3001,toneMapping:b?Bo:JR}),N.legacy!==_&&N.set(()=>({legacy:_})),N.linear!==g&&N.set(()=>({linear:g})),N.flat!==b&&N.set(()=>({flat:b})),f&&!En.fun(f)&&!C8(f)&&!En.equ(f,z,Mf)&&Sf(z,f),y&&!N.events.handlers&&N.set({events:y(s)});const q=Mhe(t,h);return En.equ(q,N.size,Mf)||N.setSize(q.width,q.height,q.updateStyle,q.top,q.left),P&&N.viewport.dpr!==M8(P)&&N.setDpr(P),N.frameloop!==C&&N.setFrameloop(C),N.onPointerMissed||N.set({onPointerMissed:T}),A&&!En.equ(A,N.performance,Mf)&&N.set(K=>({performance:{...K.performance,...A}})),a=x,l=!0,this},render(u){return l||this.configure(),w1.updateContainer(E.jsx(The,{store:s,children:u,onCreated:a,rootElement:t}),o,null,()=>{}),s},unmount(){P8(t)}}}function The({store:t,children:e,onCreated:n,rootElement:r}){return Ag(()=>{const i=t.getState();i.set(s=>({internal:{...s.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),E.jsx(R8.Provider,{value:t,children:e})}function P8(t,e){const n=Od.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),w1.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var s,o,a,l;i.events.disconnect==null||i.events.disconnect(),(s=i.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),hhe(i),Od.delete(t)}catch{}},500)})}}w1.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:R.version});const vE={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function Che(t){const{handlePointer:e}=yhe(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(vE).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:s}=t.getState();s.disconnect==null||s.disconnect(),i(o=>({events:{...o.events,connected:n}})),Object.entries((r=s.handlers)!=null?r:[]).forEach(([o,a])=>{const[l,c]=vE[o];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([s,o])=>{if(r&&r.connected instanceof HTMLElement){const[a]=vE[s];r.connected.removeEventListener(a,o)}}),n(s=>({events:{...s.events,connected:void 0}}))}}}}function VL(t,e){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>t(...r),e)}}function Rhe({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,o]=R.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=R.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=R.useRef(!1);R.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[f,h,m]=R.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:b,top:_,width:S,height:C,bottom:P,right:A,x:L,y:k}=a.current.element.getBoundingClientRect(),T={left:b,top:_,width:S,height:C,bottom:P,right:A,x:L,y:k};a.current.element instanceof HTMLElement&&r&&(T.height=a.current.element.offsetHeight,T.width=a.current.element.offsetWidth),Object.freeze(T),u.current&&!Nhe(a.current.lastBounds,T)&&o(a.current.lastBounds=T)};return[g,c?VL(g,c):g,l?VL(g,l):g]},[o,r,l,c]);function y(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function x(){a.current.element&&(a.current.resizeObserver=new i(m),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(g=>g.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const v=g=>{!g||g===a.current.element||(y(),a.current.element=g,a.current.scrollContainers=I8(g),x())};return Phe(m,!!e),Ahe(h),R.useEffect(()=>{y(),x()},[e,m,h]),R.useEffect(()=>y,[]),[v,s,f]}function Ahe(t){R.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Phe(t,e){R.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function I8(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...I8(t.parentElement)]}const Ihe=["x","y","top","bottom","left","right","width","height"],Nhe=(t,e)=>Ihe.every(n=>t[n]===e[n]);var khe=Object.defineProperty,Lhe=Object.defineProperties,Ohe=Object.getOwnPropertyDescriptors,$L=Object.getOwnPropertySymbols,Dhe=Object.prototype.hasOwnProperty,Fhe=Object.prototype.propertyIsEnumerable,WL=(t,e,n)=>e in t?khe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HL=(t,e)=>{for(var n in e||(e={}))Dhe.call(e,n)&&WL(t,n,e[n]);if($L)for(var n of $L(e))Fhe.call(e,n)&&WL(t,n,e[n]);return t},zhe=(t,e)=>Lhe(t,Ohe(e)),GL,XL;typeof window<"u"&&((GL=window.document)!=null&&GL.createElement||((XL=window.navigator)==null?void 0:XL.product)==="ReactNative")?R.useLayoutEffect:R.useEffect;function N8(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const i=N8(r,e,n);if(i)return i;r=r.sibling}}function k8(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const qL=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=qL;return}return qL.apply(this,arguments)};const VA=k8(R.createContext(null));class L8 extends R.Component{render(){return R.createElement(VA.Provider,{value:this._reactInternals},this.props.children)}}function Uhe(){const t=R.useContext(VA);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=R.useId();return R.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=N8(r,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(i)return i}},[t,e])}function Bhe(){const t=Uhe(),[e]=R.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const i=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;i&&i!==VA&&!e.has(i)&&e.set(i,R.useContext(k8(i)))}n=n.return}return e}function jhe(){const t=Bhe();return R.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>R.createElement(e,null,R.createElement(n.Provider,zhe(HL({},r),{value:t.get(n)}))),e=>R.createElement(L8,HL({},e))),[t])}const Vhe=R.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:s,events:o=Che,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:y,dpr:x,performance:v,raycaster:g,camera:b,scene:_,onPointerMissed:S,onCreated:C,...P},A){R.useMemo(()=>v8(nhe),[]);const L=jhe(),[k,T]=Rhe({scroll:!0,debounce:{scroll:50,resize:0},...r}),N=R.useRef(null),z=R.useRef(null);R.useImperativeHandle(A,()=>N.current);const D=_8(S),[B,G]=R.useState(!1),[X,Z]=R.useState(!1);if(B)throw B;if(X)throw X;const F=R.useRef(null);Ag(()=>{const K=N.current;T.width>0&&T.height>0&&K&&(F.current||(F.current=Ehe(K)),F.current.configure({gl:s,events:o,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:y,dpr:x,performance:v,raycaster:g,camera:b,scene:_,size:T,onPointerMissed:(...Q)=>D.current==null?void 0:D.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(a?uhe(a)?a.current:a:z.current),l&&Q.setEvents({compute:(he,fe)=>{const J=he[l+"X"],de=he[l+"Y"];fe.pointer.set(J/fe.size.width*2-1,-(de/fe.size.height)*2+1),fe.raycaster.setFromCamera(fe.pointer,fe.camera)}}),C==null||C(Q)}}),F.current.render(E.jsx(L,{children:E.jsx(w8,{set:Z,children:E.jsx(R.Suspense,{fallback:E.jsx(fhe,{set:G}),children:e})})})))}),R.useEffect(()=>{const K=N.current;if(K)return()=>P8(K)},[]);const q=a?"none":"auto";return E.jsx("div",{ref:z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...i},...P,children:E.jsx("div",{ref:k,style:{width:"100%",height:"100%"},children:E.jsx("canvas",{ref:N,style:{display:"block"},children:n})})})}),$he=R.forwardRef(function(e,n){return E.jsx(L8,{children:E.jsx(Vhe,{...e,ref:n})})});function O_(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function lh(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Zl(){}var xu=.7,Dd=1/xu,hd="\\s*([+-]?\\d+)\\s*",Hm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Whe=/^#([0-9a-f]{3,8})$/,Hhe=new RegExp(`^rgb\\(${hd},${hd},${hd}\\)$`),Ghe=new RegExp(`^rgb\\(${Vo},${Vo},${Vo}\\)$`),Xhe=new RegExp(`^rgba\\(${hd},${hd},${hd},${Hm}\\)$`),qhe=new RegExp(`^rgba\\(${Vo},${Vo},${Vo},${Hm}\\)$`),Yhe=new RegExp(`^hsl\\(${Hm},${Vo},${Vo}\\)$`),Khe=new RegExp(`^hsla\\(${Hm},${Vo},${Vo},${Hm}\\)$`),YL={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};lh(Zl,Gm,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:KL,formatHex:KL,formatHex8:Zhe,formatHsl:Jhe,formatRgb:ZL,toString:ZL});function KL(){return this.rgb().formatHex()}function Zhe(){return this.rgb().formatHex8()}function Jhe(){return O8(this).formatHsl()}function ZL(){return this.rgb().formatRgb()}function Gm(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Whe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?JL(e):n===3?new br(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?rv(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?rv(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Hhe.exec(t))?new br(e[1],e[2],e[3],1):(e=Ghe.exec(t))?new br(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Xhe.exec(t))?rv(e[1],e[2],e[3],e[4]):(e=qhe.exec(t))?rv(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Yhe.exec(t))?tO(e[1],e[2]/100,e[3]/100,1):(e=Khe.exec(t))?tO(e[1],e[2]/100,e[3]/100,e[4]):YL.hasOwnProperty(t)?JL(YL[t]):t==="transparent"?new br(NaN,NaN,NaN,0):null}function JL(t){return new br(t>>16&255,t>>8&255,t&255,1)}function rv(t,e,n,r){return r<=0&&(t=e=n=NaN),new br(t,e,n,r)}function $A(t){return t instanceof Zl||(t=Gm(t)),t?(t=t.rgb(),new br(t.r,t.g,t.b,t.opacity)):new br}function zl(t,e,n,r){return arguments.length===1?$A(t):new br(t,e,n,r??1)}function br(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}lh(br,zl,Pg(Zl,{brighter(t){return t=t==null?Dd:Math.pow(Dd,t),new br(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?xu:Math.pow(xu,t),new br(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new br(Qc(this.r),Qc(this.g),Qc(this.b),S1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:QL,formatHex:QL,formatHex8:Qhe,formatRgb:eO,toString:eO}));function QL(){return`#${Vc(this.r)}${Vc(this.g)}${Vc(this.b)}`}function Qhe(){return`#${Vc(this.r)}${Vc(this.g)}${Vc(this.b)}${Vc((isNaN(this.opacity)?1:this.opacity)*255)}`}function eO(){const t=S1(this.opacity);return`${t===1?"rgb(":"rgba("}${Qc(this.r)}, ${Qc(this.g)}, ${Qc(this.b)}${t===1?")":`, ${t})`}`}function S1(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Qc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Vc(t){return t=Qc(t),(t<16?"0":"")+t.toString(16)}function tO(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new io(t,e,n,r)}function O8(t){if(t instanceof io)return new io(t.h,t.s,t.l,t.opacity);if(t instanceof Zl||(t=Gm(t)),!t)return new io;if(t instanceof io)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(e===s?o=(n-r)/a+(n0&&l<1?0:o,new io(o,a,l,t.opacity)}function M1(t,e,n,r){return arguments.length===1?O8(t):new io(t,e,n,r??1)}function io(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}lh(io,M1,Pg(Zl,{brighter(t){return t=t==null?Dd:Math.pow(Dd,t),new io(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?xu:Math.pow(xu,t),new io(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new br(xE(t>=240?t-240:t+120,i,r),xE(t,i,r),xE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new io(nO(this.h),iv(this.s),iv(this.l),S1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=S1(this.opacity);return`${t===1?"hsl(":"hsla("}${nO(this.h)}, ${iv(this.s)*100}%, ${iv(this.l)*100}%${t===1?")":`, ${t})`}`}}));function nO(t){return t=(t||0)%360,t<0?t+360:t}function iv(t){return Math.max(0,Math.min(1,t||0))}function xE(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const D8=Math.PI/180,F8=180/Math.PI,E1=18,z8=.96422,U8=1,B8=.82521,j8=4/29,pd=6/29,V8=3*pd*pd,epe=pd*pd*pd;function $8(t){if(t instanceof $o)return new $o(t.l,t.a,t.b,t.opacity);if(t instanceof Ea)return W8(t);t instanceof br||(t=$A(t));var e=SE(t.r),n=SE(t.g),r=SE(t.b),i=bE((.2225045*e+.7168786*n+.0606169*r)/U8),s,o;return e===n&&n===r?s=o=i:(s=bE((.4360747*e+.3850649*n+.1430804*r)/z8),o=bE((.0139322*e+.0971045*n+.7141733*r)/B8)),new $o(116*i-16,500*(s-i),200*(i-o),t.opacity)}function OT(t,e,n,r){return arguments.length===1?$8(t):new $o(t,e,n,r??1)}function $o(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}lh($o,OT,Pg(Zl,{brighter(t){return new $o(this.l+E1*(t??1),this.a,this.b,this.opacity)},darker(t){return new $o(this.l-E1*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=z8*_E(e),t=U8*_E(t),n=B8*_E(n),new br(wE(3.1338561*e-1.6168667*t-.4906146*n),wE(-.9787684*e+1.9161415*t+.033454*n),wE(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function bE(t){return t>epe?Math.pow(t,1/3):t/V8+j8}function _E(t){return t>pd?t*t*t:V8*(t-j8)}function wE(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function SE(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tpe(t){if(t instanceof Ea)return new Ea(t.h,t.c,t.l,t.opacity);if(t instanceof $o||(t=$8(t)),t.a===0&&t.b===0)return new Ea(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],s=t[r+1],o=r>0?t[r-1]:2*i-s,a=r()=>t;function G8(t,e){return function(n){return t+n*e}}function spe(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function GA(t,e){var n=e-t;return n?G8(t,n>180||n<-180?n-360*Math.round(n/360):n):F_(isNaN(t)?e:t)}function ope(t){return(t=+t)==1?_r:function(e,n){return n-e?spe(e,n,t):F_(isNaN(e)?n:e)}}function _r(t,e){var n=e-t;return n?G8(t,n):F_(isNaN(t)?e:t)}const FT=function t(e){var n=ope(e);function r(i,s){var o=n((i=zl(i)).r,(s=zl(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),c=_r(i.opacity,s.opacity);return function(u){return i.r=o(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function ape(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),s=new Array(n),o,a;for(o=0;on&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:Fd(r,i)})),n=ME.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Tpe(t,e,n){var r=t[0],i=t[1],s=e[0],o=e[1];return i2?Cpe:Tpe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?s:(l||(l=a(t.map(r),e,n)))(r(o(h)))}return f.invert=function(h){return o(i((c||(c=a(e,t.map(r),Fd)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Mpe),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=qA,u()},f.clamp=function(h){return arguments.length?(o=h?!0:Oo,u()):o!==Oo},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(s=h,f):s},function(h,m){return r=h,i=m,u()}}function Rpe(){return B_()(Oo,Oo)}function Ape(t,e,n,r){var i=o6(t,e,n),s;switch(r=Tm(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(s=fie(i,o))&&(r.precision=s),c6(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=die(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=uie(i))&&(r.precision=s-(r.type==="%")*2);break}}return Jo(r)}function YA(t){var e=t.domain;return t.ticks=function(n){var r=e();return pT(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Ape(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,s=r.length-1,o=r[i],a=r[s],l,c,u=10;for(a0;){if(c=mT(o,a,n),c===l)return r[i]=o,r[s]=a,e(r);if(c>0)o=Math.floor(o/c)*c,a=Math.ceil(a/c)*c;else if(c<0)o=Math.ceil(o*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function K8(){var t=Rpe();return t.copy=function(){return U_(t,K8())},O_.apply(t,arguments),YA(t)}function Ppe(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],o;return sMath.pow(t,e)}function Ope(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function cO(t){return(e,n)=>-t(-e,n)}function Dpe(t){const e=t(aO,lO),n=e.domain;let r=10,i,s;function o(){return i=Ope(r),s=Lpe(r),n()[0]<0?(i=cO(i),s=cO(s),t(Ipe,Npe)):t(aO,lO),e}return e.base=function(a){return arguments.length?(r=+a,o()):r},e.domain=function(a){return arguments.length?(n(a),o()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=m;++h)for(y=1;yu)break;g.push(x)}}else for(;h<=m;++h)for(y=r-1;y>=1;--y)if(x=h>0?y/s(-h):y*s(h),!(xu)break;g.push(x)}g.length*2{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Tm(l)).precision==null&&(l.trim=!0),l=Jo(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/s(Math.round(i(u)));return f*rn(Ppe(n(),{floor:a=>s(Math.floor(i(a))),ceil:a=>s(Math.ceil(i(a)))})),e}function Z8(){const t=Dpe(B_()).domain([1,10]);return t.copy=()=>U_(t,Z8()).base(t.base()),O_.apply(t,arguments),t}function uO(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function fO(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Fpe(t){var e=1,n=t(uO(e),fO(e));return n.constant=function(r){return arguments.length?t(uO(e=+r),fO(e)):e},YA(n)}function J8(){var t=Fpe(B_());return t.copy=function(){return U_(t,J8()).constant(t.constant())},O_.apply(t,arguments)}function dO(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function zpe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Upe(t){return t<0?-t*t:t*t}function Bpe(t){var e=t(Oo,Oo),n=1;function r(){return n===1?t(Oo,Oo):n===.5?t(zpe,Upe):t(dO(n),dO(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},YA(e)}function KA(){var t=Bpe(B_());return t.copy=function(){return U_(t,KA()).exponent(t.exponent())},O_.apply(t,arguments),t}function jpe(){return KA.apply(null,arguments).exponent(.5)}const EE=new Date,TE=new Date;function Or(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const o=i(s),a=i.ceil(s);return s-o(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,a)=>{const l=[];if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s0))return l;let c;do l.push(c=new Date(+s)),e(s,a),t(s);while(cOr(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),n&&(i.count=(s,o)=>(EE.setTime(+s),TE.setTime(+o),t(EE),t(TE),Math.floor(n(EE,TE))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const qm=1e3,Ul=qm*60,Ym=Ul*60,Km=Ym*24,Q8=Km*7,ZA=Or(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*qm)},(t,e)=>(e-t)/qm,t=>t.getUTCSeconds());ZA.range;const e9=Or(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qm)},(t,e)=>{t.setTime(+t+e*Ul)},(t,e)=>(e-t)/Ul,t=>t.getMinutes());e9.range;const t9=Or(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Ul)},(t,e)=>(e-t)/Ul,t=>t.getUTCMinutes());t9.range;const n9=Or(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qm-t.getMinutes()*Ul)},(t,e)=>{t.setTime(+t+e*Ym)},(t,e)=>(e-t)/Ym,t=>t.getHours());n9.range;const r9=Or(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ym)},(t,e)=>(e-t)/Ym,t=>t.getUTCHours());r9.range;const i9=Or(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ul)/Km,t=>t.getDate()-1);i9.range;const s9=Or(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Km,t=>t.getUTCDate()-1);s9.range;const Vpe=Or(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Km,t=>Math.floor(t/Km));Vpe.range;function Lu(t){return Or(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Ul)/Q8)}const o9=Lu(0),$pe=Lu(1),Wpe=Lu(2),Hpe=Lu(3),Gpe=Lu(4),Xpe=Lu(5),qpe=Lu(6);o9.range;$pe.range;Wpe.range;Hpe.range;Gpe.range;Xpe.range;qpe.range;function Ou(t){return Or(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Q8)}const a9=Ou(0),Ype=Ou(1),Kpe=Ou(2),Zpe=Ou(3),Jpe=Ou(4),Qpe=Ou(5),eme=Ou(6);a9.range;Ype.range;Kpe.range;Zpe.range;Jpe.range;Qpe.range;eme.range;const l9=Or(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());l9.range;const c9=Or(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());c9.range;const JA=Or(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());JA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Or(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});JA.range;const QA=Or(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());QA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Or(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});QA.range;function tme(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function nme(t,e){e.range&&("padding"in t,t.range(e.range))}function rme(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function ime(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function sme(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function ome(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function ame(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var hO={lab:xpe,hcl:bpe,"hcl-long":_pe,hsl:ype,"hsl-long":vpe,cubehelix:wpe,"cubehelix-long":z_,rgb:FT};function lme(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return hO[t]}var e=t.type,n=t.gamma,r=hO[e];return typeof n>"u"?r:r.gamma(n)}function cme(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=lme(e.interpolate);t.interpolate(n)}}var ume=new Date(Date.UTC(2020,1,2,3,4,5)),fme="%Y-%m-%d %H:%M";function dme(t){var e=t.tickFormat(1,fme)(ume);return e==="2020-02-02 03:04"}var pO={day:i9,hour:n9,minute:e9,month:l9,second:ZA,week:o9,year:JA},mO={day:s9,hour:r9,minute:t9,month:c9,second:ZA,week:a9,year:QA};function hme(t,e){if("nice"in e&&typeof e.nice<"u"&&"nice"in t){var n=e.nice;if(typeof n=="boolean")n&&t.nice();else if(typeof n=="number")t.nice(n);else{var r=t,i=dme(r);if(typeof n=="string")r.nice(i?mO[n]:pO[n]);else{var s=n.interval,o=n.step,a=(i?mO[s]:pO[s]).every(o);a!=null&&r.nice(a)}}}}function pme(t,e){"padding"in t&&"padding"in e&&typeof e.padding<"u"&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&typeof e.paddingInner<"u"&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&typeof e.paddingOuter<"u"&&t.paddingOuter(e.paddingOuter)}function mme(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function gme(t,e){"round"in e&&typeof e.round<"u"&&(e.round&&"interpolate"in e&&typeof e.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(qA))}function yme(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function vme(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],s=i=0)&&(n[i]=t[i]);return n}function T1(){return T1=Object.assign?Object.assign.bind():function(t){for(var e=1;e ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return X(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:Aj,findFiberByHostInstance:d.findFiberByHostInstance||Pj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)d=!0;else{try{Xg=p.inject(d),xo=p}catch{}d=!!p.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,p,w,M){if(!ke)throw Error(o(363));d=cS(d,p);var I=He(d,w,M).disconnect;return{disconnect:function(){I()}}},n.registerMutableSourceForHydration=function(d,p){var w=p._getVersion;w=w(p._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[p,w]:d.mutableSourceEagerHydrationData.push(p,w)},n.runWithPriority=function(d,p){var w=cn;try{return cn=d,p()}finally{cn=w}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,p,w,M){var I=p.current,O=ei(),Y=Qa(I);return w=lI(w),p.context===null?p.context=w:p.pendingContext=w,p=ia(O,Y),p.payload={element:d},M=M===void 0?null:M,M!==null&&(p.callback=M),Ka(I,p),d=bs(I,Y,O),d!==null&&Jg(d,I,Y),Y},n};v8.exports=phe;var mhe=v8.exports;const ghe=Va(mhe),zA={},_8=t=>void Object.assign(zA,t);function yhe(t,e){function n(u,{args:f=[],attach:h,...m},y){let x=`${u[0].toUpperCase()}${u.slice(1)}`,v;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;v=kf(g,{type:u,root:y,attach:h,primitive:!0})}else{const g=zA[x];if(!g)throw new Error(`R3F: ${x} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(f))throw new Error("R3F: The args prop must be an array!");v=kf(new g(...f),{type:u,root:y,attach:h,memoizedProps:{args:f}})}return v.__r3f.attach===void 0&&(v.isBufferGeometry?v.__r3f.attach="geometry":v.isMaterial&&(v.__r3f.attach="material")),x!=="inject"&&hE(v,m),v}function r(u,f){let h=!1;if(f){var m,y;(m=f.__r3f)!=null&&m.attach?dE(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),h=!0),h||(y=u.__r3f)==null||y.objects.push(f),f.__r3f||kf(f,{}),f.__r3f.parent=u,kT(f),Lf(f)}}function i(u,f,h){let m=!1;if(f){var y,x;if((y=f.__r3f)!=null&&y.attach)dE(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){f.parent=u,f.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:f});const v=u.children.filter(b=>b!==f),g=v.indexOf(h);u.children=[...v.slice(0,g),f,...v.slice(g)],m=!0}m||(x=u.__r3f)==null||x.objects.push(f),f.__r3f||kf(f,{}),f.__r3f.parent=u,kT(f),Lf(f)}}function s(u,f,h=!1){u&&[...u].forEach(m=>o(f,m,h))}function o(u,f,h){if(f){var m,y,x;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==f)),(y=f.__r3f)!=null&&y.attach)UL(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var v;u.remove(f),(v=f.__r3f)!=null&&v.root&&Mhe(Wv(f),f)}const b=(x=f.__r3f)==null?void 0:x.primitive,_=!b&&(h===void 0?f.dispose!==null:h);if(!b){var g;s((g=f.__r3f)==null?void 0:g.objects,f,_),s(f.children,f,_)}if(delete f.__r3f,_&&f.dispose&&f.type!=="Scene"){const S=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?IT.unstable_scheduleCallback(IT.unstable_IdlePriority,S):S()}Lf(u)}}function a(u,f,h,m){var y;const x=(y=u.__r3f)==null?void 0:y.parent;if(!x)return;const v=n(f,h,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&r(v,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>r(v,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||o(x,u),v.parent&&(v.__r3f.autoRemovedBeforeAppend=!0),r(x,v),v.raycast&&v.__r3f.eventCount&&Wv(v).getState().internal.interaction.push(v),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=v,g.ref&&(typeof g.ref=="function"?g.ref(v):g.ref.current=v))})}const l=()=>{};return{reconciler:ghe({createInstance:n,removeChild:o,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,f)=>{if(!f)return;const h=u.getState().scene;h.__r3f&&(h.__r3f.root=u,r(h,f))},removeChildFromContainer:(u,f)=>{f&&o(u.getState().scene,f)},insertInContainerBefore:(u,f,h)=>{if(!f||!h)return;const m=u.getState().scene;m.__r3f&&i(m,f,h)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var f;return!!((f=u==null?void 0:u.__r3f)!=null?f:{}).handlers},prepareUpdate(u,f,h,m){var y;if(((y=u==null?void 0:u.__r3f)!=null?y:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:v=[],children:g,...b}=m,{args:_=[],children:S,...C}=h;if(!Array.isArray(v))throw new Error("R3F: the args prop must be an array!");if(v.some((A,L)=>A!==_[L]))return[!0];const P=R8(u,b,C,!0);return P.changes.length?[!1,P]:null}},commitUpdate(u,[f,h],m,y,x,v){f?a(u,m,x,v):hE(u,h)},commitMount(u,f,h,m){var y;const x=(y=u.__r3f)!=null?y:{};u.raycast&&x.handlers&&x.eventCount&&Wv(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>kf(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:h,parent:m}=(f=u.__r3f)!=null?f:{};h&&m&&UL(m,u,h),u.isObject3D&&(u.visible=!1),Lf(u)},unhideInstance(u,f){var h;const{attach:m,parent:y}=(h=u.__r3f)!=null?h:{};m&&y&&dE(y,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Lf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():ed.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&En.fun(performance.now)?performance.now:En.fun(Date.now)?Date.now:()=>0,scheduleTimeout:En.fun(setTimeout)?setTimeout:void 0,cancelTimeout:En.fun(clearTimeout)?clearTimeout:void 0}),applyProps:hE}}var OL,DL;const fE=t=>"colorSpace"in t||"outputColorSpace"in t,w8=()=>{var t;return(t=zA.ColorManagement)!=null?t:null},S8=t=>t&&t.isOrthographicCamera,vhe=t=>t&&t.hasOwnProperty("current"),Ag=typeof window<"u"&&((OL=window.document)!=null&&OL.createElement||((DL=window.navigator)==null?void 0:DL.product)==="ReactNative")?R.useLayoutEffect:R.useEffect;function M8(t){const e=R.useRef(t);return Ag(()=>void(e.current=t),[t]),e}function xhe({set:t}){return Ag(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class E8 extends R.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}E8.getDerivedStateFromError=()=>({error:!0});const T8="__default",FL=new Map,bhe=t=>t&&!!t.memoized&&!!t.changes;function C8(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const cp=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function Wv(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const En={obj:t=>t===Object(t)&&!En.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(En.str(t)||En.num(t)||En.boo(t))return t===e;const s=En.obj(t);if(s&&r==="reference")return t===e;const o=En.arr(t);if(o&&n==="reference")return t===e;if((o||s)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(s&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!En.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(En.und(a)){if(o&&t.length===0&&e.length===0||s&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function _he(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function kf(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function NT(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((s,o)=>s[o],t),{target:n,key:i}}else return{target:n,key:e}}const zL=/-\d+$/;function dE(t,e,n){if(En.str(n)){if(zL.test(n)){const s=n.replace(zL,""),{target:o,key:a}=NT(t,s);Array.isArray(o[a])||(o[a]=[])}const{target:r,key:i}=NT(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function UL(t,e,n){var r,i;if(En.str(n)){const{target:s,key:o}=NT(t,n),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function R8(t,{children:e,key:n,ref:r,...i},{children:s,key:o,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(i),h=[];if(c){const y=Object.keys(l);for(let x=0;x{var v;if((v=t.__r3f)!=null&&v.primitive&&y==="object"||En.equ(x,l[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return h.push([y,x,!0,[]]);let g=[];y.includes("-")&&(g=y.split("-")),h.push([y,x,!1,g]);for(const b in i){const _=i[b];b.startsWith(`${y}-`)&&h.push([b,_,!1,b.split("-")])}});const m={...i};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(m.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(m.attach=u.memoizedProps.attach),{memoized:m,changes:h}}function hE(t,e){var n;const r=t.__r3f,i=r==null?void 0:r.root,s=i==null||i.getState==null?void 0:i.getState(),{memoized:o,changes:a}=bhe(e)?e:R8(t,e),l=r==null?void 0:r.eventCount;t.__r3f&&(t.__r3f.memoizedProps=o);for(let h=0;h_[S],t),!(b&&b.set))){const[_,...S]=v.reverse();g=S.reverse().reduce((C,P)=>C[P],t),m=_}if(y===T8+"remove")if(g.constructor){let _=FL.get(g.constructor);_||(_=new g.constructor,FL.set(g.constructor,_)),y=_[m]}else y=0;if(x&&r)y?r.handlers[m]=y:delete r.handlers[m],r.eventCount=Object.keys(r.handlers).length;else if(b&&b.set&&(b.copy||b instanceof Zc)){if(Array.isArray(y))b.fromArray?b.fromArray(y):b.set(...y);else if(b.copy&&y&&y.constructor&&b.constructor===y.constructor)b.copy(y);else if(y!==void 0){var c;const _=(c=b)==null?void 0:c.isColor;!_&&b.setScalar?b.setScalar(y):b instanceof Zc&&y instanceof Zc?b.mask=y.mask:b.set(y),!w8()&&s&&!s.linear&&_&&b.convertSRGBToLinear()}}else{var u;if(g[m]=y,(u=g[m])!=null&&u.isTexture&&g[m].format===Ir&&g[m].type===$i&&s){const _=g[m];fE(_)&&fE(s.gl)?_.colorSpace=s.gl.outputColorSpace:_.encoding=s.gl.outputEncoding}}Lf(t)}if(r&&r.parent&&t.raycast&&l!==r.eventCount){const h=Wv(t).getState().internal,m=h.interaction.indexOf(t);m>-1&&h.interaction.splice(m,1),r.eventCount&&h.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&kT(t),t}function Lf(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function kT(t){t.onUpdate==null||t.onUpdate(t)}function whe(t,e){t.manual||(S8(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function tv(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function She(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return ed.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return ed.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return ed.ContinuousEventPriority;default:return ed.DefaultEventPriority}}function A8(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function Mhe(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{A8(n.capturedMap,e,r,i)})}function Ehe(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],f=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+f*f))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var f;return(f=c.__r3f)==null?void 0:f.handlers["onPointer"+u]}))}function r(l,c){const u=t.getState(),f=new Set,h=[],m=c?c(u.internal.interaction):u.internal.interaction;for(let g=0;g{const _=cp(g.object),S=cp(b.object);return!_||!S?g.distance-b.distance:S.events.priority-_.events.priority||g.distance-b.distance}).filter(g=>{const b=tv(g);return f.has(b)?!1:(f.add(b),!0)});u.events.filter&&(x=u.events.filter(x,u));for(const g of x){let b=g.object;for(;b;){var v;(v=b.__r3f)!=null&&v.eventCount&&h.push({...g,eventObject:b}),b=b.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let g of u.internal.capturedMap.get(l.pointerId).values())f.has(tv(g.intersection))||h.push(g.intersection);return h}function i(l,c,u,f){const h=t.getState();if(l.length){const m={stopped:!1};for(const y of l){const x=cp(y.object)||h,{raycaster:v,pointer:g,camera:b,internal:_}=x,S=new H(g.x,g.y,0).unproject(b),C=T=>{var N,z;return(N=(z=_.capturedMap.get(T))==null?void 0:z.has(y.eventObject))!=null?N:!1},P=T=>{const N={intersection:y,target:c.target};_.capturedMap.has(T)?_.capturedMap.get(T).set(y.eventObject,N):_.capturedMap.set(T,new Map([[y.eventObject,N]])),c.target.setPointerCapture(T)},A=T=>{const N=_.capturedMap.get(T);N&&A8(_.capturedMap,y.eventObject,N,T)};let L={};for(let T in c){let N=c[T];typeof N!="function"&&(L[T]=N)}let k={...y,...L,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:S,ray:v.ray,camera:b,stopPropagation(){const T="pointerId"in c&&_.capturedMap.get(c.pointerId);if((!T||T.has(y.eventObject))&&(k.stopped=m.stopped=!0,_.hovered.size&&Array.from(_.hovered.values()).find(N=>N.eventObject===y.eventObject))){const N=l.slice(0,l.indexOf(y));s([...N,y])}},target:{hasPointerCapture:C,setPointerCapture:P,releasePointerCapture:A},currentTarget:{hasPointerCapture:C,setPointerCapture:P,releasePointerCapture:A},nativeEvent:c};if(f(k),m.stopped===!0)break}}return l}function s(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(f=>f.object===u.object&&f.index===u.index&&f.instanceId===u.instanceId)){const h=u.eventObject.__r3f,m=h==null?void 0:h.handlers;if(c.hovered.delete(tv(u)),h!=null&&h.eventCount){const y={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(y),m.onPointerLeave==null||m.onPointerLeave(y)}}}function o(l,c){for(let u=0;us([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),s([]))})}}return function(u){const{onPointerMissed:f,internal:h}=t.getState();h.lastEvent.current=u;const m=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",v=r(u,m?n:void 0),g=y?e(u):0;l==="onPointerDown"&&(h.initialClick=[u.offsetX,u.offsetY],h.initialHits=v.map(_=>_.eventObject)),y&&!v.length&&g<=2&&(o(u,h.interaction),f&&f(u)),m&&s(v);function b(_){const S=_.eventObject,C=S.__r3f,P=C==null?void 0:C.handlers;if(C!=null&&C.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const A=tv(_),L=h.hovered.get(A);L?L.stopped&&_.stopPropagation():(h.hovered.set(A,_),P.onPointerOver==null||P.onPointerOver(_),P.onPointerEnter==null||P.onPointerEnter(_))}P.onPointerMove==null||P.onPointerMove(_)}else{const A=P[l];A?(!y||h.initialHits.includes(S))&&(o(u,h.interaction.filter(L=>!h.initialHits.includes(L))),A(_)):y&&h.initialHits.includes(S)&&o(u,h.interaction.filter(L=>!h.initialHits.includes(L)))}}i(v,u,g,b)}}return{handlePointer:a}}const P8=t=>!!(t!=null&&t.render),I8=R.createContext(null),The=(t,e)=>{const n=hhe((a,l)=>{const c=new H,u=new H,f=new H;function h(g=l().camera,b=u,_=l().size){const{width:S,height:C,top:P,left:A}=_,L=S/C;b.isVector3?f.copy(b):f.set(...b);const k=g.getWorldPosition(c).distanceTo(f);if(S8(g))return{width:S/g.zoom,height:C/g.zoom,top:P,left:A,factor:1,distance:k,aspect:L};{const T=g.fov*Math.PI/180,N=2*Math.tan(T/2)*k,z=N*(S/C);return{width:z,height:N,top:P,left:A,factor:S/z,distance:k,aspect:L}}}let m;const y=g=>a(b=>({performance:{...b.performance,current:g}})),x=new Ne;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>t(l(),g),advance:(g,b)=>e(g,b,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new NA,pointer:x,mouse:x,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&y(g.performance.min),m=setTimeout(()=>y(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:h},setEvents:g=>a(b=>({...b,events:{...b.events,...g}})),setSize:(g,b,_,S,C)=>{const P=l().camera,A={width:g,height:b,top:S||0,left:C||0,updateStyle:_};a(L=>({size:A,viewport:{...L.viewport,...h(P,u,A)}}))},setDpr:g=>a(b=>{const _=C8(g);return{viewport:{...b.viewport,dpr:_,initialDpr:b.viewport.initialDpr||_}}}),setFrameloop:(g="always")=>{const b=l().clock;b.stop(),b.elapsedTime=0,g!=="never"&&(b.start(),b.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:R.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,b,_)=>{const S=l().internal;return S.priority=S.priority+(b>0?1:0),S.subscribers.push({ref:g,priority:b,store:_}),S.subscribers=S.subscribers.sort((C,P)=>C.priority-P.priority),()=>{const C=l().internal;C!=null&&C.subscribers&&(C.priority=C.priority-(b>0?1:0),C.subscribers=C.subscribers.filter(P=>P.ref!==g))}}}}}),r=n.getState();let i=r.size,s=r.viewport.dpr,o=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:f}=n.getState();if(l.width!==i.width||l.height!==i.height||c.dpr!==s){var h;i=l,s=c.dpr,whe(a,l),u.setPixelRatio(c.dpr);const m=(h=l.updateStyle)!=null?h:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,m)}a!==o&&(o=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let nv,Che=new Set,Rhe=new Set,Ahe=new Set;function pE(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function up(t,e){switch(t){case"before":return pE(Che,e);case"after":return pE(Rhe,e);case"tail":return pE(Ahe,e)}}let mE,gE;function yE(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),mE=e.internal.subscribers,nv=0;nv0)&&!((u=s.gl.xr)!=null&&u.isPresenting)&&(r+=yE(c,s))}if(n=!1,up("after",c),r===0)return up("tail",c),e=!1,cancelAnimationFrame(i)}function a(c,u=1){var f;if(!c)return t.forEach(h=>a(h.store.getState(),u));(f=c.gl.xr)!=null&&f.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,u=!0,f,h){if(u&&up("before",c),f)yE(c,f,h);else for(const m of t.values())yE(c,m.store.getState());u&&up("after",c)}return{loop:o,invalidate:a,advance:l}}function N8(){const t=R.useContext(I8);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Er(t=n=>n,e){return N8()(t,e)}function UA(t,e=0){const n=N8(),r=n.getState().internal.subscribe,i=M8(t);return Ag(()=>r(i,e,n),[e,r,n]),null}const Dd=new Map,{invalidate:BL,advance:jL}=Phe(Dd),{reconciler:w1,applyProps:Sf}=yhe(Dd,She),Mf={objects:"shallow",strict:!1},Ihe=(t,e)=>{const n=typeof t=="function"?t(e):t;return P8(n)?n:new g8({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function Nhe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:s,left:o,updateStyle:a=n}=e;return{width:r,height:i,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:s,left:o}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:s,left:o,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function khe(t){const e=Dd.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,s=r||The(BL,jL),o=n||w1.createContainer(s,ed.ConcurrentRoot,null,!1,null,"",i,null);e||Dd.set(t,{fiber:o,store:s});let a,l=!1,c;return{configure(u={}){let{gl:f,size:h,scene:m,events:y,onCreated:x,shadows:v=!1,linear:g=!1,flat:b=!1,legacy:_=!1,orthographic:S=!1,frameloop:C="always",dpr:P=[1,2],performance:A,raycaster:L,camera:k,onPointerMissed:T}=u,N=s.getState(),z=N.gl;N.gl||N.set({gl:z=Ihe(f,t)});let D=N.raycaster;D||N.set({raycaster:D=new l8});const{params:B,...G}=L||{};if(En.equ(G,D,Mf)||Sf(D,{...G}),En.equ(B,D.params,Mf)||Sf(D,{params:{...D.params,...B}}),!N.camera||N.camera===c&&!En.equ(c,k,Mf)){c=k;const K=k instanceof bg,Q=K?k:S?new Rg(0,0,0,0,.1,1e3):new xr(75,0,.1,1e3);K||(Q.position.z=5,k&&(Sf(Q,k),("aspect"in k||"left"in k||"right"in k||"bottom"in k||"top"in k)&&(Q.manual=!0,Q.updateProjectionMatrix())),!N.camera&&!(k!=null&&k.rotation)&&Q.lookAt(0,0,0)),N.set({camera:Q}),D.camera=Q}if(!N.scene){let K;m!=null&&m.isScene?K=m:(K=new dA,m&&Sf(K,m)),N.set({scene:kf(K)})}if(!N.xr){var X;const K=(fe,J)=>{const de=s.getState();de.frameloop!=="never"&&jL(fe,!0,de,J)},Q=()=>{const fe=s.getState();fe.gl.xr.enabled=fe.gl.xr.isPresenting,fe.gl.xr.setAnimationLoop(fe.gl.xr.isPresenting?K:null),fe.gl.xr.isPresenting||BL(fe)},he={connect(){const fe=s.getState().gl;fe.xr.addEventListener("sessionstart",Q),fe.xr.addEventListener("sessionend",Q)},disconnect(){const fe=s.getState().gl;fe.xr.removeEventListener("sessionstart",Q),fe.xr.removeEventListener("sessionend",Q)}};typeof((X=z.xr)==null?void 0:X.addEventListener)=="function"&&he.connect(),N.set({xr:he})}if(z.shadowMap){const K=z.shadowMap.enabled,Q=z.shadowMap.type;if(z.shadowMap.enabled=!!v,En.boo(v))z.shadowMap.type=Dp;else if(En.str(v)){var Z;const he={basic:v6,percentage:s_,soft:Dp,variance:Qs};z.shadowMap.type=(Z=he[v])!=null?Z:Dp}else En.obj(v)&&Object.assign(z.shadowMap,v);(K!==z.shadowMap.enabled||Q!==z.shadowMap.type)&&(z.shadowMap.needsUpdate=!0)}const F=w8();F&&("enabled"in F?F.enabled=!_:"legacyMode"in F&&(F.legacyMode=_)),l||Sf(z,{outputEncoding:g?3e3:3001,toneMapping:b?Bo:KR}),N.legacy!==_&&N.set(()=>({legacy:_})),N.linear!==g&&N.set(()=>({linear:g})),N.flat!==b&&N.set(()=>({flat:b})),f&&!En.fun(f)&&!P8(f)&&!En.equ(f,z,Mf)&&Sf(z,f),y&&!N.events.handlers&&N.set({events:y(s)});const q=Nhe(t,h);return En.equ(q,N.size,Mf)||N.setSize(q.width,q.height,q.updateStyle,q.top,q.left),P&&N.viewport.dpr!==C8(P)&&N.setDpr(P),N.frameloop!==C&&N.setFrameloop(C),N.onPointerMissed||N.set({onPointerMissed:T}),A&&!En.equ(A,N.performance,Mf)&&N.set(K=>({performance:{...K.performance,...A}})),a=x,l=!0,this},render(u){return l||this.configure(),w1.updateContainer(E.jsx(Lhe,{store:s,children:u,onCreated:a,rootElement:t}),o,null,()=>{}),s},unmount(){k8(t)}}}function Lhe({store:t,children:e,onCreated:n,rootElement:r}){return Ag(()=>{const i=t.getState();i.set(s=>({internal:{...s.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),E.jsx(I8.Provider,{value:t,children:e})}function k8(t,e){const n=Dd.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),w1.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var s,o,a,l;i.events.disconnect==null||i.events.disconnect(),(s=i.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),_he(i),Dd.delete(t)}catch{}},500)})}}w1.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:R.version});const vE={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function Ohe(t){const{handlePointer:e}=Ehe(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(vE).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:s}=t.getState();s.disconnect==null||s.disconnect(),i(o=>({events:{...o.events,connected:n}})),Object.entries((r=s.handlers)!=null?r:[]).forEach(([o,a])=>{const[l,c]=vE[o];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([s,o])=>{if(r&&r.connected instanceof HTMLElement){const[a]=vE[s];r.connected.removeEventListener(a,o)}}),n(s=>({events:{...s.events,connected:void 0}}))}}}}function VL(t,e){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>t(...r),e)}}function Dhe({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,o]=R.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=R.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=R.useRef(!1);R.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[f,h,m]=R.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:b,top:_,width:S,height:C,bottom:P,right:A,x:L,y:k}=a.current.element.getBoundingClientRect(),T={left:b,top:_,width:S,height:C,bottom:P,right:A,x:L,y:k};a.current.element instanceof HTMLElement&&r&&(T.height=a.current.element.offsetHeight,T.width=a.current.element.offsetWidth),Object.freeze(T),u.current&&!Bhe(a.current.lastBounds,T)&&o(a.current.lastBounds=T)};return[g,c?VL(g,c):g,l?VL(g,l):g]},[o,r,l,c]);function y(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function x(){a.current.element&&(a.current.resizeObserver=new i(m),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(g=>g.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const v=g=>{!g||g===a.current.element||(y(),a.current.element=g,a.current.scrollContainers=L8(g),x())};return zhe(m,!!e),Fhe(h),R.useEffect(()=>{y(),x()},[e,m,h]),R.useEffect(()=>y,[]),[v,s,f]}function Fhe(t){R.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function zhe(t,e){R.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function L8(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...L8(t.parentElement)]}const Uhe=["x","y","top","bottom","left","right","width","height"],Bhe=(t,e)=>Uhe.every(n=>t[n]===e[n]);var jhe=Object.defineProperty,Vhe=Object.defineProperties,$he=Object.getOwnPropertyDescriptors,$L=Object.getOwnPropertySymbols,Whe=Object.prototype.hasOwnProperty,Hhe=Object.prototype.propertyIsEnumerable,WL=(t,e,n)=>e in t?jhe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HL=(t,e)=>{for(var n in e||(e={}))Whe.call(e,n)&&WL(t,n,e[n]);if($L)for(var n of $L(e))Hhe.call(e,n)&&WL(t,n,e[n]);return t},Ghe=(t,e)=>Vhe(t,$he(e)),GL,XL;typeof window<"u"&&((GL=window.document)!=null&&GL.createElement||((XL=window.navigator)==null?void 0:XL.product)==="ReactNative")?R.useLayoutEffect:R.useEffect;function O8(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const i=O8(r,e,n);if(i)return i;r=r.sibling}}function D8(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const qL=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=qL;return}return qL.apply(this,arguments)};const BA=D8(R.createContext(null));class F8 extends R.Component{render(){return R.createElement(BA.Provider,{value:this._reactInternals},this.props.children)}}function Xhe(){const t=R.useContext(BA);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=R.useId();return R.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=O8(r,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(i)return i}},[t,e])}function qhe(){const t=Xhe(),[e]=R.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const i=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;i&&i!==BA&&!e.has(i)&&e.set(i,R.useContext(D8(i)))}n=n.return}return e}function Yhe(){const t=qhe();return R.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>R.createElement(e,null,R.createElement(n.Provider,Ghe(HL({},r),{value:t.get(n)}))),e=>R.createElement(F8,HL({},e))),[t])}const Khe=R.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:s,events:o=Ohe,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:y,dpr:x,performance:v,raycaster:g,camera:b,scene:_,onPointerMissed:S,onCreated:C,...P},A){R.useMemo(()=>_8(uhe),[]);const L=Yhe(),[k,T]=Dhe({scroll:!0,debounce:{scroll:50,resize:0},...r}),N=R.useRef(null),z=R.useRef(null);R.useImperativeHandle(A,()=>N.current);const D=M8(S),[B,G]=R.useState(!1),[X,Z]=R.useState(!1);if(B)throw B;if(X)throw X;const F=R.useRef(null);Ag(()=>{const K=N.current;T.width>0&&T.height>0&&K&&(F.current||(F.current=khe(K)),F.current.configure({gl:s,events:o,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:y,dpr:x,performance:v,raycaster:g,camera:b,scene:_,size:T,onPointerMissed:(...Q)=>D.current==null?void 0:D.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(a?vhe(a)?a.current:a:z.current),l&&Q.setEvents({compute:(he,fe)=>{const J=he[l+"X"],de=he[l+"Y"];fe.pointer.set(J/fe.size.width*2-1,-(de/fe.size.height)*2+1),fe.raycaster.setFromCamera(fe.pointer,fe.camera)}}),C==null||C(Q)}}),F.current.render(E.jsx(L,{children:E.jsx(E8,{set:Z,children:E.jsx(R.Suspense,{fallback:E.jsx(xhe,{set:G}),children:e})})})))}),R.useEffect(()=>{const K=N.current;if(K)return()=>k8(K)},[]);const q=a?"none":"auto";return E.jsx("div",{ref:z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...i},...P,children:E.jsx("div",{ref:k,style:{width:"100%",height:"100%"},children:E.jsx("canvas",{ref:N,style:{display:"block"},children:n})})})}),Zhe=R.forwardRef(function(e,n){return E.jsx(F8,{children:E.jsx(Khe,{...e,ref:n})})});function O_(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function ch(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Zl(){}var xu=.7,Fd=1/xu,pd="\\s*([+-]?\\d+)\\s*",Hm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Jhe=/^#([0-9a-f]{3,8})$/,Qhe=new RegExp(`^rgb\\(${pd},${pd},${pd}\\)$`),epe=new RegExp(`^rgb\\(${Vo},${Vo},${Vo}\\)$`),tpe=new RegExp(`^rgba\\(${pd},${pd},${pd},${Hm}\\)$`),npe=new RegExp(`^rgba\\(${Vo},${Vo},${Vo},${Hm}\\)$`),rpe=new RegExp(`^hsl\\(${Hm},${Vo},${Vo}\\)$`),ipe=new RegExp(`^hsla\\(${Hm},${Vo},${Vo},${Hm}\\)$`),YL={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};ch(Zl,Gm,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:KL,formatHex:KL,formatHex8:spe,formatHsl:ope,formatRgb:ZL,toString:ZL});function KL(){return this.rgb().formatHex()}function spe(){return this.rgb().formatHex8()}function ope(){return z8(this).formatHsl()}function ZL(){return this.rgb().formatRgb()}function Gm(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Jhe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?JL(e):n===3?new br(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?rv(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?rv(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Qhe.exec(t))?new br(e[1],e[2],e[3],1):(e=epe.exec(t))?new br(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tpe.exec(t))?rv(e[1],e[2],e[3],e[4]):(e=npe.exec(t))?rv(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rpe.exec(t))?tO(e[1],e[2]/100,e[3]/100,1):(e=ipe.exec(t))?tO(e[1],e[2]/100,e[3]/100,e[4]):YL.hasOwnProperty(t)?JL(YL[t]):t==="transparent"?new br(NaN,NaN,NaN,0):null}function JL(t){return new br(t>>16&255,t>>8&255,t&255,1)}function rv(t,e,n,r){return r<=0&&(t=e=n=NaN),new br(t,e,n,r)}function jA(t){return t instanceof Zl||(t=Gm(t)),t?(t=t.rgb(),new br(t.r,t.g,t.b,t.opacity)):new br}function zl(t,e,n,r){return arguments.length===1?jA(t):new br(t,e,n,r??1)}function br(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ch(br,zl,Pg(Zl,{brighter(t){return t=t==null?Fd:Math.pow(Fd,t),new br(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?xu:Math.pow(xu,t),new br(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new br(Qc(this.r),Qc(this.g),Qc(this.b),S1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:QL,formatHex:QL,formatHex8:ape,formatRgb:eO,toString:eO}));function QL(){return`#${Vc(this.r)}${Vc(this.g)}${Vc(this.b)}`}function ape(){return`#${Vc(this.r)}${Vc(this.g)}${Vc(this.b)}${Vc((isNaN(this.opacity)?1:this.opacity)*255)}`}function eO(){const t=S1(this.opacity);return`${t===1?"rgb(":"rgba("}${Qc(this.r)}, ${Qc(this.g)}, ${Qc(this.b)}${t===1?")":`, ${t})`}`}function S1(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Qc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Vc(t){return t=Qc(t),(t<16?"0":"")+t.toString(16)}function tO(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new io(t,e,n,r)}function z8(t){if(t instanceof io)return new io(t.h,t.s,t.l,t.opacity);if(t instanceof Zl||(t=Gm(t)),!t)return new io;if(t instanceof io)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(e===s?o=(n-r)/a+(n0&&l<1?0:o,new io(o,a,l,t.opacity)}function M1(t,e,n,r){return arguments.length===1?z8(t):new io(t,e,n,r??1)}function io(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ch(io,M1,Pg(Zl,{brighter(t){return t=t==null?Fd:Math.pow(Fd,t),new io(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?xu:Math.pow(xu,t),new io(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new br(xE(t>=240?t-240:t+120,i,r),xE(t,i,r),xE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new io(nO(this.h),iv(this.s),iv(this.l),S1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=S1(this.opacity);return`${t===1?"hsl(":"hsla("}${nO(this.h)}, ${iv(this.s)*100}%, ${iv(this.l)*100}%${t===1?")":`, ${t})`}`}}));function nO(t){return t=(t||0)%360,t<0?t+360:t}function iv(t){return Math.max(0,Math.min(1,t||0))}function xE(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const U8=Math.PI/180,B8=180/Math.PI,E1=18,j8=.96422,V8=1,$8=.82521,W8=4/29,md=6/29,H8=3*md*md,lpe=md*md*md;function G8(t){if(t instanceof $o)return new $o(t.l,t.a,t.b,t.opacity);if(t instanceof Ea)return X8(t);t instanceof br||(t=jA(t));var e=SE(t.r),n=SE(t.g),r=SE(t.b),i=bE((.2225045*e+.7168786*n+.0606169*r)/V8),s,o;return e===n&&n===r?s=o=i:(s=bE((.4360747*e+.3850649*n+.1430804*r)/j8),o=bE((.0139322*e+.0971045*n+.7141733*r)/$8)),new $o(116*i-16,500*(s-i),200*(i-o),t.opacity)}function LT(t,e,n,r){return arguments.length===1?G8(t):new $o(t,e,n,r??1)}function $o(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}ch($o,LT,Pg(Zl,{brighter(t){return new $o(this.l+E1*(t??1),this.a,this.b,this.opacity)},darker(t){return new $o(this.l-E1*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=j8*_E(e),t=V8*_E(t),n=$8*_E(n),new br(wE(3.1338561*e-1.6168667*t-.4906146*n),wE(-.9787684*e+1.9161415*t+.033454*n),wE(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function bE(t){return t>lpe?Math.pow(t,1/3):t/H8+W8}function _E(t){return t>md?t*t*t:H8*(t-W8)}function wE(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function SE(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cpe(t){if(t instanceof Ea)return new Ea(t.h,t.c,t.l,t.opacity);if(t instanceof $o||(t=G8(t)),t.a===0&&t.b===0)return new Ea(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],s=t[r+1],o=r>0?t[r-1]:2*i-s,a=r()=>t;function Y8(t,e){return function(n){return t+n*e}}function hpe(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function WA(t,e){var n=e-t;return n?Y8(t,n>180||n<-180?n-360*Math.round(n/360):n):F_(isNaN(t)?e:t)}function ppe(t){return(t=+t)==1?_r:function(e,n){return n-e?hpe(e,n,t):F_(isNaN(e)?n:e)}}function _r(t,e){var n=e-t;return n?Y8(t,n):F_(isNaN(t)?e:t)}const DT=function t(e){var n=ppe(e);function r(i,s){var o=n((i=zl(i)).r,(s=zl(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),c=_r(i.opacity,s.opacity);return function(u){return i.r=o(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function mpe(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),s=new Array(n),o,a;for(o=0;on&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:zd(r,i)})),n=ME.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Lpe(t,e,n){var r=t[0],i=t[1],s=e[0],o=e[1];return i2?Ope:Lpe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?s:(l||(l=a(t.map(r),e,n)))(r(o(h)))}return f.invert=function(h){return o(i((c||(c=a(e,t.map(r),zd)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Npe),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=GA,u()},f.clamp=function(h){return arguments.length?(o=h?!0:Oo,u()):o!==Oo},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(s=h,f):s},function(h,m){return r=h,i=m,u()}}function Dpe(){return B_()(Oo,Oo)}function Fpe(t,e,n,r){var i=u6(t,e,n),s;switch(r=Tm(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(s=yie(i,o))&&(r.precision=s),h6(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=vie(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=gie(i))&&(r.precision=s-(r.type==="%")*2);break}}return Jo(r)}function XA(t){var e=t.domain;return t.ticks=function(n){var r=e();return pT(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Fpe(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,s=r.length-1,o=r[i],a=r[s],l,c,u=10;for(a0;){if(c=mT(o,a,n),c===l)return r[i]=o,r[s]=a,e(r);if(c>0)o=Math.floor(o/c)*c,a=Math.ceil(a/c)*c;else if(c<0)o=Math.ceil(o*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Q8(){var t=Dpe();return t.copy=function(){return U_(t,Q8())},O_.apply(t,arguments),XA(t)}function zpe(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],o;return sMath.pow(t,e)}function $pe(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function cO(t){return(e,n)=>-t(-e,n)}function Wpe(t){const e=t(aO,lO),n=e.domain;let r=10,i,s;function o(){return i=$pe(r),s=Vpe(r),n()[0]<0?(i=cO(i),s=cO(s),t(Upe,Bpe)):t(aO,lO),e}return e.base=function(a){return arguments.length?(r=+a,o()):r},e.domain=function(a){return arguments.length?(n(a),o()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=m;++h)for(y=1;yu)break;g.push(x)}}else for(;h<=m;++h)for(y=r-1;y>=1;--y)if(x=h>0?y/s(-h):y*s(h),!(xu)break;g.push(x)}g.length*2{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Tm(l)).precision==null&&(l.trim=!0),l=Jo(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/s(Math.round(i(u)));return f*rn(zpe(n(),{floor:a=>s(Math.floor(i(a))),ceil:a=>s(Math.ceil(i(a)))})),e}function e9(){const t=Wpe(B_()).domain([1,10]);return t.copy=()=>U_(t,e9()).base(t.base()),O_.apply(t,arguments),t}function uO(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function fO(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hpe(t){var e=1,n=t(uO(e),fO(e));return n.constant=function(r){return arguments.length?t(uO(e=+r),fO(e)):e},XA(n)}function t9(){var t=Hpe(B_());return t.copy=function(){return U_(t,t9()).constant(t.constant())},O_.apply(t,arguments)}function dO(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Gpe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Xpe(t){return t<0?-t*t:t*t}function qpe(t){var e=t(Oo,Oo),n=1;function r(){return n===1?t(Oo,Oo):n===.5?t(Gpe,Xpe):t(dO(n),dO(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},XA(e)}function qA(){var t=qpe(B_());return t.copy=function(){return U_(t,qA()).exponent(t.exponent())},O_.apply(t,arguments),t}function Ype(){return qA.apply(null,arguments).exponent(.5)}const EE=new Date,TE=new Date;function Or(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const o=i(s),a=i.ceil(s);return s-o(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,a)=>{const l=[];if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s0))return l;let c;do l.push(c=new Date(+s)),e(s,a),t(s);while(cOr(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),n&&(i.count=(s,o)=>(EE.setTime(+s),TE.setTime(+o),t(EE),t(TE),Math.floor(n(EE,TE))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const qm=1e3,Ul=qm*60,Ym=Ul*60,Km=Ym*24,n9=Km*7,YA=Or(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*qm)},(t,e)=>(e-t)/qm,t=>t.getUTCSeconds());YA.range;const r9=Or(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qm)},(t,e)=>{t.setTime(+t+e*Ul)},(t,e)=>(e-t)/Ul,t=>t.getMinutes());r9.range;const i9=Or(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Ul)},(t,e)=>(e-t)/Ul,t=>t.getUTCMinutes());i9.range;const s9=Or(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qm-t.getMinutes()*Ul)},(t,e)=>{t.setTime(+t+e*Ym)},(t,e)=>(e-t)/Ym,t=>t.getHours());s9.range;const o9=Or(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ym)},(t,e)=>(e-t)/Ym,t=>t.getUTCHours());o9.range;const a9=Or(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ul)/Km,t=>t.getDate()-1);a9.range;const l9=Or(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Km,t=>t.getUTCDate()-1);l9.range;const Kpe=Or(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Km,t=>Math.floor(t/Km));Kpe.range;function Lu(t){return Or(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Ul)/n9)}const c9=Lu(0),Zpe=Lu(1),Jpe=Lu(2),Qpe=Lu(3),eme=Lu(4),tme=Lu(5),nme=Lu(6);c9.range;Zpe.range;Jpe.range;Qpe.range;eme.range;tme.range;nme.range;function Ou(t){return Or(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/n9)}const u9=Ou(0),rme=Ou(1),ime=Ou(2),sme=Ou(3),ome=Ou(4),ame=Ou(5),lme=Ou(6);u9.range;rme.range;ime.range;sme.range;ome.range;ame.range;lme.range;const f9=Or(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());f9.range;const d9=Or(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());d9.range;const KA=Or(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());KA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Or(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});KA.range;const ZA=Or(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ZA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Or(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});ZA.range;function cme(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function ume(t,e){e.range&&("padding"in t,t.range(e.range))}function fme(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function dme(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function hme(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function pme(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function mme(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var hO={lab:Cpe,hcl:Rpe,"hcl-long":Ape,hsl:Epe,"hsl-long":Tpe,cubehelix:Ppe,"cubehelix-long":z_,rgb:DT};function gme(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return hO[t]}var e=t.type,n=t.gamma,r=hO[e];return typeof n>"u"?r:r.gamma(n)}function yme(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=gme(e.interpolate);t.interpolate(n)}}var vme=new Date(Date.UTC(2020,1,2,3,4,5)),xme="%Y-%m-%d %H:%M";function bme(t){var e=t.tickFormat(1,xme)(vme);return e==="2020-02-02 03:04"}var pO={day:a9,hour:s9,minute:r9,month:f9,second:YA,week:c9,year:KA},mO={day:l9,hour:o9,minute:i9,month:d9,second:YA,week:u9,year:ZA};function _me(t,e){if("nice"in e&&typeof e.nice<"u"&&"nice"in t){var n=e.nice;if(typeof n=="boolean")n&&t.nice();else if(typeof n=="number")t.nice(n);else{var r=t,i=bme(r);if(typeof n=="string")r.nice(i?mO[n]:pO[n]);else{var s=n.interval,o=n.step,a=(i?mO[s]:pO[s]).every(o);a!=null&&r.nice(a)}}}}function wme(t,e){"padding"in t&&"padding"in e&&typeof e.padding<"u"&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&typeof e.paddingInner<"u"&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&typeof e.paddingOuter<"u"&&t.paddingOuter(e.paddingOuter)}function Sme(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function Mme(t,e){"round"in e&&typeof e.round<"u"&&(e.round&&"interpolate"in e&&typeof e.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(GA))}function Eme(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function Tme(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],s=i=0)&&(n[i]=t[i]);return n}function T1(){return T1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var d9={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},rP=Et.forwardRef(function(t,e){var n=t.className,r=t.top,i=t.left,s=t.offsetLeft,o=s===void 0?10:s,a=t.offsetTop,l=a===void 0?10:a,c=t.style,u=c===void 0?d9:c,f=t.children,h=t.unstyled,m=h===void 0?!1:h,y=t.applyPositionStyle,x=y===void 0?!1:y,v=Ome(t,Lme);return Et.createElement("div",C1({ref:e,className:fo("visx-tooltip",n),style:C1({top:r==null||l==null?r:r+l,left:i==null||o==null?i:i+o},x&&{position:"absolute"},!m&&u)},v),f)});rP.propTypes={children:en.node,className:en.string,left:en.number,offsetLeft:en.number,offsetTop:en.number,top:en.number,applyPositionStyle:en.bool,unstyled:en.bool};rP.displayName="Tooltip";function BT(){return BT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function p9(t){var e=t.children;t.getRects;var n=t.left,r=n===void 0?0:n,i=t.offsetLeft,s=i===void 0?10:i,o=t.offsetTop,a=o===void 0?10:o,l=t.parentRect,c=t.rect,u=t.style,f=u===void 0?d9:u,h=t.top,m=h===void 0?0:h,y=t.unstyled,x=y===void 0?!1:y,v=t.nodeRef,g=jme(t,Bme),b,_=!1,S=!1;if(c&&l){var C=r,P=m;if(l.width){var A=C+s+c.width-l.width,L=c.width-C-s;_=A>0&&A>L}else{var k=C+s+c.width-window.innerWidth,T=c.width-C-s;_=k>0&&k>T}if(l.height){var N=P+a+c.height-l.height,z=c.height-P-a;S=N>0&&N>z}else S=P+a+c.height>window.innerHeight;C=_?C-c.width-s:C+s,P=S?P-c.height-a:P+a,C=Math.round(C),P=Math.round(P),b="translate("+C+"px, "+P+"px)"}return Et.createElement(rP,R1({ref:v,style:R1({left:0,top:0,transform:b},!x&&f)},g),Et.createElement(Ume,{value:{isFlippedVertically:!S,isFlippedHorizontally:!_}},e))}p9.propTypes={nodeRef:en.oneOfType([en.string,en.func,en.object])};const Vme=zme(p9);var $me=["top","left","transform","className","children","innerRef"];function VT(){return VT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Ng(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,s=t.transform,o=t.className,a=t.children,l=t.innerRef,c=Wme(t,$me);return Et.createElement("g",VT({ref:l,className:fo("visx-group",o),transform:s||"translate("+i+", "+n+")"},c),a)}Ng.propTypes={top:en.number,left:en.number,transform:en.string,className:en.string,children:en.node,innerRef:en.oneOfType([en.string,en.func,en.object])};var Hme=["from","to","fill","className","innerRef"];function $T(){return $T=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function A1(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,s=t.fill,o=s===void 0?"transparent":s,a=t.className,l=t.innerRef,c=Gme(t,Hme),u=n.x===i.x||n.y===i.y;return Et.createElement("line",$T({ref:l,className:fo("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}var Xme=m9;function m9(t,e,n){t instanceof RegExp&&(t=yO(t,n)),e instanceof RegExp&&(e=yO(e,n));var r=g9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function yO(t,e){var n=e.match(t);return n?n[0]:null}m9.range=g9;function g9(t,e,n){var r,i,s,o,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){for(r=[],s=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[s,o])}return a}var qme=y9;function y9(t,e,n){t instanceof RegExp&&(t=vO(t,n)),e instanceof RegExp&&(e=vO(e,n));var r=v9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function vO(t,e){var n=e.match(t);return n?n[0]:null}y9.range=v9;function v9(t,e,n){var r,i,s,o,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(t===e)return[l,c];for(r=[],s=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[s,o])}return a}var Yme=qme,Kme=x9;function x9(t,e,n){var r=t;return Zme(t,e).reduce(function(i,s){return i.replace(s.functionIdentifier+"("+s.matches.body+")",Jme(s.matches.body,s.functionIdentifier,n,r,e))},t)}function Zme(t,e){var n=[],r=typeof e=="string"?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var s=i[1],o=i.index,a=Yme("(",")",t.substring(o));if(!a||a.start!==i[0].length-1)throw new SyntaxError(s+"(): missing closing ')' in the value '"+t+"'");n.push({matches:a,functionIdentifier:s}),t=a.post}while(r.test(t));return n}function Jme(t,e,n,r,i){return n(x9(t,i,n),e,r)}var ii=function(t){this.value=t};ii.math={isDegree:!0,acos:function(t){return ii.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return ii.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return ii.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;ioi.length-2?oi.length-1:t.length-o;i>0;i--)if(oi[i]!==void 0)for(s=0;s0&&cr)o.push(e);else{for(;r>=i&&!c||c&&i"u"?e[e.length-1].value.push(s[a]):e[e.length-1].value=s[a].value(e[e.length-1].value);else if(s[a].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(s[a]):e[e.length-1].value=s[a].value(e[e.length-1].value);else if(s[a].type===8){for(var l=[],c=0;c"u"?(r.value=r.concat(n),r.value.push(s[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(s[a]),e.push(n)):e.push({type:1,value:s[a].value(r.value,n.value)})):s[a].type===2||s[a].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(s[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(s[a]),e.push(n)):e.push({type:1,value:s[a].value(r.value,n.value)})):s[a].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:s[a].value(i.value,r.value,new Gp(n))})):s[a].type===13&&(o?e.push({value:t[s[a].value],type:3}):e.push([s[a]]));if(e.length>1)throw new Gp.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};Gp.eval=function(t,e,n){return typeof e>"u"?this.lex(t).toPostfix().postfixEval():typeof n>"u"?typeof e.length<"u"?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var age=Gp,_9=age;_9.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,s=0;s"+e.value+""+i[s].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[s].type===2||i[s].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[s].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[s].type})):i[s].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[s].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var lge=_9,cge=Xme,uge=Kme,fge=lge,dge=100,hge=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,CE,pge=mge;function mge(t,e){CE=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,s,o){if(CE++>dge)throw CE=0,new Error("Call stack overflow for "+o);if(i==="")throw new Error(s+"(): '"+o+"' must contain a non-whitespace string");i=r(i,o);var a=gge(i);if(a.length>1||i.indexOf("var(")>-1)return s+"("+i+")";var l=a[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var c=i.replace(new RegExp(l,"gi"),""),u;try{u=fge.eval(c)}catch{return s+"("+i+")"}return l==="%"&&(u*=100),(s.length||l==="%")&&(u=Math.round(u*e)/e),u+=l,u}function r(i,s){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var o="",a=i,l;l=hge.exec(a);){l[0].index>0&&(o+=a.substring(0,l[0].index));var c=cge("(",")",a.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",s);o+=c.pre+u,a=c.post}return o+a}return uge(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function gge(t){for(var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}const RE=Va(pge);var yge=typeof F0=="object"&&F0&&F0.Object===Object&&F0,vge=yge,xge=vge,bge=typeof self=="object"&&self&&self.Object===Object&&self,_ge=xge||bge||Function("return this")(),iP=_ge,wge=iP,Sge=wge.Symbol,w9=Sge,xO=w9,S9=Object.prototype,Mge=S9.hasOwnProperty,Ege=S9.toString,dp=xO?xO.toStringTag:void 0;function Tge(t){var e=Mge.call(t,dp),n=t[dp];try{t[dp]=void 0;var r=!0}catch{}var i=Ege.call(t);return r&&(e?t[dp]=n:delete t[dp]),i}var Cge=Tge,Rge=Object.prototype,Age=Rge.toString;function Pge(t){return Age.call(t)}var Ige=Pge,bO=w9,Nge=Cge,kge=Ige,Lge="[object Null]",Oge="[object Undefined]",_O=bO?bO.toStringTag:void 0;function Dge(t){return t==null?t===void 0?Oge:Lge:_O&&_O in Object(t)?Nge(t):kge(t)}var Fge=Dge;function zge(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var M9=zge,Uge=Fge,Bge=M9,jge="[object AsyncFunction]",Vge="[object Function]",$ge="[object GeneratorFunction]",Wge="[object Proxy]";function Hge(t){if(!Bge(t))return!1;var e=Uge(t);return e==Vge||e==$ge||e==jge||e==Wge}var Gge=Hge,Xge=iP,qge=Xge["__core-js_shared__"],Yge=qge,AE=Yge,wO=function(){var t=/[^.]+$/.exec(AE&&AE.keys&&AE.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Kge(t){return!!wO&&wO in t}var Zge=Kge,Jge=Function.prototype,Qge=Jge.toString;function e0e(t){if(t!=null){try{return Qge.call(t)}catch{}try{return t+""}catch{}}return""}var t0e=e0e,n0e=Gge,r0e=Zge,i0e=M9,s0e=t0e,o0e=/[\\^$.*+?()[\]{}|]/g,a0e=/^\[object .+?Constructor\]$/,l0e=Function.prototype,c0e=Object.prototype,u0e=l0e.toString,f0e=c0e.hasOwnProperty,d0e=RegExp("^"+u0e.call(f0e).replace(o0e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h0e(t){if(!i0e(t)||r0e(t))return!1;var e=n0e(t)?d0e:a0e;return e.test(s0e(t))}var p0e=h0e;function m0e(t,e){return t==null?void 0:t[e]}var g0e=m0e,y0e=p0e,v0e=g0e;function x0e(t,e){var n=v0e(t,e);return y0e(n)?n:void 0}var E9=x0e,b0e=E9,_0e=b0e(Object,"create"),j_=_0e,SO=j_;function w0e(){this.__data__=SO?SO(null):{},this.size=0}var S0e=w0e;function M0e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var E0e=M0e,T0e=j_,C0e="__lodash_hash_undefined__",R0e=Object.prototype,A0e=R0e.hasOwnProperty;function P0e(t){var e=this.__data__;if(T0e){var n=e[t];return n===C0e?void 0:n}return A0e.call(e,t)?e[t]:void 0}var I0e=P0e,N0e=j_,k0e=Object.prototype,L0e=k0e.hasOwnProperty;function O0e(t){var e=this.__data__;return N0e?e[t]!==void 0:L0e.call(e,t)}var D0e=O0e,F0e=j_,z0e="__lodash_hash_undefined__";function U0e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=F0e&&e===void 0?z0e:e,this}var B0e=U0e,j0e=S0e,V0e=E0e,$0e=I0e,W0e=D0e,H0e=B0e;function ch(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var cye=lye,uye=V_;function fye(t,e){var n=this.__data__,r=uye(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var dye=fye,hye=q0e,pye=rye,mye=oye,gye=cye,yye=dye;function uh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function PE(t){return typeof t=="number"}function CO(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function tve(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,s=t.angle,o=t.width,a=t.lineHeight,l=a===void 0?"1em":a,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.children,h=t.style,m=eve(t,Qye),y=m.x,x=y===void 0?0:y,v=m.y,g=v===void 0?0:v,b=!CO(x)||!CO(g),_=R.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function(T){return{word:T,wordWidth:TO(T,h)||0}}),spaceWidth:TO(" ",h)||0}},[f,h]),S=_.wordsWithWidth,C=_.spaceWidth,P=R.useMemo(function(){return b?[]:o||i?S.reduce(function(k,T){var N=T.word,z=T.wordWidth,D=k[k.length-1];if(D&&(o==null||i||(D.width||0)+z+C0){var T=P[0].width||1,N=i==="shrink-only"?Math.min(o/T,1):o/T,z=N,D=x-N*x,B=g-z*g;k.push("matrix("+N+", 0, 0, "+z+", "+D+", "+B+")")}return s&&k.push("rotate("+s+", "+x+", "+g+")"),k.length>0?k.join(" "):""},[b,x,g,o,i,P,s]);return{wordsByLines:P,startDy:A,transform:L}}var nve=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function GT(){return GT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var ive={overflow:"visible"};function C9(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,s=t.textAnchor,o=s===void 0?"start":s,a=t.innerRef,l=t.innerTextRef;t.verticalAnchor,t.angle;var c=t.lineHeight,u=c===void 0?"1em":c;t.scaleToFit,t.capHeight,t.width;var f=rve(t,nve),h=f.x,m=h===void 0?0:h,y=f.fontSize,x=tve(t),v=x.wordsByLines,g=x.startDy,b=x.transform;return Et.createElement("svg",{ref:a,x:n,y:i,fontSize:y,style:ive},v.length>0?Et.createElement("text",GT({ref:l,transform:b},f,{textAnchor:o}),v.map(function(_,S){return Et.createElement("tspan",{key:S,x:m,dy:S===0?g:u},_.words.join(" "))})):null)}var ts={top:"top",left:"left",right:"right",bottom:"bottom"};function sve(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,s=t.tickLabelFontSize,o=t.tickLength,a=r===ts.left||r===ts.top?-1:1,l,c,u;if(r===ts.top||r===ts.bottom){var f=r===ts.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=a*(o+e+s+f)}else l=a*((Number(i[0])+Number(i[i.length-1]))/2),c=-(o+e),u="rotate("+a*90+")";return{x:l,y:c,transform:u}}function Xp(){return Xp=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function R9(t){var e=t.children,n=e===void 0?ave:e,r=t.axisClassName,i=t.hideAxisLine,s=i===void 0?!1:i,o=t.hideTicks,a=o===void 0?!1:o,l=t.hideZero,c=l===void 0?!1:l,u=t.innerRef,f=t.left,h=f===void 0?0:f,m=t.numTicks,y=m===void 0?10:m,x=t.orientation,v=x===void 0?ts.bottom:x,g=t.rangePadding,b=g===void 0?0:g,_=t.scale,S=t.tickFormat,C=t.tickLength,P=C===void 0?8:C,A=t.tickValues,L=t.top,k=L===void 0?0:L,T=dve(t,fve),N=S??cve(_),z=v===ts.left,D=v===ts.top,B=D||v===ts.bottom,G=lve(_),X=z||D?-1:1,Z=_.range(),F=uve(b),q=av({x:Number(Z[0])+.5-F.start,y:0},B),K=av({x:Number(Z[Z.length-1])+.5+F.end,y:0},B),Q=(A??nP(_,y)).filter(function(fe){return!c||fe!==0&&fe!=="0"}).map(function(fe,J){return{value:fe,index:J}}),he=Q.map(function(fe){var J=fe.value,de=fe.index,be=tP(G(J));return{value:J,index:de,from:av({x:be,y:0},B),to:av({x:be,y:P*X},B),formattedValue:N(J,de,Q)}});return Et.createElement(Ng,{className:fo("visx-axis",r),innerRef:u,top:k,left:h},n(qT({},T,{axisFromPoint:q,axisToPoint:K,hideAxisLine:s,hideTicks:a,hideZero:c,horizontal:B,numTicks:y,orientation:v,rangePadding:b,scale:_,tickFormat:N,tickLength:P,tickPosition:G,tickSign:X,ticks:he})))}var hve=["axisClassName","labelOffset","tickLength","tickLabelProps"];function P1(){return P1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var mve={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function gve(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,s=i===void 0?8:i,o=t.tickLabelProps,a=pve(t,hve),l=typeof o=="function"?o:P1({},mve,o);return Et.createElement(R9,P1({axisClassName:fo("visx-axis-left",e),labelOffset:r,orientation:ts.left,tickLabelProps:l,tickLength:s},a))}var yve=["axisClassName","labelOffset","tickLength","tickLabelProps"];function I1(){return I1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var xve={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function bve(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,s=i===void 0?8:i,o=t.tickLabelProps,a=vve(t,yve),l=typeof o=="function"?o:I1({},xve,o);return Et.createElement(R9,I1({axisClassName:fo("visx-axis-bottom",e),labelOffset:r,orientation:ts.bottom,tickLabelProps:l,tickLength:s},a))}var A9=Eve,_ve=P9(R),wve=P9(f9),Sve=["from","to","fill","className","innerRef"];function P9(t){return t&&t.__esModule?t:{default:t}}function YT(){return YT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Eve(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,s=t.fill,o=s===void 0?"transparent":s,a=t.className,l=t.innerRef,c=Mve(t,Sve),u=n.x===i.x||n.y===i.y;return _ve.default.createElement("line",YT({ref:l,className:(0,wve.default)("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}function I9(t){return"bandwidth"in t?t.bandwidth():0}var Tve=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function KT(){return KT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function N9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,s=t.scale,o=t.width,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.children,y=t.numTicks,x=y===void 0?10:y,v=t.lineStyle,g=t.offset,b=t.tickValues,_=Cve(t,Tve),S=b??nP(s,x),C=(g??0)+I9(s)/2,P=S.map(function(A,L){var k,T=((k=tP(s(A)))!=null?k:0)+C;return{index:L,from:new Zm({x:0,y:T}),to:new Zm({x:o,y:T})}});return Et.createElement(Ng,{className:fo("visx-rows",h),top:n,left:i},m?m({lines:P}):P.map(function(A){var L=A.from,k=A.to,T=A.index;return Et.createElement(A9,KT({key:"row-line-"+T,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:v},_))}))}N9.propTypes={tickValues:en.array,width:en.number.isRequired};var Rve=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function ZT(){return ZT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function k9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,s=t.scale,o=t.height,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.numTicks,y=m===void 0?10:m,x=t.lineStyle,v=t.offset,g=t.tickValues,b=t.children,_=Ave(t,Rve),S=g??nP(s,y),C=(v??0)+I9(s)/2,P=S.map(function(A,L){var k,T=((k=tP(s(A)))!=null?k:0)+C;return{index:L,from:new Zm({x:T,y:0}),to:new Zm({x:T,y:o})}});return Et.createElement(Ng,{className:fo("visx-columns",h),top:n,left:i},b?b({lines:P}):P.map(function(A){var L=A.from,k=A.to,T=A.index;return Et.createElement(A9,ZT({key:"column-line-"+T,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:x},_))}))}k9.propTypes={tickValues:en.array,height:en.number.isRequired};function pn(t){for(var e=t.length/6|0,n=new Array(e),r=0;rlpe(t[t.length-1]);var Pve=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(pn);const Ive=wn(Pve);var Nve=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(pn);const kve=wn(Nve);var Lve=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(pn);const Ove=wn(Lve);var Dve=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(pn);const Fve=wn(Dve);var zve=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(pn);const Uve=wn(zve);var Bve=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(pn);const jve=wn(Bve);var Vve=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(pn);const $ve=wn(Vve);var Wve=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(pn);const Hve=wn(Wve);var Gve=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(pn);const Xve=wn(Gve);var qve=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(pn);const Yve=wn(qve);var Kve=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(pn);const Zve=wn(Kve);var Jve=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(pn);const Qve=wn(Jve);var exe=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(pn);const txe=wn(exe);var nxe=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(pn);const rxe=wn(nxe);var ixe=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(pn);const sxe=wn(ixe);var oxe=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(pn);const axe=wn(oxe);var lxe=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(pn);const cxe=wn(lxe);var uxe=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(pn);const fxe=wn(uxe);var dxe=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(pn);const hxe=wn(dxe);var pxe=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(pn);const mxe=wn(pxe);var gxe=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(pn);const yxe=wn(gxe);var vxe=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(pn);const xxe=wn(vxe);var bxe=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(pn);const _xe=wn(bxe);var wxe=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(pn);const Sxe=wn(wxe);var Mxe=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(pn);const Exe=wn(Mxe);var Txe=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(pn);const Cxe=wn(Txe);var Rxe=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(pn);const Axe=wn(Rxe);function Pxe(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const Ixe=z_(qo(300,.5,0),qo(-240,.5,1));var Nxe=z_(qo(-100,.75,.35),qo(80,1.5,.8)),kxe=z_(qo(260,.75,.35),qo(80,1.5,.8)),lv=qo();function Lxe(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lv.h=360*t-100,lv.s=1.5-1.5*e,lv.l=.8-.9*e,lv+""}var cv=zl(),Oxe=Math.PI/3,Dxe=Math.PI*2/3;function Fxe(t){var e;return t=(.5-t)*Math.PI,cv.r=255*(e=Math.sin(t))*e,cv.g=255*(e=Math.sin(t+Oxe))*e,cv.b=255*(e=Math.sin(t+Dxe))*e,cv+""}function zxe(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function W_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Uxe=W_(pn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Bxe=W_(pn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),jxe=W_(pn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Vxe=W_(pn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),L9={exports:{}},xn={};/** +*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o=0)&&(n[i]=t[i]);return n}var m9={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},tP=Et.forwardRef(function(t,e){var n=t.className,r=t.top,i=t.left,s=t.offsetLeft,o=s===void 0?10:s,a=t.offsetTop,l=a===void 0?10:a,c=t.style,u=c===void 0?m9:c,f=t.children,h=t.unstyled,m=h===void 0?!1:h,y=t.applyPositionStyle,x=y===void 0?!1:y,v=$me(t,Vme);return Et.createElement("div",C1({ref:e,className:fo("visx-tooltip",n),style:C1({top:r==null||l==null?r:r+l,left:i==null||o==null?i:i+o},x&&{position:"absolute"},!m&&u)},v),f)});tP.propTypes={children:en.node,className:en.string,left:en.number,offsetLeft:en.number,offsetTop:en.number,top:en.number,applyPositionStyle:en.bool,unstyled:en.bool};tP.displayName="Tooltip";function UT(){return UT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function y9(t){var e=t.children;t.getRects;var n=t.left,r=n===void 0?0:n,i=t.offsetLeft,s=i===void 0?10:i,o=t.offsetTop,a=o===void 0?10:o,l=t.parentRect,c=t.rect,u=t.style,f=u===void 0?m9:u,h=t.top,m=h===void 0?0:h,y=t.unstyled,x=y===void 0?!1:y,v=t.nodeRef,g=Yme(t,qme),b,_=!1,S=!1;if(c&&l){var C=r,P=m;if(l.width){var A=C+s+c.width-l.width,L=c.width-C-s;_=A>0&&A>L}else{var k=C+s+c.width-window.innerWidth,T=c.width-C-s;_=k>0&&k>T}if(l.height){var N=P+a+c.height-l.height,z=c.height-P-a;S=N>0&&N>z}else S=P+a+c.height>window.innerHeight;C=_?C-c.width-s:C+s,P=S?P-c.height-a:P+a,C=Math.round(C),P=Math.round(P),b="translate("+C+"px, "+P+"px)"}return Et.createElement(tP,R1({ref:v,style:R1({left:0,top:0,transform:b},!x&&f)},g),Et.createElement(Xme,{value:{isFlippedVertically:!S,isFlippedHorizontally:!_}},e))}y9.propTypes={nodeRef:en.oneOfType([en.string,en.func,en.object])};const Kme=Gme(y9);var Zme=["top","left","transform","className","children","innerRef"];function jT(){return jT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Ng(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,s=t.transform,o=t.className,a=t.children,l=t.innerRef,c=Jme(t,Zme);return Et.createElement("g",jT({ref:l,className:fo("visx-group",o),transform:s||"translate("+i+", "+n+")"},c),a)}Ng.propTypes={top:en.number,left:en.number,transform:en.string,className:en.string,children:en.node,innerRef:en.oneOfType([en.string,en.func,en.object])};var Qme=["from","to","fill","className","innerRef"];function VT(){return VT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function A1(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,s=t.fill,o=s===void 0?"transparent":s,a=t.className,l=t.innerRef,c=ege(t,Qme),u=n.x===i.x||n.y===i.y;return Et.createElement("line",VT({ref:l,className:fo("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}var tge=v9;function v9(t,e,n){t instanceof RegExp&&(t=yO(t,n)),e instanceof RegExp&&(e=yO(e,n));var r=x9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function yO(t,e){var n=e.match(t);return n?n[0]:null}v9.range=x9;function x9(t,e,n){var r,i,s,o,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){for(r=[],s=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[s,o])}return a}var nge=b9;function b9(t,e,n){t instanceof RegExp&&(t=vO(t,n)),e instanceof RegExp&&(e=vO(e,n));var r=_9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function vO(t,e){var n=e.match(t);return n?n[0]:null}b9.range=_9;function _9(t,e,n){var r,i,s,o,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(t===e)return[l,c];for(r=[],s=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[s,o])}return a}var rge=nge,ige=w9;function w9(t,e,n){var r=t;return sge(t,e).reduce(function(i,s){return i.replace(s.functionIdentifier+"("+s.matches.body+")",oge(s.matches.body,s.functionIdentifier,n,r,e))},t)}function sge(t,e){var n=[],r=typeof e=="string"?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var s=i[1],o=i.index,a=rge("(",")",t.substring(o));if(!a||a.start!==i[0].length-1)throw new SyntaxError(s+"(): missing closing ')' in the value '"+t+"'");n.push({matches:a,functionIdentifier:s}),t=a.post}while(r.test(t));return n}function oge(t,e,n,r,i){return n(w9(t,i,n),e,r)}var ii=function(t){this.value=t};ii.math={isDegree:!0,acos:function(t){return ii.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return ii.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return ii.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;ioi.length-2?oi.length-1:t.length-o;i>0;i--)if(oi[i]!==void 0)for(s=0;s0&&cr)o.push(e);else{for(;r>=i&&!c||c&&i"u"?e[e.length-1].value.push(s[a]):e[e.length-1].value=s[a].value(e[e.length-1].value);else if(s[a].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(s[a]):e[e.length-1].value=s[a].value(e[e.length-1].value);else if(s[a].type===8){for(var l=[],c=0;c"u"?(r.value=r.concat(n),r.value.push(s[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(s[a]),e.push(n)):e.push({type:1,value:s[a].value(r.value,n.value)})):s[a].type===2||s[a].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(s[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(s[a]),e.push(n)):e.push({type:1,value:s[a].value(r.value,n.value)})):s[a].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:s[a].value(i.value,r.value,new Gp(n))})):s[a].type===13&&(o?e.push({value:t[s[a].value],type:3}):e.push([s[a]]));if(e.length>1)throw new Gp.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};Gp.eval=function(t,e,n){return typeof e>"u"?this.lex(t).toPostfix().postfixEval():typeof n>"u"?typeof e.length<"u"?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var mge=Gp,M9=mge;M9.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,s=0;s"+e.value+""+i[s].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[s].type===2||i[s].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[s].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[s].type})):i[s].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[s].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var gge=M9,yge=tge,vge=ige,xge=gge,bge=100,_ge=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,CE,wge=Sge;function Sge(t,e){CE=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,s,o){if(CE++>bge)throw CE=0,new Error("Call stack overflow for "+o);if(i==="")throw new Error(s+"(): '"+o+"' must contain a non-whitespace string");i=r(i,o);var a=Mge(i);if(a.length>1||i.indexOf("var(")>-1)return s+"("+i+")";var l=a[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var c=i.replace(new RegExp(l,"gi"),""),u;try{u=xge.eval(c)}catch{return s+"("+i+")"}return l==="%"&&(u*=100),(s.length||l==="%")&&(u=Math.round(u*e)/e),u+=l,u}function r(i,s){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var o="",a=i,l;l=_ge.exec(a);){l[0].index>0&&(o+=a.substring(0,l[0].index));var c=yge("(",")",a.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",s);o+=c.pre+u,a=c.post}return o+a}return vge(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function Mge(t){for(var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}const RE=Va(wge);var Ege=typeof F0=="object"&&F0&&F0.Object===Object&&F0,Tge=Ege,Cge=Tge,Rge=typeof self=="object"&&self&&self.Object===Object&&self,Age=Cge||Rge||Function("return this")(),nP=Age,Pge=nP,Ige=Pge.Symbol,E9=Ige,xO=E9,T9=Object.prototype,Nge=T9.hasOwnProperty,kge=T9.toString,hp=xO?xO.toStringTag:void 0;function Lge(t){var e=Nge.call(t,hp),n=t[hp];try{t[hp]=void 0;var r=!0}catch{}var i=kge.call(t);return r&&(e?t[hp]=n:delete t[hp]),i}var Oge=Lge,Dge=Object.prototype,Fge=Dge.toString;function zge(t){return Fge.call(t)}var Uge=zge,bO=E9,Bge=Oge,jge=Uge,Vge="[object Null]",$ge="[object Undefined]",_O=bO?bO.toStringTag:void 0;function Wge(t){return t==null?t===void 0?$ge:Vge:_O&&_O in Object(t)?Bge(t):jge(t)}var Hge=Wge;function Gge(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var C9=Gge,Xge=Hge,qge=C9,Yge="[object AsyncFunction]",Kge="[object Function]",Zge="[object GeneratorFunction]",Jge="[object Proxy]";function Qge(t){if(!qge(t))return!1;var e=Xge(t);return e==Kge||e==Zge||e==Yge||e==Jge}var e0e=Qge,t0e=nP,n0e=t0e["__core-js_shared__"],r0e=n0e,AE=r0e,wO=function(){var t=/[^.]+$/.exec(AE&&AE.keys&&AE.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function i0e(t){return!!wO&&wO in t}var s0e=i0e,o0e=Function.prototype,a0e=o0e.toString;function l0e(t){if(t!=null){try{return a0e.call(t)}catch{}try{return t+""}catch{}}return""}var c0e=l0e,u0e=e0e,f0e=s0e,d0e=C9,h0e=c0e,p0e=/[\\^$.*+?()[\]{}|]/g,m0e=/^\[object .+?Constructor\]$/,g0e=Function.prototype,y0e=Object.prototype,v0e=g0e.toString,x0e=y0e.hasOwnProperty,b0e=RegExp("^"+v0e.call(x0e).replace(p0e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _0e(t){if(!d0e(t)||f0e(t))return!1;var e=u0e(t)?b0e:m0e;return e.test(h0e(t))}var w0e=_0e;function S0e(t,e){return t==null?void 0:t[e]}var M0e=S0e,E0e=w0e,T0e=M0e;function C0e(t,e){var n=T0e(t,e);return E0e(n)?n:void 0}var R9=C0e,R0e=R9,A0e=R0e(Object,"create"),j_=A0e,SO=j_;function P0e(){this.__data__=SO?SO(null):{},this.size=0}var I0e=P0e;function N0e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var k0e=N0e,L0e=j_,O0e="__lodash_hash_undefined__",D0e=Object.prototype,F0e=D0e.hasOwnProperty;function z0e(t){var e=this.__data__;if(L0e){var n=e[t];return n===O0e?void 0:n}return F0e.call(e,t)?e[t]:void 0}var U0e=z0e,B0e=j_,j0e=Object.prototype,V0e=j0e.hasOwnProperty;function $0e(t){var e=this.__data__;return B0e?e[t]!==void 0:V0e.call(e,t)}var W0e=$0e,H0e=j_,G0e="__lodash_hash_undefined__";function X0e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=H0e&&e===void 0?G0e:e,this}var q0e=X0e,Y0e=I0e,K0e=k0e,Z0e=U0e,J0e=W0e,Q0e=q0e;function uh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var yye=gye,vye=V_;function xye(t,e){var n=this.__data__,r=vye(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var bye=xye,_ye=nye,wye=fye,Sye=pye,Mye=yye,Eye=bye;function fh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function PE(t){return typeof t=="number"}function CO(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function cve(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,s=t.angle,o=t.width,a=t.lineHeight,l=a===void 0?"1em":a,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.children,h=t.style,m=lve(t,ave),y=m.x,x=y===void 0?0:y,v=m.y,g=v===void 0?0:v,b=!CO(x)||!CO(g),_=R.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function(T){return{word:T,wordWidth:TO(T,h)||0}}),spaceWidth:TO(" ",h)||0}},[f,h]),S=_.wordsWithWidth,C=_.spaceWidth,P=R.useMemo(function(){return b?[]:o||i?S.reduce(function(k,T){var N=T.word,z=T.wordWidth,D=k[k.length-1];if(D&&(o==null||i||(D.width||0)+z+C0){var T=P[0].width||1,N=i==="shrink-only"?Math.min(o/T,1):o/T,z=N,D=x-N*x,B=g-z*g;k.push("matrix("+N+", 0, 0, "+z+", "+D+", "+B+")")}return s&&k.push("rotate("+s+", "+x+", "+g+")"),k.length>0?k.join(" "):""},[b,x,g,o,i,P,s]);return{wordsByLines:P,startDy:A,transform:L}}var uve=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function HT(){return HT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var dve={overflow:"visible"};function P9(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,s=t.textAnchor,o=s===void 0?"start":s,a=t.innerRef,l=t.innerTextRef;t.verticalAnchor,t.angle;var c=t.lineHeight,u=c===void 0?"1em":c;t.scaleToFit,t.capHeight,t.width;var f=fve(t,uve),h=f.x,m=h===void 0?0:h,y=f.fontSize,x=cve(t),v=x.wordsByLines,g=x.startDy,b=x.transform;return Et.createElement("svg",{ref:a,x:n,y:i,fontSize:y,style:dve},v.length>0?Et.createElement("text",HT({ref:l,transform:b},f,{textAnchor:o}),v.map(function(_,S){return Et.createElement("tspan",{key:S,x:m,dy:S===0?g:u},_.words.join(" "))})):null)}var ts={top:"top",left:"left",bottom:"bottom"};function hve(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,s=t.tickLabelFontSize,o=t.tickLength,a=r===ts.left||r===ts.top?-1:1,l,c,u;if(r===ts.top||r===ts.bottom){var f=r===ts.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=a*(o+e+s+f)}else l=a*((Number(i[0])+Number(i[i.length-1]))/2),c=-(o+e),u="rotate("+a*90+")";return{x:l,y:c,transform:u}}function Xp(){return Xp=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function I9(t){var e=t.children,n=e===void 0?mve:e,r=t.axisClassName,i=t.hideAxisLine,s=i===void 0?!1:i,o=t.hideTicks,a=o===void 0?!1:o,l=t.hideZero,c=l===void 0?!1:l,u=t.innerRef,f=t.left,h=f===void 0?0:f,m=t.numTicks,y=m===void 0?10:m,x=t.orientation,v=x===void 0?ts.bottom:x,g=t.rangePadding,b=g===void 0?0:g,_=t.scale,S=t.tickFormat,C=t.tickLength,P=C===void 0?8:C,A=t.tickValues,L=t.top,k=L===void 0?0:L,T=bve(t,xve),N=S??yve(_),z=v===ts.left,D=v===ts.top,B=D||v===ts.bottom,G=gve(_),X=z||D?-1:1,Z=_.range(),F=vve(b),q=av({x:Number(Z[0])+.5-F.start,y:0},B),K=av({x:Number(Z[Z.length-1])+.5+F.end,y:0},B),Q=(A??eP(_,y)).filter(function(fe){return!c||fe!==0&&fe!=="0"}).map(function(fe,J){return{value:fe,index:J}}),he=Q.map(function(fe){var J=fe.value,de=fe.index,be=QA(G(J));return{value:J,index:de,from:av({x:be,y:0},B),to:av({x:be,y:P*X},B),formattedValue:N(J,de,Q)}});return Et.createElement(Ng,{className:fo("visx-axis",r),innerRef:u,top:k,left:h},n(XT({},T,{axisFromPoint:q,axisToPoint:K,hideAxisLine:s,hideTicks:a,hideZero:c,horizontal:B,numTicks:y,orientation:v,rangePadding:b,scale:_,tickFormat:N,tickLength:P,tickPosition:G,tickSign:X,ticks:he})))}var _ve=["axisClassName","labelOffset","tickLength","tickLabelProps"];function P1(){return P1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var Sve={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function Mve(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,s=i===void 0?8:i,o=t.tickLabelProps,a=wve(t,_ve),l=typeof o=="function"?o:P1({},Sve,o);return Et.createElement(I9,P1({axisClassName:fo("visx-axis-left",e),labelOffset:r,orientation:ts.left,tickLabelProps:l,tickLength:s},a))}var Eve=["axisClassName","labelOffset","tickLength","tickLabelProps"];function I1(){return I1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var Cve={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function Rve(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,s=i===void 0?8:i,o=t.tickLabelProps,a=Tve(t,Eve),l=typeof o=="function"?o:I1({},Cve,o);return Et.createElement(I9,I1({axisClassName:fo("visx-axis-bottom",e),labelOffset:r,orientation:ts.bottom,tickLabelProps:l,tickLength:s},a))}var N9=kve,Ave=k9(R),Pve=k9(p9),Ive=["from","to","fill","className","innerRef"];function k9(t){return t&&t.__esModule?t:{default:t}}function qT(){return qT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function kve(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,s=t.fill,o=s===void 0?"transparent":s,a=t.className,l=t.innerRef,c=Nve(t,Ive),u=n.x===i.x||n.y===i.y;return Ave.default.createElement("line",qT({ref:l,className:(0,Pve.default)("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}function L9(t){return"bandwidth"in t?t.bandwidth():0}var Lve=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function YT(){return YT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function O9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,s=t.scale,o=t.width,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.children,y=t.numTicks,x=y===void 0?10:y,v=t.lineStyle,g=t.offset,b=t.tickValues,_=Ove(t,Lve),S=b??eP(s,x),C=(g??0)+L9(s)/2,P=S.map(function(A,L){var k,T=((k=QA(s(A)))!=null?k:0)+C;return{index:L,from:new Zm({x:0,y:T}),to:new Zm({x:o,y:T})}});return Et.createElement(Ng,{className:fo("visx-rows",h),top:n,left:i},m?m({lines:P}):P.map(function(A){var L=A.from,k=A.to,T=A.index;return Et.createElement(N9,YT({key:"row-line-"+T,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:v},_))}))}O9.propTypes={tickValues:en.array,width:en.number.isRequired};var Dve=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function KT(){return KT=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function D9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,s=t.scale,o=t.height,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.numTicks,y=m===void 0?10:m,x=t.lineStyle,v=t.offset,g=t.tickValues,b=t.children,_=Fve(t,Dve),S=g??eP(s,y),C=(v??0)+L9(s)/2,P=S.map(function(A,L){var k,T=((k=QA(s(A)))!=null?k:0)+C;return{index:L,from:new Zm({x:T,y:0}),to:new Zm({x:T,y:o})}});return Et.createElement(Ng,{className:fo("visx-columns",h),top:n,left:i},b?b({lines:P}):P.map(function(A){var L=A.from,k=A.to,T=A.index;return Et.createElement(N9,KT({key:"column-line-"+T,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:x},_))}))}D9.propTypes={tickValues:en.array,height:en.number.isRequired};function pn(t){for(var e=t.length/6|0,n=new Array(e),r=0;rgpe(t[t.length-1]);var zve=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(pn);const Uve=wn(zve);var Bve=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(pn);const jve=wn(Bve);var Vve=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(pn);const $ve=wn(Vve);var Wve=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(pn);const Hve=wn(Wve);var Gve=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(pn);const Xve=wn(Gve);var qve=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(pn);const Yve=wn(qve);var Kve=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(pn);const Zve=wn(Kve);var Jve=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(pn);const Qve=wn(Jve);var exe=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(pn);const txe=wn(exe);var nxe=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(pn);const rxe=wn(nxe);var ixe=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(pn);const sxe=wn(ixe);var oxe=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(pn);const axe=wn(oxe);var lxe=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(pn);const cxe=wn(lxe);var uxe=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(pn);const fxe=wn(uxe);var dxe=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(pn);const hxe=wn(dxe);var pxe=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(pn);const mxe=wn(pxe);var gxe=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(pn);const yxe=wn(gxe);var vxe=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(pn);const xxe=wn(vxe);var bxe=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(pn);const _xe=wn(bxe);var wxe=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(pn);const Sxe=wn(wxe);var Mxe=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(pn);const Exe=wn(Mxe);var Txe=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(pn);const Cxe=wn(Txe);var Rxe=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(pn);const Axe=wn(Rxe);var Pxe=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(pn);const Ixe=wn(Pxe);var Nxe=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(pn);const kxe=wn(Nxe);var Lxe=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(pn);const Oxe=wn(Lxe);var Dxe=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(pn);const Fxe=wn(Dxe);function zxe(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const Uxe=z_(qo(300,.5,0),qo(-240,.5,1));var Bxe=z_(qo(-100,.75,.35),qo(80,1.5,.8)),jxe=z_(qo(260,.75,.35),qo(80,1.5,.8)),lv=qo();function Vxe(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lv.h=360*t-100,lv.s=1.5-1.5*e,lv.l=.8-.9*e,lv+""}var cv=zl(),$xe=Math.PI/3,Wxe=Math.PI*2/3;function Hxe(t){var e;return t=(.5-t)*Math.PI,cv.r=255*(e=Math.sin(t))*e,cv.g=255*(e=Math.sin(t+$xe))*e,cv.b=255*(e=Math.sin(t+Wxe))*e,cv+""}function Gxe(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function W_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Xxe=W_(pn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var qxe=W_(pn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Yxe=W_(pn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Kxe=W_(pn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),F9={exports:{}},xn={};/** * @license React * react-is.production.min.js * @@ -4052,7 +4052,7 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var oP=Symbol.for("react.element"),aP=Symbol.for("react.portal"),H_=Symbol.for("react.fragment"),G_=Symbol.for("react.strict_mode"),X_=Symbol.for("react.profiler"),q_=Symbol.for("react.provider"),Y_=Symbol.for("react.context"),$xe=Symbol.for("react.server_context"),K_=Symbol.for("react.forward_ref"),Z_=Symbol.for("react.suspense"),J_=Symbol.for("react.suspense_list"),Q_=Symbol.for("react.memo"),ew=Symbol.for("react.lazy"),Wxe=Symbol.for("react.offscreen"),O9;O9=Symbol.for("react.module.reference");function Vs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case oP:switch(t=t.type,t){case H_:case X_:case G_:case Z_:case J_:return t;default:switch(t=t&&t.$$typeof,t){case $xe:case Y_:case K_:case ew:case Q_:case q_:return t;default:return e}}case aP:return e}}}xn.ContextConsumer=Y_;xn.ContextProvider=q_;xn.Element=oP;xn.ForwardRef=K_;xn.Fragment=H_;xn.Lazy=ew;xn.Memo=Q_;xn.Portal=aP;xn.Profiler=X_;xn.StrictMode=G_;xn.Suspense=Z_;xn.SuspenseList=J_;xn.isAsyncMode=function(){return!1};xn.isConcurrentMode=function(){return!1};xn.isContextConsumer=function(t){return Vs(t)===Y_};xn.isContextProvider=function(t){return Vs(t)===q_};xn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===oP};xn.isForwardRef=function(t){return Vs(t)===K_};xn.isFragment=function(t){return Vs(t)===H_};xn.isLazy=function(t){return Vs(t)===ew};xn.isMemo=function(t){return Vs(t)===Q_};xn.isPortal=function(t){return Vs(t)===aP};xn.isProfiler=function(t){return Vs(t)===X_};xn.isStrictMode=function(t){return Vs(t)===G_};xn.isSuspense=function(t){return Vs(t)===Z_};xn.isSuspenseList=function(t){return Vs(t)===J_};xn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===H_||t===X_||t===G_||t===Z_||t===J_||t===Wxe||typeof t=="object"&&t!==null&&(t.$$typeof===ew||t.$$typeof===Q_||t.$$typeof===q_||t.$$typeof===Y_||t.$$typeof===K_||t.$$typeof===O9||t.getModuleId!==void 0)};xn.typeOf=Vs;L9.exports=xn;var Hxe=L9.exports;function lP(t,e=0,n=[]){return R.Children.toArray(t).reduce((r,i,s)=>(Hxe.isFragment(i)?r.push.apply(r,lP(i.props.children,e+1,n.concat(i.key||s))):R.isValidElement(i)?r.push(R.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&r.push(i),r),[])}function tw(){return typeof window<"u"}function dh(t){return D9(t)?(t.nodeName||"").toLowerCase():"#document"}function as(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ta(t){var e;return(e=(D9(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function D9(t){return tw()?t instanceof Node||t instanceof as(t).Node:!1}function ci(t){return tw()?t instanceof Element||t instanceof as(t).Element:!1}function us(t){return tw()?t instanceof HTMLElement||t instanceof as(t).HTMLElement:!1}function JT(t){return!tw()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof as(t).ShadowRoot}function kg(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=ho(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Gxe(t){return["table","td","th"].includes(dh(t))}function nw(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function cP(t){const e=uP(),n=ci(t)?ho(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Xxe(t){let e=Bl(t);for(;us(e)&&!zd(e);){if(cP(e))return e;if(nw(e))return null;e=Bl(e)}return null}function uP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zd(t){return["html","body","#document"].includes(dh(t))}function ho(t){return as(t).getComputedStyle(t)}function rw(t){return ci(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Bl(t){if(dh(t)==="html")return t;const e=t.assignedSlot||t.parentNode||JT(t)&&t.host||ta(t);return JT(e)?e.host:e}function F9(t){const e=Bl(t);return zd(e)?t.ownerDocument?t.ownerDocument.body:t.body:us(e)&&kg(e)?e:F9(e)}function Jm(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=F9(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=as(i);if(s){const a=QT(o);return e.concat(o,o.visualViewport||[],kg(i)?i:[],a&&n?Jm(a):[])}return e.concat(i,Jm(i,[],n))}function QT(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function AO(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function qxe(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&JT(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function z9(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function U9(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function Yxe(t){return t.mozInputSource===0&&t.isTrusted?!0:eC()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Kxe(t){return Qxe()?!1:!eC()&&t.width===0&&t.height===0||eC()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function Zxe(){return/apple/i.test(navigator.vendor)}function eC(){const t=/android/i;return t.test(z9())||t.test(U9())}function Jxe(){return z9().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Qxe(){return U9().includes("jsdom/")}function PO(t,e){return["mouse","pen"].includes(t)}function e1e(t){return(t==null?void 0:t.ownerDocument)||document}const t1e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function B9(t){return us(t)&&t.matches(t1e)}function Cs(t){t.preventDefault(),t.stopPropagation()}function n1e(t){return t?t.getAttribute("role")==="combobox"&&B9(t):!1}const Ud=Math.min,Qi=Math.max,N1=Math.round,ed=Math.floor,Wo=t=>({x:t,y:t});function IO(t,e,n){return Qi(t,Ud(e,n))}function iw(t,e){return typeof t=="function"?t(e):t}function Lg(t){return t.split("-")[0]}function fP(t){return t.split("-")[1]}function j9(t){return t==="x"?"y":"x"}function r1e(t){return t==="y"?"height":"width"}function Og(t){return["top","bottom"].includes(Lg(t))?"y":"x"}function i1e(t){return j9(Og(t))}function s1e(t){return{top:0,right:0,bottom:0,left:0,...t}}function o1e(t){return typeof t!="number"?s1e(t):{top:t,right:t,bottom:t,left:t}}function k1(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function NO(t,e,n){let{reference:r,floating:i}=t;const s=Og(e),o=i1e(e),a=r1e(o),l=Lg(e),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-i.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(fP(e)){case"start":m[o]-=h*(n&&c?-1:1);break;case"end":m[o]+=h*(n&&c?-1:1);break}return m}const a1e=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=NO(c,r,l),h=r,m={},y=0;for(let x=0;x{let{x:g,y:b}=v;return{x:g,y:b}}},...l}=iw(t,e),c={x:n,y:r},u=await V9(e,l),f=Og(Lg(i)),h=j9(f);let m=c[h],y=c[f];if(s){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",b=m+u[v],_=m-u[g];m=IO(b,m,_)}if(o){const v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=y+u[v],_=y-u[g];y=IO(b,y,_)}const x=a.fn({...e,[h]:m,[f]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:s,[f]:o}}}}}},f1e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=iw(t,e),u=await V9(e,c),f=Lg(i),h=fP(i),m=Og(i)==="y",{width:y,height:x}=s.floating;let v,g;f==="top"||f==="bottom"?(v=f,g=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,v=h==="end"?"top":"bottom");const b=x-u.top-u.bottom,_=y-u.left-u.right,S=Ud(x-u[v],b),C=Ud(y-u[g],_),P=!e.middlewareData.shift;let A=S,L=C;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(L=_),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=b),P&&!h){const T=Qi(u.left,0),N=Qi(u.right,0),z=Qi(u.top,0),D=Qi(u.bottom,0);m?L=y-2*(T!==0||N!==0?T+N:Qi(u.left,u.right)):A=x-2*(z!==0||D!==0?z+D:Qi(u.top,u.bottom))}await l({...e,availableWidth:L,availableHeight:A});const k=await o.getDimensions(a.floating);return y!==k.width||x!==k.height?{reset:{rects:!0}}:{}}}};function $9(t){const e=ho(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=us(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=N1(n)!==s||N1(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function dP(t){return ci(t)?t:t.contextElement}function md(t){const e=dP(t);if(!us(e))return Wo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=$9(e);let o=(s?N1(n.width):n.width)/r,a=(s?N1(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const d1e=Wo(0);function W9(t){const e=as(t);return!uP()||!e.visualViewport?d1e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function h1e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==as(t)?!1:e}function bu(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=dP(t);let o=Wo(1);e&&(r?ci(r)&&(o=md(r)):o=md(t));const a=h1e(s,n,r)?W9(s):Wo(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const h=as(s),m=r&&ci(r)?as(r):r;let y=h,x=QT(y);for(;x&&r&&m!==y;){const v=md(x),g=x.getBoundingClientRect(),b=ho(x),_=g.left+(x.clientLeft+parseFloat(b.paddingLeft))*v.x,S=g.top+(x.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=_,c+=S,y=as(x),x=QT(y)}}return k1({width:u,height:f,x:l,y:c})}function hP(t,e){const n=rw(t).scrollLeft;return e?e.left+n:bu(ta(t)).left+n}function H9(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:hP(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function p1e(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=ta(r),a=e?nw(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Wo(1);const u=Wo(0),f=us(r);if((f||!f&&!s)&&((dh(r)!=="body"||kg(o))&&(l=rw(r)),us(r))){const m=bu(r);c=md(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=o&&!f&&!s?H9(o,l,!0):Wo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function m1e(t){return Array.from(t.getClientRects())}function g1e(t){const e=ta(t),n=rw(t),r=t.ownerDocument.body,i=Qi(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Qi(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+hP(t);const a=-n.scrollTop;return ho(r).direction==="rtl"&&(o+=Qi(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function y1e(t,e){const n=as(t),r=ta(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=uP();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function v1e(t,e){const n=bu(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=us(t)?md(t):Wo(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function kO(t,e,n){let r;if(e==="viewport")r=y1e(t,n);else if(e==="document")r=g1e(ta(t));else if(ci(e))r=v1e(e,n);else{const i=W9(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return k1(r)}function G9(t,e){const n=Bl(t);return n===e||!ci(n)||zd(n)?!1:ho(n).position==="fixed"||G9(n,e)}function x1e(t,e){const n=e.get(t);if(n)return n;let r=Jm(t,[],!1).filter(a=>ci(a)&&dh(a)!=="body"),i=null;const s=ho(t).position==="fixed";let o=s?Bl(t):t;for(;ci(o)&&!zd(o);){const a=ho(o),l=cP(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||kg(o)&&!l&&G9(t,o))?r=r.filter(u=>u!==o):i=a,o=Bl(o)}return e.set(t,r),r}function b1e(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?nw(e)?[]:x1e(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const f=kO(e,u,i);return c.top=Qi(f.top,c.top),c.right=Ud(f.right,c.right),c.bottom=Ud(f.bottom,c.bottom),c.left=Qi(f.left,c.left),c},kO(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _1e(t){const{width:e,height:n}=$9(t);return{width:e,height:n}}function w1e(t,e,n){const r=us(e),i=ta(e),s=n==="fixed",o=bu(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Wo(0);if(r||!r&&!s)if((dh(e)!=="body"||kg(i))&&(a=rw(e)),r){const h=bu(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=hP(i));const c=i&&!r&&!s?H9(i,a):Wo(0),u=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:o.width,height:o.height}}function NE(t){return ho(t).position==="static"}function LO(t,e){if(!us(t)||ho(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ta(t)===n&&(n=n.ownerDocument.body),n}function X9(t,e){const n=as(t);if(nw(t))return n;if(!us(t)){let i=Bl(t);for(;i&&!zd(i);){if(ci(i)&&!NE(i))return i;i=Bl(i)}return n}let r=LO(t,e);for(;r&&Gxe(r)&&NE(r);)r=LO(r,e);return r&&zd(r)&&NE(r)&&!cP(r)?n:r||Xxe(t)||n}const S1e=async function(t){const e=this.getOffsetParent||X9,n=this.getDimensions,r=await n(t.floating);return{reference:w1e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function M1e(t){return ho(t).direction==="rtl"}const E1e={convertOffsetParentRelativeRectToViewportRelativeRect:p1e,getDocumentElement:ta,getClippingRect:b1e,getOffsetParent:X9,getElementRects:S1e,getClientRects:m1e,getDimensions:_1e,getScale:md,isElement:ci,isRTL:M1e};function q9(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function T1e(t,e){let n=null,r;const i=ta(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:h,height:m}=c;if(a||e(),!h||!m)return;const y=ed(f),x=ed(i.clientWidth-(u+h)),v=ed(i.clientHeight-(f+m)),g=ed(u),_={rootMargin:-y+"px "+-x+"px "+-v+"px "+-g+"px",threshold:Qi(0,Ud(1,l))||1};let S=!0;function C(P){const A=P[0].intersectionRatio;if(A!==l){if(!S)return o();A?o(!1,A):r=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!q9(c,t.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(C,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,_)}n.observe(t)}return o(!0),s}function pP(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=dP(t),u=i||s?[...c?Jm(c):[],...Jm(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=c&&a?T1e(c,n):null;let h=-1,m=null;o&&(m=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(e)})),n()}),c&&!l&&m.observe(c),m.observe(e));let y,x=l?bu(t):null;l&&v();function v(){const g=bu(t);x&&!q9(x,g)&&n(),x=g,y=requestAnimationFrame(v)}return n(),()=>{var g;u.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const C1e=c1e,R1e=u1e,A1e=f1e,P1e=(t,e,n)=>{const r=new Map,i={platform:E1e,...n},s={...i.platform,_c:r};return a1e(t,e,{...i,platform:s})};var Hv=typeof document<"u"?R.useLayoutEffect:R.useEffect;function L1(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!L1(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!L1(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Y9(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function OO(t,e){const n=Y9(t);return Math.round(e*n)/n}function kE(t){const e=R.useRef(t);return Hv(()=>{e.current=t}),e}function I1e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=R.useState(r);L1(h,r)||m(r);const[y,x]=R.useState(null),[v,g]=R.useState(null),b=R.useCallback(F=>{F!==P.current&&(P.current=F,x(F))},[]),_=R.useCallback(F=>{F!==A.current&&(A.current=F,g(F))},[]),S=s||y,C=o||v,P=R.useRef(null),A=R.useRef(null),L=R.useRef(u),k=l!=null,T=kE(l),N=kE(i),z=kE(c),D=R.useCallback(()=>{if(!P.current||!A.current)return;const F={placement:e,strategy:n,middleware:h};N.current&&(F.platform=N.current),P1e(P.current,A.current,F).then(q=>{const K={...q,isPositioned:z.current!==!1};B.current&&!L1(L.current,K)&&(L.current=K,Hl.flushSync(()=>{f(K)}))})},[h,e,n,N,z]);Hv(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[c]);const B=R.useRef(!1);Hv(()=>(B.current=!0,()=>{B.current=!1}),[]),Hv(()=>{if(S&&(P.current=S),C&&(A.current=C),S&&C){if(T.current)return T.current(S,C,D);D()}},[S,C,D,T,k]);const G=R.useMemo(()=>({reference:P,floating:A,setReference:b,setFloating:_}),[b,_]),X=R.useMemo(()=>({reference:S,floating:C}),[S,C]),Z=R.useMemo(()=>{const F={position:n,left:0,top:0};if(!X.floating)return F;const q=OO(X.floating,u.x),K=OO(X.floating,u.y);return a?{...F,transform:"translate("+q+"px, "+K+"px)",...Y9(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:K}},[n,a,X.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:D,refs:G,elements:X,floatingStyles:Z}),[u,D,G,X,Z])}const mP=(t,e)=>({...C1e(t),options:[t,e]}),gP=(t,e)=>({...R1e(t),options:[t,e]}),N1e=(t,e)=>({...A1e(t),options:[t,e]}),K9={...Jp},k1e=K9.useInsertionEffect,L1e=k1e||(t=>t());function tC(t){const e=R.useRef(()=>{});return L1e(()=>{e.current=t}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=t.current.length}function LE(t,e){return Xr(t,{disabledIndices:e})}function DO(t,e){return Xr(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function Xr(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:s=1}=e===void 0?{}:e;const o=t.current,a=i?c=>i.includes(c):c=>{const u=o[c];return u==null||u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-s:s;while(l>=0&&l<=o.length-1&&a(l));return l}function O1e(t,e){let{event:n,orientation:r,loop:i,cols:s,disabledIndices:o,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===yP){if(u&&Cs(n),c===-1)f=l;else if(f=Xr(t,{startingIndex:f,amount:s,decrement:!0,disabledIndices:o}),i&&(c-sh?y:y-s}Yp(t,f)&&(f=c)}if(n.key===Dg&&(u&&Cs(n),c===-1?f=a:(f=Xr(t,{startingIndex:c,amount:s,disabledIndices:o}),i&&c+s>l&&(f=Xr(t,{startingIndex:c%s-s,amount:s,disabledIndices:o}))),Yp(t,f)&&(f=c)),r==="both"){const h=ed(c/s);n.key===hh&&(u&&Cs(n),c%s!==s-1?(f=Xr(t,{startingIndex:c,disabledIndices:o}),i&&uv(f,s,h)&&(f=Xr(t,{startingIndex:c-c%s-1,disabledIndices:o}))):i&&(f=Xr(t,{startingIndex:c-c%s-1,disabledIndices:o})),uv(f,s,h)&&(f=c)),n.key===Bd&&(u&&Cs(n),c%s!==0?(f=Xr(t,{startingIndex:c,disabledIndices:o,decrement:!0}),i&&uv(f,s,h)&&(f=Xr(t,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:o}))):i&&(f=Xr(t,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:o})),uv(f,s,h)&&(f=c));const m=ed(l/s)===h;Yp(t,f)&&(i&&m?f=n.key===Bd?l:Xr(t,{startingIndex:c-c%s-1,disabledIndices:o}):f=c)}return f}function D1e(t,e,n){const r=[];let i=0;return t.forEach((s,o)=>{let{width:a,height:l}=s,c=!1;for(n&&(i=0);!c;){const u=[];for(let f=0;fr[f]==null)?(u.forEach(f=>{r[f]=o}),c=!0):i++}}),[...r]}function F1e(t,e,n,r,i){if(t===-1)return-1;const s=n.indexOf(t);switch(i){case"tl":return s;case"tr":return s+e[t].width-1;case"bl":return s+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function z1e(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let FO=0;function zO(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=e;r&&cancelAnimationFrame(FO);const s=()=>t==null?void 0:t.focus({preventScroll:n});i?s():FO=requestAnimationFrame(s)}var Ci=typeof document<"u"?R.useLayoutEffect:R.useEffect;function U1e(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function B1e(t,e){if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(r!==e.get(n))return!1;return!0}const Z9=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function j1e(t){const{children:e,elementsRef:n,labelsRef:r}=t,[i,s]=R.useState(()=>new Map),o=R.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=R.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ci(()=>{const l=new Map(i);Array.from(l.keys()).sort(U1e).forEach((u,f)=>{l.set(u,f)}),B1e(i,l)||s(l)},[i]),R.createElement(Z9.Provider,{value:R.useMemo(()=>({register:o,unregister:a,map:i,elementsRef:n,labelsRef:r}),[o,a,i,n,r])},e)}function V1e(t){t===void 0&&(t={});const{label:e}=t,{register:n,unregister:r,map:i,elementsRef:s,labelsRef:o}=R.useContext(Z9),[a,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(f=>{if(c.current=f,a!==null&&(s.current[a]=f,o)){var h;const m=e!==void 0;o.current[a]=m?e:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,s,o,e]);return Ci(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),Ci(()=>{const f=c.current?i.get(c.current):null;f!=null&&l(f)},[i]),R.useMemo(()=>({ref:u,index:a??-1}),[a,u])}let UO=!1,$1e=0;const BO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$1e++;function W1e(){const[t,e]=R.useState(()=>UO?BO():void 0);return Ci(()=>{t==null&&e(BO())},[]),R.useEffect(()=>{UO=!0},[]),t}const H1e=K9.useId,G1e=H1e||W1e;function X1e(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(i=>i!==n))||[])}}}const q1e=R.createContext(null),Y1e=R.createContext(null),J9=()=>{var t;return((t=R.useContext(q1e))==null?void 0:t.id)||null},Q9=()=>R.useContext(Y1e);function fv(t){const e=R.useRef(t);return Ci(()=>{e.current=t}),e}function K1e(t,e){let n=t.filter(i=>{var s;return i.parentId===e&&((s=i.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=t.filter(i=>{var s;return(s=r)==null?void 0:s.some(o=>{var a;return i.parentId===o.id&&((a=i.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function Z1e(t,e){let n,r=-1;function i(s,o){o>r&&(n=s,r=o),K1e(t,s).forEach(l=>{i(l.id,o+1)})}return i(e,0),t.find(s=>s.id===n)}function jO(t){return us(t.target)&&t.target.tagName==="BUTTON"}function VO(t){return B9(t)}function vP(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:s}}=t,{enabled:o=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=R.useRef(),h=R.useRef(!1);return R.useMemo(()=>o?{reference:{onPointerDown(m){f.current=m.pointerType},onMouseDown(m){m.button===0&&(PO(f.current)&&c||a!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){if(a==="mousedown"&&f.current){f.current=void 0;return}PO(f.current)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||jO(m))&&(m.key===" "&&!VO(s)&&(m.preventDefault(),h.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||jO(m)||VO(s)||m.key===" "&&h.current&&(h.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}}:{},[o,i,a,c,u,s,l,n,r])}function J1e(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=G1e(),s=R.useRef({}),[o]=R.useState(()=>X1e()),a=J9()!=null,[l,c]=R.useState(r.reference),u=tC((m,y,x)=>{s.current.openEvent=m?y:void 0,o.emit("openchange",{open:m,event:y,reason:x,nested:a}),n==null||n(m,y,x)}),f=R.useMemo(()=>({setPositionReference:c}),[]),h=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:s,open:e,onOpenChange:u,elements:h,events:o,floatingId:i,refs:f}),[e,u,h,o,i,f])}function xP(t){t===void 0&&(t={});const{nodeId:e}=t,n=J1e({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[s,o]=R.useState(null),[a,l]=R.useState(null),u=(i==null?void 0:i.reference)||s,f=R.useRef(null),h=Q9();Ci(()=>{u&&(f.current=u)},[u]);const m=I1e({...t,elements:{...i,...a&&{reference:a}}}),y=R.useCallback(_=>{const S=ci(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(S),m.refs.setReference(S)},[m.refs]),x=R.useCallback(_=>{(ci(_)||_===null)&&(f.current=_,o(_)),(ci(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!ci(_))&&m.refs.setReference(_)},[m.refs]),v=R.useMemo(()=>({...m.refs,setReference:x,setPositionReference:y,domReference:f}),[m.refs,x,y]),g=R.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),b=R.useMemo(()=>({...m,...r,refs:v,elements:g,nodeId:e}),[m,v,g,e,r]);return Ci(()=>{r.dataRef.current.floatingContext=b;const _=h==null?void 0:h.nodesRef.current.find(S=>S.id===e);_&&(_.context=b)}),R.useMemo(()=>({...m,context:b,refs:v,elements:g}),[m,v,g,b])}const $O="active",WO="selected";function OE(t,e,n){const r=new Map,i=n==="item";let s=t;if(i&&t){const{[$O]:o,[WO]:a,...l}=t;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...e.map(o=>{const a=o?o[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((o,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[$O,WO].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),o[c]=function(){for(var h,m=arguments.length,y=new Array(m),x=0;xv(...y)).find(v=>v!==void 0)}}}else o[c]=u}),o),{})}}function bP(t){t===void 0&&(t=[]);const e=t,n=R.useCallback(s=>OE(s,t,"reference"),e),r=R.useCallback(s=>OE(s,t,"floating"),e),i=R.useCallback(s=>OE(s,t,"item"),t.map(s=>s==null?void 0:s.item));return R.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let HO=!1;function sw(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function GO(t,e){return sw(e,t===yP||t===Dg,t===Bd||t===hh)}function DE(t,e,n){return sw(e,t===Dg,n?t===Bd:t===hh)||t==="Enter"||t===" "||t===""}function Q1e(t,e,n){return sw(e,n?t===Bd:t===hh,t===Dg)}function XO(t,e,n){return sw(e,n?t===hh:t===Bd,t===yP)}function ebe(t,e){const{open:n,onOpenChange:r,elements:{domReference:i,floating:s}}=t,{listRef:o,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:y=!1,virtual:x=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:_=void 0,orientation:S="vertical",cols:C=1,scrollItemIntoView:P=!0,virtualItemRef:A,itemSizes:L,dense:k=!1}=e,T=J9(),N=Q9(),z=tC(l),D=R.useRef(v),B=R.useRef(u??-1),G=R.useRef(null),X=R.useRef(!0),Z=R.useRef(z),F=R.useRef(!!s),q=R.useRef(!1),K=R.useRef(!1),Q=fv(_),he=fv(n),fe=fv(P),J=fv(s),[de,be]=R.useState(),[_e,He]=R.useState(),at=tC(function(ae,oe,V){V===void 0&&(V=!1);const Ie=ae.current[oe.current];Ie&&(x?(be(Ie.id),N==null||N.events.emit("virtualfocus",Ie),A&&(A.current=Ie)):zO(Ie,{preventScroll:!0,sync:Jxe()&&Zxe()?HO||q.current:!1}),requestAnimationFrame(()=>{const Re=fe.current;Re&&Ie&&(V||!X.current)&&(Ie.scrollIntoView==null||Ie.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))}))});Ci(()=>{document.createElement("div").focus({get preventScroll(){return HO=!0,!1}})},[]),Ci(()=>{c&&(n&&s?D.current&&u!=null&&(K.current=!0,B.current=u,z(u)):F.current&&(B.current=-1,Z.current(null)))},[c,n,s,u,z]),Ci(()=>{if(c&&n&&s)if(a==null){if(q.current=!1,u!=null)return;if(F.current&&(B.current=-1,at(o,B)),!F.current&&D.current&&(G.current!=null||D.current===!0&&G.current==null)){let ae=0;const oe=()=>{o.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(oe),ae++):(B.current=G.current==null||DE(G.current,S,y)||m?LE(o,Q.current):DO(o,Q.current),G.current=null,z(B.current))};oe()}}else Yp(o,a)||(B.current=a,at(o,B,K.current),K.current=!1)},[c,n,s,a,u,m,o,S,y,z,at,Q]),Ci(()=>{var ae;if(!c||s||!N||x||!F.current)return;const oe=N.nodesRef.current,V=(ae=oe.find(De=>De.id===T))==null||(ae=ae.context)==null?void 0:ae.elements.floating,Ie=AO(e1e(s)),Re=oe.some(De=>De.context&&qxe(De.context.elements.floating,Ie));V&&!Re&&X.current&&V.focus({preventScroll:!0})},[c,s,N,T,x]),Ci(()=>{if(!c||!N||!x||T)return;function ae(oe){He(oe.id),A&&(A.current=oe)}return N.events.on("virtualfocus",ae),()=>{N.events.off("virtualfocus",ae)}},[c,N,x,T,A]),Ci(()=>{Z.current=z,F.current=!!s}),Ci(()=>{n||(G.current=null)},[n]);const Ve=a!=null,$e=R.useMemo(()=>{function ae(V){if(!n)return;const Ie=o.current.indexOf(V);Ie!==-1&&z(Ie)}return{onFocus(V){let{currentTarget:Ie}=V;ae(Ie)},onClick:V=>{let{currentTarget:Ie}=V;return Ie.focus({preventScroll:!0})},...g&&{onMouseMove(V){let{currentTarget:Ie}=V;ae(Ie)},onPointerLeave(V){let{pointerType:Ie}=V;!X.current||Ie==="touch"||(B.current=-1,at(o,B),z(null),x||zO(J.current,{preventScroll:!0}))}}}},[n,J,at,g,o,z,x]);return R.useMemo(()=>{if(!c)return{};const ae=Q.current;function oe(ue){if(X.current=!1,q.current=!0,!he.current&&ue.currentTarget===J.current)return;if(m&&XO(ue.key,S,y)){Cs(ue),r(!1,ue.nativeEvent,"list-navigation"),us(i)&&!x&&i.focus();return}const Ye=B.current,ke=LE(o,ae),$=DO(o,ae);if(ue.key==="Home"&&(Cs(ue),B.current=ke,z(B.current)),ue.key==="End"&&(Cs(ue),B.current=$,z(B.current)),C>1){const U=L||Array.from({length:o.current.length},()=>({width:1,height:1})),ne=D1e(U,C,k),le=ne.findIndex(ye=>ye!=null&&!(ae!=null&&ae.includes(ye))),Te=ne.reduce((ye,Ge,Ae)=>Ge!=null&&!(ae!=null&&ae.includes(Ge))?Ae:ye,-1);if(B.current=ne[O1e({current:ne.map(ye=>ye!=null?o.current[ye]:null)},{event:ue,orientation:S,loop:h,cols:C,disabledIndices:z1e([...ae||[],void 0],ne),minIndex:le,maxIndex:Te,prevIndex:F1e(B.current,U,ne,C,ue.key===Dg?"bl":ue.key===hh?"tr":"tl"),stopEvent:!0})],z(B.current),S==="both")return}if(GO(ue.key,S)){if(Cs(ue),n&&!x&&AO(ue.currentTarget.ownerDocument)===ue.currentTarget){B.current=DE(ue.key,S,y)?ke:$,z(B.current);return}DE(ue.key,S,y)?h?B.current=Ye>=$?f&&Ye!==o.current.length?-1:ke:Xr(o,{startingIndex:Ye,disabledIndices:ae}):B.current=Math.min($,Xr(o,{startingIndex:Ye,disabledIndices:ae})):h?B.current=Ye<=ke?f&&Ye!==-1?o.current.length:$:Xr(o,{startingIndex:Ye,decrement:!0,disabledIndices:ae}):B.current=Math.max(ke,Xr(o,{startingIndex:Ye,decrement:!0,disabledIndices:ae})),Yp(o,B.current)?z(null):z(B.current)}}function V(ue){v==="auto"&&Yxe(ue.nativeEvent)&&(D.current=!0)}function Ie(ue){D.current=v,v==="auto"&&Kxe(ue.nativeEvent)&&(D.current=!0)}const Re=x&&n&&Ve&&{"aria-activedescendant":_e||de},De=o.current.find(ue=>(ue==null?void 0:ue.id)===de);return{reference:{...Re,onKeyDown(ue){X.current=!1;const Ye=ue.key.indexOf("Arrow")===0,ke=Q1e(ue.key,S,y),$=XO(ue.key,S,y),U=GO(ue.key,S),ne=(m?ke:U)||ue.key==="Enter"||ue.key.trim()==="";if(x&&n){const Ge=N==null?void 0:N.nodesRef.current.find(Ee=>Ee.parentId==null),Ae=N&&Ge?Z1e(N.nodesRef.current,Ge.id):null;if(Ye&&Ae&&A){const Ee=new KeyboardEvent("keydown",{key:ue.key,bubbles:!0});if(ke||$){var le,Te;const _t=((le=Ae.context)==null?void 0:le.elements.domReference)===ue.currentTarget,Le=$&&!_t?(Te=Ae.context)==null?void 0:Te.elements.domReference:ke?De:null;Le&&(Cs(ue),Le.dispatchEvent(Ee),He(void 0))}if(U&&Ae.context&&Ae.context.open&&Ae.parentId&&ue.currentTarget!==Ae.context.elements.domReference){var ye;Cs(ue),(ye=Ae.context.elements.domReference)==null||ye.dispatchEvent(Ee);return}}return oe(ue)}if(!(!n&&!b&&Ye)){if(ne&&(G.current=m&&U?null:ue.key),m){ke&&(Cs(ue),n?(B.current=LE(o,ae),z(B.current)):r(!0,ue.nativeEvent,"list-navigation"));return}U&&(u!=null&&(B.current=u),Cs(ue),!n&&b?r(!0,ue.nativeEvent,"list-navigation"):oe(ue),n&&z(B.current))}},onFocus(){n&&z(null)},onPointerDown:Ie,onMouseDown:V,onClick:V},floating:{"aria-orientation":S==="both"?void 0:S,...!n1e(i)&&Re,onKeyDown:oe,onPointerMove(){X.current=!0}},item:$e}},[i,J,de,_e,Q,he,o,c,S,y,x,n,Ve,m,u,b,f,C,h,v,z,r,$e,N,A,L,k])}var e7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},qO=Et.createContext&&Et.createContext(e7),tbe=["attr","size","title"];function nbe(t,e){if(t==null)return{};var n=rbe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rbe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function O1(){return O1=Object.assign?Object.assign.bind():function(t){for(var e=1;eEt.createElement(e.tag,D1({key:n},e.attr),t7(e.child)))}function yo(t){return e=>Et.createElement(abe,O1({attr:D1({},t.attr)},e),t7(t.child))}function abe(t){var e=n=>{var{attr:r,size:i,title:s}=t,o=nbe(t,tbe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Et.createElement("svg",O1({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:D1(D1({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Et.createElement("title",null,s),t.children)};return qO!==void 0?Et.createElement(qO.Consumer,null,n=>e(n)):e(e7)}function lbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(t)}function cbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(t)}function ube(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 10 20 15 15 20"},child:[]},{tag:"path",attr:{d:"M4 4v7a4 4 0 0 0 4 4h12"},child:[]}]})(t)}function fbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function dbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function hbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"},child:[]}]})(t)}function pbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(t)}function mbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"},child:[]}]})(t)}function gbe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"},child:[]}]})(t)}function ybe(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"},child:[]}]})(t)}function n7(t){return yo({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(t)}var r7=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,s){return i[0]===n?(r=s,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,s=this.__entries__;i0},t.prototype.connect_=function(){!nC||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Sbe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!nC||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=wbe.some(function(s){return!!~r.indexOf(s)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),i7=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof jd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new Nbe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof jd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new kbe(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),o7=typeof WeakMap<"u"?new WeakMap:new r7,a7=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Mbe.getInstance(),r=new Lbe(e,n,this);o7.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){a7.prototype[t]=function(){var e;return(e=o7.get(this))[t].apply(e,arguments)}});var Obe=function(){return typeof F1.ResizeObserver<"u"?F1.ResizeObserver:a7}(),Dbe=["client","offset","scroll","bounds","margin"];function ZO(t){var e=[];return Dbe.forEach(function(n){t[n]&&e.push(n)}),e}function JO(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function Fbe(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function zbe(t){return function(e){var n,r;return r=n=function(i){OR(s,i);function s(){for(var a,l=arguments.length,c=new Array(l),u=0;u{let e;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const m=e;e=f??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(y=>y(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{n.clear()}},c=e=t(r,i,l);return l},Bbe=t=>Ube(t);var l7={exports:{}},c7={},u7={exports:{}},f7={};/** + */var iP=Symbol.for("react.element"),sP=Symbol.for("react.portal"),H_=Symbol.for("react.fragment"),G_=Symbol.for("react.strict_mode"),X_=Symbol.for("react.profiler"),q_=Symbol.for("react.provider"),Y_=Symbol.for("react.context"),Zxe=Symbol.for("react.server_context"),K_=Symbol.for("react.forward_ref"),Z_=Symbol.for("react.suspense"),J_=Symbol.for("react.suspense_list"),Q_=Symbol.for("react.memo"),ew=Symbol.for("react.lazy"),Jxe=Symbol.for("react.offscreen"),z9;z9=Symbol.for("react.module.reference");function Vs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case iP:switch(t=t.type,t){case H_:case X_:case G_:case Z_:case J_:return t;default:switch(t=t&&t.$$typeof,t){case Zxe:case Y_:case K_:case ew:case Q_:case q_:return t;default:return e}}case sP:return e}}}xn.ContextConsumer=Y_;xn.ContextProvider=q_;xn.Element=iP;xn.ForwardRef=K_;xn.Fragment=H_;xn.Lazy=ew;xn.Memo=Q_;xn.Portal=sP;xn.Profiler=X_;xn.StrictMode=G_;xn.Suspense=Z_;xn.SuspenseList=J_;xn.isAsyncMode=function(){return!1};xn.isConcurrentMode=function(){return!1};xn.isContextConsumer=function(t){return Vs(t)===Y_};xn.isContextProvider=function(t){return Vs(t)===q_};xn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===iP};xn.isForwardRef=function(t){return Vs(t)===K_};xn.isFragment=function(t){return Vs(t)===H_};xn.isLazy=function(t){return Vs(t)===ew};xn.isMemo=function(t){return Vs(t)===Q_};xn.isPortal=function(t){return Vs(t)===sP};xn.isProfiler=function(t){return Vs(t)===X_};xn.isStrictMode=function(t){return Vs(t)===G_};xn.isSuspense=function(t){return Vs(t)===Z_};xn.isSuspenseList=function(t){return Vs(t)===J_};xn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===H_||t===X_||t===G_||t===Z_||t===J_||t===Jxe||typeof t=="object"&&t!==null&&(t.$$typeof===ew||t.$$typeof===Q_||t.$$typeof===q_||t.$$typeof===Y_||t.$$typeof===K_||t.$$typeof===z9||t.getModuleId!==void 0)};xn.typeOf=Vs;F9.exports=xn;var Qxe=F9.exports;function oP(t,e=0,n=[]){return R.Children.toArray(t).reduce((r,i,s)=>(Qxe.isFragment(i)?r.push.apply(r,oP(i.props.children,e+1,n.concat(i.key||s))):R.isValidElement(i)?r.push(R.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&r.push(i),r),[])}function tw(){return typeof window<"u"}function hh(t){return U9(t)?(t.nodeName||"").toLowerCase():"#document"}function as(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ta(t){var e;return(e=(U9(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function U9(t){return tw()?t instanceof Node||t instanceof as(t).Node:!1}function ci(t){return tw()?t instanceof Element||t instanceof as(t).Element:!1}function us(t){return tw()?t instanceof HTMLElement||t instanceof as(t).HTMLElement:!1}function ZT(t){return!tw()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof as(t).ShadowRoot}function kg(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=ho(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function e1e(t){return["table","td","th"].includes(hh(t))}function nw(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function aP(t){const e=lP(),n=ci(t)?ho(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function t1e(t){let e=Bl(t);for(;us(e)&&!Ud(e);){if(aP(e))return e;if(nw(e))return null;e=Bl(e)}return null}function lP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ud(t){return["html","body","#document"].includes(hh(t))}function ho(t){return as(t).getComputedStyle(t)}function rw(t){return ci(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Bl(t){if(hh(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ZT(t)&&t.host||ta(t);return ZT(e)?e.host:e}function B9(t){const e=Bl(t);return Ud(e)?t.ownerDocument?t.ownerDocument.body:t.body:us(e)&&kg(e)?e:B9(e)}function Jm(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=B9(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=as(i);if(s){const a=JT(o);return e.concat(o,o.visualViewport||[],kg(i)?i:[],a&&n?Jm(a):[])}return e.concat(i,Jm(i,[],n))}function JT(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function AO(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function n1e(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ZT(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function j9(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function V9(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function r1e(t){return t.mozInputSource===0&&t.isTrusted?!0:QT()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function i1e(t){return a1e()?!1:!QT()&&t.width===0&&t.height===0||QT()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function s1e(){return/apple/i.test(navigator.vendor)}function QT(){const t=/android/i;return t.test(j9())||t.test(V9())}function o1e(){return j9().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function a1e(){return V9().includes("jsdom/")}function PO(t,e){return["mouse","pen"].includes(t)}function l1e(t){return(t==null?void 0:t.ownerDocument)||document}const c1e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function $9(t){return us(t)&&t.matches(c1e)}function Cs(t){t.preventDefault(),t.stopPropagation()}function u1e(t){return t?t.getAttribute("role")==="combobox"&&$9(t):!1}const Bd=Math.min,Qi=Math.max,N1=Math.round,td=Math.floor,Wo=t=>({x:t,y:t});function IO(t,e,n){return Qi(t,Bd(e,n))}function iw(t,e){return typeof t=="function"?t(e):t}function Lg(t){return t.split("-")[0]}function cP(t){return t.split("-")[1]}function W9(t){return t==="x"?"y":"x"}function f1e(t){return t==="y"?"height":"width"}function Og(t){return["top","bottom"].includes(Lg(t))?"y":"x"}function d1e(t){return W9(Og(t))}function h1e(t){return{top:0,right:0,bottom:0,left:0,...t}}function p1e(t){return typeof t!="number"?h1e(t):{top:t,right:t,bottom:t,left:t}}function k1(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function NO(t,e,n){let{reference:r,floating:i}=t;const s=Og(e),o=d1e(e),a=f1e(o),l=Lg(e),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-i.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(cP(e)){case"start":m[o]-=h*(n&&c?-1:1);break;case"end":m[o]+=h*(n&&c?-1:1);break}return m}const m1e=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=NO(c,r,l),h=r,m={},y=0;for(let x=0;x{let{x:g,y:b}=v;return{x:g,y:b}}},...l}=iw(t,e),c={x:n,y:r},u=await H9(e,l),f=Og(Lg(i)),h=W9(f);let m=c[h],y=c[f];if(s){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",b=m+u[v],_=m-u[g];m=IO(b,m,_)}if(o){const v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=y+u[v],_=y-u[g];y=IO(b,y,_)}const x=a.fn({...e,[h]:m,[f]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:s,[f]:o}}}}}},x1e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=iw(t,e),u=await H9(e,c),f=Lg(i),h=cP(i),m=Og(i)==="y",{width:y,height:x}=s.floating;let v,g;f==="top"||f==="bottom"?(v=f,g=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,v=h==="end"?"top":"bottom");const b=x-u.top-u.bottom,_=y-u.left-u.right,S=Bd(x-u[v],b),C=Bd(y-u[g],_),P=!e.middlewareData.shift;let A=S,L=C;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(L=_),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=b),P&&!h){const T=Qi(u.left,0),N=Qi(u.right,0),z=Qi(u.top,0),D=Qi(u.bottom,0);m?L=y-2*(T!==0||N!==0?T+N:Qi(u.left,u.right)):A=x-2*(z!==0||D!==0?z+D:Qi(u.top,u.bottom))}await l({...e,availableWidth:L,availableHeight:A});const k=await o.getDimensions(a.floating);return y!==k.width||x!==k.height?{reset:{rects:!0}}:{}}}};function G9(t){const e=ho(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=us(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=N1(n)!==s||N1(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function uP(t){return ci(t)?t:t.contextElement}function gd(t){const e=uP(t);if(!us(e))return Wo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=G9(e);let o=(s?N1(n.width):n.width)/r,a=(s?N1(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const b1e=Wo(0);function X9(t){const e=as(t);return!lP()||!e.visualViewport?b1e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _1e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==as(t)?!1:e}function bu(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=uP(t);let o=Wo(1);e&&(r?ci(r)&&(o=gd(r)):o=gd(t));const a=_1e(s,n,r)?X9(s):Wo(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const h=as(s),m=r&&ci(r)?as(r):r;let y=h,x=JT(y);for(;x&&r&&m!==y;){const v=gd(x),g=x.getBoundingClientRect(),b=ho(x),_=g.left+(x.clientLeft+parseFloat(b.paddingLeft))*v.x,S=g.top+(x.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=_,c+=S,y=as(x),x=JT(y)}}return k1({width:u,height:f,x:l,y:c})}function fP(t,e){const n=rw(t).scrollLeft;return e?e.left+n:bu(ta(t)).left+n}function q9(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:fP(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function w1e(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=ta(r),a=e?nw(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Wo(1);const u=Wo(0),f=us(r);if((f||!f&&!s)&&((hh(r)!=="body"||kg(o))&&(l=rw(r)),us(r))){const m=bu(r);c=gd(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=o&&!f&&!s?q9(o,l,!0):Wo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function S1e(t){return Array.from(t.getClientRects())}function M1e(t){const e=ta(t),n=rw(t),r=t.ownerDocument.body,i=Qi(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Qi(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+fP(t);const a=-n.scrollTop;return ho(r).direction==="rtl"&&(o+=Qi(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function E1e(t,e){const n=as(t),r=ta(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=lP();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function T1e(t,e){const n=bu(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=us(t)?gd(t):Wo(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function kO(t,e,n){let r;if(e==="viewport")r=E1e(t,n);else if(e==="document")r=M1e(ta(t));else if(ci(e))r=T1e(e,n);else{const i=X9(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return k1(r)}function Y9(t,e){const n=Bl(t);return n===e||!ci(n)||Ud(n)?!1:ho(n).position==="fixed"||Y9(n,e)}function C1e(t,e){const n=e.get(t);if(n)return n;let r=Jm(t,[],!1).filter(a=>ci(a)&&hh(a)!=="body"),i=null;const s=ho(t).position==="fixed";let o=s?Bl(t):t;for(;ci(o)&&!Ud(o);){const a=ho(o),l=aP(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||kg(o)&&!l&&Y9(t,o))?r=r.filter(u=>u!==o):i=a,o=Bl(o)}return e.set(t,r),r}function R1e(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?nw(e)?[]:C1e(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const f=kO(e,u,i);return c.top=Qi(f.top,c.top),c.right=Bd(f.right,c.right),c.bottom=Bd(f.bottom,c.bottom),c.left=Qi(f.left,c.left),c},kO(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function A1e(t){const{width:e,height:n}=G9(t);return{width:e,height:n}}function P1e(t,e,n){const r=us(e),i=ta(e),s=n==="fixed",o=bu(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Wo(0);if(r||!r&&!s)if((hh(e)!=="body"||kg(i))&&(a=rw(e)),r){const h=bu(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=fP(i));const c=i&&!r&&!s?q9(i,a):Wo(0),u=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:o.width,height:o.height}}function NE(t){return ho(t).position==="static"}function LO(t,e){if(!us(t)||ho(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ta(t)===n&&(n=n.ownerDocument.body),n}function K9(t,e){const n=as(t);if(nw(t))return n;if(!us(t)){let i=Bl(t);for(;i&&!Ud(i);){if(ci(i)&&!NE(i))return i;i=Bl(i)}return n}let r=LO(t,e);for(;r&&e1e(r)&&NE(r);)r=LO(r,e);return r&&Ud(r)&&NE(r)&&!aP(r)?n:r||t1e(t)||n}const I1e=async function(t){const e=this.getOffsetParent||K9,n=this.getDimensions,r=await n(t.floating);return{reference:P1e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function N1e(t){return ho(t).direction==="rtl"}const k1e={convertOffsetParentRelativeRectToViewportRelativeRect:w1e,getDocumentElement:ta,getClippingRect:R1e,getOffsetParent:K9,getElementRects:I1e,getClientRects:S1e,getDimensions:A1e,getScale:gd,isElement:ci,isRTL:N1e};function Z9(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function L1e(t,e){let n=null,r;const i=ta(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:h,height:m}=c;if(a||e(),!h||!m)return;const y=td(f),x=td(i.clientWidth-(u+h)),v=td(i.clientHeight-(f+m)),g=td(u),_={rootMargin:-y+"px "+-x+"px "+-v+"px "+-g+"px",threshold:Qi(0,Bd(1,l))||1};let S=!0;function C(P){const A=P[0].intersectionRatio;if(A!==l){if(!S)return o();A?o(!1,A):r=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!Z9(c,t.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(C,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,_)}n.observe(t)}return o(!0),s}function dP(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=uP(t),u=i||s?[...c?Jm(c):[],...Jm(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=c&&a?L1e(c,n):null;let h=-1,m=null;o&&(m=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(e)})),n()}),c&&!l&&m.observe(c),m.observe(e));let y,x=l?bu(t):null;l&&v();function v(){const g=bu(t);x&&!Z9(x,g)&&n(),x=g,y=requestAnimationFrame(v)}return n(),()=>{var g;u.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const O1e=y1e,D1e=v1e,F1e=x1e,z1e=(t,e,n)=>{const r=new Map,i={platform:k1e,...n},s={...i.platform,_c:r};return m1e(t,e,{...i,platform:s})};var Hv=typeof document<"u"?R.useLayoutEffect:R.useEffect;function L1(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!L1(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!L1(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function J9(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function OO(t,e){const n=J9(t);return Math.round(e*n)/n}function kE(t){const e=R.useRef(t);return Hv(()=>{e.current=t}),e}function U1e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=R.useState(r);L1(h,r)||m(r);const[y,x]=R.useState(null),[v,g]=R.useState(null),b=R.useCallback(F=>{F!==P.current&&(P.current=F,x(F))},[]),_=R.useCallback(F=>{F!==A.current&&(A.current=F,g(F))},[]),S=s||y,C=o||v,P=R.useRef(null),A=R.useRef(null),L=R.useRef(u),k=l!=null,T=kE(l),N=kE(i),z=kE(c),D=R.useCallback(()=>{if(!P.current||!A.current)return;const F={placement:e,strategy:n,middleware:h};N.current&&(F.platform=N.current),z1e(P.current,A.current,F).then(q=>{const K={...q,isPositioned:z.current!==!1};B.current&&!L1(L.current,K)&&(L.current=K,Hl.flushSync(()=>{f(K)}))})},[h,e,n,N,z]);Hv(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[c]);const B=R.useRef(!1);Hv(()=>(B.current=!0,()=>{B.current=!1}),[]),Hv(()=>{if(S&&(P.current=S),C&&(A.current=C),S&&C){if(T.current)return T.current(S,C,D);D()}},[S,C,D,T,k]);const G=R.useMemo(()=>({reference:P,floating:A,setReference:b,setFloating:_}),[b,_]),X=R.useMemo(()=>({reference:S,floating:C}),[S,C]),Z=R.useMemo(()=>{const F={position:n,left:0,top:0};if(!X.floating)return F;const q=OO(X.floating,u.x),K=OO(X.floating,u.y);return a?{...F,transform:"translate("+q+"px, "+K+"px)",...J9(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:K}},[n,a,X.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:D,refs:G,elements:X,floatingStyles:Z}),[u,D,G,X,Z])}const hP=(t,e)=>({...O1e(t),options:[t,e]}),pP=(t,e)=>({...D1e(t),options:[t,e]}),B1e=(t,e)=>({...F1e(t),options:[t,e]}),Q9={...Jp},j1e=Q9.useInsertionEffect,V1e=j1e||(t=>t());function eC(t){const e=R.useRef(()=>{});return V1e(()=>{e.current=t}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=t.current.length}function LE(t,e){return Xr(t,{disabledIndices:e})}function DO(t,e){return Xr(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function Xr(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:s=1}=e===void 0?{}:e;const o=t.current,a=i?c=>i.includes(c):c=>{const u=o[c];return u==null||u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-s:s;while(l>=0&&l<=o.length-1&&a(l));return l}function $1e(t,e){let{event:n,orientation:r,loop:i,cols:s,disabledIndices:o,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===mP){if(u&&Cs(n),c===-1)f=l;else if(f=Xr(t,{startingIndex:f,amount:s,decrement:!0,disabledIndices:o}),i&&(c-sh?y:y-s}Yp(t,f)&&(f=c)}if(n.key===Dg&&(u&&Cs(n),c===-1?f=a:(f=Xr(t,{startingIndex:c,amount:s,disabledIndices:o}),i&&c+s>l&&(f=Xr(t,{startingIndex:c%s-s,amount:s,disabledIndices:o}))),Yp(t,f)&&(f=c)),r==="both"){const h=td(c/s);n.key===ph&&(u&&Cs(n),c%s!==s-1?(f=Xr(t,{startingIndex:c,disabledIndices:o}),i&&uv(f,s,h)&&(f=Xr(t,{startingIndex:c-c%s-1,disabledIndices:o}))):i&&(f=Xr(t,{startingIndex:c-c%s-1,disabledIndices:o})),uv(f,s,h)&&(f=c)),n.key===jd&&(u&&Cs(n),c%s!==0?(f=Xr(t,{startingIndex:c,disabledIndices:o,decrement:!0}),i&&uv(f,s,h)&&(f=Xr(t,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:o}))):i&&(f=Xr(t,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:o})),uv(f,s,h)&&(f=c));const m=td(l/s)===h;Yp(t,f)&&(i&&m?f=n.key===jd?l:Xr(t,{startingIndex:c-c%s-1,disabledIndices:o}):f=c)}return f}function W1e(t,e,n){const r=[];let i=0;return t.forEach((s,o)=>{let{width:a,height:l}=s,c=!1;for(n&&(i=0);!c;){const u=[];for(let f=0;fr[f]==null)?(u.forEach(f=>{r[f]=o}),c=!0):i++}}),[...r]}function H1e(t,e,n,r,i){if(t===-1)return-1;const s=n.indexOf(t);switch(i){case"tl":return s;case"tr":return s+e[t].width-1;case"bl":return s+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function G1e(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let FO=0;function zO(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=e;r&&cancelAnimationFrame(FO);const s=()=>t==null?void 0:t.focus({preventScroll:n});i?s():FO=requestAnimationFrame(s)}var Ci=typeof document<"u"?R.useLayoutEffect:R.useEffect;function X1e(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function q1e(t,e){if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(r!==e.get(n))return!1;return!0}const e7=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Y1e(t){const{children:e,elementsRef:n,labelsRef:r}=t,[i,s]=R.useState(()=>new Map),o=R.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=R.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ci(()=>{const l=new Map(i);Array.from(l.keys()).sort(X1e).forEach((u,f)=>{l.set(u,f)}),q1e(i,l)||s(l)},[i]),R.createElement(e7.Provider,{value:R.useMemo(()=>({register:o,unregister:a,map:i,elementsRef:n,labelsRef:r}),[o,a,i,n,r])},e)}function K1e(t){t===void 0&&(t={});const{label:e}=t,{register:n,unregister:r,map:i,elementsRef:s,labelsRef:o}=R.useContext(e7),[a,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(f=>{if(c.current=f,a!==null&&(s.current[a]=f,o)){var h;const m=e!==void 0;o.current[a]=m?e:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,s,o,e]);return Ci(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),Ci(()=>{const f=c.current?i.get(c.current):null;f!=null&&l(f)},[i]),R.useMemo(()=>({ref:u,index:a??-1}),[a,u])}let UO=!1,Z1e=0;const BO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Z1e++;function J1e(){const[t,e]=R.useState(()=>UO?BO():void 0);return Ci(()=>{t==null&&e(BO())},[]),R.useEffect(()=>{UO=!0},[]),t}const Q1e=Q9.useId,ebe=Q1e||J1e;function tbe(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(i=>i!==n))||[])}}}const nbe=R.createContext(null),rbe=R.createContext(null),t7=()=>{var t;return((t=R.useContext(nbe))==null?void 0:t.id)||null},n7=()=>R.useContext(rbe);function fv(t){const e=R.useRef(t);return Ci(()=>{e.current=t}),e}function ibe(t,e){let n=t.filter(i=>{var s;return i.parentId===e&&((s=i.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=t.filter(i=>{var s;return(s=r)==null?void 0:s.some(o=>{var a;return i.parentId===o.id&&((a=i.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function sbe(t,e){let n,r=-1;function i(s,o){o>r&&(n=s,r=o),ibe(t,s).forEach(l=>{i(l.id,o+1)})}return i(e,0),t.find(s=>s.id===n)}function jO(t){return us(t.target)&&t.target.tagName==="BUTTON"}function VO(t){return $9(t)}function gP(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:s}}=t,{enabled:o=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=R.useRef(),h=R.useRef(!1);return R.useMemo(()=>o?{reference:{onPointerDown(m){f.current=m.pointerType},onMouseDown(m){m.button===0&&(PO(f.current)&&c||a!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){if(a==="mousedown"&&f.current){f.current=void 0;return}PO(f.current)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||jO(m))&&(m.key===" "&&!VO(s)&&(m.preventDefault(),h.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||jO(m)||VO(s)||m.key===" "&&h.current&&(h.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}}:{},[o,i,a,c,u,s,l,n,r])}function obe(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=ebe(),s=R.useRef({}),[o]=R.useState(()=>tbe()),a=t7()!=null,[l,c]=R.useState(r.reference),u=eC((m,y,x)=>{s.current.openEvent=m?y:void 0,o.emit("openchange",{open:m,event:y,reason:x,nested:a}),n==null||n(m,y,x)}),f=R.useMemo(()=>({setPositionReference:c}),[]),h=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:s,open:e,onOpenChange:u,elements:h,events:o,floatingId:i,refs:f}),[e,u,h,o,i,f])}function yP(t){t===void 0&&(t={});const{nodeId:e}=t,n=obe({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[s,o]=R.useState(null),[a,l]=R.useState(null),u=(i==null?void 0:i.reference)||s,f=R.useRef(null),h=n7();Ci(()=>{u&&(f.current=u)},[u]);const m=U1e({...t,elements:{...i,...a&&{reference:a}}}),y=R.useCallback(_=>{const S=ci(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(S),m.refs.setReference(S)},[m.refs]),x=R.useCallback(_=>{(ci(_)||_===null)&&(f.current=_,o(_)),(ci(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!ci(_))&&m.refs.setReference(_)},[m.refs]),v=R.useMemo(()=>({...m.refs,setReference:x,setPositionReference:y,domReference:f}),[m.refs,x,y]),g=R.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),b=R.useMemo(()=>({...m,...r,refs:v,elements:g,nodeId:e}),[m,v,g,e,r]);return Ci(()=>{r.dataRef.current.floatingContext=b;const _=h==null?void 0:h.nodesRef.current.find(S=>S.id===e);_&&(_.context=b)}),R.useMemo(()=>({...m,context:b,refs:v,elements:g}),[m,v,g,b])}const $O="active",WO="selected";function OE(t,e,n){const r=new Map,i=n==="item";let s=t;if(i&&t){const{[$O]:o,[WO]:a,...l}=t;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...e.map(o=>{const a=o?o[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((o,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[$O,WO].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),o[c]=function(){for(var h,m=arguments.length,y=new Array(m),x=0;xv(...y)).find(v=>v!==void 0)}}}else o[c]=u}),o),{})}}function vP(t){t===void 0&&(t=[]);const e=t,n=R.useCallback(s=>OE(s,t,"reference"),e),r=R.useCallback(s=>OE(s,t,"floating"),e),i=R.useCallback(s=>OE(s,t,"item"),t.map(s=>s==null?void 0:s.item));return R.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let HO=!1;function sw(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function GO(t,e){return sw(e,t===mP||t===Dg,t===jd||t===ph)}function DE(t,e,n){return sw(e,t===Dg,n?t===jd:t===ph)||t==="Enter"||t===" "||t===""}function abe(t,e,n){return sw(e,n?t===jd:t===ph,t===Dg)}function XO(t,e,n){return sw(e,n?t===ph:t===jd,t===mP)}function lbe(t,e){const{open:n,onOpenChange:r,elements:{domReference:i,floating:s}}=t,{listRef:o,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:y=!1,virtual:x=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:_=void 0,orientation:S="vertical",cols:C=1,scrollItemIntoView:P=!0,virtualItemRef:A,itemSizes:L,dense:k=!1}=e,T=t7(),N=n7(),z=eC(l),D=R.useRef(v),B=R.useRef(u??-1),G=R.useRef(null),X=R.useRef(!0),Z=R.useRef(z),F=R.useRef(!!s),q=R.useRef(!1),K=R.useRef(!1),Q=fv(_),he=fv(n),fe=fv(P),J=fv(s),[de,be]=R.useState(),[_e,Xe]=R.useState(),at=eC(function(ae,oe,V){V===void 0&&(V=!1);const Ie=ae.current[oe.current];Ie&&(x?(be(Ie.id),N==null||N.events.emit("virtualfocus",Ie),A&&(A.current=Ie)):zO(Ie,{preventScroll:!0,sync:o1e()&&s1e()?HO||q.current:!1}),requestAnimationFrame(()=>{const Re=fe.current;Re&&Ie&&(V||!X.current)&&(Ie.scrollIntoView==null||Ie.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))}))});Ci(()=>{document.createElement("div").focus({get preventScroll(){return HO=!0,!1}})},[]),Ci(()=>{c&&(n&&s?D.current&&u!=null&&(K.current=!0,B.current=u,z(u)):F.current&&(B.current=-1,Z.current(null)))},[c,n,s,u,z]),Ci(()=>{if(c&&n&&s)if(a==null){if(q.current=!1,u!=null)return;if(F.current&&(B.current=-1,at(o,B)),!F.current&&D.current&&(G.current!=null||D.current===!0&&G.current==null)){let ae=0;const oe=()=>{o.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(oe),ae++):(B.current=G.current==null||DE(G.current,S,y)||m?LE(o,Q.current):DO(o,Q.current),G.current=null,z(B.current))};oe()}}else Yp(o,a)||(B.current=a,at(o,B,K.current),K.current=!1)},[c,n,s,a,u,m,o,S,y,z,at,Q]),Ci(()=>{var ae;if(!c||s||!N||x||!F.current)return;const oe=N.nodesRef.current,V=(ae=oe.find(De=>De.id===T))==null||(ae=ae.context)==null?void 0:ae.elements.floating,Ie=AO(l1e(s)),Re=oe.some(De=>De.context&&n1e(De.context.elements.floating,Ie));V&&!Re&&X.current&&V.focus({preventScroll:!0})},[c,s,N,T,x]),Ci(()=>{if(!c||!N||!x||T)return;function ae(oe){Xe(oe.id),A&&(A.current=oe)}return N.events.on("virtualfocus",ae),()=>{N.events.off("virtualfocus",ae)}},[c,N,x,T,A]),Ci(()=>{Z.current=z,F.current=!!s}),Ci(()=>{n||(G.current=null)},[n]);const Ve=a!=null,$e=R.useMemo(()=>{function ae(V){if(!n)return;const Ie=o.current.indexOf(V);Ie!==-1&&z(Ie)}return{onFocus(V){let{currentTarget:Ie}=V;ae(Ie)},onClick:V=>{let{currentTarget:Ie}=V;return Ie.focus({preventScroll:!0})},...g&&{onMouseMove(V){let{currentTarget:Ie}=V;ae(Ie)},onPointerLeave(V){let{pointerType:Ie}=V;!X.current||Ie==="touch"||(B.current=-1,at(o,B),z(null),x||zO(J.current,{preventScroll:!0}))}}}},[n,J,at,g,o,z,x]);return R.useMemo(()=>{if(!c)return{};const ae=Q.current;function oe(ue){if(X.current=!1,q.current=!0,!he.current&&ue.currentTarget===J.current)return;if(m&&XO(ue.key,S,y)){Cs(ue),r(!1,ue.nativeEvent,"list-navigation"),us(i)&&!x&&i.focus();return}const Ye=B.current,ke=LE(o,ae),$=DO(o,ae);if(ue.key==="Home"&&(Cs(ue),B.current=ke,z(B.current)),ue.key==="End"&&(Cs(ue),B.current=$,z(B.current)),C>1){const U=L||Array.from({length:o.current.length},()=>({width:1,height:1})),ne=W1e(U,C,k),le=ne.findIndex(ye=>ye!=null&&!(ae!=null&&ae.includes(ye))),Te=ne.reduce((ye,He,Ae)=>He!=null&&!(ae!=null&&ae.includes(He))?Ae:ye,-1);if(B.current=ne[$1e({current:ne.map(ye=>ye!=null?o.current[ye]:null)},{event:ue,orientation:S,loop:h,cols:C,disabledIndices:G1e([...ae||[],void 0],ne),minIndex:le,maxIndex:Te,prevIndex:H1e(B.current,U,ne,C,ue.key===Dg?"bl":ue.key===ph?"tr":"tl"),stopEvent:!0})],z(B.current),S==="both")return}if(GO(ue.key,S)){if(Cs(ue),n&&!x&&AO(ue.currentTarget.ownerDocument)===ue.currentTarget){B.current=DE(ue.key,S,y)?ke:$,z(B.current);return}DE(ue.key,S,y)?h?B.current=Ye>=$?f&&Ye!==o.current.length?-1:ke:Xr(o,{startingIndex:Ye,disabledIndices:ae}):B.current=Math.min($,Xr(o,{startingIndex:Ye,disabledIndices:ae})):h?B.current=Ye<=ke?f&&Ye!==-1?o.current.length:$:Xr(o,{startingIndex:Ye,decrement:!0,disabledIndices:ae}):B.current=Math.max(ke,Xr(o,{startingIndex:Ye,decrement:!0,disabledIndices:ae})),Yp(o,B.current)?z(null):z(B.current)}}function V(ue){v==="auto"&&r1e(ue.nativeEvent)&&(D.current=!0)}function Ie(ue){D.current=v,v==="auto"&&i1e(ue.nativeEvent)&&(D.current=!0)}const Re=x&&n&&Ve&&{"aria-activedescendant":_e||de},De=o.current.find(ue=>(ue==null?void 0:ue.id)===de);return{reference:{...Re,onKeyDown(ue){X.current=!1;const Ye=ue.key.indexOf("Arrow")===0,ke=abe(ue.key,S,y),$=XO(ue.key,S,y),U=GO(ue.key,S),ne=(m?ke:U)||ue.key==="Enter"||ue.key.trim()==="";if(x&&n){const He=N==null?void 0:N.nodesRef.current.find(Ee=>Ee.parentId==null),Ae=N&&He?sbe(N.nodesRef.current,He.id):null;if(Ye&&Ae&&A){const Ee=new KeyboardEvent("keydown",{key:ue.key,bubbles:!0});if(ke||$){var le,Te;const _t=((le=Ae.context)==null?void 0:le.elements.domReference)===ue.currentTarget,Le=$&&!_t?(Te=Ae.context)==null?void 0:Te.elements.domReference:ke?De:null;Le&&(Cs(ue),Le.dispatchEvent(Ee),Xe(void 0))}if(U&&Ae.context&&Ae.context.open&&Ae.parentId&&ue.currentTarget!==Ae.context.elements.domReference){var ye;Cs(ue),(ye=Ae.context.elements.domReference)==null||ye.dispatchEvent(Ee);return}}return oe(ue)}if(!(!n&&!b&&Ye)){if(ne&&(G.current=m&&U?null:ue.key),m){ke&&(Cs(ue),n?(B.current=LE(o,ae),z(B.current)):r(!0,ue.nativeEvent,"list-navigation"));return}U&&(u!=null&&(B.current=u),Cs(ue),!n&&b?r(!0,ue.nativeEvent,"list-navigation"):oe(ue),n&&z(B.current))}},onFocus(){n&&z(null)},onPointerDown:Ie,onMouseDown:V,onClick:V},floating:{"aria-orientation":S==="both"?void 0:S,...!u1e(i)&&Re,onKeyDown:oe,onPointerMove(){X.current=!0}},item:$e}},[i,J,de,_e,Q,he,o,c,S,y,x,n,Ve,m,u,b,f,C,h,v,z,r,$e,N,A,L,k])}var r7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},qO=Et.createContext&&Et.createContext(r7),cbe=["attr","size","title"];function ube(t,e){if(t==null)return{};var n=fbe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function fbe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function O1(){return O1=Object.assign?Object.assign.bind():function(t){for(var e=1;eEt.createElement(e.tag,D1({key:n},e.attr),i7(e.child)))}function yo(t){return e=>Et.createElement(mbe,O1({attr:D1({},t.attr)},e),i7(t.child))}function mbe(t){var e=n=>{var{attr:r,size:i,title:s}=t,o=ube(t,cbe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Et.createElement("svg",O1({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:D1(D1({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Et.createElement("title",null,s),t.children)};return qO!==void 0?Et.createElement(qO.Consumer,null,n=>e(n)):e(r7)}function gbe(t){return yo({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(t)}function ybe(t){return yo({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(t)}function vbe(t){return yo({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 10 20 15 15 20"},child:[]},{tag:"path",attr:{d:"M4 4v7a4 4 0 0 0 4 4h12"},child:[]}]})(t)}function xbe(t){return yo({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function bbe(t){return yo({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function _be(t){return yo({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"},child:[]}]})(t)}function wbe(t){return yo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(t)}function Sbe(t){return yo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"},child:[]}]})(t)}function Mbe(t){return yo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"},child:[]}]})(t)}function Ebe(t){return yo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"},child:[]}]})(t)}function s7(t){return yo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(t)}var o7=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,s){return i[0]===n?(r=s,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,s=this.__entries__;i0},t.prototype.connect_=function(){!tC||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ibe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!tC||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=Pbe.some(function(s){return!!~r.indexOf(s)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),a7=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof Vd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new Bbe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Vd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new jbe(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),c7=typeof WeakMap<"u"?new WeakMap:new o7,u7=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Nbe.getInstance(),r=new Vbe(e,n,this);c7.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){u7.prototype[t]=function(){var e;return(e=c7.get(this))[t].apply(e,arguments)}});var $be=function(){return typeof F1.ResizeObserver<"u"?F1.ResizeObserver:u7}(),Wbe=["client","offset","scroll","bounds","margin"];function ZO(t){var e=[];return Wbe.forEach(function(n){t[n]&&e.push(n)}),e}function JO(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function Hbe(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function Gbe(t){return function(e){var n,r;return r=n=function(i){kR(s,i);function s(){for(var a,l=arguments.length,c=new Array(l),u=0;u{let e;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const m=e;e=f??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(y=>y(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(Xbe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},qbe=t=>t?QO(t):QO;var f7={exports:{}},d7={},h7={exports:{}},p7={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -4060,7 +4060,7 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Vd=R;function jbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Vbe=typeof Object.is=="function"?Object.is:jbe,$be=Vd.useState,Wbe=Vd.useEffect,Hbe=Vd.useLayoutEffect,Gbe=Vd.useDebugValue;function Xbe(t,e){var n=e(),r=$be({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return Hbe(function(){i.value=n,i.getSnapshot=e,FE(i)&&s({inst:i})},[t,n,e]),Wbe(function(){return FE(i)&&s({inst:i}),t(function(){FE(i)&&s({inst:i})})},[t]),Gbe(n),n}function FE(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Vbe(t,n)}catch{return!0}}function qbe(t,e){return e()}var Ybe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?qbe:Xbe;f7.useSyncExternalStore=Vd.useSyncExternalStore!==void 0?Vd.useSyncExternalStore:Ybe;u7.exports=f7;var Kbe=u7.exports;/** + */var $d=R;function Ybe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Kbe=typeof Object.is=="function"?Object.is:Ybe,Zbe=$d.useState,Jbe=$d.useEffect,Qbe=$d.useLayoutEffect,e_e=$d.useDebugValue;function t_e(t,e){var n=e(),r=Zbe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return Qbe(function(){i.value=n,i.getSnapshot=e,FE(i)&&s({inst:i})},[t,n,e]),Jbe(function(){return FE(i)&&s({inst:i}),t(function(){FE(i)&&s({inst:i})})},[t]),e_e(n),n}function FE(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Kbe(t,n)}catch{return!0}}function n_e(t,e){return e()}var r_e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n_e:t_e;p7.useSyncExternalStore=$d.useSyncExternalStore!==void 0?$d.useSyncExternalStore:r_e;h7.exports=p7;var i_e=h7.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -4068,14 +4068,14 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var aw=R,Zbe=Kbe;function Jbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qbe=typeof Object.is=="function"?Object.is:Jbe,e_e=Zbe.useSyncExternalStore,t_e=aw.useRef,n_e=aw.useEffect,r_e=aw.useMemo,i_e=aw.useDebugValue;c7.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=t_e(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=r_e(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),i!==void 0&&o.hasValue){var y=o.value;if(i(y,m))return f=y}return f=m}if(y=f,Qbe(u,m))return y;var x=r(m);return i!==void 0&&i(y,x)?y:(u=m,f=x)}var c=!1,u,f,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=e_e(t,s[0],s[1]);return n_e(function(){o.hasValue=!0,o.value=a},[a]),i_e(a),a};l7.exports=c7;var s_e=l7.exports;const o_e=Va(s_e),{useDebugValue:a_e}=Et,{useSyncExternalStoreWithSelector:l_e}=o_e,c_e=t=>t;function u_e(t,e=c_e,n){const r=l_e(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return a_e(r),r}const f_e=t=>{const e=typeof t=="function"?Bbe(t):t,n=(r,i)=>u_e(e,r,i);return Object.assign(n,e),n},d_e=t=>f_e(t);var h_e=Object.defineProperty,p_e=(t,e,n)=>e in t?h_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sp=(t,e,n)=>(p_e(t,typeof e!="symbol"?e+"":e,n),n);const wP=R.createContext({}),m_e=R.createContext(void 0),g_e="_wrapper_9665499",y_e="_grid_5146261",v_e="_innerContainer_27a3adb",x_e="_colHeaders_a985f35",b_e="_rowHeaders_63b4056",__e="_indexCell_080a16e",w_e="_stickyGrid_33fa7fa",S_e="_cell_2658e21",M_e="_topLeftCell_e826718 _indexCell_080a16e",Ic={wrapper:g_e,grid:y_e,innerContainer:v_e,colHeaders:x_e,rowHeaders:b_e,indexCell:__e,stickyGrid:w_e,cell:S_e,topLeftCell:M_e};function E_e(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:s,cellFormatter:o}=R.useContext(wP);return E.jsx("div",{className:Ic.cell,style:{...r,left:r.left+i,top:r.top+s.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:o(e,n)})}R.memo(E_e);function QO(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:s}=t,{cellSize:o}=R.useContext(wP);return a6(e,n+1).map(a=>E.jsx("div",{className:Ic.indexCell,style:{width:r||o.width,height:o.height,transform:i},"data-bg":a%2===1?"":void 0,children:a>=0&&s?s[a]:a},a.toString()))}const T_e=R.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:s,cellSize:o,sticky:a,rowHeaderCellsWidth:l,columnHeaders:c}=R.useContext(wP),u=R.useContext(m_e),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:h=0,overscanRowStartIndex:m=0,overscanRowStopIndex:y=0}=u||{};return E.jsxs("div",{ref:e,className:Ic.stickyGrid,style:{...r,width:r.width+l,height:r.height+o.height},role:"table","aria-rowcount":i,"aria-colcount":s,"data-sticky":a||void 0,children:[E.jsxs("div",{className:Ic.colHeaders,children:[E.jsx("div",{className:Ic.topLeftCell,style:{width:l,height:o.height},"data-bg":!0,"aria-hidden":"true"}),E.jsx(QO,{indexMin:f,indexMax:h,transform:`translateX(${o.width*f}px)`,headers:c})]}),E.jsxs("div",{className:Ic.innerContainer,children:[E.jsx("div",{className:Ic.rowHeaders,"aria-hidden":"true",children:E.jsx(QO,{indexMin:m,indexMax:y,transform:`translateY(${o.height*m}px)`,width:l})}),n]})]})});T_e.displayName="StickyGrid";var Rc=(t=>(t.Bool="Boolean",t.Integer="Integer",t.Unsigned="Integer (unsigned)",t.Float="Float",t.Complex="Complex",t.String="String",t.Compound="Compound",t.Array="Array",t.VLen="Array (variable length)",t.Enum="Enumeration",t.Time="Time",t.Bitfield="Bitfield",t.Opaque="Opaque",t.Reference="Reference",t.Unknown="Unknown",t))(Rc||{}),Xt=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Xt||{}),Gv=(t=>(t.Phase="phase",t.Amplitude="amplitude",t.PhaseAmplitude="phase-amplitude",t))(Gv||{});Xt.Linear,Xt.Log,Xt.SymLog;Xt.Linear,Xt.Log,Xt.SymLog,Xt.Sqrt;const e5=Jo(".3~e"),zE=Jo(".5~e");Jo(".5~g");Jo(".3~g");P_e(".12~g");const SP=3,C_e=/0\.([0-9]+)$/u,R_e=Jo(`.${SP}~g`),A_e=Jo(`.${SP}~e`);function UE(t){const e=R_e(t),n=C_e.exec(e);return n&&n[1].length>SP?A_e(t):e}function P_e(t,e=!1){const n=Jo(t);return r=>{const[i,s]=r;if(s===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(s)} i`;const o=Math.sign(s)>=0?" + ":" − ";return`${n(i)}${o}${n(Math.abs(s))} i`}}function rC(t){return D_e(t)?t.data:t}function BE(t,e){const{min:n,max:r,positiveMin:i,strictPositiveMin:s}=t;return{min:Math.min(e,n),max:Math.max(e,r),positiveMin:e>=0?Math.min(e,i):i,strictPositiveMin:e>0?Math.min(e,s):s}}function I_e(t,e,n){const r=rC(t),i=e&&rC(e);O_e(e,r.length,"error");const s=r.reduce((o,a,l)=>{if(!Number.isFinite(a)||n!=null&&n(a))return o;const c=BE(o,a),u=i==null?void 0:i[l];return u?BE(BE(c,a-u),a+u):c},{min:1/0,max:-1/0,positiveMin:1/0,strictPositiveMin:1/0});return Number.isFinite(s.min)?s:void 0}function N_e(t,e){if(t===void 0)return;const{min:n,max:r,positiveMin:i,strictPositiveMin:s}=t;return e===Xt.Log&&n*r<=0?Number.isFinite(s)?[s,r]:void 0:e===Xt.Sqrt&&n*r<0?[i,r]:[n,r]}function k_e(t){const[e,n]=t.shape;return{rows:e,cols:n}}function iC(t){return Array.isArray(t)?t:[t]}Rc.Unsigned,Rc.Integer,Rc.Float,Rc.String,Rc.Bool,Rc.Complex;function d7(t){return t!==void 0}function L_e(t){return t!==null}function Xv(t,e="Expected some value"){if(!d7(t))throw new TypeError(e)}function jE(t,e="Expected value to not be null"){if(!L_e(t))throw new TypeError(e)}function O_e(t,e,n){if(!t)return;const{length:r}=rC(t);if(r!==e)throw new Error(`Expected ${n} array to have length ${e} instead of ${r}`)}function D_e(t){return"data"in t}const F_e=new H(0,0,0);class td extends kr{get size(){const{x:e,y:n}=this.getSize(new H);return{width:e,height:n}}get center(){return this.getCenter(new H)}static empty(e=F_e){return new td(e.clone(),e.clone())}static fromPoints(...e){return new td().setFromPoints(e)}static fromSize({width:e,height:n}){return td.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new H)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,s=n<0?Math.max(n,-r.height):n;return this.expandByVector(new H(i,s).divideScalar(2))}expandToRatio(e){if(e===void 0||e<=0)return this;const{width:n,height:r}=this.size,i=n/r;return e>i?this.expandBySize(r*e-n,0):this.expandBySize(0,n/e-r)}hasMinSize(e,n=e){const{width:r,height:i}=this.size;return r>=e&&i>=n}keepWithin(e){const{center:n,size:r}=this,{width:i,height:s}=e.size,o=td.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(s-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(o)}toRect(){return[this.min,this.max]}}const jl=td;function t5(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function h7(t){let e=(t==null?void 0:t.domain)||[0,1],n=(t==null?void 0:t.range)||[0,1],r=(t==null?void 0:t.exponent)??1,i=(t==null?void 0:t.clamp)||!1,s=Fd,o;const a=function(A){const L=typeof A=="number"?A:A.valueOf();return Number.isNaN(L)?o:s(...n)(t5(...e)(l(L))**r)};function l(A){if(!i)return A;const[L,k]=e;return Math.max(L,Math.min(k,A))}function c(A){return A?(e=A,P):[...e]}function u(A){return A?(n=A,P):[...n]}function f(A){return A?(n=A,s=qA,P):[...n]}function h(A){return A?(i=A,P):i}function m(){return o}function y(A){return A?(s=A,P):s}function x(A){return A?(r=A,P):r}function v(A){return l(Fd(...e)(t5(...n)(A)**(1/r)))}function g(){return Eme({domain:e,range:n,exponent:r,clamp:i})}function b(A){return e=g().nice(A).domain(),P}function _(A){return g().ticks(A)}function S(A,L){return g().tickFormat(A,L)}function C(){return h7().domain(e).range(n).exponent(r).clamp(i).interpolate(s)}const P=Object.assign(a,{domain:c,range:u,rangeRound:f,clamp:h,interpolate:y,invert:v,unknown:m,exponent:x,nice:b,ticks:_,tickFormat:S,copy:C});return P}const z_e=0,MP=1e3,p7=MP,U_e=p7-MP,Ai=U_e-1,B_e=[.1,1],j_e={left:80,right:24,top:16,bottom:34},V_e=28,n5=24;Xt.Linear+"",Xt.Log+"",Number.MIN_VALUE,Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";const $_e=eP({domain:[300,900],range:[3,10],clamp:!0,round:!0}),W_e=eP({domain:[300,500],range:[.8,1.4]});function m7(t,e){if(Array.isArray(t)){const[,n]=t;return h7({...e,exponent:n})}switch(t){case Xt.Linear:return eP(e);case Xt.Log:return Sme(e);case Xt.SymLog:return Cme(e);case Xt.Sqrt:return Ame(e)}throw new Error("Unknown scale type")}function H_e(t,e){const{width:n,height:r}=t;return e?n/r>e?{width:r*e,height:r}:{width:n,height:n/e}:{width:n,height:r}}function r5(t,e=Xt.Linear,n,r){const i=I_e(t,n,r);return N_e(i,e)}function G_e(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return nB.clamp(t,n,r)}function i5(t,e){const{scaleType:n,visDomain:r,flip:i,nice:s=!1}=t;return m7(n??Xt.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:s})}function X_e(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),s=Math.floor(r),o=s-i+1,a=Math.min(o,e);if(a===0)return[];const l=Math.max(o6(i,s,a),1),c=Math.ceil(n/l),u=Math.floor(r/l)-c+1;return Array.from({length:u},(f,h)=>(c+h)*l)}function q_e(t,e,n){if(n!==Xt.Log)return UE;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],s=W_e(e);return i/r<10**s?UE:o=>{const a=Math.log10(Math.abs(o.valueOf()));return a===Math.floor(a)?UE(o):""}}function s5(t){const e=t.filter(d7);if(e.length!==0)return e.reduce((n,r)=>[Math.min(n[0],r[0]),Math.max(n[1],r[1])])}function g7(t,e,n){if(t==="auto")return;if(t==="equal")return g7(1,e,n);const[r,i]=e,[s,o]=n;return Math.abs(i-r)/Math.abs(o-s)/t}function Y_e(t={}){const{left:e,right:n,top:r,bottom:i}=j_e;return{left:e+(t.left?n5:0),right:n,top:r+(t.top?V_e:0),bottom:i+(t.bottom?n5:0)}}const K_e=` + */var aw=R,s_e=i_e;function o_e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var a_e=typeof Object.is=="function"?Object.is:o_e,l_e=s_e.useSyncExternalStore,c_e=aw.useRef,u_e=aw.useEffect,f_e=aw.useMemo,d_e=aw.useDebugValue;d7.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=c_e(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=f_e(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),i!==void 0&&o.hasValue){var y=o.value;if(i(y,m))return f=y}return f=m}if(y=f,a_e(u,m))return y;var x=r(m);return i!==void 0&&i(y,x)?y:(u=m,f=x)}var c=!1,u,f,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=l_e(t,s[0],s[1]);return u_e(function(){o.hasValue=!0,o.value=a},[a]),d_e(a),a};f7.exports=d7;var h_e=f7.exports;const p_e=Va(h_e),m7={},{useDebugValue:m_e}=Et,{useSyncExternalStoreWithSelector:g_e}=p_e;let eD=!1;const y_e=t=>t;function v_e(t,e=y_e,n){(m7?"production":void 0)!=="production"&&n&&!eD&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),eD=!0);const r=g_e(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return m_e(r),r}const tD=t=>{(m7?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?qbe(t):t,n=(r,i)=>v_e(e,r,i);return Object.assign(n,e),n},x_e=t=>t?tD(t):tD;var b_e=Object.defineProperty,__e=(t,e,n)=>e in t?b_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sp=(t,e,n)=>(__e(t,typeof e!="symbol"?e+"":e,n),n);const bP=R.createContext({}),w_e=R.createContext(void 0),S_e="_innerContainer_27a3adb",M_e="_colHeaders_a985f35",E_e="_rowHeaders_63b4056",T_e="_indexCell_080a16e",C_e="_stickyGrid_33fa7fa",R_e="_cell_2658e21",A_e="_topLeftCell_e826718 _indexCell_080a16e",Ic={innerContainer:S_e,colHeaders:M_e,rowHeaders:E_e,indexCell:T_e,stickyGrid:C_e,cell:R_e,topLeftCell:A_e};function P_e(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:s,cellFormatter:o}=R.useContext(bP);return E.jsx("div",{className:Ic.cell,style:{...r,left:r.left+i,top:r.top+s.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:o(e,n)})}R.memo(P_e);function nD(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:s}=t,{cellSize:o}=R.useContext(bP);return f6(e,n+1).map(a=>E.jsx("div",{className:Ic.indexCell,style:{width:r||o.width,height:o.height,transform:i},"data-bg":a%2===1?"":void 0,children:a>=0&&s?s[a]:a},a.toString()))}const I_e=R.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:s,cellSize:o,sticky:a,rowHeaderCellsWidth:l,columnHeaders:c}=R.useContext(bP),u=R.useContext(w_e),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:h=0,overscanRowStartIndex:m=0,overscanRowStopIndex:y=0}=u||{};return E.jsxs("div",{ref:e,className:Ic.stickyGrid,style:{...r,width:r.width+l,height:r.height+o.height},role:"table","aria-rowcount":i,"aria-colcount":s,"data-sticky":a||void 0,children:[E.jsxs("div",{className:Ic.colHeaders,children:[E.jsx("div",{className:Ic.topLeftCell,style:{width:l,height:o.height},"data-bg":!0,"aria-hidden":"true"}),E.jsx(nD,{indexMin:f,indexMax:h,transform:`translateX(${o.width*f}px)`,headers:c})]}),E.jsxs("div",{className:Ic.innerContainer,children:[E.jsx("div",{className:Ic.rowHeaders,"aria-hidden":"true",children:E.jsx(nD,{indexMin:m,indexMax:y,transform:`translateY(${o.height*m}px)`,width:l})}),n]})]})});I_e.displayName="StickyGrid";var Rc=(t=>(t.Bool="Boolean",t.Integer="Integer",t.Unsigned="Integer (unsigned)",t.Float="Float",t.Complex="Complex",t.String="String",t.Compound="Compound",t.Array="Array",t.VLen="Array (variable length)",t.Enum="Enumeration",t.Time="Time",t.Bitfield="Bitfield",t.Opaque="Opaque",t.Reference="Reference",t.Unknown="Unknown",t))(Rc||{}),Xt=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Xt||{}),Gv=(t=>(t.Phase="phase",t.Amplitude="amplitude",t.PhaseAmplitude="phase-amplitude",t))(Gv||{});Xt.Linear,Xt.Log,Xt.SymLog;Xt.Linear,Xt.Log,Xt.SymLog,Xt.Sqrt;const rD=Jo(".3~e"),zE=Jo(".5~e");Jo(".5~g");Jo(".3~g");O_e(".12~g");const _P=3,N_e=/0\.([0-9]+)$/u,k_e=Jo(`.${_P}~g`),L_e=Jo(`.${_P}~e`);function UE(t){const e=k_e(t),n=N_e.exec(e);return n&&n[1].length>_P?L_e(t):e}function O_e(t,e=!1){const n=Jo(t);return r=>{const[i,s]=r;if(s===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(s)} i`;const o=Math.sign(s)>=0?" + ":" − ";return`${n(i)}${o}${n(Math.abs(s))} i`}}function nC(t){return j_e(t)?t.data:t}function BE(t,e){const{min:n,max:r,positiveMin:i,strictPositiveMin:s}=t;return{min:Math.min(e,n),max:Math.max(e,r),positiveMin:e>=0?Math.min(e,i):i,strictPositiveMin:e>0?Math.min(e,s):s}}function D_e(t,e,n){const r=nC(t),i=e&&nC(e);B_e(e,r.length,"error");const s=r.reduce((o,a,l)=>{if(!Number.isFinite(a)||n!=null&&n(a))return o;const c=BE(o,a),u=i==null?void 0:i[l];return u?BE(BE(c,a-u),a+u):c},{min:1/0,max:-1/0,positiveMin:1/0,strictPositiveMin:1/0});return Number.isFinite(s.min)?s:void 0}function F_e(t,e){if(t===void 0)return;const{min:n,max:r,positiveMin:i,strictPositiveMin:s}=t;return e===Xt.Log&&n*r<=0?Number.isFinite(s)?[s,r]:void 0:e===Xt.Sqrt&&n*r<0?[i,r]:[n,r]}function z_e(t){const[e,n]=t.shape;return{rows:e,cols:n}}function rC(t){return Array.isArray(t)?t:[t]}Rc.Unsigned,Rc.Integer,Rc.Float,Rc.String,Rc.Bool,Rc.Complex;function g7(t){return t!==void 0}function U_e(t){return t!==null}function Xv(t,e="Expected some value"){if(!g7(t))throw new TypeError(e)}function jE(t,e="Expected value to not be null"){if(!U_e(t))throw new TypeError(e)}function B_e(t,e,n){if(!t)return;const{length:r}=nC(t);if(r!==e)throw new Error(`Expected ${n} array to have length ${e} instead of ${r}`)}function j_e(t){return"data"in t}const V_e=new H(0,0,0);class nd extends kr{get size(){const{x:e,y:n}=this.getSize(new H);return{width:e,height:n}}get center(){return this.getCenter(new H)}static empty(e=V_e){return new nd(e.clone(),e.clone())}static fromPoints(...e){return new nd().setFromPoints(e)}static fromSize({width:e,height:n}){return nd.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new H)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,s=n<0?Math.max(n,-r.height):n;return this.expandByVector(new H(i,s).divideScalar(2))}expandToRatio(e){if(e===void 0||e<=0)return this;const{width:n,height:r}=this.size,i=n/r;return e>i?this.expandBySize(r*e-n,0):this.expandBySize(0,n/e-r)}hasMinSize(e,n=e){const{width:r,height:i}=this.size;return r>=e&&i>=n}keepWithin(e){const{center:n,size:r}=this,{width:i,height:s}=e.size,o=nd.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(s-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(o)}toRect(){return[this.min,this.max]}}const jl=nd;function iD(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function y7(t){let e=(t==null?void 0:t.domain)||[0,1],n=(t==null?void 0:t.range)||[0,1],r=(t==null?void 0:t.exponent)??1,i=(t==null?void 0:t.clamp)||!1,s=zd,o;const a=function(A){const L=typeof A=="number"?A:A.valueOf();return Number.isNaN(L)?o:s(...n)(iD(...e)(l(L))**r)};function l(A){if(!i)return A;const[L,k]=e;return Math.max(L,Math.min(k,A))}function c(A){return A?(e=A,P):[...e]}function u(A){return A?(n=A,P):[...n]}function f(A){return A?(n=A,s=GA,P):[...n]}function h(A){return A?(i=A,P):i}function m(){return o}function y(A){return A?(s=A,P):s}function x(A){return A?(r=A,P):r}function v(A){return l(zd(...e)(iD(...n)(A)**(1/r)))}function g(){return kme({domain:e,range:n,exponent:r,clamp:i})}function b(A){return e=g().nice(A).domain(),P}function _(A){return g().ticks(A)}function S(A,L){return g().tickFormat(A,L)}function C(){return y7().domain(e).range(n).exponent(r).clamp(i).interpolate(s)}const P=Object.assign(a,{domain:c,range:u,rangeRound:f,clamp:h,interpolate:y,invert:v,unknown:m,exponent:x,nice:b,ticks:_,tickFormat:S,copy:C});return P}const $_e=0,wP=1e3,v7=wP,W_e=v7-wP,Ai=W_e-1,H_e=[.1,1],G_e={left:80,right:24,top:16,bottom:34},X_e=28,sD=24;Xt.Linear+"",Xt.Log+"",Number.MIN_VALUE,Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";const q_e=JA({domain:[300,900],range:[3,10],clamp:!0,round:!0}),Y_e=JA({domain:[300,500],range:[.8,1.4]});function x7(t,e){if(Array.isArray(t)){const[,n]=t;return y7({...e,exponent:n})}switch(t){case Xt.Linear:return JA(e);case Xt.Log:return Ime(e);case Xt.SymLog:return Ome(e);case Xt.Sqrt:return Fme(e)}throw new Error("Unknown scale type")}function K_e(t,e){const{width:n,height:r}=t;return e?n/r>e?{width:r*e,height:r}:{width:n,height:n/e}:{width:n,height:r}}function oD(t,e=Xt.Linear,n,r){const i=D_e(t,n,r);return F_e(i,e)}function Z_e(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return sB.clamp(t,n,r)}function aD(t,e){const{scaleType:n,visDomain:r,flip:i,nice:s=!1}=t;return x7(n??Xt.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:s})}function J_e(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),s=Math.floor(r),o=s-i+1,a=Math.min(o,e);if(a===0)return[];const l=Math.max(u6(i,s,a),1),c=Math.ceil(n/l),u=Math.floor(r/l)-c+1;return Array.from({length:u},(f,h)=>(c+h)*l)}function Q_e(t,e,n){if(n!==Xt.Log)return UE;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],s=Y_e(e);return i/r<10**s?UE:o=>{const a=Math.log10(Math.abs(o.valueOf()));return a===Math.floor(a)?UE(o):""}}function lD(t){const e=t.filter(g7);if(e.length!==0)return e.reduce((n,r)=>[Math.min(n[0],r[0]),Math.max(n[1],r[1])])}function b7(t,e,n){if(t==="auto")return;if(t==="equal")return b7(1,e,n);const[r,i]=e,[s,o]=n;return Math.abs(i-r)/Math.abs(o-s)/t}function ewe(t={}){const{left:e,right:n,top:r,bottom:i}=G_e;return{left:e+(t.left?sD:0),right:n,top:r+(t.top?X_e:0),bottom:i+(t.bottom?sD:0)}}const twe=` varying vec2 coords; void main() { coords = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } -`;function y7(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}function lw(t,e=3,n=Float32Array){return new yn(new n(t*e),e)}function v7(t){return Object.keys(t).some(e=>/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/u.test(e))}const x7=R.createContext({});function zn(){return R.useContext(x7)}function Z_e(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:s,children:o}=t,{width:a,height:l}=Er(z=>z.size),c={width:a,height:l},u=a/l,f=H_e(c,e),h=R.useMemo(()=>jl.empty().expandByPoint(new H(a,l)),[a,l]),m=i5(n,f.width),y=i5(r,f.height),x=R.useCallback(z=>new H(m(z.x),y(z.y)),[m,y]),v=R.useCallback(z=>new H(m.invert(z.x),y.invert(z.y)),[m,y]),g=R.useMemo(()=>new Tt().makeScale(a/2,-l/2,1).setPosition(a/2,l/2,0),[a,l]),b=R.useMemo(()=>g.clone().invert(),[g]),_=R.useCallback((z,D)=>D.clone().project(z).applyMatrix4(g),[g]),S=R.useCallback((z,D)=>D.clone().applyMatrix4(b).unproject(z),[b]),C=R.useCallback((z,D)=>_(z,x(D)),[x,_]),P=R.useCallback((z,D)=>v(S(z,D)),[S,v]),A=R.useCallback((z,D=z.position)=>{const{scale:B}=z;return jl.empty(D).expandBySize(a*B.x,l*B.y)},[a,l]),L=R.useCallback(z=>{const[D,B]=A(z).toRect().map(v);return{xVisibleDomain:[D.x,B.x],yVisibleDomain:[D.y,B.y]}},[A,v]),k=Er(z=>{var D;return(D=z.gl.domElement.parentElement)==null?void 0:D.parentElement});Xv(k),jE(k);const T=k.parentElement;jE(T);const N=T.parentElement;return jE(N),E.jsx(x7.Provider,{value:{canvasSize:c,canvasRatio:u,canvasBox:h,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:m,ordinateScale:y,dataToWorld:x,dataToHtml:C,worldToHtml:_,worldToData:v,htmlToWorld:S,htmlToData:P,getFovBox:A,getVisibleDomains:L,visCanvas:N,canvasArea:T,r3fRoot:k,svgOverlay:i,floatingToolbar:s},children:o})}var cw=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(cw||{});class J_e{constructor(e,n){Sp(this,"buttons"),Sp(this,"modifierKeys"),Sp(this,"isWheel"),Sp(this,"isEnabled"),this.id=e;const{button:r=cw.Left,modifierKey:i=[],disabled:s=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=iC(r),this.isWheel=!1),this.modifierKeys=iC(i),this.isEnabled=!s}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const b7=R.createContext({});function Q_e(){return R.useContext(b7)}function ewe(t){const{children:e}=t,[n]=R.useState(new Map),r=R.useCallback((o,a)=>{n.has(o)?console.warn(`An interaction with ID "${o}" is already registered.`):n.set(o,new J_e(o,a))},[n]),i=R.useCallback(o=>{n.delete(o)},[n]),s=R.useCallback((o,a)=>{const l=[...n.values()];if(!n.has(o))throw new Error(`Interaction ${o} is not registered`);const c=l.filter(u=>u.matches(a));return c.length===0?!1:c.length===1?c[0].id===o:c.reduce((u,f)=>f.modifierKeys.length>u.modifierKeys.length?f:u).id===o},[n]);return E.jsx(b7.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:s},children:e})}const o5=.95,a5=new H(1,1,1),twe=["Alt","Control","Shift"];function Fg(){const{visSize:t,getFovBox:e}=zn(),n=Er(i=>i.camera),r=Er(i=>i.invalidate);return R.useCallback(i=>{const{position:s}=n,o=jl.fromSize(t),a=e(n,i).keepWithin(o);s.copy(a.center.setZ(s.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function _7(){const{canvasSize:t}=zn(),e=Er(r=>r.camera),n=Fg();return R.useCallback(({world:r})=>{const{width:i,height:s}=t,o=jl.fromPoints(...r),{width:a,height:l}=o.size;e.scale.set(Math.max(a,1)/i,Math.max(l,1)/s,1),n(o.center)},[e,t,n])}function EP(){const{canvasArea:t}=zn();Xc(t,"wheel",e=>e.preventDefault(),{passive:!1})}function TP(t){const e=Er(r=>r.camera),n=Fg();return function(r){const{sourceEvent:i,worldPt:s}=r,{x:o,y:a}=t(i);if(!o&&!a)return;const l=new H(o?o5:1,a?o5:1,1);i.deltaY<0?e.scale.multiply(l).min(a5):e.scale.divide(l).min(a5);const c=e.position.clone().sub(s);i.deltaY<0?c.multiply(l):c.divide(l),n(s.clone().add(c))}}function Pa(t,e,n={}){const r=vr(e),i=Er(c=>c.camera),{htmlToWorld:s,worldToData:o,canvasArea:a}=zn();function l(c){const{offsetX:u,offsetY:f}=c,h=new H(u,f),m=s(i,h),y=o(m);r.current({htmlPt:h,worldPt:m,dataPt:y,sourceEvent:c})}Xc(a,t,l,n)}function zg(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=Q_e();return R.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),R.useCallback(s=>n(t,s),[t,n])}function w7(t=[]){const{canvasArea:e}=zn(),n=iC(t),[r]=R.useState(new Map),[i,s]=r_(!1);function o(){const a=n.every(l=>r.get(l));i!==a&&s(a)}return Xc(window,"keyup",a=>{const{key:l}=a;r.set(l,!1),o()}),Xc(window,"keydown",a=>{const{key:l}=a;r.set(l,!0),o()}),Xc(e,"pointerdown",a=>{twe.forEach(l=>{r.set(l,a.getModifierState(l))}),o()}),i}function nwe(t){const{id:e="Pan",button:n=cw.Left,modifierKey:r,disabled:i}=t,s=zg(e,{button:n,modifierKey:r,disabled:i}),o=Er(m=>m.camera),a=Fg(),l=R.useRef(),c=w7(r);function u(m){const{worldPt:y,sourceEvent:x}=m,{target:v,pointerId:g}=x;s(x)&&(v.setPointerCapture(g),l.current=y.clone())}function f(m){if(!l.current||!c)return;const{worldPt:y}=m,x=l.current.clone().sub(y);a(o.position.clone().add(x))}function h(m){const{sourceEvent:y}=m,{target:x,pointerId:v}=y;x.releasePointerCapture(v),l.current=void 0}return Pa("pointerdown",u),Pa("pointermove",f),Pa("pointerup",h),null}function S7(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=Q=>Q,validate:s=()=>!0,onSelectionStart:o,onSelectionChange:a,onSelectionEnd:l,onValidSelection:c,children:u}=t,f=vr(i),h=vr(s),m=vr(o),y=vr(a),x=vr(l),v=vr(c),g=Er(Q=>Q.camera),b=zn(),{canvasBox:_,htmlToWorld:S,worldToData:C}=b,[P,A]=zre(),L=R.useRef(),k=R.useRef(!1),T=w7(n),N=zg(e,{button:cw.Left,modifierKey:n,disabled:r});function z(Q,he=Q){const fe=[Q,_.clampPoint(he)],J=fe.map(be=>S(g,be)),de=J.map(C);return{html:fe,world:J,data:de}}function D(Q){const{sourceEvent:he}=Q;if(!N(he))return;const{target:fe,pointerId:J}=he;fe.setPointerCapture(J),L.current=Q,A(z(Q.htmlPt))}function B(Q){const{current:he}=L;he&&A(z(he.htmlPt,Q.htmlPt))}function G(Q){if(!L.current)return;const{sourceEvent:he}=Q,{target:fe,pointerId:J}=he;fe.releasePointerCapture(J),L.current=void 0,k.current=N(he),A(void 0)}Pa("pointerdown",D),Pa("pointermove",B),Pa("pointerup",G);function X(){L.current=void 0,A(void 0)}i6("Escape",X,[],{event:"keydown"}),Xc(window,"contextmenu",Q=>{L.current&&(Q.preventDefault(),X())});const Z=R.useMemo(()=>P&&f.current(P,g,b),[P,f,g,b]),F=R.useMemo(()=>!!Z&&h.current(Z),[Z,h]),q=Z4(Z),K=Z4(F);return R.useEffect(()=>{var Q,he,fe,J;if(Z){Xv(P),q||(Q=m.current)==null||Q.call(m),(he=y.current)==null||he.call(y,T?Z:void 0,P,F);return}q&&(Xv(K),(fe=x.current)==null||fe.call(x,k.current?q:void 0,K),K&&k.current&&((J=v.current)==null||J.call(v,q)),k.current=!1)},[Z,q,P,F,K,T,m,y,x,v]),!Z||!T?null:(Xv(P),u(Z,P,F))}const rwe="_selection_0f4643e",sC={selection:rwe};function uw(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=zn(),s=e?i:r,[o]=R.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[a]=R.useState(()=>iR(o));return R.useLayoutEffect(()=>{a.render(Hl.createPortal(n,s))},[n,s,a]),R.useLayoutEffect(()=>(r.append(o),()=>{a.unmount(),o.remove()}),[r,a,o]),null}function M7(t){const{children:e}=t,{svgOverlay:n}=zn();return n?E.jsx(uw,{children:Hl.createPortal(e,n)}):null}function oC(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:s=1}=r,o=i&&n?s*(n==="outside"?1:-1):0,{min:a,max:l}=jl.fromPoints(...e).expandBySize(o,o);return E.jsx("path",{d:`M ${a.x},${a.y} H ${l.x} V ${l.y} H ${a.x} z`,...r})}const iwe=20;function swe(t){const{minZoom:e=iwe,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:s,visRatio:o,visSize:a,htmlToWorld:l,worldToData:c}=zn(),u=_7(),f=Er(y=>y.camera),h=o!==void 0;function m(y){if(!h)return y;const{scale:x}=f,v=jl.empty(new H(r.width/2,r.height/2)).expandBySize(a.width/x.x,a.height/x.y),g=jl.fromPoints(...y.html).expandToRatio(i).keepWithin(s).keepWithin(v).toRect(),b=g.map(S=>l(f,S)),_=b.map(c);return{html:g,world:b,data:_}}return E.jsx(S7,{id:"SelectToZoom",transform:m,validate:({html:y})=>y[0].manhattanDistanceTo(y[1])>=e,onValidSelection:u,...n,children:({html:y},{html:x},v)=>E.jsxs(M7,{children:[E.jsx(oC,{className:sC.selection,coords:x,fill:"white",fillOpacity:!h&&v?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:h||!v?4:void 0}),h&&E.jsx(oC,{className:sC.selection,coords:y,fill:"white",fillOpacity:v?.25:0,stroke:"black",strokePosition:"inside"})]})})}function owe(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=zg("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),s=o=>({x:i(o),y:!1});return EP(),Pa("wheel",TP(s)),null}function awe(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=zg("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),s=o=>({x:!1,y:i(o)});return EP(),Pa("wheel",TP(s)),null}function lwe(t){const{modifierKey:e,disabled:n}=t,r=zg("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=s=>{const o=r(s);return{x:o,y:o}};return EP(),Pa("wheel",TP(i)),null}function cwe(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:s,...o}=t;function a(l,c,u){const{canvasSize:f,htmlToWorld:h,worldToData:m}=u,{width:y,height:x}=f,[v,g]=l.html,b=e==="x"?[new H(v.x,0),new H(g.x,x)]:[new H(0,v.y),new H(y,g.y)],_=b.map(C=>h(c,C)),S=_.map(m);return{html:b,world:_,data:S}}return E.jsx(S7,{transform:a,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...o,children:s})}const uwe=20;function l5(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=uwe}=t,{visRatio:s}=zn(),o=_7();return E.jsx(cwe,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:s!==void 0||r,validate:({html:a})=>jl.fromPoints(...a).hasMinSize(i),onValidSelection:o,children:({html:a},l,c)=>E.jsx(M7,{children:E.jsx(oC,{className:sC.selection,coords:a,fill:"white",fillOpacity:c?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:c?void 0:4})})})}function fwe(t){const{...e}=t;return E.jsxs(E.Fragment,{children:[e.pan!==!1&&E.jsx(nwe,{...e.pan}),e.zoom!==!1&&E.jsx(lwe,{...e.zoom}),e.xAxisZoom!==!1&&E.jsx(owe,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&E.jsx(awe,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&E.jsx(swe,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&E.jsx(l5,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&E.jsx(l5,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function dwe(t){return(...e)=>R.useMemo(()=>t(...e),e)}function E7(t,e,n=(r,i)=>Object.is(r,i)){const r=Er(a=>a.camera),i=r6(),s=R.useRef(),o=vr(t);return R.useMemo(()=>{s.current=o.current(r)},e),jA(()=>{const a=o.current(r);n(s.current,a)||(s.current=a,i())}),s.current}function U1(t,e,n,r=!1){const i=R.useMemo(()=>new t(e),[t,e]),s=Er(o=>o.invalidate);return R.useLayoutEffect(()=>{if(n){i.prepare(n);for(let o=0;o{o.needsUpdate=!0}),i.index&&(i.index.needsUpdate=!0),s()}},[i,...Object.values(n||{}),s]),i}function hwe(t){const{children:e}=t,{floatingToolbar:n}=zn();return n?E.jsx(uw,{children:Hl.createPortal(e,n)}):null}const pwe="_btnLike_0154b53",mwe="_icon_bcb8f77",gwe="_label_5a75092",ywe="_popup_954b735",vwe="_btn_f1cebe5 btnClean",CP={btnLike:pwe,icon:mwe,label:gwe,popup:ywe,btn:vwe},{btn:xwe,btnLike:bwe}=CP,_we=`_btn_579cee1 ${xwe}`,wwe=`_btnLike_5797793 ${bwe}`,c5={btn:_we,btnLike:wwe};function Swe(){const t=Er(i=>i.camera),e=Er(i=>i.invalidate),n=E7(({scale:i})=>i.x<1||i.y<1,[]);function r(){t.scale.x=1,t.scale.y=1,t.position.x=0,t.position.y=0,t.updateMatrixWorld(),e()}return E.jsx(hwe,{children:E.jsx("button",{className:c5.btn,type:"button",hidden:!n,onClick:()=>r(),children:E.jsx("span",{className:c5.btnLike,children:"Reset zoom"})})})}function T7(t){const{children:e,style:n,className:r}=t,{canvasSize:i}=zn();return E.jsx(uw,{overflowCanvas:!0,children:E.jsx("div",{className:r,style:{position:"absolute",top:0,left:0,...i,...n},children:e})})}const Mwe="_overlay_df4a4fe",Ewe="_tooltip_c303daa",Twe="_guides_073d0c4",VE={overlay:Mwe,tooltip:Ewe,guides:Twe};function Cwe(t){const{tooltipOpen:e,tooltipLeft:n,tooltipTop:r,guides:i,children:s}=t,{canvasSize:o}=zn(),{width:a,height:l}=o;return E.jsx(T7,{className:VE.overlay,children:e&&s&&E.jsxs(E.Fragment,{children:[E.jsx(Vme,{className:VE.tooltip,top:r,left:n,unstyled:!0,applyPositionStyle:!0,children:s},Math.random()),i&&E.jsxs("svg",{className:VE.guides,children:[i!=="horizontal"&&E.jsx(A1,{from:{x:n,y:0},to:{x:n,y:l}}),i!=="vertical"&&E.jsx(A1,{from:{x:0,y:r},to:{x:a,y:r}})]})]})})}function C7(t){const{children:e,size:n,...r}=t,{visSize:i}=zn(),{width:s,height:o}=n??i;return E.jsxs("mesh",{...r,children:[E.jsx("planeGeometry",{args:[s,o]}),e]})}function Rwe(t){const{guides:e,renderTooltip:n,size:r}=t,{canvasSize:i,worldToData:s}=zn(),{width:o,height:a}=i,{tooltipOpen:l,tooltipTop:c,tooltipLeft:u,tooltipData:f,showTooltip:h,hideTooltip:m}=kme(),y=R.useCallback(_=>{const{unprojectedPoint:S,nativeEvent:C}=_;if(C.buttons!==0)return;const P=s(S);h({tooltipLeft:C.offsetX,tooltipTop:C.offsetY,tooltipData:[P.x,P.y]})},[s,h]),x=R.useCallback(()=>{l&&m()},[m,l]),v=R.useCallback(()=>m(),[m]),g=R.useCallback(_=>{const{nativeEvent:S}=_,{offsetX:C,offsetY:P}=S;C>=0&&C<=o&&P>=0&&P<=a&&y(_)},[a,y,o]),b=f&&n(...f);return E.jsxs(E.Fragment,{children:[E.jsx(C7,{onPointerMove:y,onPointerOut:x,onPointerDown:v,onPointerUp:g,size:r,children:E.jsx("meshBasicMaterial",{opacity:0,transparent:!0})}),E.jsx(Cwe,{tooltipOpen:l,tooltipLeft:u,tooltipTop:c,guides:e,children:b})]})}const Awe="_axis_1002b06",Pwe="_grid_a397f58",Iwe="_tick_44c4d9c",Nwe="_label_4a1d111",B1={axis:Awe,grid:Pwe,tick:Iwe,label:Nwe};function kwe(t){const{formattedValue:e,...n}=t;return E.jsx("text",{...n,dy:"0.3125em",children:e})}const Lwe={labelClassName:B1.label,labelProps:{fontSize:"inherit"},tickClassName:B1.tick,tickComponent:kwe},Owe={abscissa:[bve,k9],ordinate:[gve,N9]};function u5(t){const{type:e,config:n,domain:r,canvasSize:i,offset:s,flipAxis:o,showAxis:a}=t,{width:l,height:c}=i,u=e==="abscissa",f=u?l:c,{scaleType:h=Xt.Linear,isIndexAxis:m,showGrid:y,label:x,nice:v=!1}=n,g=m7(h,{domain:r,range:o?[f,0]:[0,f],nice:v}),[b,_]=Owe[e],S=$_e(f),C=m?{tickValues:X_e(r,S)}:{numTicks:S};return E.jsxs(E.Fragment,{children:[a&&E.jsx("svg",{className:B1.axis,"data-type":e,style:u?{width:l,height:s}:{width:s,height:c},children:E.jsx(b,{scale:g,tickFormat:q_e(r,f,h),label:x,labelOffset:s-(u?32:36),hideAxisLine:y,...C,...Lwe})}),y&&E.jsx("svg",{className:B1.grid,...i,children:E.jsx(_,{scale:g,...i,...C})})]})}function Dwe(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:s,ordinateConfig:o,getVisibleDomains:a}=zn(),l=E7(a,[a]);return E.jsx(uw,{children:Hl.createPortal(E.jsxs(E.Fragment,{children:[E.jsx(u5,{type:"abscissa",config:s,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),E.jsx(u5,{type:"ordinate",config:o,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function Fwe(t){const{className:e,orthographic:n,children:r}=t;return E.jsxs($he,{className:e,orthographic:n,flat:!0,frameloop:"demand",dpr:[1,3],resize:{debounce:{scroll:20,resize:200},scroll:!1},gl:{preserveDrawingBuffer:!0},camera:{near:z_e,far:MP,position:[0,0,p7]},children:[E.jsx("ambientLight",{}),r]})}function zwe(){const{visRatio:t}=zn(),e=Er(r=>r.camera),n=Fg();return R.useEffect(()=>{if(!t||e.scale.x===e.scale.y)return;const r=Math.max(e.scale.x,e.scale.y);e.scale.x=r,e.scale.y=r,n(e.position)},[e,n,t]),null}function Uwe(t){const{value:e}=t,n=Er(i=>i.raycaster),r=Er(i=>i.camera);return R.useEffect(()=>{const i=n.params.Points,s=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=s)}},[n,e]),jA(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function Bwe(){const{dataToWorld:t,worldToData:e}=zn(),n=R.useRef(),r=Er(s=>s.camera),i=Fg();return jA(()=>{n.current=e(r.position)}),R.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const jwe="_visCanvas_2387375",Vwe="_title_313417a",$we="_canvasArea_6300bb7",Wwe="_r3fRoot_f557f0c",Hwe="_svgOverlay_3f84e2f",Gwe="_floatingToolbar_de4854e",Tf={visCanvas:jwe,title:Vwe,canvasArea:$we,r3fRoot:Wwe,svgOverlay:Hwe,floatingToolbar:Gwe},Xwe={left:0,right:0,top:0,bottom:0};function qwe(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:s,showAxes:o=!0,children:a}=t,l=g7(n,r.visDomain,i.visDomain),c=o?Y_e({left:!!i.label,bottom:!!r.label,top:!!e}):Xwe,[u,f]=R.useState(null),[h,m]=R.useState(null);return E.jsxs("div",{className:Tf.visCanvas,style:{gridTemplateColumns:`${c.left}px minmax(0, 1fr) ${c.right}px`,gridTemplateRows:`${c.top}px minmax(0, 1fr) ${c.bottom}px`},children:[o&&e&&E.jsx("p",{className:Tf.title,children:e}),E.jsxs("div",{className:Tf.canvasArea,children:[E.jsx(Fwe,{className:Tf.r3fRoot,orthographic:!0,children:E.jsxs(Z_e,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:u,floatingToolbar:h,children:[E.jsx(Dwe,{axisOffsets:c,showAxes:o}),E.jsx(ewe,{children:a}),E.jsx(Bwe,{}),E.jsx(zwe,{}),s!==void 0&&E.jsx(Uwe,{value:s})]})}),E.jsx("svg",{ref:f,className:Tf.svgOverlay,overflow:"hidden"})]}),E.jsx("div",{ref:m,className:Tf.floatingToolbar})]})}class Ywe extends Bt{constructor(){super(...arguments),Sp(this,"params")}prepare(e){this.params=e}}const fw=Ywe;class Kwe extends fw{constructor(e){super(),this.setAttribute("position",lw(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:s,ordinateScale:o,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const f=s(n[e]),h=o(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const m=i[e],y=o(l-m),x=o(l+m),v=Number.isFinite(y)?y:h,g=Number.isFinite(x)?x:h;this.attributes.position.setXYZ(u,f,v,0),this.attributes.position.setXYZ(u+1,f,g,0)}}const Zwe=Kwe;class Jwe extends fw{constructor(e){super(),this.setAttribute("position",lw(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:s,ordinateScale:o,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const f=s(n[e]),h=o(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const m=i[e],y=o(l-m),x=o(l+m);Number.isFinite(y)?this.attributes.position.setXYZ(u,f,y,0):this.attributes.position.setXYZ(u,0,0,Ai),Number.isFinite(x)?this.attributes.position.setXYZ(u+1,f,x,0):this.attributes.position.setXYZ(u+1,0,0,Ai)}}const Qwe=Jwe;var Kp=(t=>(t.LineOnly="OnlyLine",t.GlyphsOnly="OnlyGlyphs",t.LineAndGlyphs="LineAndGlyphs",t))(Kp||{}),Sl=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(Sl||{});const eSe={[Sl.Cross]:` +`;function _7(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}function lw(t,e=3,n=Float32Array){return new yn(new n(t*e),e)}function w7(t){return Object.keys(t).some(e=>/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/u.test(e))}const S7=R.createContext({});function zn(){return R.useContext(S7)}function nwe(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:s,children:o}=t,{width:a,height:l}=Er(z=>z.size),c={width:a,height:l},u=a/l,f=K_e(c,e),h=R.useMemo(()=>jl.empty().expandByPoint(new H(a,l)),[a,l]),m=aD(n,f.width),y=aD(r,f.height),x=R.useCallback(z=>new H(m(z.x),y(z.y)),[m,y]),v=R.useCallback(z=>new H(m.invert(z.x),y.invert(z.y)),[m,y]),g=R.useMemo(()=>new Tt().makeScale(a/2,-l/2,1).setPosition(a/2,l/2,0),[a,l]),b=R.useMemo(()=>g.clone().invert(),[g]),_=R.useCallback((z,D)=>D.clone().project(z).applyMatrix4(g),[g]),S=R.useCallback((z,D)=>D.clone().applyMatrix4(b).unproject(z),[b]),C=R.useCallback((z,D)=>_(z,x(D)),[x,_]),P=R.useCallback((z,D)=>v(S(z,D)),[S,v]),A=R.useCallback((z,D=z.position)=>{const{scale:B}=z;return jl.empty(D).expandBySize(a*B.x,l*B.y)},[a,l]),L=R.useCallback(z=>{const[D,B]=A(z).toRect().map(v);return{xVisibleDomain:[D.x,B.x],yVisibleDomain:[D.y,B.y]}},[A,v]),k=Er(z=>{var D;return(D=z.gl.domElement.parentElement)==null?void 0:D.parentElement});Xv(k),jE(k);const T=k.parentElement;jE(T);const N=T.parentElement;return jE(N),E.jsx(S7.Provider,{value:{canvasSize:c,canvasRatio:u,canvasBox:h,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:m,ordinateScale:y,dataToWorld:x,dataToHtml:C,worldToHtml:_,worldToData:v,htmlToWorld:S,htmlToData:P,getFovBox:A,getVisibleDomains:L,visCanvas:N,canvasArea:T,r3fRoot:k,svgOverlay:i,floatingToolbar:s},children:o})}var cw=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(cw||{});class rwe{constructor(e,n){Sp(this,"buttons"),Sp(this,"modifierKeys"),Sp(this,"isWheel"),Sp(this,"isEnabled"),this.id=e;const{button:r=cw.Left,modifierKey:i=[],disabled:s=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=rC(r),this.isWheel=!1),this.modifierKeys=rC(i),this.isEnabled=!s}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const M7=R.createContext({});function iwe(){return R.useContext(M7)}function swe(t){const{children:e}=t,[n]=R.useState(new Map),r=R.useCallback((o,a)=>{n.has(o)?console.warn(`An interaction with ID "${o}" is already registered.`):n.set(o,new rwe(o,a))},[n]),i=R.useCallback(o=>{n.delete(o)},[n]),s=R.useCallback((o,a)=>{const l=[...n.values()];if(!n.has(o))throw new Error(`Interaction ${o} is not registered`);const c=l.filter(u=>u.matches(a));return c.length===0?!1:c.length===1?c[0].id===o:c.reduce((u,f)=>f.modifierKeys.length>u.modifierKeys.length?f:u).id===o},[n]);return E.jsx(M7.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:s},children:e})}const cD=.95,uD=new H(1,1,1),owe=["Alt","Control","Shift"];function Fg(){const{visSize:t,getFovBox:e}=zn(),n=Er(i=>i.camera),r=Er(i=>i.invalidate);return R.useCallback(i=>{const{position:s}=n,o=jl.fromSize(t),a=e(n,i).keepWithin(o);s.copy(a.center.setZ(s.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function E7(){const{canvasSize:t}=zn(),e=Er(r=>r.camera),n=Fg();return R.useCallback(({world:r})=>{const{width:i,height:s}=t,o=jl.fromPoints(...r),{width:a,height:l}=o.size;e.scale.set(Math.max(a,1)/i,Math.max(l,1)/s,1),n(o.center)},[e,t,n])}function SP(){const{canvasArea:t}=zn();Xc(t,"wheel",e=>e.preventDefault(),{passive:!1})}function MP(t){const e=Er(r=>r.camera),n=Fg();return function(r){const{sourceEvent:i,worldPt:s}=r,{x:o,y:a}=t(i);if(!o&&!a)return;const l=new H(o?cD:1,a?cD:1,1);i.deltaY<0?e.scale.multiply(l).min(uD):e.scale.divide(l).min(uD);const c=e.position.clone().sub(s);i.deltaY<0?c.multiply(l):c.divide(l),n(s.clone().add(c))}}function Pa(t,e,n={}){const r=vr(e),i=Er(c=>c.camera),{htmlToWorld:s,worldToData:o,canvasArea:a}=zn();function l(c){const{offsetX:u,offsetY:f}=c,h=new H(u,f),m=s(i,h),y=o(m);r.current({htmlPt:h,worldPt:m,dataPt:y,sourceEvent:c})}Xc(a,t,l,n)}function zg(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=iwe();return R.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),R.useCallback(s=>n(t,s),[t,n])}function T7(t=[]){const{canvasArea:e}=zn(),n=rC(t),[r]=R.useState(new Map),[i,s]=r_(!1);function o(){const a=n.every(l=>r.get(l));i!==a&&s(a)}return Xc(window,"keyup",a=>{const{key:l}=a;r.set(l,!1),o()}),Xc(window,"keydown",a=>{const{key:l}=a;r.set(l,!0),o()}),Xc(e,"pointerdown",a=>{owe.forEach(l=>{r.set(l,a.getModifierState(l))}),o()}),i}function awe(t){const{id:e="Pan",button:n=cw.Left,modifierKey:r,disabled:i}=t,s=zg(e,{button:n,modifierKey:r,disabled:i}),o=Er(m=>m.camera),a=Fg(),l=R.useRef(),c=T7(r);function u(m){const{worldPt:y,sourceEvent:x}=m,{target:v,pointerId:g}=x;s(x)&&(v.setPointerCapture(g),l.current=y.clone())}function f(m){if(!l.current||!c)return;const{worldPt:y}=m,x=l.current.clone().sub(y);a(o.position.clone().add(x))}function h(m){const{sourceEvent:y}=m,{target:x,pointerId:v}=y;x.releasePointerCapture(v),l.current=void 0}return Pa("pointerdown",u),Pa("pointermove",f),Pa("pointerup",h),null}function C7(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=Q=>Q,validate:s=()=>!0,onSelectionStart:o,onSelectionChange:a,onSelectionEnd:l,onValidSelection:c,children:u}=t,f=vr(i),h=vr(s),m=vr(o),y=vr(a),x=vr(l),v=vr(c),g=Er(Q=>Q.camera),b=zn(),{canvasBox:_,htmlToWorld:S,worldToData:C}=b,[P,A]=Wre(),L=R.useRef(),k=R.useRef(!1),T=T7(n),N=zg(e,{button:cw.Left,modifierKey:n,disabled:r});function z(Q,he=Q){const fe=[Q,_.clampPoint(he)],J=fe.map(be=>S(g,be)),de=J.map(C);return{html:fe,world:J,data:de}}function D(Q){const{sourceEvent:he}=Q;if(!N(he))return;const{target:fe,pointerId:J}=he;fe.setPointerCapture(J),L.current=Q,A(z(Q.htmlPt))}function B(Q){const{current:he}=L;he&&A(z(he.htmlPt,Q.htmlPt))}function G(Q){if(!L.current)return;const{sourceEvent:he}=Q,{target:fe,pointerId:J}=he;fe.releasePointerCapture(J),L.current=void 0,k.current=N(he),A(void 0)}Pa("pointerdown",D),Pa("pointermove",B),Pa("pointerup",G);function X(){L.current=void 0,A(void 0)}l6("Escape",X,[],{event:"keydown"}),Xc(window,"contextmenu",Q=>{L.current&&(Q.preventDefault(),X())});const Z=R.useMemo(()=>P&&f.current(P,g,b),[P,f,g,b]),F=R.useMemo(()=>!!Z&&h.current(Z),[Z,h]),q=Zk(Z),K=Zk(F);return R.useEffect(()=>{var Q,he,fe,J;if(Z){Xv(P),q||(Q=m.current)==null||Q.call(m),(he=y.current)==null||he.call(y,T?Z:void 0,P,F);return}q&&(Xv(K),(fe=x.current)==null||fe.call(x,k.current?q:void 0,K),K&&k.current&&((J=v.current)==null||J.call(v,q)),k.current=!1)},[Z,q,P,F,K,T,m,y,x,v]),!Z||!T?null:(Xv(P),u(Z,P,F))}const lwe="_selection_0f4643e",iC={selection:lwe};function uw(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=zn(),s=e?i:r,[o]=R.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[a]=R.useState(()=>rR(o));return R.useLayoutEffect(()=>{a.render(Hl.createPortal(n,s))},[n,s,a]),R.useLayoutEffect(()=>(r.append(o),()=>{a.unmount(),o.remove()}),[r,a,o]),null}function R7(t){const{children:e}=t,{svgOverlay:n}=zn();return n?E.jsx(uw,{children:Hl.createPortal(e,n)}):null}function sC(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:s=1}=r,o=i&&n?s*(n==="outside"?1:-1):0,{min:a,max:l}=jl.fromPoints(...e).expandBySize(o,o);return E.jsx("path",{d:`M ${a.x},${a.y} H ${l.x} V ${l.y} H ${a.x} z`,...r})}const cwe=20;function uwe(t){const{minZoom:e=cwe,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:s,visRatio:o,visSize:a,htmlToWorld:l,worldToData:c}=zn(),u=E7(),f=Er(y=>y.camera),h=o!==void 0;function m(y){if(!h)return y;const{scale:x}=f,v=jl.empty(new H(r.width/2,r.height/2)).expandBySize(a.width/x.x,a.height/x.y),g=jl.fromPoints(...y.html).expandToRatio(i).keepWithin(s).keepWithin(v).toRect(),b=g.map(S=>l(f,S)),_=b.map(c);return{html:g,world:b,data:_}}return E.jsx(C7,{id:"SelectToZoom",transform:m,validate:({html:y})=>y[0].manhattanDistanceTo(y[1])>=e,onValidSelection:u,...n,children:({html:y},{html:x},v)=>E.jsxs(R7,{children:[E.jsx(sC,{className:iC.selection,coords:x,fill:"white",fillOpacity:!h&&v?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:h||!v?4:void 0}),h&&E.jsx(sC,{className:iC.selection,coords:y,fill:"white",fillOpacity:v?.25:0,stroke:"black",strokePosition:"inside"})]})})}function fwe(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=zg("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),s=o=>({x:i(o),y:!1});return SP(),Pa("wheel",MP(s)),null}function dwe(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=zg("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),s=o=>({x:!1,y:i(o)});return SP(),Pa("wheel",MP(s)),null}function hwe(t){const{modifierKey:e,disabled:n}=t,r=zg("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=s=>{const o=r(s);return{x:o,y:o}};return SP(),Pa("wheel",MP(i)),null}function pwe(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:s,...o}=t;function a(l,c,u){const{canvasSize:f,htmlToWorld:h,worldToData:m}=u,{width:y,height:x}=f,[v,g]=l.html,b=e==="x"?[new H(v.x,0),new H(g.x,x)]:[new H(0,v.y),new H(y,g.y)],_=b.map(C=>h(c,C)),S=_.map(m);return{html:b,world:_,data:S}}return E.jsx(C7,{transform:a,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...o,children:s})}const mwe=20;function fD(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=mwe}=t,{visRatio:s}=zn(),o=E7();return E.jsx(pwe,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:s!==void 0||r,validate:({html:a})=>jl.fromPoints(...a).hasMinSize(i),onValidSelection:o,children:({html:a},l,c)=>E.jsx(R7,{children:E.jsx(sC,{className:iC.selection,coords:a,fill:"white",fillOpacity:c?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:c?void 0:4})})})}function gwe(t){const{...e}=t;return E.jsxs(E.Fragment,{children:[e.pan!==!1&&E.jsx(awe,{...e.pan}),e.zoom!==!1&&E.jsx(hwe,{...e.zoom}),e.xAxisZoom!==!1&&E.jsx(fwe,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&E.jsx(dwe,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&E.jsx(uwe,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&E.jsx(fD,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&E.jsx(fD,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function ywe(t){return(...e)=>R.useMemo(()=>t(...e),e)}function A7(t,e,n=(r,i)=>Object.is(r,i)){const r=Er(a=>a.camera),i=a6(),s=R.useRef(),o=vr(t);return R.useMemo(()=>{s.current=o.current(r)},e),UA(()=>{const a=o.current(r);n(s.current,a)||(s.current=a,i())}),s.current}function U1(t,e,n,r=!1){const i=R.useMemo(()=>new t(e),[t,e]),s=Er(o=>o.invalidate);return R.useLayoutEffect(()=>{if(n){i.prepare(n);for(let o=0;o{o.needsUpdate=!0}),i.index&&(i.index.needsUpdate=!0),s()}},[i,...Object.values(n||{}),s]),i}function vwe(t){const{children:e}=t,{floatingToolbar:n}=zn();return n?E.jsx(uw,{children:Hl.createPortal(e,n)}):null}const xwe="_btnLike_0154b53",bwe="_icon_bcb8f77",_we="_label_5a75092",wwe="_popup_954b735",Swe="_btn_f1cebe5 btnClean",EP={btnLike:xwe,icon:bwe,label:_we,popup:wwe,btn:Swe},{btn:Mwe,btnLike:Ewe}=EP,Twe=`_btn_579cee1 ${Mwe}`,Cwe=`_btnLike_5797793 ${Ewe}`,dD={btn:Twe,btnLike:Cwe};function Rwe(){const t=Er(i=>i.camera),e=Er(i=>i.invalidate),n=A7(({scale:i})=>i.x<1||i.y<1,[]);function r(){t.scale.x=1,t.scale.y=1,t.position.x=0,t.position.y=0,t.updateMatrixWorld(),e()}return E.jsx(vwe,{children:E.jsx("button",{className:dD.btn,type:"button",hidden:!n,onClick:()=>r(),children:E.jsx("span",{className:dD.btnLike,children:"Reset zoom"})})})}function P7(t){const{children:e,style:n,className:r}=t,{canvasSize:i}=zn();return E.jsx(uw,{overflowCanvas:!0,children:E.jsx("div",{className:r,style:{position:"absolute",top:0,left:0,...i,...n},children:e})})}const Awe="_overlay_df4a4fe",Pwe="_tooltip_c303daa",Iwe="_guides_073d0c4",VE={overlay:Awe,tooltip:Pwe,guides:Iwe};function Nwe(t){const{tooltipOpen:e,tooltipLeft:n,tooltipTop:r,guides:i,children:s}=t,{canvasSize:o}=zn(),{width:a,height:l}=o;return E.jsx(P7,{className:VE.overlay,children:e&&s&&E.jsxs(E.Fragment,{children:[E.jsx(Kme,{className:VE.tooltip,top:r,left:n,unstyled:!0,applyPositionStyle:!0,children:s},Math.random()),i&&E.jsxs("svg",{className:VE.guides,children:[i!=="horizontal"&&E.jsx(A1,{from:{x:n,y:0},to:{x:n,y:l}}),i!=="vertical"&&E.jsx(A1,{from:{x:0,y:r},to:{x:a,y:r}})]})]})})}function I7(t){const{children:e,size:n,...r}=t,{visSize:i}=zn(),{width:s,height:o}=n??i;return E.jsxs("mesh",{...r,children:[E.jsx("planeGeometry",{args:[s,o]}),e]})}function kwe(t){const{guides:e,renderTooltip:n,size:r}=t,{canvasSize:i,worldToData:s}=zn(),{width:o,height:a}=i,{tooltipOpen:l,tooltipTop:c,tooltipLeft:u,tooltipData:f,showTooltip:h,hideTooltip:m}=jme(),y=R.useCallback(_=>{const{unprojectedPoint:S,nativeEvent:C}=_;if(C.buttons!==0)return;const P=s(S);h({tooltipLeft:C.offsetX,tooltipTop:C.offsetY,tooltipData:[P.x,P.y]})},[s,h]),x=R.useCallback(()=>{l&&m()},[m,l]),v=R.useCallback(()=>m(),[m]),g=R.useCallback(_=>{const{nativeEvent:S}=_,{offsetX:C,offsetY:P}=S;C>=0&&C<=o&&P>=0&&P<=a&&y(_)},[a,y,o]),b=f&&n(...f);return E.jsxs(E.Fragment,{children:[E.jsx(I7,{onPointerMove:y,onPointerOut:x,onPointerDown:v,onPointerUp:g,size:r,children:E.jsx("meshBasicMaterial",{opacity:0,transparent:!0})}),E.jsx(Nwe,{tooltipOpen:l,tooltipLeft:u,tooltipTop:c,guides:e,children:b})]})}const Lwe="_axis_1002b06",Owe="_grid_a397f58",Dwe="_tick_44c4d9c",Fwe="_label_4a1d111",B1={axis:Lwe,grid:Owe,tick:Dwe,label:Fwe};function zwe(t){const{formattedValue:e,...n}=t;return E.jsx("text",{...n,dy:"0.3125em",children:e})}const Uwe={labelClassName:B1.label,labelProps:{fontSize:"inherit"},tickClassName:B1.tick,tickComponent:zwe},Bwe={abscissa:[Rve,D9],ordinate:[Mve,O9]};function hD(t){const{type:e,config:n,domain:r,canvasSize:i,offset:s,flipAxis:o,showAxis:a}=t,{width:l,height:c}=i,u=e==="abscissa",f=u?l:c,{scaleType:h=Xt.Linear,isIndexAxis:m,showGrid:y,label:x,nice:v=!1}=n,g=x7(h,{domain:r,range:o?[f,0]:[0,f],nice:v}),[b,_]=Bwe[e],S=q_e(f),C=m?{tickValues:J_e(r,S)}:{numTicks:S};return E.jsxs(E.Fragment,{children:[a&&E.jsx("svg",{className:B1.axis,"data-type":e,style:u?{width:l,height:s}:{width:s,height:c},children:E.jsx(b,{scale:g,tickFormat:Q_e(r,f,h),label:x,labelOffset:s-(u?32:36),hideAxisLine:y,...C,...Uwe})}),y&&E.jsx("svg",{className:B1.grid,...i,children:E.jsx(_,{scale:g,...i,...C})})]})}function jwe(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:s,ordinateConfig:o,getVisibleDomains:a}=zn(),l=A7(a,[a]);return E.jsx(uw,{children:Hl.createPortal(E.jsxs(E.Fragment,{children:[E.jsx(hD,{type:"abscissa",config:s,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),E.jsx(hD,{type:"ordinate",config:o,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function Vwe(t){const{className:e,orthographic:n,children:r}=t;return E.jsxs(Zhe,{className:e,orthographic:n,flat:!0,frameloop:"demand",dpr:[1,3],resize:{debounce:{scroll:20,resize:200},scroll:!1},gl:{preserveDrawingBuffer:!0},camera:{near:$_e,far:wP,position:[0,0,v7]},children:[E.jsx("ambientLight",{}),r]})}function $we(){const{visRatio:t}=zn(),e=Er(r=>r.camera),n=Fg();return R.useEffect(()=>{if(!t||e.scale.x===e.scale.y)return;const r=Math.max(e.scale.x,e.scale.y);e.scale.x=r,e.scale.y=r,n(e.position)},[e,n,t]),null}function Wwe(t){const{value:e}=t,n=Er(i=>i.raycaster),r=Er(i=>i.camera);return R.useEffect(()=>{const i=n.params.Points,s=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=s)}},[n,e]),UA(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function Hwe(){const{dataToWorld:t,worldToData:e}=zn(),n=R.useRef(),r=Er(s=>s.camera),i=Fg();return UA(()=>{n.current=e(r.position)}),R.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const Gwe="_visCanvas_2387375",Xwe="_title_313417a",qwe="_canvasArea_6300bb7",Ywe="_r3fRoot_f557f0c",Kwe="_svgOverlay_3f84e2f",Zwe="_floatingToolbar_de4854e",Tf={visCanvas:Gwe,title:Xwe,canvasArea:qwe,r3fRoot:Ywe,svgOverlay:Kwe,floatingToolbar:Zwe},Jwe={left:0,right:0,top:0,bottom:0};function Qwe(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:s,showAxes:o=!0,children:a}=t,l=b7(n,r.visDomain,i.visDomain),c=o?ewe({left:!!i.label,bottom:!!r.label,top:!!e}):Jwe,[u,f]=R.useState(null),[h,m]=R.useState(null);return E.jsxs("div",{className:Tf.visCanvas,style:{gridTemplateColumns:`${c.left}px minmax(0, 1fr) ${c.right}px`,gridTemplateRows:`${c.top}px minmax(0, 1fr) ${c.bottom}px`},children:[o&&e&&E.jsx("p",{className:Tf.title,children:e}),E.jsxs("div",{className:Tf.canvasArea,children:[E.jsx(Vwe,{className:Tf.r3fRoot,orthographic:!0,children:E.jsxs(nwe,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:u,floatingToolbar:h,children:[E.jsx(jwe,{axisOffsets:c,showAxes:o}),E.jsx(swe,{children:a}),E.jsx(Hwe,{}),E.jsx($we,{}),s!==void 0&&E.jsx(Wwe,{value:s})]})}),E.jsx("svg",{ref:f,className:Tf.svgOverlay,overflow:"hidden"})]}),E.jsx("div",{ref:m,className:Tf.floatingToolbar})]})}class eSe extends Bt{constructor(){super(...arguments),Sp(this,"params")}prepare(e){this.params=e}}const fw=eSe;class tSe extends fw{constructor(e){super(),this.setAttribute("position",lw(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:s,ordinateScale:o,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const f=s(n[e]),h=o(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const m=i[e],y=o(l-m),x=o(l+m),v=Number.isFinite(y)?y:h,g=Number.isFinite(x)?x:h;this.attributes.position.setXYZ(u,f,v,0),this.attributes.position.setXYZ(u+1,f,g,0)}}const nSe=tSe;class rSe extends fw{constructor(e){super(),this.setAttribute("position",lw(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:s,ordinateScale:o,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const f=s(n[e]),h=o(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ai),this.attributes.position.setXYZ(u+1,0,0,Ai);return}const m=i[e],y=o(l-m),x=o(l+m);Number.isFinite(y)?this.attributes.position.setXYZ(u,f,y,0):this.attributes.position.setXYZ(u,0,0,Ai),Number.isFinite(x)?this.attributes.position.setXYZ(u+1,f,x,0):this.attributes.position.setXYZ(u+1,0,0,Ai)}}const iSe=rSe;var Kp=(t=>(t.LineOnly="OnlyLine",t.GlyphsOnly="OnlyGlyphs",t.LineAndGlyphs="LineAndGlyphs",t))(Kp||{}),Sl=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(Sl||{});const sSe={[Sl.Cross]:` float alphaSymbol(vec2 coord, float size) { vec2 pos = floor(size * coord) + 0.5; vec2 d_x = abs(pos.x + vec2(- pos.y, pos.y - size)); @@ -4107,7 +4107,7 @@ No matching component was found for: float alphaSymbol(vec2 coord, float size) { return 1.0; } - `};function R7(t){const{color:e,size:n,glyphType:r}=t,i=!e,s={uniforms:y7({size:n,color:new ot(e)}),vertexShader:` + `};function N7(t){const{color:e,size:n,glyphType:r}=t,i=!e,s={uniforms:_7({size:n,color:new ot(e)}),vertexShader:` ${e?"uniform vec3 color;":""} uniform float size; varying vec3 vertexColor; @@ -4121,7 +4121,7 @@ No matching component was found for: uniform float size; varying vec3 vertexColor; - ${eSe[r]} + ${sSe[r]} void main() { float alpha = alphaSymbol(gl_PointCoord, size); @@ -4131,7 +4131,7 @@ No matching component was found for: gl_FragColor = vec4(vertexColor.rgb, alpha); } } - `};return E.jsx("shaderMaterial",{args:[s],vertexColors:i})}function tSe(t){const{abscissas:e,ordinates:n,errors:r,color:i,visible:s,ignoreValue:o}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=s&&{abscissas:e,ordinates:n,errors:r,abscissaScale:a,ordinateScale:l,ignoreValue:o},u=U1(Zwe,n.length,c),f=U1(Qwe,n.length,c);return E.jsxs(E.Fragment,{children:[E.jsx("lineSegments",{geometry:u,visible:s,children:E.jsx("lineBasicMaterial",{color:i})}),E.jsx("points",{geometry:f,visible:s,children:E.jsx(R7,{glyphType:Sl.Cap,color:i,size:9})})]})}class nSe extends fw{constructor(e){super(),this.setAttribute("position",lw(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:s,ignoreValue:o}=this.params,a=r[e];if(o&&o(a)){this.attributes.position.setXYZ(e,0,0,Ai);return}const l=i(n[e]),c=s(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ai);return}this.attributes.position.setXYZ(e,l,c,0)}}const rSe=nSe;function iSe(t){const{abscissas:e,ordinates:n,glyphType:r=Sl.Cross,color:i,size:s=6,visible:o=!0,ignoreValue:a,...l}=t,{abscissaScale:c,ordinateScale:u}=zn(),f=U1(rSe,n.length,o&&{abscissas:e,ordinates:n,abscissaScale:c,ordinateScale:u,ignoreValue:a},v7(l));return E.jsx("points",{geometry:f,visible:o,...l,children:E.jsx(R7,{glyphType:r,color:i,size:s})})}class sSe extends fw{constructor(e){super(),this.setAttribute("position",lw(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:s,ignoreValue:o}=this.params,a=r[e];if(o&&o(a)){this.attributes.position.setXYZ(e,0,0,Ai);return}const l=i(n[e]),c=s(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ai);return}this.attributes.position.setXYZ(e,l,c,0)}}const oSe=sSe;class aSe extends Ba{}v8({Line_:aSe});function lSe(t){const{abscissas:e,ordinates:n,color:r,visible:i=!0,ignoreValue:s,...o}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=U1(oSe,n.length,i&&{abscissas:e,ordinates:n,abscissaScale:a,ordinateScale:l,ignoreValue:s},v7(o));return E.jsx("line_",{geometry:c,visible:i,...o,children:E.jsx("lineBasicMaterial",{color:r})})}function cSe(t){const{abscissas:e,ordinates:n,errors:r,showErrors:i,color:s,curveType:o=Kp.LineOnly,glyphType:a=Sl.Cross,glyphSize:l=6,visible:c=!0,onDataPointClick:u,onDataPointEnter:f,onDataPointLeave:h,ignoreValue:m}=t,y=R.useCallback(g=>{const{index:b}=g;u&&b!==void 0&&u(b,g)},[u]),x=R.useCallback(g=>{const{index:b}=g;f&&b!==void 0&&f(b,g)},[f]),v=R.useCallback(g=>{const{index:b}=g;h&&b!==void 0&&h(b,g)},[h]);return E.jsxs(E.Fragment,{children:[E.jsx(lSe,{abscissas:e,ordinates:n,color:s,ignoreValue:m,visible:o!==Kp.GlyphsOnly&&c}),E.jsx(iSe,{abscissas:e,ordinates:n,glyphType:a,color:s,size:l,ignoreValue:m,visible:o!==Kp.LineOnly&&c,onClick:u&&y,onPointerEnter:f&&x,onPointerLeave:h&&v}),r&&E.jsx(tSe,{abscissas:e,ordinates:n,errors:r,color:s,ignoreValue:m,visible:c&&i})]})}var nd=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(nd||{});function uSe(t){return M1(t*360,1,.5).formatRgb()}function Cf(t){return e=>t(1-e)}const fSe={Blues:Cf(xxe),Greens:Cf(_xe),Greys:Cf(Sxe),Oranges:Cf(Axe),Purples:Cf(Exe),Reds:Cf(Cxe),Turbo:zxe,Viridis:Uxe,Inferno:jxe,Magma:Bxe,Plasma:Vxe,Cividis:Pxe,Warm:Nxe,Cool:kxe,Cubehelix:Ixe,BuGn:Yve,BuPu:Zve,GnBu:Qve,OrRd:txe,PuBuGn:rxe,PuBu:sxe,PuRd:axe,RdPu:cxe,YlGnBu:fxe,YlGn:hxe,YlOrBr:mxe,YlOrRd:yxe,Rainbow:Lxe,Sinebow:Fxe,HSL:uSe,BrBG:Ive,PRGn:kve,PiYG:Ove,PuOr:Fve,RdBu:Uve,RdGy:jve,RdYlBu:$ve,RdYlGn:Hve,Spectral:Xve},f5=1/20;a6(0,1+f5,f5);const dSe={[Xt.Linear]:t=>t,[Xt.Log]:Math.log10,[Xt.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Xt.Sqrt]:Math.sqrt,[Xt.Gamma]:t=>t},hSe={float32:li,uint16:Au,uint8:$i,uint8_clamped:$i};function pSe(t,e){const n=fSe[t];return e?r=>n(1-r):n}function mSe(t,e=Xt.Linear){const n=dSe[e];return[n(t[0]),n(t[1])]}function gSe(t,e=Sr){if(!t)return;const{rows:n,cols:r}=k_e(t),i=new Ls(t.data,r,n,yg,hSe[t.dtype],gg,Li,Li,e);return i.needsUpdate=!0,i}const $E=dwe(gSe),ySe=zl(255,255,255,0),WE=256,vSe={[Xt.Log]:"log(value) * oneOverLog10",[Xt.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Xt.Sqrt]:"sqrt(value)"},xSe={[Xt.Log]:"value > 0.",[Xt.Sqrt]:"value >= 0."};function bSe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:s=!1,magFilter:o,alphaValues:a,alphaDomain:l=B_e,badColor:c=ySe,mask:u}=t,f=$E(e,o),h=$E(a),m=$E(u),y=R.useMemo(()=>{const S=pSe(i,s),C=Array.from({length:WE}).flatMap((A,L)=>{const{r:k,g:T,b:N}=zl(S(L/(WE-1)));return[k,T,N,255]}),P=new Ls(Uint8Array.from(C),WE,1,Ir,$i);return P.needsUpdate=!0,P},[i,s]),[x,v]=Array.isArray(r)?r:[r,1],g=mSe(n,x),b=typeof c=="string"?zl(c):c,_={uniforms:y7({data:f,mask:m,colorMap:y,min:g[0],oneOverRange:1/(g[1]-g[0]),gammaExponent:v,normRevertFactor:e.dtype==="uint8"?255:1,alpha:h,withAlpha:a?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new nn(b.r/255,b.g/255,b.b/255,b.opacity)}),vertexShader:K_e,fragmentShader:` + `};return E.jsx("shaderMaterial",{args:[s],vertexColors:i})}function oSe(t){const{abscissas:e,ordinates:n,errors:r,color:i,visible:s,ignoreValue:o}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=s&&{abscissas:e,ordinates:n,errors:r,abscissaScale:a,ordinateScale:l,ignoreValue:o},u=U1(nSe,n.length,c),f=U1(iSe,n.length,c);return E.jsxs(E.Fragment,{children:[E.jsx("lineSegments",{geometry:u,visible:s,children:E.jsx("lineBasicMaterial",{color:i})}),E.jsx("points",{geometry:f,visible:s,children:E.jsx(N7,{glyphType:Sl.Cap,color:i,size:9})})]})}class aSe extends fw{constructor(e){super(),this.setAttribute("position",lw(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:s,ignoreValue:o}=this.params,a=r[e];if(o&&o(a)){this.attributes.position.setXYZ(e,0,0,Ai);return}const l=i(n[e]),c=s(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ai);return}this.attributes.position.setXYZ(e,l,c,0)}}const lSe=aSe;function cSe(t){const{abscissas:e,ordinates:n,glyphType:r=Sl.Cross,color:i,size:s=6,visible:o=!0,ignoreValue:a,...l}=t,{abscissaScale:c,ordinateScale:u}=zn(),f=U1(lSe,n.length,o&&{abscissas:e,ordinates:n,abscissaScale:c,ordinateScale:u,ignoreValue:a},w7(l));return E.jsx("points",{geometry:f,visible:o,...l,children:E.jsx(N7,{glyphType:r,color:i,size:s})})}class uSe extends fw{constructor(e){super(),this.setAttribute("position",lw(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:s,ignoreValue:o}=this.params,a=r[e];if(o&&o(a)){this.attributes.position.setXYZ(e,0,0,Ai);return}const l=i(n[e]),c=s(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ai);return}this.attributes.position.setXYZ(e,l,c,0)}}const fSe=uSe;class dSe extends Ba{}_8({Line_:dSe});function hSe(t){const{abscissas:e,ordinates:n,color:r,visible:i=!0,ignoreValue:s,...o}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=U1(fSe,n.length,i&&{abscissas:e,ordinates:n,abscissaScale:a,ordinateScale:l,ignoreValue:s},w7(o));return E.jsx("line_",{geometry:c,visible:i,...o,children:E.jsx("lineBasicMaterial",{color:r})})}function pSe(t){const{abscissas:e,ordinates:n,errors:r,showErrors:i,color:s,curveType:o=Kp.LineOnly,glyphType:a=Sl.Cross,glyphSize:l=6,visible:c=!0,onDataPointClick:u,onDataPointEnter:f,onDataPointLeave:h,ignoreValue:m}=t,y=R.useCallback(g=>{const{index:b}=g;u&&b!==void 0&&u(b,g)},[u]),x=R.useCallback(g=>{const{index:b}=g;f&&b!==void 0&&f(b,g)},[f]),v=R.useCallback(g=>{const{index:b}=g;h&&b!==void 0&&h(b,g)},[h]);return E.jsxs(E.Fragment,{children:[E.jsx(hSe,{abscissas:e,ordinates:n,color:s,ignoreValue:m,visible:o!==Kp.GlyphsOnly&&c}),E.jsx(cSe,{abscissas:e,ordinates:n,glyphType:a,color:s,size:l,ignoreValue:m,visible:o!==Kp.LineOnly&&c,onClick:u&&y,onPointerEnter:f&&x,onPointerLeave:h&&v}),r&&E.jsx(oSe,{abscissas:e,ordinates:n,errors:r,color:s,ignoreValue:m,visible:c&&i})]})}var rd=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(rd||{});function mSe(t){return M1(t*360,1,.5).formatRgb()}function Cf(t){return e=>t(1-e)}const gSe={Blues:Cf(Cxe),Greens:Cf(Axe),Greys:Cf(Ixe),Oranges:Cf(Fxe),Purples:Cf(kxe),Reds:Cf(Oxe),Turbo:Gxe,Viridis:Xxe,Inferno:Yxe,Magma:qxe,Plasma:Kxe,Cividis:zxe,Warm:Bxe,Cool:jxe,Cubehelix:Uxe,BuGn:rxe,BuPu:sxe,GnBu:axe,OrRd:cxe,PuBuGn:fxe,PuBu:hxe,PuRd:mxe,RdPu:yxe,YlGnBu:xxe,YlGn:_xe,YlOrBr:Sxe,YlOrRd:Exe,Rainbow:Vxe,Sinebow:Hxe,HSL:mSe,BrBG:Uve,PRGn:jve,PiYG:$ve,PuOr:Hve,RdBu:Xve,RdGy:Yve,RdYlBu:Zve,RdYlGn:Qve,Spectral:txe},pD=1/20;f6(0,1+pD,pD);const ySe={[Xt.Linear]:t=>t,[Xt.Log]:Math.log10,[Xt.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Xt.Sqrt]:Math.sqrt,[Xt.Gamma]:t=>t},vSe={float32:li,uint16:Au,uint8:$i,uint8_clamped:$i};function xSe(t,e){const n=gSe[t];return e?r=>n(1-r):n}function bSe(t,e=Xt.Linear){const n=ySe[e];return[n(t[0]),n(t[1])]}function _Se(t,e=Sr){if(!t)return;const{rows:n,cols:r}=z_e(t),i=new Ls(t.data,r,n,yg,vSe[t.dtype],gg,Li,Li,e);return i.needsUpdate=!0,i}const $E=ywe(_Se),wSe=zl(255,255,255,0),WE=256,SSe={[Xt.Log]:"log(value) * oneOverLog10",[Xt.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Xt.Sqrt]:"sqrt(value)"},MSe={[Xt.Log]:"value > 0.",[Xt.Sqrt]:"value >= 0."};function ESe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:s=!1,magFilter:o,alphaValues:a,alphaDomain:l=H_e,badColor:c=wSe,mask:u}=t,f=$E(e,o),h=$E(a),m=$E(u),y=R.useMemo(()=>{const S=xSe(i,s),C=Array.from({length:WE}).flatMap((A,L)=>{const{r:k,g:T,b:N}=zl(S(L/(WE-1)));return[k,T,N,255]}),P=new Ls(Uint8Array.from(C),WE,1,Ir,$i);return P.needsUpdate=!0,P},[i,s]),[x,v]=Array.isArray(r)?r:[r,1],g=bSe(n,x),b=typeof c=="string"?zl(c):c,_={uniforms:_7({data:f,mask:m,colorMap:y,min:g[0],oneOverRange:1/(g[1]-g[0]),gammaExponent:v,normRevertFactor:e.dtype==="uint8"?255:1,alpha:h,withAlpha:a?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new nn(b.r/255,b.g/255,b.b/255,b.opacity)}),vertexShader:twe,fragmentShader:` uniform sampler2D data; uniform sampler2D colorMap; @@ -4153,11 +4153,11 @@ No matching component was found for: varying vec2 coords; bool isSupported(float value) { - return ${xSe[x]||"true"}; + return ${MSe[x]||"true"}; } float scale(float value) { - return ${vSe[x]||"value"}; + return ${SSe[x]||"value"}; } void main() { @@ -4177,11 +4177,11 @@ No matching component was found for: } } } - `};return E.jsx("shaderMaterial",{args:[_],side:ro})}const _Se=R.memo(bSe);function wSe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:s,magFilter:o,alphaValues:a,alphaDomain:l,badColor:c,mask:u,...f}=t;return E.jsx(C7,{...f,children:E.jsx(_Se,{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:s,magFilter:o,alphaValues:a,alphaDomain:l,badColor:c,mask:u})})}const{btn:SSe,btnLike:MSe,icon:ESe,label:TSe,popup:CSe}=CP,RSe="_toolbar_d77010c",ASe="_controls_6f2898a",PSe="_controlWrapper_c53184f",ISe="_control_72c50d3",NSe="_sep_9963159",kSe="_arrowIcon_52a7a56",LSe="_menu_9a962f8",OSe="_btnOption_14b8d45 btnClean",DSe=`_btn_ea88005 ${SSe}`,FSe=`_btnLike_059b9d6 ${MSe}`,zSe=`_icon_b73dfea ${ESe}`,USe=`_label_917dfbf ${TSe}`,BSe=`_popup_486e2ed ${CSe}`,Ni={toolbar:RSe,controls:ASe,controlWrapper:PSe,control:ISe,sep:NSe,arrowIcon:kSe,menu:LSe,btnOption:OSe,btn:DSe,btnLike:FSe,icon:zSe,label:USe,popup:BSe},jSe=R.forwardRef((t,e)=>{const{label:n,icon:r,iconOnly:i,small:s,raised:o,withArrow:a,disabled:l,...c}=t;return E.jsx("button",{ref:e,className:Ni.btn,type:"button",title:i?n:void 0,"aria-label":i?n:void 0,disabled:l,"data-small":s||void 0,"data-raised":o||void 0,...c,children:E.jsxs("span",{className:Ni.btnLike,children:[r&&E.jsx(r,{className:Ni.icon}),!i&&E.jsx("span",{className:Ni.label,children:n}),a&&E.jsx(n7,{className:Ni.arrowIcon})]})})}),RP=jSe,tu=6,VSe=320;function $Se(){const[t,e]=r_();return xP({open:t,middleware:[mP(tu),N1e({padding:tu*2,apply({availableHeight:n,elements:r,rects:i}){Object.assign(r.floating.style,{maxHeight:`${Math.min(n,VSe)}px`,minWidth:`${i.reference.width}px`})}}),gP({padding:tu})],onOpenChange:e,whileElementsMounted:pP})}function AP(t){const{refs:e,onOpenChange:n}=t,{domReference:r,floating:i}=e,s=R.useCallback(l=>{var c,u;const{relatedTarget:f}=l;f&&!((c=r.current)!=null&&c.contains(f))&&!((u=i.current)!=null&&u.contains(f))&&n(!1)},[r,i,n]),o=R.useMemo(()=>({onBlur:s}),[s]),a=R.useMemo(()=>({onBlur:s}),[s]);return i6("Escape",()=>n(!1)),Xre(e.floating,l=>{const c=e.domReference.current;l.target instanceof Element&&c!=null&&c.contains(l.target)||n(!1)}),R.useMemo(()=>({reference:o,floating:a}),[o,a])}const WSe="_list_0eb2b49",HSe="_entry_d2776e7",GSe="_shortcut_cf4534d",HE={list:WSe,entry:HSe,shortcut:GSe};function XSe(t){const{interactions:e}=t,[n,r]=r_(),i=R.useId(),{refs:s,floatingStyles:o,context:a}=xP({open:n,middleware:[mP(tu),gP({padding:tu})],onOpenChange:r,whileElementsMounted:pP}),{getReferenceProps:l,getFloatingProps:c}=bP([vP(a),AP(a)]);return E.jsxs(E.Fragment,{children:[E.jsx(RP,{ref:s.setReference,id:i,label:"Show help",icon:fbe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":n,"aria-controls":n&&a.floatingId||void 0,...l()}),n&&E.jsx("div",{ref:s.setFloating,id:a.floatingId,className:Ni.popup,style:o,role:"dialog","aria-labelledby":i,...c(),children:E.jsx("ul",{className:HE.list,children:e.map(({shortcut:u,description:f})=>E.jsxs("li",{className:HE.entry,children:[E.jsx("span",{children:f})," ",E.jsx("kbd",{className:HE.shortcut,children:u})]},u))})})]})}const qSe="_controlWrapper_8627c21",YSe="_control_0b569a9",d5={controlWrapper:qSe,control:YSe};function KSe(t){const{children:e,knownWidth:n,onMeasure:r}=t;return E.jsx(_P,{onResize:({entry:i})=>{i&&i.width>(n||0)&&r(i.width)},children:({measureRef:i})=>E.jsx("div",{className:d5.controlWrapper,"data-measured":n!==void 0,children:E.jsx("div",{ref:i,className:d5.control,children:e})})})}const{popup:ZSe}=CP,JSe="_control_ad90dfa",QSe=`_popup_c29165d ${ZSe}`,h5={control:JSe,popup:QSe};function nu(t){return E.jsx("span",{className:Ni.sep,...t})}function eMe(t){const{children:e}=t,n=lP(e).filter(R.isValidElement),[r,i]=r_(),s=R.useId(),{refs:o,floatingStyles:a,context:l}=xP({open:r,placement:"bottom-end",middleware:[mP(tu),gP({padding:tu})],onOpenChange:i,whileElementsMounted:pP}),{getReferenceProps:c,getFloatingProps:u}=bP([vP(l),AP(l)]);return n.length===0?null:E.jsxs(E.Fragment,{children:[E.jsx(nu,{}),E.jsx(RP,{ref:o.setReference,id:s,label:"More controls",icon:dbe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r&&l.floatingId||void 0,...c()}),r&&E.jsx("div",{ref:o.setFloating,id:l.floatingId,className:h5.popup,style:a,role:"dialog","aria-labelledby":s,...u(),children:n.map(f=>E.jsx("div",{className:h5.control,children:R.cloneElement(f)},f.key))})]})}function tMe(t){var e;const{children:n,interactions:r,overflowChildren:i=[]}=t,s=lP(n).filter(R.isValidElement),[o,a]=Vre(),l=o?o.width:0,c=Fre(),[u,f]=s.reduce(([m,y,x],v)=>{const g=c.get(v.key)??0,b=x+g>l;return[b?m:[...m,v],b?[...y,v]:y,x+g]},[[],[],0]),h=((e=u[u.length-1])==null?void 0:e.type)===nu;return E.jsxs("div",{className:Ni.toolbar,children:[E.jsx("div",{ref:a,className:Ni.controls,children:(h?u.slice(0,-1):u).map(m=>E.jsx(KSe,{knownWidth:c.get(m.key),onMeasure:y=>{c.set(m.key,y)},children:m},m.key))}),E.jsxs(eMe,{children:[i,f.filter(m=>m.type!==nu)]}),r&&E.jsx(nu,{}),r&&E.jsx(XSe,{interactions:r})]})}function Nc(t){const{value:e,onToggle:n,...r}=t;return E.jsx(RP,{...r,"aria-pressed":e,onClick:()=>n()})}R.createContext(void 0);const nMe="_boundEditor_ce4a770",rMe="_label_1e85446",iMe="_value_c7f465d",GE={boundEditor:nMe,label:rMe,value:iMe},sMe="_root_86b0b1e",oMe="_dataRange_03d542e",aMe="_autoscale_8ea032e",lMe="_error_841a0df",cMe="_errorMessage_a16acf6",uMe="_actionBtn_18350cd btnClean",fMe="_swapBtn_2e22485 _actionBtn_18350cd btnClean",Ll={root:sMe,dataRange:oMe,autoscale:aMe,error:lMe,errorMessage:cMe,actionBtn:uMe,swapBtn:fMe},aC=R.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:s,onEditToggle:o,onChange:a}=t,l=`${n}-bound`,c=R.useRef(null),[u,f]=R.useState("");function h(){o(!1),f(zE(r))}return R.useImperativeHandle(e,()=>({cancel:h})),R.useEffect(()=>{f(zE(r))},[r,f]),R.useEffect(()=>{var m,y;i||(m=c.current)==null||m.blur(),i&&n==="min"&&((y=c.current)==null||y.focus())},[i,n]),E.jsxs("form",{className:GE.boundEditor,"data-error":s||void 0,"data-editing":i,onSubmit:m=>{m.preventDefault();const y=Number.parseFloat(u.replace("−","-")),x=Number.isNaN(y)?r:G_e(y);f(zE(x)),a(x),o(!1)},children:[E.jsx("label",{id:`${l}-label`,className:GE.label,htmlFor:l,children:n}),E.jsx("input",{id:l,ref:c,className:GE.value,type:"text",name:"bound",value:u,title:i?void 0:r.toString(),"aria-labelledby":`${l}-label`,onChange:m=>f(m.target.value),onFocus:()=>{i||o(!0)}}),E.jsx("button",{className:Ll.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:E.jsx(cbe,{})}),E.jsx("button",{className:Ll.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>h(),children:E.jsx(hbe,{})})]})});aC.displayName="BoundEditor";const dMe={[nd.MinGreater]:{message:"Min greater than max",fallback:"data range"},[nd.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[nd.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[nd.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function XE(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:s}=dMe[e];return E.jsxs("p",{className:Ll.error,children:[E.jsxs("span",{className:Ll.errorMessage,children:[i,E.jsx("br",{}),E.jsx(ube,{})," falling back to ",E.jsx("strong",{children:s})]}),n&&r&&E.jsx("button",{className:Ll.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:E.jsx(pbe,{})})]})}const hMe=R.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:s,isAutoMax:o,isEditingMin:a,isEditingMax:l}=t,{onAutoMinToggle:c,onAutoMaxToggle:u,onEditMin:f,onEditMax:h,onChangeMin:m,onChangeMax:y,onSwap:x}=t,{minGreater:v,minError:g,maxError:b}=i,_=R.useRef(null),S=R.useRef(null);return R.useImperativeHandle(e,()=>({cancelEditing:()=>{var C,P;(C=_.current)==null||C.cancel(),(P=S.current)==null||P.cancel()}})),E.jsxs("div",{className:Ll.root,children:[v&&E.jsx(XE,{error:nd.MinGreater,showSwapBtn:!s&&!o,onSwap:x}),E.jsx(aC,{ref:_,bound:"min",value:n[0],isEditing:a,hasError:v||!!g,onEditToggle:f,onChange:m}),g&&E.jsx(XE,{error:g}),E.jsx(aC,{ref:S,bound:"max",value:n[1],isEditing:l,hasError:v||!!b,onEditToggle:h,onChange:y}),b&&E.jsx(XE,{error:b}),E.jsxs("p",{className:Ll.dataRange,children:["Data range"," ",E.jsxs("span",{children:["["," ",E.jsx("abbr",{title:r[0].toString(),children:e5(r[0])})," ",","," ",E.jsx("abbr",{title:r[1].toString(),children:e5(r[1])})," ","]"]})]}),E.jsxs("p",{className:Ll.autoscale,children:["Autoscale"," ",E.jsx(Nc,{label:"Min",raised:!0,value:s,onToggle:c}),E.jsx(Nc,{label:"Max",raised:!0,value:o,onToggle:u})]})]})});hMe.displayName="DomainControls";const pMe="_thumb_be15bc7",mMe="_thumbBtnLike_3744319",gMe="_icon_4b34f14",dv={thumb:pMe,thumbBtnLike:mMe,icon:gMe},yMe=R.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:s,AutoIcon:o,...a}=t;return E.jsx("div",{ref:e,...a,className:dv.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":s||void 0,tabIndex:s?-1:a.tabIndex,"data-auto":r,"data-error":i||void 0,children:E.jsxs("div",{className:dv.thumbBtnLike,children:[r&&E.jsx(o,{className:dv.icon}),!r&&i&&E.jsx(lbe,{className:dv.icon,strokeWidth:"3"})]})})});yMe.displayName="Thumb";function vMe(t){return Array.isArray(t)?t:Object.values(t).flat()}function p5(t){const{activeIndex:e,selectedIndex:n,children:r,getItemProps:i,onSelect:s}=t,{ref:o,index:a}=V1e();return E.jsx("button",{ref:o,className:Ni.btnOption,type:"button",role:"option","aria-selected":a===n||void 0,tabIndex:a===e?0:-1,"data-active":a===e||void 0,...i({onClick:()=>s(a)}),children:r})}const xMe="_label_568c73e",bMe="_groups_6cecc1b",_Me="_groupLabel_b6d0922",qE={label:xMe,groups:bMe,groupLabel:_Me};function wMe(t){const{label:e,value:n,disabled:r,onChange:i,options:s,renderOption:o}=t,{context:a,refs:l,floatingStyles:c}=$Se(),{open:u,onOpenChange:f}=a,h=R.useId(),m=R.useId(),y=R.useId(),x=R.useRef([]),[v,g]=R.useState(null),[b,_]=R.useState(()=>vMe(s).indexOf(n)),{getReferenceProps:S,getFloatingProps:C,getItemProps:P}=bP([vP(a),AP(a),ebe(a,{listRef:x,activeIndex:v,loop:!0,focusItemOnHover:!1,onNavigate:g})]);function A(L,k){_(L),f(!1),i(k)}return E.jsxs(E.Fragment,{children:[e&&E.jsx("span",{id:h,className:qE.label,children:e}),E.jsx("button",{ref:l.setReference,id:m,className:Ni.btn,type:"button",disabled:r,role:"combobox","aria-labelledby":`${e?h:""} ${y}`,"aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u&&a.floatingId||void 0,...S(),children:E.jsxs("span",{id:y,className:Ni.btnLike,children:[o(n),E.jsx(n7,{className:Ni.arrowIcon})]})}),u&&E.jsx("div",{ref:l.setFloating,id:a.floatingId,className:Ni.menu,style:c,role:"listbox","aria-labelledby":m,...C(),children:E.jsx(j1e,{elementsRef:x,children:Array.isArray(s)?s.map(L=>E.jsx(p5,{activeIndex:v,selectedIndex:b,getItemProps:P,onSelect:k=>A(k,L),children:o(L)},L)):E.jsx("ul",{className:qE.groups,children:Object.entries(s).map(([L,k])=>E.jsxs("li",{children:[E.jsx("span",{className:qE.groupLabel,children:L}),k.map(T=>E.jsx(p5,{activeIndex:v,selectedIndex:b,getItemProps:P,onSelect:N=>A(N,T),children:o(T)},T))]},L))})})})]})}function SMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:E.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function MMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",...t,children:E.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Xt.Linear+"",Xt.Log+"",Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";Gv.Phase+"",Gv.Amplitude+"",Gv.PhaseAmplitude+"";d_e(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function EMe(t){const{api:e,layer:n,x:r,y:i,magFilter:s,onPointerMove:o,...a}=t,l=e.get(n,new Ne(r,i)),[c,u]=l.shape,f=Nre(h=>{o==null||o(h,l)},[o],50);return E.jsx("group",{position:[r+u/2,i+c/2,0],children:E.jsx(wSe,{values:l,...a,magFilter:s,size:{width:u,height:c},onPointerMove:o&&f})})}R.memo(EMe);new kr(new H(-1,-1,-1),new H(1,1,1));var A7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},m5=Et.createContext&&Et.createContext(A7),TMe=["attr","size","title"];function CMe(t,e){if(t==null)return{};var n=RMe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function RMe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function j1(){return j1=Object.assign?Object.assign.bind():function(t){for(var e=1;eEt.createElement(e.tag,V1({key:n},e.attr),P7(e.child)))}function PP(t){return e=>Et.createElement(NMe,j1({attr:V1({},t.attr)},e),P7(t.child))}function NMe(t){var e=n=>{var{attr:r,size:i,title:s}=t,o=CMe(t,TMe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Et.createElement("svg",j1({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:V1(V1({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Et.createElement("title",null,s),t.children)};return m5!==void 0?Et.createElement(m5.Consumer,null,n=>e(n)):e(A7)}function kMe(t){return PP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(t)}function LMe(t){return PP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},child:[]}]})(t)}function OMe(t){return PP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"},child:[]}]})(t)}var Zt={};const DMe=Object.prototype.toString;function Yo(t){const e=DMe.call(t);return e.endsWith("Array]")&&!e.includes("Big")}const FMe=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Yo},Symbol.toStringTag,{value:"Module"})),zMe=Ko(FMe);function UMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Yo(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,s=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(s<=r||s>t.length||!Number.isInteger(s))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var o=t[r],a=r+1;ao&&(o=t[a]);return o}function BMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Yo(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,s=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(s<=r||s>t.length||!Number.isInteger(s))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var o=t[r],a=r+1;a1&&arguments[1]!==void 0?arguments[1]:{};if(Yo(t)){if(t.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var n;if(e.output!==void 0){if(!Yo(e.output))throw new TypeError("output option must be an array if specified");n=e.output}else n=new Array(t.length);var r=BMe(t),i=UMe(t);if(r===i)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var s=e.min,o=s===void 0?e.autoMinMax?r:0:s,a=e.max,l=a===void 0?e.autoMinMax?i:1:a;if(o>=l)throw new RangeError("min option must be smaller than max option");for(var c=(l-o)/(i-r),u=0;u{const{label:n,icon:r,iconOnly:i,small:s,raised:o,withArrow:a,disabled:l,...c}=t;return E.jsx("button",{ref:e,className:Ni.btn,type:"button",title:i?n:void 0,"aria-label":i?n:void 0,disabled:l,"data-small":s||void 0,"data-raised":o||void 0,...c,children:E.jsxs("span",{className:Ni.btnLike,children:[r&&E.jsx(r,{className:Ni.icon}),!i&&E.jsx("span",{className:Ni.label,children:n}),a&&E.jsx(s7,{className:Ni.arrowIcon})]})})}),TP=WSe,tu=6,HSe=320;function GSe(){const[t,e]=r_();return yP({open:t,middleware:[hP(tu),B1e({padding:tu*2,apply({availableHeight:n,elements:r,rects:i}){Object.assign(r.floating.style,{maxHeight:`${Math.min(n,HSe)}px`,minWidth:`${i.reference.width}px`})}}),pP({padding:tu})],onOpenChange:e,whileElementsMounted:dP})}function CP(t){const{refs:e,onOpenChange:n}=t,{domReference:r,floating:i}=e,s=R.useCallback(l=>{var c,u;const{relatedTarget:f}=l;f&&!((c=r.current)!=null&&c.contains(f))&&!((u=i.current)!=null&&u.contains(f))&&n(!1)},[r,i,n]),o=R.useMemo(()=>({onBlur:s}),[s]),a=R.useMemo(()=>({onBlur:s}),[s]);return l6("Escape",()=>n(!1)),Qre(e.floating,l=>{const c=e.domReference.current;l.target instanceof Element&&c!=null&&c.contains(l.target)||n(!1)}),R.useMemo(()=>({reference:o,floating:a}),[o,a])}const XSe="_list_0eb2b49",qSe="_entry_d2776e7",YSe="_shortcut_cf4534d",HE={list:XSe,entry:qSe,shortcut:YSe};function KSe(t){const{interactions:e}=t,[n,r]=r_(),i=R.useId(),{refs:s,floatingStyles:o,context:a}=yP({open:n,middleware:[hP(tu),pP({padding:tu})],onOpenChange:r,whileElementsMounted:dP}),{getReferenceProps:l,getFloatingProps:c}=vP([gP(a),CP(a)]);return E.jsxs(E.Fragment,{children:[E.jsx(TP,{ref:s.setReference,id:i,label:"Show help",icon:xbe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":n,"aria-controls":n&&a.floatingId||void 0,...l()}),n&&E.jsx("div",{ref:s.setFloating,id:a.floatingId,className:Ni.popup,style:o,role:"dialog","aria-labelledby":i,...c(),children:E.jsx("ul",{className:HE.list,children:e.map(({shortcut:u,description:f})=>E.jsxs("li",{className:HE.entry,children:[E.jsx("span",{children:f})," ",E.jsx("kbd",{className:HE.shortcut,children:u})]},u))})})]})}const ZSe="_controlWrapper_8627c21",JSe="_control_0b569a9",mD={controlWrapper:ZSe,control:JSe};function QSe(t){const{children:e,knownWidth:n,onMeasure:r}=t;return E.jsx(xP,{onResize:({entry:i})=>{i&&i.width>(n||0)&&r(i.width)},children:({measureRef:i})=>E.jsx("div",{className:mD.controlWrapper,"data-measured":n!==void 0,children:E.jsx("div",{ref:i,className:mD.control,children:e})})})}const{popup:eMe}=EP,tMe="_control_ad90dfa",nMe=`_popup_c29165d ${eMe}`,gD={control:tMe,popup:nMe};function nu(t){return E.jsx("span",{className:Ni.sep,...t})}function rMe(t){const{children:e}=t,n=oP(e).filter(R.isValidElement),[r,i]=r_(),s=R.useId(),{refs:o,floatingStyles:a,context:l}=yP({open:r,placement:"bottom-end",middleware:[hP(tu),pP({padding:tu})],onOpenChange:i,whileElementsMounted:dP}),{getReferenceProps:c,getFloatingProps:u}=vP([gP(l),CP(l)]);return n.length===0?null:E.jsxs(E.Fragment,{children:[E.jsx(nu,{}),E.jsx(TP,{ref:o.setReference,id:s,label:"More controls",icon:bbe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r&&l.floatingId||void 0,...c()}),r&&E.jsx("div",{ref:o.setFloating,id:l.floatingId,className:gD.popup,style:a,role:"dialog","aria-labelledby":s,...u(),children:n.map(f=>E.jsx("div",{className:gD.control,children:R.cloneElement(f)},f.key))})]})}function iMe(t){var e;const{children:n,interactions:r,overflowChildren:i=[]}=t,s=oP(n).filter(R.isValidElement),[o,a]=qre(),l=o?o.width:0,c=$re(),[u,f]=s.reduce(([m,y,x],v)=>{const g=c.get(v.key)??0,b=x+g>l;return[b?m:[...m,v],b?[...y,v]:y,x+g]},[[],[],0]),h=((e=u[u.length-1])==null?void 0:e.type)===nu;return E.jsxs("div",{className:Ni.toolbar,children:[E.jsx("div",{ref:a,className:Ni.controls,children:(h?u.slice(0,-1):u).map(m=>E.jsx(QSe,{knownWidth:c.get(m.key),onMeasure:y=>{c.set(m.key,y)},children:m},m.key))}),E.jsxs(rMe,{children:[i,f.filter(m=>m.type!==nu)]}),r&&E.jsx(nu,{}),r&&E.jsx(KSe,{interactions:r})]})}function Nc(t){const{value:e,onToggle:n,...r}=t;return E.jsx(TP,{...r,"aria-pressed":e,onClick:()=>n()})}R.createContext(void 0);const sMe="_boundEditor_ce4a770",oMe="_label_1e85446",aMe="_value_c7f465d",GE={boundEditor:sMe,label:oMe,value:aMe},lMe="_root_86b0b1e",cMe="_dataRange_03d542e",uMe="_autoscale_8ea032e",fMe="_error_841a0df",dMe="_errorMessage_a16acf6",hMe="_actionBtn_18350cd btnClean",pMe="_swapBtn_2e22485 _actionBtn_18350cd btnClean",Ll={root:lMe,dataRange:cMe,autoscale:uMe,error:fMe,errorMessage:dMe,actionBtn:hMe,swapBtn:pMe},oC=R.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:s,onEditToggle:o,onChange:a}=t,l=`${n}-bound`,c=R.useRef(null),[u,f]=R.useState("");function h(){o(!1),f(zE(r))}return R.useImperativeHandle(e,()=>({cancel:h})),R.useEffect(()=>{f(zE(r))},[r,f]),R.useEffect(()=>{var m,y;i||(m=c.current)==null||m.blur(),i&&n==="min"&&((y=c.current)==null||y.focus())},[i,n]),E.jsxs("form",{className:GE.boundEditor,"data-error":s||void 0,"data-editing":i,onSubmit:m=>{m.preventDefault();const y=Number.parseFloat(u.replace("−","-")),x=Number.isNaN(y)?r:Z_e(y);f(zE(x)),a(x),o(!1)},children:[E.jsx("label",{id:`${l}-label`,className:GE.label,htmlFor:l,children:n}),E.jsx("input",{id:l,ref:c,className:GE.value,type:"text",name:"bound",value:u,title:i?void 0:r.toString(),"aria-labelledby":`${l}-label`,onChange:m=>f(m.target.value),onFocus:()=>{i||o(!0)}}),E.jsx("button",{className:Ll.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:E.jsx(ybe,{})}),E.jsx("button",{className:Ll.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>h(),children:E.jsx(_be,{})})]})});oC.displayName="BoundEditor";const mMe={[rd.MinGreater]:{message:"Min greater than max",fallback:"data range"},[rd.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[rd.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[rd.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function XE(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:s}=mMe[e];return E.jsxs("p",{className:Ll.error,children:[E.jsxs("span",{className:Ll.errorMessage,children:[i,E.jsx("br",{}),E.jsx(vbe,{})," falling back to ",E.jsx("strong",{children:s})]}),n&&r&&E.jsx("button",{className:Ll.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:E.jsx(wbe,{})})]})}const gMe=R.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:s,isAutoMax:o,isEditingMin:a,isEditingMax:l}=t,{onAutoMinToggle:c,onAutoMaxToggle:u,onEditMin:f,onEditMax:h,onChangeMin:m,onChangeMax:y,onSwap:x}=t,{minGreater:v,minError:g,maxError:b}=i,_=R.useRef(null),S=R.useRef(null);return R.useImperativeHandle(e,()=>({cancelEditing:()=>{var C,P;(C=_.current)==null||C.cancel(),(P=S.current)==null||P.cancel()}})),E.jsxs("div",{className:Ll.root,children:[v&&E.jsx(XE,{error:rd.MinGreater,showSwapBtn:!s&&!o,onSwap:x}),E.jsx(oC,{ref:_,bound:"min",value:n[0],isEditing:a,hasError:v||!!g,onEditToggle:f,onChange:m}),g&&E.jsx(XE,{error:g}),E.jsx(oC,{ref:S,bound:"max",value:n[1],isEditing:l,hasError:v||!!b,onEditToggle:h,onChange:y}),b&&E.jsx(XE,{error:b}),E.jsxs("p",{className:Ll.dataRange,children:["Data range"," ",E.jsxs("span",{children:["["," ",E.jsx("abbr",{title:r[0].toString(),children:rD(r[0])})," ",","," ",E.jsx("abbr",{title:r[1].toString(),children:rD(r[1])})," ","]"]})]}),E.jsxs("p",{className:Ll.autoscale,children:["Autoscale"," ",E.jsx(Nc,{label:"Min",raised:!0,value:s,onToggle:c}),E.jsx(Nc,{label:"Max",raised:!0,value:o,onToggle:u})]})]})});gMe.displayName="DomainControls";const yMe="_thumb_be15bc7",vMe="_thumbBtnLike_3744319",xMe="_icon_4b34f14",dv={thumb:yMe,thumbBtnLike:vMe,icon:xMe},bMe=R.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:s,AutoIcon:o,...a}=t;return E.jsx("div",{ref:e,...a,className:dv.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":s||void 0,tabIndex:s?-1:a.tabIndex,"data-auto":r,"data-error":i||void 0,children:E.jsxs("div",{className:dv.thumbBtnLike,children:[r&&E.jsx(o,{className:dv.icon}),!r&&i&&E.jsx(gbe,{className:dv.icon,strokeWidth:"3"})]})})});bMe.displayName="Thumb";function _Me(t){return Array.isArray(t)?t:Object.values(t).flat()}function yD(t){const{activeIndex:e,selectedIndex:n,children:r,getItemProps:i,onSelect:s}=t,{ref:o,index:a}=K1e();return E.jsx("button",{ref:o,className:Ni.btnOption,type:"button",role:"option","aria-selected":a===n||void 0,tabIndex:a===e?0:-1,"data-active":a===e||void 0,...i({onClick:()=>s(a)}),children:r})}const wMe="_label_568c73e",SMe="_groups_6cecc1b",MMe="_groupLabel_b6d0922",qE={label:wMe,groups:SMe,groupLabel:MMe};function EMe(t){const{label:e,value:n,disabled:r,onChange:i,options:s,renderOption:o}=t,{context:a,refs:l,floatingStyles:c}=GSe(),{open:u,onOpenChange:f}=a,h=R.useId(),m=R.useId(),y=R.useId(),x=R.useRef([]),[v,g]=R.useState(null),[b,_]=R.useState(()=>_Me(s).indexOf(n)),{getReferenceProps:S,getFloatingProps:C,getItemProps:P}=vP([gP(a),CP(a),lbe(a,{listRef:x,activeIndex:v,loop:!0,focusItemOnHover:!1,onNavigate:g})]);function A(L,k){_(L),f(!1),i(k)}return E.jsxs(E.Fragment,{children:[e&&E.jsx("span",{id:h,className:qE.label,children:e}),E.jsx("button",{ref:l.setReference,id:m,className:Ni.btn,type:"button",disabled:r,role:"combobox","aria-labelledby":`${e?h:""} ${y}`,"aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u&&a.floatingId||void 0,...S(),children:E.jsxs("span",{id:y,className:Ni.btnLike,children:[o(n),E.jsx(s7,{className:Ni.arrowIcon})]})}),u&&E.jsx("div",{ref:l.setFloating,id:a.floatingId,className:Ni.menu,style:c,role:"listbox","aria-labelledby":m,...C(),children:E.jsx(Y1e,{elementsRef:x,children:Array.isArray(s)?s.map(L=>E.jsx(yD,{activeIndex:v,selectedIndex:b,getItemProps:P,onSelect:k=>A(k,L),children:o(L)},L)):E.jsx("ul",{className:qE.groups,children:Object.entries(s).map(([L,k])=>E.jsxs("li",{children:[E.jsx("span",{className:qE.groupLabel,children:L}),k.map(T=>E.jsx(yD,{activeIndex:v,selectedIndex:b,getItemProps:P,onSelect:N=>A(N,T),children:o(T)},T))]},L))})})})]})}function TMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:E.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function CMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",...t,children:E.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Xt.Linear+"",Xt.Log+"",Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";Gv.Phase+"",Gv.Amplitude+"",Gv.PhaseAmplitude+"";x_e(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function RMe(t){const{api:e,layer:n,x:r,y:i,magFilter:s,onPointerMove:o,...a}=t,l=e.get(n,new Ne(r,i)),[c,u]=l.shape,f=zre(h=>{o==null||o(h,l)},[o],50);return E.jsx("group",{position:[r+u/2,i+c/2,0],children:E.jsx(CSe,{values:l,...a,magFilter:s,size:{width:u,height:c},onPointerMove:o&&f})})}R.memo(RMe);new kr(new H(-1,-1,-1),new H(1,1,1));var k7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vD=Et.createContext&&Et.createContext(k7),AMe=["attr","size","title"];function PMe(t,e){if(t==null)return{};var n=IMe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function IMe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function j1(){return j1=Object.assign?Object.assign.bind():function(t){for(var e=1;eEt.createElement(e.tag,V1({key:n},e.attr),L7(e.child)))}function RP(t){return e=>Et.createElement(OMe,j1({attr:V1({},t.attr)},e),L7(t.child))}function OMe(t){var e=n=>{var{attr:r,size:i,title:s}=t,o=PMe(t,AMe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Et.createElement("svg",j1({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:V1(V1({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Et.createElement("title",null,s),t.children)};return vD!==void 0?Et.createElement(vD.Consumer,null,n=>e(n)):e(k7)}function DMe(t){return RP({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(t)}function FMe(t){return RP({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},child:[]}]})(t)}function zMe(t){return RP({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"},child:[]}]})(t)}var Zt={};const UMe=Object.prototype.toString;function Yo(t){const e=UMe.call(t);return e.endsWith("Array]")&&!e.includes("Big")}const BMe=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Yo},Symbol.toStringTag,{value:"Module"})),jMe=Ko(BMe);function VMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Yo(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,s=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(s<=r||s>t.length||!Number.isInteger(s))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var o=t[r],a=r+1;ao&&(o=t[a]);return o}function $Me(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Yo(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,s=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(s<=r||s>t.length||!Number.isInteger(s))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var o=t[r],a=r+1;a1&&arguments[1]!==void 0?arguments[1]:{};if(Yo(t)){if(t.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var n;if(e.output!==void 0){if(!Yo(e.output))throw new TypeError("output option must be an array if specified");n=e.output}else n=new Array(t.length);var r=$Me(t),i=VMe(t);if(r===i)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var s=e.min,o=s===void 0?e.autoMinMax?r:0:s,a=e.max,l=a===void 0?e.autoMinMax?i:1:a;if(o>=l)throw new RangeError("min option must be smaller than max option");for(var c=(l-o)/(i-r),u=0;u=0&&n?` ${v5(t,e-1)}`:v5(t,e)).padEnd(e)}function v5(t,e){let n=t.toString();if(n.length<=e)return n;let r=t.toFixed(e);if(r.length>e&&(r=t.toFixed(Math.max(0,e-(r.length-e)))),r.length<=e&&!r.startsWith("0.000")&&!r.startsWith("-0.000"))return r;let i=t.toExponential(e);return i.length>e&&(i=t.toExponential(Math.max(0,e-(i.length-e)))),i.slice(0)}function XMe(t,e){t.prototype.add=function(r){return typeof r=="number"?this.addS(r):this.addM(r)},t.prototype.addS=function(r){for(let i=0;i>r);return this},t.prototype.signPropagatingRightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>r.get(i,s));return this},t.signPropagatingRightShift=function(r,i){return new e(r).signPropagatingRightShift(i)},t.prototype.rightShift=function(r){return typeof r=="number"?this.rightShiftS(r):this.rightShiftM(r)},t.prototype.rightShiftS=function(r){for(let i=0;i>>r);return this},t.prototype.rightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>>r.get(i,s));return this},t.rightShift=function(r,i){return new e(r).rightShift(i)},t.prototype.zeroFillRightShift=t.prototype.rightShift,t.prototype.zeroFillRightShiftS=t.prototype.rightShiftS,t.prototype.zeroFillRightShiftM=t.prototype.rightShiftM,t.zeroFillRightShift=t.rightShift,t.prototype.not=function(){for(let r=0;rr)throw new RangeError("Row index out of range")}function Es(t,e,n){let r=n?t.columns:t.columns-1;if(e<0||e>r)throw new RangeError("Column index out of range")}function Of(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.columns)throw new RangeError("vector size must be the same as the number of columns");return e}function Df(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.rows)throw new RangeError("vector size must be the same as the number of rows");return e}function IP(t,e){if(!Pi.isAnyArray(e))throw new TypeError("row indices must be an array");for(let n=0;n=t.rows)throw new RangeError("row indices are out of range")}function NP(t,e){if(!Pi.isAnyArray(e))throw new TypeError("column indices must be an array");for(let n=0;n=t.columns)throw new RangeError("column indices are out of range")}function lC(t,e,n,r,i){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(pv("startRow",e),pv("endRow",n),pv("startColumn",r),pv("endColumn",i),e>n||r>i||e<0||e>=t.rows||n<0||n>=t.rows||r<0||r>=t.columns||i<0||i>=t.columns)throw new RangeError("Submatrix indices are out of range")}function dw(t,e=0){let n=[];for(let r=0;r=s)throw new RangeError("min must be smaller than max");let a=s-i,l=new Je(e,n);for(let c=0;cr?(s=!0,r=n):(i=!1,s=!0);e++}return i}isReducedEchelonForm(){let e=0,n=0,r=-1,i=!0,s=!1;for(;er?(s=!0,r=n):(i=!1,s=!0);for(let o=n+1;oe.get(i,r)&&(i=s);if(e.get(i,r)===0)r++;else{e.swapRows(n,i);let s=e.get(n,r);for(let o=r;o=0;)if(e.maxRow(i)===0)i--;else{let s=0,o=!1;for(;sn[r]&&(n[r]=this.get(r,i));return n}case"column":{const n=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let r=0;rn[i]&&(n[i]=this.get(r,i));return n}case void 0:{let n=this.get(0,0);for(let r=0;rn&&(n=this.get(r,i));return n}default:throw new Error(`invalid option: ${e}`)}}maxIndex(){Rf(this);let e=this.get(0,0),n=[0,0];for(let r=0;re&&(e=this.get(r,i),n[0]=r,n[1]=i);return n}min(e){if(this.isEmpty())return NaN;switch(e){case"row":{const n=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let r=0;rn&&(n=this.get(e,r));return n}maxRowIndex(e){Ms(this,e),Rf(this);let n=this.get(e,0),r=[e,0];for(let i=1;in&&(n=this.get(e,i),r[1]=i);return r}minRow(e){if(Ms(this,e),this.isEmpty())return NaN;let n=this.get(e,0);for(let r=1;rn&&(n=this.get(r,e));return n}maxColumnIndex(e){Es(this,e),Rf(this);let n=this.get(0,e),r=[0,e];for(let i=1;in&&(n=this.get(i,e),r[0]=i);return r}minColumn(e){if(Es(this,e),this.isEmpty())return NaN;let n=this.get(0,e);for(let r=1;r1;i/=2)i&1&&(n=n.mmul(r)),r=r.mmul(r);return n}strassen2x2(e){e=Je.checkMatrix(e);let n=new Je(2,2);const r=this.get(0,0),i=e.get(0,0),s=this.get(0,1),o=e.get(0,1),a=this.get(1,0),l=e.get(1,0),c=this.get(1,1),u=e.get(1,1),f=(r+c)*(i+u),h=(a+c)*i,m=r*(o-u),y=c*(l-i),x=(r+s)*u,v=(a-r)*(i+o),g=(s-c)*(l+u),b=f+y-x+g,_=m+x,S=h+y,C=f-h+m+v;return n.set(0,0,b),n.set(0,1,_),n.set(1,0,S),n.set(1,1,C),n}strassen3x3(e){e=Je.checkMatrix(e);let n=new Je(3,3);const r=this.get(0,0),i=this.get(0,1),s=this.get(0,2),o=this.get(1,0),a=this.get(1,1),l=this.get(1,2),c=this.get(2,0),u=this.get(2,1),f=this.get(2,2),h=e.get(0,0),m=e.get(0,1),y=e.get(0,2),x=e.get(1,0),v=e.get(1,1),g=e.get(1,2),b=e.get(2,0),_=e.get(2,1),S=e.get(2,2),C=(r+i+s-o-a-u-f)*v,P=(r-o)*(-m+v),A=a*(-h+m+x-v-g-b+S),L=(-r+o+a)*(h-m+v),k=(o+a)*(-h+m),T=r*h,N=(-r+c+u)*(h-y+g),z=(-r+c)*(y-g),D=(c+u)*(-h+y),B=(r+i+s-a-l-c-u)*g,G=u*(-h+y+x-v-g-b+_),X=(-s+u+f)*(v+b-_),Z=(s-f)*(v-_),F=s*b,q=(u+f)*(-b+_),K=(-s+a+l)*(g+b-S),Q=(s-l)*(g-S),he=(a+l)*(-b+S),fe=i*x,J=l*_,de=o*y,be=c*m,_e=f*S,He=T+F+fe,at=C+L+k+T+X+F+q,Ve=T+N+D+B+F+K+he,$e=P+A+L+T+F+K+Q,ae=P+L+k+T+J,oe=F+K+Q+he+de,V=T+N+z+G+X+Z+F,Ie=X+Z+F+q+be,Re=T+N+z+D+_e;return n.set(0,0,He),n.set(0,1,at),n.set(0,2,Ve),n.set(1,0,$e),n.set(1,1,ae),n.set(1,2,oe),n.set(2,0,V),n.set(2,1,Ie),n.set(2,2,Re),n}mmulStrassen(e){e=Je.checkMatrix(e);let n=this.clone(),r=n.rows,i=n.columns,s=e.rows,o=e.columns;i!==s&&console.warn(`Multiplying ${r} x ${i} and ${s} x ${o} matrix: dimensions do not match.`);function a(f,h,m){let y=f.rows,x=f.columns;if(y===h&&x===m)return f;{let v=Ft.zeros(h,m);return v=v.setSubMatrix(f,0,0),v}}let l=Math.max(r,s),c=Math.max(i,o);n=a(n,l,c),e=a(e,l,c);function u(f,h,m,y){if(m<=512||y<=512)return f.mmul(h);m%2===1&&y%2===1?(f=a(f,m+1,y+1),h=a(h,m+1,y+1)):m%2===1?(f=a(f,m+1,y),h=a(h,m+1,y)):y%2===1&&(f=a(f,m,y+1),h=a(h,m,y+1));let x=parseInt(f.rows/2,10),v=parseInt(f.columns/2,10),g=f.subMatrix(0,x-1,0,v-1),b=h.subMatrix(0,x-1,0,v-1),_=f.subMatrix(0,x-1,v,f.columns-1),S=h.subMatrix(0,x-1,v,h.columns-1),C=f.subMatrix(x,f.rows-1,0,v-1),P=h.subMatrix(x,h.rows-1,0,v-1),A=f.subMatrix(x,f.rows-1,v,f.columns-1),L=h.subMatrix(x,h.rows-1,v,h.columns-1),k=u(Ft.add(g,A),Ft.add(b,L),x,v),T=u(Ft.add(C,A),b,x,v),N=u(g,Ft.sub(S,L),x,v),z=u(A,Ft.sub(P,b),x,v),D=u(Ft.add(g,_),L,x,v),B=u(Ft.sub(C,g),Ft.add(b,S),x,v),G=u(Ft.sub(_,A),Ft.add(P,L),x,v),X=Ft.add(k,z);X.sub(D),X.add(G);let Z=Ft.add(N,D),F=Ft.add(T,z),q=Ft.sub(k,T);q.add(N),q.add(B);let K=Ft.zeros(2*X.rows,2*X.columns);return K=K.setSubMatrix(X,0,0),K=K.setSubMatrix(Z,X.rows,0),K=K.setSubMatrix(F,0,X.columns),K=K.setSubMatrix(q,X.rows,X.columns),K.subMatrix(0,m-1,0,y-1)}return u(n,e,l,c)}scaleRows(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Je(this.rows,this.columns);for(let s=0;s0&&y5(o,{min:n,max:r,output:o}),i.setRow(s,o)}return i}scaleColumns(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Je(this.rows,this.columns);for(let s=0;sr||n<0||n>=this.columns||r<0||r>=this.columns)throw new RangeError("Argument out of range");let i=new Je(e.length,r-n+1);for(let s=0;s=this.rows)throw new RangeError(`Row index out of range: ${e[s]}`);i.set(s,o-n,this.get(e[s],o))}return i}subMatrixColumn(e,n,r){if(n===void 0&&(n=0),r===void 0&&(r=this.rows-1),n>r||n<0||n>=this.rows||r<0||r>=this.rows)throw new RangeError("Argument out of range");let i=new Je(r-n+1,e.length);for(let s=0;s=this.columns)throw new RangeError(`Column index out of range: ${e[s]}`);i.set(o-n,s,this.get(o,e[s]))}return i}setSubMatrix(e,n,r){if(e=Je.checkMatrix(e),e.isEmpty())return this;let i=n+e.rows-1,s=r+e.columns-1;lC(this,n,i,r,s);for(let o=0;otypeof e=="number")}Ft.random=Ft.rand;Ft.randomInt=Ft.randInt;Ft.diagonal=Ft.diag;Ft.prototype.diagonal=Ft.prototype.diag;Ft.identity=Ft.eye;Ft.prototype.negate=Ft.prototype.neg;Ft.prototype.tensorProduct=Ft.prototype.kroneckerProduct;var Qm,cC,iu;let Je=(iu=class extends Ft{constructor(n,r){super();ES(this,Qm);Wt(this,"data");if(iu.isMatrix(n))TS(this,Qm,cC).call(this,n.rows,n.columns),iu.copy(n,this);else if(Number.isInteger(n)&&n>=0)TS(this,Qm,cC).call(this,n,r);else if(Pi.isAnyArray(n)){const i=n;if(n=i.length,r=n?i[0].length:0,typeof r!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let s=0;s"u"&&(r=n,n=this.columns),Es(this,n,!0),r=Df(this,r);for(let i=0;i=0)for(let i=0;i=0)D0(this,Gr,new Je(n,n));else if(D0(this,Gr,new Je(n)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return Gs(this,Gr).size}get rows(){return Gs(this,Gr).rows}get columns(){return Gs(this,Gr).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(n){return Je.isMatrix(n)&&n.klassType==="SymmetricMatrix"}static zeros(n){return new this(n)}static ones(n){return new this(n).fill(1)}clone(){const n=new W1(this.diagonalSize);for(const[r,i,s]of this.upperRightEntries())n.set(r,i,s);return n}toMatrix(){return new Je(this)}get(n,r){return Gs(this,Gr).get(n,r)}set(n,r,i){return Gs(this,Gr).set(n,r,i),Gs(this,Gr).set(r,n,i),this}removeCross(n){return Gs(this,Gr).removeRow(n),Gs(this,Gr).removeColumn(n),this}addCross(n,r){r===void 0&&(r=n,n=this.diagonalSize);const i=r.slice();return i.splice(n,1),Gs(this,Gr).addRow(n,i),Gs(this,Gr).addColumn(n,r),this}applyMask(n){if(n.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const r=[];for(const[i,s]of n.entries())s||r.push(i);r.reverse();for(const i of r)this.removeCross(i);return this}toCompact(){const{diagonalSize:n}=this,r=new Array(n*(n+1)/2);for(let i=0,s=0,o=0;o=n&&(i=++s);return r}static fromCompact(n){const r=n.length,i=(Math.sqrt(8*r+1)-1)/2;if(!Number.isInteger(i))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(n)}`);const s=new W1(i);for(let o=0,a=0,l=0;l=i&&(o=++a);return s}*upperRightEntries(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}}*upperRightValues(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}};Gr=new WeakMap;let ru=W1;ru.prototype.klassType="SymmetricMatrix";class hw extends ru{static isDistanceMatrix(e){return ru.isSymmetricMatrix(e)&&e.klassSubType==="DistanceMatrix"}constructor(e){if(super(e),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(e,n,r){return e===n&&(r=0),super.set(e,n,r)}addCross(e,n){return n===void 0&&(n=e,e=this.diagonalSize),n=n.slice(),n[e]=0,super.addCross(e,n)}toSymmetricMatrix(){return new ru(this)}clone(){const e=new hw(this.diagonalSize);for(const[n,r,i]of this.upperRightEntries())n!==r&&e.set(n,r,i);return e}toCompact(){const{diagonalSize:e}=this,n=(e-1)*e/2,r=new Array(n);for(let i=1,s=0,o=0;o=e&&(i=++s+1);return r}static fromCompact(e){const n=e.length;if(n===0)return new this(0);const r=(Math.sqrt(8*n+1)+1)/2;if(!Number.isInteger(r))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(e)}`);const i=new this(r);for(let s=1,o=0,a=0;a=r&&(s=++o+1);return i}}hw.prototype.klassSubType="DistanceMatrix";class Ha extends Ft{constructor(e,n,r){super(),this.matrix=e,this.rows=n,this.columns=r}}class hEe extends Ha{constructor(e,n){Es(e,n),super(e,e.rows,1),this.column=n}set(e,n,r){return this.matrix.set(e,this.column,r),this}get(e){return this.matrix.get(e,this.column)}}class pEe extends Ha{constructor(e,n){NP(e,n),super(e,e.rows,n.length),this.columnIndices=n}set(e,n,r){return this.matrix.set(e,this.columnIndices[n],r),this}get(e,n){return this.matrix.get(e,this.columnIndices[n])}}class mEe extends Ha{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(e,this.columns-n-1,r),this}get(e,n){return this.matrix.get(e,this.columns-n-1)}}class gEe extends Ha{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(this.rows-e-1,n,r),this}get(e,n){return this.matrix.get(this.rows-e-1,n)}}class yEe extends Ha{constructor(e,n){Ms(e,n),super(e,1,e.columns),this.row=n}set(e,n,r){return this.matrix.set(this.row,n,r),this}get(e,n){return this.matrix.get(this.row,n)}}class vEe extends Ha{constructor(e,n){IP(e,n),super(e,n.length,e.columns),this.rowIndices=n}set(e,n,r){return this.matrix.set(this.rowIndices[e],n,r),this}get(e,n){return this.matrix.get(this.rowIndices[e],n)}}class qv extends Ha{constructor(e,n,r){IP(e,n),NP(e,r),super(e,n.length,r.length),this.rowIndices=n,this.columnIndices=r}set(e,n,r){return this.matrix.set(this.rowIndices[e],this.columnIndices[n],r),this}get(e,n){return this.matrix.get(this.rowIndices[e],this.columnIndices[n])}}class xEe extends Ha{constructor(e,n,r,i,s){lC(e,n,r,i,s),super(e,r-n+1,s-i+1),this.startRow=n,this.startColumn=i}set(e,n,r){return this.matrix.set(this.startRow+e,this.startColumn+n,r),this}get(e,n){return this.matrix.get(this.startRow+e,this.startColumn+n)}}let bEe=class extends Ha{constructor(e){super(e,e.columns,e.rows)}set(e,n,r){return this.matrix.set(n,e,r),this}get(e,n){return this.matrix.get(n,e)}};class k7 extends Ft{constructor(e,n={}){const{rows:r=1}=n;if(e.length%r!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=r,this.columns=e.length/r,this.data=e}set(e,n,r){let i=this._calculateIndex(e,n);return this.data[i]=r,this}get(e,n){let r=this._calculateIndex(e,n);return this.data[r]}_calculateIndex(e,n){return e*this.columns+n}}class fs extends Ft{constructor(e){super(),this.data=e,this.rows=e.length,this.columns=e[0].length}set(e,n,r){return this.data[e][n]=r,this}get(e,n){return this.data[e][n]}}function _Ee(t,e){if(Pi.isAnyArray(t))return t[0]&&Pi.isAnyArray(t[0])?new fs(t):new k7(t,e);throw new Error("the argument is not an array")}class pw{constructor(e){e=fs.checkMatrix(e);let n=e.clone(),r=n.rows,i=n.columns,s=new Float64Array(r),o=1,a,l,c,u,f,h,m,y,x;for(a=0;aMath.abs(y[u])&&(u=a);if(u!==l){for(c=0;c=0;c--){for(l=0;lo?i.set(s,o,e.get(s,o)):s===o?i.set(s,o,1):i.set(s,o,0);return i}get upperTriangularMatrix(){let e=this.LU,n=e.rows,r=e.columns,i=new Je(n,r);for(let s=0;sMath.abs(e)?(n=e/t,Math.abs(t)*Math.sqrt(1+n*n)):e!==0?(n=t/e,Math.abs(e)*Math.sqrt(1+n*n)):0}class kP{constructor(e){e=fs.checkMatrix(e);let n=e.clone(),r=e.rows,i=e.columns,s=new Float64Array(i),o,a,l,c;for(l=0;l=0;c--){for(l=0;l=0;a--){for(s=0;s=0;T--)if(y[T]!==0){for(let N=T+1;N=0;T--){if(T0;){let T,N;for(T=A-2;T>=-1&&T!==-1;T--){const z=Number.MIN_VALUE+k*Math.abs(y[T]+Math.abs(y[T+1]));if(Math.abs(g[T])<=z||Number.isNaN(g[T])){g[T]=0;break}}if(T===A-2)N=4;else{let z;for(z=A-1;z>=T&&z!==T;z--){let D=(z!==A?Math.abs(g[z]):0)+(z!==T+1?Math.abs(g[z-1]):0);if(Math.abs(y[z])<=k*D){y[z]=0;break}}z===T?N=3:z===A-1?N=1:(N=2,T=z)}switch(T++,N){case 1:{let z=g[A-2];g[A-2]=0;for(let D=A-2;D>=T;D--){let B=ya(y[D],z),G=y[D]/B,X=z/B;if(y[D]=B,D!==T&&(z=-X*g[D-1],g[D-1]=G*g[D-1]),c)for(let Z=0;Z=y[T+1]);){let z=y[T];if(y[T]=y[T+1],y[T+1]=z,c&&Tn&&s.set(u,f,e.get(u,f)/this.s[f]);let o=this.U,a=o.rows,l=o.columns,c=new Je(r,a);for(let u=0;ue&&n++;return n}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return Je.diag(this.s)}}function wEe(t,e=!1){return t=fs.checkMatrix(t),e?new ph(t).inverse():L7(t,Je.eye(t.rows))}function L7(t,e,n=!1){return t=fs.checkMatrix(t),e=fs.checkMatrix(e),n?new ph(t).solve(e):t.isSquare()?new pw(t).solve(e):new kP(t).solve(e)}function Yv(t){if(t=Je.checkMatrix(t),t.isSquare()){if(t.columns===0)return 1;let e,n,r,i;if(t.columns===2)return e=t.get(0,0),n=t.get(0,1),r=t.get(1,0),i=t.get(1,1),e*i-n*r;if(t.columns===3){let s,o,a;return s=new qv(t,[1,2],[1,2]),o=new qv(t,[1,2],[0,2]),a=new qv(t,[1,2],[0,1]),e=t.get(0,0),n=t.get(0,1),r=t.get(0,2),e*Yv(s)-n*Yv(o)+r*Yv(a)}else return new pw(t).determinant}else throw Error("determinant can only be calculated for a square matrix")}function SEe(t,e){let n=[];for(let r=0;ri)return new Array(e.rows+1).fill(0);{let s=e.addRow(n,[0]);for(let o=0;oe?s[o]=1/s[o]:s[o]=0;return i.mmul(Je.diag(s).mmul(r.transpose()))}function CEe(t,e=t,n={}){t=new Je(t);let r=!1;if(typeof e=="object"&&!Je.isMatrix(e)&&!Pi.isAnyArray(e)?(n=e,e=t,r=!0):e=new Je(e),t.rows!==e.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:i=!0}=n;i&&(t=t.center("column"),r||(e=e.center("column")));const s=t.transpose().mmul(e);for(let o=0;o0?i.set(s,s+1,n[s]):n[s]<0&&i.set(s,s-1,n[s])}return i}}function AEe(t,e,n,r){let i,s,o,a,l,c,u,f;for(l=0;l0;a--){for(f=0,o=0,c=0;c0&&(s=-s),e[a]=f*s,o=o-i*s,n[a-1]=i-s,l=0;lc)do{for(i=n[c],f=(n[c+1]-i)/(2*e[c]),h=ya(f,1),f<0&&(h=-h),n[c]=e[c]/(f+h),n[c+1]=e[c]*(f+h),m=n[c+1],s=i-n[c],o=c+2;o=c;o--)for(v=x,x=y,_=b,i=y*e[o],s=y*f,h=ya(f,e[o]),e[o+1]=b*h,b=e[o]/h,y=f/h,f=y*n[o]-b*i,n[o+1]=s+b*(y*i+b*n[o]),l=0;lP*C);n[c]=n[c]+S,e[c]=0}for(o=0;o=f;c--)n[c]=e.get(c,f-1)/h,l+=n[c]*n[c];for(a=Math.sqrt(l),n[f]>0&&(a=-a),l=l-n[f]*a,n[f]=n[f]-a,u=f;u=f;c--)o+=n[c]*e.get(c,u);for(o=o/l,c=f;c<=s;c++)e.set(c,u,e.get(c,u)-o*n[c])}for(c=0;c<=s;c++){for(o=0,u=s;u>=f;u--)o+=n[u]*e.get(c,u);for(o=o/l,u=f;u<=s;u++)e.set(c,u,e.get(c,u)-o*n[u])}n[f]=h*n[f],e.set(f,f-1,h*a)}}for(c=0;c=i+1;f--)if(e.get(f,f-1)!==0){for(c=f+1;c<=s;c++)n[c]=e.get(c,f-1);for(u=f;u<=s;u++){for(a=0,c=f;c<=s;c++)a+=n[c]*r.get(c,u);for(a=a/n[f]/e.get(f,f-1),c=f;c<=s;c++)r.set(c,u,r.get(c,u)+a*n[c])}}}function NEe(t,e,n,r,i){let s=t-1,o=0,a=t-1,l=Number.EPSILON,c=0,u=0,f=0,h=0,m=0,y=0,x=0,v=0,g,b,_,S,C,P,A,L,k,T,N,z,D,B,G;for(g=0;ga)&&(n[g]=i.get(g,g),e[g]=0),b=Math.max(g-1,0);b=o;){for(S=s;S>o&&(y=Math.abs(i.get(S-1,S-1))+Math.abs(i.get(S,S)),y===0&&(y=u),!(Math.abs(i.get(S,S-1))=0){for(x=f>=0?f+x:f-x,n[s-1]=L+x,n[s]=n[s-1],x!==0&&(n[s]=L-A/x),e[s-1]=0,e[s]=0,L=i.get(s,s-1),y=Math.abs(L)+Math.abs(x),f=L/y,h=x/y,m=Math.sqrt(f*f+h*h),f=f/m,h=h/m,b=s-1;b0)){for(y=Math.sqrt(y),k=S&&(x=i.get(C,C),m=L-x,y=k-x,f=(m*y-A)/i.get(C+1,C)+i.get(C,C+1),h=i.get(C+1,C+1)-x-m-y,m=i.get(C+2,C+1),y=Math.abs(f)+Math.abs(h)+Math.abs(m),f=f/y,h=h/y,m=m/y,!(C===S||Math.abs(i.get(C,C-1))*(Math.abs(h)+Math.abs(m))C+2&&i.set(g,g-3,0);for(_=C;_<=s-1&&(B=_!==s-1,_!==C&&(f=i.get(_,_-1),h=i.get(_+1,_-1),m=B?i.get(_+2,_-1):0,L=Math.abs(f)+Math.abs(h)+Math.abs(m),L!==0&&(f=f/L,h=h/L,m=m/L)),L!==0);_++)if(y=Math.sqrt(f*f+h*h+m*m),f<0&&(y=-y),y!==0){for(_!==C?i.set(_,_-1,-y*L):S!==C&&i.set(_,_-1,-i.get(_,_-1)),f=f+y,L=f/y,k=h/y,x=m/y,h=h/f,m=m/f,b=_;b=0;s--)if(f=n[s],h=e[s],h===0)for(S=s,i.set(s,s,1),g=s-1;g>=0;g--){for(A=i.get(g,g)-f,m=0,b=S;b<=s;b++)m=m+i.get(g,b)*i.get(b,s);if(e[g]<0)x=A,y=m;else if(S=g,e[g]===0?i.set(g,s,A!==0?-m/A:-m/(l*u)):(L=i.get(g,g+1),k=i.get(g+1,g),h=(n[g]-f)*(n[g]-f)+e[g]*e[g],P=(L*y-x*m)/h,i.set(g,s,P),i.set(g+1,s,Math.abs(L)>Math.abs(x)?(-m-A*P)/L:(-y-k*P)/x)),P=Math.abs(i.get(g,s)),l*P*P>1)for(b=g;b<=s;b++)i.set(b,s,i.get(b,s)/P)}else if(h<0)for(S=s-1,Math.abs(i.get(s,s-1))>Math.abs(i.get(s-1,s))?(i.set(s-1,s-1,h/i.get(s,s-1)),i.set(s-1,s,-(i.get(s,s)-f)/i.get(s,s-1))):(G=mv(0,-i.get(s-1,s),i.get(s-1,s-1)-f,h),i.set(s-1,s-1,G[0]),i.set(s-1,s,G[1])),i.set(s,s-1,0),i.set(s,s,1),g=s-2;g>=0;g--){for(T=0,N=0,b=S;b<=s;b++)T=T+i.get(g,b)*i.get(b,s-1),N=N+i.get(g,b)*i.get(b,s);if(A=i.get(g,g)-f,e[g]<0)x=A,m=T,y=N;else if(S=g,e[g]===0?(G=mv(-T,-N,A,h),i.set(g,s-1,G[0]),i.set(g,s,G[1])):(L=i.get(g,g+1),k=i.get(g+1,g),z=(n[g]-f)*(n[g]-f)+e[g]*e[g]-h*h,D=(n[g]-f)*2*h,z===0&&D===0&&(z=l*u*(Math.abs(A)+Math.abs(h)+Math.abs(L)+Math.abs(k)+Math.abs(x))),G=mv(L*m-x*T+h*N,L*y-x*N-h*T,z,D),i.set(g,s-1,G[0]),i.set(g,s,G[1]),Math.abs(L)>Math.abs(x)+Math.abs(h)?(i.set(g+1,s-1,(-T-A*i.get(g,s-1)+h*i.get(g,s))/L),i.set(g+1,s,(-N-A*i.get(g,s)-h*i.get(g,s-1))/L)):(G=mv(-m-k*i.get(g,s-1),-y-k*i.get(g,s),x,h),i.set(g+1,s-1,G[0]),i.set(g+1,s,G[1]))),P=Math.max(Math.abs(i.get(g,s-1)),Math.abs(i.get(g,s))),l*P*P>1)for(b=g;b<=s;b++)i.set(b,s-1,i.get(b,s-1)/P),i.set(b,s,i.get(b,s)/P)}for(g=0;ga)for(b=g;b=o;b--)for(g=o;g<=a;g++){for(x=0,_=o;_<=Math.min(b,a);_++)x=x+r.get(g,_)*i.get(_,b);r.set(g,b,x)}}}function mv(t,e,n,r){let i,s;return Math.abs(n)>Math.abs(r)?(i=r/n,s=n+i*r,[(t+i*e)/s,(e-i*t)/s]):(i=n/r,s=r+i*n,[(i*t+e)/s,(i*e-t)/s])}class D7{constructor(e){if(e=fs.checkMatrix(e),!e.isSymmetric())throw new Error("Matrix is not symmetric");let n=e,r=n.rows,i=new Je(r,r),s=!0,o,a,l;for(a=0;a0),i.set(a,a,Math.sqrt(Math.max(c,0))),l=a+1;l=0;l--)for(a=0;ao;m++)f=e.transpose().mmul(a).div(a.transpose().mmul(a).get(0,0)),f=f.div(f.norm()),c=e.mmul(f).div(f.transpose().mmul(f).get(0,0)),m>0&&(l=c.clone().sub(h).pow(2).sum()),h=c.clone(),r?(u=r.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),u=u.div(u.norm()),a=r.mmul(u).div(u.transpose().mmul(u).get(0,0))):a=c;if(r){let m=e.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0));m=m.div(m.norm());let y=e.clone().sub(c.clone().mmul(m.transpose())),x=a.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),v=r.clone().sub(c.clone().mulS(x.get(0,0)).mmul(u.transpose()));this.t=c,this.p=m.transpose(),this.w=f.transpose(),this.q=u,this.u=a,this.s=c.transpose().mmul(c),this.xResidual=y,this.yResidual=v,this.betas=x}else this.w=f.transpose(),this.s=c.transpose().mmul(c).sqrt(),i?this.t=c.clone().div(this.s.get(0,0)):this.t=c,this.xResidual=e.sub(c.mmul(f.transpose()))}}Zt.AbstractMatrix=Ft;Zt.CHO=D7;Zt.CholeskyDecomposition=D7;Zt.DistanceMatrix=hw;Zt.EVD=O7;Zt.EigenvalueDecomposition=O7;Zt.LU=pw;Zt.LuDecomposition=pw;var z7=Zt.Matrix=Je;Zt.MatrixColumnSelectionView=pEe;Zt.MatrixColumnView=hEe;Zt.MatrixFlipColumnView=mEe;Zt.MatrixFlipRowView=gEe;Zt.MatrixRowSelectionView=vEe;Zt.MatrixRowView=yEe;Zt.MatrixSelectionView=qv;Zt.MatrixSubView=xEe;var kEe=Zt.MatrixTransposeView=bEe;Zt.NIPALS=F7;Zt.Nipals=F7;Zt.QR=kP;Zt.QrDecomposition=kP;Zt.SVD=ph;Zt.SingularValueDecomposition=ph;Zt.SymmetricMatrix=ru;Zt.WrapperMatrix1D=k7;Zt.WrapperMatrix2D=fs;Zt.correlation=REe;Zt.covariance=CEe;var b5=Zt.default=Je;Zt.determinant=Yv;Zt.inverse=wEe;Zt.linearDependencies=EEe;Zt.pseudoInverse=TEe;var LEe=Zt.solve=L7;Zt.wrap=_Ee;const _5=z7,w5=kEe;b5.Matrix&&b5.Matrix;const OEe=LEe;function U7(t,e){if(!Yo(t)||!Yo(e))throw new TypeError("x and y must be arrays");if(t.length!==e.length)throw new RangeError("x and y arrays must have the same length")}class LP{constructor(){if(new.target===LP)throw new Error("BaseRegression must be subclassed")}predict(e){if(typeof e=="number")return this._predict(e);if(Yo(e)){const n=[];for(const r of e)n.push(this._predict(r));return n}else throw new TypeError("x must be a number or array")}_predict(e){throw new Error("_predict must be implemented")}train(){}toString(e){return""}toLaTeX(e){return""}score(e,n){U7(e,n);const r=e.length,i=new Array(r);for(let m=0;m0&&l!==this.coefficients.length-1?a=` + ${a}`:l!==this.coefficients.length-1&&(a=` ${a}`)),o=a+o;return o.startsWith("+")&&(o=o.slice(1)),`f(x) = ${o}`}static load(e){if(e.name!=="polynomialRegression")throw new TypeError("not a polynomial regression model");return new $1(!0,e)}}function DEe(t,e,n,r={}){const i=t.length;let{interceptAtZero:s=!1}=r,o=[];if(Array.isArray(n))o=n,s=!1;else if(typeof n=="number")if(s){o=new Array(n);for(let m=0;m"u")throw new TypeError("X must be defined");if(r>t.length)throw new RangeError(`Window size is higher than the data length ${r}>${t.length}`);if(i<0||!Number.isInteger(i))throw new RangeError("Derivative should be a positive integer");if(s<1||!Number.isInteger(s))throw new RangeError("Polynomial should be a positive integer");s>=6&&console.warn("You should not use polynomial grade higher than 5 if you are not sure that your data arises from such a model. Possible polynomial oscillation problems");const o=Math.floor(r/2),a=t.length,l=new Float64Array(a),c=UEe(r,s,i);let u=0,f=!0;Yo(e)?f=!1:u=e**i;for(let m=0;m=0&&o0?i=(4*n-2)/(n*(2*e-n+1))*(t*Zp(t,e,n-1,r)+r*Zp(t,e,n-1,r-1))-(n-1)*(2*e+n)/(n*(2*e-n+1))*Zp(t,e,n-2,r):n===0&&r===0?i=1:i=0,i}function S5(t,e){let n=1;if(t>=e)for(let r=t-e+1;r<=t;r++)n*=r;return n}function zEe(t,e,n,r,i){let s=0;for(let o=0;o<=r;o++)s+=(2*o+1)*(S5(2*n,o)/S5(2*n+o+1,o+1))*Zp(t,n,o,0)*Zp(e,n,o,i);return s}function UEe(t,e,n){const r=new Array(t),i=Math.floor(t/2);for(let s=-i;s<=i;s++){r[s+i]=new Float64Array(t);for(let o=-i;o<=i;o++)r[s+i][o+i]=zEe(o,s,i,e,n)}return r}function gv(t,e){let n=1/0,r=0;for(let i=0;ie&&(e=t[r],n=r);return n}function jEe(t,e){const n=FEe(e,t,{windowSize:9,derivative:1,polynomial:3}),r=BEe(n),i=t[r];let s=5;r<20&&(s=2);const o=s*Math.round((t[1]-i)/s),a=.5*o,l=gv(t,o+i),c=gv(t,a+i),u=e.slice(l,c),f=t.slice(l,c),h=new $1(f,u,1),m=e.map((P,A)=>P-h.predict(t[A])),y=5*Math.round((t[t.length-1]-i)/5),x=5*Math.round(y/15),v=2,g=gv(t,x+i),b=gv(t,y+i),_=new $1(t.slice(g,b),m.slice(g,b),v),S=_.predict(i);for(let P=r;PP/S),[m.length])}function ZE(t,e,n,r,i){const s=t[e],o=t.energy,a=n?jEe(o,s):f6(s,[s.length]);return{x:o,y:a,label:r+":"+e,color:i}}function M5(t,e,n,r,i,s){const o=!e&&!n&&!r,a=[];return o||t==null||(r&&t.murefer&&a.push(ZE(t,"murefer",i,t.id,s[2])),n&&t.mufluor&&a.push(ZE(t,"mufluor",i,t.id,s[1])),e&&t.mutrans&&a.push(ZE(t,"mutrans",i,t.id,s[0]))),a}function VEe(t,e){return E.jsx(cSe,{abscissas:t.x,ordinates:t.y.data,curveType:e,color:t.color},t.label)}function $Ee(t){var T,N,z,D;const[e,n]=R.useState({showTrans:!1,showFluor:!1,showRefer:!1});R.useEffect(()=>{var B,G,X;n({showTrans:((B=t.xasData)==null?void 0:B.mutrans)!=null,showFluor:((G=t.xasData)==null?void 0:G.mufluor)!=null,showRefer:((X=t.xasData)==null?void 0:X.murefer)!=null})},[t.xasData]);const r=Object.values(Kp),[i,s]=R.useState(!0),[o,a]=R.useState(!0),[l,c]=R.useState(r[0]),u=Su(),{showTrans:f,showFluor:h,showRefer:m}=e,y=[((T=t.xasData)==null?void 0:T.mutrans)!=null,((N=t.xasData)==null?void 0:N.mufluor)!=null,((z=t.xasData)==null?void 0:z.murefer)!=null],x=(B,G)=>E.jsxs("p",{children:[B.toPrecision(8),", ",G.toPrecision(8)]}),v=M5(t.xasData,f,h,m,o,[sM(u.palette.primary.dark,.3),sM(u.palette.success.light,.3),sM(u.palette.secondary.dark,.3)]),b=t.comparisonFiles.filter(B=>{var G;return B.id!=((G=t.xasData)==null?void 0:G.id)}).map((B,G)=>M5(B,f,h,m,o,[oM(u.palette.primary.dark,G*.3),oM(u.palette.success.light,G*.3),oM(u.palette.secondary.dark,G*.3)])).flat();v.push(...b);const _=s5(v.map(B=>r5(B.y))),C={visDomain:s5(v.map(B=>r5(B.x)))??[0,1],showGrid:!0,isIndexAxis:!1,label:"Energy (eV)"},P={visDomain:_??[0,1],showGrid:!0,isIndexAxis:!1,label:o?"mu(E) (norm)":"mu(E)"},A=u.palette.action.hover,L={"--h5w-toolbar--bgColor":u.palette.action.hover,"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":"black","--h5w-toolbar-label--color":u.palette.primary.dark,"--h5w-btn-hover--bgColor":u.palette.action.hover,"--h5w-btnPressed--bgColor":u.palette.action.selected,"--h5w-selector-menu--bgColor":u.palette.background.default,"--h5w-selector-option-selected--bgColor":u.palette.action.selected},k={"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":u.palette.text.secondary,"--h5w-axisLabels--color":u.palette.text.primary,"--h5w-line--color":u.palette.primary.dark,"--h5w-tooltip--bgColor":u.palette.action.hover,"--h5w-tooltip--color":u.palette.text.primary,"--h5w-line--colorAux":[u.palette.success.light,u.palette.secondary.dark]};return E.jsxs(Mu,{sx:{height:"100%",display:"flex",flexDirection:"column",backgroundColor:B=>B.palette.background.default,fontFamily:B=>B.typography.fontFamily},children:[E.jsx(Go,{style:L,children:E.jsxs(tMe,{children:[E.jsx(Nc,{label:"Normalize",value:o,onToggle:()=>{a(!o)}}),E.jsx(nu,{}),E.jsx(Nc,{label:"Transmission",value:f,onToggle:()=>{n({...e,showTrans:!f})},disabled:!y[0]}),E.jsx(Nc,{label:"Fluorescence",value:h,onToggle:()=>{n({...e,showFluor:!h})},disabled:!y[1]}),E.jsx(Nc,{label:"Reference",value:m,onToggle:()=>{n({...e,showRefer:!m})},disabled:!y[2]}),E.jsx(nu,{}),E.jsx(wMe,{label:"Line Style",onChange:B=>{c(B)},options:r,value:l,renderOption:B=>E.jsx("div",{children:E.jsx("span",{children:String(B)})})}),E.jsx(nu,{}),E.jsx(Nc,{label:"Grid",icon:OMe,value:i,onToggle:()=>s(!i)})]})}),E.jsx(Go,{style:k,flex:1,display:"flex",children:E.jsxs(qwe,{title:((D=t.xasData)==null?void 0:D.id)??" ",abscissaConfig:C,ordinateConfig:P,children:[v.map(B=>VEe(B,l)),E.jsx(Rwe,{renderTooltip:x}),E.jsx(fwe,{}),E.jsx(Swe,{}),E.jsx(T7,{children:E.jsx("div",{style:{color:u.palette.text.primary,position:"absolute",maxWidth:"35%",minWidth:"15em",padding:"0 1rem",bottom:"2.5rem",right:"0px",background:A},children:v.reverse().map(B=>E.jsxs("div",{children:[E.jsx("span",{style:{color:B.color},children:" ■"}),E.jsx("span",{children:" "+B.label})]},B.label))})})]})})]})}function OP(){const t=R.useContext(pg);let e=null,n=[];if(t.xdiFile!=null){const r=t.xdiFile,i=r.energy(),s=r.muTrans(),o=r.muFluor(),a=r.muRefer();e={id:r.id,energy:i,mutrans:s,mufluor:o,murefer:a},n=t.comparisonFiles.map(l=>({id:l.id,energy:l.energy(),mutrans:l.muTrans(),mufluor:l.muFluor(),murefer:l.muRefer()}))}return E.jsx($Ee,{xasData:e,comparisonFiles:n})}function WEe(){const[t,e]=R.useState(null),[n,r]=R.useState([]),i=R.useContext(YR);function s(){return a=>{Fn.get("/webxdiviewer/xdidata/"+a).then(l=>{const c=Ad.parseFile(l.data,a);e(c)})}}const o=s();return E.jsx(XR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:n,setComparisonFiles:r},children:E.jsxs(Ca,{height:"100%",container:!0,children:[E.jsx(Ca,{item:!0,lg:5,md:12,padding:1,children:E.jsx(Cre,{standards:i,updatePlot:o})}),E.jsx(Ca,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(OP,{})})]})})}const HEe="NSLS-II-BMM/bmm-standards";function GEe(){const t=HEe;return E.jsxs(eJ,{maxWidth:"md",sx:{alignSelf:"center",p:"24px"},children:[E.jsx(ar,{variant:"h4",padding:"24px",children:"Welcome to the XAS Data Viewer!"}),E.jsxs(Go,{children:[E.jsxs(ar,{paragraph:!0,children:["A prototype viewer for"," ",E.jsx(Uv,{to:"https://docs.xrayabsorption.org/xaslib/xdi.html",children:"XDI files"})," ","stored in a github repository. As part of the website build process, the XDI files are pulled in and indexed, giving simple static website to display open data. The website is currently pointing as a fork of the data in"," ",E.jsx(Uv,{to:"https://github.com/"+t,children:t}),"."]}),E.jsxs(ar,{paragraph:!0,children:["The database is open to ",E.jsx(Uv,{to:"view",children:" search and download "}),"."]})]})]})}function XEe(){return E.jsx(Ex,{fontSize:"large",children:E.jsx("svg",{"xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",width:"128mm",height:"128mm",stroke:"currentColor",strokeWidth:"10",fill:"currentColor",fillOpacity:0,viewBox:"0 0 128 128",version:"1.1",id:"svg8","inkscape:version":"1.0.2 (e86c870879, 2021-01-15)","sodipodi:docname":"xas.svg",children:E.jsxs("g",{children:[E.jsx("ellipse",{id:"path10",cx:"63.999969",cy:"63.999977","inkscape:transform-center-x":"-5.865903","inkscape:transform-center-y":"5.0209768",rx:"56.583519",ry:"56.583527"}),E.jsx("path",{d:"m 16.735593,100.44088 c 0,0 7.70744,-0.26134 11.237986,-2.870607 3.530546,-2.609263 5.156198,-5.498236 7.679809,-12.583372 2.523611,-7.085136 2.848188,-18.380097 4.131012,-30.102996 1.282824,-11.722899 3.230562,-44.480225 3.230562,-44.480225 4.962867,19.231513 6.224793,38.773768 14.888602,57.69454 2.414322,5.272605 9.885109,-17.110327 17.038135,-18.175536 7.378059,-1.10638 11.361319,13.99222 22.096164,13.889823 7.447127,0.173557 14.641057,-5.092574 22.300757,-7.450702 v 0",id:"path835","sodipodi:nodetypes":"czzzcscccc"})]})})})}function qEe(t){const e={Home:"/",Explore:"/view",Viewer:"/xdiviewer"};return E.jsx(VK,{style:{position:"static"},children:E.jsxs(Ste,{sx:{justifyContent:"space-between",alignItems:"center"},children:[E.jsxs(lo,{direction:"row",alignItems:"center",spacing:2,children:[E.jsx(Go,{children:E.jsx(XEe,{})}),E.jsx(ar,{variant:"h4",component:"div",sx:{flexGrow:1},children:"XAS Data Viewer"}),E.jsx(CU,{component:lo,direction:"row",children:Object.entries(e).map(([n,r])=>E.jsx($Q,{children:E.jsx(NQ,{component:KU,to:r,sx:{"&.active":{color:i=>i.palette.text.secondary}},children:E.jsx(qQ,{primary:n})})},n))})]}),E.jsx(lo,{direction:"row",alignItems:"center",children:E.jsx(QZ,{icon:E.jsx(LMe,{}),checkedIcon:E.jsx(kMe,{}),checked:t.colorMode==="dark",onChange:t.toggleColorMode})})]})})}const YEe=Xe("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1});function KEe(t){const[e,n]=R.useState(""),[r,i]=R.useState("No file"),s=R.useContext(pg),o=l=>{l.preventDefault(),Fn.get(e).then(c=>{const u=Ad.parseFile(c.data,e);s.setXDIFile(u);const f={id:e,beamline:u.beamline,edge:u.edge,element:u.element,sample:u.sample,start_time:u.date};i(e),t.setXASMetadata(f)})},a=l=>{if(l.target.files!=null){const c=new FileReader;c.onload=async u=>{if(u.target!=null&&typeof u.target.result=="string"){let f;try{f=Ad.parseFile(u.target.result,"localfile"),s.setXDIFile(f);const h={id:e,beamline:{name:f.beamline},edge:f.edge,element:f.element,sample:f.build_sample(),start_time:f.date};t.setXASMetadata(h)}catch(h){console.log(h)}}},i(l.target.files[0].name),c.readAsText(l.target.files[0])}};return E.jsx(Mu,{elevation:3,variant:"outlined",square:!1,sx:{p:2},children:E.jsxs(lo,{spacing:2,sx:{justifyContent:"flex-start",alignItems:"flex-start"},children:[E.jsx(ar,{variant:"h5",children:"Upload XDI File"}),E.jsxs(lo,{direction:"row",component:"form",onSubmit:o,spacing:1,children:[E.jsx(tne,{margin:"dense",sx:{width:"75%"},id:"xdi-url",label:"XDI file URL",variant:"outlined",value:e,onChange:l=>{n(l.target.value)}}),E.jsx(du,{variant:"contained",type:"submit",children:"Fetch"})]}),E.jsxs(du,{variant:"contained",role:void 0,tabIndex:-1,component:"label",children:["Upload Local File",E.jsx(YEe,{type:"file",name:"file1",onChange:a})]}),E.jsx(ar,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:r})]})})}function ZEe(){const[t,e]=R.useState(null);return E.jsxs(lo,{spacing:2,children:[E.jsx(KEe,{setXASMetadata:e}),t&&E.jsx(qR,{standard:t,showDownload:!1,showCompare:!1})]})}function JEe(){const[t,e]=R.useState(null);return E.jsx(XR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ca,{height:"100%",container:!0,children:[E.jsx(Ca,{item:!0,lg:5,md:12,padding:1,children:E.jsx(ZEe,{})}),E.jsx(Ca,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(OP,{})})]})})}function QEe(){const e=nh().pathname.slice(5),[n,r]=R.useState(null),s=R.useContext(YR).find(o=>o.location===e);return R.useEffect(()=>{Fn.get("/webxdiviewer/xdidata/"+e).then(o=>{let a=null;try{a=Ad.parseFile(o.data,e)}catch{console.log("Could not read {}",focus)}r(a)})},[e]),E.jsx(XR,{value:{xdiFile:n,setXDIFile:r,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ca,{height:"100%",container:!0,children:[E.jsx(Ca,{item:!0,lg:5,md:12,padding:1,children:s?E.jsx(qR,{standard:s,showDownload:!0,showCompare:!1}):E.jsxs(ar,{children:[" Could not find ",e," "]})}),E.jsx(Ca,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(OP,{})})]})})}function e2e(){const t=Xz("(prefers-color-scheme: dark)"),[e,n]=R.useState(t?"dark":"light"),r=R.useMemo(()=>({toggleColorMode:()=>{n(s=>s==="light"?"dark":"light")}}),[]),i=R.useMemo(()=>kR({palette:{mode:e}}),[e]);return E.jsxs(nK,{theme:i,children:[E.jsx(iJ,{}),E.jsxs(lo,{height:"100vh",width:"100vw",spacing:1,children:[E.jsx(qEe,{colorMode:e,toggleColorMode:r.toggleColorMode}),E.jsx(Ire,{children:E.jsxs(Wne,{children:[E.jsx(xp,{path:"/",element:E.jsx(GEe,{})}),E.jsx(xp,{path:"/view",element:E.jsx(WEe,{})}),E.jsx(xp,{path:"/xdiviewer",element:E.jsx(JEe,{})}),E.jsx(xp,{path:"/xdi/:id/*",element:E.jsx(QEe,{})})]})})]})]})}iR(document.getElementById("root")).render(E.jsx(R.StrictMode,{children:E.jsx(Jne,{children:E.jsx(e2e,{})})})); +}`}function qMe(t,e,n,r,i){const{rows:s,columns:o}=t,a=Math.min(s,e),l=Math.min(o,n),c=[];if(i==="auto"){i=!1;e:for(let u=0;u=0&&n?` ${_D(t,e-1)}`:_D(t,e)).padEnd(e)}function _D(t,e){let n=t.toString();if(n.length<=e)return n;let r=t.toFixed(e);if(r.length>e&&(r=t.toFixed(Math.max(0,e-(r.length-e)))),r.length<=e&&!r.startsWith("0.000")&&!r.startsWith("-0.000"))return r;let i=t.toExponential(e);return i.length>e&&(i=t.toExponential(Math.max(0,e-(i.length-e)))),i.slice(0)}function KMe(t,e){t.prototype.add=function(r){return typeof r=="number"?this.addS(r):this.addM(r)},t.prototype.addS=function(r){for(let i=0;i>r);return this},t.prototype.signPropagatingRightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>r.get(i,s));return this},t.signPropagatingRightShift=function(r,i){return new e(r).signPropagatingRightShift(i)},t.prototype.rightShift=function(r){return typeof r=="number"?this.rightShiftS(r):this.rightShiftM(r)},t.prototype.rightShiftS=function(r){for(let i=0;i>>r);return this},t.prototype.rightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>>r.get(i,s));return this},t.rightShift=function(r,i){return new e(r).rightShift(i)},t.prototype.zeroFillRightShift=t.prototype.rightShift,t.prototype.zeroFillRightShiftS=t.prototype.rightShiftS,t.prototype.zeroFillRightShiftM=t.prototype.rightShiftM,t.zeroFillRightShift=t.rightShift,t.prototype.not=function(){for(let r=0;rr)throw new RangeError("Row index out of range")}function Es(t,e,n){let r=n?t.columns:t.columns-1;if(e<0||e>r)throw new RangeError("Column index out of range")}function Of(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.columns)throw new RangeError("vector size must be the same as the number of columns");return e}function Df(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.rows)throw new RangeError("vector size must be the same as the number of rows");return e}function AP(t,e){if(!Pi.isAnyArray(e))throw new TypeError("row indices must be an array");for(let n=0;n=t.rows)throw new RangeError("row indices are out of range")}function PP(t,e){if(!Pi.isAnyArray(e))throw new TypeError("column indices must be an array");for(let n=0;n=t.columns)throw new RangeError("column indices are out of range")}function aC(t,e,n,r,i){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(pv("startRow",e),pv("endRow",n),pv("startColumn",r),pv("endColumn",i),e>n||r>i||e<0||e>=t.rows||n<0||n>=t.rows||r<0||r>=t.columns||i<0||i>=t.columns)throw new RangeError("Submatrix indices are out of range")}function dw(t,e=0){let n=[];for(let r=0;r=s)throw new RangeError("min must be smaller than max");let a=s-i,l=new Je(e,n);for(let c=0;cr?(s=!0,r=n):(i=!1,s=!0);e++}return i}isReducedEchelonForm(){let e=0,n=0,r=-1,i=!0,s=!1;for(;er?(s=!0,r=n):(i=!1,s=!0);for(let o=n+1;oe.get(i,r)&&(i=s);if(e.get(i,r)===0)r++;else{e.swapRows(n,i);let s=e.get(n,r);for(let o=r;o=0;)if(e.maxRow(i)===0)i--;else{let s=0,o=!1;for(;sn[r]&&(n[r]=this.get(r,i));return n}case"column":{const n=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let r=0;rn[i]&&(n[i]=this.get(r,i));return n}case void 0:{let n=this.get(0,0);for(let r=0;rn&&(n=this.get(r,i));return n}default:throw new Error(`invalid option: ${e}`)}}maxIndex(){Rf(this);let e=this.get(0,0),n=[0,0];for(let r=0;re&&(e=this.get(r,i),n[0]=r,n[1]=i);return n}min(e){if(this.isEmpty())return NaN;switch(e){case"row":{const n=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let r=0;rn&&(n=this.get(e,r));return n}maxRowIndex(e){Ms(this,e),Rf(this);let n=this.get(e,0),r=[e,0];for(let i=1;in&&(n=this.get(e,i),r[1]=i);return r}minRow(e){if(Ms(this,e),this.isEmpty())return NaN;let n=this.get(e,0);for(let r=1;rn&&(n=this.get(r,e));return n}maxColumnIndex(e){Es(this,e),Rf(this);let n=this.get(0,e),r=[0,e];for(let i=1;in&&(n=this.get(i,e),r[0]=i);return r}minColumn(e){if(Es(this,e),this.isEmpty())return NaN;let n=this.get(0,e);for(let r=1;r1;i/=2)i&1&&(n=n.mmul(r)),r=r.mmul(r);return n}strassen2x2(e){e=Je.checkMatrix(e);let n=new Je(2,2);const r=this.get(0,0),i=e.get(0,0),s=this.get(0,1),o=e.get(0,1),a=this.get(1,0),l=e.get(1,0),c=this.get(1,1),u=e.get(1,1),f=(r+c)*(i+u),h=(a+c)*i,m=r*(o-u),y=c*(l-i),x=(r+s)*u,v=(a-r)*(i+o),g=(s-c)*(l+u),b=f+y-x+g,_=m+x,S=h+y,C=f-h+m+v;return n.set(0,0,b),n.set(0,1,_),n.set(1,0,S),n.set(1,1,C),n}strassen3x3(e){e=Je.checkMatrix(e);let n=new Je(3,3);const r=this.get(0,0),i=this.get(0,1),s=this.get(0,2),o=this.get(1,0),a=this.get(1,1),l=this.get(1,2),c=this.get(2,0),u=this.get(2,1),f=this.get(2,2),h=e.get(0,0),m=e.get(0,1),y=e.get(0,2),x=e.get(1,0),v=e.get(1,1),g=e.get(1,2),b=e.get(2,0),_=e.get(2,1),S=e.get(2,2),C=(r+i+s-o-a-u-f)*v,P=(r-o)*(-m+v),A=a*(-h+m+x-v-g-b+S),L=(-r+o+a)*(h-m+v),k=(o+a)*(-h+m),T=r*h,N=(-r+c+u)*(h-y+g),z=(-r+c)*(y-g),D=(c+u)*(-h+y),B=(r+i+s-a-l-c-u)*g,G=u*(-h+y+x-v-g-b+_),X=(-s+u+f)*(v+b-_),Z=(s-f)*(v-_),F=s*b,q=(u+f)*(-b+_),K=(-s+a+l)*(g+b-S),Q=(s-l)*(g-S),he=(a+l)*(-b+S),fe=i*x,J=l*_,de=o*y,be=c*m,_e=f*S,Xe=T+F+fe,at=C+L+k+T+X+F+q,Ve=T+N+D+B+F+K+he,$e=P+A+L+T+F+K+Q,ae=P+L+k+T+J,oe=F+K+Q+he+de,V=T+N+z+G+X+Z+F,Ie=X+Z+F+q+be,Re=T+N+z+D+_e;return n.set(0,0,Xe),n.set(0,1,at),n.set(0,2,Ve),n.set(1,0,$e),n.set(1,1,ae),n.set(1,2,oe),n.set(2,0,V),n.set(2,1,Ie),n.set(2,2,Re),n}mmulStrassen(e){e=Je.checkMatrix(e);let n=this.clone(),r=n.rows,i=n.columns,s=e.rows,o=e.columns;i!==s&&console.warn(`Multiplying ${r} x ${i} and ${s} x ${o} matrix: dimensions do not match.`);function a(f,h,m){let y=f.rows,x=f.columns;if(y===h&&x===m)return f;{let v=Ft.zeros(h,m);return v=v.setSubMatrix(f,0,0),v}}let l=Math.max(r,s),c=Math.max(i,o);n=a(n,l,c),e=a(e,l,c);function u(f,h,m,y){if(m<=512||y<=512)return f.mmul(h);m%2===1&&y%2===1?(f=a(f,m+1,y+1),h=a(h,m+1,y+1)):m%2===1?(f=a(f,m+1,y),h=a(h,m+1,y)):y%2===1&&(f=a(f,m,y+1),h=a(h,m,y+1));let x=parseInt(f.rows/2,10),v=parseInt(f.columns/2,10),g=f.subMatrix(0,x-1,0,v-1),b=h.subMatrix(0,x-1,0,v-1),_=f.subMatrix(0,x-1,v,f.columns-1),S=h.subMatrix(0,x-1,v,h.columns-1),C=f.subMatrix(x,f.rows-1,0,v-1),P=h.subMatrix(x,h.rows-1,0,v-1),A=f.subMatrix(x,f.rows-1,v,f.columns-1),L=h.subMatrix(x,h.rows-1,v,h.columns-1),k=u(Ft.add(g,A),Ft.add(b,L),x,v),T=u(Ft.add(C,A),b,x,v),N=u(g,Ft.sub(S,L),x,v),z=u(A,Ft.sub(P,b),x,v),D=u(Ft.add(g,_),L,x,v),B=u(Ft.sub(C,g),Ft.add(b,S),x,v),G=u(Ft.sub(_,A),Ft.add(P,L),x,v),X=Ft.add(k,z);X.sub(D),X.add(G);let Z=Ft.add(N,D),F=Ft.add(T,z),q=Ft.sub(k,T);q.add(N),q.add(B);let K=Ft.zeros(2*X.rows,2*X.columns);return K=K.setSubMatrix(X,0,0),K=K.setSubMatrix(Z,X.rows,0),K=K.setSubMatrix(F,0,X.columns),K=K.setSubMatrix(q,X.rows,X.columns),K.subMatrix(0,m-1,0,y-1)}return u(n,e,l,c)}scaleRows(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Je(this.rows,this.columns);for(let s=0;s0&&bD(o,{min:n,max:r,output:o}),i.setRow(s,o)}return i}scaleColumns(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Je(this.rows,this.columns);for(let s=0;sr||n<0||n>=this.columns||r<0||r>=this.columns)throw new RangeError("Argument out of range");let i=new Je(e.length,r-n+1);for(let s=0;s=this.rows)throw new RangeError(`Row index out of range: ${e[s]}`);i.set(s,o-n,this.get(e[s],o))}return i}subMatrixColumn(e,n,r){if(n===void 0&&(n=0),r===void 0&&(r=this.rows-1),n>r||n<0||n>=this.rows||r<0||r>=this.rows)throw new RangeError("Argument out of range");let i=new Je(r-n+1,e.length);for(let s=0;s=this.columns)throw new RangeError(`Column index out of range: ${e[s]}`);i.set(o-n,s,this.get(o,e[s]))}return i}setSubMatrix(e,n,r){if(e=Je.checkMatrix(e),e.isEmpty())return this;let i=n+e.rows-1,s=r+e.columns-1;aC(this,n,i,r,s);for(let o=0;otypeof e=="number")}Ft.random=Ft.rand;Ft.randomInt=Ft.randInt;Ft.diagonal=Ft.diag;Ft.prototype.diagonal=Ft.prototype.diag;Ft.identity=Ft.eye;Ft.prototype.negate=Ft.prototype.neg;Ft.prototype.tensorProduct=Ft.prototype.kroneckerProduct;var Qm,lC,iu;let Je=(iu=class extends Ft{constructor(n,r){super();ES(this,Qm);Wt(this,"data");if(iu.isMatrix(n))TS(this,Qm,lC).call(this,n.rows,n.columns),iu.copy(n,this);else if(Number.isInteger(n)&&n>=0)TS(this,Qm,lC).call(this,n,r);else if(Pi.isAnyArray(n)){const i=n;if(n=i.length,r=n?i[0].length:0,typeof r!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let s=0;s"u"&&(r=n,n=this.columns),Es(this,n,!0),r=Df(this,r);for(let i=0;i=0)for(let i=0;i=0)D0(this,Gr,new Je(n,n));else if(D0(this,Gr,new Je(n)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return Gs(this,Gr).size}get rows(){return Gs(this,Gr).rows}get columns(){return Gs(this,Gr).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(n){return Je.isMatrix(n)&&n.klassType==="SymmetricMatrix"}static zeros(n){return new this(n)}static ones(n){return new this(n).fill(1)}clone(){const n=new W1(this.diagonalSize);for(const[r,i,s]of this.upperRightEntries())n.set(r,i,s);return n}toMatrix(){return new Je(this)}get(n,r){return Gs(this,Gr).get(n,r)}set(n,r,i){return Gs(this,Gr).set(n,r,i),Gs(this,Gr).set(r,n,i),this}removeCross(n){return Gs(this,Gr).removeRow(n),Gs(this,Gr).removeColumn(n),this}addCross(n,r){r===void 0&&(r=n,n=this.diagonalSize);const i=r.slice();return i.splice(n,1),Gs(this,Gr).addRow(n,i),Gs(this,Gr).addColumn(n,r),this}applyMask(n){if(n.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const r=[];for(const[i,s]of n.entries())s||r.push(i);r.reverse();for(const i of r)this.removeCross(i);return this}toCompact(){const{diagonalSize:n}=this,r=new Array(n*(n+1)/2);for(let i=0,s=0,o=0;o=n&&(i=++s);return r}static fromCompact(n){const r=n.length,i=(Math.sqrt(8*r+1)-1)/2;if(!Number.isInteger(i))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(n)}`);const s=new W1(i);for(let o=0,a=0,l=0;l=i&&(o=++a);return s}*upperRightEntries(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}}*upperRightValues(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}};Gr=new WeakMap;let ru=W1;ru.prototype.klassType="SymmetricMatrix";class hw extends ru{static isDistanceMatrix(e){return ru.isSymmetricMatrix(e)&&e.klassSubType==="DistanceMatrix"}constructor(e){if(super(e),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(e,n,r){return e===n&&(r=0),super.set(e,n,r)}addCross(e,n){return n===void 0&&(n=e,e=this.diagonalSize),n=n.slice(),n[e]=0,super.addCross(e,n)}toSymmetricMatrix(){return new ru(this)}clone(){const e=new hw(this.diagonalSize);for(const[n,r,i]of this.upperRightEntries())n!==r&&e.set(n,r,i);return e}toCompact(){const{diagonalSize:e}=this,n=(e-1)*e/2,r=new Array(n);for(let i=1,s=0,o=0;o=e&&(i=++s+1);return r}static fromCompact(e){const n=e.length;if(n===0)return new this(0);const r=(Math.sqrt(8*n+1)+1)/2;if(!Number.isInteger(r))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(e)}`);const i=new this(r);for(let s=1,o=0,a=0;a=r&&(s=++o+1);return i}}hw.prototype.klassSubType="DistanceMatrix";class Ha extends Ft{constructor(e,n,r){super(),this.matrix=e,this.rows=n,this.columns=r}}class gEe extends Ha{constructor(e,n){Es(e,n),super(e,e.rows,1),this.column=n}set(e,n,r){return this.matrix.set(e,this.column,r),this}get(e){return this.matrix.get(e,this.column)}}class yEe extends Ha{constructor(e,n){PP(e,n),super(e,e.rows,n.length),this.columnIndices=n}set(e,n,r){return this.matrix.set(e,this.columnIndices[n],r),this}get(e,n){return this.matrix.get(e,this.columnIndices[n])}}class vEe extends Ha{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(e,this.columns-n-1,r),this}get(e,n){return this.matrix.get(e,this.columns-n-1)}}class xEe extends Ha{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(this.rows-e-1,n,r),this}get(e,n){return this.matrix.get(this.rows-e-1,n)}}class bEe extends Ha{constructor(e,n){Ms(e,n),super(e,1,e.columns),this.row=n}set(e,n,r){return this.matrix.set(this.row,n,r),this}get(e,n){return this.matrix.get(this.row,n)}}class _Ee extends Ha{constructor(e,n){AP(e,n),super(e,n.length,e.columns),this.rowIndices=n}set(e,n,r){return this.matrix.set(this.rowIndices[e],n,r),this}get(e,n){return this.matrix.get(this.rowIndices[e],n)}}class qv extends Ha{constructor(e,n,r){AP(e,n),PP(e,r),super(e,n.length,r.length),this.rowIndices=n,this.columnIndices=r}set(e,n,r){return this.matrix.set(this.rowIndices[e],this.columnIndices[n],r),this}get(e,n){return this.matrix.get(this.rowIndices[e],this.columnIndices[n])}}class wEe extends Ha{constructor(e,n,r,i,s){aC(e,n,r,i,s),super(e,r-n+1,s-i+1),this.startRow=n,this.startColumn=i}set(e,n,r){return this.matrix.set(this.startRow+e,this.startColumn+n,r),this}get(e,n){return this.matrix.get(this.startRow+e,this.startColumn+n)}}let SEe=class extends Ha{constructor(e){super(e,e.columns,e.rows)}set(e,n,r){return this.matrix.set(n,e,r),this}get(e,n){return this.matrix.get(n,e)}};class F7 extends Ft{constructor(e,n={}){const{rows:r=1}=n;if(e.length%r!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=r,this.columns=e.length/r,this.data=e}set(e,n,r){let i=this._calculateIndex(e,n);return this.data[i]=r,this}get(e,n){let r=this._calculateIndex(e,n);return this.data[r]}_calculateIndex(e,n){return e*this.columns+n}}class fs extends Ft{constructor(e){super(),this.data=e,this.rows=e.length,this.columns=e[0].length}set(e,n,r){return this.data[e][n]=r,this}get(e,n){return this.data[e][n]}}function MEe(t,e){if(Pi.isAnyArray(t))return t[0]&&Pi.isAnyArray(t[0])?new fs(t):new F7(t,e);throw new Error("the argument is not an array")}class pw{constructor(e){e=fs.checkMatrix(e);let n=e.clone(),r=n.rows,i=n.columns,s=new Float64Array(r),o=1,a,l,c,u,f,h,m,y,x;for(a=0;aMath.abs(y[u])&&(u=a);if(u!==l){for(c=0;c=0;c--){for(l=0;lo?i.set(s,o,e.get(s,o)):s===o?i.set(s,o,1):i.set(s,o,0);return i}get upperTriangularMatrix(){let e=this.LU,n=e.rows,r=e.columns,i=new Je(n,r);for(let s=0;sMath.abs(e)?(n=e/t,Math.abs(t)*Math.sqrt(1+n*n)):e!==0?(n=t/e,Math.abs(e)*Math.sqrt(1+n*n)):0}class IP{constructor(e){e=fs.checkMatrix(e);let n=e.clone(),r=e.rows,i=e.columns,s=new Float64Array(i),o,a,l,c;for(l=0;l=0;c--){for(l=0;l=0;a--){for(s=0;s=0;T--)if(y[T]!==0){for(let N=T+1;N=0;T--){if(T0;){let T,N;for(T=A-2;T>=-1&&T!==-1;T--){const z=Number.MIN_VALUE+k*Math.abs(y[T]+Math.abs(y[T+1]));if(Math.abs(g[T])<=z||Number.isNaN(g[T])){g[T]=0;break}}if(T===A-2)N=4;else{let z;for(z=A-1;z>=T&&z!==T;z--){let D=(z!==A?Math.abs(g[z]):0)+(z!==T+1?Math.abs(g[z-1]):0);if(Math.abs(y[z])<=k*D){y[z]=0;break}}z===T?N=3:z===A-1?N=1:(N=2,T=z)}switch(T++,N){case 1:{let z=g[A-2];g[A-2]=0;for(let D=A-2;D>=T;D--){let B=ya(y[D],z),G=y[D]/B,X=z/B;if(y[D]=B,D!==T&&(z=-X*g[D-1],g[D-1]=G*g[D-1]),c)for(let Z=0;Z=y[T+1]);){let z=y[T];if(y[T]=y[T+1],y[T+1]=z,c&&Tn&&s.set(u,f,e.get(u,f)/this.s[f]);let o=this.U,a=o.rows,l=o.columns,c=new Je(r,a);for(let u=0;ue&&n++;return n}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return Je.diag(this.s)}}function EEe(t,e=!1){return t=fs.checkMatrix(t),e?new mh(t).inverse():z7(t,Je.eye(t.rows))}function z7(t,e,n=!1){return t=fs.checkMatrix(t),e=fs.checkMatrix(e),n?new mh(t).solve(e):t.isSquare()?new pw(t).solve(e):new IP(t).solve(e)}function Yv(t){if(t=Je.checkMatrix(t),t.isSquare()){if(t.columns===0)return 1;let e,n,r,i;if(t.columns===2)return e=t.get(0,0),n=t.get(0,1),r=t.get(1,0),i=t.get(1,1),e*i-n*r;if(t.columns===3){let s,o,a;return s=new qv(t,[1,2],[1,2]),o=new qv(t,[1,2],[0,2]),a=new qv(t,[1,2],[0,1]),e=t.get(0,0),n=t.get(0,1),r=t.get(0,2),e*Yv(s)-n*Yv(o)+r*Yv(a)}else return new pw(t).determinant}else throw Error("determinant can only be calculated for a square matrix")}function TEe(t,e){let n=[];for(let r=0;ri)return new Array(e.rows+1).fill(0);{let s=e.addRow(n,[0]);for(let o=0;oe?s[o]=1/s[o]:s[o]=0;return i.mmul(Je.diag(s).mmul(r.transpose()))}function PEe(t,e=t,n={}){t=new Je(t);let r=!1;if(typeof e=="object"&&!Je.isMatrix(e)&&!Pi.isAnyArray(e)?(n=e,e=t,r=!0):e=new Je(e),t.rows!==e.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:i=!0}=n;i&&(t=t.center("column"),r||(e=e.center("column")));const s=t.transpose().mmul(e);for(let o=0;o0?i.set(s,s+1,n[s]):n[s]<0&&i.set(s,s-1,n[s])}return i}}function NEe(t,e,n,r){let i,s,o,a,l,c,u,f;for(l=0;l0;a--){for(f=0,o=0,c=0;c0&&(s=-s),e[a]=f*s,o=o-i*s,n[a-1]=i-s,l=0;lc)do{for(i=n[c],f=(n[c+1]-i)/(2*e[c]),h=ya(f,1),f<0&&(h=-h),n[c]=e[c]/(f+h),n[c+1]=e[c]*(f+h),m=n[c+1],s=i-n[c],o=c+2;o=c;o--)for(v=x,x=y,_=b,i=y*e[o],s=y*f,h=ya(f,e[o]),e[o+1]=b*h,b=e[o]/h,y=f/h,f=y*n[o]-b*i,n[o+1]=s+b*(y*i+b*n[o]),l=0;lP*C);n[c]=n[c]+S,e[c]=0}for(o=0;o=f;c--)n[c]=e.get(c,f-1)/h,l+=n[c]*n[c];for(a=Math.sqrt(l),n[f]>0&&(a=-a),l=l-n[f]*a,n[f]=n[f]-a,u=f;u=f;c--)o+=n[c]*e.get(c,u);for(o=o/l,c=f;c<=s;c++)e.set(c,u,e.get(c,u)-o*n[c])}for(c=0;c<=s;c++){for(o=0,u=s;u>=f;u--)o+=n[u]*e.get(c,u);for(o=o/l,u=f;u<=s;u++)e.set(c,u,e.get(c,u)-o*n[u])}n[f]=h*n[f],e.set(f,f-1,h*a)}}for(c=0;c=i+1;f--)if(e.get(f,f-1)!==0){for(c=f+1;c<=s;c++)n[c]=e.get(c,f-1);for(u=f;u<=s;u++){for(a=0,c=f;c<=s;c++)a+=n[c]*r.get(c,u);for(a=a/n[f]/e.get(f,f-1),c=f;c<=s;c++)r.set(c,u,r.get(c,u)+a*n[c])}}}function OEe(t,e,n,r,i){let s=t-1,o=0,a=t-1,l=Number.EPSILON,c=0,u=0,f=0,h=0,m=0,y=0,x=0,v=0,g,b,_,S,C,P,A,L,k,T,N,z,D,B,G;for(g=0;ga)&&(n[g]=i.get(g,g),e[g]=0),b=Math.max(g-1,0);b=o;){for(S=s;S>o&&(y=Math.abs(i.get(S-1,S-1))+Math.abs(i.get(S,S)),y===0&&(y=u),!(Math.abs(i.get(S,S-1))=0){for(x=f>=0?f+x:f-x,n[s-1]=L+x,n[s]=n[s-1],x!==0&&(n[s]=L-A/x),e[s-1]=0,e[s]=0,L=i.get(s,s-1),y=Math.abs(L)+Math.abs(x),f=L/y,h=x/y,m=Math.sqrt(f*f+h*h),f=f/m,h=h/m,b=s-1;b0)){for(y=Math.sqrt(y),k=S&&(x=i.get(C,C),m=L-x,y=k-x,f=(m*y-A)/i.get(C+1,C)+i.get(C,C+1),h=i.get(C+1,C+1)-x-m-y,m=i.get(C+2,C+1),y=Math.abs(f)+Math.abs(h)+Math.abs(m),f=f/y,h=h/y,m=m/y,!(C===S||Math.abs(i.get(C,C-1))*(Math.abs(h)+Math.abs(m))C+2&&i.set(g,g-3,0);for(_=C;_<=s-1&&(B=_!==s-1,_!==C&&(f=i.get(_,_-1),h=i.get(_+1,_-1),m=B?i.get(_+2,_-1):0,L=Math.abs(f)+Math.abs(h)+Math.abs(m),L!==0&&(f=f/L,h=h/L,m=m/L)),L!==0);_++)if(y=Math.sqrt(f*f+h*h+m*m),f<0&&(y=-y),y!==0){for(_!==C?i.set(_,_-1,-y*L):S!==C&&i.set(_,_-1,-i.get(_,_-1)),f=f+y,L=f/y,k=h/y,x=m/y,h=h/f,m=m/f,b=_;b=0;s--)if(f=n[s],h=e[s],h===0)for(S=s,i.set(s,s,1),g=s-1;g>=0;g--){for(A=i.get(g,g)-f,m=0,b=S;b<=s;b++)m=m+i.get(g,b)*i.get(b,s);if(e[g]<0)x=A,y=m;else if(S=g,e[g]===0?i.set(g,s,A!==0?-m/A:-m/(l*u)):(L=i.get(g,g+1),k=i.get(g+1,g),h=(n[g]-f)*(n[g]-f)+e[g]*e[g],P=(L*y-x*m)/h,i.set(g,s,P),i.set(g+1,s,Math.abs(L)>Math.abs(x)?(-m-A*P)/L:(-y-k*P)/x)),P=Math.abs(i.get(g,s)),l*P*P>1)for(b=g;b<=s;b++)i.set(b,s,i.get(b,s)/P)}else if(h<0)for(S=s-1,Math.abs(i.get(s,s-1))>Math.abs(i.get(s-1,s))?(i.set(s-1,s-1,h/i.get(s,s-1)),i.set(s-1,s,-(i.get(s,s)-f)/i.get(s,s-1))):(G=mv(0,-i.get(s-1,s),i.get(s-1,s-1)-f,h),i.set(s-1,s-1,G[0]),i.set(s-1,s,G[1])),i.set(s,s-1,0),i.set(s,s,1),g=s-2;g>=0;g--){for(T=0,N=0,b=S;b<=s;b++)T=T+i.get(g,b)*i.get(b,s-1),N=N+i.get(g,b)*i.get(b,s);if(A=i.get(g,g)-f,e[g]<0)x=A,m=T,y=N;else if(S=g,e[g]===0?(G=mv(-T,-N,A,h),i.set(g,s-1,G[0]),i.set(g,s,G[1])):(L=i.get(g,g+1),k=i.get(g+1,g),z=(n[g]-f)*(n[g]-f)+e[g]*e[g]-h*h,D=(n[g]-f)*2*h,z===0&&D===0&&(z=l*u*(Math.abs(A)+Math.abs(h)+Math.abs(L)+Math.abs(k)+Math.abs(x))),G=mv(L*m-x*T+h*N,L*y-x*N-h*T,z,D),i.set(g,s-1,G[0]),i.set(g,s,G[1]),Math.abs(L)>Math.abs(x)+Math.abs(h)?(i.set(g+1,s-1,(-T-A*i.get(g,s-1)+h*i.get(g,s))/L),i.set(g+1,s,(-N-A*i.get(g,s)-h*i.get(g,s-1))/L)):(G=mv(-m-k*i.get(g,s-1),-y-k*i.get(g,s),x,h),i.set(g+1,s-1,G[0]),i.set(g+1,s,G[1]))),P=Math.max(Math.abs(i.get(g,s-1)),Math.abs(i.get(g,s))),l*P*P>1)for(b=g;b<=s;b++)i.set(b,s-1,i.get(b,s-1)/P),i.set(b,s,i.get(b,s)/P)}for(g=0;ga)for(b=g;b=o;b--)for(g=o;g<=a;g++){for(x=0,_=o;_<=Math.min(b,a);_++)x=x+r.get(g,_)*i.get(_,b);r.set(g,b,x)}}}function mv(t,e,n,r){let i,s;return Math.abs(n)>Math.abs(r)?(i=r/n,s=n+i*r,[(t+i*e)/s,(e-i*t)/s]):(i=n/r,s=r+i*n,[(i*t+e)/s,(i*e-t)/s])}class B7{constructor(e){if(e=fs.checkMatrix(e),!e.isSymmetric())throw new Error("Matrix is not symmetric");let n=e,r=n.rows,i=new Je(r,r),s=!0,o,a,l;for(a=0;a0),i.set(a,a,Math.sqrt(Math.max(c,0))),l=a+1;l=0;l--)for(a=0;ao;m++)f=e.transpose().mmul(a).div(a.transpose().mmul(a).get(0,0)),f=f.div(f.norm()),c=e.mmul(f).div(f.transpose().mmul(f).get(0,0)),m>0&&(l=c.clone().sub(h).pow(2).sum()),h=c.clone(),r?(u=r.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),u=u.div(u.norm()),a=r.mmul(u).div(u.transpose().mmul(u).get(0,0))):a=c;if(r){let m=e.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0));m=m.div(m.norm());let y=e.clone().sub(c.clone().mmul(m.transpose())),x=a.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),v=r.clone().sub(c.clone().mulS(x.get(0,0)).mmul(u.transpose()));this.t=c,this.p=m.transpose(),this.w=f.transpose(),this.q=u,this.u=a,this.s=c.transpose().mmul(c),this.xResidual=y,this.yResidual=v,this.betas=x}else this.w=f.transpose(),this.s=c.transpose().mmul(c).sqrt(),i?this.t=c.clone().div(this.s.get(0,0)):this.t=c,this.xResidual=e.sub(c.mmul(f.transpose()))}}Zt.AbstractMatrix=Ft;Zt.CHO=B7;Zt.CholeskyDecomposition=B7;Zt.DistanceMatrix=hw;Zt.EVD=U7;Zt.EigenvalueDecomposition=U7;Zt.LU=pw;Zt.LuDecomposition=pw;var V7=Zt.Matrix=Je;Zt.MatrixColumnSelectionView=yEe;Zt.MatrixColumnView=gEe;Zt.MatrixFlipColumnView=vEe;Zt.MatrixFlipRowView=xEe;Zt.MatrixRowSelectionView=_Ee;Zt.MatrixRowView=bEe;Zt.MatrixSelectionView=qv;Zt.MatrixSubView=wEe;var DEe=Zt.MatrixTransposeView=SEe;Zt.NIPALS=j7;Zt.Nipals=j7;Zt.QR=IP;Zt.QrDecomposition=IP;Zt.SVD=mh;Zt.SingularValueDecomposition=mh;Zt.SymmetricMatrix=ru;Zt.WrapperMatrix1D=F7;Zt.WrapperMatrix2D=fs;Zt.correlation=IEe;Zt.covariance=PEe;var SD=Zt.default=Je;Zt.determinant=Yv;Zt.inverse=EEe;Zt.linearDependencies=REe;Zt.pseudoInverse=AEe;var FEe=Zt.solve=z7;Zt.wrap=MEe;const MD=V7,ED=DEe;SD.Matrix&&SD.Matrix;const zEe=FEe;function $7(t,e){if(!Yo(t)||!Yo(e))throw new TypeError("x and y must be arrays");if(t.length!==e.length)throw new RangeError("x and y arrays must have the same length")}class NP{constructor(){if(new.target===NP)throw new Error("BaseRegression must be subclassed")}predict(e){if(typeof e=="number")return this._predict(e);if(Yo(e)){const n=[];for(const r of e)n.push(this._predict(r));return n}else throw new TypeError("x must be a number or array")}_predict(e){throw new Error("_predict must be implemented")}train(){}toString(e){return""}toLaTeX(e){return""}score(e,n){$7(e,n);const r=e.length,i=new Array(r);for(let m=0;m0&&l!==this.coefficients.length-1?a=` + ${a}`:l!==this.coefficients.length-1&&(a=` ${a}`)),o=a+o;return o.startsWith("+")&&(o=o.slice(1)),`f(x) = ${o}`}static load(e){if(e.name!=="polynomialRegression")throw new TypeError("not a polynomial regression model");return new $1(!0,e)}}function UEe(t,e,n,r={}){const i=t.length;let{interceptAtZero:s=!1}=r,o=[];if(Array.isArray(n))o=n,s=!1;else if(typeof n=="number")if(s){o=new Array(n);for(let m=0;m"u")throw new TypeError("X must be defined");if(r>t.length)throw new RangeError(`Window size is higher than the data length ${r}>${t.length}`);if(i<0||!Number.isInteger(i))throw new RangeError("Derivative should be a positive integer");if(s<1||!Number.isInteger(s))throw new RangeError("Polynomial should be a positive integer");s>=6&&console.warn("You should not use polynomial grade higher than 5 if you are not sure that your data arises from such a model. Possible polynomial oscillation problems");const o=Math.floor(r/2),a=t.length,l=new Float64Array(a),c=VEe(r,s,i);let u=0,f=!0;Yo(e)?f=!1:u=e**i;for(let m=0;m=0&&o0?i=(4*n-2)/(n*(2*e-n+1))*(t*Zp(t,e,n-1,r)+r*Zp(t,e,n-1,r-1))-(n-1)*(2*e+n)/(n*(2*e-n+1))*Zp(t,e,n-2,r):n===0&&r===0?i=1:i=0,i}function TD(t,e){let n=1;if(t>=e)for(let r=t-e+1;r<=t;r++)n*=r;return n}function jEe(t,e,n,r,i){let s=0;for(let o=0;o<=r;o++)s+=(2*o+1)*(TD(2*n,o)/TD(2*n+o+1,o+1))*Zp(t,n,o,0)*Zp(e,n,o,i);return s}function VEe(t,e,n){const r=new Array(t),i=Math.floor(t/2);for(let s=-i;s<=i;s++){r[s+i]=new Float64Array(t);for(let o=-i;o<=i;o++)r[s+i][o+i]=jEe(o,s,i,e,n)}return r}function gv(t,e){let n=1/0,r=0;for(let i=0;ie&&(e=t[r],n=r);return n}function WEe(t,e){const n=BEe(e,t,{windowSize:9,derivative:1,polynomial:3}),r=$Ee(n),i=t[r];let s=5;r<20&&(s=2);const o=s*Math.round((t[1]-i)/s),a=.5*o,l=gv(t,o+i),c=gv(t,a+i),u=e.slice(l,c),f=t.slice(l,c),h=new $1(f,u,1),m=e.map((P,A)=>P-h.predict(t[A])),y=5*Math.round((t[t.length-1]-i)/5),x=5*Math.round(y/15),v=2,g=gv(t,x+i),b=gv(t,y+i),_=new $1(t.slice(g,b),m.slice(g,b),v),S=_.predict(i);for(let P=r;PP/S),[m.length])}function ZE(t,e,n,r,i){const s=t[e],o=t.energy,a=n?WEe(o,s):m6(s,[s.length]);return{x:o,y:a,label:r+":"+e,color:i}}function CD(t,e,n,r,i,s){const o=!e&&!n&&!r,a=[];return o||t==null||(r&&t.murefer&&a.push(ZE(t,"murefer",i,t.id,s[2])),n&&t.mufluor&&a.push(ZE(t,"mufluor",i,t.id,s[1])),e&&t.mutrans&&a.push(ZE(t,"mutrans",i,t.id,s[0]))),a}function HEe(t,e){return E.jsx(pSe,{abscissas:t.x,ordinates:t.y.data,curveType:e,color:t.color},t.label)}function GEe(t){var T,N,z,D;const[e,n]=R.useState({showTrans:!1,showFluor:!1,showRefer:!1});R.useEffect(()=>{var B,G,X;n({showTrans:((B=t.xasData)==null?void 0:B.mutrans)!=null,showFluor:((G=t.xasData)==null?void 0:G.mufluor)!=null,showRefer:((X=t.xasData)==null?void 0:X.murefer)!=null})},[t.xasData]);const r=Object.values(Kp),[i,s]=R.useState(!0),[o,a]=R.useState(!0),[l,c]=R.useState(r[0]),u=Su(),{showTrans:f,showFluor:h,showRefer:m}=e,y=[((T=t.xasData)==null?void 0:T.mutrans)!=null,((N=t.xasData)==null?void 0:N.mufluor)!=null,((z=t.xasData)==null?void 0:z.murefer)!=null],x=(B,G)=>E.jsxs("p",{children:[B.toPrecision(8),", ",G.toPrecision(8)]}),v=CD(t.xasData,f,h,m,o,[sM(u.palette.primary.dark,.3),sM(u.palette.success.light,.3),sM(u.palette.secondary.dark,.3)]),b=t.comparisonFiles.filter(B=>{var G;return B.id!=((G=t.xasData)==null?void 0:G.id)}).map((B,G)=>CD(B,f,h,m,o,[oM(u.palette.primary.dark,G*.3),oM(u.palette.success.light,G*.3),oM(u.palette.secondary.dark,G*.3)])).flat();v.push(...b);const _=lD(v.map(B=>oD(B.y))),C={visDomain:lD(v.map(B=>oD(B.x)))??[0,1],showGrid:!0,isIndexAxis:!1,label:"Energy (eV)"},P={visDomain:_??[0,1],showGrid:!0,isIndexAxis:!1,label:o?"mu(E) (norm)":"mu(E)"},A=u.palette.action.hover,L={"--h5w-toolbar--bgColor":u.palette.action.hover,"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":"black","--h5w-toolbar-label--color":u.palette.primary.dark,"--h5w-btn-hover--bgColor":u.palette.action.hover,"--h5w-btnPressed--bgColor":u.palette.action.selected,"--h5w-selector-menu--bgColor":u.palette.background.default,"--h5w-selector-option-selected--bgColor":u.palette.action.selected},k={"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":u.palette.text.secondary,"--h5w-axisLabels--color":u.palette.text.primary,"--h5w-line--color":u.palette.primary.dark,"--h5w-tooltip--bgColor":u.palette.action.hover,"--h5w-tooltip--color":u.palette.text.primary,"--h5w-line--colorAux":[u.palette.success.light,u.palette.secondary.dark]};return E.jsxs(Mu,{sx:{height:"100%",display:"flex",flexDirection:"column",backgroundColor:B=>B.palette.background.default,fontFamily:B=>B.typography.fontFamily},children:[E.jsx(Go,{style:L,children:E.jsxs(iMe,{children:[E.jsx(Nc,{label:"Normalize",value:o,onToggle:()=>{a(!o)}}),E.jsx(nu,{}),E.jsx(Nc,{label:"Transmission",value:f,onToggle:()=>{n({...e,showTrans:!f})},disabled:!y[0]}),E.jsx(Nc,{label:"Fluorescence",value:h,onToggle:()=>{n({...e,showFluor:!h})},disabled:!y[1]}),E.jsx(Nc,{label:"Reference",value:m,onToggle:()=>{n({...e,showRefer:!m})},disabled:!y[2]}),E.jsx(nu,{}),E.jsx(EMe,{label:"Line Style",onChange:B=>{c(B)},options:r,value:l,renderOption:B=>E.jsx("div",{children:E.jsx("span",{children:String(B)})})}),E.jsx(nu,{}),E.jsx(Nc,{label:"Grid",icon:zMe,value:i,onToggle:()=>s(!i)})]})}),E.jsx(Go,{style:k,flex:1,display:"flex",children:E.jsxs(Qwe,{title:((D=t.xasData)==null?void 0:D.id)??" ",abscissaConfig:C,ordinateConfig:P,children:[v.map(B=>HEe(B,l)),E.jsx(kwe,{renderTooltip:x}),E.jsx(gwe,{}),E.jsx(Rwe,{}),E.jsx(P7,{children:E.jsx("div",{style:{color:u.palette.text.primary,position:"absolute",maxWidth:"35%",minWidth:"15em",padding:"0 1rem",bottom:"2.5rem",right:"0px",background:A},children:v.reverse().map(B=>E.jsxs("div",{children:[E.jsx("span",{style:{color:B.color},children:" ■"}),E.jsx("span",{children:" "+B.label})]},B.label))})})]})})]})}function kP(){const t=R.useContext(pg);let e=null,n=[];if(t.xdiFile!=null){const r=t.xdiFile,i=r.energy(),s=r.muTrans(),o=r.muFluor(),a=r.muRefer();e={id:r.id,energy:i,mutrans:s,mufluor:o,murefer:a},n=t.comparisonFiles.map(l=>({id:l.id,energy:l.energy(),mutrans:l.muTrans(),mufluor:l.muFluor(),murefer:l.muRefer()}))}return E.jsx(GEe,{xasData:e,comparisonFiles:n})}function XEe(){const[t,e]=R.useState(null),[n,r]=R.useState([]),i=R.useContext(XR);function s(){return a=>{Nn.get("/webxdiviewer/xdidata/"+a).then(l=>{const c=Pd.parseFile(l.data,a);e(c)})}}const o=s();return E.jsx(HR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:n,setComparisonFiles:r},children:E.jsxs(Ca,{height:"100%",container:!0,children:[E.jsx(Ca,{item:!0,lg:5,md:12,padding:1,children:E.jsx(kre,{standards:i,updatePlot:o})}),E.jsx(Ca,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(kP,{})})]})})}const qEe="NSLS-II-BMM/bmm-standards";function YEe(){const t=qEe;return E.jsxs(sJ,{maxWidth:"md",sx:{alignSelf:"center",p:"24px"},children:[E.jsx(ar,{variant:"h4",padding:"24px",children:"Welcome to the XAS Data Viewer!"}),E.jsxs(Go,{children:[E.jsxs(ar,{paragraph:!0,children:["A prototype viewer for"," ",E.jsx(Uv,{to:"https://docs.xrayabsorption.org/xaslib/xdi.html",children:"XDI files"})," ","stored in a github repository. As part of the website build process, the XDI files are pulled in and indexed, giving simple static website to display open data. The website is currently pointing as a fork of the data in"," ",E.jsx(Uv,{to:"https://github.com/"+t,children:t}),"."]}),E.jsxs(ar,{paragraph:!0,children:["The database is open to ",E.jsx(Uv,{to:"view",children:" search and download "}),"."]})]})]})}function KEe(){return E.jsx(Ex,{fontSize:"large",children:E.jsx("svg",{"xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",width:"128mm",height:"128mm",stroke:"currentColor",strokeWidth:"10",fill:"currentColor",fillOpacity:0,viewBox:"0 0 128 128",version:"1.1",id:"svg8","inkscape:version":"1.0.2 (e86c870879, 2021-01-15)","sodipodi:docname":"xas.svg",children:E.jsxs("g",{children:[E.jsx("ellipse",{id:"path10",cx:"63.999969",cy:"63.999977","inkscape:transform-center-x":"-5.865903","inkscape:transform-center-y":"5.0209768",rx:"56.583519",ry:"56.583527"}),E.jsx("path",{d:"m 16.735593,100.44088 c 0,0 7.70744,-0.26134 11.237986,-2.870607 3.530546,-2.609263 5.156198,-5.498236 7.679809,-12.583372 2.523611,-7.085136 2.848188,-18.380097 4.131012,-30.102996 1.282824,-11.722899 3.230562,-44.480225 3.230562,-44.480225 4.962867,19.231513 6.224793,38.773768 14.888602,57.69454 2.414322,5.272605 9.885109,-17.110327 17.038135,-18.175536 7.378059,-1.10638 11.361319,13.99222 22.096164,13.889823 7.447127,0.173557 14.641057,-5.092574 22.300757,-7.450702 v 0",id:"path835","sodipodi:nodetypes":"czzzcscccc"})]})})})}function ZEe(t){const e={Home:"/",Explore:"/view",Viewer:"/xdiviewer"};return E.jsx(XK,{style:{position:"static"},children:E.jsxs(Rte,{sx:{justifyContent:"space-between",alignItems:"center"},children:[E.jsxs(lo,{direction:"row",alignItems:"center",spacing:2,children:[E.jsx(Go,{children:E.jsx(KEe,{})}),E.jsx(ar,{variant:"h4",component:"div",sx:{flexGrow:1},children:"XAS Data Viewer"}),E.jsx(IU,{component:lo,direction:"row",children:Object.entries(e).map(([n,r])=>E.jsx(qQ,{children:E.jsx(FQ,{component:e6,to:r,sx:{"&.active":{color:i=>i.palette.text.secondary}},children:E.jsx(QQ,{primary:n})})},n))})]}),E.jsx(lo,{direction:"row",alignItems:"center",children:E.jsx(iJ,{icon:E.jsx(FMe,{}),checkedIcon:E.jsx(DMe,{}),checked:t.colorMode==="dark",onChange:t.toggleColorMode})})]})})}const JEe=Ge("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1});function QEe(t){const[e,n]=R.useState(""),[r,i]=R.useState("No file"),s=R.useContext(pg),o=l=>{l.preventDefault(),Nn.get(e).then(c=>{const u=Pd.parseFile(c.data,e);s.setXDIFile(u);const f={id:e,beamline:u.beamline,edge:u.edge,element:u.element,sample:u.sample,start_time:u.date};i(e),t.setXASMetadata(f)})},a=l=>{if(l.target.files!=null){const c=new FileReader;c.onload=async u=>{if(u.target!=null&&typeof u.target.result=="string"){let f;try{f=Pd.parseFile(u.target.result,"localfile"),s.setXDIFile(f);const h={id:e,beamline:{name:f.beamline},edge:f.edge,element:f.element,sample:f.build_sample(),start_time:f.date};t.setXASMetadata(h)}catch(h){console.log(h)}}},i(l.target.files[0].name),c.readAsText(l.target.files[0])}};return E.jsx(Mu,{elevation:3,variant:"outlined",square:!1,sx:{p:2},children:E.jsxs(lo,{spacing:2,sx:{justifyContent:"flex-start",alignItems:"flex-start"},children:[E.jsx(ar,{variant:"h5",children:"Upload XDI File"}),E.jsxs(lo,{direction:"row",component:"form",onSubmit:o,spacing:1,children:[E.jsx(one,{margin:"dense",sx:{width:"75%"},id:"xdi-url",label:"XDI file URL",variant:"outlined",value:e,onChange:l=>{n(l.target.value)}}),E.jsx(du,{variant:"contained",type:"submit",children:"Fetch"})]}),E.jsxs(du,{variant:"contained",role:void 0,tabIndex:-1,component:"label",children:["Upload Local File",E.jsx(JEe,{type:"file",name:"file1",onChange:a})]}),E.jsx(ar,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:r})]})})}function e2e(){const[t,e]=R.useState(null);return E.jsxs(lo,{spacing:2,children:[E.jsx(QEe,{setXASMetadata:e}),t&&E.jsx(GR,{standard:t,showDownload:!1,showCompare:!1})]})}function t2e(){const[t,e]=R.useState(null);return E.jsx(HR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ca,{height:"100%",container:!0,children:[E.jsx(Ca,{item:!0,lg:5,md:12,padding:1,children:E.jsx(e2e,{})}),E.jsx(Ca,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(kP,{})})]})})}function n2e(){const e=rh().pathname.slice(5),[n,r]=R.useState(null),s=R.useContext(XR).find(o=>o.location===e);return R.useEffect(()=>{Nn.get("/webxdiviewer/xdidata/"+e).then(o=>{let a=null;try{a=Pd.parseFile(o.data,e)}catch{console.log("Could not read {}",focus)}r(a)})},[e]),E.jsx(HR,{value:{xdiFile:n,setXDIFile:r,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ca,{height:"100%",container:!0,children:[E.jsx(Ca,{item:!0,lg:5,md:12,padding:1,children:s?E.jsx(GR,{standard:s,showDownload:!0,showCompare:!1}):E.jsxs(ar,{children:[" Could not find ",e," "]})}),E.jsx(Ca,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(kP,{})})]})})}function r2e(){const t=Zz("(prefers-color-scheme: dark)"),[e,n]=R.useState(t?"dark":"light"),r=R.useMemo(()=>({toggleColorMode:()=>{n(s=>s==="light"?"dark":"light")}}),[]),i=R.useMemo(()=>IR({palette:{mode:e}}),[e]);return E.jsxs(aK,{theme:i,children:[E.jsx(cJ,{}),E.jsxs(lo,{height:"100vh",width:"100vw",spacing:1,children:[E.jsx(ZEe,{colorMode:e,toggleColorMode:r.toggleColorMode}),E.jsx(Fre,{children:E.jsxs(Kne,{children:[E.jsx(bp,{path:"/",element:E.jsx(YEe,{})}),E.jsx(bp,{path:"/view",element:E.jsx(XEe,{})}),E.jsx(bp,{path:"/xdiviewer",element:E.jsx(t2e,{})}),E.jsx(bp,{path:"/xdi/:id/*",element:E.jsx(n2e,{})})]})})]})]})}rR(document.getElementById("root")).render(E.jsx(R.StrictMode,{children:E.jsx(ire,{children:E.jsx(r2e,{})})})); diff --git a/index.html b/index.html index 53cea82..558ffe9 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Web XDI Viewer - +