From cae092e9a4048ff07cc4332522c68858321c5202 Mon Sep 17 00:00:00 2001 From: jacobfilik Date: Mon, 28 Oct 2024 14:23:33 +0000 Subject: [PATCH] deploy: 4538cdadf8364c476afd3a1940fbca43b236bedb --- .../{index-BWHJTPSl.js => index-CKlMhPxX.js} | 492 +++++++++--------- index.html | 2 +- 2 files changed, 247 insertions(+), 247 deletions(-) rename assets/{index-BWHJTPSl.js => index-CKlMhPxX.js} (78%) diff --git a/assets/index-BWHJTPSl.js b/assets/index-CKlMhPxX.js similarity index 78% rename from assets/index-BWHJTPSl.js rename to assets/index-CKlMhPxX.js index d3e139b..c1a339f 100644 --- a/assets/index-BWHJTPSl.js +++ b/assets/index-CKlMhPxX.js @@ -1,4 +1,4 @@ -var hj=Object.defineProperty;var Z3=t=>{throw TypeError(t)};var pj=(t,e,n)=>e in t?hj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Vt=(t,e,n)=>pj(t,typeof e!="symbol"?e+"":e,n),cS=(t,e,n)=>e.has(t)||Z3("Cannot "+n);var Vo=(t,e,n)=>(cS(t,e,"read from private field"),n?n.call(t):e.get(t)),uS=(t,e,n)=>e.has(t)?Z3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),L0=(t,e,n,r)=>(cS(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),fS=(t,e,n)=>(cS(t,e,"access private method"),n);function mj(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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var k0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ws(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 f5={exports:{}},$x={},d5={exports:{}},Gt={};/** +var pj=Object.defineProperty;var Z3=t=>{throw TypeError(t)};var mj=(t,e,n)=>e in t?pj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Vt=(t,e,n)=>mj(t,typeof e!="symbol"?e+"":e,n),cS=(t,e,n)=>e.has(t)||Z3("Cannot "+n);var Vo=(t,e,n)=>(cS(t,e,"read from private field"),n?n.call(t):e.get(t)),uS=(t,e,n)=>e.has(t)?Z3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),L0=(t,e,n,r)=>(cS(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),fS=(t,e,n)=>(cS(t,e,"access private method"),n);function gj(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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var k0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ws(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 f5={exports:{}},$x={},d5={exports:{}},Gt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var hj=Object.defineProperty;var Z3=t=>{throw TypeError(t)};var pj=(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 Ym=Symbol.for("react.element"),gj=Symbol.for("react.portal"),vj=Symbol.for("react.fragment"),yj=Symbol.for("react.strict_mode"),xj=Symbol.for("react.profiler"),bj=Symbol.for("react.provider"),_j=Symbol.for("react.context"),wj=Symbol.for("react.forward_ref"),Sj=Symbol.for("react.suspense"),Mj=Symbol.for("react.memo"),Ej=Symbol.for("react.lazy"),J3=Symbol.iterator;function Cj(t){return t===null||typeof t!="object"?null:(t=J3&&t[J3]||t["@@iterator"],typeof t=="function"?t:null)}var h5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p5=Object.assign,m5={};function Dd(t,e,n){this.props=t,this.context=e,this.refs=m5,this.updater=n||h5}Dd.prototype.isReactComponent={};Dd.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")};Dd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function g5(){}g5.prototype=Dd.prototype;function QC(t,e,n){this.props=t,this.context=e,this.refs=m5,this.updater=n||h5}var eT=QC.prototype=new g5;eT.constructor=QC;p5(eT,Dd.prototype);eT.isPureReactComponent=!0;var Q3=Array.isArray,v5=Object.prototype.hasOwnProperty,tT={current:null},y5={key:!0,ref:!0,__self:!0,__source:!0};function x5(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)v5.call(e,r)&&!y5.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1{throw TypeError(t)};var pj=(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 Nj=A,Ij=Symbol.for("react.element"),Lj=Symbol.for("react.fragment"),kj=Object.prototype.hasOwnProperty,Oj=Nj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Dj={key:!0,ref:!0,__self:!0,__source:!0};function _5(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)kj.call(e,r)&&!Dj.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:Ij,type:t,key:o,ref:s,props:i,_owner:Oj.current}}$x.Fragment=Lj;$x.jsx=_5;$x.jsxs=_5;f5.exports=$x;var C=f5.exports,w5={exports:{}},so={},S5={exports:{}},M5={};/** + */var Ij=A,Lj=Symbol.for("react.element"),kj=Symbol.for("react.fragment"),Oj=Object.prototype.hasOwnProperty,Dj=Ij.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Fj={key:!0,ref:!0,__self:!0,__source:!0};function _5(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)Oj.call(e,r)&&!Fj.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:Lj,type:t,key:o,ref:s,props:i,_owner:Dj.current}}$x.Fragment=kj;$x.jsx=_5;$x.jsxs=_5;f5.exports=$x;var C=f5.exports,w5={exports:{}},so={},S5={exports:{}},M5={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var hj=Object.defineProperty;var Z3=t=>{throw TypeError(t)};var pj=(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,Y){var K=F.length;F.push(Y);e:for(;0>>1,me=F[ee];if(0>>1;eei(ae,K))gei(Me,ae)?(F[ee]=Me,F[ge]=K,ee=ge):(F[ee]=ae,F[Q]=K,ee=Q);else if(gei(Me,K))F[ee]=Me,F[ge]=K,ee=ge;else break e}}return Y}function i(F,Y){var K=F.sortIndex-Y.sortIndex;return K!==0?K:F.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,x=!1,y=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 Y=n(c);Y!==null;){if(Y.callback===null)r(c);else if(Y.startTime<=F)r(c),Y.sortIndex=Y.expirationTime,e(l,Y);else break;Y=n(c)}}function S(F){if(x=!1,_(F),!v)if(n(l)!==null)v=!0,H(P);else{var Y=n(c);Y!==null&&Z(S,Y.startTime-F)}}function P(F,Y){v=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(Y),f=n(l);f!==null&&(!(f.expirationTime>Y)||F&&!R());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,h=f.priorityLevel;var me=ee(f.expirationTime<=Y);Y=t.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),_(Y)}else r(l);f=n(l)}if(f!==null)var le=!0;else{var Q=n(c);Q!==null&&Z(S,Q.startTime-Y),le=!1}return le}finally{f=null,h=K,m=!1}}var N=!1,T=null,L=-1,U=5,M=-1;function R(){return!(t.unstable_now()-MF||125ee?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-ee))):(F.sortIndex=me,e(l,F),v||m||(v=!0,H(P))),F},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(F){var Y=h;return function(){var K=h;h=Y;try{return F.apply(this,arguments)}finally{h=K}}}})(M5);S5.exports=M5;var Fj=S5.exports;/** + */(function(t){function e(F,Y){var K=F.length;F.push(Y);e:for(;0>>1,me=F[ee];if(0>>1;eei(ae,K))gei(Me,ae)?(F[ee]=Me,F[ge]=K,ee=ge):(F[ee]=ae,F[Q]=K,ee=Q);else if(gei(Me,K))F[ee]=Me,F[ge]=K,ee=ge;else break e}}return Y}function i(F,Y){var K=F.sortIndex-Y.sortIndex;return K!==0?K:F.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,x=!1,y=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 Y=n(c);Y!==null;){if(Y.callback===null)r(c);else if(Y.startTime<=F)r(c),Y.sortIndex=Y.expirationTime,e(l,Y);else break;Y=n(c)}}function S(F){if(x=!1,_(F),!v)if(n(l)!==null)v=!0,H(P);else{var Y=n(c);Y!==null&&Z(S,Y.startTime-F)}}function P(F,Y){v=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(Y),f=n(l);f!==null&&(!(f.expirationTime>Y)||F&&!R());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,h=f.priorityLevel;var me=ee(f.expirationTime<=Y);Y=t.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),_(Y)}else r(l);f=n(l)}if(f!==null)var le=!0;else{var Q=n(c);Q!==null&&Z(S,Q.startTime-Y),le=!1}return le}finally{f=null,h=K,m=!1}}var N=!1,T=null,L=-1,U=5,M=-1;function R(){return!(t.unstable_now()-MF||125ee?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-ee))):(F.sortIndex=me,e(l,F),v||m||(v=!0,H(P))),F},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(F){var Y=h;return function(){var K=h;h=Y;try{return F.apply(this,arguments)}finally{h=K}}}})(M5);S5.exports=M5;var zj=S5.exports;/** * @license React * react-dom.production.min.js * @@ -30,26 +30,26 @@ var hj=Object.defineProperty;var Z3=t=>{throw TypeError(t)};var pj=(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 zj=A,no=Fj;function Be(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"),UE=Object.prototype.hasOwnProperty,Uj=/^[: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]*$/,tN={},nN={};function Bj(t){return UE.call(nN,t)?!0:UE.call(tN,t)?!1:Uj.test(t)?nN[t]=!0:(tN[t]=!0,!1)}function jj(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 Vj(t,e,n,r){if(e===null||typeof e>"u"||jj(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 hi(t,e,n,r,i,o,s){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=o,this.removeEmptyString=s}var Nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Nr[t]=new hi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Nr[e]=new hi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Nr[t]=new hi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Nr[t]=new hi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Nr[t]=new hi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Nr[t]=new hi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Nr[t]=new hi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Nr[t]=new hi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Nr[t]=new hi(t,5,!1,t.toLowerCase(),null,!1,!1)});var rT=/[\-:]([a-z])/g;function iT(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(rT,iT);Nr[e]=new hi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(rT,iT);Nr[e]=new hi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(rT,iT);Nr[e]=new hi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Nr[t]=new hi(t,1,!1,t.toLowerCase(),null,!1,!1)});Nr.xlinkHref=new hi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Nr[t]=new hi(t,1,!1,t.toLowerCase(),null,!0,!0)});function oT(t,e,n,r){var i=Nr.hasOwnProperty(e)?Nr[e]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),UE=Object.prototype.hasOwnProperty,Bj=/^[: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]*$/,tN={},nN={};function jj(t){return UE.call(nN,t)?!0:UE.call(tN,t)?!1:Bj.test(t)?nN[t]=!0:(tN[t]=!0,!1)}function Vj(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 $j(t,e,n,r){if(e===null||typeof e>"u"||Vj(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 hi(t,e,n,r,i,o,s){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=o,this.removeEmptyString=s}var Nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Nr[t]=new hi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Nr[e]=new hi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Nr[t]=new hi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Nr[t]=new hi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Nr[t]=new hi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Nr[t]=new hi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Nr[t]=new hi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Nr[t]=new hi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Nr[t]=new hi(t,5,!1,t.toLowerCase(),null,!1,!1)});var rT=/[\-:]([a-z])/g;function iT(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(rT,iT);Nr[e]=new hi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(rT,iT);Nr[e]=new hi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(rT,iT);Nr[e]=new hi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Nr[t]=new hi(t,1,!1,t.toLowerCase(),null,!1,!1)});Nr.xlinkHref=new hi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Nr[t]=new hi(t,1,!1,t.toLowerCase(),null,!0,!0)});function oT(t,e,n,r){var i=Nr.hasOwnProperty(e)?Nr[e]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{pS=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ap(t):""}function $j(t){switch(t.tag){case 5:return ap(t.type);case 16:return ap("Lazy");case 13:return ap("Suspense");case 19:return ap("SuspenseList");case 0:case 2:case 15:return t=mS(t.type,!1),t;case 11:return t=mS(t.type.render,!1),t;case 1:return t=mS(t.type,!0),t;default:return""}}function $E(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 Pf:return"Fragment";case Af:return"Portal";case BE:return"Profiler";case sT:return"StrictMode";case jE:return"Suspense";case VE:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case T5:return(t.displayName||"Context")+".Consumer";case C5:return(t._context.displayName||"Context")+".Provider";case aT:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case lT:return e=t.displayName||null,e!==null?e:$E(t.type)||"Memo";case ll:e=t._payload,t=t._init;try{return $E(t(e))}catch{}}return null}function Wj(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 $E(e);case 8:return e===sT?"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 Al(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function A5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Hj(t){var e=A5(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,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function F0(t){t._valueTracker||(t._valueTracker=Hj(t))}function P5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=A5(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Gy(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 WE(t,e){var n=e.checked;return On({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function iN(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Al(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 N5(t,e){e=e.checked,e!=null&&oT(t,"checked",e,!1)}function HE(t,e){N5(t,e);var n=Al(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")?GE(t,e.type,n):e.hasOwnProperty("defaultValue")&&GE(t,e.type,Al(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function oN(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 GE(t,e,n){(e!=="number"||Gy(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var lp=Array.isArray;function Kf(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=z0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Xp(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var vp={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},Gj=["Webkit","ms","Moz","O"];Object.keys(vp).forEach(function(t){Gj.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),vp[e]=vp[t]})});function O5(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||vp.hasOwnProperty(t)&&vp[t]?(""+e).trim():e+"px"}function D5(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=O5(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Xj=On({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 YE(t,e){if(e){if(Xj[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Be(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Be(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Be(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Be(62))}}function KE(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 ZE=null;function cT(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var JE=null,Zf=null,Jf=null;function lN(t){if(t=Jm(t)){if(typeof JE!="function")throw Error(Be(280));var e=t.stateNode;e&&(e=qx(e),JE(t.stateNode,t.type,e))}}function F5(t){Zf?Jf?Jf.push(t):Jf=[t]:Zf=t}function z5(){if(Zf){var t=Zf,e=Jf;if(Jf=Zf=null,lN(t),e)for(t=0;t>>=0,t===0?32:31-(iV(t)/oV|0)|0}var U0=64,B0=4194304;function cp(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 Ky(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=cp(a):(o&=s,o!==0&&(r=cp(o)))}else s=n&~i,s!==0?r=cp(s):o!==0&&(r=cp(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&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 Km(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ts(e),t[e]=n}function cV(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=xp),vN=" ",yN=!1;function iD(t,e){switch(t){case"keyup":return FV.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oD(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Nf=!1;function UV(t,e){switch(t){case"compositionend":return oD(e);case"keypress":return e.which!==32?null:(yN=!0,vN);case"textInput":return t=e.data,t===vN&&yN?null:t;default:return null}}function BV(t,e){if(Nf)return t==="compositionend"||!vT&&iD(t,e)?(t=nD(),vy=pT=pl=null,Nf=!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=wN(n)}}function cD(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?cD(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function uD(){for(var t=window,e=Gy();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Gy(t.document)}return e}function yT(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 YV(t){var e=uD(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&cD(n.ownerDocument.documentElement,n)){if(r!==null&&yT(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,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=SN(n,o);var s=SN(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.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,If=null,i2=null,_p=null,o2=!1;function MN(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o2||If==null||If!==Gy(r)||(r=If,"selectionStart"in r&&yT(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}),_p&&Qp(_p,r)||(_p=r,r=Qy(i2,"onSelect"),0Of||(t.current=f2[Of],f2[Of]=null,Of--)}function bn(t,e){Of++,f2[Of]=t.current,t.current=e}var Pl={},Yr=zl(Pl),Ri=zl(!1),Jc=Pl;function ud(t,e){var n=t.type.contextTypes;if(!n)return Pl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ai(t){return t=t.childContextTypes,t!=null}function t1(){Sn(Ri),Sn(Yr)}function NN(t,e,n){if(Yr.current!==Pl)throw Error(Be(168));bn(Yr,e),bn(Ri,n)}function xD(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(Be(108,Wj(t)||"Unknown",i));return On({},n,r)}function n1(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Pl,Jc=Yr.current,bn(Yr,t),bn(Ri,Ri.current),!0}function IN(t,e,n){var r=t.stateNode;if(!r)throw Error(Be(169));n?(t=xD(t,e,Jc),r.__reactInternalMemoizedMergedChildContext=t,Sn(Ri),Sn(Yr),bn(Yr,t)):Sn(Ri),bn(Ri,n)}var ua=null,Yx=!1,AS=!1;function bD(t){ua===null?ua=[t]:ua.push(t)}function a$(t){Yx=!0,bD(t)}function Ul(){if(!AS&&ua!==null){AS=!0;var t=0,e=dn;try{var n=ua;for(dn=1;t>=s,i-=s,ma=1<<32-ts(e)+i|n<L?(U=T,T=null):U=T.sibling;var M=h(g,T,_[L],S);if(M===null){T===null&&(T=U);break}t&&T&&M.alternate===null&&e(g,T),b=o(M,b,L),N===null?P=M:N.sibling=M,N=M,T=U}if(L===_.length)return n(g,T),Tn&&mc(g,L),P;if(T===null){for(;L<_.length;L++)T=f(g,_[L],S),T!==null&&(b=o(T,b,L),N===null?P=T:N.sibling=T,N=T);return Tn&&mc(g,L),P}for(T=r(g,T);L<_.length;L++)U=m(T,g,L,_[L],S),U!==null&&(t&&U.alternate!==null&&T.delete(U.key===null?L:U.key),b=o(U,b,L),N===null?P=U:N.sibling=U,N=U);return t&&T.forEach(function(R){return e(g,R)}),Tn&&mc(g,L),P}function x(g,b,_,S){var P=Ch(_);if(typeof P!="function")throw Error(Be(150));if(_=P.call(_),_==null)throw Error(Be(151));for(var N=P=null,T=b,L=b=0,U=null,M=_.next();T!==null&&!M.done;L++,M=_.next()){T.index>L?(U=T,T=null):U=T.sibling;var R=h(g,T,M.value,S);if(R===null){T===null&&(T=U);break}t&&T&&R.alternate===null&&e(g,T),b=o(R,b,L),N===null?P=R:N.sibling=R,N=R,T=U}if(M.done)return n(g,T),Tn&&mc(g,L),P;if(T===null){for(;!M.done;L++,M=_.next())M=f(g,M.value,S),M!==null&&(b=o(M,b,L),N===null?P=M:N.sibling=M,N=M);return Tn&&mc(g,L),P}for(T=r(g,T);!M.done;L++,M=_.next())M=m(T,g,L,M.value,S),M!==null&&(t&&M.alternate!==null&&T.delete(M.key===null?L:M.key),b=o(M,b,L),N===null?P=M:N.sibling=M,N=M);return t&&T.forEach(function(D){return e(g,D)}),Tn&&mc(g,L),P}function y(g,b,_,S){if(typeof _=="object"&&_!==null&&_.type===Pf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case D0:e:{for(var P=_.key,N=b;N!==null;){if(N.key===P){if(P=_.type,P===Pf){if(N.tag===7){n(g,N.sibling),b=i(N,_.props.children),b.return=g,g=b;break e}}else if(N.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ll&&ON(P)===N.type){n(g,N.sibling),b=i(N,_.props),b.ref=Nh(g,N,_),b.return=g,g=b;break e}n(g,N);break}else e(g,N);N=N.sibling}_.type===Pf?(b=Fc(_.props.children,g.mode,S,_.key),b.return=g,g=b):(S=Ey(_.type,_.key,_.props,null,g.mode,S),S.ref=Nh(g,b,_),S.return=g,g=S)}return s(g);case Af:e:{for(N=_.key;b!==null;){if(b.key===N)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=FS(_,g.mode,S),b.return=g,g=b}return s(g);case ll:return N=_._init,y(g,b,N(_._payload),S)}if(lp(_))return v(g,b,_,S);if(Ch(_))return x(g,b,_,S);X0(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=DS(_,g.mode,S),b.return=g,g=b),s(g)):n(g,b)}return y}var dd=MD(!0),ED=MD(!1),o1=zl(null),s1=null,zf=null,wT=null;function ST(){wT=zf=s1=null}function MT(t){var e=o1.current;Sn(o1),t._currentValue=e}function p2(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 ed(t,e){s1=t,wT=zf=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Ci=!0),t.firstContext=null)}function Io(t){var e=t._currentValue;if(wT!==t)if(t={context:t,memoizedValue:e,next:null},zf===null){if(s1===null)throw Error(Be(308));zf=t,s1.dependencies={lanes:0,firstContext:t}}else zf=zf.next=t;return e}var Tc=null;function ET(t){Tc===null?Tc=[t]:Tc.push(t)}function CD(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,ET(e)):(n.next=i.next,i.next=n),e.interleaved=n,Ca(t,r)}function Ca(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 cl=!1;function CT(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function TD(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 ba(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function wl(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,en&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Ca(t,n)}return i=r.interleaved,i===null?(e.next=e,ET(r)):(e.next=i.next,i.next=e),r.interleaved=e,Ca(t,n)}function xy(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,fT(t,n)}}function DN(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 a1(t,e,n,r){var i=t.updateQueue;cl=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,u=c=l=null,a=o;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 v=t,x=a;switch(h=e,m=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){f=v.call(m,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,h=typeof v=="function"?v.call(m,f,h):v,h==null)break e;f=On({},f,h);break e;case 2:cl=!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,s|=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 s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);tu|=s,t.lanes=s,t.memoizedState=f}}function FN(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=NS.transition;NS.transition={};try{t(!1),e()}finally{dn=n,NS.transition=r}}function WD(){return Lo().memoizedState}function f$(t,e,n){var r=Ml(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},HD(t))GD(e,n);else if(n=CD(t,e,n,r),n!==null){var i=ci();ns(n,t,r,i),XD(n,e,r)}}function d$(t,e,n){var r=Ml(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(HD(t))GD(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,is(a,s)){var l=e.interleaved;l===null?(i.next=i,ET(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=CD(t,e,i,r),n!==null&&(i=ci(),ns(n,t,r,i),XD(n,e,r))}}function HD(t){var e=t.alternate;return t===Ln||e!==null&&e===Ln}function GD(t,e){wp=c1=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function XD(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,fT(t,n)}}var u1={readContext:Io,useCallback:Ur,useContext:Ur,useEffect:Ur,useImperativeHandle:Ur,useInsertionEffect:Ur,useLayoutEffect:Ur,useMemo:Ur,useReducer:Ur,useRef:Ur,useState:Ur,useDebugValue:Ur,useDeferredValue:Ur,useTransition:Ur,useMutableSource:Ur,useSyncExternalStore:Ur,useId:Ur,unstable_isNewReconciler:!1},h$={readContext:Io,useCallback:function(t,e){return Ss().memoizedState=[t,e===void 0?null:e],t},useContext:Io,useEffect:UN,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,_y(4194308,4,UD.bind(null,e,t),n)},useLayoutEffect:function(t,e){return _y(4194308,4,t,e)},useInsertionEffect:function(t,e){return _y(4,2,t,e)},useMemo:function(t,e){var n=Ss();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ss();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=f$.bind(null,Ln,t),[r.memoizedState,t]},useRef:function(t){var e=Ss();return t={current:t},e.memoizedState=t},useState:zN,useDebugValue:kT,useDeferredValue:function(t){return Ss().memoizedState=t},useTransition:function(){var t=zN(!1),e=t[0];return t=u$.bind(null,t[1]),Ss().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ln,i=Ss();if(Tn){if(n===void 0)throw Error(Be(407));n=n()}else{if(n=e(),br===null)throw Error(Be(349));eu&30||ND(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,UN(LD.bind(null,r,o,t),[t]),r.flags|=2048,am(9,ID.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Ss(),e=br.identifierPrefix;if(Tn){var n=ga,r=ma;n=(r&~(1<<32-ts(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=om++,0")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{pS=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ap(t):""}function Wj(t){switch(t.tag){case 5:return ap(t.type);case 16:return ap("Lazy");case 13:return ap("Suspense");case 19:return ap("SuspenseList");case 0:case 2:case 15:return t=mS(t.type,!1),t;case 11:return t=mS(t.type.render,!1),t;case 1:return t=mS(t.type,!0),t;default:return""}}function $E(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 Pf:return"Fragment";case Af:return"Portal";case BE:return"Profiler";case sT:return"StrictMode";case jE:return"Suspense";case VE:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case T5:return(t.displayName||"Context")+".Consumer";case C5:return(t._context.displayName||"Context")+".Provider";case aT:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case lT:return e=t.displayName||null,e!==null?e:$E(t.type)||"Memo";case ll:e=t._payload,t=t._init;try{return $E(t(e))}catch{}}return null}function Hj(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 $E(e);case 8:return e===sT?"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 Al(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function A5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Gj(t){var e=A5(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,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function F0(t){t._valueTracker||(t._valueTracker=Gj(t))}function P5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=A5(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Gy(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 WE(t,e){var n=e.checked;return On({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function iN(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Al(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 N5(t,e){e=e.checked,e!=null&&oT(t,"checked",e,!1)}function HE(t,e){N5(t,e);var n=Al(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")?GE(t,e.type,n):e.hasOwnProperty("defaultValue")&&GE(t,e.type,Al(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function oN(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 GE(t,e,n){(e!=="number"||Gy(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var lp=Array.isArray;function Kf(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=z0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Xp(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var vp={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},Xj=["Webkit","ms","Moz","O"];Object.keys(vp).forEach(function(t){Xj.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),vp[e]=vp[t]})});function O5(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||vp.hasOwnProperty(t)&&vp[t]?(""+e).trim():e+"px"}function D5(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=O5(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var qj=On({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 YE(t,e){if(e){if(qj[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Be(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Be(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Be(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Be(62))}}function KE(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 ZE=null;function cT(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var JE=null,Zf=null,Jf=null;function lN(t){if(t=Jm(t)){if(typeof JE!="function")throw Error(Be(280));var e=t.stateNode;e&&(e=qx(e),JE(t.stateNode,t.type,e))}}function F5(t){Zf?Jf?Jf.push(t):Jf=[t]:Zf=t}function z5(){if(Zf){var t=Zf,e=Jf;if(Jf=Zf=null,lN(t),e)for(t=0;t>>=0,t===0?32:31-(oV(t)/sV|0)|0}var U0=64,B0=4194304;function cp(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 Ky(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=cp(a):(o&=s,o!==0&&(r=cp(o)))}else s=n&~i,s!==0?r=cp(s):o!==0&&(r=cp(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&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 Km(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ts(e),t[e]=n}function uV(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=xp),vN=" ",yN=!1;function iD(t,e){switch(t){case"keyup":return zV.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oD(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Nf=!1;function BV(t,e){switch(t){case"compositionend":return oD(e);case"keypress":return e.which!==32?null:(yN=!0,vN);case"textInput":return t=e.data,t===vN&&yN?null:t;default:return null}}function jV(t,e){if(Nf)return t==="compositionend"||!vT&&iD(t,e)?(t=nD(),vy=pT=pl=null,Nf=!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=wN(n)}}function cD(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?cD(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function uD(){for(var t=window,e=Gy();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Gy(t.document)}return e}function yT(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 KV(t){var e=uD(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&cD(n.ownerDocument.documentElement,n)){if(r!==null&&yT(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,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=SN(n,o);var s=SN(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.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,If=null,i2=null,_p=null,o2=!1;function MN(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o2||If==null||If!==Gy(r)||(r=If,"selectionStart"in r&&yT(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}),_p&&Qp(_p,r)||(_p=r,r=Qy(i2,"onSelect"),0Of||(t.current=f2[Of],f2[Of]=null,Of--)}function bn(t,e){Of++,f2[Of]=t.current,t.current=e}var Pl={},Yr=zl(Pl),Ri=zl(!1),Jc=Pl;function ud(t,e){var n=t.type.contextTypes;if(!n)return Pl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ai(t){return t=t.childContextTypes,t!=null}function t1(){Sn(Ri),Sn(Yr)}function NN(t,e,n){if(Yr.current!==Pl)throw Error(Be(168));bn(Yr,e),bn(Ri,n)}function xD(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(Be(108,Hj(t)||"Unknown",i));return On({},n,r)}function n1(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Pl,Jc=Yr.current,bn(Yr,t),bn(Ri,Ri.current),!0}function IN(t,e,n){var r=t.stateNode;if(!r)throw Error(Be(169));n?(t=xD(t,e,Jc),r.__reactInternalMemoizedMergedChildContext=t,Sn(Ri),Sn(Yr),bn(Yr,t)):Sn(Ri),bn(Ri,n)}var ua=null,Yx=!1,AS=!1;function bD(t){ua===null?ua=[t]:ua.push(t)}function l$(t){Yx=!0,bD(t)}function Ul(){if(!AS&&ua!==null){AS=!0;var t=0,e=dn;try{var n=ua;for(dn=1;t>=s,i-=s,ma=1<<32-ts(e)+i|n<L?(U=T,T=null):U=T.sibling;var M=h(g,T,_[L],S);if(M===null){T===null&&(T=U);break}t&&T&&M.alternate===null&&e(g,T),b=o(M,b,L),N===null?P=M:N.sibling=M,N=M,T=U}if(L===_.length)return n(g,T),Tn&&mc(g,L),P;if(T===null){for(;L<_.length;L++)T=f(g,_[L],S),T!==null&&(b=o(T,b,L),N===null?P=T:N.sibling=T,N=T);return Tn&&mc(g,L),P}for(T=r(g,T);L<_.length;L++)U=m(T,g,L,_[L],S),U!==null&&(t&&U.alternate!==null&&T.delete(U.key===null?L:U.key),b=o(U,b,L),N===null?P=U:N.sibling=U,N=U);return t&&T.forEach(function(R){return e(g,R)}),Tn&&mc(g,L),P}function x(g,b,_,S){var P=Ch(_);if(typeof P!="function")throw Error(Be(150));if(_=P.call(_),_==null)throw Error(Be(151));for(var N=P=null,T=b,L=b=0,U=null,M=_.next();T!==null&&!M.done;L++,M=_.next()){T.index>L?(U=T,T=null):U=T.sibling;var R=h(g,T,M.value,S);if(R===null){T===null&&(T=U);break}t&&T&&R.alternate===null&&e(g,T),b=o(R,b,L),N===null?P=R:N.sibling=R,N=R,T=U}if(M.done)return n(g,T),Tn&&mc(g,L),P;if(T===null){for(;!M.done;L++,M=_.next())M=f(g,M.value,S),M!==null&&(b=o(M,b,L),N===null?P=M:N.sibling=M,N=M);return Tn&&mc(g,L),P}for(T=r(g,T);!M.done;L++,M=_.next())M=m(T,g,L,M.value,S),M!==null&&(t&&M.alternate!==null&&T.delete(M.key===null?L:M.key),b=o(M,b,L),N===null?P=M:N.sibling=M,N=M);return t&&T.forEach(function(D){return e(g,D)}),Tn&&mc(g,L),P}function y(g,b,_,S){if(typeof _=="object"&&_!==null&&_.type===Pf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case D0:e:{for(var P=_.key,N=b;N!==null;){if(N.key===P){if(P=_.type,P===Pf){if(N.tag===7){n(g,N.sibling),b=i(N,_.props.children),b.return=g,g=b;break e}}else if(N.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ll&&ON(P)===N.type){n(g,N.sibling),b=i(N,_.props),b.ref=Nh(g,N,_),b.return=g,g=b;break e}n(g,N);break}else e(g,N);N=N.sibling}_.type===Pf?(b=Fc(_.props.children,g.mode,S,_.key),b.return=g,g=b):(S=Ey(_.type,_.key,_.props,null,g.mode,S),S.ref=Nh(g,b,_),S.return=g,g=S)}return s(g);case Af:e:{for(N=_.key;b!==null;){if(b.key===N)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=FS(_,g.mode,S),b.return=g,g=b}return s(g);case ll:return N=_._init,y(g,b,N(_._payload),S)}if(lp(_))return v(g,b,_,S);if(Ch(_))return x(g,b,_,S);X0(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=DS(_,g.mode,S),b.return=g,g=b),s(g)):n(g,b)}return y}var dd=MD(!0),ED=MD(!1),o1=zl(null),s1=null,zf=null,wT=null;function ST(){wT=zf=s1=null}function MT(t){var e=o1.current;Sn(o1),t._currentValue=e}function p2(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 ed(t,e){s1=t,wT=zf=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Ci=!0),t.firstContext=null)}function Io(t){var e=t._currentValue;if(wT!==t)if(t={context:t,memoizedValue:e,next:null},zf===null){if(s1===null)throw Error(Be(308));zf=t,s1.dependencies={lanes:0,firstContext:t}}else zf=zf.next=t;return e}var Tc=null;function ET(t){Tc===null?Tc=[t]:Tc.push(t)}function CD(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,ET(e)):(n.next=i.next,i.next=n),e.interleaved=n,Ca(t,r)}function Ca(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 cl=!1;function CT(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function TD(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 ba(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function wl(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,en&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Ca(t,n)}return i=r.interleaved,i===null?(e.next=e,ET(r)):(e.next=i.next,i.next=e),r.interleaved=e,Ca(t,n)}function xy(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,fT(t,n)}}function DN(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 a1(t,e,n,r){var i=t.updateQueue;cl=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,u=c=l=null,a=o;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 v=t,x=a;switch(h=e,m=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){f=v.call(m,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,h=typeof v=="function"?v.call(m,f,h):v,h==null)break e;f=On({},f,h);break e;case 2:cl=!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,s|=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 s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);tu|=s,t.lanes=s,t.memoizedState=f}}function FN(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=NS.transition;NS.transition={};try{t(!1),e()}finally{dn=n,NS.transition=r}}function WD(){return Lo().memoizedState}function d$(t,e,n){var r=Ml(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},HD(t))GD(e,n);else if(n=CD(t,e,n,r),n!==null){var i=ci();ns(n,t,r,i),XD(n,e,r)}}function h$(t,e,n){var r=Ml(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(HD(t))GD(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,is(a,s)){var l=e.interleaved;l===null?(i.next=i,ET(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=CD(t,e,i,r),n!==null&&(i=ci(),ns(n,t,r,i),XD(n,e,r))}}function HD(t){var e=t.alternate;return t===Ln||e!==null&&e===Ln}function GD(t,e){wp=c1=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function XD(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,fT(t,n)}}var u1={readContext:Io,useCallback:Ur,useContext:Ur,useEffect:Ur,useImperativeHandle:Ur,useInsertionEffect:Ur,useLayoutEffect:Ur,useMemo:Ur,useReducer:Ur,useRef:Ur,useState:Ur,useDebugValue:Ur,useDeferredValue:Ur,useTransition:Ur,useMutableSource:Ur,useSyncExternalStore:Ur,useId:Ur,unstable_isNewReconciler:!1},p$={readContext:Io,useCallback:function(t,e){return Ss().memoizedState=[t,e===void 0?null:e],t},useContext:Io,useEffect:UN,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,_y(4194308,4,UD.bind(null,e,t),n)},useLayoutEffect:function(t,e){return _y(4194308,4,t,e)},useInsertionEffect:function(t,e){return _y(4,2,t,e)},useMemo:function(t,e){var n=Ss();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ss();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=d$.bind(null,Ln,t),[r.memoizedState,t]},useRef:function(t){var e=Ss();return t={current:t},e.memoizedState=t},useState:zN,useDebugValue:kT,useDeferredValue:function(t){return Ss().memoizedState=t},useTransition:function(){var t=zN(!1),e=t[0];return t=f$.bind(null,t[1]),Ss().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ln,i=Ss();if(Tn){if(n===void 0)throw Error(Be(407));n=n()}else{if(n=e(),br===null)throw Error(Be(349));eu&30||ND(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,UN(LD.bind(null,r,o,t),[t]),r.flags|=2048,am(9,ID.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Ss(),e=br.identifierPrefix;if(Tn){var n=ga,r=ma;n=(r&~(1<<32-ts(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=om++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[Cs]=e,t[nm]=r,rF(t,e,!1,!1),e.stateNode=t;e:{switch(s=KE(n,r),n){case"dialog":_n("cancel",t),_n("close",t),i=r;break;case"iframe":case"object":case"embed":_n("load",t),i=r;break;case"video":case"audio":for(i=0;imd&&(e.flags|=128,r=!0,Ih(o,!1),e.lanes=4194304)}else{if(!r)if(t=l1(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ih(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Tn)return Br(e),null}else 2*Xn()-o.renderingStartTime>md&&n!==1073741824&&(e.flags|=128,r=!0,Ih(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Xn(),e.sibling=null,n=Nn.current,bn(Nn,r?n&1|2:n&1),e):(Br(e),null);case 22:case 23:return BT(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Gi&1073741824&&(Br(e),e.subtreeFlags&6&&(e.flags|=8192)):Br(e),null;case 24:return null;case 25:return null}throw Error(Be(156,e.tag))}function _$(t,e){switch(bT(e),e.tag){case 1:return Ai(e.type)&&t1(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return hd(),Sn(Ri),Sn(Yr),AT(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return RT(e),null;case 13:if(Sn(Nn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Be(340));fd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Sn(Nn),null;case 4:return hd(),null;case 10:return MT(e.type._context),null;case 22:case 23:return BT(),null;case 24:return null;default:return null}}var Y0=!1,Xr=!1,w$=typeof WeakSet=="function"?WeakSet:Set,at=null;function Uf(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Vn(t,e,r)}else n.current=null}function S2(t,e,n){try{n()}catch(r){Vn(t,e,r)}}var KN=!1;function S$(t,e){if(s2=Zy,t=uD(),yT(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=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=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=s),h===o&&++u===r&&(l=s),(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(a2={focusedElem:t,selectionRange:n},Zy=!1,at=e;at!==null;)if(e=at,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,at=t;else for(;at!==null;){e=at;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,y=v.memoizedState,g=e.stateNode,b=g.getSnapshotBeforeUpdate(e.elementType===e.type?x:qo(e.type,x),y);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(Be(163))}}catch(S){Vn(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,at=t;break}at=e.return}return v=KN,KN=!1,v}function Sp(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 o=i.destroy;i.destroy=void 0,o!==void 0&&S2(e,n,o)}i=i.next}while(i!==r)}}function Jx(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 M2(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[Cs],delete e[nm],delete e[u2],delete e[o$],delete e[s$])),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 aF(t){return t.tag===5||t.tag===3||t.tag===4}function ZN(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||aF(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 E2(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=e1));else if(r!==4&&(t=t.child,t!==null))for(E2(t,e,n),t=t.sibling;t!==null;)E2(t,e,n),t=t.sibling}function C2(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(C2(t,e,n),t=t.sibling;t!==null;)C2(t,e,n),t=t.sibling}var Cr=null,Ko=!1;function Ya(t,e,n){for(n=n.child;n!==null;)lF(t,e,n),n=n.sibling}function lF(t,e,n){if(Ns&&typeof Ns.onCommitFiberUnmount=="function")try{Ns.onCommitFiberUnmount(Wx,n)}catch{}switch(n.tag){case 5:Xr||Uf(n,e);case 6:var r=Cr,i=Ko;Cr=null,Ya(t,e,n),Cr=r,Ko=i,Cr!==null&&(Ko?(t=Cr,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Cr.removeChild(n.stateNode));break;case 18:Cr!==null&&(Ko?(t=Cr,n=n.stateNode,t.nodeType===8?RS(t.parentNode,n):t.nodeType===1&&RS(t,n),Zp(t)):RS(Cr,n.stateNode));break;case 4:r=Cr,i=Ko,Cr=n.stateNode.containerInfo,Ko=!0,Ya(t,e,n),Cr=r,Ko=i;break;case 0:case 11:case 14:case 15:if(!Xr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&S2(n,e,s),i=i.next}while(i!==r)}Ya(t,e,n);break;case 1:if(!Xr&&(Uf(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Vn(n,e,a)}Ya(t,e,n);break;case 21:Ya(t,e,n);break;case 22:n.mode&1?(Xr=(r=Xr)||n.memoizedState!==null,Ya(t,e,n),Xr=r):Ya(t,e,n);break;default:Ya(t,e,n)}}function JN(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new w$),e.forEach(function(r){var i=I$.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $o(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Xn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*E$(r/1960))-r,10t?16:t,ml===null)var r=!1;else{if(t=ml,ml=null,h1=0,en&6)throw Error(Be(331));var i=en;for(en|=4,at=t.current;at!==null;){var o=at,s=o.child;if(at.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lXn()-zT?Dc(t,0):FT|=n),Pi(t,e)}function gF(t,e){e===0&&(t.mode&1?(e=B0,B0<<=1,!(B0&130023424)&&(B0=4194304)):e=1);var n=ci();t=Ca(t,e),t!==null&&(Km(t,e,n),Pi(t,n))}function N$(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),gF(t,n)}function I$(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(Be(314))}r!==null&&r.delete(e),gF(t,n)}var vF;vF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ri.current)Ci=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ci=!1,x$(t,e,n);Ci=!!(t.flags&131072)}else Ci=!1,Tn&&e.flags&1048576&&_D(e,i1,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;wy(t,e),t=e.pendingProps;var i=ud(e,Yr.current);ed(e,n),i=NT(null,e,r,t,i,n);var o=IT();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,Ai(r)?(o=!0,n1(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,CT(e),i.updater=Zx,e.stateNode=i,i._reactInternals=e,g2(e,r,t,n),e=x2(null,e,r,!0,o,n)):(e.tag=0,Tn&&o&&xT(e),ii(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(wy(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=k$(r),t=qo(r,t),i){case 0:e=y2(null,e,r,t,n);break e;case 1:e=XN(null,e,r,t,n);break e;case 11:e=HN(null,e,r,t,n);break e;case 14:e=GN(null,e,r,qo(r.type,t),n);break e}throw Error(Be(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),y2(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),XN(t,e,r,i,n);case 3:e:{if(eF(e),t===null)throw Error(Be(387));r=e.pendingProps,o=e.memoizedState,i=o.element,TD(t,e),a1(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=pd(Error(Be(423)),e),e=qN(t,e,r,n,i);break e}else if(r!==i){i=pd(Error(Be(424)),e),e=qN(t,e,r,n,i);break e}else for(Ki=_l(e.stateNode.containerInfo.firstChild),Zi=e,Tn=!0,Zo=null,n=ED(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fd(),r===i){e=Ta(t,e,n);break e}ii(t,e,r,n)}e=e.child}return e;case 5:return RD(e),t===null&&h2(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,l2(r,i)?s=null:o!==null&&l2(r,o)&&(e.flags|=32),QD(t,e),ii(t,e,s,n),e.child;case 6:return t===null&&h2(e),null;case 13:return tF(t,e,n);case 4:return TT(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=dd(e,null,r,n):ii(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),HN(t,e,r,i,n);case 7:return ii(t,e,e.pendingProps,n),e.child;case 8:return ii(t,e,e.pendingProps.children,n),e.child;case 12:return ii(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,bn(o1,r._currentValue),r._currentValue=s,o!==null)if(is(o.value,s)){if(o.children===i.children&&!Ri.current){e=Ta(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ba(-1,n&-n),l.tag=2;var c=o.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}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p2(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Be(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),p2(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ii(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ed(e,n),i=Io(i),r=r(i),e.flags|=1,ii(t,e,r,n),e.child;case 14:return r=e.type,i=qo(r,e.pendingProps),i=qo(r.type,i),GN(t,e,r,i,n);case 15:return ZD(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),wy(t,e),e.tag=1,Ai(r)?(t=!0,n1(e)):t=!1,ed(e,n),qD(e,r,i),g2(e,r,i,n),x2(null,e,r,!0,t,n);case 19:return nF(t,e,n);case 22:return JD(t,e,n)}throw Error(Be(156,e.tag))};function yF(t,e){return H5(t,e)}function L$(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 Ao(t,e,n,r){return new L$(t,e,n,r)}function VT(t){return t=t.prototype,!(!t||!t.isReactComponent)}function k$(t){if(typeof t=="function")return VT(t)?1:0;if(t!=null){if(t=t.$$typeof,t===aT)return 11;if(t===lT)return 14}return 2}function El(t,e){var n=t.alternate;return n===null?(n=Ao(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 Ey(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")VT(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Pf:return Fc(n.children,i,o,e);case sT:s=8,i|=8;break;case BE:return t=Ao(12,n,e,i|2),t.elementType=BE,t.lanes=o,t;case jE:return t=Ao(13,n,e,i),t.elementType=jE,t.lanes=o,t;case VE:return t=Ao(19,n,e,i),t.elementType=VE,t.lanes=o,t;case R5:return eb(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case C5:s=10;break e;case T5:s=9;break e;case aT:s=11;break e;case lT:s=14;break e;case ll:s=16,r=null;break e}throw Error(Be(130,t==null?t:typeof t,""))}return e=Ao(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Fc(t,e,n,r){return t=Ao(7,t,r,e),t.lanes=n,t}function eb(t,e,n,r){return t=Ao(22,t,r,e),t.elementType=R5,t.lanes=n,t.stateNode={isHidden:!1},t}function DS(t,e,n){return t=Ao(6,t,null,e),t.lanes=n,t}function FS(t,e,n){return e=Ao(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function O$(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=vS(0),this.expirationTimes=vS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vS(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $T(t,e,n,r,i,o,s,a,l){return t=new O$(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Ao(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},CT(o),t}function D$(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wF)}catch(t){console.error(t)}}wF(),w5.exports=so;var Bl=w5.exports;const fp=$s(Bl);var XT,sI=Bl;XT=sI.createRoot,sI.hydrateRoot;function SF(t,e){return function(){return t.apply(e,arguments)}}const{toString:j$}=Object.prototype,{getPrototypeOf:qT}=Object,ob=(t=>e=>{const n=j$.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),cs=t=>(t=t.toLowerCase(),e=>ob(e)===t),sb=t=>e=>typeof e===t,{isArray:Ud}=Array,cm=sb("undefined");function V$(t){return t!==null&&!cm(t)&&t.constructor!==null&&!cm(t.constructor)&&Ji(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const MF=cs("ArrayBuffer");function $$(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&MF(t.buffer),e}const W$=sb("string"),Ji=sb("function"),EF=sb("number"),ab=t=>t!==null&&typeof t=="object",H$=t=>t===!0||t===!1,Cy=t=>{if(ob(t)!=="object")return!1;const e=qT(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},G$=cs("Date"),X$=cs("File"),q$=cs("Blob"),Y$=cs("FileList"),K$=t=>ab(t)&&Ji(t.pipe),Z$=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ji(t.append)&&((e=ob(t))==="formdata"||e==="object"&&Ji(t.toString)&&t.toString()==="[object FormData]"))},J$=cs("URLSearchParams"),[Q$,eW,tW,nW]=["ReadableStream","Request","Response","Headers"].map(cs),rW=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function eg(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Ud(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Ac=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,TF=t=>!cm(t)&&t!==Ac;function N2(){const{caseless:t}=TF(this)&&this||{},e={},n=(r,i)=>{const o=t&&CF(e,i)||i;Cy(e[o])&&Cy(r)?e[o]=N2(e[o],r):Cy(r)?e[o]=N2({},r):Ud(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r(eg(e,(i,o)=>{n&&Ji(i)?t[o]=SF(i,n):t[o]=i},{allOwnKeys:r}),t),oW=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),sW=(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)},aW=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&qT(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},lW=(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},cW=t=>{if(!t)return null;if(Ud(t))return t;let e=t.length;if(!EF(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},uW=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&qT(Uint8Array)),fW=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},dW=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},hW=cs("HTMLFormElement"),pW=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),aI=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),mW=cs("RegExp"),RF=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};eg(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},gW=t=>{RF(t,(e,n)=>{if(Ji(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Ji(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+"'")})}})},vW=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ud(t)?r(t):r(String(t).split(e)),n},yW=()=>{},xW=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,zS="abcdefghijklmnopqrstuvwxyz",lI="0123456789",AF={DIGIT:lI,ALPHA:zS,ALPHA_DIGIT:zS+zS.toUpperCase()+lI},bW=(t=16,e=AF.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function _W(t){return!!(t&&Ji(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const wW=t=>{const e=new Array(10),n=(r,i)=>{if(ab(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=Ud(r)?[]:{};return eg(r,(s,a)=>{const l=n(s,i+1);!cm(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},SW=cs("AsyncFunction"),MW=t=>t&&(ab(t)||Ji(t))&&Ji(t.then)&&Ji(t.catch),PF=((t,e)=>t?setImmediate:e?((n,r)=>(Ac.addEventListener("message",({source:i,data:o})=>{i===Ac&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ac.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ji(Ac.postMessage)),EW=typeof queueMicrotask<"u"?queueMicrotask.bind(Ac):typeof process<"u"&&process.nextTick||PF,_e={isArray:Ud,isArrayBuffer:MF,isBuffer:V$,isFormData:Z$,isArrayBufferView:$$,isString:W$,isNumber:EF,isBoolean:H$,isObject:ab,isPlainObject:Cy,isReadableStream:Q$,isRequest:eW,isResponse:tW,isHeaders:nW,isUndefined:cm,isDate:G$,isFile:X$,isBlob:q$,isRegExp:mW,isFunction:Ji,isStream:K$,isURLSearchParams:J$,isTypedArray:uW,isFileList:Y$,forEach:eg,merge:N2,extend:iW,trim:rW,stripBOM:oW,inherits:sW,toFlatObject:aW,kindOf:ob,kindOfTest:cs,endsWith:lW,toArray:cW,forEachEntry:fW,matchAll:dW,isHTMLForm:hW,hasOwnProperty:aI,hasOwnProp:aI,reduceDescriptors:RF,freezeMethods:gW,toObjectSet:vW,toCamelCase:pW,noop:yW,toFiniteNumber:xW,findKey:CF,global:Ac,isContextDefined:TF,ALPHABET:AF,generateString:bW,isSpecCompliantForm:_W,toJSONObject:wW,isAsyncFn:SW,isThenable:MW,setImmediate:PF,asap:EW};function Ft(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)}_e.inherits(Ft,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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const NF=Ft.prototype,IF={};["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=>{IF[t]={value:t}});Object.defineProperties(Ft,IF);Object.defineProperty(NF,"isAxiosError",{value:!0});Ft.from=(t,e,n,r,i,o)=>{const s=Object.create(NF);return _e.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ft.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const CW=null;function I2(t){return _e.isPlainObject(t)||_e.isArray(t)}function LF(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function cI(t,e,n){return t?t.concat(e).map(function(i,o){return i=LF(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function TW(t){return _e.isArray(t)&&!t.some(I2)}const RW=_e.toFlatObject(_e,{},null,function(e){return/^is[A-Z]/.test(e)});function lb(t,e,n){if(!_e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!_e.isUndefined(y[x])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(_e.isDate(v))return v.toISOString();if(!l&&_e.isBlob(v))throw new Ft("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(v)||_e.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,x,y){let g=v;if(v&&!y&&typeof v=="object"){if(_e.endsWith(x,"{}"))x=r?x:x.slice(0,-2),v=JSON.stringify(v);else if(_e.isArray(v)&&TW(v)||(_e.isFileList(v)||_e.endsWith(x,"[]"))&&(g=_e.toArray(v)))return x=LF(x),g.forEach(function(_,S){!(_e.isUndefined(_)||_===null)&&e.append(s===!0?cI([x],S,o):s===null?x:x+"[]",c(_))}),!1}return I2(v)?!0:(e.append(cI(y,x,o),c(v)),!1)}const f=[],h=Object.assign(RW,{defaultVisitor:u,convertValue:c,isVisitable:I2});function m(v,x){if(!_e.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(v),_e.forEach(v,function(g,b){(!(_e.isUndefined(g)||g===null)&&i.call(e,g,_e.isString(b)?b.trim():b,x,h))===!0&&m(g,x?x.concat(b):[b])}),f.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return m(t),e}function uI(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function YT(t,e){this._pairs=[],t&&lb(t,this,e)}const kF=YT.prototype;kF.append=function(e,n){this._pairs.push([e,n])};kF.toString=function(e){const n=e?function(r){return e.call(this,r,uI)}:uI;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function AW(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function OF(t,e,n){if(!e)return t;const r=n&&n.encode||AW,i=n&&n.serialize;let o;if(i?o=i(e,n):o=_e.isURLSearchParams(e)?e.toString():new YT(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class fI{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){_e.forEach(this.handlers,function(r){r!==null&&e(r)})}}const DF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},PW=typeof URLSearchParams<"u"?URLSearchParams:YT,NW=typeof FormData<"u"?FormData:null,IW=typeof Blob<"u"?Blob:null,LW={isBrowser:!0,classes:{URLSearchParams:PW,FormData:NW,Blob:IW},protocols:["http","https","file","blob","url","data"]},KT=typeof window<"u"&&typeof document<"u",L2=typeof navigator=="object"&&navigator||void 0,kW=KT&&(!L2||["ReactNative","NativeScript","NS"].indexOf(L2.product)<0),OW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",DW=KT&&window.location.href||"http://localhost",FW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:KT,hasStandardBrowserEnv:kW,hasStandardBrowserWebWorkerEnv:OW,navigator:L2,origin:DW},Symbol.toStringTag,{value:"Module"})),Ni={...FW,...LW};function zW(t,e){return lb(t,new Ni.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Ni.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function UW(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function BW(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&_e.isArray(i)?i.length:s,l?(_e.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!_e.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&_e.isArray(i[s])&&(i[s]=BW(i[s])),!a)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const n={};return _e.forEachEntry(t,(r,i)=>{e(UW(r),i,n,0)}),n}return null}function jW(t,e,n){if(_e.isString(t))try{return(e||JSON.parse)(t),_e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const tg={transitional:DF,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(e);if(o&&_e.isHTMLForm(e)&&(e=new FormData(e)),_e.isFormData(e))return i?JSON.stringify(FF(e)):e;if(_e.isArrayBuffer(e)||_e.isBuffer(e)||_e.isStream(e)||_e.isFile(e)||_e.isBlob(e)||_e.isReadableStream(e))return e;if(_e.isArrayBufferView(e))return e.buffer;if(_e.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return zW(e,this.formSerializer).toString();if((a=_e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return lb(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),jW(e)):e}],transformResponse:[function(e){const n=this.transitional||tg.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(e)||_e.isReadableStream(e))return e;if(e&&_e.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Ft.from(a,Ft.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:Ni.classes.FormData,Blob:Ni.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],t=>{tg.headers[t]={}});const VW=_e.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"]),$W=t=>{const e={};let n,r,i;return t&&t.split(` -`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&VW[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},dI=Symbol("internals");function kh(t){return t&&String(t).trim().toLowerCase()}function Ty(t){return t===!1||t==null?t:_e.isArray(t)?t.map(Ty):String(t)}function WW(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 HW=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function US(t,e,n,r,i){if(_e.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function GW(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function XW(t,e){const n=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class Ii{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const u=kh(l);if(!u)throw new Error("header name must be a non-empty string");const f=_e.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Ty(a))}const s=(a,l)=>_e.forEach(a,(c,u)=>o(c,u,l));if(_e.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(_e.isString(e)&&(e=e.trim())&&!HW(e))s($W(e),n);else if(_e.isHeaders(e))for(const[a,l]of e.entries())o(l,a,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=kh(e),e){const r=_e.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return WW(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=kh(e),e){const r=_e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||US(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=kh(s),s){const a=_e.findKey(r,s);a&&(!n||US(r,r[a],a,n))&&(delete r[a],i=!0)}}return _e.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||US(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return _e.forEach(this,(i,o)=>{const s=_e.findKey(r,o);if(s){n[s]=Ty(i),delete n[o];return}const a=e?GW(o):String(o).trim();a!==o&&delete n[o],n[a]=Ty(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&_e.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[dI]=this[dI]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=kh(s);r[a]||(XW(i,s),r[a]=!0)}return _e.isArray(e)?e.forEach(o):o(e),this}}Ii.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(Ii.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_e.freezeMethods(Ii);function BS(t,e){const n=this||tg,r=e||n,i=Ii.from(r.headers);let o=r.data;return _e.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function zF(t){return!!(t&&t.__CANCEL__)}function Bd(t,e,n){Ft.call(this,t??"canceled",Ft.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(Bd,Ft,{__CANCEL__:!0});function UF(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ft("Request failed with status code "+n.status,[Ft.ERR_BAD_REQUEST,Ft.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qW(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function YW(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s{n=u,i=null,o&&(clearTimeout(o),o=null),t.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const g1=(t,e,n=3)=>{let r=0;const i=YW(50,250);return KW(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},hI=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},pI=t=>(...e)=>_e.asap(()=>t(...e)),ZW=Ni.hasStandardBrowserEnv?function(){const e=Ni.navigator&&/(msie|trident)/i.test(Ni.navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=_e.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),JW=Ni.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&s.push("path="+r),_e.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.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 QW(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function eH(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function BF(t,e){return t&&!QW(e)?eH(t,e):e}const mI=t=>t instanceof Ii?{...t}:t;function ru(t,e){e=e||{};const n={};function r(c,u,f){return _e.isPlainObject(c)&&_e.isPlainObject(u)?_e.merge.call({caseless:f},c,u):_e.isPlainObject(u)?_e.merge({},u):_e.isArray(u)?u.slice():u}function i(c,u,f){if(_e.isUndefined(u)){if(!_e.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function o(c,u){if(!_e.isUndefined(u))return r(void 0,u)}function s(c,u){if(_e.isUndefined(u)){if(!_e.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:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u)=>i(mI(c),mI(u),!0)};return _e.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,h=f(t[u],e[u],u);_e.isUndefined(h)&&f!==a||(n[u]=h)}),n}const jF=t=>{const e=ru({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;e.headers=s=Ii.from(s),e.url=OF(BF(e.baseURL,e.url),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(_e.isFormData(n)){if(Ni.hasStandardBrowserEnv||Ni.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ni.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&ZW(e.url))){const c=i&&o&&JW.read(o);c&&s.set(i,c)}return e},tH=typeof XMLHttpRequest<"u",nH=tH&&function(t){return new Promise(function(n,r){const i=jF(t);let o=i.data;const s=Ii.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,m,v;function x(){m&&m(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function g(){if(!y)return;const _=Ii.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:t,request:y};UF(function(T){n(T),x()},function(T){r(T),x()},P),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(r(new Ft("Request aborted",Ft.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Ft("Network Error",Ft.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const P=i.transitional||DF;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ft(S,P.clarifyTimeoutError?Ft.ETIMEDOUT:Ft.ECONNABORTED,t,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&_e.forEach(s.toJSON(),function(S,P){y.setRequestHeader(P,S)}),_e.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),c&&([h,v]=g1(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([f,m]=g1(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(u=_=>{y&&(r(!_||_.type?new Bd(null,t,y):_),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=qW(i.url);if(b&&Ni.protocols.indexOf(b)===-1){r(new Ft("Unsupported protocol "+b+":",Ft.ERR_BAD_REQUEST,t));return}y.send(o||null)})},rH=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Ft?u:new Bd(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,o(new Ft(`timeout ${e} of ms exceeded`,Ft.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>_e.asap(a),l}},iH=function*(t,e){let n=t.byteLength;if(n{const i=oH(t,e);let o=0,s,a=l=>{s||(s=!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=o+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},cb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",VF=cb&&typeof ReadableStream=="function",aH=cb&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),$F=(t,...e)=>{try{return!!t(...e)}catch{return!1}},lH=VF&&$F(()=>{let t=!1;const e=new Request(Ni.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),vI=64*1024,k2=VF&&$F(()=>_e.isReadableStream(new Response("").body)),v1={stream:k2&&(t=>t.body)};cb&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!v1[e]&&(v1[e]=_e.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ft(`Response type '${e}' is not supported`,Ft.ERR_NOT_SUPPORT,r)})})})(new Response);const cH=async t=>{if(t==null)return 0;if(_e.isBlob(t))return t.size;if(_e.isSpecCompliantForm(t))return(await new Request(Ni.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(t)||_e.isArrayBuffer(t))return t.byteLength;if(_e.isURLSearchParams(t)&&(t=t+""),_e.isString(t))return(await aH(t)).byteLength},uH=async(t,e)=>{const n=_e.toFiniteNumber(t.getContentLength());return n??cH(e)},fH=cb&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=jF(t);c=c?(c+"").toLowerCase():"text";let m=rH([i,o&&o.toAbortSignal()],s),v;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&lH&&n!=="get"&&n!=="head"&&(y=await uH(u,r))!==0){let P=new Request(e,{method:"POST",body:r,duplex:"half"}),N;if(_e.isFormData(r)&&(N=P.headers.get("content-type"))&&u.setContentType(N),P.body){const[T,L]=hI(y,g1(pI(l)));r=gI(P.body,vI,T,L)}}_e.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;v=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(v);const _=k2&&(c==="stream"||c==="response");if(k2&&(a||_&&x)){const P={};["status","statusText","headers"].forEach(U=>{P[U]=b[U]});const N=_e.toFiniteNumber(b.headers.get("content-length")),[T,L]=a&&hI(N,g1(pI(a),!0))||[];b=new Response(gI(b.body,vI,T,()=>{L&&L(),x&&x()}),P)}c=c||"text";let S=await v1[_e.findKey(v1,c)||"text"](b,t);return!_&&x&&x(),await new Promise((P,N)=>{UF(P,N,{data:S,headers:Ii.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:v})})}catch(g){throw x&&x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Ft("Network Error",Ft.ERR_NETWORK,t,v),{cause:g.cause||g}):Ft.from(g,g&&g.code,t,v)}}),O2={http:CW,xhr:nH,fetch:fH};_e.forEach(O2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const yI=t=>`- ${t}`,dH=t=>_e.isFunction(t)||t===null||t===!1,WF={getAdapter:t=>{t=_e.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since : +`+o.stack}return{value:t,source:e,stack:i,digest:null}}function kS(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function v2(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var v$=typeof WeakMap=="function"?WeakMap:Map;function YD(t,e,n){n=ba(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){d1||(d1=!0,T2=r),v2(t,e)},n}function KD(t,e,n){n=ba(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){v2(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){v2(t,e),typeof r!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function VN(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new v$;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=N$.bind(null,t,e,n),e.then(t,t))}function $N(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function WN(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ba(-1,1),e.tag=2,wl(n,e,1))),n.lanes|=1),t)}var y$=Oa.ReactCurrentOwner,Ci=!1;function ii(t,e,n,r){e.child=t===null?ED(e,null,n,r):dd(e,t.child,n,r)}function HN(t,e,n,r,i){n=n.render;var o=e.ref;return ed(e,i),r=NT(t,e,n,r,o,i),n=IT(),t!==null&&!Ci?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ta(t,e,i)):(Tn&&n&&xT(e),e.flags|=1,ii(t,e,r,i),e.child)}function GN(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!VT(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,ZD(t,e,o,r,i)):(t=Ey(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Qp,n(s,r)&&t.ref===e.ref)return Ta(t,e,i)}return e.flags|=1,t=El(o,r),t.ref=e.ref,t.return=e,e.child=t}function ZD(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(Qp(o,r)&&t.ref===e.ref)if(Ci=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(Ci=!0);else return e.lanes=t.lanes,Ta(t,e,i)}return y2(t,e,n,r,i)}function JD(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},bn(Bf,Gi),Gi|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,bn(Bf,Gi),Gi|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bn(Bf,Gi),Gi|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,bn(Bf,Gi),Gi|=r;return ii(t,e,i,n),e.child}function QD(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function y2(t,e,n,r,i){var o=Ai(n)?Jc:Yr.current;return o=ud(e,o),ed(e,i),n=NT(t,e,n,r,o,i),r=IT(),t!==null&&!Ci?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ta(t,e,i)):(Tn&&r&&xT(e),e.flags|=1,ii(t,e,n,i),e.child)}function XN(t,e,n,r,i){if(Ai(n)){var o=!0;n1(e)}else o=!1;if(ed(e,i),e.stateNode===null)wy(t,e),qD(e,n,r),g2(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Io(c):(c=Ai(n)?Jc:Yr.current,c=ud(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&jN(e,s,r,c),cl=!1;var h=e.memoizedState;s.state=h,a1(e,r,s,i),l=e.memoizedState,a!==r||h!==l||Ri.current||cl?(typeof u=="function"&&(m2(e,n,u,r),l=e.memoizedState),(a=cl||BN(e,n,a,r,h,l,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,TD(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:qo(e.type,a),s.props=c,f=e.pendingProps,h=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Io(l):(l=Ai(n)?Jc:Yr.current,l=ud(e,l));var m=n.getDerivedStateFromProps;(u=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||h!==l)&&jN(e,s,r,l),cl=!1,h=e.memoizedState,s.state=h,a1(e,r,s,i);var v=e.memoizedState;a!==f||h!==v||Ri.current||cl?(typeof m=="function"&&(m2(e,n,m,r),v=e.memoizedState),(c=cl||BN(e,n,c,r,h,v,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),s.props=r,s.state=v,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return x2(t,e,n,r,o,i)}function x2(t,e,n,r,i,o){QD(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&IN(e,n,!1),Ta(t,e,o);r=e.stateNode,y$.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=dd(e,t.child,null,o),e.child=dd(e,null,a,o)):ii(t,e,a,o),e.memoizedState=r.state,i&&IN(e,n,!0),e.child}function eF(t){var e=t.stateNode;e.pendingContext?NN(t,e.pendingContext,e.pendingContext!==e.context):e.context&&NN(t,e.context,!1),TT(t,e.containerInfo)}function qN(t,e,n,r,i){return fd(),_T(i),e.flags|=256,ii(t,e,n,r),e.child}var b2={dehydrated:null,treeContext:null,retryLane:0};function _2(t){return{baseLanes:t,cachePool:null,transitions:null}}function tF(t,e,n){var r=e.pendingProps,i=Nn.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),bn(Nn,i&1),t===null)return h2(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=eb(s,r,0,null),t=Fc(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=_2(n),e.memoizedState=b2,t):OT(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return x$(t,e,s,r,a,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=El(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=El(a,o):(o=Fc(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?_2(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=b2,r}return o=t.child,t=o.sibling,r=El(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function OT(t,e){return e=eb({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function q0(t,e,n,r){return r!==null&&_T(r),dd(e,t.child,null,n),t=OT(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function x$(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=kS(Error(Be(422))),q0(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=eb({mode:"visible",children:r.children},i,0,null),o=Fc(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&dd(e,t.child,null,s),e.child.memoizedState=_2(s),e.memoizedState=b2,o);if(!(e.mode&1))return q0(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Be(419)),r=kS(o,r,void 0),q0(t,e,s,r)}if(a=(s&t.childLanes)!==0,Ci||a){if(r=br,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ca(t,i),ns(r,t,i,-1))}return jT(),r=kS(Error(Be(421))),q0(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=I$.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,Ki=_l(i.nextSibling),Zi=e,Tn=!0,Zo=null,t!==null&&(Co[To++]=ma,Co[To++]=ga,Co[To++]=Qc,ma=t.id,ga=t.overflow,Qc=e),e=OT(e,r.children),e.flags|=4096,e)}function YN(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),p2(t.return,e,n)}function OS(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function nF(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(ii(t,e,r.children,n),r=Nn.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&YN(t,n,e);else if(t.tag===19)YN(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(bn(Nn,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&l1(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),OS(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&l1(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}OS(e,!0,n,null,o);break;case"together":OS(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function wy(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ta(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),tu|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Be(153));if(e.child!==null){for(t=e.child,n=El(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=El(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function b$(t,e,n){switch(e.tag){case 3:eF(e),fd();break;case 5:RD(e);break;case 1:Ai(e.type)&&n1(e);break;case 4:TT(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;bn(o1,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(bn(Nn,Nn.current&1),e.flags|=128,null):n&e.child.childLanes?tF(t,e,n):(bn(Nn,Nn.current&1),t=Ta(t,e,n),t!==null?t.sibling:null);bn(Nn,Nn.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return nF(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),bn(Nn,Nn.current),r)break;return null;case 22:case 23:return e.lanes=0,JD(t,e,n)}return Ta(t,e,n)}var rF,w2,iF,oF;rF=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};w2=function(){};iF=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Rc(Is.current);var o=null;switch(n){case"input":i=WE(t,i),r=WE(t,r),o=[];break;case"select":i=On({},i,{value:void 0}),r=On({},r,{value:void 0}),o=[];break;case"textarea":i=XE(t,i),r=XE(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=e1)}YE(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Gp.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Gp.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&_n("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};oF=function(t,e,n,r){n!==r&&(e.flags|=4)};function Ih(t,e){if(!Tn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Br(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function _$(t,e,n){var r=e.pendingProps;switch(bT(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Br(e),null;case 1:return Ai(e.type)&&t1(),Br(e),null;case 3:return r=e.stateNode,hd(),Sn(Ri),Sn(Yr),AT(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(G0(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Zo!==null&&(P2(Zo),Zo=null))),w2(t,e),Br(e),null;case 5:RT(e);var i=Rc(im.current);if(n=e.type,t!==null&&e.stateNode!=null)iF(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Be(166));return Br(e),null}if(t=Rc(Is.current),G0(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[Cs]=e,r[nm]=o,t=(e.mode&1)!==0,n){case"dialog":_n("cancel",r),_n("close",r);break;case"iframe":case"object":case"embed":_n("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[Cs]=e,t[nm]=r,rF(t,e,!1,!1),e.stateNode=t;e:{switch(s=KE(n,r),n){case"dialog":_n("cancel",t),_n("close",t),i=r;break;case"iframe":case"object":case"embed":_n("load",t),i=r;break;case"video":case"audio":for(i=0;imd&&(e.flags|=128,r=!0,Ih(o,!1),e.lanes=4194304)}else{if(!r)if(t=l1(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ih(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Tn)return Br(e),null}else 2*Xn()-o.renderingStartTime>md&&n!==1073741824&&(e.flags|=128,r=!0,Ih(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Xn(),e.sibling=null,n=Nn.current,bn(Nn,r?n&1|2:n&1),e):(Br(e),null);case 22:case 23:return BT(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Gi&1073741824&&(Br(e),e.subtreeFlags&6&&(e.flags|=8192)):Br(e),null;case 24:return null;case 25:return null}throw Error(Be(156,e.tag))}function w$(t,e){switch(bT(e),e.tag){case 1:return Ai(e.type)&&t1(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return hd(),Sn(Ri),Sn(Yr),AT(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return RT(e),null;case 13:if(Sn(Nn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Be(340));fd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Sn(Nn),null;case 4:return hd(),null;case 10:return MT(e.type._context),null;case 22:case 23:return BT(),null;case 24:return null;default:return null}}var Y0=!1,Xr=!1,S$=typeof WeakSet=="function"?WeakSet:Set,at=null;function Uf(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Vn(t,e,r)}else n.current=null}function S2(t,e,n){try{n()}catch(r){Vn(t,e,r)}}var KN=!1;function M$(t,e){if(s2=Zy,t=uD(),yT(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=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=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=s),h===o&&++u===r&&(l=s),(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(a2={focusedElem:t,selectionRange:n},Zy=!1,at=e;at!==null;)if(e=at,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,at=t;else for(;at!==null;){e=at;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,y=v.memoizedState,g=e.stateNode,b=g.getSnapshotBeforeUpdate(e.elementType===e.type?x:qo(e.type,x),y);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(Be(163))}}catch(S){Vn(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,at=t;break}at=e.return}return v=KN,KN=!1,v}function Sp(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 o=i.destroy;i.destroy=void 0,o!==void 0&&S2(e,n,o)}i=i.next}while(i!==r)}}function Jx(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 M2(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[Cs],delete e[nm],delete e[u2],delete e[s$],delete e[a$])),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 aF(t){return t.tag===5||t.tag===3||t.tag===4}function ZN(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||aF(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 E2(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=e1));else if(r!==4&&(t=t.child,t!==null))for(E2(t,e,n),t=t.sibling;t!==null;)E2(t,e,n),t=t.sibling}function C2(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(C2(t,e,n),t=t.sibling;t!==null;)C2(t,e,n),t=t.sibling}var Cr=null,Ko=!1;function Ya(t,e,n){for(n=n.child;n!==null;)lF(t,e,n),n=n.sibling}function lF(t,e,n){if(Ns&&typeof Ns.onCommitFiberUnmount=="function")try{Ns.onCommitFiberUnmount(Wx,n)}catch{}switch(n.tag){case 5:Xr||Uf(n,e);case 6:var r=Cr,i=Ko;Cr=null,Ya(t,e,n),Cr=r,Ko=i,Cr!==null&&(Ko?(t=Cr,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Cr.removeChild(n.stateNode));break;case 18:Cr!==null&&(Ko?(t=Cr,n=n.stateNode,t.nodeType===8?RS(t.parentNode,n):t.nodeType===1&&RS(t,n),Zp(t)):RS(Cr,n.stateNode));break;case 4:r=Cr,i=Ko,Cr=n.stateNode.containerInfo,Ko=!0,Ya(t,e,n),Cr=r,Ko=i;break;case 0:case 11:case 14:case 15:if(!Xr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&S2(n,e,s),i=i.next}while(i!==r)}Ya(t,e,n);break;case 1:if(!Xr&&(Uf(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Vn(n,e,a)}Ya(t,e,n);break;case 21:Ya(t,e,n);break;case 22:n.mode&1?(Xr=(r=Xr)||n.memoizedState!==null,Ya(t,e,n),Xr=r):Ya(t,e,n);break;default:Ya(t,e,n)}}function JN(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new S$),e.forEach(function(r){var i=L$.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $o(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Xn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C$(r/1960))-r,10t?16:t,ml===null)var r=!1;else{if(t=ml,ml=null,h1=0,en&6)throw Error(Be(331));var i=en;for(en|=4,at=t.current;at!==null;){var o=at,s=o.child;if(at.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lXn()-zT?Dc(t,0):FT|=n),Pi(t,e)}function gF(t,e){e===0&&(t.mode&1?(e=B0,B0<<=1,!(B0&130023424)&&(B0=4194304)):e=1);var n=ci();t=Ca(t,e),t!==null&&(Km(t,e,n),Pi(t,n))}function I$(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),gF(t,n)}function L$(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(Be(314))}r!==null&&r.delete(e),gF(t,n)}var vF;vF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ri.current)Ci=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ci=!1,b$(t,e,n);Ci=!!(t.flags&131072)}else Ci=!1,Tn&&e.flags&1048576&&_D(e,i1,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;wy(t,e),t=e.pendingProps;var i=ud(e,Yr.current);ed(e,n),i=NT(null,e,r,t,i,n);var o=IT();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,Ai(r)?(o=!0,n1(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,CT(e),i.updater=Zx,e.stateNode=i,i._reactInternals=e,g2(e,r,t,n),e=x2(null,e,r,!0,o,n)):(e.tag=0,Tn&&o&&xT(e),ii(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(wy(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=O$(r),t=qo(r,t),i){case 0:e=y2(null,e,r,t,n);break e;case 1:e=XN(null,e,r,t,n);break e;case 11:e=HN(null,e,r,t,n);break e;case 14:e=GN(null,e,r,qo(r.type,t),n);break e}throw Error(Be(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),y2(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),XN(t,e,r,i,n);case 3:e:{if(eF(e),t===null)throw Error(Be(387));r=e.pendingProps,o=e.memoizedState,i=o.element,TD(t,e),a1(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=pd(Error(Be(423)),e),e=qN(t,e,r,n,i);break e}else if(r!==i){i=pd(Error(Be(424)),e),e=qN(t,e,r,n,i);break e}else for(Ki=_l(e.stateNode.containerInfo.firstChild),Zi=e,Tn=!0,Zo=null,n=ED(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fd(),r===i){e=Ta(t,e,n);break e}ii(t,e,r,n)}e=e.child}return e;case 5:return RD(e),t===null&&h2(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,l2(r,i)?s=null:o!==null&&l2(r,o)&&(e.flags|=32),QD(t,e),ii(t,e,s,n),e.child;case 6:return t===null&&h2(e),null;case 13:return tF(t,e,n);case 4:return TT(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=dd(e,null,r,n):ii(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),HN(t,e,r,i,n);case 7:return ii(t,e,e.pendingProps,n),e.child;case 8:return ii(t,e,e.pendingProps.children,n),e.child;case 12:return ii(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,bn(o1,r._currentValue),r._currentValue=s,o!==null)if(is(o.value,s)){if(o.children===i.children&&!Ri.current){e=Ta(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ba(-1,n&-n),l.tag=2;var c=o.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}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p2(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Be(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),p2(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ii(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ed(e,n),i=Io(i),r=r(i),e.flags|=1,ii(t,e,r,n),e.child;case 14:return r=e.type,i=qo(r,e.pendingProps),i=qo(r.type,i),GN(t,e,r,i,n);case 15:return ZD(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qo(r,i),wy(t,e),e.tag=1,Ai(r)?(t=!0,n1(e)):t=!1,ed(e,n),qD(e,r,i),g2(e,r,i,n),x2(null,e,r,!0,t,n);case 19:return nF(t,e,n);case 22:return JD(t,e,n)}throw Error(Be(156,e.tag))};function yF(t,e){return H5(t,e)}function k$(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 Ao(t,e,n,r){return new k$(t,e,n,r)}function VT(t){return t=t.prototype,!(!t||!t.isReactComponent)}function O$(t){if(typeof t=="function")return VT(t)?1:0;if(t!=null){if(t=t.$$typeof,t===aT)return 11;if(t===lT)return 14}return 2}function El(t,e){var n=t.alternate;return n===null?(n=Ao(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 Ey(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")VT(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Pf:return Fc(n.children,i,o,e);case sT:s=8,i|=8;break;case BE:return t=Ao(12,n,e,i|2),t.elementType=BE,t.lanes=o,t;case jE:return t=Ao(13,n,e,i),t.elementType=jE,t.lanes=o,t;case VE:return t=Ao(19,n,e,i),t.elementType=VE,t.lanes=o,t;case R5:return eb(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case C5:s=10;break e;case T5:s=9;break e;case aT:s=11;break e;case lT:s=14;break e;case ll:s=16,r=null;break e}throw Error(Be(130,t==null?t:typeof t,""))}return e=Ao(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Fc(t,e,n,r){return t=Ao(7,t,r,e),t.lanes=n,t}function eb(t,e,n,r){return t=Ao(22,t,r,e),t.elementType=R5,t.lanes=n,t.stateNode={isHidden:!1},t}function DS(t,e,n){return t=Ao(6,t,null,e),t.lanes=n,t}function FS(t,e,n){return e=Ao(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function D$(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=vS(0),this.expirationTimes=vS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vS(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $T(t,e,n,r,i,o,s,a,l){return t=new D$(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Ao(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},CT(o),t}function F$(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wF)}catch(t){console.error(t)}}wF(),w5.exports=so;var Bl=w5.exports;const fp=$s(Bl);var XT,sI=Bl;XT=sI.createRoot,sI.hydrateRoot;function SF(t,e){return function(){return t.apply(e,arguments)}}const{toString:V$}=Object.prototype,{getPrototypeOf:qT}=Object,ob=(t=>e=>{const n=V$.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),cs=t=>(t=t.toLowerCase(),e=>ob(e)===t),sb=t=>e=>typeof e===t,{isArray:Ud}=Array,cm=sb("undefined");function $$(t){return t!==null&&!cm(t)&&t.constructor!==null&&!cm(t.constructor)&&Ji(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const MF=cs("ArrayBuffer");function W$(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&MF(t.buffer),e}const H$=sb("string"),Ji=sb("function"),EF=sb("number"),ab=t=>t!==null&&typeof t=="object",G$=t=>t===!0||t===!1,Cy=t=>{if(ob(t)!=="object")return!1;const e=qT(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},X$=cs("Date"),q$=cs("File"),Y$=cs("Blob"),K$=cs("FileList"),Z$=t=>ab(t)&&Ji(t.pipe),J$=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ji(t.append)&&((e=ob(t))==="formdata"||e==="object"&&Ji(t.toString)&&t.toString()==="[object FormData]"))},Q$=cs("URLSearchParams"),[eW,tW,nW,rW]=["ReadableStream","Request","Response","Headers"].map(cs),iW=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function eg(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Ud(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Ac=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,TF=t=>!cm(t)&&t!==Ac;function N2(){const{caseless:t}=TF(this)&&this||{},e={},n=(r,i)=>{const o=t&&CF(e,i)||i;Cy(e[o])&&Cy(r)?e[o]=N2(e[o],r):Cy(r)?e[o]=N2({},r):Ud(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r(eg(e,(i,o)=>{n&&Ji(i)?t[o]=SF(i,n):t[o]=i},{allOwnKeys:r}),t),sW=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),aW=(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)},lW=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&qT(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},uW=t=>{if(!t)return null;if(Ud(t))return t;let e=t.length;if(!EF(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},fW=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&qT(Uint8Array)),dW=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},hW=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},pW=cs("HTMLFormElement"),mW=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),aI=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),gW=cs("RegExp"),RF=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};eg(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},vW=t=>{RF(t,(e,n)=>{if(Ji(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Ji(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+"'")})}})},yW=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ud(t)?r(t):r(String(t).split(e)),n},xW=()=>{},bW=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,zS="abcdefghijklmnopqrstuvwxyz",lI="0123456789",AF={DIGIT:lI,ALPHA:zS,ALPHA_DIGIT:zS+zS.toUpperCase()+lI},_W=(t=16,e=AF.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function wW(t){return!!(t&&Ji(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const SW=t=>{const e=new Array(10),n=(r,i)=>{if(ab(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=Ud(r)?[]:{};return eg(r,(s,a)=>{const l=n(s,i+1);!cm(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},MW=cs("AsyncFunction"),EW=t=>t&&(ab(t)||Ji(t))&&Ji(t.then)&&Ji(t.catch),PF=((t,e)=>t?setImmediate:e?((n,r)=>(Ac.addEventListener("message",({source:i,data:o})=>{i===Ac&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ac.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ji(Ac.postMessage)),CW=typeof queueMicrotask<"u"?queueMicrotask.bind(Ac):typeof process<"u"&&process.nextTick||PF,_e={isArray:Ud,isArrayBuffer:MF,isBuffer:$$,isFormData:J$,isArrayBufferView:W$,isString:H$,isNumber:EF,isBoolean:G$,isObject:ab,isPlainObject:Cy,isReadableStream:eW,isRequest:tW,isResponse:nW,isHeaders:rW,isUndefined:cm,isDate:X$,isFile:q$,isBlob:Y$,isRegExp:gW,isFunction:Ji,isStream:Z$,isURLSearchParams:Q$,isTypedArray:fW,isFileList:K$,forEach:eg,merge:N2,extend:oW,trim:iW,stripBOM:sW,inherits:aW,toFlatObject:lW,kindOf:ob,kindOfTest:cs,endsWith:cW,toArray:uW,forEachEntry:dW,matchAll:hW,isHTMLForm:pW,hasOwnProperty:aI,hasOwnProp:aI,reduceDescriptors:RF,freezeMethods:vW,toObjectSet:yW,toCamelCase:mW,noop:xW,toFiniteNumber:bW,findKey:CF,global:Ac,isContextDefined:TF,ALPHABET:AF,generateString:_W,isSpecCompliantForm:wW,toJSONObject:SW,isAsyncFn:MW,isThenable:EW,setImmediate:PF,asap:CW};function Ft(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)}_e.inherits(Ft,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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const NF=Ft.prototype,IF={};["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=>{IF[t]={value:t}});Object.defineProperties(Ft,IF);Object.defineProperty(NF,"isAxiosError",{value:!0});Ft.from=(t,e,n,r,i,o)=>{const s=Object.create(NF);return _e.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ft.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const TW=null;function I2(t){return _e.isPlainObject(t)||_e.isArray(t)}function LF(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function cI(t,e,n){return t?t.concat(e).map(function(i,o){return i=LF(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function RW(t){return _e.isArray(t)&&!t.some(I2)}const AW=_e.toFlatObject(_e,{},null,function(e){return/^is[A-Z]/.test(e)});function lb(t,e,n){if(!_e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!_e.isUndefined(y[x])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(_e.isDate(v))return v.toISOString();if(!l&&_e.isBlob(v))throw new Ft("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(v)||_e.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,x,y){let g=v;if(v&&!y&&typeof v=="object"){if(_e.endsWith(x,"{}"))x=r?x:x.slice(0,-2),v=JSON.stringify(v);else if(_e.isArray(v)&&RW(v)||(_e.isFileList(v)||_e.endsWith(x,"[]"))&&(g=_e.toArray(v)))return x=LF(x),g.forEach(function(_,S){!(_e.isUndefined(_)||_===null)&&e.append(s===!0?cI([x],S,o):s===null?x:x+"[]",c(_))}),!1}return I2(v)?!0:(e.append(cI(y,x,o),c(v)),!1)}const f=[],h=Object.assign(AW,{defaultVisitor:u,convertValue:c,isVisitable:I2});function m(v,x){if(!_e.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(v),_e.forEach(v,function(g,b){(!(_e.isUndefined(g)||g===null)&&i.call(e,g,_e.isString(b)?b.trim():b,x,h))===!0&&m(g,x?x.concat(b):[b])}),f.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return m(t),e}function uI(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function YT(t,e){this._pairs=[],t&&lb(t,this,e)}const kF=YT.prototype;kF.append=function(e,n){this._pairs.push([e,n])};kF.toString=function(e){const n=e?function(r){return e.call(this,r,uI)}:uI;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function PW(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function OF(t,e,n){if(!e)return t;const r=n&&n.encode||PW,i=n&&n.serialize;let o;if(i?o=i(e,n):o=_e.isURLSearchParams(e)?e.toString():new YT(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class fI{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){_e.forEach(this.handlers,function(r){r!==null&&e(r)})}}const DF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},NW=typeof URLSearchParams<"u"?URLSearchParams:YT,IW=typeof FormData<"u"?FormData:null,LW=typeof Blob<"u"?Blob:null,kW={isBrowser:!0,classes:{URLSearchParams:NW,FormData:IW,Blob:LW},protocols:["http","https","file","blob","url","data"]},KT=typeof window<"u"&&typeof document<"u",L2=typeof navigator=="object"&&navigator||void 0,OW=KT&&(!L2||["ReactNative","NativeScript","NS"].indexOf(L2.product)<0),DW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",FW=KT&&window.location.href||"http://localhost",zW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:KT,hasStandardBrowserEnv:OW,hasStandardBrowserWebWorkerEnv:DW,navigator:L2,origin:FW},Symbol.toStringTag,{value:"Module"})),Ni={...zW,...kW};function UW(t,e){return lb(t,new Ni.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Ni.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function BW(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jW(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&_e.isArray(i)?i.length:s,l?(_e.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!_e.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&_e.isArray(i[s])&&(i[s]=jW(i[s])),!a)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const n={};return _e.forEachEntry(t,(r,i)=>{e(BW(r),i,n,0)}),n}return null}function VW(t,e,n){if(_e.isString(t))try{return(e||JSON.parse)(t),_e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const tg={transitional:DF,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(e);if(o&&_e.isHTMLForm(e)&&(e=new FormData(e)),_e.isFormData(e))return i?JSON.stringify(FF(e)):e;if(_e.isArrayBuffer(e)||_e.isBuffer(e)||_e.isStream(e)||_e.isFile(e)||_e.isBlob(e)||_e.isReadableStream(e))return e;if(_e.isArrayBufferView(e))return e.buffer;if(_e.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return UW(e,this.formSerializer).toString();if((a=_e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return lb(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),VW(e)):e}],transformResponse:[function(e){const n=this.transitional||tg.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(e)||_e.isReadableStream(e))return e;if(e&&_e.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Ft.from(a,Ft.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:Ni.classes.FormData,Blob:Ni.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],t=>{tg.headers[t]={}});const $W=_e.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"]),WW=t=>{const e={};let n,r,i;return t&&t.split(` +`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&$W[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},dI=Symbol("internals");function kh(t){return t&&String(t).trim().toLowerCase()}function Ty(t){return t===!1||t==null?t:_e.isArray(t)?t.map(Ty):String(t)}function HW(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 GW=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function US(t,e,n,r,i){if(_e.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function XW(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function qW(t,e){const n=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class Ii{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const u=kh(l);if(!u)throw new Error("header name must be a non-empty string");const f=_e.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Ty(a))}const s=(a,l)=>_e.forEach(a,(c,u)=>o(c,u,l));if(_e.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(_e.isString(e)&&(e=e.trim())&&!GW(e))s(WW(e),n);else if(_e.isHeaders(e))for(const[a,l]of e.entries())o(l,a,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=kh(e),e){const r=_e.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return HW(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=kh(e),e){const r=_e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||US(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=kh(s),s){const a=_e.findKey(r,s);a&&(!n||US(r,r[a],a,n))&&(delete r[a],i=!0)}}return _e.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||US(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return _e.forEach(this,(i,o)=>{const s=_e.findKey(r,o);if(s){n[s]=Ty(i),delete n[o];return}const a=e?XW(o):String(o).trim();a!==o&&delete n[o],n[a]=Ty(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&_e.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[dI]=this[dI]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=kh(s);r[a]||(qW(i,s),r[a]=!0)}return _e.isArray(e)?e.forEach(o):o(e),this}}Ii.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(Ii.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_e.freezeMethods(Ii);function BS(t,e){const n=this||tg,r=e||n,i=Ii.from(r.headers);let o=r.data;return _e.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function zF(t){return!!(t&&t.__CANCEL__)}function Bd(t,e,n){Ft.call(this,t??"canceled",Ft.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(Bd,Ft,{__CANCEL__:!0});function UF(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ft("Request failed with status code "+n.status,[Ft.ERR_BAD_REQUEST,Ft.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function YW(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function KW(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s{n=u,i=null,o&&(clearTimeout(o),o=null),t.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const g1=(t,e,n=3)=>{let r=0;const i=KW(50,250);return ZW(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},hI=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},pI=t=>(...e)=>_e.asap(()=>t(...e)),JW=Ni.hasStandardBrowserEnv?function(){const e=Ni.navigator&&/(msie|trident)/i.test(Ni.navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=_e.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),QW=Ni.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&s.push("path="+r),_e.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.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 eH(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function tH(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function BF(t,e){return t&&!eH(e)?tH(t,e):e}const mI=t=>t instanceof Ii?{...t}:t;function ru(t,e){e=e||{};const n={};function r(c,u,f){return _e.isPlainObject(c)&&_e.isPlainObject(u)?_e.merge.call({caseless:f},c,u):_e.isPlainObject(u)?_e.merge({},u):_e.isArray(u)?u.slice():u}function i(c,u,f){if(_e.isUndefined(u)){if(!_e.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function o(c,u){if(!_e.isUndefined(u))return r(void 0,u)}function s(c,u){if(_e.isUndefined(u)){if(!_e.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:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u)=>i(mI(c),mI(u),!0)};return _e.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,h=f(t[u],e[u],u);_e.isUndefined(h)&&f!==a||(n[u]=h)}),n}const jF=t=>{const e=ru({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;e.headers=s=Ii.from(s),e.url=OF(BF(e.baseURL,e.url),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(_e.isFormData(n)){if(Ni.hasStandardBrowserEnv||Ni.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ni.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&JW(e.url))){const c=i&&o&&QW.read(o);c&&s.set(i,c)}return e},nH=typeof XMLHttpRequest<"u",rH=nH&&function(t){return new Promise(function(n,r){const i=jF(t);let o=i.data;const s=Ii.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,m,v;function x(){m&&m(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function g(){if(!y)return;const _=Ii.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:t,request:y};UF(function(T){n(T),x()},function(T){r(T),x()},P),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(r(new Ft("Request aborted",Ft.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Ft("Network Error",Ft.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const P=i.transitional||DF;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ft(S,P.clarifyTimeoutError?Ft.ETIMEDOUT:Ft.ECONNABORTED,t,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&_e.forEach(s.toJSON(),function(S,P){y.setRequestHeader(P,S)}),_e.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),c&&([h,v]=g1(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([f,m]=g1(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(u=_=>{y&&(r(!_||_.type?new Bd(null,t,y):_),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=YW(i.url);if(b&&Ni.protocols.indexOf(b)===-1){r(new Ft("Unsupported protocol "+b+":",Ft.ERR_BAD_REQUEST,t));return}y.send(o||null)})},iH=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Ft?u:new Bd(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,o(new Ft(`timeout ${e} of ms exceeded`,Ft.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>_e.asap(a),l}},oH=function*(t,e){let n=t.byteLength;if(n{const i=sH(t,e);let o=0,s,a=l=>{s||(s=!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=o+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},cb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",VF=cb&&typeof ReadableStream=="function",lH=cb&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),$F=(t,...e)=>{try{return!!t(...e)}catch{return!1}},cH=VF&&$F(()=>{let t=!1;const e=new Request(Ni.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),vI=64*1024,k2=VF&&$F(()=>_e.isReadableStream(new Response("").body)),v1={stream:k2&&(t=>t.body)};cb&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!v1[e]&&(v1[e]=_e.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ft(`Response type '${e}' is not supported`,Ft.ERR_NOT_SUPPORT,r)})})})(new Response);const uH=async t=>{if(t==null)return 0;if(_e.isBlob(t))return t.size;if(_e.isSpecCompliantForm(t))return(await new Request(Ni.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(t)||_e.isArrayBuffer(t))return t.byteLength;if(_e.isURLSearchParams(t)&&(t=t+""),_e.isString(t))return(await lH(t)).byteLength},fH=async(t,e)=>{const n=_e.toFiniteNumber(t.getContentLength());return n??uH(e)},dH=cb&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=jF(t);c=c?(c+"").toLowerCase():"text";let m=iH([i,o&&o.toAbortSignal()],s),v;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&cH&&n!=="get"&&n!=="head"&&(y=await fH(u,r))!==0){let P=new Request(e,{method:"POST",body:r,duplex:"half"}),N;if(_e.isFormData(r)&&(N=P.headers.get("content-type"))&&u.setContentType(N),P.body){const[T,L]=hI(y,g1(pI(l)));r=gI(P.body,vI,T,L)}}_e.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;v=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(v);const _=k2&&(c==="stream"||c==="response");if(k2&&(a||_&&x)){const P={};["status","statusText","headers"].forEach(U=>{P[U]=b[U]});const N=_e.toFiniteNumber(b.headers.get("content-length")),[T,L]=a&&hI(N,g1(pI(a),!0))||[];b=new Response(gI(b.body,vI,T,()=>{L&&L(),x&&x()}),P)}c=c||"text";let S=await v1[_e.findKey(v1,c)||"text"](b,t);return!_&&x&&x(),await new Promise((P,N)=>{UF(P,N,{data:S,headers:Ii.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:v})})}catch(g){throw x&&x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Ft("Network Error",Ft.ERR_NETWORK,t,v),{cause:g.cause||g}):Ft.from(g,g&&g.code,t,v)}}),O2={http:TW,xhr:rH,fetch:dH};_e.forEach(O2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const yI=t=>`- ${t}`,hH=t=>_e.isFunction(t)||t===null||t===!1,WF={getAdapter:t=>{t=_e.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since : `+o.map(yI).join(` -`):" "+yI(o[0]):"as no adapter specified";throw new Ft("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:O2};function jS(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bd(null,t)}function xI(t){return jS(t),t.headers=Ii.from(t.headers),t.data=BS.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),WF.getAdapter(t.adapter||tg.adapter)(t).then(function(r){return jS(t),r.data=BS.call(t,t.transformResponse,r),r.headers=Ii.from(r.headers),r},function(r){return zF(r)||(jS(t),r&&r.response&&(r.response.data=BS.call(t,t.transformResponse,r.response),r.response.headers=Ii.from(r.response.headers))),Promise.reject(r)})}const HF="1.7.7",ZT={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ZT[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const bI={};ZT.transitional=function(e,n,r){function i(o,s){return"[Axios v"+HF+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Ft(i(s," has been removed"+(n?" in "+n:"")),Ft.ERR_DEPRECATED);return n&&!bI[s]&&(bI[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function hH(t,e,n){if(typeof t!="object")throw new Ft("options must be an object",Ft.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Ft("option "+o+" must be "+l,Ft.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ft("Unknown option "+o,Ft.ERR_BAD_OPTION)}}const D2={assertOptions:hH,validators:ZT},Ka=D2.validators;class zc{constructor(e){this.defaults=e,this.interceptors={request:new fI,response:new fI}}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 o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ru(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&D2.assertOptions(r,{silentJSONParsing:Ka.transitional(Ka.boolean),forcedJSONParsing:Ka.transitional(Ka.boolean),clarifyTimeoutError:Ka.transitional(Ka.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:D2.assertOptions(i,{encode:Ka.function,serialize:Ka.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=Ii.concat(s,o);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 v=[xI.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,c),h=v.length,u=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new Bd(o,s,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 JT(function(i){e=i}),cancel:e}}}function pH(t){return function(n){return t.apply(null,n)}}function mH(t){return _e.isObject(t)&&t.isAxiosError===!0}const F2={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(F2).forEach(([t,e])=>{F2[e]=t});function GF(t){const e=new zc(t),n=SF(zc.prototype.request,e);return _e.extend(n,zc.prototype,e,{allOwnKeys:!0}),_e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return GF(ru(t,i))},n}const Dn=GF(tg);Dn.Axios=zc;Dn.CanceledError=Bd;Dn.CancelToken=JT;Dn.isCancel=zF;Dn.VERSION=HF;Dn.toFormData=lb;Dn.AxiosError=Ft;Dn.Cancel=Dn.CanceledError;Dn.all=function(e){return Promise.all(e)};Dn.spread=pH;Dn.isAxiosError=mH;Dn.mergeConfig=ru;Dn.AxiosHeaders=Ii;Dn.formToJSON=t=>FF(_e.isHTMLForm(t)?new FormData(t):t);Dn.getAdapter=WF.getAdapter;Dn.HttpStatusCode=F2;Dn.default=Dn;const um={black:"#000",white:"#fff"},Wu={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"},Hu={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"},Gu={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"},Xu={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"},qu={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"},Oh={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"},gH={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 Ra(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n0?Tr(jd,--Oi):0,vd--,Qn===10&&(vd=1,fb--),Qn}function Qi(){return Qn=Oi2||dm(Qn)>3?"":" "}function kH(t,e){for(;--e&&Qi()&&!(Qn<48||Qn>102||Qn>57&&Qn<65||Qn>70&&Qn<97););return ng(t,Ry()+(e<6&&Ls()==32&&Qi()==32))}function U2(t){for(;Qi();)switch(Qn){case t:return Oi;case 34:case 39:t!==34&&t!==39&&U2(Qn);break;case 40:t===41&&U2(t);break;case 92:Qi();break}return Oi}function OH(t,e){for(;Qi()&&t+Qn!==57;)if(t+Qn===84&&Ls()===47)break;return"/*"+ng(e,Oi-1)+"*"+ub(t===47?t:Qi())}function DH(t){for(;!dm(Ls());)Qi();return ng(t,Oi)}function FH(t){return QF(Py("",null,null,null,[""],t=JF(t),0,[0],t))}function Py(t,e,n,r,i,o,s,a,l){for(var c=0,u=0,f=s,h=0,m=0,v=0,x=1,y=1,g=1,b=0,_="",S=i,P=o,N=r,T=_;y;)switch(v=b,b=Qi()){case 40:if(v!=108&&Tr(T,f-1)==58){z2(T+=un(Ay(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:T+=Ay(b);break;case 9:case 10:case 13:case 32:T+=LH(v);break;case 92:T+=kH(Ry()-1,7);continue;case 47:switch(Ls()){case 42:case 47:J0(zH(OH(Qi(),Ry()),e,n),l);break;default:T+="/"}break;case 123*x:a[c++]=Ms(T)*g;case 125*x:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:g==-1&&(T=un(T,/\f/g,"")),m>0&&Ms(T)-f&&J0(m>32?wI(T+";",r,n,f-1):wI(un(T," ","")+";",r,n,f-2),l);break;case 59:T+=";";default:if(J0(N=_I(T,e,n,c,u,i,a,_,S=[],P=[],f),o),b===123)if(u===0)Py(T,e,N,N,S,o,f,a,P);else switch(h===99&&Tr(T,3)===110?100:h){case 100:case 108:case 109:case 115:Py(t,N,N,r&&J0(_I(t,N,N,0,0,i,a,_,i,S=[],f),P),i,P,f,a,r?S:P);break;default:Py(T,N,N,N,[""],P,0,a,P)}}c=u=m=0,x=g=1,_=T="",f=s;break;case 58:f=1+Ms(T),m=v;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&IH()==125)continue}switch(T+=ub(b),b*x){case 38:g=u>0?1:(T+="\f",-1);break;case 44:a[c++]=(Ms(T)-1)*g,g=1;break;case 64:Ls()===45&&(T+=Ay(Qi())),h=Ls(),u=f=Ms(_=T+=DH(Ry())),b++;break;case 45:v===45&&Ms(T)==2&&(x=0)}}return o}function _I(t,e,n,r,i,o,s,a,l,c,u){for(var f=i-1,h=i===0?o:[""],m=tR(h),v=0,x=0,y=0;v0?h[g]+" "+b:un(b,/&\f/g,h[g])))&&(l[y++]=_);return db(t,e,n,i===0?QT:a,l,c,u)}function zH(t,e,n){return db(t,e,n,qF,ub(NH()),fm(t,2,-2),0)}function wI(t,e,n,r){return db(t,e,n,eR,fm(t,0,r),fm(t,r+1,-1),r)}function nd(t,e){for(var n="",r=tR(t),i=0;i6)switch(Tr(t,e+1)){case 109:if(Tr(t,e+4)!==45)break;case 102:return un(t,/(.+:)(.+)-([^]+)/,"$1"+cn+"$2-$3$1"+y1+(Tr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~z2(t,"stretch")?ez(un(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Tr(t,e+1)!==115)break;case 6444:switch(Tr(t,Ms(t)-3-(~z2(t,"!important")&&10))){case 107:return un(t,":",":"+cn)+t;case 101:return un(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+cn+(Tr(t,14)===45?"inline-":"")+"box$3$1"+cn+"$2$3$1"+Wr+"$2box$3")+t}break;case 5936:switch(Tr(t,e+11)){case 114:return cn+t+Wr+un(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return cn+t+Wr+un(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return cn+t+Wr+un(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return cn+t+Wr+t+t}return t}var XH=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case eR:e.return=ez(e.value,e.length);break;case YF:return nd([Dh(e,{value:un(e.value,"@","@"+cn)})],i);case QT:if(e.length)return PH(e.props,function(o){switch(AH(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return nd([Dh(e,{props:[un(o,/:(read-\w+)/,":"+y1+"$1")]})],i);case"::placeholder":return nd([Dh(e,{props:[un(o,/:(plac\w+)/,":"+cn+"input-$1")]}),Dh(e,{props:[un(o,/:(plac\w+)/,":"+y1+"$1")]}),Dh(e,{props:[un(o,/:(plac\w+)/,Wr+"input-$1")]})],i)}return""})}},qH=[XH],tz=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 y=x.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||qH,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),g=1;g{ZT[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const bI={};ZT.transitional=function(e,n,r){function i(o,s){return"[Axios v"+HF+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Ft(i(s," has been removed"+(n?" in "+n:"")),Ft.ERR_DEPRECATED);return n&&!bI[s]&&(bI[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function pH(t,e,n){if(typeof t!="object")throw new Ft("options must be an object",Ft.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Ft("option "+o+" must be "+l,Ft.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ft("Unknown option "+o,Ft.ERR_BAD_OPTION)}}const D2={assertOptions:pH,validators:ZT},Ka=D2.validators;class zc{constructor(e){this.defaults=e,this.interceptors={request:new fI,response:new fI}}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 o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ru(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&D2.assertOptions(r,{silentJSONParsing:Ka.transitional(Ka.boolean),forcedJSONParsing:Ka.transitional(Ka.boolean),clarifyTimeoutError:Ka.transitional(Ka.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:D2.assertOptions(i,{encode:Ka.function,serialize:Ka.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=Ii.concat(s,o);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 v=[xI.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,c),h=v.length,u=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new Bd(o,s,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 JT(function(i){e=i}),cancel:e}}}function mH(t){return function(n){return t.apply(null,n)}}function gH(t){return _e.isObject(t)&&t.isAxiosError===!0}const F2={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(F2).forEach(([t,e])=>{F2[e]=t});function GF(t){const e=new zc(t),n=SF(zc.prototype.request,e);return _e.extend(n,zc.prototype,e,{allOwnKeys:!0}),_e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return GF(ru(t,i))},n}const Dn=GF(tg);Dn.Axios=zc;Dn.CanceledError=Bd;Dn.CancelToken=JT;Dn.isCancel=zF;Dn.VERSION=HF;Dn.toFormData=lb;Dn.AxiosError=Ft;Dn.Cancel=Dn.CanceledError;Dn.all=function(e){return Promise.all(e)};Dn.spread=mH;Dn.isAxiosError=gH;Dn.mergeConfig=ru;Dn.AxiosHeaders=Ii;Dn.formToJSON=t=>FF(_e.isHTMLForm(t)?new FormData(t):t);Dn.getAdapter=WF.getAdapter;Dn.HttpStatusCode=F2;Dn.default=Dn;const um={black:"#000",white:"#fff"},Wu={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"},Hu={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"},Gu={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"},Xu={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"},qu={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"},Oh={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"},vH={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 Ra(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n0?Tr(jd,--Oi):0,vd--,Qn===10&&(vd=1,fb--),Qn}function Qi(){return Qn=Oi2||dm(Qn)>3?"":" "}function OH(t,e){for(;--e&&Qi()&&!(Qn<48||Qn>102||Qn>57&&Qn<65||Qn>70&&Qn<97););return ng(t,Ry()+(e<6&&Ls()==32&&Qi()==32))}function U2(t){for(;Qi();)switch(Qn){case t:return Oi;case 34:case 39:t!==34&&t!==39&&U2(Qn);break;case 40:t===41&&U2(t);break;case 92:Qi();break}return Oi}function DH(t,e){for(;Qi()&&t+Qn!==57;)if(t+Qn===84&&Ls()===47)break;return"/*"+ng(e,Oi-1)+"*"+ub(t===47?t:Qi())}function FH(t){for(;!dm(Ls());)Qi();return ng(t,Oi)}function zH(t){return QF(Py("",null,null,null,[""],t=JF(t),0,[0],t))}function Py(t,e,n,r,i,o,s,a,l){for(var c=0,u=0,f=s,h=0,m=0,v=0,x=1,y=1,g=1,b=0,_="",S=i,P=o,N=r,T=_;y;)switch(v=b,b=Qi()){case 40:if(v!=108&&Tr(T,f-1)==58){z2(T+=un(Ay(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:T+=Ay(b);break;case 9:case 10:case 13:case 32:T+=kH(v);break;case 92:T+=OH(Ry()-1,7);continue;case 47:switch(Ls()){case 42:case 47:J0(UH(DH(Qi(),Ry()),e,n),l);break;default:T+="/"}break;case 123*x:a[c++]=Ms(T)*g;case 125*x:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:g==-1&&(T=un(T,/\f/g,"")),m>0&&Ms(T)-f&&J0(m>32?wI(T+";",r,n,f-1):wI(un(T," ","")+";",r,n,f-2),l);break;case 59:T+=";";default:if(J0(N=_I(T,e,n,c,u,i,a,_,S=[],P=[],f),o),b===123)if(u===0)Py(T,e,N,N,S,o,f,a,P);else switch(h===99&&Tr(T,3)===110?100:h){case 100:case 108:case 109:case 115:Py(t,N,N,r&&J0(_I(t,N,N,0,0,i,a,_,i,S=[],f),P),i,P,f,a,r?S:P);break;default:Py(T,N,N,N,[""],P,0,a,P)}}c=u=m=0,x=g=1,_=T="",f=s;break;case 58:f=1+Ms(T),m=v;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&LH()==125)continue}switch(T+=ub(b),b*x){case 38:g=u>0?1:(T+="\f",-1);break;case 44:a[c++]=(Ms(T)-1)*g,g=1;break;case 64:Ls()===45&&(T+=Ay(Qi())),h=Ls(),u=f=Ms(_=T+=FH(Ry())),b++;break;case 45:v===45&&Ms(T)==2&&(x=0)}}return o}function _I(t,e,n,r,i,o,s,a,l,c,u){for(var f=i-1,h=i===0?o:[""],m=tR(h),v=0,x=0,y=0;v0?h[g]+" "+b:un(b,/&\f/g,h[g])))&&(l[y++]=_);return db(t,e,n,i===0?QT:a,l,c,u)}function UH(t,e,n){return db(t,e,n,qF,ub(IH()),fm(t,2,-2),0)}function wI(t,e,n,r){return db(t,e,n,eR,fm(t,0,r),fm(t,r+1,-1),r)}function nd(t,e){for(var n="",r=tR(t),i=0;i6)switch(Tr(t,e+1)){case 109:if(Tr(t,e+4)!==45)break;case 102:return un(t,/(.+:)(.+)-([^]+)/,"$1"+cn+"$2-$3$1"+y1+(Tr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~z2(t,"stretch")?ez(un(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Tr(t,e+1)!==115)break;case 6444:switch(Tr(t,Ms(t)-3-(~z2(t,"!important")&&10))){case 107:return un(t,":",":"+cn)+t;case 101:return un(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+cn+(Tr(t,14)===45?"inline-":"")+"box$3$1"+cn+"$2$3$1"+Wr+"$2box$3")+t}break;case 5936:switch(Tr(t,e+11)){case 114:return cn+t+Wr+un(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return cn+t+Wr+un(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return cn+t+Wr+un(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return cn+t+Wr+t+t}return t}var qH=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case eR:e.return=ez(e.value,e.length);break;case YF:return nd([Dh(e,{value:un(e.value,"@","@"+cn)})],i);case QT:if(e.length)return NH(e.props,function(o){switch(PH(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return nd([Dh(e,{props:[un(o,/:(read-\w+)/,":"+y1+"$1")]})],i);case"::placeholder":return nd([Dh(e,{props:[un(o,/:(plac\w+)/,":"+cn+"input-$1")]}),Dh(e,{props:[un(o,/:(plac\w+)/,":"+y1+"$1")]}),Dh(e,{props:[un(o,/:(plac\w+)/,Wr+"input-$1")]})],i)}return""})}},YH=[qH],tz=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 y=x.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||YH,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=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 sG={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},aG=!1,lG=/[A-Z]|^ms/g,cG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lz=function(e){return e.charCodeAt(1)===45},MI=function(e){return e!=null&&typeof e!="boolean"},VS=XF(function(t){return lz(t)?t:t.replace(lG,"-$&").toLowerCase()}),EI=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(cG,function(r,i,o){return Es={name:i,styles:o,next:Es},i})}return sG[e]!==1&&!lz(e)&&typeof n=="number"&&n!==0?n+"px":n},uG="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function hm(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 Es={name:i.name,styles:i.styles,next:Es},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Es={name:s.name,styles:s.styles,next:Es},s=s.next;var a=o.styles+";";return a}return fG(t,e,n)}case"function":{if(t!==void 0){var l=Es,c=n(t);return Es=l,hm(t,e,c)}break}}var u=n;if(e==null)return u;var f=e[u];return f!==void 0?f:u}function fG(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?gG:vG},AI=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},yG=!1,xG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return sz(n,r,i),hG(function(){return az(n,r,i)}),null},bG=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,s;n!==void 0&&(o=n.label,s=n.target);var a=AI(e,n,r),l=a||RI(i),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{f.push(u[0][0]);for(var h=u.length,m=1;me(RG(i)?n:i):e;return C.jsx(mG,{styles:r})}function sR(t,e){return B2(t,e)}const vz=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},AG=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:gz,StyledEngineProvider:TG,ThemeContext:rg,css:dz,default:sR,internal_processStyles:vz,keyframes:Sb},Symbol.toStringTag,{value:"Module"}));function da(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 yz(t){if(!da(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=yz(t[n])}),e}function ui(t,e,n={clone:!0}){const r=n.clone?W({},t):t;return da(t)&&da(e)&&Object.keys(e).forEach(i=>{da(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&da(t[i])?r[i]=ui(t[i],e[i],n):n.clone?r[i]=da(e[i])?yz(e[i]):e[i]:r[i]=e[i]}),r}const PG=Object.freeze(Object.defineProperty({__proto__:null,default:ui,isPlainObject:da},Symbol.toStringTag,{value:"Module"})),NG=["values","unit","step"],IG=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 xz(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=Qe(t,NG),o=IG(e),s=Object.keys(o);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 v=s.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(v!==-1&&typeof e[s[v]]=="number"?e[s[v]]:m)-r/100}${n})`}function u(h){return s.indexOf(h)+1`@media (min-width:${aR[t]}px)`};function Di(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||PI;return e.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const o=r.breakpoints||PI;return Object.keys(e).reduce((s,a)=>{if(Object.keys(o.values||aR).indexOf(a)!==-1){const l=o.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function bz(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function _z(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function kG(t,...e){const n=bz(t),r=[n,...e].reduce((i,o)=>ui(i,o),{});return _z(Object.keys(n),r)}function OG(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,o)=>{o{t[i]!=null&&(n[i]=!0)}),n}function Uc({values:t,breakpoints:e,base:n}){const r=n||OG(t,e),i=Object.keys(r);if(i.length===0)return t;let o;return i.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[o],o=a):s[a]=t,s),{})}function bt(t){if(typeof t!="string")throw new Error(Ra(7));return t.charAt(0).toUpperCase()+t.slice(1)}const DG=Object.freeze(Object.defineProperty({__proto__:null,default:bt},Symbol.toStringTag,{value:"Module"}));function yd(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function x1(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=yd(t,n)||r,e&&(i=e(i,r,t)),i}function qn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,c=yd(l,r)||{};return Di(s,a,f=>{let h=x1(c,i,f);return f===h&&typeof f=="string"&&(h=x1(c,i,`${e}${f==="default"?"":bt(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[e],o}function FG(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const zG={m:"margin",p:"padding"},UG={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},NI={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},BG=FG(t=>{if(t.length>2)if(NI[t])t=NI[t];else return[t];const[e,n]=t.split(""),r=zG[e],i=UG[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),lR=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cR=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...lR,...cR];function ig(t,e,n,r){var i;const o=(i=yd(t,e,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function uR(t){return ig(t,"spacing",8)}function iu(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 jG(t,e){return n=>t.reduce((r,i)=>(r[i]=iu(e,n),r),{})}function VG(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=BG(n),o=jG(i,r),s=t[n];return Di(t,s,o)}function wz(t,e){const n=uR(t.theme);return Object.keys(t).map(r=>VG(t,e,r,n)).reduce(Cp,{})}function Bn(t){return wz(t,lR)}Bn.propTypes={};Bn.filterProps=lR;function jn(t){return wz(t,cR)}jn.propTypes={};jn.filterProps=cR;function $G(t=8){if(t.mui)return t;const e=uR({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=e(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function Mb(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?Cp(i,e[o](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ro(t){return typeof t!="number"?t:`${t}px solid`}function Do(t,e){return qn({prop:t,themeKey:"borders",transform:e})}const WG=Do("border",Ro),HG=Do("borderTop",Ro),GG=Do("borderRight",Ro),XG=Do("borderBottom",Ro),qG=Do("borderLeft",Ro),YG=Do("borderColor"),KG=Do("borderTopColor"),ZG=Do("borderRightColor"),JG=Do("borderBottomColor"),QG=Do("borderLeftColor"),eX=Do("outline",Ro),tX=Do("outlineColor"),Eb=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=ig(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:iu(e,r)});return Di(t,t.borderRadius,n)}return null};Eb.propTypes={};Eb.filterProps=["borderRadius"];Mb(WG,HG,GG,XG,qG,YG,KG,ZG,JG,QG,Eb,eX,tX);const Cb=t=>{if(t.gap!==void 0&&t.gap!==null){const e=ig(t.theme,"spacing",8),n=r=>({gap:iu(e,r)});return Di(t,t.gap,n)}return null};Cb.propTypes={};Cb.filterProps=["gap"];const Tb=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=ig(t.theme,"spacing",8),n=r=>({columnGap:iu(e,r)});return Di(t,t.columnGap,n)}return null};Tb.propTypes={};Tb.filterProps=["columnGap"];const Rb=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=ig(t.theme,"spacing",8),n=r=>({rowGap:iu(e,r)});return Di(t,t.rowGap,n)}return null};Rb.propTypes={};Rb.filterProps=["rowGap"];const nX=qn({prop:"gridColumn"}),rX=qn({prop:"gridRow"}),iX=qn({prop:"gridAutoFlow"}),oX=qn({prop:"gridAutoColumns"}),sX=qn({prop:"gridAutoRows"}),aX=qn({prop:"gridTemplateColumns"}),lX=qn({prop:"gridTemplateRows"}),cX=qn({prop:"gridTemplateAreas"}),uX=qn({prop:"gridArea"});Mb(Cb,Tb,Rb,nX,rX,iX,oX,sX,aX,lX,cX,uX);function rd(t,e){return e==="grey"?e:t}const fX=qn({prop:"color",themeKey:"palette",transform:rd}),dX=qn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:rd}),hX=qn({prop:"backgroundColor",themeKey:"palette",transform:rd});Mb(fX,dX,hX);function qi(t){return t<=1&&t!==0?`${t*100}%`:t}const pX=qn({prop:"width",transform:qi}),fR=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||aR[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:qi(n)}};return Di(t,t.maxWidth,e)}return null};fR.filterProps=["maxWidth"];const mX=qn({prop:"minWidth",transform:qi}),gX=qn({prop:"height",transform:qi}),vX=qn({prop:"maxHeight",transform:qi}),yX=qn({prop:"minHeight",transform:qi});qn({prop:"size",cssProperty:"width",transform:qi});qn({prop:"size",cssProperty:"height",transform:qi});const xX=qn({prop:"boxSizing"});Mb(pX,fR,mX,gX,vX,yX,xX);const og={border:{themeKey:"borders",transform:Ro},borderTop:{themeKey:"borders",transform:Ro},borderRight:{themeKey:"borders",transform:Ro},borderBottom:{themeKey:"borders",transform:Ro},borderLeft:{themeKey:"borders",transform:Ro},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ro},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Eb},color:{themeKey:"palette",transform:rd},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:rd},backgroundColor:{themeKey:"palette",transform:rd},p:{style:jn},pt:{style:jn},pr:{style:jn},pb:{style:jn},pl:{style:jn},px:{style:jn},py:{style:jn},padding:{style:jn},paddingTop:{style:jn},paddingRight:{style:jn},paddingBottom:{style:jn},paddingLeft:{style:jn},paddingX:{style:jn},paddingY:{style:jn},paddingInline:{style:jn},paddingInlineStart:{style:jn},paddingInlineEnd:{style:jn},paddingBlock:{style:jn},paddingBlockStart:{style:jn},paddingBlockEnd:{style:jn},m:{style:Bn},mt:{style:Bn},mr:{style:Bn},mb:{style:Bn},ml:{style:Bn},mx:{style:Bn},my:{style:Bn},margin:{style:Bn},marginTop:{style:Bn},marginRight:{style:Bn},marginBottom:{style:Bn},marginLeft:{style:Bn},marginX:{style:Bn},marginY:{style:Bn},marginInline:{style:Bn},marginInlineStart:{style:Bn},marginInlineEnd:{style:Bn},marginBlock:{style:Bn},marginBlockStart:{style:Bn},marginBlockEnd:{style:Bn},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:Cb},rowGap:{style:Rb},columnGap:{style:Tb},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qi},maxWidth:{style:fR},minWidth:{transform:qi},height:{transform:qi},maxHeight:{transform:qi},minHeight:{transform:qi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function bX(...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 _X(t,e){return typeof t=="function"?t(e):t}function Sz(){function t(n,r,i,o){const s={[n]:r,theme:i},a=o[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=yd(i,c)||{};return f?f(s):Di(s,r,v=>{let x=x1(h,u,v);return v===x&&typeof v=="string"&&(x=x1(h,u,`${n}${v==="default"?"":bt(v)}`,v)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:og;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=bz(o.breakpoints),f=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const v=_X(c[m],o);if(v!=null)if(typeof v=="object")if(s[m])h=Cp(h,t(m,v,o,s));else{const x=Di({theme:o},v,y=>({[m]:y}));bX(x,v)?h[m]=e({sx:v,theme:o}):h=Cp(h,x)}else h=Cp(h,t(m,v,o,s))}),_z(f,h)}return Array.isArray(i)?i.map(a):a(i)}return e}const Vd=Sz();Vd.filterProps=["sx"];function Mz(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 wX=["breakpoints","palette","spacing","shape"];function $d(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,s=Qe(t,wX),a=xz(n),l=$G(i);let c=ui({breakpoints:a,direction:"ltr",components:{},palette:W({mode:"light"},r),spacing:l,shape:W({},LG,o)},s);return c.applyStyles=Mz,c=e.reduce((u,f)=>ui(u,f),c),c.unstable_sxConfig=W({},og,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Vd({sx:f,theme:this})},c}const SX=Object.freeze(Object.defineProperty({__proto__:null,default:$d,private_createBreakpoints:xz,unstable_applyStyles:Mz},Symbol.toStringTag,{value:"Module"}));function MX(t){return Object.keys(t).length===0}function dR(t=null){const e=A.useContext(rg);return!e||MX(e)?t:e}const EX=$d();function Ab(t=EX){return dR(t)}function CX({styles:t,themeId:e,defaultTheme:n={}}){const r=Ab(n),i=typeof t=="function"?t(e&&r[e]||r):t;return C.jsx(gz,{styles:i})}const TX=["sx"],RX=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:og;return Object.keys(t).forEach(o=>{i[o]?r.systemProps[o]=t[o]:r.otherProps[o]=t[o]}),r};function sg(t){const{sx:e}=t,n=Qe(t,TX),{systemProps:r,otherProps:i}=RX(n);let o;return Array.isArray(e)?o=[r,...e]:typeof e=="function"?o=(...s)=>{const a=e(...s);return da(a)?W({},r,a):r}:o=W({},r,e),W({},i,{sx:o})}const AX=Object.freeze(Object.defineProperty({__proto__:null,default:Vd,extendSxProp:sg,unstable_createStyleFunctionSx:Sz,unstable_defaultSxConfig:og},Symbol.toStringTag,{value:"Module"})),II=t=>t,PX=()=>{let t=II;return{configure(e){t=e},generate(e){return t(e)},reset(){t=II}}},Ez=PX();function Cz(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"})(Vd);return A.forwardRef(function(l,c){const u=Ab(n),f=sg(l),{className:h,component:m="div"}=f,v=Qe(f,NX);return C.jsx(o,W({as:m,ref:c,className:st(h,i?i(r):r),theme:e&&u[e]||u},v))})}const LX={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 Tt(t,e,n="Mui"){const r=LX[e];return r?`${n}-${r}`:`${Ez.generate(t)}-${e}`}function Ct(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Tt(t,i,n)}),r}var Tz={exports:{}},mn={};/** + */var Sr=typeof Symbol=="function"&&Symbol.for,nR=Sr?Symbol.for("react.element"):60103,rR=Sr?Symbol.for("react.portal"):60106,hb=Sr?Symbol.for("react.fragment"):60107,pb=Sr?Symbol.for("react.strict_mode"):60108,mb=Sr?Symbol.for("react.profiler"):60114,gb=Sr?Symbol.for("react.provider"):60109,vb=Sr?Symbol.for("react.context"):60110,iR=Sr?Symbol.for("react.async_mode"):60111,yb=Sr?Symbol.for("react.concurrent_mode"):60111,xb=Sr?Symbol.for("react.forward_ref"):60112,bb=Sr?Symbol.for("react.suspense"):60113,KH=Sr?Symbol.for("react.suspense_list"):60120,_b=Sr?Symbol.for("react.memo"):60115,wb=Sr?Symbol.for("react.lazy"):60116,ZH=Sr?Symbol.for("react.block"):60121,JH=Sr?Symbol.for("react.fundamental"):60117,QH=Sr?Symbol.for("react.responder"):60118,eG=Sr?Symbol.for("react.scope"):60119;function lo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case nR:switch(t=t.type,t){case iR:case yb:case hb:case mb:case pb:case bb:return t;default:switch(t=t&&t.$$typeof,t){case vb:case xb:case wb:case _b:case gb:return t;default:return e}}case rR:return e}}}function rz(t){return lo(t)===yb}pn.AsyncMode=iR;pn.ConcurrentMode=yb;pn.ContextConsumer=vb;pn.ContextProvider=gb;pn.Element=nR;pn.ForwardRef=xb;pn.Fragment=hb;pn.Lazy=wb;pn.Memo=_b;pn.Portal=rR;pn.Profiler=mb;pn.StrictMode=pb;pn.Suspense=bb;pn.isAsyncMode=function(t){return rz(t)||lo(t)===iR};pn.isConcurrentMode=rz;pn.isContextConsumer=function(t){return lo(t)===vb};pn.isContextProvider=function(t){return lo(t)===gb};pn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===nR};pn.isForwardRef=function(t){return lo(t)===xb};pn.isFragment=function(t){return lo(t)===hb};pn.isLazy=function(t){return lo(t)===wb};pn.isMemo=function(t){return lo(t)===_b};pn.isPortal=function(t){return lo(t)===rR};pn.isProfiler=function(t){return lo(t)===mb};pn.isStrictMode=function(t){return lo(t)===pb};pn.isSuspense=function(t){return lo(t)===bb};pn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===hb||t===yb||t===mb||t===pb||t===bb||t===KH||typeof t=="object"&&t!==null&&(t.$$typeof===wb||t.$$typeof===_b||t.$$typeof===gb||t.$$typeof===vb||t.$$typeof===xb||t.$$typeof===JH||t.$$typeof===QH||t.$$typeof===eG||t.$$typeof===ZH)};pn.typeOf=lo;nz.exports=pn;var tG=nz.exports,iz=tG,nG={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},rG={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},oz={};oz[iz.ForwardRef]=nG;oz[iz.Memo]=rG;var iG=!0;function oG(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(r+=i+" ")}),r}var sz=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||iG===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},az=function(e,n,r){sz(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function sG(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 aG={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},lG=!1,cG=/[A-Z]|^ms/g,uG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lz=function(e){return e.charCodeAt(1)===45},MI=function(e){return e!=null&&typeof e!="boolean"},VS=XF(function(t){return lz(t)?t:t.replace(cG,"-$&").toLowerCase()}),EI=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(uG,function(r,i,o){return Es={name:i,styles:o,next:Es},i})}return aG[e]!==1&&!lz(e)&&typeof n=="number"&&n!==0?n+"px":n},fG="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function hm(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 Es={name:i.name,styles:i.styles,next:Es},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Es={name:s.name,styles:s.styles,next:Es},s=s.next;var a=o.styles+";";return a}return dG(t,e,n)}case"function":{if(t!==void 0){var l=Es,c=n(t);return Es=l,hm(t,e,c)}break}}var u=n;if(e==null)return u;var f=e[u];return f!==void 0?f:u}function dG(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?vG:yG},AI=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},xG=!1,bG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return sz(n,r,i),pG(function(){return az(n,r,i)}),null},_G=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,s;n!==void 0&&(o=n.label,s=n.target);var a=AI(e,n,r),l=a||RI(i),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{f.push(u[0][0]);for(var h=u.length,m=1;me(AG(i)?n:i):e;return C.jsx(gG,{styles:r})}function sR(t,e){return B2(t,e)}const vz=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},PG=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:gz,StyledEngineProvider:RG,ThemeContext:rg,css:dz,default:sR,internal_processStyles:vz,keyframes:Sb},Symbol.toStringTag,{value:"Module"}));function da(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 yz(t){if(!da(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=yz(t[n])}),e}function ui(t,e,n={clone:!0}){const r=n.clone?W({},t):t;return da(t)&&da(e)&&Object.keys(e).forEach(i=>{da(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&da(t[i])?r[i]=ui(t[i],e[i],n):n.clone?r[i]=da(e[i])?yz(e[i]):e[i]:r[i]=e[i]}),r}const NG=Object.freeze(Object.defineProperty({__proto__:null,default:ui,isPlainObject:da},Symbol.toStringTag,{value:"Module"})),IG=["values","unit","step"],LG=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 xz(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=Qe(t,IG),o=LG(e),s=Object.keys(o);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 v=s.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(v!==-1&&typeof e[s[v]]=="number"?e[s[v]]:m)-r/100}${n})`}function u(h){return s.indexOf(h)+1`@media (min-width:${aR[t]}px)`};function Di(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||PI;return e.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const o=r.breakpoints||PI;return Object.keys(e).reduce((s,a)=>{if(Object.keys(o.values||aR).indexOf(a)!==-1){const l=o.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function bz(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function _z(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function OG(t,...e){const n=bz(t),r=[n,...e].reduce((i,o)=>ui(i,o),{});return _z(Object.keys(n),r)}function DG(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,o)=>{o{t[i]!=null&&(n[i]=!0)}),n}function Uc({values:t,breakpoints:e,base:n}){const r=n||DG(t,e),i=Object.keys(r);if(i.length===0)return t;let o;return i.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[o],o=a):s[a]=t,s),{})}function bt(t){if(typeof t!="string")throw new Error(Ra(7));return t.charAt(0).toUpperCase()+t.slice(1)}const FG=Object.freeze(Object.defineProperty({__proto__:null,default:bt},Symbol.toStringTag,{value:"Module"}));function yd(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function x1(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=yd(t,n)||r,e&&(i=e(i,r,t)),i}function qn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,c=yd(l,r)||{};return Di(s,a,f=>{let h=x1(c,i,f);return f===h&&typeof f=="string"&&(h=x1(c,i,`${e}${f==="default"?"":bt(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[e],o}function zG(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const UG={m:"margin",p:"padding"},BG={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},NI={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},jG=zG(t=>{if(t.length>2)if(NI[t])t=NI[t];else return[t];const[e,n]=t.split(""),r=UG[e],i=BG[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),lR=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cR=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...lR,...cR];function ig(t,e,n,r){var i;const o=(i=yd(t,e,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function uR(t){return ig(t,"spacing",8)}function iu(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 VG(t,e){return n=>t.reduce((r,i)=>(r[i]=iu(e,n),r),{})}function $G(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=jG(n),o=VG(i,r),s=t[n];return Di(t,s,o)}function wz(t,e){const n=uR(t.theme);return Object.keys(t).map(r=>$G(t,e,r,n)).reduce(Cp,{})}function Bn(t){return wz(t,lR)}Bn.propTypes={};Bn.filterProps=lR;function jn(t){return wz(t,cR)}jn.propTypes={};jn.filterProps=cR;function WG(t=8){if(t.mui)return t;const e=uR({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=e(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function Mb(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?Cp(i,e[o](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ro(t){return typeof t!="number"?t:`${t}px solid`}function Do(t,e){return qn({prop:t,themeKey:"borders",transform:e})}const HG=Do("border",Ro),GG=Do("borderTop",Ro),XG=Do("borderRight",Ro),qG=Do("borderBottom",Ro),YG=Do("borderLeft",Ro),KG=Do("borderColor"),ZG=Do("borderTopColor"),JG=Do("borderRightColor"),QG=Do("borderBottomColor"),eX=Do("borderLeftColor"),tX=Do("outline",Ro),nX=Do("outlineColor"),Eb=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=ig(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:iu(e,r)});return Di(t,t.borderRadius,n)}return null};Eb.propTypes={};Eb.filterProps=["borderRadius"];Mb(HG,GG,XG,qG,YG,KG,ZG,JG,QG,eX,Eb,tX,nX);const Cb=t=>{if(t.gap!==void 0&&t.gap!==null){const e=ig(t.theme,"spacing",8),n=r=>({gap:iu(e,r)});return Di(t,t.gap,n)}return null};Cb.propTypes={};Cb.filterProps=["gap"];const Tb=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=ig(t.theme,"spacing",8),n=r=>({columnGap:iu(e,r)});return Di(t,t.columnGap,n)}return null};Tb.propTypes={};Tb.filterProps=["columnGap"];const Rb=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=ig(t.theme,"spacing",8),n=r=>({rowGap:iu(e,r)});return Di(t,t.rowGap,n)}return null};Rb.propTypes={};Rb.filterProps=["rowGap"];const rX=qn({prop:"gridColumn"}),iX=qn({prop:"gridRow"}),oX=qn({prop:"gridAutoFlow"}),sX=qn({prop:"gridAutoColumns"}),aX=qn({prop:"gridAutoRows"}),lX=qn({prop:"gridTemplateColumns"}),cX=qn({prop:"gridTemplateRows"}),uX=qn({prop:"gridTemplateAreas"}),fX=qn({prop:"gridArea"});Mb(Cb,Tb,Rb,rX,iX,oX,sX,aX,lX,cX,uX,fX);function rd(t,e){return e==="grey"?e:t}const dX=qn({prop:"color",themeKey:"palette",transform:rd}),hX=qn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:rd}),pX=qn({prop:"backgroundColor",themeKey:"palette",transform:rd});Mb(dX,hX,pX);function qi(t){return t<=1&&t!==0?`${t*100}%`:t}const mX=qn({prop:"width",transform:qi}),fR=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||aR[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:qi(n)}};return Di(t,t.maxWidth,e)}return null};fR.filterProps=["maxWidth"];const gX=qn({prop:"minWidth",transform:qi}),vX=qn({prop:"height",transform:qi}),yX=qn({prop:"maxHeight",transform:qi}),xX=qn({prop:"minHeight",transform:qi});qn({prop:"size",cssProperty:"width",transform:qi});qn({prop:"size",cssProperty:"height",transform:qi});const bX=qn({prop:"boxSizing"});Mb(mX,fR,gX,vX,yX,xX,bX);const og={border:{themeKey:"borders",transform:Ro},borderTop:{themeKey:"borders",transform:Ro},borderRight:{themeKey:"borders",transform:Ro},borderBottom:{themeKey:"borders",transform:Ro},borderLeft:{themeKey:"borders",transform:Ro},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ro},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Eb},color:{themeKey:"palette",transform:rd},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:rd},backgroundColor:{themeKey:"palette",transform:rd},p:{style:jn},pt:{style:jn},pr:{style:jn},pb:{style:jn},pl:{style:jn},px:{style:jn},py:{style:jn},padding:{style:jn},paddingTop:{style:jn},paddingRight:{style:jn},paddingBottom:{style:jn},paddingLeft:{style:jn},paddingX:{style:jn},paddingY:{style:jn},paddingInline:{style:jn},paddingInlineStart:{style:jn},paddingInlineEnd:{style:jn},paddingBlock:{style:jn},paddingBlockStart:{style:jn},paddingBlockEnd:{style:jn},m:{style:Bn},mt:{style:Bn},mr:{style:Bn},mb:{style:Bn},ml:{style:Bn},mx:{style:Bn},my:{style:Bn},margin:{style:Bn},marginTop:{style:Bn},marginRight:{style:Bn},marginBottom:{style:Bn},marginLeft:{style:Bn},marginX:{style:Bn},marginY:{style:Bn},marginInline:{style:Bn},marginInlineStart:{style:Bn},marginInlineEnd:{style:Bn},marginBlock:{style:Bn},marginBlockStart:{style:Bn},marginBlockEnd:{style:Bn},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:Cb},rowGap:{style:Rb},columnGap:{style:Tb},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qi},maxWidth:{style:fR},minWidth:{transform:qi},height:{transform:qi},maxHeight:{transform:qi},minHeight:{transform:qi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function _X(...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 wX(t,e){return typeof t=="function"?t(e):t}function Sz(){function t(n,r,i,o){const s={[n]:r,theme:i},a=o[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=yd(i,c)||{};return f?f(s):Di(s,r,v=>{let x=x1(h,u,v);return v===x&&typeof v=="string"&&(x=x1(h,u,`${n}${v==="default"?"":bt(v)}`,v)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:og;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=bz(o.breakpoints),f=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const v=wX(c[m],o);if(v!=null)if(typeof v=="object")if(s[m])h=Cp(h,t(m,v,o,s));else{const x=Di({theme:o},v,y=>({[m]:y}));_X(x,v)?h[m]=e({sx:v,theme:o}):h=Cp(h,x)}else h=Cp(h,t(m,v,o,s))}),_z(f,h)}return Array.isArray(i)?i.map(a):a(i)}return e}const Vd=Sz();Vd.filterProps=["sx"];function Mz(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 SX=["breakpoints","palette","spacing","shape"];function $d(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,s=Qe(t,SX),a=xz(n),l=WG(i);let c=ui({breakpoints:a,direction:"ltr",components:{},palette:W({mode:"light"},r),spacing:l,shape:W({},kG,o)},s);return c.applyStyles=Mz,c=e.reduce((u,f)=>ui(u,f),c),c.unstable_sxConfig=W({},og,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Vd({sx:f,theme:this})},c}const MX=Object.freeze(Object.defineProperty({__proto__:null,default:$d,private_createBreakpoints:xz,unstable_applyStyles:Mz},Symbol.toStringTag,{value:"Module"}));function EX(t){return Object.keys(t).length===0}function dR(t=null){const e=A.useContext(rg);return!e||EX(e)?t:e}const CX=$d();function Ab(t=CX){return dR(t)}function TX({styles:t,themeId:e,defaultTheme:n={}}){const r=Ab(n),i=typeof t=="function"?t(e&&r[e]||r):t;return C.jsx(gz,{styles:i})}const RX=["sx"],AX=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:og;return Object.keys(t).forEach(o=>{i[o]?r.systemProps[o]=t[o]:r.otherProps[o]=t[o]}),r};function sg(t){const{sx:e}=t,n=Qe(t,RX),{systemProps:r,otherProps:i}=AX(n);let o;return Array.isArray(e)?o=[r,...e]:typeof e=="function"?o=(...s)=>{const a=e(...s);return da(a)?W({},r,a):r}:o=W({},r,e),W({},i,{sx:o})}const PX=Object.freeze(Object.defineProperty({__proto__:null,default:Vd,extendSxProp:sg,unstable_createStyleFunctionSx:Sz,unstable_defaultSxConfig:og},Symbol.toStringTag,{value:"Module"})),II=t=>t,NX=()=>{let t=II;return{configure(e){t=e},generate(e){return t(e)},reset(){t=II}}},Ez=NX();function Cz(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"})(Vd);return A.forwardRef(function(l,c){const u=Ab(n),f=sg(l),{className:h,component:m="div"}=f,v=Qe(f,IX);return C.jsx(o,W({as:m,ref:c,className:st(h,i?i(r):r),theme:e&&u[e]||u},v))})}const kX={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 Tt(t,e,n="Mui"){const r=kX[e];return r?`${n}-${r}`:`${Ez.generate(t)}-${e}`}function Ct(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Tt(t,i,n)}),r}var Tz={exports:{}},mn={};/** * @license React * react-is.production.min.js * @@ -57,7 +57,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var hR=Symbol.for("react.element"),pR=Symbol.for("react.portal"),Pb=Symbol.for("react.fragment"),Nb=Symbol.for("react.strict_mode"),Ib=Symbol.for("react.profiler"),Lb=Symbol.for("react.provider"),kb=Symbol.for("react.context"),kX=Symbol.for("react.server_context"),Ob=Symbol.for("react.forward_ref"),Db=Symbol.for("react.suspense"),Fb=Symbol.for("react.suspense_list"),zb=Symbol.for("react.memo"),Ub=Symbol.for("react.lazy"),OX=Symbol.for("react.offscreen"),Rz;Rz=Symbol.for("react.module.reference");function Fo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case hR:switch(t=t.type,t){case Pb:case Ib:case Nb:case Db:case Fb:return t;default:switch(t=t&&t.$$typeof,t){case kX:case kb:case Ob:case Ub:case zb:case Lb:return t;default:return e}}case pR:return e}}}mn.ContextConsumer=kb;mn.ContextProvider=Lb;mn.Element=hR;mn.ForwardRef=Ob;mn.Fragment=Pb;mn.Lazy=Ub;mn.Memo=zb;mn.Portal=pR;mn.Profiler=Ib;mn.StrictMode=Nb;mn.Suspense=Db;mn.SuspenseList=Fb;mn.isAsyncMode=function(){return!1};mn.isConcurrentMode=function(){return!1};mn.isContextConsumer=function(t){return Fo(t)===kb};mn.isContextProvider=function(t){return Fo(t)===Lb};mn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===hR};mn.isForwardRef=function(t){return Fo(t)===Ob};mn.isFragment=function(t){return Fo(t)===Pb};mn.isLazy=function(t){return Fo(t)===Ub};mn.isMemo=function(t){return Fo(t)===zb};mn.isPortal=function(t){return Fo(t)===pR};mn.isProfiler=function(t){return Fo(t)===Ib};mn.isStrictMode=function(t){return Fo(t)===Nb};mn.isSuspense=function(t){return Fo(t)===Db};mn.isSuspenseList=function(t){return Fo(t)===Fb};mn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Pb||t===Ib||t===Nb||t===Db||t===Fb||t===OX||typeof t=="object"&&t!==null&&(t.$$typeof===Ub||t.$$typeof===zb||t.$$typeof===Lb||t.$$typeof===kb||t.$$typeof===Ob||t.$$typeof===Rz||t.getModuleId!==void 0)};mn.typeOf=Fo;Tz.exports=mn;var V2=Tz.exports;const DX=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Az(t){const e=`${t}`.match(DX);return e&&e[1]||""}function Pz(t,e=""){return t.displayName||t.name||Az(t)||e}function LI(t,e,n){const r=Pz(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function FX(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Pz(t,"Component");if(typeof t=="object")switch(t.$$typeof){case V2.ForwardRef:return LI(t,t.render,"ForwardRef");case V2.Memo:return LI(t,t.type,"memo");default:return}}}const zX=Object.freeze(Object.defineProperty({__proto__:null,default:FX,getFunctionName:Az},Symbol.toStringTag,{value:"Module"})),UX=["ownerState"],BX=["variants"],jX=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function VX(t){return Object.keys(t).length===0}function $X(t){return typeof t=="string"&&t.charCodeAt(0)>96}function $S(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const WX=$d(),HX=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Q0({defaultTheme:t,theme:e,themeId:n}){return VX(e)?t:e[n]||e}function GX(t){return t?(e,n)=>n[t]:null}function Ny(t,e){let{ownerState:n}=e,r=Qe(e,UX);const i=typeof t=="function"?t(W({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>Ny(o,W({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=Qe(i,BX);return o.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 XX(t={}){const{themeId:e,defaultTheme:n=WX,rootShouldForwardProp:r=$S,slotShouldForwardProp:i=$S}=t,o=s=>Vd(W({},s,{theme:Q0(W({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{vz(s,P=>P.filter(N=>!(N!=null&&N.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=GX(HX(c))}=a,m=Qe(a,jX),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=$S;c==="Root"||c==="root"?g=r:c?g=i:$X(s)&&(g=void 0);const b=sR(s,W({shouldForwardProp:g,label:y},m)),_=P=>typeof P=="function"&&P.__emotion_real!==P||da(P)?N=>Ny(P,W({},N,{theme:Q0({theme:N.theme,defaultTheme:n,themeId:e})})):P,S=(P,...N)=>{let T=_(P);const L=N?N.map(_):[];l&&h&&L.push(R=>{const D=Q0(W({},R,{defaultTheme:n,themeId:e}));if(!D.components||!D.components[l]||!D.components[l].styleOverrides)return null;const O=D.components[l].styleOverrides,B={};return Object.entries(O).forEach(([X,H])=>{B[X]=Ny(H,W({},R,{theme:D}))}),h(R,B)}),l&&!v&&L.push(R=>{var D;const O=Q0(W({},R,{defaultTheme:n,themeId:e})),B=O==null||(D=O.components)==null||(D=D[l])==null?void 0:D.variants;return Ny({variants:B},W({},R,{theme:O}))}),x||L.push(o);const U=L.length-N.length;if(Array.isArray(P)&&U>0){const R=new Array(U).fill("");T=[...P,...R],T.raw=[...P.raw,...R]}const M=b(T,...L);return s.muiName&&(M.muiName=s.muiName),M};return b.withConfig&&(S.withConfig=b.withConfig),S}}const Nz=XX();function pm(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]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=W({},o),Object.keys(i).forEach(s=>{n[r][s]=pm(i[s],o[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Iz(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:pm(e.components[n].defaultProps,r)}function Lz({props:t,name:e,defaultTheme:n,themeId:r}){let i=Ab(n);return r&&(i=i[r]||i),Iz({theme:i,name:e,props:t})}const ko=typeof window<"u"?A.useLayoutEffect:A.useEffect;function qX(t,e,n,r,i){const[o,s]=A.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return ko(()=>{let a=!0;if(!n)return;const l=n(t),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[t,n]),o}const kz=A.useSyncExternalStore;function YX(t,e,n,r,i){const o=A.useCallback(()=>e,[e]),s=A.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:u}=r(t);return()=>u}return o},[o,t,r,i,n]),[a,l]=A.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(t);return[()=>u.matches,f=>(u.addListener(f),()=>{u.removeListener(f)})]},[o,n,t]);return kz(l,a,s)}function Oz(t,e={}){const n=dR(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=Iz({name:"MuiUseMediaQuery",props:e,theme:n});let l=typeof t=="function"?t(n):t;return l=l.replace(/^@media( ?)/m,""),(kz!==void 0?YX:qX)(l,i,o,s,a)}function Dz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const KX=Object.freeze(Object.defineProperty({__proto__:null,default:Dz},Symbol.toStringTag,{value:"Module"}));function Fz(t,e=0,n=1){return Dz(t,e,n)}function ZX(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 mR(t){if(t.type)return t;if(t.charAt(0)==="#")return mR(ZX(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Ra(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(Ra(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function zz(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<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 WS(t,e){if(t=mR(t),e=Fz(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 zz(t)}function HS(t,e){if(t=mR(t),e=Fz(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 zz(t)}function kI(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Bb(t,e=166){let n;function r(...i){const o=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(o,e)}return r.clear=()=>{clearTimeout(n)},r}function Iy(t,e){var n,r;return A.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 Li(t){return t&&t.ownerDocument||document}function Aa(t){return Li(t).defaultView||window}function $2(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let OI=0;function JX(t){const[e,n]=A.useState(t),r=t||e;return A.useEffect(()=>{e==null&&(OI+=1,n(`mui-${OI}`))},[e]),r}const DI=Hp.useId;function Uz(t){if(DI!==void 0){const e=DI();return t??e}return JX(t)}function W2({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=A.useRef(t!==void 0),[o,s]=A.useState(e),a=i?t:o,l=A.useCallback(c=>{i||s(c)},[]);return[a,l]}function va(t){const e=A.useRef(t);return ko(()=>{e.current=t}),A.useRef((...n)=>(0,e.current)(...n)).current}function _r(...t){return A.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{$2(n,e)})},t)}const FI={};function QX(t,e){const n=A.useRef(FI);return n.current===FI&&(n.current=t(e)),n}const eq=[];function tq(t){A.useEffect(t,eq)}class jb{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new jb}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Bz(){const t=QX(jb.create).current;return tq(t.disposeEffect),t}let Vb=!0,H2=!1;const nq=new jb,rq={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 iq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&rq[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function oq(t){t.metaKey||t.altKey||t.ctrlKey||(Vb=!0)}function GS(){Vb=!1}function sq(){this.visibilityState==="hidden"&&H2&&(Vb=!0)}function aq(t){t.addEventListener("keydown",oq,!0),t.addEventListener("mousedown",GS,!0),t.addEventListener("pointerdown",GS,!0),t.addEventListener("touchstart",GS,!0),t.addEventListener("visibilitychange",sq,!0)}function lq(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Vb||iq(e)}function jz(){const t=A.useCallback(i=>{i!=null&&aq(i.ownerDocument)},[]),e=A.useRef(!1);function n(){return e.current?(H2=!0,nq.start(100,()=>{H2=!1}),e.current=!1,!0):!1}function r(i){return lq(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function Vz(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let Yu;function $z(){if(Yu)return Yu;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),Yu="reverse",t.scrollLeft>0?Yu="default":(t.scrollLeft=1,t.scrollLeft===0&&(Yu="negative")),document.body.removeChild(t),Yu}function cq(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch($z()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}function Rt(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((o,s)=>{if(s){const a=e(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function xd(t){return typeof t=="string"}function uq(t,e,n){return t===void 0||xd(t)?e:W({},e,{ownerState:W({},e.ownerState,n)})}function Wz(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 zI(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 fq(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const m=st(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),v=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(v).length>0&&(x.style=v),{props:x,internalRef:void 0}}const s=Wz(W({},i,r)),a=zI(r),l=zI(i),c=e(s),u=st(c==null?void 0:c.className,n==null?void 0:n.className,o,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 dq(t,e,n){return typeof t=="function"?t(e,n):t}const hq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Us(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=t,s=Qe(t,hq),a=o?{}:dq(r,i),{props:l,internalRef:c}=fq(W({},s,{externalSlotProps:a})),u=_r(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return uq(n,W({},l,{ref:u}),i)}const Hz=A.createContext(null);function Gz(){return A.useContext(Hz)}const pq=typeof Symbol=="function"&&Symbol.for,mq=pq?Symbol.for("mui.nested"):"__THEME_NESTED__";function gq(t,e){return typeof e=="function"?e(t):W({},t,e)}function vq(t){const{children:e,theme:n}=t,r=Gz(),i=A.useMemo(()=>{const o=r===null?n:gq(r,n);return o!=null&&(o[mq]=r!==null),o},[n,r]);return C.jsx(Hz.Provider,{value:i,children:e})}const yq=["value"],Xz=A.createContext();function xq(t){let{value:e}=t,n=Qe(t,yq);return C.jsx(Xz.Provider,W({value:e??!0},n))}const gR=()=>{const t=A.useContext(Xz);return t??!1},qz=A.createContext(void 0);function bq({value:t,children:e}){return C.jsx(qz.Provider,{value:t,children:e})}function _q(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?pm(i.defaultProps,r):!i.styleOverrides&&!i.variants?pm(i,r):r}function wq({props:t,name:e}){const n=A.useContext(qz);return _q({props:t,name:e,theme:{components:n}})}const UI={};function BI(t,e,n,r=!1){return A.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const o=n(i),s=t?W({},e,{[t]:o}):o;return r?()=>s:s}return t?W({},e,{[t]:n}):W({},e,n)},[t,e,n,r])}function Sq(t){const{children:e,theme:n,themeId:r}=t,i=dR(UI),o=Gz()||UI,s=BI(r,i,n),a=BI(r,o,n,!0),l=s.direction==="rtl";return C.jsx(vq,{theme:a,children:C.jsx(rg.Provider,{value:s,children:C.jsx(xq,{value:l,children:C.jsx(bq,{value:s==null?void 0:s.components,children:e})})})})}const Mq=["className","component","disableGutters","fixed","maxWidth","classes"],Eq=$d(),Cq=Nz("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]}}),Tq=t=>Lz({props:t,name:"MuiContainer",defaultTheme:Eq}),Rq=(t,e)=>{const n=l=>Tt(e,l),{classes:r,fixed:i,disableGutters:o,maxWidth:s}=t,a={root:["root",s&&`maxWidth${bt(String(s))}`,i&&"fixed",o&&"disableGutters"]};return Rt(a,n,r)};function Aq(t={}){const{createStyledComponent:e=Cq,useThemeProps:n=Tq,componentName:r="MuiContainer"}=t,i=e(({theme:s,ownerState:a})=>W({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:a})=>a.fixed&&Object.keys(s.breakpoints.values).reduce((l,c)=>{const u=c,f=s.breakpoints.values[u];return f!==0&&(l[s.breakpoints.up(u)]={maxWidth:`${f}${s.breakpoints.unit}`}),l},{}),({theme:s,ownerState:a})=>W({},a.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[s.breakpoints.up(a.maxWidth)]:{maxWidth:`${s.breakpoints.values[a.maxWidth]}${s.breakpoints.unit}`}}));return A.forwardRef(function(a,l){const c=n(a),{className:u,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:v="lg"}=c,x=Qe(c,Mq),y=W({},c,{component:f,disableGutters:h,fixed:m,maxWidth:v}),g=Rq(y,r);return C.jsx(i,W({as:f,ownerState:y,className:st(g.root,u),ref:l},x))})}const Pq=["component","direction","spacing","divider","children","className","useFlexGap"],Nq=$d(),Iq=Nz("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Lq(t){return Lz({props:t,name:"MuiStack",defaultTheme:Nq})}function kq(t,e){const n=A.Children.toArray(t).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Dq=({ownerState:t,theme:e})=>{let n=W({display:"flex",flexDirection:"column"},Di({theme:e},Uc({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=uR(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),{}),o=Uc({values:t.direction,base:i}),s=Uc({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const h=c>0?o[u[c-1]]:"column";o[l]=h}}),n=ui(n,Di({theme:e},s,(l,c)=>t.useFlexGap?{gap:iu(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Oq(c?o[c]:t.direction)}`]:iu(r,l)}}))}return n=kG(e.breakpoints,n),n};function Fq(t={}){const{createStyledComponent:e=Iq,useThemeProps:n=Lq,componentName:r="MuiStack"}=t,i=()=>Rt({root:["root"]},l=>Tt(r,l),{}),o=e(Dq);return A.forwardRef(function(l,c){const u=n(l),f=sg(u),{component:h="div",direction:m="column",spacing:v=0,divider:x,children:y,className:g,useFlexGap:b=!1}=f,_=Qe(f,Pq),S={direction:m,spacing:v,useFlexGap:b},P=i();return C.jsx(o,W({as:h,ownerState:S,ref:c,className:st(P.root,g)},_,{children:x?kq(y,x):y}))})}function zq(t,e){return W({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Yn={},Yz={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})(Yz);var Kz=Yz.exports;const Uq=Ws(vH),Bq=Ws(KX);var Zz=Kz;Object.defineProperty(Yn,"__esModule",{value:!0});var Rn=Yn.alpha=r6;Yn.blend=Zq;Yn.colorChannel=void 0;var Jz=Yn.darken=yR;Yn.decomposeColor=Oo;Yn.emphasize=i6;var jq=Yn.getContrastRatio=Gq;Yn.getLuminance=b1;Yn.hexToRgb=e6;Yn.hslToRgb=n6;var Qz=Yn.lighten=xR;Yn.private_safeAlpha=Xq;Yn.private_safeColorChannel=void 0;Yn.private_safeDarken=qq;Yn.private_safeEmphasize=Kq;Yn.private_safeLighten=Yq;Yn.recomposeColor=Wd;Yn.rgbToHex=Hq;var jI=Zz(Uq),Vq=Zz(Bq);function vR(t,e=0,n=1){return(0,Vq.default)(t,e,n)}function e6(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 $q(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Oo(t){if(t.type)return t;if(t.charAt(0)==="#")return Oo(e6(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,jI.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,jI.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const t6=t=>{const e=Oo(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Yn.colorChannel=t6;const Wq=(t,e)=>{try{return t6(t)}catch{return t}};Yn.private_safeColorChannel=Wq;function Wd(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<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 Hq(t){if(t.indexOf("#")===0)return t;const{values:e}=Oo(t);return`#${e.map((n,r)=>$q(r===3?Math.round(255*n):n)).join("")}`}function n6(t){t=Oo(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Wd({type:a,values:l})}function b1(t){t=Oo(t);let e=t.type==="hsl"||t.type==="hsla"?Oo(n6(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 Gq(t,e){const n=b1(t),r=b1(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function r6(t,e){return t=Oo(t),e=vR(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Wd(t)}function Xq(t,e,n){try{return r6(t,e)}catch{return t}}function yR(t,e){if(t=Oo(t),e=vR(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 Wd(t)}function qq(t,e,n){try{return yR(t,e)}catch{return t}}function xR(t,e){if(t=Oo(t),e=vR(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 Wd(t)}function Yq(t,e,n){try{return xR(t,e)}catch{return t}}function i6(t,e=.15){return b1(t)>.5?yR(t,e):xR(t,e)}function Kq(t,e,n){try{return i6(t,e)}catch{return t}}function Zq(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=Oo(t),s=Oo(e),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return Wd({type:"rgb",values:a})}const Jq=["mode","contrastThreshold","tonalOffset"],VI={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:um.white,default:um.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}},XS={text:{primary:um.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:um.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 $I(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Qz(t.main,i):e==="dark"&&(t.dark=Jz(t.main,o)))}function Qq(t="light"){return t==="dark"?{main:Gu[200],light:Gu[50],dark:Gu[400]}:{main:Gu[700],light:Gu[400],dark:Gu[800]}}function eY(t="light"){return t==="dark"?{main:Hu[200],light:Hu[50],dark:Hu[400]}:{main:Hu[500],light:Hu[300],dark:Hu[700]}}function tY(t="light"){return t==="dark"?{main:Wu[500],light:Wu[300],dark:Wu[700]}:{main:Wu[700],light:Wu[400],dark:Wu[800]}}function nY(t="light"){return t==="dark"?{main:Xu[400],light:Xu[300],dark:Xu[700]}:{main:Xu[700],light:Xu[500],dark:Xu[900]}}function rY(t="light"){return t==="dark"?{main:qu[400],light:qu[300],dark:qu[700]}:{main:qu[800],light:qu[500],dark:qu[900]}}function iY(t="light"){return t==="dark"?{main:Oh[400],light:Oh[300],dark:Oh[700]}:{main:"#ed6c02",light:Oh[500],dark:Oh[900]}}function oY(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=Qe(t,Jq),o=t.primary||Qq(e),s=t.secondary||eY(e),a=t.error||tY(e),l=t.info||nY(e),c=t.success||rY(e),u=t.warning||iY(e);function f(x){return jq(x,XS.text.primary)>=n?XS.text.primary:VI.text.primary}const h=({color:x,name:y,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(Ra(11,y?` (${y})`:"",g));if(typeof x.main!="string")throw new Error(Ra(12,y?` (${y})`:"",JSON.stringify(x.main)));return $I(x,"light",b,r),$I(x,"dark",_,r),x.contrastText||(x.contrastText=f(x.main)),x},m={dark:XS,light:VI};return ui(W({common:W({},um),mode:e,primary:h({color:o,name:"primary"}),secondary:h({color:s,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:gH,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},m[e]),i)}const sY=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function aY(t){return Math.round(t*1e5)/1e5}const WI={textTransform:"uppercase"},HI='"Roboto", "Helvetica", "Arial", sans-serif';function lY(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=HI,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=n,h=Qe(n,sY),m=i/14,v=f||(g=>`${g/c*m}rem`),x=(g,b,_,S,P)=>W({fontFamily:r,fontWeight:g,fontSize:v(b),lineHeight:_},r===HI?{letterSpacing:`${aY(S/b)}em`}:{},P,u),y={h1:x(o,96,1.167,-1.5),h2:x(o,60,1.2,-.5),h3:x(s,48,1.167,0),h4:x(s,34,1.235,.25),h5:x(s,24,1.334,0),h6:x(a,20,1.6,.15),subtitle1:x(s,16,1.75,.15),subtitle2:x(a,14,1.57,.1),body1:x(s,16,1.5,.15),body2:x(s,14,1.43,.15),button:x(a,14,1.75,.4,WI),caption:x(s,12,1.66,.4),overline:x(s,12,2.66,1,WI),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ui(W({htmlFontSize:c,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}const cY=.2,uY=.14,fY=.12;function Cn(...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,${uY})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${fY})`].join(",")}const dY=["none",Cn(0,2,1,-1,0,1,1,0,0,1,3,0),Cn(0,3,1,-2,0,2,2,0,0,1,5,0),Cn(0,3,3,-2,0,3,4,0,0,1,8,0),Cn(0,2,4,-1,0,4,5,0,0,1,10,0),Cn(0,3,5,-1,0,5,8,0,0,1,14,0),Cn(0,3,5,-1,0,6,10,0,0,1,18,0),Cn(0,4,5,-2,0,7,10,1,0,2,16,1),Cn(0,5,5,-3,0,8,10,1,0,3,14,2),Cn(0,5,6,-3,0,9,12,1,0,3,16,2),Cn(0,6,6,-3,0,10,14,1,0,4,18,3),Cn(0,6,7,-4,0,11,15,1,0,4,20,3),Cn(0,7,8,-4,0,12,17,2,0,5,22,4),Cn(0,7,8,-4,0,13,19,2,0,5,24,4),Cn(0,7,9,-4,0,14,21,2,0,5,26,4),Cn(0,8,9,-5,0,15,22,2,0,6,28,5),Cn(0,8,10,-5,0,16,24,2,0,6,30,5),Cn(0,8,11,-5,0,17,26,2,0,6,32,5),Cn(0,9,11,-5,0,18,28,2,0,7,34,6),Cn(0,9,12,-6,0,19,29,2,0,7,36,6),Cn(0,10,13,-6,0,20,31,3,0,8,38,7),Cn(0,10,13,-6,0,21,33,3,0,8,40,7),Cn(0,10,14,-6,0,22,35,3,0,8,42,7),Cn(0,11,14,-7,0,23,36,3,0,9,44,8),Cn(0,11,15,-7,0,24,38,3,0,9,46,8)],hY=["duration","easing","delay"],pY={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)"},mY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function GI(t){return`${Math.round(t)}ms`}function gY(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function vY(t){const e=W({},pY,t.easing),n=W({},mY,t.duration);return W({getAutoHeightDuration:gY,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=o;return Qe(o,hY),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:GI(s)} ${a} ${typeof l=="string"?l:GI(l)}`).join(",")}},t,{easing:e,duration:n})}const yY={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},xY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function bR(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,s=Qe(t,xY);if(t.vars)throw new Error(Ra(18));const a=oY(r),l=$d(t);let c=ui(l,{mixins:zq(l.breakpoints,n),palette:a,shadows:dY.slice(),typography:lY(a,o),transitions:vY(i),zIndex:W({},yY)});return c=ui(c,s),c=e.reduce((u,f)=>ui(u,f),c),c.unstable_sxConfig=W({},og,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Vd({sx:f,theme:this})},c}const _R=bR();function mu(){const t=Ab(_R);return t[gd]||t}var ag={},qS={exports:{}},XI;function bY(){return XI||(XI=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r96}function Ly(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const zY=ag.systemDefaultTheme=(0,PY.default)(),UY=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function ev({defaultTheme:t,theme:e,themeId:n}){return DY(e)?t:e[n]||e}function BY(t){return t?(e,n)=>n[t]:null}function ky(t,e){let{ownerState:n}=e,r=(0,G2.default)(e,IY);const i=typeof t=="function"?t((0,wo.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>ky(o,(0,wo.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,G2.default)(i,LY);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,wo.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,wo.default)({ownerState:n},r,n)):l.style))}),a}return i}function jY(t={}){const{themeId:e,defaultTheme:n=zY,rootShouldForwardProp:r=Ly,slotShouldForwardProp:i=Ly}=t,o=s=>(0,NY.default)((0,wo.default)({},s,{theme:ev((0,wo.default)({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,YI.internal_processStyles)(s,P=>P.filter(N=>!(N!=null&&N.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=BY(UY(c))}=a,m=(0,G2.default)(a,kY),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=Ly;c==="Root"||c==="root"?g=r:c?g=i:FY(s)&&(g=void 0);const b=(0,YI.default)(s,(0,wo.default)({shouldForwardProp:g,label:y},m)),_=P=>typeof P=="function"&&P.__emotion_real!==P||(0,AY.isPlainObject)(P)?N=>ky(P,(0,wo.default)({},N,{theme:ev({theme:N.theme,defaultTheme:n,themeId:e})})):P,S=(P,...N)=>{let T=_(P);const L=N?N.map(_):[];l&&h&&L.push(R=>{const D=ev((0,wo.default)({},R,{defaultTheme:n,themeId:e}));if(!D.components||!D.components[l]||!D.components[l].styleOverrides)return null;const O=D.components[l].styleOverrides,B={};return Object.entries(O).forEach(([X,H])=>{B[X]=ky(H,(0,wo.default)({},R,{theme:D}))}),h(R,B)}),l&&!v&&L.push(R=>{var D;const O=ev((0,wo.default)({},R,{defaultTheme:n,themeId:e})),B=O==null||(D=O.components)==null||(D=D[l])==null?void 0:D.variants;return ky({variants:B},(0,wo.default)({},R,{theme:O}))}),x||L.push(o);const U=L.length-N.length;if(Array.isArray(P)&&U>0){const R=new Array(U).fill("");T=[...P,...R],T.raw=[...P.raw,...R]}const M=b(T,...L);return s.muiName&&(M.muiName=s.muiName),M};return b.withConfig&&(S.withConfig=b.withConfig),S}}function s6(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const pi=t=>s6(t)&&t!=="classes",qe=RY({themeId:gd,defaultTheme:_R,rootShouldForwardProp:pi}),VY=["theme"];function $Y(t){let{theme:e}=t,n=Qe(t,VY);const r=e[gd];return C.jsx(Sq,W({},n,{themeId:r?gd:void 0,theme:r||e}))}const KI=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function At(t){return wq(t)}function WY(t){return Tt("MuiSvgIcon",t)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const HY=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],GY=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${bt(e)}`,`fontSize${bt(n)}`]};return Rt(i,WY,r)},XY=qe("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,o,s,a,l,c,u,f,h,m,v;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:((o=t.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,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:(v=(t.vars||t).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[e.color]}}),_1=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=r,m=Qe(r,HY),v=A.isValidElement(i)&&i.type==="svg",x=W({},r,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:v}),y={};u||(y.viewBox=h);const g=GY(x);return C.jsxs(XY,W({as:a,className:st(g.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},y,m,v&&i.props,{ownerState:x,children:[v?i.props.children:i,f?C.jsx("title",{children:f}):null]}))});_1.muiName="SvgIcon";function Gd(t,e){function n(r,i){return C.jsx(_1,W({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=_1.muiName,A.memo(A.forwardRef(n))}function X2(t,e){return X2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},X2(t,e)}function wR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,X2(t,e)}const ZI={disabled:!1},w1=Mt.createContext(null);var qY=function(e){return e.scrollTop},dp="unmounted",vc="exited",yc="entering",wf="entered",q2="exiting",Hs=function(t){wR(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=vc,o.appearStatus=yc):l=wf:r.unmountOnExit||r.mountOnEnter?l=dp:l=vc,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===dp?{status:vc}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==yc&&s!==wf&&(o=yc):(s===yc||s===wf)&&(o=q2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===yc){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:fp.findDOMNode(this);s&&qY(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vc&&this.setState({status:dp})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[fp.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!s||ZI.disabled){this.safeSetState({status:wf},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:yc},function(){o.props.onEntering(c,u),o.onTransitionEnd(h,function(){o.safeSetState({status:wf},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:fp.findDOMNode(this);if(!o||ZI.disabled){this.safeSetState({status:vc},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:q2},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:vc},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:fp.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,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===dp)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Qe(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Mt.createElement(w1.Provider,{value:null},typeof s=="function"?s(i,a):Mt.cloneElement(Mt.Children.only(s),a))},e}(Mt.Component);Hs.contextType=w1;Hs.propTypes={};function Ku(){}Hs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ku,onEntering:Ku,onEntered:Ku,onExit:Ku,onExiting:Ku,onExited:Ku};Hs.UNMOUNTED=dp;Hs.EXITED=vc;Hs.ENTERING=yc;Hs.ENTERED=wf;Hs.EXITING=q2;function YY(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function SR(t,e){var n=function(o){return e&&A.isValidElement(o)?e(o):o},r=Object.create(null);return t&&A.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function KY(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 o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in e){if(r[l])for(s=0;st.scrollTop;function S1(t,e){var n,r;const{timeout:i,easing:o,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[e.mode]:o,delay:s.transitionDelay}}function tK(t){return Tt("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 nK=["className","component","elevation","square","variant"],rK=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,o={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Rt(o,tK,i)},iK=qe("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(${Rn("#fff",KI(e.elevation))}, ${Rn("#fff",KI(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),gu=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=Qe(r,nK),u=W({},r,{component:o,elevation:s,square:a,variant:l}),f=rK(u);return C.jsx(iK,W({as:o,ownerState:u,className:st(f.root,i),ref:n},c))});function oK(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:c}=t,[u,f]=A.useState(!1),h=st(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=st(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&f(!0),A.useEffect(()=>{if(!a&&l!=null){const x=setTimeout(l,c);return()=>{clearTimeout(x)}}},[l,a,c]),C.jsx("span",{className:h,style:m,children:C.jsx("span",{className:v})})}const Mo=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),sK=["center","classes","className"];let $b=t=>t,JI,QI,e4,t4;const Y2=550,aK=80,lK=Sb(JI||(JI=$b` + */var hR=Symbol.for("react.element"),pR=Symbol.for("react.portal"),Pb=Symbol.for("react.fragment"),Nb=Symbol.for("react.strict_mode"),Ib=Symbol.for("react.profiler"),Lb=Symbol.for("react.provider"),kb=Symbol.for("react.context"),OX=Symbol.for("react.server_context"),Ob=Symbol.for("react.forward_ref"),Db=Symbol.for("react.suspense"),Fb=Symbol.for("react.suspense_list"),zb=Symbol.for("react.memo"),Ub=Symbol.for("react.lazy"),DX=Symbol.for("react.offscreen"),Rz;Rz=Symbol.for("react.module.reference");function Fo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case hR:switch(t=t.type,t){case Pb:case Ib:case Nb:case Db:case Fb:return t;default:switch(t=t&&t.$$typeof,t){case OX:case kb:case Ob:case Ub:case zb:case Lb:return t;default:return e}}case pR:return e}}}mn.ContextConsumer=kb;mn.ContextProvider=Lb;mn.Element=hR;mn.ForwardRef=Ob;mn.Fragment=Pb;mn.Lazy=Ub;mn.Memo=zb;mn.Portal=pR;mn.Profiler=Ib;mn.StrictMode=Nb;mn.Suspense=Db;mn.SuspenseList=Fb;mn.isAsyncMode=function(){return!1};mn.isConcurrentMode=function(){return!1};mn.isContextConsumer=function(t){return Fo(t)===kb};mn.isContextProvider=function(t){return Fo(t)===Lb};mn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===hR};mn.isForwardRef=function(t){return Fo(t)===Ob};mn.isFragment=function(t){return Fo(t)===Pb};mn.isLazy=function(t){return Fo(t)===Ub};mn.isMemo=function(t){return Fo(t)===zb};mn.isPortal=function(t){return Fo(t)===pR};mn.isProfiler=function(t){return Fo(t)===Ib};mn.isStrictMode=function(t){return Fo(t)===Nb};mn.isSuspense=function(t){return Fo(t)===Db};mn.isSuspenseList=function(t){return Fo(t)===Fb};mn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Pb||t===Ib||t===Nb||t===Db||t===Fb||t===DX||typeof t=="object"&&t!==null&&(t.$$typeof===Ub||t.$$typeof===zb||t.$$typeof===Lb||t.$$typeof===kb||t.$$typeof===Ob||t.$$typeof===Rz||t.getModuleId!==void 0)};mn.typeOf=Fo;Tz.exports=mn;var V2=Tz.exports;const FX=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Az(t){const e=`${t}`.match(FX);return e&&e[1]||""}function Pz(t,e=""){return t.displayName||t.name||Az(t)||e}function LI(t,e,n){const r=Pz(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function zX(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Pz(t,"Component");if(typeof t=="object")switch(t.$$typeof){case V2.ForwardRef:return LI(t,t.render,"ForwardRef");case V2.Memo:return LI(t,t.type,"memo");default:return}}}const UX=Object.freeze(Object.defineProperty({__proto__:null,default:zX,getFunctionName:Az},Symbol.toStringTag,{value:"Module"})),BX=["ownerState"],jX=["variants"],VX=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function $X(t){return Object.keys(t).length===0}function WX(t){return typeof t=="string"&&t.charCodeAt(0)>96}function $S(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const HX=$d(),GX=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Q0({defaultTheme:t,theme:e,themeId:n}){return $X(e)?t:e[n]||e}function XX(t){return t?(e,n)=>n[t]:null}function Ny(t,e){let{ownerState:n}=e,r=Qe(e,BX);const i=typeof t=="function"?t(W({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>Ny(o,W({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=Qe(i,jX);return o.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 qX(t={}){const{themeId:e,defaultTheme:n=HX,rootShouldForwardProp:r=$S,slotShouldForwardProp:i=$S}=t,o=s=>Vd(W({},s,{theme:Q0(W({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{vz(s,P=>P.filter(N=>!(N!=null&&N.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=XX(GX(c))}=a,m=Qe(a,VX),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=$S;c==="Root"||c==="root"?g=r:c?g=i:WX(s)&&(g=void 0);const b=sR(s,W({shouldForwardProp:g,label:y},m)),_=P=>typeof P=="function"&&P.__emotion_real!==P||da(P)?N=>Ny(P,W({},N,{theme:Q0({theme:N.theme,defaultTheme:n,themeId:e})})):P,S=(P,...N)=>{let T=_(P);const L=N?N.map(_):[];l&&h&&L.push(R=>{const D=Q0(W({},R,{defaultTheme:n,themeId:e}));if(!D.components||!D.components[l]||!D.components[l].styleOverrides)return null;const O=D.components[l].styleOverrides,B={};return Object.entries(O).forEach(([X,H])=>{B[X]=Ny(H,W({},R,{theme:D}))}),h(R,B)}),l&&!v&&L.push(R=>{var D;const O=Q0(W({},R,{defaultTheme:n,themeId:e})),B=O==null||(D=O.components)==null||(D=D[l])==null?void 0:D.variants;return Ny({variants:B},W({},R,{theme:O}))}),x||L.push(o);const U=L.length-N.length;if(Array.isArray(P)&&U>0){const R=new Array(U).fill("");T=[...P,...R],T.raw=[...P.raw,...R]}const M=b(T,...L);return s.muiName&&(M.muiName=s.muiName),M};return b.withConfig&&(S.withConfig=b.withConfig),S}}const Nz=qX();function pm(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]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=W({},o),Object.keys(i).forEach(s=>{n[r][s]=pm(i[s],o[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Iz(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:pm(e.components[n].defaultProps,r)}function Lz({props:t,name:e,defaultTheme:n,themeId:r}){let i=Ab(n);return r&&(i=i[r]||i),Iz({theme:i,name:e,props:t})}const ko=typeof window<"u"?A.useLayoutEffect:A.useEffect;function YX(t,e,n,r,i){const[o,s]=A.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return ko(()=>{let a=!0;if(!n)return;const l=n(t),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[t,n]),o}const kz=A.useSyncExternalStore;function KX(t,e,n,r,i){const o=A.useCallback(()=>e,[e]),s=A.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:u}=r(t);return()=>u}return o},[o,t,r,i,n]),[a,l]=A.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(t);return[()=>u.matches,f=>(u.addListener(f),()=>{u.removeListener(f)})]},[o,n,t]);return kz(l,a,s)}function Oz(t,e={}){const n=dR(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=Iz({name:"MuiUseMediaQuery",props:e,theme:n});let l=typeof t=="function"?t(n):t;return l=l.replace(/^@media( ?)/m,""),(kz!==void 0?KX:YX)(l,i,o,s,a)}function Dz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const ZX=Object.freeze(Object.defineProperty({__proto__:null,default:Dz},Symbol.toStringTag,{value:"Module"}));function Fz(t,e=0,n=1){return Dz(t,e,n)}function JX(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 mR(t){if(t.type)return t;if(t.charAt(0)==="#")return mR(JX(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Ra(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(Ra(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function zz(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<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 WS(t,e){if(t=mR(t),e=Fz(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 zz(t)}function HS(t,e){if(t=mR(t),e=Fz(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 zz(t)}function kI(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Bb(t,e=166){let n;function r(...i){const o=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(o,e)}return r.clear=()=>{clearTimeout(n)},r}function Iy(t,e){var n,r;return A.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 Li(t){return t&&t.ownerDocument||document}function Aa(t){return Li(t).defaultView||window}function $2(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let OI=0;function QX(t){const[e,n]=A.useState(t),r=t||e;return A.useEffect(()=>{e==null&&(OI+=1,n(`mui-${OI}`))},[e]),r}const DI=Hp.useId;function Uz(t){if(DI!==void 0){const e=DI();return t??e}return QX(t)}function W2({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=A.useRef(t!==void 0),[o,s]=A.useState(e),a=i?t:o,l=A.useCallback(c=>{i||s(c)},[]);return[a,l]}function va(t){const e=A.useRef(t);return ko(()=>{e.current=t}),A.useRef((...n)=>(0,e.current)(...n)).current}function _r(...t){return A.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{$2(n,e)})},t)}const FI={};function eq(t,e){const n=A.useRef(FI);return n.current===FI&&(n.current=t(e)),n}const tq=[];function nq(t){A.useEffect(t,tq)}class jb{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new jb}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Bz(){const t=eq(jb.create).current;return nq(t.disposeEffect),t}let Vb=!0,H2=!1;const rq=new jb,iq={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 oq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&iq[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function sq(t){t.metaKey||t.altKey||t.ctrlKey||(Vb=!0)}function GS(){Vb=!1}function aq(){this.visibilityState==="hidden"&&H2&&(Vb=!0)}function lq(t){t.addEventListener("keydown",sq,!0),t.addEventListener("mousedown",GS,!0),t.addEventListener("pointerdown",GS,!0),t.addEventListener("touchstart",GS,!0),t.addEventListener("visibilitychange",aq,!0)}function cq(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Vb||oq(e)}function jz(){const t=A.useCallback(i=>{i!=null&&lq(i.ownerDocument)},[]),e=A.useRef(!1);function n(){return e.current?(H2=!0,rq.start(100,()=>{H2=!1}),e.current=!1,!0):!1}function r(i){return cq(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function Vz(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let Yu;function $z(){if(Yu)return Yu;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),Yu="reverse",t.scrollLeft>0?Yu="default":(t.scrollLeft=1,t.scrollLeft===0&&(Yu="negative")),document.body.removeChild(t),Yu}function uq(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch($z()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}function Rt(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((o,s)=>{if(s){const a=e(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function xd(t){return typeof t=="string"}function fq(t,e,n){return t===void 0||xd(t)?e:W({},e,{ownerState:W({},e.ownerState,n)})}function Wz(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 zI(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 dq(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const m=st(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),v=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(v).length>0&&(x.style=v),{props:x,internalRef:void 0}}const s=Wz(W({},i,r)),a=zI(r),l=zI(i),c=e(s),u=st(c==null?void 0:c.className,n==null?void 0:n.className,o,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 hq(t,e,n){return typeof t=="function"?t(e,n):t}const pq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Us(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=t,s=Qe(t,pq),a=o?{}:hq(r,i),{props:l,internalRef:c}=dq(W({},s,{externalSlotProps:a})),u=_r(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return fq(n,W({},l,{ref:u}),i)}const Hz=A.createContext(null);function Gz(){return A.useContext(Hz)}const mq=typeof Symbol=="function"&&Symbol.for,gq=mq?Symbol.for("mui.nested"):"__THEME_NESTED__";function vq(t,e){return typeof e=="function"?e(t):W({},t,e)}function yq(t){const{children:e,theme:n}=t,r=Gz(),i=A.useMemo(()=>{const o=r===null?n:vq(r,n);return o!=null&&(o[gq]=r!==null),o},[n,r]);return C.jsx(Hz.Provider,{value:i,children:e})}const xq=["value"],Xz=A.createContext();function bq(t){let{value:e}=t,n=Qe(t,xq);return C.jsx(Xz.Provider,W({value:e??!0},n))}const gR=()=>{const t=A.useContext(Xz);return t??!1},qz=A.createContext(void 0);function _q({value:t,children:e}){return C.jsx(qz.Provider,{value:t,children:e})}function wq(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?pm(i.defaultProps,r):!i.styleOverrides&&!i.variants?pm(i,r):r}function Sq({props:t,name:e}){const n=A.useContext(qz);return wq({props:t,name:e,theme:{components:n}})}const UI={};function BI(t,e,n,r=!1){return A.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const o=n(i),s=t?W({},e,{[t]:o}):o;return r?()=>s:s}return t?W({},e,{[t]:n}):W({},e,n)},[t,e,n,r])}function Mq(t){const{children:e,theme:n,themeId:r}=t,i=dR(UI),o=Gz()||UI,s=BI(r,i,n),a=BI(r,o,n,!0),l=s.direction==="rtl";return C.jsx(yq,{theme:a,children:C.jsx(rg.Provider,{value:s,children:C.jsx(bq,{value:l,children:C.jsx(_q,{value:s==null?void 0:s.components,children:e})})})})}const Eq=["className","component","disableGutters","fixed","maxWidth","classes"],Cq=$d(),Tq=Nz("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]}}),Rq=t=>Lz({props:t,name:"MuiContainer",defaultTheme:Cq}),Aq=(t,e)=>{const n=l=>Tt(e,l),{classes:r,fixed:i,disableGutters:o,maxWidth:s}=t,a={root:["root",s&&`maxWidth${bt(String(s))}`,i&&"fixed",o&&"disableGutters"]};return Rt(a,n,r)};function Pq(t={}){const{createStyledComponent:e=Tq,useThemeProps:n=Rq,componentName:r="MuiContainer"}=t,i=e(({theme:s,ownerState:a})=>W({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:a})=>a.fixed&&Object.keys(s.breakpoints.values).reduce((l,c)=>{const u=c,f=s.breakpoints.values[u];return f!==0&&(l[s.breakpoints.up(u)]={maxWidth:`${f}${s.breakpoints.unit}`}),l},{}),({theme:s,ownerState:a})=>W({},a.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[s.breakpoints.up(a.maxWidth)]:{maxWidth:`${s.breakpoints.values[a.maxWidth]}${s.breakpoints.unit}`}}));return A.forwardRef(function(a,l){const c=n(a),{className:u,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:v="lg"}=c,x=Qe(c,Eq),y=W({},c,{component:f,disableGutters:h,fixed:m,maxWidth:v}),g=Aq(y,r);return C.jsx(i,W({as:f,ownerState:y,className:st(g.root,u),ref:l},x))})}const Nq=["component","direction","spacing","divider","children","className","useFlexGap"],Iq=$d(),Lq=Nz("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function kq(t){return Lz({props:t,name:"MuiStack",defaultTheme:Iq})}function Oq(t,e){const n=A.Children.toArray(t).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Fq=({ownerState:t,theme:e})=>{let n=W({display:"flex",flexDirection:"column"},Di({theme:e},Uc({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=uR(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),{}),o=Uc({values:t.direction,base:i}),s=Uc({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const h=c>0?o[u[c-1]]:"column";o[l]=h}}),n=ui(n,Di({theme:e},s,(l,c)=>t.useFlexGap?{gap:iu(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Dq(c?o[c]:t.direction)}`]:iu(r,l)}}))}return n=OG(e.breakpoints,n),n};function zq(t={}){const{createStyledComponent:e=Lq,useThemeProps:n=kq,componentName:r="MuiStack"}=t,i=()=>Rt({root:["root"]},l=>Tt(r,l),{}),o=e(Fq);return A.forwardRef(function(l,c){const u=n(l),f=sg(u),{component:h="div",direction:m="column",spacing:v=0,divider:x,children:y,className:g,useFlexGap:b=!1}=f,_=Qe(f,Nq),S={direction:m,spacing:v,useFlexGap:b},P=i();return C.jsx(o,W({as:h,ownerState:S,ref:c,className:st(P.root,g)},_,{children:x?Oq(y,x):y}))})}function Uq(t,e){return W({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Yn={},Yz={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})(Yz);var Kz=Yz.exports;const Bq=Ws(yH),jq=Ws(ZX);var Zz=Kz;Object.defineProperty(Yn,"__esModule",{value:!0});var Rn=Yn.alpha=r6;Yn.blend=Jq;Yn.colorChannel=void 0;var Jz=Yn.darken=yR;Yn.decomposeColor=Oo;Yn.emphasize=i6;var Vq=Yn.getContrastRatio=Xq;Yn.getLuminance=b1;Yn.hexToRgb=e6;Yn.hslToRgb=n6;var Qz=Yn.lighten=xR;Yn.private_safeAlpha=qq;Yn.private_safeColorChannel=void 0;Yn.private_safeDarken=Yq;Yn.private_safeEmphasize=Zq;Yn.private_safeLighten=Kq;Yn.recomposeColor=Wd;Yn.rgbToHex=Gq;var jI=Zz(Bq),$q=Zz(jq);function vR(t,e=0,n=1){return(0,$q.default)(t,e,n)}function e6(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 Wq(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Oo(t){if(t.type)return t;if(t.charAt(0)==="#")return Oo(e6(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,jI.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,jI.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const t6=t=>{const e=Oo(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Yn.colorChannel=t6;const Hq=(t,e)=>{try{return t6(t)}catch{return t}};Yn.private_safeColorChannel=Hq;function Wd(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<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 Gq(t){if(t.indexOf("#")===0)return t;const{values:e}=Oo(t);return`#${e.map((n,r)=>Wq(r===3?Math.round(255*n):n)).join("")}`}function n6(t){t=Oo(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Wd({type:a,values:l})}function b1(t){t=Oo(t);let e=t.type==="hsl"||t.type==="hsla"?Oo(n6(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 Xq(t,e){const n=b1(t),r=b1(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function r6(t,e){return t=Oo(t),e=vR(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Wd(t)}function qq(t,e,n){try{return r6(t,e)}catch{return t}}function yR(t,e){if(t=Oo(t),e=vR(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 Wd(t)}function Yq(t,e,n){try{return yR(t,e)}catch{return t}}function xR(t,e){if(t=Oo(t),e=vR(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 Wd(t)}function Kq(t,e,n){try{return xR(t,e)}catch{return t}}function i6(t,e=.15){return b1(t)>.5?yR(t,e):xR(t,e)}function Zq(t,e,n){try{return i6(t,e)}catch{return t}}function Jq(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=Oo(t),s=Oo(e),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return Wd({type:"rgb",values:a})}const Qq=["mode","contrastThreshold","tonalOffset"],VI={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:um.white,default:um.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}},XS={text:{primary:um.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:um.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 $I(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Qz(t.main,i):e==="dark"&&(t.dark=Jz(t.main,o)))}function eY(t="light"){return t==="dark"?{main:Gu[200],light:Gu[50],dark:Gu[400]}:{main:Gu[700],light:Gu[400],dark:Gu[800]}}function tY(t="light"){return t==="dark"?{main:Hu[200],light:Hu[50],dark:Hu[400]}:{main:Hu[500],light:Hu[300],dark:Hu[700]}}function nY(t="light"){return t==="dark"?{main:Wu[500],light:Wu[300],dark:Wu[700]}:{main:Wu[700],light:Wu[400],dark:Wu[800]}}function rY(t="light"){return t==="dark"?{main:Xu[400],light:Xu[300],dark:Xu[700]}:{main:Xu[700],light:Xu[500],dark:Xu[900]}}function iY(t="light"){return t==="dark"?{main:qu[400],light:qu[300],dark:qu[700]}:{main:qu[800],light:qu[500],dark:qu[900]}}function oY(t="light"){return t==="dark"?{main:Oh[400],light:Oh[300],dark:Oh[700]}:{main:"#ed6c02",light:Oh[500],dark:Oh[900]}}function sY(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=Qe(t,Qq),o=t.primary||eY(e),s=t.secondary||tY(e),a=t.error||nY(e),l=t.info||rY(e),c=t.success||iY(e),u=t.warning||oY(e);function f(x){return Vq(x,XS.text.primary)>=n?XS.text.primary:VI.text.primary}const h=({color:x,name:y,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(Ra(11,y?` (${y})`:"",g));if(typeof x.main!="string")throw new Error(Ra(12,y?` (${y})`:"",JSON.stringify(x.main)));return $I(x,"light",b,r),$I(x,"dark",_,r),x.contrastText||(x.contrastText=f(x.main)),x},m={dark:XS,light:VI};return ui(W({common:W({},um),mode:e,primary:h({color:o,name:"primary"}),secondary:h({color:s,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:vH,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},m[e]),i)}const aY=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function lY(t){return Math.round(t*1e5)/1e5}const WI={textTransform:"uppercase"},HI='"Roboto", "Helvetica", "Arial", sans-serif';function cY(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=HI,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=n,h=Qe(n,aY),m=i/14,v=f||(g=>`${g/c*m}rem`),x=(g,b,_,S,P)=>W({fontFamily:r,fontWeight:g,fontSize:v(b),lineHeight:_},r===HI?{letterSpacing:`${lY(S/b)}em`}:{},P,u),y={h1:x(o,96,1.167,-1.5),h2:x(o,60,1.2,-.5),h3:x(s,48,1.167,0),h4:x(s,34,1.235,.25),h5:x(s,24,1.334,0),h6:x(a,20,1.6,.15),subtitle1:x(s,16,1.75,.15),subtitle2:x(a,14,1.57,.1),body1:x(s,16,1.5,.15),body2:x(s,14,1.43,.15),button:x(a,14,1.75,.4,WI),caption:x(s,12,1.66,.4),overline:x(s,12,2.66,1,WI),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ui(W({htmlFontSize:c,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}const uY=.2,fY=.14,dY=.12;function Cn(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${uY})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${fY})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${dY})`].join(",")}const hY=["none",Cn(0,2,1,-1,0,1,1,0,0,1,3,0),Cn(0,3,1,-2,0,2,2,0,0,1,5,0),Cn(0,3,3,-2,0,3,4,0,0,1,8,0),Cn(0,2,4,-1,0,4,5,0,0,1,10,0),Cn(0,3,5,-1,0,5,8,0,0,1,14,0),Cn(0,3,5,-1,0,6,10,0,0,1,18,0),Cn(0,4,5,-2,0,7,10,1,0,2,16,1),Cn(0,5,5,-3,0,8,10,1,0,3,14,2),Cn(0,5,6,-3,0,9,12,1,0,3,16,2),Cn(0,6,6,-3,0,10,14,1,0,4,18,3),Cn(0,6,7,-4,0,11,15,1,0,4,20,3),Cn(0,7,8,-4,0,12,17,2,0,5,22,4),Cn(0,7,8,-4,0,13,19,2,0,5,24,4),Cn(0,7,9,-4,0,14,21,2,0,5,26,4),Cn(0,8,9,-5,0,15,22,2,0,6,28,5),Cn(0,8,10,-5,0,16,24,2,0,6,30,5),Cn(0,8,11,-5,0,17,26,2,0,6,32,5),Cn(0,9,11,-5,0,18,28,2,0,7,34,6),Cn(0,9,12,-6,0,19,29,2,0,7,36,6),Cn(0,10,13,-6,0,20,31,3,0,8,38,7),Cn(0,10,13,-6,0,21,33,3,0,8,40,7),Cn(0,10,14,-6,0,22,35,3,0,8,42,7),Cn(0,11,14,-7,0,23,36,3,0,9,44,8),Cn(0,11,15,-7,0,24,38,3,0,9,46,8)],pY=["duration","easing","delay"],mY={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)"},gY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function GI(t){return`${Math.round(t)}ms`}function vY(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function yY(t){const e=W({},mY,t.easing),n=W({},gY,t.duration);return W({getAutoHeightDuration:vY,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=o;return Qe(o,pY),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:GI(s)} ${a} ${typeof l=="string"?l:GI(l)}`).join(",")}},t,{easing:e,duration:n})}const xY={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},bY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function bR(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,s=Qe(t,bY);if(t.vars)throw new Error(Ra(18));const a=sY(r),l=$d(t);let c=ui(l,{mixins:Uq(l.breakpoints,n),palette:a,shadows:hY.slice(),typography:cY(a,o),transitions:yY(i),zIndex:W({},xY)});return c=ui(c,s),c=e.reduce((u,f)=>ui(u,f),c),c.unstable_sxConfig=W({},og,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Vd({sx:f,theme:this})},c}const _R=bR();function mu(){const t=Ab(_R);return t[gd]||t}var ag={},qS={exports:{}},XI;function _Y(){return XI||(XI=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r96}function Ly(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const UY=ag.systemDefaultTheme=(0,NY.default)(),BY=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function ev({defaultTheme:t,theme:e,themeId:n}){return FY(e)?t:e[n]||e}function jY(t){return t?(e,n)=>n[t]:null}function ky(t,e){let{ownerState:n}=e,r=(0,G2.default)(e,LY);const i=typeof t=="function"?t((0,wo.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>ky(o,(0,wo.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,G2.default)(i,kY);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,wo.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,wo.default)({ownerState:n},r,n)):l.style))}),a}return i}function VY(t={}){const{themeId:e,defaultTheme:n=UY,rootShouldForwardProp:r=Ly,slotShouldForwardProp:i=Ly}=t,o=s=>(0,IY.default)((0,wo.default)({},s,{theme:ev((0,wo.default)({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,YI.internal_processStyles)(s,P=>P.filter(N=>!(N!=null&&N.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=jY(BY(c))}=a,m=(0,G2.default)(a,OY),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=Ly;c==="Root"||c==="root"?g=r:c?g=i:zY(s)&&(g=void 0);const b=(0,YI.default)(s,(0,wo.default)({shouldForwardProp:g,label:y},m)),_=P=>typeof P=="function"&&P.__emotion_real!==P||(0,PY.isPlainObject)(P)?N=>ky(P,(0,wo.default)({},N,{theme:ev({theme:N.theme,defaultTheme:n,themeId:e})})):P,S=(P,...N)=>{let T=_(P);const L=N?N.map(_):[];l&&h&&L.push(R=>{const D=ev((0,wo.default)({},R,{defaultTheme:n,themeId:e}));if(!D.components||!D.components[l]||!D.components[l].styleOverrides)return null;const O=D.components[l].styleOverrides,B={};return Object.entries(O).forEach(([X,H])=>{B[X]=ky(H,(0,wo.default)({},R,{theme:D}))}),h(R,B)}),l&&!v&&L.push(R=>{var D;const O=ev((0,wo.default)({},R,{defaultTheme:n,themeId:e})),B=O==null||(D=O.components)==null||(D=D[l])==null?void 0:D.variants;return ky({variants:B},(0,wo.default)({},R,{theme:O}))}),x||L.push(o);const U=L.length-N.length;if(Array.isArray(P)&&U>0){const R=new Array(U).fill("");T=[...P,...R],T.raw=[...P.raw,...R]}const M=b(T,...L);return s.muiName&&(M.muiName=s.muiName),M};return b.withConfig&&(S.withConfig=b.withConfig),S}}function s6(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const pi=t=>s6(t)&&t!=="classes",qe=AY({themeId:gd,defaultTheme:_R,rootShouldForwardProp:pi}),$Y=["theme"];function WY(t){let{theme:e}=t,n=Qe(t,$Y);const r=e[gd];return C.jsx(Mq,W({},n,{themeId:r?gd:void 0,theme:r||e}))}const KI=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function At(t){return Sq(t)}function HY(t){return Tt("MuiSvgIcon",t)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const GY=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],XY=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${bt(e)}`,`fontSize${bt(n)}`]};return Rt(i,HY,r)},qY=qe("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,o,s,a,l,c,u,f,h,m,v;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:((o=t.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,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:(v=(t.vars||t).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[e.color]}}),_1=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=r,m=Qe(r,GY),v=A.isValidElement(i)&&i.type==="svg",x=W({},r,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:v}),y={};u||(y.viewBox=h);const g=XY(x);return C.jsxs(qY,W({as:a,className:st(g.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},y,m,v&&i.props,{ownerState:x,children:[v?i.props.children:i,f?C.jsx("title",{children:f}):null]}))});_1.muiName="SvgIcon";function Gd(t,e){function n(r,i){return C.jsx(_1,W({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=_1.muiName,A.memo(A.forwardRef(n))}function X2(t,e){return X2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},X2(t,e)}function wR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,X2(t,e)}const ZI={disabled:!1},w1=Mt.createContext(null);var YY=function(e){return e.scrollTop},dp="unmounted",vc="exited",yc="entering",wf="entered",q2="exiting",Hs=function(t){wR(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=vc,o.appearStatus=yc):l=wf:r.unmountOnExit||r.mountOnEnter?l=dp:l=vc,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===dp?{status:vc}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==yc&&s!==wf&&(o=yc):(s===yc||s===wf)&&(o=q2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===yc){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:fp.findDOMNode(this);s&&YY(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vc&&this.setState({status:dp})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[fp.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!s||ZI.disabled){this.safeSetState({status:wf},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:yc},function(){o.props.onEntering(c,u),o.onTransitionEnd(h,function(){o.safeSetState({status:wf},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:fp.findDOMNode(this);if(!o||ZI.disabled){this.safeSetState({status:vc},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:q2},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:vc},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:fp.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,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===dp)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Qe(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Mt.createElement(w1.Provider,{value:null},typeof s=="function"?s(i,a):Mt.cloneElement(Mt.Children.only(s),a))},e}(Mt.Component);Hs.contextType=w1;Hs.propTypes={};function Ku(){}Hs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ku,onEntering:Ku,onEntered:Ku,onExit:Ku,onExiting:Ku,onExited:Ku};Hs.UNMOUNTED=dp;Hs.EXITED=vc;Hs.ENTERING=yc;Hs.ENTERED=wf;Hs.EXITING=q2;function KY(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function SR(t,e){var n=function(o){return e&&A.isValidElement(o)?e(o):o},r=Object.create(null);return t&&A.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function ZY(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 o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in e){if(r[l])for(s=0;st.scrollTop;function S1(t,e){var n,r;const{timeout:i,easing:o,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[e.mode]:o,delay:s.transitionDelay}}function nK(t){return Tt("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 rK=["className","component","elevation","square","variant"],iK=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,o={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Rt(o,nK,i)},oK=qe("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(${Rn("#fff",KI(e.elevation))}, ${Rn("#fff",KI(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),gu=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=Qe(r,rK),u=W({},r,{component:o,elevation:s,square:a,variant:l}),f=iK(u);return C.jsx(oK,W({as:o,ownerState:u,className:st(f.root,i),ref:n},c))});function sK(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:c}=t,[u,f]=A.useState(!1),h=st(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=st(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&f(!0),A.useEffect(()=>{if(!a&&l!=null){const x=setTimeout(l,c);return()=>{clearTimeout(x)}}},[l,a,c]),C.jsx("span",{className:h,style:m,children:C.jsx("span",{className:v})})}const Mo=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),aK=["center","classes","className"];let $b=t=>t,JI,QI,e4,t4;const Y2=550,lK=80,cK=Sb(JI||(JI=$b` 0% { transform: scale(0); opacity: 0.1; @@ -67,7 +67,7 @@ Error generating stack: `+o.message+` transform: scale(1); opacity: 0.3; } -`)),cK=Sb(QI||(QI=$b` +`)),uK=Sb(QI||(QI=$b` 0% { opacity: 1; } @@ -75,7 +75,7 @@ Error generating stack: `+o.message+` 100% { opacity: 0; } -`)),uK=Sb(e4||(e4=$b` +`)),fK=Sb(e4||(e4=$b` 0% { transform: scale(1); } @@ -87,7 +87,7 @@ Error generating stack: `+o.message+` 100% { transform: scale(1); } -`)),fK=qe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),dK=qe(oK,{name:"MuiTouchRipple",slot:"Ripple"})(t4||(t4=$b` +`)),dK=qe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),hK=qe(sK,{name:"MuiTouchRipple",slot:"Ripple"})(t4||(t4=$b` opacity: 0; position: absolute; @@ -130,38 +130,65 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),Mo.rippleVisible,lK,Y2,({theme:t})=>t.transitions.easing.easeInOut,Mo.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Mo.child,Mo.childLeaving,cK,Y2,({theme:t})=>t.transitions.easing.easeInOut,Mo.childPulsate,uK,({theme:t})=>t.transitions.easing.easeInOut),hK=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Qe(r,sK),[l,c]=A.useState([]),u=A.useRef(0),f=A.useRef(null);A.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=A.useRef(!1),m=Bz(),v=A.useRef(null),x=A.useRef(null),y=A.useCallback(S=>{const{pulsate:P,rippleX:N,rippleY:T,rippleSize:L,cb:U}=S;c(M=>[...M,C.jsx(dK,{classes:{ripple:st(o.ripple,Mo.ripple),rippleVisible:st(o.rippleVisible,Mo.rippleVisible),ripplePulsate:st(o.ripplePulsate,Mo.ripplePulsate),child:st(o.child,Mo.child),childLeaving:st(o.childLeaving,Mo.childLeaving),childPulsate:st(o.childPulsate,Mo.childPulsate)},timeout:Y2,pulsate:P,rippleX:N,rippleY:T,rippleSize:L},u.current)]),u.current+=1,f.current=U},[o]),g=A.useCallback((S={},P={},N=()=>{})=>{const{pulsate:T=!1,center:L=i||P.pulsate,fakeElement:U=!1}=P;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 M=U?null:x.current,R=M?M.getBoundingClientRect():{width:0,height:0,left:0,top:0};let D,O,B;if(L||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)D=Math.round(R.width/2),O=Math.round(R.height/2);else{const{clientX:X,clientY:H}=S.touches&&S.touches.length>0?S.touches[0]:S;D=Math.round(X-R.left),O=Math.round(H-R.top)}if(L)B=Math.sqrt((2*R.width**2+R.height**2)/3),B%2===0&&(B+=1);else{const X=Math.max(Math.abs((M?M.clientWidth:0)-D),D)*2+2,H=Math.max(Math.abs((M?M.clientHeight:0)-O),O)*2+2;B=Math.sqrt(X**2+H**2)}S!=null&&S.touches?v.current===null&&(v.current=()=>{y({pulsate:T,rippleX:D,rippleY:O,rippleSize:B,cb:N})},m.start(aK,()=>{v.current&&(v.current(),v.current=null)})):y({pulsate:T,rippleX:D,rippleY:O,rippleSize:B,cb:N})},[i,y,m]),b=A.useCallback(()=>{g({},{pulsate:!0})},[g]),_=A.useCallback((S,P)=>{if(m.clear(),(S==null?void 0:S.type)==="touchend"&&v.current){v.current(),v.current=null,m.start(0,()=>{_(S,P)});return}v.current=null,c(N=>N.length>0?N.slice(1):N),f.current=P},[m]);return A.useImperativeHandle(n,()=>({pulsate:b,start:g,stop:_}),[b,g,_]),C.jsx(fK,W({className:st(Mo.root,o.root,s),ref:x},a,{children:C.jsx(MR,{component:null,exit:!0,children:l})}))});function pK(t){return Tt("MuiButtonBase",t)}const mK=Ct("MuiButtonBase",["root","disabled","focusVisible"]),gK=["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"],vK=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,s=Rt({root:["root",e&&"disabled",n&&"focusVisible"]},pK,i);return n&&r&&(s.root+=` ${r}`),s},yK=qe("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"},[`&.${mK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),vu=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:v,onClick:x,onContextMenu:y,onDragLeave:g,onFocus:b,onFocusVisible:_,onKeyDown:S,onKeyUp:P,onMouseDown:N,onMouseLeave:T,onMouseUp:L,onTouchEnd:U,onTouchMove:M,onTouchStart:R,tabIndex:D=0,TouchRippleProps:O,touchRippleRef:B,type:X}=r,H=Qe(r,gK),Z=A.useRef(null),F=A.useRef(null),Y=_r(F,B),{isFocusVisibleRef:K,onFocus:ee,onBlur:me,ref:le}=jz(),[Q,ae]=A.useState(!1);c&&Q&&ae(!1),A.useImperativeHandle(i,()=>({focusVisible:()=>{ae(!0),Z.current.focus()}}),[]);const[ge,Me]=A.useState(!1);A.useEffect(()=>{Me(!0)},[]);const tt=ge&&!u&&!c;A.useEffect(()=>{Q&&h&&!u&&ge&&F.current.pulsate()},[u,h,Q,ge]);function He(ze,Le,Xe=f){return va(xt=>(Le&&Le(xt),!Xe&&F.current&&F.current[ze](xt),!0))}const rt=He("start",N),Ve=He("stop",y),se=He("stop",g),j=He("stop",L),ye=He("stop",ze=>{Q&&ze.preventDefault(),T&&T(ze)}),xe=He("start",R),Re=He("stop",U),Pe=He("stop",M),Ee=He("stop",ze=>{me(ze),K.current===!1&&ae(!1),v&&v(ze)},!1),De=va(ze=>{Z.current||(Z.current=ze.currentTarget),ee(ze),K.current===!0&&(ae(!0),_&&_(ze)),b&&b(ze)}),$=()=>{const ze=Z.current;return l&&l!=="button"&&!(ze.tagName==="A"&&ze.href)},z=A.useRef(!1),re=va(ze=>{h&&!z.current&&Q&&F.current&&ze.key===" "&&(z.current=!0,F.current.stop(ze,()=>{F.current.start(ze)})),ze.target===ze.currentTarget&&$()&&ze.key===" "&&ze.preventDefault(),S&&S(ze),ze.target===ze.currentTarget&&$()&&ze.key==="Enter"&&!c&&(ze.preventDefault(),x&&x(ze))}),he=va(ze=>{h&&ze.key===" "&&F.current&&Q&&!ze.defaultPrevented&&(z.current=!1,F.current.stop(ze,()=>{F.current.pulsate(ze)})),P&&P(ze),x&&ze.target===ze.currentTarget&&$()&&ze.key===" "&&!ze.defaultPrevented&&x(ze)});let pe=l;pe==="button"&&(H.href||H.to)&&(pe=m);const be={};pe==="button"?(be.type=X===void 0?"button":X,be.disabled=c):(!H.href&&!H.to&&(be.role="button"),c&&(be["aria-disabled"]=c));const Ge=_r(n,le,Z),Fe=W({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:D,focusVisible:Q}),Ne=vK(Fe);return C.jsxs(yK,W({as:pe,className:st(Ne.root,a),ownerState:Fe,onBlur:Ee,onClick:x,onContextMenu:Ve,onFocus:De,onKeyDown:re,onKeyUp:he,onMouseDown:rt,onMouseLeave:ye,onMouseUp:j,onDragLeave:se,onTouchEnd:Re,onTouchMove:Pe,onTouchStart:xe,ref:Ge,tabIndex:c?-1:D,type:X},be,H,{children:[s,tt?C.jsx(hK,W({ref:Y,center:o},O)):null]}))});function xK(t){return Tt("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 bK=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],_K=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=t,a={root:["root",o,t.align!=="inherit"&&`align${bt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Rt(a,xK,s)},wK=qe("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})),n4={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},SK={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},MK=t=>SK[t]||t,sr=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTypography"}),i=MK(r.color),o=sg(W({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=n4}=o,v=Qe(o,bK),x=W({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:f,variant:h,variantMapping:m}),y=l||(f?"p":m[h]||n4[h])||"span",g=_K(x);return C.jsx(wK,W({as:y,ref:n,ownerState:x,className:st(g.root,a)},v))});function EK(t){return Tt("MuiAppBar",t)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const CK=["className","color","enableColorOnDark","position"],TK=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${bt(e)}`,`position${bt(n)}`]};return Rt(i,EK,r)},tv=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,RK=qe(gu,{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:tv(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:tv(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:tv(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:tv(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"}))}),AK=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=Qe(r,CK),c=W({},r,{color:o,position:a,enableColorOnDark:s}),u=TK(c);return C.jsx(RK,W({square:!0,component:"header",ownerState:c,elevation:4,className:st(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function PK(t){return typeof t=="function"?t():t}const NK=A.forwardRef(function(e,n){const{children:r,container:i,disablePortal:o=!1}=e,[s,a]=A.useState(null),l=_r(A.isValidElement(r)?r.ref:null,n);if(ko(()=>{o||a(PK(i)||document.body)},[i,o]),ko(()=>{if(s&&!o)return $2(n,s),()=>{$2(n,null)}},[n,s,o]),o){if(A.isValidElement(r)){const c={ref:l};return A.cloneElement(r,c)}return C.jsx(A.Fragment,{children:r})}return C.jsx(A.Fragment,{children:s&&Bl.createPortal(r,s)})}),IK=["onChange","maxRows","minRows","style","value"];function nv(t){return parseInt(t,10)||0}const LK={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function kK(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const OK=A.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=e,l=Qe(e,IK),{current:c}=A.useRef(a!=null),u=A.useRef(null),f=_r(n,u),h=A.useRef(null),m=A.useRef(null),v=A.useCallback(()=>{const g=u.current,_=Aa(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 P=_.boxSizing,N=nv(_.paddingBottom)+nv(_.paddingTop),T=nv(_.borderBottomWidth)+nv(_.borderTopWidth),L=S.scrollHeight;S.value="x";const U=S.scrollHeight;let M=L;o&&(M=Math.max(Number(o)*U,M)),i&&(M=Math.min(Number(i)*U,M)),M=Math.max(M,U);const R=M+(P==="border-box"?N+T:0),D=Math.abs(M-L)<=1;return{outerHeightStyle:R,overflowing:D}},[i,o,e.placeholder]),x=A.useCallback(()=>{const g=v();if(kK(g))return;const b=g.outerHeightStyle,_=u.current;h.current!==b&&(h.current=b,_.style.height=`${b}px`),_.style.overflow=g.overflowing?"hidden":""},[v]);ko(()=>{const g=()=>{x()};let b;const _=Bb(g),S=u.current,P=Aa(S);P.addEventListener("resize",_);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(g),N.observe(S)),()=>{_.clear(),cancelAnimationFrame(b),P.removeEventListener("resize",_),N&&N.disconnect()}},[v,x]),ko(()=>{x()});const y=g=>{c||x(),r&&r(g)};return C.jsxs(A.Fragment,{children:[C.jsx("textarea",W({value:a,onChange:y,ref:f,rows:o,style:s},l)),C.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:W({},LK.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function Xd({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 ER=A.createContext(void 0);function yu(){return A.useContext(ER)}function l6(t){return C.jsx(CX,W({},t,{defaultTheme:_R,themeId:gd}))}function r4(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function M1(t,e=!1){return t&&(r4(t.value)&&t.value!==""||e&&r4(t.defaultValue)&&t.defaultValue!=="")}function DK(t){return t.startAdornment}function FK(t){return Tt("MuiInputBase",t)}const bd=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"],Wb=(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]},Hb=(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]},UK=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:v}=t,x={root:["root",`color${bt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&h!=="medium"&&`size${bt(h)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return Rt(x,FK,e)},Gb=qe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Wb})(({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",[`&.${bd.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%"})),Xb=qe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Hb})(({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"},o=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] + .${bd.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${bd.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"})}),BK=C.jsx(l6,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),CR=A.forwardRef(function(e,n){var r;const i=At({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:v,fullWidth:x=!1,id:y,inputComponent:g="input",inputProps:b={},inputRef:_,maxRows:S,minRows:P,multiline:N=!1,name:T,onBlur:L,onChange:U,onClick:M,onFocus:R,onKeyDown:D,onKeyUp:O,placeholder:B,readOnly:X,renderSuffix:H,rows:Z,slotProps:F={},slots:Y={},startAdornment:K,type:ee="text",value:me}=i,le=Qe(i,zK),Q=b.value!=null?b.value:me,{current:ae}=A.useRef(Q!=null),ge=A.useRef(),Me=A.useCallback(Ne=>{},[]),tt=_r(ge,_,b.ref,Me),[He,rt]=A.useState(!1),Ve=yu(),se=Xd({props:i,muiFormControl:Ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});se.focused=Ve?Ve.focused:He,A.useEffect(()=>{!Ve&&h&&He&&(rt(!1),L&&L())},[Ve,h,He,L]);const j=Ve&&Ve.onFilled,ye=Ve&&Ve.onEmpty,xe=A.useCallback(Ne=>{M1(Ne)?j&&j():ye&&ye()},[j,ye]);ko(()=>{ae&&xe({value:Q})},[Q,xe,ae]);const Re=Ne=>{if(se.disabled){Ne.stopPropagation();return}R&&R(Ne),b.onFocus&&b.onFocus(Ne),Ve&&Ve.onFocus?Ve.onFocus(Ne):rt(!0)},Pe=Ne=>{L&&L(Ne),b.onBlur&&b.onBlur(Ne),Ve&&Ve.onBlur?Ve.onBlur(Ne):rt(!1)},Ee=(Ne,...ze)=>{if(!ae){const Le=Ne.target||ge.current;if(Le==null)throw new Error(Ra(1));xe({value:Le.value})}b.onChange&&b.onChange(Ne,...ze),U&&U(Ne,...ze)};A.useEffect(()=>{xe(ge.current)},[]);const De=Ne=>{ge.current&&Ne.currentTarget===Ne.target&&ge.current.focus(),M&&M(Ne)};let $=g,z=b;N&&$==="input"&&(Z?z=W({type:void 0,minRows:Z,maxRows:Z},z):z=W({type:void 0,maxRows:S,minRows:P},z),$=OK);const re=Ne=>{xe(Ne.animationName==="mui-auto-fill-cancel"?ge.current:{value:"x"})};A.useEffect(()=>{Ve&&Ve.setAdornedStart(!!K)},[Ve,K]);const he=W({},i,{color:se.color||"primary",disabled:se.disabled,endAdornment:v,error:se.error,focused:se.focused,formControl:Ve,fullWidth:x,hiddenLabel:se.hiddenLabel,multiline:N,size:se.size,startAdornment:K,type:ee}),pe=UK(he),be=Y.root||c.Root||Gb,Ge=F.root||u.root||{},Fe=Y.input||c.Input||Xb;return z=W({},z,(r=F.input)!=null?r:u.input),C.jsxs(A.Fragment,{children:[!m&&BK,C.jsxs(be,W({},Ge,!xd(be)&&{ownerState:W({},he,Ge.ownerState)},{ref:n,onClick:De},le,{className:st(pe.root,Ge.className,l,X&&"MuiInputBase-readOnly"),children:[K,C.jsx(ER.Provider,{value:null,children:C.jsx(Fe,W({ownerState:he,"aria-invalid":se.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:f,disabled:se.disabled,id:y,onAnimationStart:re,name:T,placeholder:B,readOnly:X,required:se.required,rows:Z,value:Q,onKeyDown:D,onKeyUp:O,type:ee},z,!xd(Fe)&&{as:$,ownerState:W({},he,z.ownerState)},{ref:tt,className:st(pe.input,z.className,X&&"MuiInputBase-readOnly"),onBlur:Pe,onChange:Ee,onFocus:Re}))}),v,H?H(W({},se,{startAdornment:K})):null]}))]})});function jK(t){return Tt("MuiInput",t)}const Fh=W({},bd,Ct("MuiInput",["root","underline","input"]));function VK(t){return Tt("MuiOutlinedInput",t)}const Za=W({},bd,Ct("MuiOutlinedInput",["root","notchedOutline","input"]));function $K(t){return Tt("MuiFilledInput",t)}const nc=W({},bd,Ct("MuiFilledInput",["root","underline","input"])),WK=Gd(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),HK=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],GK={entering:{opacity:1},entered:{opacity:1}},XK=A.forwardRef(function(e,n){const r=mu(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:v,onExiting:x,style:y,timeout:g=i,TransitionComponent:b=Hs}=e,_=Qe(e,HK),S=A.useRef(null),P=_r(S,a.ref,n),N=B=>X=>{if(B){const H=S.current;X===void 0?B(H):B(H,X)}},T=N(h),L=N((B,X)=>{a6(B);const H=S1({style:y,timeout:g,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",H),B.style.transition=r.transitions.create("opacity",H),u&&u(B,X)}),U=N(f),M=N(x),R=N(B=>{const X=S1({style:y,timeout:g,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",X),B.style.transition=r.transitions.create("opacity",X),m&&m(B)}),D=N(v),O=B=>{o&&o(S.current,B)};return C.jsx(b,W({appear:s,in:c,nodeRef:S,onEnter:L,onEntered:U,onEntering:T,onExit:R,onExited:D,onExiting:M,addEndListener:O,timeout:g},_,{children:(B,X)=>A.cloneElement(a,W({style:W({opacity:0,visibility:B==="exited"&&!c?"hidden":void 0},GK[B],y,a.props.style),ref:P},X))}))});function qK(t){return Tt("MuiBackdrop",t)}Ct("MuiBackdrop",["root","invisible"]);const YK=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],KK=t=>{const{classes:e,invisible:n}=t;return Rt({root:["root",n&&"invisible"]},qK,e)},ZK=qe("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"})),JK=A.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:f={},invisible:h=!1,open:m,slotProps:v={},slots:x={},TransitionComponent:y=XK,transitionDuration:g}=s,b=Qe(s,YK),_=W({},s,{component:c,invisible:h}),S=KK(_),P=(r=v.root)!=null?r:f.root;return C.jsx(y,W({in:m,timeout:g},b,{children:C.jsx(ZK,W({"aria-hidden":!0},P,{as:(i=(o=x.root)!=null?o:u.Root)!=null?i:c,className:st(S.root,l,P==null?void 0:P.className),ownerState:W({},_,P==null?void 0:P.ownerState),classes:S,ref:n,children:a}))}))}),QK=Ct("MuiBox",["root"]),eZ=bR(),Bs=IX({themeId:gd,defaultTheme:eZ,defaultClassName:QK.root,generateClassName:Ez.generate});function tZ(t){return Tt("MuiButton",t)}const rv=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"]),nZ=A.createContext({}),rZ=A.createContext(void 0),iZ=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],oZ=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=t,a={root:["root",o,`${o}${bt(e)}`,`size${bt(i)}`,`${o}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=Rt(a,tZ,s);return W({},s,l)},c6=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}}),sZ=qe(vu,{shouldForwardProp:t=>pi(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],o=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})`:Rn(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})`:Rn(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})`:Rn(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:o,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]}),[`&.${rv.focusVisible}`]:W({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${rv.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 ${Rn(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"},[`&.${rv.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${rv.disabled}`]:{boxShadow:"none"}}),aZ=qe("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},c6(t))),lZ=qe("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},c6(t))),ou=A.forwardRef(function(e,n){const r=A.useContext(nZ),i=A.useContext(rZ),o=pm(r,e),s=At({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:x,fullWidth:y=!1,size:g="medium",startIcon:b,type:_,variant:S="text"}=s,P=Qe(s,iZ),N=W({},s,{color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:y,size:g,type:_,variant:S}),T=oZ(N),L=b&&C.jsx(aZ,{className:T.startIcon,ownerState:N,children:b}),U=v&&C.jsx(lZ,{className:T.endIcon,ownerState:N,children:v}),M=i||"";return C.jsxs(sZ,W({ownerState:N,className:st(r.className,T.root,u,M),component:c,disabled:f,focusRipple:!m,focusVisibleClassName:st(T.focusVisible,x),ref:n,type:_},P,{classes:T,children:[L,a,U]}))});function cZ(t){return Tt("MuiCard",t)}Ct("MuiCard",["root"]);const uZ=["className","raised"],fZ=t=>{const{classes:e}=t;return Rt({root:["root"]},cZ,e)},dZ=qe(gu,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),hZ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Qe(r,uZ),a=W({},r,{raised:o}),l=fZ(a);return C.jsx(dZ,W({className:st(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))});function pZ(t){return Tt("MuiCardActions",t)}Ct("MuiCardActions",["root","spacing"]);const mZ=["disableSpacing","className"],gZ=t=>{const{classes:e,disableSpacing:n}=t;return Rt({root:["root",!n&&"spacing"]},pZ,e)},vZ=qe("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}})),yZ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:o}=r,s=Qe(r,mZ),a=W({},r,{disableSpacing:i}),l=gZ(a);return C.jsx(vZ,W({className:st(l.root,o),ownerState:a,ref:n},s))});function xZ(t){return Tt("MuiCardContent",t)}Ct("MuiCardContent",["root"]);const bZ=["className","component"],_Z=t=>{const{classes:e}=t;return Rt({root:["root"]},xZ,e)},wZ=qe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),SZ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardContent"}),{className:i,component:o="div"}=r,s=Qe(r,bZ),a=W({},r,{component:o}),l=_Z(a);return C.jsx(wZ,W({as:o,className:st(l.root,i),ownerState:a,ref:n},s))});function MZ(t){return Tt("PrivateSwitchBase",t)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const EZ=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],CZ=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${bt(i)}`],input:["input"]};return Rt(o,MZ,e)},TZ=qe(vu)(({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})),RZ=qe("input",{shouldForwardProp:pi})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),AZ=A.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:h,inputProps:m,inputRef:v,name:x,onBlur:y,onChange:g,onFocus:b,readOnly:_,required:S=!1,tabIndex:P,type:N,value:T}=e,L=Qe(e,EZ),[U,M]=W2({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),R=yu(),D=Y=>{b&&b(Y),R&&R.onFocus&&R.onFocus(Y)},O=Y=>{y&&y(Y),R&&R.onBlur&&R.onBlur(Y)},B=Y=>{if(Y.nativeEvent.defaultPrevented)return;const K=Y.target.checked;M(K),g&&g(Y,K)};let X=l;R&&typeof X>"u"&&(X=R.disabled);const H=N==="checkbox"||N==="radio",Z=W({},e,{checked:U,disabled:X,disableFocusRipple:c,edge:u}),F=CZ(Z);return C.jsxs(TZ,W({component:"span",className:st(F.root,s),centerRipple:!0,focusRipple:!c,disabled:X,tabIndex:null,role:void 0,onFocus:D,onBlur:O,ownerState:Z,ref:n},L,{children:[C.jsx(RZ,W({autoFocus:r,checked:i,defaultChecked:a,className:F.input,disabled:X,id:H?h:void 0,name:x,onChange:B,readOnly:_,ref:v,required:S,ownerState:Z,tabIndex:P,type:N},N==="checkbox"&&T===void 0?{}:{value:T},m)),U?o:f]}))}),PZ=Gd(C.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"),NZ=Gd(C.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"),IZ=Gd(C.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 LZ(t){return Tt("MuiCheckbox",t)}const KS=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),kZ=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],OZ=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,o={root:["root",n&&"indeterminate",`color${bt(r)}`,`size${bt(i)}`]},s=Rt(o,LZ,e);return W({},e,s)},DZ=qe(AZ,{shouldForwardProp:t=>pi(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})`:Rn(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${KS.checked}, &.${KS.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${KS.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),FZ=C.jsx(NZ,{}),zZ=C.jsx(PZ,{}),UZ=C.jsx(IZ,{}),BZ=A.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiCheckbox"}),{checkedIcon:s=FZ,color:a="primary",icon:l=zZ,indeterminate:c=!1,indeterminateIcon:u=UZ,inputProps:f,size:h="medium",className:m}=o,v=Qe(o,kZ),x=c?u:l,y=c?u:s,g=W({},o,{color:a,indeterminate:c,size:h}),b=OZ(g);return C.jsx(DZ,W({type:"checkbox",inputProps:W({"data-indeterminate":c},f),icon:A.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:h}),checkedIcon:A.cloneElement(y,{fontSize:(i=y.props.fontSize)!=null?i:h}),ownerState:g,ref:n,className:st(b.root,m)},v,{classes:b}))}),jZ=Aq({createStyledComponent:qe("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=>At({props:t,name:"MuiContainer"})}),VZ=(t,e)=>W({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),$Z=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}}),WZ=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([s,a])=>{var l;r[t.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=W({html:VZ(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:W({margin:0},$Z(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const o=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function HZ(t){const e=At({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return C.jsxs(A.Fragment,{children:[C.jsx(l6,{styles:i=>WZ(i,r)}),n]})}function GZ(t){const e=Li(t);return e.body===t?Aa(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Tp(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function i4(t){return parseInt(Aa(t).getComputedStyle(t).paddingRight,10)||0}function XZ(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 o4(t,e,n,r,i){const o=[e,n,...r];[].forEach.call(t.children,s=>{const a=o.indexOf(s)===-1,l=!XZ(s);a&&l&&Tp(s,i)})}function ZS(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function qZ(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(GZ(r)){const s=Vz(Li(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${i4(r)+s}px`;const a=Li(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${i4(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Li(r).body;else{const s=r.parentElement,a=Aa(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function YZ(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class KZ{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&&Tp(e.modalRef,!1);const i=YZ(n);o4(n,e.mount,e.modalRef,i,!0);const o=ZS(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=ZS(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=qZ(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=ZS(this.containers,s=>s.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&Tp(e.modalRef,n),o4(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Tp(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const ZZ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function JZ(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 QZ(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 eJ(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||QZ(t))}function tJ(t){const e=[],n=[];return Array.from(t.querySelectorAll(ZZ)).forEach((r,i)=>{const o=JZ(r);o===-1||!eJ(r)||(o===0?e.push(r):n.push({documentOrder:i,tabIndex:o,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 nJ(){return!0}function rJ(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=tJ,isEnabled:s=nJ,open:a}=t,l=A.useRef(!1),c=A.useRef(null),u=A.useRef(null),f=A.useRef(null),h=A.useRef(null),m=A.useRef(!1),v=A.useRef(null),x=_r(e.ref,v),y=A.useRef(null);A.useEffect(()=>{!a||!v.current||(m.current=!n)},[n,a]),A.useEffect(()=>{if(!a||!v.current)return;const _=Li(v.current);return v.current.contains(_.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),A.useEffect(()=>{if(!a||!v.current)return;const _=Li(v.current),S=T=>{y.current=T,!(r||!s()||T.key!=="Tab")&&_.activeElement===v.current&&T.shiftKey&&(l.current=!0,u.current&&u.current.focus())},P=()=>{const T=v.current;if(T===null)return;if(!_.hasFocus()||!s()||l.current){l.current=!1;return}if(T.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=o(v.current)),L.length>0){var U,M;const R=!!((U=y.current)!=null&&U.shiftKey&&((M=y.current)==null?void 0:M.key)==="Tab"),D=L[0],O=L[L.length-1];typeof D!="string"&&typeof O!="string"&&(R?O.focus():D.focus())}else T.focus()};_.addEventListener("focusin",P),_.addEventListener("keydown",S,!0);const N=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(N),_.removeEventListener("focusin",P),_.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);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 C.jsxs(A.Fragment,{children:[C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),A.cloneElement(e,{ref:x,onFocus:g}),C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}function iJ(t){return typeof t=="function"?t():t}function oJ(t){return t?t.props.hasOwnProperty("in"):!1}const sJ=new KZ;function aJ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=sJ,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:f}=t,h=A.useRef({}),m=A.useRef(null),v=A.useRef(null),x=_r(v,f),[y,g]=A.useState(!u),b=oJ(l);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const S=()=>Li(m.current),P=()=>(h.current.modalRef=v.current,h.current.mount=m.current,h.current),N=()=>{i.mount(P(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},T=va(()=>{const H=iJ(e)||S().body;i.add(P(),H),v.current&&N()}),L=A.useCallback(()=>i.isTopModal(P()),[i]),U=va(H=>{m.current=H,H&&(u&&L()?N():v.current&&Tp(v.current,_))}),M=A.useCallback(()=>{i.remove(P(),_)},[_,i]);A.useEffect(()=>()=>{M()},[M]),A.useEffect(()=>{u?T():(!b||!o)&&M()},[u,M,b,o,T]);const R=H=>Z=>{var F;(F=H.onKeyDown)==null||F.call(H,Z),!(Z.key!=="Escape"||Z.which===229||!L())&&(n||(Z.stopPropagation(),c&&c(Z,"escapeKeyDown")))},D=H=>Z=>{var F;(F=H.onClick)==null||F.call(H,Z),Z.target===Z.currentTarget&&c&&c(Z,"backdropClick")};return{getRootProps:(H={})=>{const Z=Wz(t);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=W({},Z,H);return W({role:"presentation"},F,{onKeyDown:R(F),ref:x})},getBackdropProps:(H={})=>{const Z=H;return W({"aria-hidden":!0},Z,{onClick:D(Z),open:u})},getTransitionProps:()=>{const H=()=>{g(!1),s&&s()},Z=()=>{g(!0),a&&a(),o&&M()};return{onEnter:kI(H,l==null?void 0:l.props.onEnter),onExited:kI(Z,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:U,isTopModal:L,exited:y,hasTransition:b}}function lJ(t){return Tt("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"],uJ=t=>{const{open:e,exited:n,classes:r}=t;return Rt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},lJ,r)},fJ=qe("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"})),dJ=qe(JK,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),hJ=A.forwardRef(function(e,n){var r,i,o,s,a,l;const c=At({name:"MuiModal",props:e}),{BackdropComponent:u=dJ,BackdropProps:f,className:h,closeAfterTransition:m=!1,children:v,container:x,component:y,components:g={},componentsProps:b={},disableAutoFocus:_=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:P=!1,disablePortal:N=!1,disableRestoreFocus:T=!1,disableScrollLock:L=!1,hideBackdrop:U=!1,keepMounted:M=!1,onBackdropClick:R,open:D,slotProps:O,slots:B}=c,X=Qe(c,cJ),H=W({},c,{closeAfterTransition:m,disableAutoFocus:_,disableEnforceFocus:S,disableEscapeKeyDown:P,disablePortal:N,disableRestoreFocus:T,disableScrollLock:L,hideBackdrop:U,keepMounted:M}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:Y,portalRef:K,isTopModal:ee,exited:me,hasTransition:le}=aJ(W({},H,{rootRef:n})),Q=W({},H,{exited:me}),ae=uJ(Q),ge={};if(v.props.tabIndex===void 0&&(ge.tabIndex="-1"),le){const{onEnter:j,onExited:ye}=Y();ge.onEnter=j,ge.onExited=ye}const Me=(r=(i=B==null?void 0:B.root)!=null?i:g.Root)!=null?r:fJ,tt=(o=(s=B==null?void 0:B.backdrop)!=null?s:g.Backdrop)!=null?o:u,He=(a=O==null?void 0:O.root)!=null?a:b.root,rt=(l=O==null?void 0:O.backdrop)!=null?l:b.backdrop,Ve=Us({elementType:Me,externalSlotProps:He,externalForwardedProps:X,getSlotProps:Z,additionalProps:{ref:n,as:y},ownerState:Q,className:st(h,He==null?void 0:He.className,ae==null?void 0:ae.root,!Q.open&&Q.exited&&(ae==null?void 0:ae.hidden))}),se=Us({elementType:tt,externalSlotProps:rt,additionalProps:f,getSlotProps:j=>F(W({},j,{onClick:ye=>{R&&R(ye),j!=null&&j.onClick&&j.onClick(ye)}})),className:st(rt==null?void 0:rt.className,f==null?void 0:f.className,ae==null?void 0:ae.backdrop),ownerState:Q});return!M&&!D&&(!le||me)?null:C.jsx(NK,{ref:K,container:x,disablePortal:N,children:C.jsxs(Me,W({},Ve,{children:[!U&&u?C.jsx(tt,W({},se)):null,C.jsx(rJ,{disableEnforceFocus:S,disableAutoFocus:_,disableRestoreFocus:T,isEnabled:ee,open:D,children:A.cloneElement(v,ge)})]}))})}),s4=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),pJ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],mJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},$K,e);return W({},e,i)},gJ=qe(Gb,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Wb(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)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=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:o,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:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${nc.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${nc.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"},[`&.${nc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${nc.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(.${nc.disabled}, .${nc.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${nc.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}))}),vJ=qe(Xb,{name:"MuiFilledInput",slot:"Input",overridesResolver:Hb})(({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})),TR=A.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:m,slots:v={},type:x="text"}=a,y=Qe(a,pJ),g=W({},a,{fullWidth:u,inputComponent:f,multiline:h,type:x}),b=mJ(a),_={root:{ownerState:g},input:{ownerState:g}},S=m??c?ui(_,m??c):_,P=(r=(i=v.root)!=null?i:l.Root)!=null?r:gJ,N=(o=(s=v.input)!=null?s:l.Input)!=null?o:vJ;return C.jsx(CR,W({slots:{root:P,input:N},componentsProps:S,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:x},y,{classes:b}))});TR.muiName="Input";function yJ(t){return Tt("MuiFormControl",t)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const xJ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],bJ=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${bt(n)}`,r&&"fullWidth"]};return Rt(i,yJ,e)},_J=qe("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%"})),u6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:v=!1,size:x="medium",variant:y="outlined"}=r,g=Qe(r,xJ),b=W({},r,{color:s,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:v,size:x,variant:y}),_=bJ(b),[S,P]=A.useState(()=>{let O=!1;return i&&A.Children.forEach(i,B=>{if(!Iy(B,["Input","Select"]))return;const X=Iy(B,["Select"])?B.props.input:B;X&&DK(X.props)&&(O=!0)}),O}),[N,T]=A.useState(()=>{let O=!1;return i&&A.Children.forEach(i,B=>{Iy(B,["Input","Select"])&&(M1(B.props,!0)||M1(B.props.inputProps,!0))&&(O=!0)}),O}),[L,U]=A.useState(!1);l&&L&&U(!1);const M=u!==void 0&&!l?u:L;let R;const D=A.useMemo(()=>({adornedStart:S,setAdornedStart:P,color:s,disabled:l,error:c,filled:N,focused:M,fullWidth:f,hiddenLabel:h,size:x,onBlur:()=>{U(!1)},onEmpty:()=>{T(!1)},onFilled:()=>{T(!0)},onFocus:()=>{U(!0)},registerEffect:R,required:v,variant:y}),[S,s,l,c,N,M,f,h,R,v,x,y]);return C.jsx(ER.Provider,{value:D,children:C.jsx(_J,W({as:a,ownerState:b,className:st(_.root,o),ref:n},g,{children:i}))})}),rs=Fq({createStyledComponent:qe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>At({props:t,name:"MuiStack"})});function wJ(t){return Tt("MuiFormHelperText",t)}const a4=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var l4;const SJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],MJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=t,c={root:["root",i&&"disabled",o&&"error",r&&`size${bt(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Rt(c,wJ,e)},EJ=qe("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,[`&.${a4.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${a4.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),CJ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Qe(r,SJ),l=yu(),c=Xd({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=W({},r,{component:s,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=MJ(u);return C.jsx(EJ,W({as:s,ownerState:u,className:st(f.root,o),ref:n},a,{children:i===" "?l4||(l4=C.jsx("span",{className:"notranslate",children:"​"})):i}))});function TJ(t){return Tt("MuiFormLabel",t)}const Rp=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),RJ=["children","className","color","component","disabled","error","filled","focused","required"],AJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=t,l={root:["root",`color${bt(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return Rt(l,TJ,e)},PJ=qe("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",[`&.${Rp.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Rp.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Rp.error}`]:{color:(t.vars||t).palette.error.main}})),NJ=qe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Rp.error}`]:{color:(t.vars||t).palette.error.main}})),IJ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Qe(r,RJ),l=yu(),c=Xd({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=W({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=AJ(u);return C.jsxs(PJ,W({as:s,ownerState:u,className:st(f.root,o),ref:n},a,{children:[i,c.required&&C.jsxs(NJ,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),c4=A.createContext();function LJ(t){return Tt("MuiGrid",t)}const kJ=[0,1,2,3,4,5,6,7,8,9,10],OJ=["column-reverse","column","row-reverse","row"],DJ=["nowrap","wrap-reverse","wrap"],zh=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],mm=Ct("MuiGrid",["root","container","item","zeroMinWidth",...kJ.map(t=>`spacing-xs-${t}`),...OJ.map(t=>`direction-xs-${t}`),...DJ.map(t=>`wrap-xs-${t}`),...zh.map(t=>`grid-xs-${t}`),...zh.map(t=>`grid-sm-${t}`),...zh.map(t=>`grid-md-${t}`),...zh.map(t=>`grid-lg-${t}`),...zh.map(t=>`grid-xl-${t}`)]),FJ=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function id(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 o={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=Uc({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof s=="object"?s[i]:s;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} + ${id(u)})`;c={flexBasis:f,maxWidth:f}}}o=W({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,o):r[t.breakpoints.up(i)]=o,r},{})}function UJ({theme:t,ownerState:e}){const n=Uc({values:e.direction,breakpoints:t.breakpoints.values});return Di({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${mm.item}`]={maxWidth:"none"}),i})}function f6({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,o)=>t[i]-t[o]);return r.slice(0,r.indexOf(n))}function BJ({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const o=Uc({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=f6({breakpoints:t.breakpoints.values,values:o})),i=Di({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{marginTop:`-${id(u)}`,[`& > .${mm.item}`]:{paddingTop:id(u)}}:(c=s)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${mm.item}`]:{paddingTop:0}}})}return i}function jJ({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const o=Uc({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=f6({breakpoints:t.breakpoints.values,values:o})),i=Di({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{width:`calc(100% + ${id(u)})`,marginLeft:`-${id(u)}`,[`& > .${mm.item}`]:{paddingLeft:id(u)}}:(c=s)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${mm.item}`]:{paddingLeft:0}}})}return i}function VJ(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 o=t[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const $J=qe("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=VJ(s,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,o&&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}),UJ,BJ,jJ,zJ);function WJ(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 o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const HJ=t=>{const{classes:e,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=WJ(o,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)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return Rt(f,LJ,e)},_a=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiGrid"}),{breakpoints:i}=mu(),o=sg(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:h=!1,rowSpacing:m,spacing:v=0,wrap:x="wrap",zeroMinWidth:y=!1}=o,g=Qe(o,FJ),b=m||v,_=l||v,S=A.useContext(c4),P=u?a||12:S,N={},T=W({},g);i.keys.forEach(M=>{g[M]!=null&&(N[M]=g[M],delete T[M])});const L=W({},o,{columns:P,container:u,direction:f,item:h,rowSpacing:b,columnSpacing:_,wrap:x,zeroMinWidth:y,spacing:v},N,{breakpoints:i.keys}),U=HJ(L);return C.jsx(c4.Provider,{value:P,children:C.jsx($J,W({ownerState:L,className:st(U.root,s),as:c,ref:n},T))})}),GJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function K2(t){return`scale(${t}, ${t**2})`}const XJ={entering:{opacity:1,transform:K2(1)},entered:{opacity:1,transform:"none"}},JS=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),d6=A.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:v,timeout:x="auto",TransitionComponent:y=Hs}=e,g=Qe(e,GJ),b=Bz(),_=A.useRef(),S=mu(),P=A.useRef(null),N=_r(P,o.ref,n),T=X=>H=>{if(X){const Z=P.current;H===void 0?X(Z):X(Z,H)}},L=T(u),U=T((X,H)=>{a6(X);const{duration:Z,delay:F,easing:Y}=S1({style:v,timeout:x,easing:s},{mode:"enter"});let K;x==="auto"?(K=S.transitions.getAutoHeightDuration(X.clientHeight),_.current=K):K=Z,X.style.transition=[S.transitions.create("opacity",{duration:K,delay:F}),S.transitions.create("transform",{duration:JS?K:K*.666,delay:F,easing:Y})].join(","),l&&l(X,H)}),M=T(c),R=T(m),D=T(X=>{const{duration:H,delay:Z,easing:F}=S1({style:v,timeout:x,easing:s},{mode:"exit"});let Y;x==="auto"?(Y=S.transitions.getAutoHeightDuration(X.clientHeight),_.current=Y):Y=H,X.style.transition=[S.transitions.create("opacity",{duration:Y,delay:Z}),S.transitions.create("transform",{duration:JS?Y:Y*.666,delay:JS?Z:Z||Y*.333,easing:F})].join(","),X.style.opacity=0,X.style.transform=K2(.75),f&&f(X)}),O=T(h),B=X=>{x==="auto"&&b.start(_.current||0,X),r&&r(P.current,X)};return C.jsx(y,W({appear:i,in:a,nodeRef:P,onEnter:U,onEntered:M,onEntering:L,onExit:D,onExited:O,onExiting:R,addEndListener:B,timeout:x==="auto"?null:x},g,{children:(X,H)=>A.cloneElement(o,W({style:W({opacity:0,transform:K2(.75),visibility:X==="exited"&&!a?"hidden":void 0},XJ[X],v,o.props.style),ref:N},H))}))});d6.muiSupportAuto=!0;const qJ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],YJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},jK,e);return W({},e,i)},KJ=qe(Gb,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Wb(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"},[`&.${Fh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fh.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(.${Fh.disabled}, .${Fh.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Fh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),ZJ=qe(Xb,{name:"MuiInput",slot:"Input",overridesResolver:Hb})({}),RR=A.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:m=!1,slotProps:v,slots:x={},type:y="text"}=a,g=Qe(a,qJ),b=YJ(a),S={root:{ownerState:{disableUnderline:l}}},P=v??u?ui(v??u,S):S,N=(r=(i=x.root)!=null?i:c.Root)!=null?r:KJ,T=(o=(s=x.input)!=null?s:c.Input)!=null?o:ZJ;return C.jsx(CR,W({slots:{root:N,input:T},slotProps:P,fullWidth:f,inputComponent:h,multiline:m,ref:n,type:y},g,{classes:b}))});RR.muiName="Input";function JJ(t){return Tt("MuiInputLabel",t)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const QJ=["disableAnimation","margin","shrink","variant","className"],eQ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=t,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${bt(r)}`,s],asterisk:[a&&"asterisk"]},c=Rt(l,JJ,e);return W({},e,c)},tQ=qe(IJ,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Rp.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)"}))),h6=A.forwardRef(function(e,n){const r=At({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Qe(r,QJ),l=yu();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Xd({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=eQ(f);return C.jsx(tQ,W({"data-shrink":c,ownerState:f,ref:n,className:st(h.root,s)},a,{classes:h}))});function nQ(t){return Tt("MuiLink",t)}const rQ=Ct("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),p6={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},iQ=t=>p6[t]||t,oQ=({theme:t,ownerState:e})=>{const n=iQ(e.color),r=yd(t,`palette.${n}`,!1)||e.color,i=yd(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:Rn(r,.4)},sQ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],aQ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,o={root:["root",`underline${bt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Rt(o,nQ,e)},lQ=qe(sr,{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:oQ({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"},[`&.${rQ.focusVisible}`]:{outline:"auto"}})),u4=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:f="inherit",sx:h}=r,m=Qe(r,sQ),{isFocusVisibleRef:v,onBlur:x,onFocus:y,ref:g}=jz(),[b,_]=A.useState(!1),S=_r(n,g),P=U=>{x(U),v.current===!1&&_(!1),a&&a(U)},N=U=>{y(U),v.current===!0&&_(!0),l&&l(U)},T=W({},r,{color:o,component:s,focusVisible:b,underline:u,variant:f}),L=aQ(T);return C.jsx(lQ,W({color:o,className:st(L.root,i),classes:c,component:s,onBlur:P,onFocus:N,ref:S,ownerState:T,variant:f,sx:[...Object.keys(p6).includes(o)?[]:[{color:o}],...Array.isArray(h)?h:[h]]},m))}),ks=A.createContext({});function cQ(t){return Tt("MuiList",t)}Ct("MuiList",["root","padding","dense","subheader"]);const uQ=["children","className","component","dense","disablePadding","subheader"],fQ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Rt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},cQ,e)},dQ=qe("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})),m6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=Qe(r,uQ),f=A.useMemo(()=>({dense:a}),[a]),h=W({},r,{component:s,dense:a,disablePadding:l}),m=fQ(h);return C.jsx(ks.Provider,{value:f,children:C.jsxs(dQ,W({as:s,className:st(m.root,o),ref:n,ownerState:h},u,{children:[c,i]}))})});function hQ(t){return Tt("MuiListItem",t)}const Sf=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function pQ(t){return Tt("MuiListItemButton",t)}const Mf=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),mQ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],gQ=(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]},vQ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=t,c=Rt({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},pQ,n);return W({},n,c)},yQ=qe(vu,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:gQ})(({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"}},[`&.${Mf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Mf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Mf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Rn(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})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Mf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Mf.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})),xQ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:h=!1,className:m}=r,v=Qe(r,mQ),x=A.useContext(ks),y=A.useMemo(()=>({dense:l||x.dense||!1,alignItems:i,disableGutters:c}),[i,x.dense,l,c]),g=A.useRef(null);ko(()=>{o&&g.current&&g.current.focus()},[o]);const b=W({},r,{alignItems:i,dense:y.dense,disableGutters:c,divider:u,selected:h}),_=vQ(b),S=_r(g,n);return C.jsx(ks.Provider,{value:y,children:C.jsx(yQ,W({ref:S,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:st(_.focusVisible,f),ownerState:b,className:st(_.root,m)},v,{classes:_,children:a}))})});function bQ(t){return Tt("MuiListItemSecondaryAction",t)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const _Q=["className"],wQ=t=>{const{disableGutters:e,classes:n}=t;return Rt({root:["root",e&&"disableGutters"]},bQ,n)},SQ=qe("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})),g6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Qe(r,_Q),s=A.useContext(ks),a=W({},r,{disableGutters:s.disableGutters}),l=wQ(a);return C.jsx(SQ,W({className:st(l.root,i),ownerState:a,ref:n},o))});g6.muiName="ListItemSecondaryAction";const MQ=["className"],EQ=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],CQ=(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]},TQ=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return Rt({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},hQ,r)},RQ=qe("div",{name:"MuiListItem",slot:"Root",overridesResolver:CQ})(({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&&{[`& > .${Mf.root}`]:{paddingRight:48}},{[`&.${Sf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Sf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Sf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Sf.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"}},[`&.${Sf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Rn(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})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),AQ=qe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),PQ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:f={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:v=!1,disabled:x=!1,disableGutters:y=!1,disablePadding:g=!1,divider:b=!1,focusVisibleClassName:_,secondaryAction:S,selected:P=!1,slotProps:N={},slots:T={}}=r,L=Qe(r.ContainerProps,MQ),U=Qe(r,EQ),M=A.useContext(ks),R=A.useMemo(()=>({dense:v||M.dense||!1,alignItems:i,disableGutters:y}),[i,M.dense,v,y]),D=A.useRef(null);ko(()=>{o&&D.current&&D.current.focus()},[o]);const O=A.Children.toArray(a),B=O.length&&Iy(O[O.length-1],["ListItemSecondaryAction"]),X=W({},r,{alignItems:i,autoFocus:o,button:s,dense:R.dense,disabled:x,disableGutters:y,disablePadding:g,divider:b,hasSecondaryAction:B,selected:P}),H=TQ(X),Z=_r(D,n),F=T.root||u.Root||RQ,Y=N.root||f.root||{},K=W({className:st(H.root,Y.className,l),disabled:x},U);let ee=c||"li";return s&&(K.component=c||"div",K.focusVisibleClassName=st(Sf.focusVisible,_),ee=vu),B?(ee=!K.component&&!c?"div":ee,h==="li"&&(ee==="li"?ee="div":K.component==="li"&&(K.component="div")),C.jsx(ks.Provider,{value:R,children:C.jsxs(AQ,W({as:h,className:st(H.container,m),ref:Z,ownerState:X},L,{children:[C.jsx(F,W({},Y,!xd(F)&&{as:ee,ownerState:W({},X,Y.ownerState)},K,{children:O})),O.pop()]}))})):C.jsx(ks.Provider,{value:R,children:C.jsxs(F,W({},Y,{as:ee,ref:Z},!xd(F)&&{ownerState:W({},X,Y.ownerState)},K,{children:[O,S&&C.jsx(g6,{children:S})]}))})}),f4=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]);function NQ(t){return Tt("MuiListItemText",t)}const E1=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),IQ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],LQ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:o}=t;return Rt({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},NQ,e)},kQ=qe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${E1.primary}`]:e.primary},{[`& .${E1.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})),OQ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f}=r,h=Qe(r,IQ),{dense:m}=A.useContext(ks);let v=l??i,x=u;const y=W({},r,{disableTypography:s,inset:a,primary:!!v,secondary:!!x,dense:m}),g=LQ(y);return v!=null&&v.type!==sr&&!s&&(v=C.jsx(sr,W({variant:m?"body2":"body1",className:g.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:v}))),x!=null&&x.type!==sr&&!s&&(x=C.jsx(sr,W({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},f,{children:x}))),C.jsxs(kQ,W({className:st(g.root,o),ownerState:y,ref:n},h,{children:[v,x]}))}),DQ=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function QS(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function d4(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function v6(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 Uh(t,e,n,r,i,o){let s=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!v6(a,o)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const FQ=A.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu"}=e,h=Qe(e,DQ),m=A.useRef(null),v=A.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ko(()=>{i&&m.current.focus()},[i]),A.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:S})=>{const P=!m.current.style.width;if(_.clientHeight{const S=m.current,P=_.key,N=Li(S).activeElement;if(P==="ArrowDown")_.preventDefault(),Uh(S,N,c,l,QS);else if(P==="ArrowUp")_.preventDefault(),Uh(S,N,c,l,d4);else if(P==="Home")_.preventDefault(),Uh(S,null,c,l,QS);else if(P==="End")_.preventDefault(),Uh(S,null,c,l,d4);else if(P.length===1){const T=v.current,L=P.toLowerCase(),U=performance.now();T.keys.length>0&&(U-T.lastTime>500?(T.keys=[],T.repeating=!0,T.previousKeyMatched=!0):T.repeating&&L!==T.keys[0]&&(T.repeating=!1)),T.lastTime=U,T.keys.push(L);const M=N&&!T.repeating&&v6(N,T);T.previousKeyMatched&&(M||Uh(S,N,!1,l,QS,T))?_.preventDefault():T.previousKeyMatched=!1}u&&u(_)},y=_r(m,n);let g=-1;A.Children.forEach(s,(_,S)=>{if(!A.isValidElement(_)){g===S&&(g+=1,g>=s.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>=s.length&&(g=-1))});const b=A.Children.map(s,(_,S)=>{if(S===g){const P={};return o&&(P.autoFocus=!0),_.props.tabIndex===void 0&&f==="selectedMenu"&&(P.tabIndex=0),A.cloneElement(_,P)}return _});return C.jsx(m6,W({role:"menu",ref:y,className:a,onKeyDown:x,tabIndex:i?0:-1},h,{children:b}))});function zQ(t){return Tt("MuiPopover",t)}Ct("MuiPopover",["root","paper"]);const UQ=["onEntering"],BQ=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],jQ=["slotProps"];function h4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function p4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function m4(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function eM(t){return typeof t=="function"?t():t}const VQ=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"]},zQ,e)},$Q=qe(hJ,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),y6=qe(gu,{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}),x6=A.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:h,className:m,container:v,elevation:x=8,marginThreshold:y=16,open:g,PaperProps:b={},slots:_,slotProps:S,transformOrigin:P={vertical:"top",horizontal:"left"},TransitionComponent:N=d6,transitionDuration:T="auto",TransitionProps:{onEntering:L}={},disableScrollLock:U=!1}=s,M=Qe(s.TransitionProps,UQ),R=Qe(s,BQ),D=(r=S==null?void 0:S.paper)!=null?r:b,O=A.useRef(),B=_r(O,D.ref),X=W({},s,{anchorOrigin:c,anchorReference:f,elevation:x,marginThreshold:y,externalPaperSlotProps:D,transformOrigin:P,TransitionComponent:N,transitionDuration:T,TransitionProps:M}),H=VQ(X),Z=A.useCallback(()=>{if(f==="anchorPosition")return u;const j=eM(l),xe=(j&&j.nodeType===1?j:Li(O.current).body).getBoundingClientRect();return{top:xe.top+h4(xe,c.vertical),left:xe.left+p4(xe,c.horizontal)}},[l,c.horizontal,c.vertical,u,f]),F=A.useCallback(j=>({vertical:h4(j,P.vertical),horizontal:p4(j,P.horizontal)}),[P.horizontal,P.vertical]),Y=A.useCallback(j=>{const ye={width:j.offsetWidth,height:j.offsetHeight},xe=F(ye);if(f==="none")return{top:null,left:null,transformOrigin:m4(xe)};const Re=Z();let Pe=Re.top-xe.vertical,Ee=Re.left-xe.horizontal;const De=Pe+ye.height,$=Ee+ye.width,z=Aa(eM(l)),re=z.innerHeight-y,he=z.innerWidth-y;if(y!==null&&Pere){const pe=De-re;Pe-=pe,xe.vertical+=pe}if(y!==null&&Eehe){const pe=$-he;Ee-=pe,xe.horizontal+=pe}return{top:`${Math.round(Pe)}px`,left:`${Math.round(Ee)}px`,transformOrigin:m4(xe)}},[l,f,Z,F,y]),[K,ee]=A.useState(g),me=A.useCallback(()=>{const j=O.current;if(!j)return;const ye=Y(j);ye.top!==null&&(j.style.top=ye.top),ye.left!==null&&(j.style.left=ye.left),j.style.transformOrigin=ye.transformOrigin,ee(!0)},[Y]);A.useEffect(()=>(U&&window.addEventListener("scroll",me),()=>window.removeEventListener("scroll",me)),[l,U,me]);const le=(j,ye)=>{L&&L(j,ye),me()},Q=()=>{ee(!1)};A.useEffect(()=>{g&&me()}),A.useImperativeHandle(a,()=>g?{updatePosition:()=>{me()}}:null,[g,me]),A.useEffect(()=>{if(!g)return;const j=Bb(()=>{me()}),ye=Aa(l);return ye.addEventListener("resize",j),()=>{j.clear(),ye.removeEventListener("resize",j)}},[l,g,me]);let ae=T;T==="auto"&&!N.muiSupportAuto&&(ae=void 0);const ge=v||(l?Li(eM(l)).body:void 0),Me=(i=_==null?void 0:_.root)!=null?i:$Q,tt=(o=_==null?void 0:_.paper)!=null?o:y6,He=Us({elementType:tt,externalSlotProps:W({},D,{style:K?D.style:W({},D.style,{opacity:0})}),additionalProps:{elevation:x,ref:B},ownerState:X,className:st(H.paper,D==null?void 0:D.className)}),rt=Us({elementType:Me,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:R,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:ge,open:g},ownerState:X,className:st(H.root,m)}),{slotProps:Ve}=rt,se=Qe(rt,jQ);return C.jsx(Me,W({},se,!xd(Me)&&{slotProps:Ve,disableScrollLock:U},{children:C.jsx(N,W({appear:!0,in:g,onEntering:le,onExited:Q,timeout:ae},M,{children:C.jsx(tt,W({},He,{children:h}))}))}))});function WQ(t){return Tt("MuiMenu",t)}Ct("MuiMenu",["root","paper","list"]);const HQ=["onEntering"],GQ=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],XQ={vertical:"top",horizontal:"right"},qQ={vertical:"top",horizontal:"left"},YQ=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"],list:["list"]},WQ,e)},KQ=qe(x6,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),ZQ=qe(y6,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),JQ=qe(FQ,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),QQ=A.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:f,open:h,PaperProps:m={},PopoverClasses:v,transitionDuration:x="auto",TransitionProps:{onEntering:y}={},variant:g="selectedMenu",slots:b={},slotProps:_={}}=o,S=Qe(o.TransitionProps,HQ),P=Qe(o,GQ),N=gR(),T=W({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:y,PaperProps:m,transitionDuration:x,TransitionProps:S,variant:g}),L=YQ(T),U=s&&!c&&h,M=A.useRef(null),R=(F,Y)=>{M.current&&M.current.adjustStyleForScrollbar(F,{direction:N?"rtl":"ltr"}),y&&y(F,Y)},D=F=>{F.key==="Tab"&&(F.preventDefault(),f&&f(F,"tabKeyDown"))};let O=-1;A.Children.map(a,(F,Y)=>{A.isValidElement(F)&&(F.props.disabled||(g==="selectedMenu"&&F.props.selected||O===-1)&&(O=Y))});const B=(r=b.paper)!=null?r:ZQ,X=(i=_.paper)!=null?i:m,H=Us({elementType:b.root,externalSlotProps:_.root,ownerState:T,className:[L.root,l]}),Z=Us({elementType:B,externalSlotProps:X,ownerState:T,className:L.paper});return C.jsx(KQ,W({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:N?"right":"left"},transformOrigin:N?XQ:qQ,slots:{paper:B,root:b.root},slotProps:{root:H,paper:Z},open:h,ref:n,transitionDuration:x,TransitionProps:W({onEntering:R},S),ownerState:T},P,{classes:v,children:C.jsx(JQ,W({onKeyDown:D,actions:M,autoFocus:s&&(O===-1||c),autoFocusItem:U,variant:g},u,{className:st(L.list,u.className),children:a}))}))});function eee(t){return Tt("MuiMenuItem",t)}const Bh=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),tee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],nee=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},ree=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=t,l=Rt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},eee,s);return W({},s,l)},iee=qe(vu,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:nee})(({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"}},[`&.${Bh.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Bh.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Bh.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Rn(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})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Bh.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Bh.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${s4.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${s4.inset}`]:{marginLeft:52},[`& .${E1.root}`]:{marginTop:0,marginBottom:0},[`& .${E1.inset}`]:{paddingLeft:36},[`& .${f4.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&W({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${f4.root} svg`]:{fontSize:"1.25rem"}}))),g4=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:h}=r,m=Qe(r,tee),v=A.useContext(ks),x=A.useMemo(()=>({dense:s||v.dense||!1,disableGutters:l}),[v.dense,s,l]),y=A.useRef(null);ko(()=>{i&&y.current&&y.current.focus()},[i]);const g=W({},r,{dense:x.dense,divider:a,disableGutters:l}),b=ree(r),_=_r(y,n);let S;return r.disabled||(S=f!==void 0?f:-1),C.jsx(ks.Provider,{value:x,children:C.jsx(iee,W({ref:_,role:u,tabIndex:S,component:o,focusVisibleClassName:st(b.focusVisible,c),className:st(b.root,h)},m,{ownerState:g,classes:b}))})});function oee(t){return Tt("MuiNativeSelect",t)}const AR=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),see=["className","disabled","error","IconComponent","inputRef","variant"],aee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${bt(n)}`,o&&"iconOpen",r&&"disabled"]};return Rt(a,oee,e)},b6=({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"},[`&.${AR.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}}),lee=qe("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:pi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${AR.multiple}`]:e.multiple}]}})(b6),_6=({ownerState:t,theme:e})=>W({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${AR.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),cee=qe("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]}})(_6),uee=A.forwardRef(function(e,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=e,c=Qe(e,see),u=W({},e,{disabled:i,variant:l,error:o}),f=aee(u);return C.jsxs(A.Fragment,{children:[C.jsx(lee,W({ownerState:u,className:st(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:C.jsx(cee,{as:s,ownerState:u,className:f.icon})]})});var v4;const fee=["children","classes","className","label","notched"],dee=qe("fieldset",{shouldForwardProp:pi})({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%"}),hee=qe("legend",{shouldForwardProp:pi})(({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 pee(t){const{className:e,label:n,notched:r}=t,i=Qe(t,fee),o=n!=null&&n!=="",s=W({},t,{notched:r,withLabel:o});return C.jsx(dee,W({"aria-hidden":!0,className:e,ownerState:s},i,{children:C.jsx(hee,{ownerState:s,children:o?C.jsx("span",{children:n}):v4||(v4=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const mee=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],gee=t=>{const{classes:e}=t,r=Rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},VK,e);return W({},e,r)},vee=qe(Gb,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Wb})(({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 .${Za.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Za.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Za.focused} .${Za.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${Za.error} .${Za.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Za.disabled} .${Za.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"}))}),yee=qe(pee,{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}}),xee=qe(Xb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Hb})(({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})),PR=A.forwardRef(function(e,n){var r,i,o,s,a;const l=At({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:f="input",label:h,multiline:m=!1,notched:v,slots:x={},type:y="text"}=l,g=Qe(l,mee),b=gee(l),_=yu(),S=Xd({props:l,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),P=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:y}),N=(r=(i=x.root)!=null?i:c.Root)!=null?r:vee,T=(o=(s=x.input)!=null?s:c.Input)!=null?o:xee;return C.jsx(CR,W({slots:{root:N,input:T},renderSuffix:L=>C.jsx(yee,{ownerState:P,className:b.notchedOutline,label:h!=null&&h!==""&&S.required?a||(a=C.jsxs(A.Fragment,{children:[h," ","*"]})):h,notched:typeof v<"u"?v:!!(L.startAdornment||L.filled||L.focused)}),fullWidth:u,inputComponent:f,multiline:m,ref:n,type:y},g,{classes:W({},b,{notchedOutline:null})}))});PR.muiName="Input";function bee(t){return Tt("MuiSelect",t)}const jh=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var y4;const _ee=["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"],wee=qe("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${jh.select}`]:e.select},{[`&.${jh.select}`]:e[n.variant]},{[`&.${jh.error}`]:e.error},{[`&.${jh.multiple}`]:e.multiple}]}})(b6,{[`&.${jh.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),See=qe("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]}})(_6),Mee=qe("input",{shouldForwardProp:t=>s6(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 x4(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Eee(t){return t==null||typeof t=="string"&&!t.trim()}const Cee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${bt(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Rt(a,bee,e)},Tee=A.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:v=!1,IconComponent:x,inputRef:y,labelId:g,MenuProps:b={},multiple:_,name:S,onBlur:P,onChange:N,onClose:T,onFocus:L,onOpen:U,open:M,readOnly:R,renderValue:D,SelectDisplayProps:O={},tabIndex:B,value:X,variant:H="standard"}=e,Z=Qe(e,_ee),[F,Y]=W2({controlled:X,default:f,name:"Select"}),[K,ee]=W2({controlled:M,default:u,name:"Select"}),me=A.useRef(null),le=A.useRef(null),[Q,ae]=A.useState(null),{current:ge}=A.useRef(M!=null),[Me,tt]=A.useState(),He=_r(n,y),rt=A.useCallback(Oe=>{le.current=Oe,Oe&&ae(Oe)},[]),Ve=Q==null?void 0:Q.parentNode;A.useImperativeHandle(He,()=>({focus:()=>{le.current.focus()},node:me.current,value:F}),[F]),A.useEffect(()=>{u&&K&&Q&&!ge&&(tt(a?null:Ve.clientWidth),le.current.focus())},[Q,a]),A.useEffect(()=>{s&&le.current.focus()},[s]),A.useEffect(()=>{if(!g)return;const Oe=Li(le.current).getElementById(g);if(Oe){const Ue=()=>{getSelection().isCollapsed&&le.current.focus()};return Oe.addEventListener("click",Ue),()=>{Oe.removeEventListener("click",Ue)}}},[g]);const se=(Oe,Ue)=>{Oe?U&&U(Ue):T&&T(Ue),ge||(tt(a?null:Ve.clientWidth),ee(Oe))},j=Oe=>{Oe.button===0&&(Oe.preventDefault(),le.current.focus(),se(!0,Oe))},ye=Oe=>{se(!1,Oe)},xe=A.Children.toArray(l),Re=Oe=>{const Ue=xe.find(Ae=>Ae.props.value===Oe.target.value);Ue!==void 0&&(Y(Ue.props.value),N&&N(Oe,Ue))},Pe=Oe=>Ue=>{let Ae;if(Ue.currentTarget.hasAttribute("tabindex")){if(_){Ae=Array.isArray(F)?F.slice():[];const ke=F.indexOf(Oe.props.value);ke===-1?Ae.push(Oe.props.value):Ae.splice(ke,1)}else Ae=Oe.props.value;if(Oe.props.onClick&&Oe.props.onClick(Ue),F!==Ae&&(Y(Ae),N)){const ke=Ue.nativeEvent||Ue,dt=new ke.constructor(ke.type,ke);Object.defineProperty(dt,"target",{writable:!0,value:{value:Ae,name:S}}),N(dt,Oe)}_||se(!1,Ue)}},Ee=Oe=>{R||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Oe.key)!==-1&&(Oe.preventDefault(),se(!0,Oe))},De=Q!==null&&K,$=Oe=>{!De&&P&&(Object.defineProperty(Oe,"target",{writable:!0,value:{value:F,name:S}}),P(Oe))};delete Z["aria-invalid"];let z,re;const he=[];let pe=!1;(M1({value:F})||m)&&(D?z=D(F):pe=!0);const be=xe.map(Oe=>{if(!A.isValidElement(Oe))return null;let Ue;if(_){if(!Array.isArray(F))throw new Error(Ra(2));Ue=F.some(Ae=>x4(Ae,Oe.props.value)),Ue&&pe&&he.push(Oe.props.children)}else Ue=x4(F,Oe.props.value),Ue&&pe&&(re=Oe.props.children);return A.cloneElement(Oe,{"aria-selected":Ue?"true":"false",onClick:Pe(Oe),onKeyUp:Ae=>{Ae.key===" "&&Ae.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(Ae)},role:"option",selected:Ue,value:void 0,"data-value":Oe.props.value})});pe&&(_?he.length===0?z=null:z=he.reduce((Oe,Ue,Ae)=>(Oe.push(Ue),Ae{const{classes:e}=t;return e},NR={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>pi(t)&&t!=="variant",slot:"Root"},Nee=qe(RR,NR)(""),Iee=qe(PR,NR)(""),Lee=qe(TR,NR)(""),IR=A.forwardRef(function(e,n){const r=At({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=WK,id:f,input:h,inputProps:m,label:v,labelId:x,MenuProps:y,multiple:g=!1,native:b=!1,onClose:_,onOpen:S,open:P,renderValue:N,SelectDisplayProps:T,variant:L="outlined"}=r,U=Qe(r,Ree),M=b?uee:Tee,R=yu(),D=Xd({props:r,muiFormControl:R,states:["variant","error"]}),O=D.variant||L,B=W({},r,{variant:O,classes:s}),X=Pee(B),H=Qe(X,Aee),Z=h||{standard:C.jsx(Nee,{ownerState:B}),outlined:C.jsx(Iee,{label:v,ownerState:B}),filled:C.jsx(Lee,{ownerState:B})}[O],F=_r(n,Z.ref);return C.jsx(A.Fragment,{children:A.cloneElement(Z,W({inputComponent:M,inputProps:W({children:o,error:D.error,IconComponent:u,variant:O,type:void 0,multiple:g},b?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:x,MenuProps:y,onClose:_,onOpen:S,open:P,renderValue:N,SelectDisplayProps:W({id:f},T)},m,{classes:m?ui(H,m.classes):H},h?h.props.inputProps:{})},(g&&b||c)&&O==="outlined"?{notched:!0}:{},{ref:F,className:st(Z.props.className,a,X.root)},!h&&{variant:O},U))})});IR.muiName="Select";function kee(t){return Tt("MuiTab",t)}const Ja=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Oee=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Dee=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:l}=t,c={root:["root",o&&s&&"labelIcon",`textColor${bt(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Rt(c,kee,e)},Fee=qe(vu,{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,{[`& .${Ja.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,[`& > .${Ja.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,[`&.${Ja.selected}`]:{opacity:1},[`&.${Ja.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Ja.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Ja.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Ja.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Ja.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)})),tM=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:h,onClick:m,onFocus:v,selected:x,selectionFollowsFocus:y,textColor:g="inherit",value:b,wrapped:_=!1}=r,S=Qe(r,Oee),P=W({},r,{disabled:o,disableFocusRipple:s,selected:x,icon:!!l,iconPosition:c,label:!!f,fullWidth:a,textColor:g,wrapped:_}),N=Dee(P),T=l&&f&&A.isValidElement(l)?A.cloneElement(l,{className:st(N.iconWrapper,l.props.className)}):l,L=M=>{!x&&h&&h(M,b),m&&m(M)},U=M=>{y&&!x&&h&&h(M,b),v&&v(M)};return C.jsxs(Fee,W({focusRipple:!s,className:st(N.root,i),ref:n,role:"tab","aria-selected":x,disabled:o,onClick:L,onFocus:U,ownerState:P,tabIndex:x?0:-1},S,{children:[c==="top"||c==="start"?C.jsxs(A.Fragment,{children:[T,f]}):C.jsxs(A.Fragment,{children:[f,T]}),u]}))}),w6=A.createContext();function zee(t){return Tt("MuiTable",t)}Ct("MuiTable",["root","stickyHeader"]);const Uee=["className","component","padding","size","stickyHeader"],Bee=t=>{const{classes:e,stickyHeader:n}=t;return Rt({root:["root",n&&"stickyHeader"]},zee,e)},jee=qe("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"})),b4="table",S6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTable"}),{className:i,component:o=b4,padding:s="normal",size:a="medium",stickyHeader:l=!1}=r,c=Qe(r,Uee),u=W({},r,{component:o,padding:s,size:a,stickyHeader:l}),f=Bee(u),h=A.useMemo(()=>({padding:s,size:a,stickyHeader:l}),[s,a,l]);return C.jsx(w6.Provider,{value:h,children:C.jsx(jee,W({as:o,role:o===b4?null:"table",ref:n,className:st(f.root,i),ownerState:u},c))})}),qb=A.createContext();function Vee(t){return Tt("MuiTableBody",t)}Ct("MuiTableBody",["root"]);const $ee=["className","component"],Wee=t=>{const{classes:e}=t;return Rt({root:["root"]},Vee,e)},Hee=qe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),Gee={variant:"body"},_4="tbody",M6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableBody"}),{className:i,component:o=_4}=r,s=Qe(r,$ee),a=W({},r,{component:o}),l=Wee(a);return C.jsx(qb.Provider,{value:Gee,children:C.jsx(Hee,W({className:st(l.root,i),as:o,ref:n,role:o===_4?null:"rowgroup",ownerState:a},s))})});function Xee(t){return Tt("MuiTableCell",t)}const gm=Ct("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),qee=["align","className","component","padding","scope","size","sortDirection","variant"],Yee=t=>{const{classes:e,variant:n,align:r,padding:i,size:o,stickyHeader:s}=t,a={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${bt(r)}`,i!=="normal"&&`padding${bt(i)}`,`size${bt(o)}`]};return Rt(a,Xee,e)},Kee=qe("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"?Qz(Rn(t.palette.divider,1),.88):Jz(Rn(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",[`&.${gm.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})),Ts=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:s,padding:a,scope:l,size:c,sortDirection:u,variant:f}=r,h=Qe(r,qee),m=A.useContext(w6),v=A.useContext(qb),x=v&&v.variant==="head";let y;s?y=s:y=x?"th":"td";let g=l;y==="td"?g=void 0:!g&&x&&(g="col");const b=f||v&&v.variant,_=W({},r,{align:i,component:y,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=Yee(_);let P=null;return u&&(P=u==="asc"?"ascending":"descending"),C.jsx(Kee,W({as:y,ref:n,className:st(S.root,o),"aria-sort":P,scope:g,ownerState:_},h))});function Zee(t){return Tt("MuiTableContainer",t)}Ct("MuiTableContainer",["root"]);const Jee=["className","component"],Qee=t=>{const{classes:e}=t;return Rt({root:["root"]},Zee,e)},ete=qe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),E6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableContainer"}),{className:i,component:o="div"}=r,s=Qe(r,Jee),a=W({},r,{component:o}),l=Qee(a);return C.jsx(ete,W({ref:n,as:o,className:st(l.root,i),ownerState:a},s))});function tte(t){return Tt("MuiTableHead",t)}Ct("MuiTableHead",["root"]);const nte=["className","component"],rte=t=>{const{classes:e}=t;return Rt({root:["root"]},tte,e)},ite=qe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),ote={variant:"head"},w4="thead",C6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableHead"}),{className:i,component:o=w4}=r,s=Qe(r,nte),a=W({},r,{component:o}),l=rte(a);return C.jsx(qb.Provider,{value:ote,children:C.jsx(ite,W({as:o,className:st(l.root,i),ref:n,role:o===w4?null:"rowgroup",ownerState:a},s))})});function ste(t){return Tt("MuiToolbar",t)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const ate=["className","component","disableGutters","variant"],lte=t=>{const{classes:e,disableGutters:n,variant:r}=t;return Rt({root:["root",!n&&"gutters",r]},ste,e)},cte=qe("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),ute=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=Qe(r,ate),c=W({},r,{component:o,disableGutters:s,variant:a}),u=lte(c);return C.jsx(cte,W({as:o,className:st(u.root,i),ref:n,ownerState:c},l))}),fte=Gd(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),dte=Gd(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function hte(t){return Tt("MuiTableRow",t)}const S4=Ct("MuiTableRow",["root","selected","hover","head","footer"]),pte=["className","component","hover","selected"],mte=t=>{const{classes:e,selected:n,hover:r,head:i,footer:o}=t;return Rt({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},hte,e)},gte=qe("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,[`&.${S4.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${S4.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(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}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),M4="tr",Yb=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableRow"}),{className:i,component:o=M4,hover:s=!1,selected:a=!1}=r,l=Qe(r,pte),c=A.useContext(qb),u=W({},r,{component:o,hover:s,selected:a,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),f=mte(u);return C.jsx(gte,W({as:o,ref:n,className:st(f.root,i),role:o===M4?null:"row",ownerState:u},l))});function vte(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function yte(t,e,n,r={},i=()=>{}){const{ease:o=vte,duration:s=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)/s);if(e[t]=o(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 xte=["onChange"],bte={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function _te(t){const{onChange:e}=t,n=Qe(t,xte),r=A.useRef(),i=A.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return ko(()=>{const s=Bb(()=>{const l=r.current;o(),l!==r.current&&e(r.current)}),a=Aa(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[e]),A.useEffect(()=>{o(),e(r.current)},[e]),C.jsx("div",W({style:bte,ref:i},n))}function wte(t){return Tt("MuiTabScrollButton",t)}const Ste=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Mte=["className","slots","slotProps","direction","orientation","disabled"],Ete=t=>{const{classes:e,orientation:n,disabled:r}=t;return Rt({root:["root",n,r&&"disabled"]},wte,e)},Cte=qe(vu,{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,[`&.${Ste.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Tte=A.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:l={},direction:c}=o,u=Qe(o,Mte),f=gR(),h=W({isRtl:f},o),m=Ete(h),v=(r=a.StartScrollButtonIcon)!=null?r:fte,x=(i=a.EndScrollButtonIcon)!=null?i:dte,y=Us({elementType:v,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),g=Us({elementType:x,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return C.jsx(Cte,W({component:"div",className:st(m.root,s),ref:n,role:null,ownerState:h,tabIndex:null},u,{children:c==="left"?C.jsx(v,W({},y)):C.jsx(x,W({},g))}))});function Rte(t){return Tt("MuiTabs",t)}const nM=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ate=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],E4=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,C4=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,iv=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(t,i);else{i.focus();return}}},Pte=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:l}=t;return Rt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Rte,l)},Nte=qe("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${nM.scrollButtons}`]:e.scrollButtons},{[`& .${nM.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&&{[`& .${nM.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Ite=qe("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"})),Lte=qe("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"})),kte=qe("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})),Ote=qe(_te)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),T4={},Dte=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTabs"}),i=mu(),o=gR(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:v="primary",onChange:x,orientation:y="horizontal",ScrollButtonComponent:g=Tte,scrollButtons:b="auto",selectionFollowsFocus:_,slots:S={},slotProps:P={},TabIndicatorProps:N={},TabScrollButtonProps:T={},textColor:L="primary",value:U,variant:M="standard",visibleScrollbar:R=!1}=r,D=Qe(r,Ate),O=M==="scrollable",B=y==="vertical",X=B?"scrollTop":"scrollLeft",H=B?"top":"left",Z=B?"bottom":"right",F=B?"clientHeight":"clientWidth",Y=B?"height":"width",K=W({},r,{component:h,allowScrollButtonsMobile:m,indicatorColor:v,orientation:y,vertical:B,scrollButtons:b,textColor:L,variant:M,visibleScrollbar:R,fixed:!O,hideScrollbar:O&&!R,scrollableX:O&&!B,scrollableY:O&&B,centered:c&&!O,scrollButtonsHideMobile:!m}),ee=Pte(K),me=Us({elementType:S.StartScrollButtonIcon,externalSlotProps:P.startScrollButtonIcon,ownerState:K}),le=Us({elementType:S.EndScrollButtonIcon,externalSlotProps:P.endScrollButtonIcon,ownerState:K}),[Q,ae]=A.useState(!1),[ge,Me]=A.useState(T4),[tt,He]=A.useState(!1),[rt,Ve]=A.useState(!1),[se,j]=A.useState(!1),[ye,xe]=A.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,Pe=A.useRef(null),Ee=A.useRef(null),De=()=>{const Ae=Pe.current;let ke;if(Ae){const J=Ae.getBoundingClientRect();ke={clientWidth:Ae.clientWidth,scrollLeft:Ae.scrollLeft,scrollTop:Ae.scrollTop,scrollLeftNormalized:cq(Ae,o?"rtl":"ltr"),scrollWidth:Ae.scrollWidth,top:J.top,bottom:J.bottom,left:J.left,right:J.right}}let dt;if(Ae&&U!==!1){const J=Ee.current.children;if(J.length>0){const je=J[Re.get(U)];dt=je?je.getBoundingClientRect():null}}return{tabsMeta:ke,tabMeta:dt}},$=va(()=>{const{tabsMeta:Ae,tabMeta:ke}=De();let dt=0,J;if(B)J="top",ke&&Ae&&(dt=ke.top-Ae.top+Ae.scrollTop);else if(J=o?"right":"left",ke&&Ae){const fe=o?Ae.scrollLeftNormalized+Ae.clientWidth-Ae.scrollWidth:Ae.scrollLeft;dt=(o?-1:1)*(ke[J]-Ae[J]+fe)}const je={[J]:dt,[Y]:ke?ke[Y]:0};if(isNaN(ge[J])||isNaN(ge[Y]))Me(je);else{const fe=Math.abs(ge[J]-je[J]),Te=Math.abs(ge[Y]-je[Y]);(fe>=1||Te>=1)&&Me(je)}}),z=(Ae,{animation:ke=!0}={})=>{ke?yte(X,Pe.current,Ae,{duration:i.transitions.duration.standard}):Pe.current[X]=Ae},re=Ae=>{let ke=Pe.current[X];B?ke+=Ae:(ke+=Ae*(o?-1:1),ke*=o&&$z()==="reverse"?-1:1),z(ke)},he=()=>{const Ae=Pe.current[F];let ke=0;const dt=Array.from(Ee.current.children);for(let J=0;JAe){J===0&&(ke=Ae);break}ke+=je[F]}return ke},pe=()=>{re(-1*he())},be=()=>{re(he())},Ge=A.useCallback(Ae=>{xe({overflow:null,scrollbarWidth:Ae})},[]),Fe=()=>{const Ae={};Ae.scrollbarSizeListener=O?C.jsx(Ote,{onChange:Ge,className:st(ee.scrollableX,ee.hideScrollbar)}):null;const dt=O&&(b==="auto"&&(tt||rt)||b===!0);return Ae.scrollButtonStart=dt?C.jsx(g,W({slots:{StartScrollButtonIcon:S.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:me},orientation:y,direction:o?"right":"left",onClick:pe,disabled:!tt},T,{className:st(ee.scrollButtons,T.className)})):null,Ae.scrollButtonEnd=dt?C.jsx(g,W({slots:{EndScrollButtonIcon:S.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:le},orientation:y,direction:o?"left":"right",onClick:be,disabled:!rt},T,{className:st(ee.scrollButtons,T.className)})):null,Ae},Ne=va(Ae=>{const{tabsMeta:ke,tabMeta:dt}=De();if(!(!dt||!ke)){if(dt[H]ke[Z]){const J=ke[X]+(dt[Z]-ke[Z]);z(J,{animation:Ae})}}}),ze=va(()=>{O&&b!==!1&&j(!se)});A.useEffect(()=>{const Ae=Bb(()=>{Pe.current&&$()});let ke;const dt=fe=>{fe.forEach(Te=>{Te.removedNodes.forEach(Ke=>{var Ye;(Ye=ke)==null||Ye.unobserve(Ke)}),Te.addedNodes.forEach(Ke=>{var Ye;(Ye=ke)==null||Ye.observe(Ke)})}),Ae(),ze()},J=Aa(Pe.current);J.addEventListener("resize",Ae);let je;return typeof ResizeObserver<"u"&&(ke=new ResizeObserver(Ae),Array.from(Ee.current.children).forEach(fe=>{ke.observe(fe)})),typeof MutationObserver<"u"&&(je=new MutationObserver(dt),je.observe(Ee.current,{childList:!0})),()=>{var fe,Te;Ae.clear(),J.removeEventListener("resize",Ae),(fe=je)==null||fe.disconnect(),(Te=ke)==null||Te.disconnect()}},[$,ze]),A.useEffect(()=>{const Ae=Array.from(Ee.current.children),ke=Ae.length;if(typeof IntersectionObserver<"u"&&ke>0&&O&&b!==!1){const dt=Ae[0],J=Ae[ke-1],je={root:Pe.current,threshold:.99},fe=Bt=>{He(!Bt[0].isIntersecting)},Te=new IntersectionObserver(fe,je);Te.observe(dt);const Ke=Bt=>{Ve(!Bt[0].isIntersecting)},Ye=new IntersectionObserver(Ke,je);return Ye.observe(J),()=>{Te.disconnect(),Ye.disconnect()}}},[O,b,se,u==null?void 0:u.length]),A.useEffect(()=>{ae(!0)},[]),A.useEffect(()=>{$()}),A.useEffect(()=>{Ne(T4!==ge)},[Ne,ge]),A.useImperativeHandle(l,()=>({updateIndicator:$,updateScrollButtons:ze}),[$,ze]);const Le=C.jsx(kte,W({},N,{className:st(ee.indicator,N.className),ownerState:K,style:W({},ge,N.style)}));let Xe=0;const xt=A.Children.map(u,Ae=>{if(!A.isValidElement(Ae))return null;const ke=Ae.props.value===void 0?Xe:Ae.props.value;Re.set(ke,Xe);const dt=ke===U;return Xe+=1,A.cloneElement(Ae,W({fullWidth:M==="fullWidth",indicator:dt&&!Q&&Le,selected:dt,selectionFollowsFocus:_,onChange:x,textColor:L,value:ke},Xe===1&&U===!1&&!Ae.props.tabIndex?{tabIndex:0}:{}))}),Oe=Ae=>{const ke=Ee.current,dt=Li(ke).activeElement;if(dt.getAttribute("role")!=="tab")return;let je=y==="horizontal"?"ArrowLeft":"ArrowUp",fe=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&o&&(je="ArrowRight",fe="ArrowLeft"),Ae.key){case je:Ae.preventDefault(),iv(ke,dt,C4);break;case fe:Ae.preventDefault(),iv(ke,dt,E4);break;case"Home":Ae.preventDefault(),iv(ke,null,E4);break;case"End":Ae.preventDefault(),iv(ke,null,C4);break}},Ue=Fe();return C.jsxs(Nte,W({className:st(ee.root,f),ownerState:K,ref:n,as:h},D,{children:[Ue.scrollButtonStart,Ue.scrollbarSizeListener,C.jsxs(Ite,{className:ee.scroller,ownerState:K,style:{overflow:ye.overflow,[B?`margin${o?"Left":"Right"}`:"marginBottom"]:R?void 0:-ye.scrollbarWidth},ref:Pe,children:[C.jsx(Lte,{"aria-label":s,"aria-labelledby":a,"aria-orientation":y==="vertical"?"vertical":null,className:ee.flexContainer,ownerState:K,onKeyDown:Oe,ref:Ee,role:"tablist",children:xt}),Q&&Le]}),Ue.scrollButtonEnd]}))});function Fte(t){return Tt("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"],Ute={standard:RR,filled:TR,outlined:PR},Bte=t=>{const{classes:e}=t;return Rt({root:["root"]},Fte,e)},jte=qe(u6,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Vte=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:v,id:x,InputLabelProps:y,inputProps:g,InputProps:b,inputRef:_,label:S,maxRows:P,minRows:N,multiline:T=!1,name:L,onBlur:U,onChange:M,onFocus:R,placeholder:D,required:O=!1,rows:B,select:X=!1,SelectProps:H,type:Z,value:F,variant:Y="outlined"}=r,K=Qe(r,zte),ee=W({},r,{autoFocus:o,color:l,disabled:u,error:f,fullWidth:m,multiline:T,required:O,select:X,variant:Y}),me=Bte(ee),le={};Y==="outlined"&&(y&&typeof y.shrink<"u"&&(le.notched=y.shrink),le.label=S),X&&((!H||!H.native)&&(le.id=void 0),le["aria-describedby"]=void 0);const Q=Uz(x),ae=v&&Q?`${Q}-helper-text`:void 0,ge=S&&Q?`${Q}-label`:void 0,Me=Ute[Y],tt=C.jsx(Me,W({"aria-describedby":ae,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:T,name:L,rows:B,maxRows:P,minRows:N,type:Z,value:F,id:Q,inputRef:_,onBlur:U,onChange:M,onFocus:R,placeholder:D,inputProps:g},le,b));return C.jsxs(jte,W({className:st(me.root,a),disabled:u,error:f,fullWidth:m,ref:n,required:O,color:l,variant:Y,ownerState:ee},K,{children:[S!=null&&S!==""&&C.jsx(h6,W({htmlFor:Q,id:ge},y,{children:S})),X?C.jsx(IR,W({"aria-describedby":ae,id:Q,labelId:ge,value:F,input:tt},H,{children:s})):tt,v&&C.jsx(CJ,W({id:ae},h,{children:v}))]}))});function $te(t){var n;const e=t.standard;return C.jsxs(hZ,{variant:"outlined",children:[C.jsxs(SZ,{children:[C.jsx(sr,{sx:{fontSize:14},color:"text.secondary",gutterBottom:!0,children:"XAS Metadata"}),C.jsx(sr,{variant:"h5",component:"div",children:e.sample.name}),C.jsx(sr,{variant:"h6",component:"div",children:e.sample.formula}),C.jsx(sr,{sx:{mb:1.5},color:"text.secondary",children:e.sample.prep}),C.jsxs(sr,{sx:{mb:1.5},children:["Measured at ",(n=e.facility)==null?void 0:n.name," on beamline"," ",e.beamline.name]}),C.jsx(sr,{sx:{mb:1.5},children:e.start_time})]}),t.showDownload&&C.jsx(yZ,{children:C.jsxs(rs,{children:[C.jsx(u4,{href:"/webxdiviewer/xdidata/"+String(e.location),download:String(e.id)+".xdi",children:"Download XDI"}),C.jsx(u4,{href:"/#/xdi/"+String(e.location),children:"Persistent Link"})]})})]})}const lg=A.createContext({xdiFile:null,setXDIFile:()=>{},comparisonFiles:[],setComparisonFiles:()=>{}});function LR(t){const{children:e}=t;return C.jsx(lg.Provider,{value:t.value,children:e})}function Wte(){const t=A.useContext(lg);return C.jsx(Bs,{children:C.jsx(sr,{sx:{whiteSpace:"pre-line",overflow:"scroll",maxHeight:"20em"},children:t.xdiFile===null?"":t.xdiFile.rawText()})})}const rM=qe(Ts)(({theme:t})=>({[`&.${gm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${gm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Hte=qe(Yb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function Gte(t){var e,n,r,i;return C.jsxs(Hte,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[C.jsx(rM,{align:"left",children:((e=t.xdiFile)==null?void 0:e.element)??" "}),C.jsx(rM,{align:"center",children:((n=t.xdiFile)==null?void 0:n.edge)??""}),C.jsx(rM,{align:"center",children:((i=(r=t.xdiFile)==null?void 0:r.sample)==null?void 0:i.name)??""})]},t.key)}function Xte(){const t=A.useContext(lg),e=()=>{const r=t.xdiFile;if(r!=null&&!t.comparisonFiles.some(i=>i.id==(r==null?void 0:r.id))){const o=[...t.comparisonFiles.length>=3?t.comparisonFiles.slice(1,3):t.comparisonFiles,r];t.setComparisonFiles(o)}},n=()=>{t.setComparisonFiles([])};return C.jsxs(Bs,{children:[C.jsx(ou,{variant:"contained",onClick:e,children:"Store Selected"}),C.jsx(ou,{variant:"outlined",onClick:n,children:"Clear All"}),C.jsx(E6,{component:gu,children:C.jsxs(S6,{sx:{minWidth:650},size:"small","aria-label":"a dense table",children:[C.jsx(C6,{children:C.jsxs(Yb,{children:[C.jsx(Ts,{children:"Element"}),C.jsx(Ts,{align:"center",children:"Edge"}),C.jsx(Ts,{align:"center",children:"Name"})]})}),C.jsx(M6,{children:t.comparisonFiles.map((r,i)=>Gte({key:i,xdiFile:r}))})]})})]})}function iM(t){const{children:e,value:n,index:r,...i}=t;return C.jsx("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...i,children:n===r&&C.jsx(Bs,{sx:{p:1},children:e})})}function oM(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}function kR(t){const[e,n]=A.useState(0),r=(i,o)=>{n(o)};return C.jsxs(Bs,{sx:{width:"100%"},children:[C.jsx(Bs,{sx:{borderBottom:1,borderColor:"divider"},children:C.jsxs(Dte,{value:e,onChange:r,"aria-label":"basic tabs example",children:[C.jsx(tM,{label:"Metadata",...oM(0)}),C.jsx(tM,{label:"Raw File",...oM(1)}),t.showCompare&&C.jsx(tM,{label:"Comparison",...oM(2)})]})}),C.jsx(iM,{value:e,index:0,children:C.jsx($te,{standard:t.standard,showDownload:t.showDownload})}),C.jsx(iM,{value:e,index:1,children:C.jsx(Wte,{})}),t.showCompare&&C.jsx(iM,{value:e,index:2,children:C.jsx(Xte,{})})]})}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 wc=function(){return wc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{s==null||s.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:C.jsx("div",{className:"symbol",style:{color:t.has(a.Symbol)?n:e,fontSize:"small",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a.Symbol})}):C.jsx("div",{})}}function ane(t){const e=(a,l)=>{t.onClickElement(l.Symbol)},n=mu(),r=n.palette.background.default,i=n.palette.primary.main,o=n.palette.primary.contrastText,s=n.palette.primary.dark;return C.jsx(Bs,{sx:{bgcolor:r},children:C.jsx(Kte,{onClick:e,Element:sne({availableElements:t.availableElements,backgroundColor:i,textColor:o,disabledColor:s}),squareSize:t.elementSize,margin:0})})}function lne(t){const e=t.availableElements,[n,r]=A.useState(null),i=mu(),o=Oz(i.breakpoints.down("lg")),s=f=>{r(f.currentTarget)},a=()=>{r(null)},l=!!n,c=l?"simple-popover":void 0,u=o?30:55;return C.jsxs(rs,{direction:"row",spacing:2,children:[C.jsxs(u6,{children:[C.jsx(h6,{id:"Element",children:"Element"}),C.jsxs(IR,{sx:{minWidth:150},labelId:"Element",id:"Element",value:t.selectedElement,label:"Element",onChange:f=>t.setSelectedElement(f.target.value),children:[C.jsx(g4,{value:"all",children:"All Elements"}),[...e].map((f,h)=>C.jsx(g4,{value:f,children:f},h))]})]}),C.jsx(ou,{"aria-describedby":c,variant:"outlined",sx:{textTransform:"none"},onClick:s,children:"Periodic Table"}),C.jsx(x6,{id:c,open:l,anchorEl:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:C.jsx(ane,{availableElements:t.availableElements,onClickElement:f=>{t.availableElements.has(f)&&t.setSelectedElement(f),r(null)},elementSize:u})})]})}const Qa=7,Vh=qe(Ts)(({theme:t})=>({[`&.${gm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${gm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),cne=qe(Yb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function une(t){var n,r,i,o,s;const e=t.xasstandard===t.selected?"activeclicked":"";return C.jsxs(cne,{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:[C.jsx(Vh,{align:"left",children:((n=t.xasstandard)==null?void 0:n.element.symbol)??" "}),C.jsx(Vh,{align:"center",children:((r=t.xasstandard)==null?void 0:r.edge.name)??""}),C.jsx(Vh,{align:"center",children:((i=t.xasstandard)==null?void 0:i.sample.name)??""}),C.jsx(Vh,{align:"center",children:((o=t.xasstandard)==null?void 0:o.sample.prep)??""}),C.jsx(Vh,{align:"right",children:((s=t.xasstandard)==null?void 0:s.beamline.name)??""})]},t.key)}function fne(t){const[e,n]=A.useState(-1),r=()=>{t.setOffset(t.offset+Qa)},i=()=>{t.setOffset(t.offset-Qa)},o=a=>{t.updatePlot(a.location),t.setSelectedStandard(a)};let s=[...t.standards];if(s.length<=Qa)for(;s.lengthune({key:l,xasstandard:a,selected:t.selectedStandard,updatePlot:o,selectedRow:e,setSelectedRow:n}))})]})}),C.jsxs(rs,{direction:"row",spacing:2,children:[C.jsx(ou,{variant:"contained",disabled:t.offset===0,onClick:i,children:"<"}),C.jsx(ou,{variant:"contained",disabled:t.standards.length"})]})]})}function dne(t){const[e,n]=A.useState(),[r,i]=A.useState("all"),[o,s]=A.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),s(0)};return C.jsxs(rs,{spacing:2,children:[C.jsx(lne,{availableElements:l,selectedElement:r,setSelectedElement:u}),C.jsx(fne,{standards:c,updatePlot:t.updatePlot,selectedStandard:e,setSelectedStandard:n,offset:o,setOffset:s}),e&&C.jsx(kR,{standard:e,showDownload:!0,showCompare:!0})]})}class hne{constructor(e,n,r,i){Vt(this,"namespace");Vt(this,"tag");Vt(this,"value");Vt(this,"unit");this.namespace=e,this.tag=n,this.value=r,this.unit=i}}const ht=class ht{constructor(e,n,r,i,o,s,a,l,c,u){Vt(this,"element");Vt(this,"edge");Vt(this,"sample");Vt(this,"beamline");Vt(this,"date");Vt(this,"columns");Vt(this,"comments");Vt(this,"data");Vt(this,"raw");Vt(this,"id");this.element=e,this.edge=n,this.sample=r,this.beamline=i,this.date=o,this.columns=s,this.comments=a,this.data=l,this.raw=c,this.id=u}static parseFile(e,n){const r=e.split(` +`),Mo.rippleVisible,cK,Y2,({theme:t})=>t.transitions.easing.easeInOut,Mo.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Mo.child,Mo.childLeaving,uK,Y2,({theme:t})=>t.transitions.easing.easeInOut,Mo.childPulsate,fK,({theme:t})=>t.transitions.easing.easeInOut),pK=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Qe(r,aK),[l,c]=A.useState([]),u=A.useRef(0),f=A.useRef(null);A.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=A.useRef(!1),m=Bz(),v=A.useRef(null),x=A.useRef(null),y=A.useCallback(S=>{const{pulsate:P,rippleX:N,rippleY:T,rippleSize:L,cb:U}=S;c(M=>[...M,C.jsx(hK,{classes:{ripple:st(o.ripple,Mo.ripple),rippleVisible:st(o.rippleVisible,Mo.rippleVisible),ripplePulsate:st(o.ripplePulsate,Mo.ripplePulsate),child:st(o.child,Mo.child),childLeaving:st(o.childLeaving,Mo.childLeaving),childPulsate:st(o.childPulsate,Mo.childPulsate)},timeout:Y2,pulsate:P,rippleX:N,rippleY:T,rippleSize:L},u.current)]),u.current+=1,f.current=U},[o]),g=A.useCallback((S={},P={},N=()=>{})=>{const{pulsate:T=!1,center:L=i||P.pulsate,fakeElement:U=!1}=P;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 M=U?null:x.current,R=M?M.getBoundingClientRect():{width:0,height:0,left:0,top:0};let D,O,B;if(L||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)D=Math.round(R.width/2),O=Math.round(R.height/2);else{const{clientX:X,clientY:H}=S.touches&&S.touches.length>0?S.touches[0]:S;D=Math.round(X-R.left),O=Math.round(H-R.top)}if(L)B=Math.sqrt((2*R.width**2+R.height**2)/3),B%2===0&&(B+=1);else{const X=Math.max(Math.abs((M?M.clientWidth:0)-D),D)*2+2,H=Math.max(Math.abs((M?M.clientHeight:0)-O),O)*2+2;B=Math.sqrt(X**2+H**2)}S!=null&&S.touches?v.current===null&&(v.current=()=>{y({pulsate:T,rippleX:D,rippleY:O,rippleSize:B,cb:N})},m.start(lK,()=>{v.current&&(v.current(),v.current=null)})):y({pulsate:T,rippleX:D,rippleY:O,rippleSize:B,cb:N})},[i,y,m]),b=A.useCallback(()=>{g({},{pulsate:!0})},[g]),_=A.useCallback((S,P)=>{if(m.clear(),(S==null?void 0:S.type)==="touchend"&&v.current){v.current(),v.current=null,m.start(0,()=>{_(S,P)});return}v.current=null,c(N=>N.length>0?N.slice(1):N),f.current=P},[m]);return A.useImperativeHandle(n,()=>({pulsate:b,start:g,stop:_}),[b,g,_]),C.jsx(dK,W({className:st(Mo.root,o.root,s),ref:x},a,{children:C.jsx(MR,{component:null,exit:!0,children:l})}))});function mK(t){return Tt("MuiButtonBase",t)}const gK=Ct("MuiButtonBase",["root","disabled","focusVisible"]),vK=["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"],yK=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,s=Rt({root:["root",e&&"disabled",n&&"focusVisible"]},mK,i);return n&&r&&(s.root+=` ${r}`),s},xK=qe("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"},[`&.${gK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),vu=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:v,onClick:x,onContextMenu:y,onDragLeave:g,onFocus:b,onFocusVisible:_,onKeyDown:S,onKeyUp:P,onMouseDown:N,onMouseLeave:T,onMouseUp:L,onTouchEnd:U,onTouchMove:M,onTouchStart:R,tabIndex:D=0,TouchRippleProps:O,touchRippleRef:B,type:X}=r,H=Qe(r,vK),Z=A.useRef(null),F=A.useRef(null),Y=_r(F,B),{isFocusVisibleRef:K,onFocus:ee,onBlur:me,ref:le}=jz(),[Q,ae]=A.useState(!1);c&&Q&&ae(!1),A.useImperativeHandle(i,()=>({focusVisible:()=>{ae(!0),Z.current.focus()}}),[]);const[ge,Me]=A.useState(!1);A.useEffect(()=>{Me(!0)},[]);const tt=ge&&!u&&!c;A.useEffect(()=>{Q&&h&&!u&&ge&&F.current.pulsate()},[u,h,Q,ge]);function He(ze,Le,Xe=f){return va(xt=>(Le&&Le(xt),!Xe&&F.current&&F.current[ze](xt),!0))}const rt=He("start",N),Ve=He("stop",y),se=He("stop",g),j=He("stop",L),ye=He("stop",ze=>{Q&&ze.preventDefault(),T&&T(ze)}),xe=He("start",R),Re=He("stop",U),Pe=He("stop",M),Ee=He("stop",ze=>{me(ze),K.current===!1&&ae(!1),v&&v(ze)},!1),De=va(ze=>{Z.current||(Z.current=ze.currentTarget),ee(ze),K.current===!0&&(ae(!0),_&&_(ze)),b&&b(ze)}),$=()=>{const ze=Z.current;return l&&l!=="button"&&!(ze.tagName==="A"&&ze.href)},z=A.useRef(!1),re=va(ze=>{h&&!z.current&&Q&&F.current&&ze.key===" "&&(z.current=!0,F.current.stop(ze,()=>{F.current.start(ze)})),ze.target===ze.currentTarget&&$()&&ze.key===" "&&ze.preventDefault(),S&&S(ze),ze.target===ze.currentTarget&&$()&&ze.key==="Enter"&&!c&&(ze.preventDefault(),x&&x(ze))}),he=va(ze=>{h&&ze.key===" "&&F.current&&Q&&!ze.defaultPrevented&&(z.current=!1,F.current.stop(ze,()=>{F.current.pulsate(ze)})),P&&P(ze),x&&ze.target===ze.currentTarget&&$()&&ze.key===" "&&!ze.defaultPrevented&&x(ze)});let pe=l;pe==="button"&&(H.href||H.to)&&(pe=m);const be={};pe==="button"?(be.type=X===void 0?"button":X,be.disabled=c):(!H.href&&!H.to&&(be.role="button"),c&&(be["aria-disabled"]=c));const Ge=_r(n,le,Z),Fe=W({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:D,focusVisible:Q}),Ne=yK(Fe);return C.jsxs(xK,W({as:pe,className:st(Ne.root,a),ownerState:Fe,onBlur:Ee,onClick:x,onContextMenu:Ve,onFocus:De,onKeyDown:re,onKeyUp:he,onMouseDown:rt,onMouseLeave:ye,onMouseUp:j,onDragLeave:se,onTouchEnd:Re,onTouchMove:Pe,onTouchStart:xe,ref:Ge,tabIndex:c?-1:D,type:X},be,H,{children:[s,tt?C.jsx(pK,W({ref:Y,center:o},O)):null]}))});function bK(t){return Tt("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 _K=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],wK=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=t,a={root:["root",o,t.align!=="inherit"&&`align${bt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Rt(a,bK,s)},SK=qe("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})),n4={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},MK={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},EK=t=>MK[t]||t,sr=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTypography"}),i=EK(r.color),o=sg(W({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=n4}=o,v=Qe(o,_K),x=W({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:f,variant:h,variantMapping:m}),y=l||(f?"p":m[h]||n4[h])||"span",g=wK(x);return C.jsx(SK,W({as:y,ref:n,ownerState:x,className:st(g.root,a)},v))});function CK(t){return Tt("MuiAppBar",t)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const TK=["className","color","enableColorOnDark","position"],RK=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${bt(e)}`,`position${bt(n)}`]};return Rt(i,CK,r)},tv=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,AK=qe(gu,{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:tv(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:tv(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:tv(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:tv(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"}))}),PK=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=Qe(r,TK),c=W({},r,{color:o,position:a,enableColorOnDark:s}),u=RK(c);return C.jsx(AK,W({square:!0,component:"header",ownerState:c,elevation:4,className:st(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function NK(t){return typeof t=="function"?t():t}const IK=A.forwardRef(function(e,n){const{children:r,container:i,disablePortal:o=!1}=e,[s,a]=A.useState(null),l=_r(A.isValidElement(r)?r.ref:null,n);if(ko(()=>{o||a(NK(i)||document.body)},[i,o]),ko(()=>{if(s&&!o)return $2(n,s),()=>{$2(n,null)}},[n,s,o]),o){if(A.isValidElement(r)){const c={ref:l};return A.cloneElement(r,c)}return C.jsx(A.Fragment,{children:r})}return C.jsx(A.Fragment,{children:s&&Bl.createPortal(r,s)})}),LK=["onChange","maxRows","minRows","style","value"];function nv(t){return parseInt(t,10)||0}const kK={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function OK(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const DK=A.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=e,l=Qe(e,LK),{current:c}=A.useRef(a!=null),u=A.useRef(null),f=_r(n,u),h=A.useRef(null),m=A.useRef(null),v=A.useCallback(()=>{const g=u.current,_=Aa(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 P=_.boxSizing,N=nv(_.paddingBottom)+nv(_.paddingTop),T=nv(_.borderBottomWidth)+nv(_.borderTopWidth),L=S.scrollHeight;S.value="x";const U=S.scrollHeight;let M=L;o&&(M=Math.max(Number(o)*U,M)),i&&(M=Math.min(Number(i)*U,M)),M=Math.max(M,U);const R=M+(P==="border-box"?N+T:0),D=Math.abs(M-L)<=1;return{outerHeightStyle:R,overflowing:D}},[i,o,e.placeholder]),x=A.useCallback(()=>{const g=v();if(OK(g))return;const b=g.outerHeightStyle,_=u.current;h.current!==b&&(h.current=b,_.style.height=`${b}px`),_.style.overflow=g.overflowing?"hidden":""},[v]);ko(()=>{const g=()=>{x()};let b;const _=Bb(g),S=u.current,P=Aa(S);P.addEventListener("resize",_);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(g),N.observe(S)),()=>{_.clear(),cancelAnimationFrame(b),P.removeEventListener("resize",_),N&&N.disconnect()}},[v,x]),ko(()=>{x()});const y=g=>{c||x(),r&&r(g)};return C.jsxs(A.Fragment,{children:[C.jsx("textarea",W({value:a,onChange:y,ref:f,rows:o,style:s},l)),C.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:W({},kK.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function Xd({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 ER=A.createContext(void 0);function yu(){return A.useContext(ER)}function l6(t){return C.jsx(TX,W({},t,{defaultTheme:_R,themeId:gd}))}function r4(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function M1(t,e=!1){return t&&(r4(t.value)&&t.value!==""||e&&r4(t.defaultValue)&&t.defaultValue!=="")}function FK(t){return t.startAdornment}function zK(t){return Tt("MuiInputBase",t)}const bd=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),UK=["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"],Wb=(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]},Hb=(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]},BK=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:v}=t,x={root:["root",`color${bt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&h!=="medium"&&`size${bt(h)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return Rt(x,zK,e)},Gb=qe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Wb})(({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",[`&.${bd.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%"})),Xb=qe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Hb})(({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"},o=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] + .${bd.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${bd.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"})}),jK=C.jsx(l6,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),CR=A.forwardRef(function(e,n){var r;const i=At({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:v,fullWidth:x=!1,id:y,inputComponent:g="input",inputProps:b={},inputRef:_,maxRows:S,minRows:P,multiline:N=!1,name:T,onBlur:L,onChange:U,onClick:M,onFocus:R,onKeyDown:D,onKeyUp:O,placeholder:B,readOnly:X,renderSuffix:H,rows:Z,slotProps:F={},slots:Y={},startAdornment:K,type:ee="text",value:me}=i,le=Qe(i,UK),Q=b.value!=null?b.value:me,{current:ae}=A.useRef(Q!=null),ge=A.useRef(),Me=A.useCallback(Ne=>{},[]),tt=_r(ge,_,b.ref,Me),[He,rt]=A.useState(!1),Ve=yu(),se=Xd({props:i,muiFormControl:Ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});se.focused=Ve?Ve.focused:He,A.useEffect(()=>{!Ve&&h&&He&&(rt(!1),L&&L())},[Ve,h,He,L]);const j=Ve&&Ve.onFilled,ye=Ve&&Ve.onEmpty,xe=A.useCallback(Ne=>{M1(Ne)?j&&j():ye&&ye()},[j,ye]);ko(()=>{ae&&xe({value:Q})},[Q,xe,ae]);const Re=Ne=>{if(se.disabled){Ne.stopPropagation();return}R&&R(Ne),b.onFocus&&b.onFocus(Ne),Ve&&Ve.onFocus?Ve.onFocus(Ne):rt(!0)},Pe=Ne=>{L&&L(Ne),b.onBlur&&b.onBlur(Ne),Ve&&Ve.onBlur?Ve.onBlur(Ne):rt(!1)},Ee=(Ne,...ze)=>{if(!ae){const Le=Ne.target||ge.current;if(Le==null)throw new Error(Ra(1));xe({value:Le.value})}b.onChange&&b.onChange(Ne,...ze),U&&U(Ne,...ze)};A.useEffect(()=>{xe(ge.current)},[]);const De=Ne=>{ge.current&&Ne.currentTarget===Ne.target&&ge.current.focus(),M&&M(Ne)};let $=g,z=b;N&&$==="input"&&(Z?z=W({type:void 0,minRows:Z,maxRows:Z},z):z=W({type:void 0,maxRows:S,minRows:P},z),$=DK);const re=Ne=>{xe(Ne.animationName==="mui-auto-fill-cancel"?ge.current:{value:"x"})};A.useEffect(()=>{Ve&&Ve.setAdornedStart(!!K)},[Ve,K]);const he=W({},i,{color:se.color||"primary",disabled:se.disabled,endAdornment:v,error:se.error,focused:se.focused,formControl:Ve,fullWidth:x,hiddenLabel:se.hiddenLabel,multiline:N,size:se.size,startAdornment:K,type:ee}),pe=BK(he),be=Y.root||c.Root||Gb,Ge=F.root||u.root||{},Fe=Y.input||c.Input||Xb;return z=W({},z,(r=F.input)!=null?r:u.input),C.jsxs(A.Fragment,{children:[!m&&jK,C.jsxs(be,W({},Ge,!xd(be)&&{ownerState:W({},he,Ge.ownerState)},{ref:n,onClick:De},le,{className:st(pe.root,Ge.className,l,X&&"MuiInputBase-readOnly"),children:[K,C.jsx(ER.Provider,{value:null,children:C.jsx(Fe,W({ownerState:he,"aria-invalid":se.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:f,disabled:se.disabled,id:y,onAnimationStart:re,name:T,placeholder:B,readOnly:X,required:se.required,rows:Z,value:Q,onKeyDown:D,onKeyUp:O,type:ee},z,!xd(Fe)&&{as:$,ownerState:W({},he,z.ownerState)},{ref:tt,className:st(pe.input,z.className,X&&"MuiInputBase-readOnly"),onBlur:Pe,onChange:Ee,onFocus:Re}))}),v,H?H(W({},se,{startAdornment:K})):null]}))]})});function VK(t){return Tt("MuiInput",t)}const Fh=W({},bd,Ct("MuiInput",["root","underline","input"]));function $K(t){return Tt("MuiOutlinedInput",t)}const Za=W({},bd,Ct("MuiOutlinedInput",["root","notchedOutline","input"]));function WK(t){return Tt("MuiFilledInput",t)}const nc=W({},bd,Ct("MuiFilledInput",["root","underline","input"])),HK=Gd(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),GK=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],XK={entering:{opacity:1},entered:{opacity:1}},qK=A.forwardRef(function(e,n){const r=mu(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:v,onExiting:x,style:y,timeout:g=i,TransitionComponent:b=Hs}=e,_=Qe(e,GK),S=A.useRef(null),P=_r(S,a.ref,n),N=B=>X=>{if(B){const H=S.current;X===void 0?B(H):B(H,X)}},T=N(h),L=N((B,X)=>{a6(B);const H=S1({style:y,timeout:g,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",H),B.style.transition=r.transitions.create("opacity",H),u&&u(B,X)}),U=N(f),M=N(x),R=N(B=>{const X=S1({style:y,timeout:g,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",X),B.style.transition=r.transitions.create("opacity",X),m&&m(B)}),D=N(v),O=B=>{o&&o(S.current,B)};return C.jsx(b,W({appear:s,in:c,nodeRef:S,onEnter:L,onEntered:U,onEntering:T,onExit:R,onExited:D,onExiting:M,addEndListener:O,timeout:g},_,{children:(B,X)=>A.cloneElement(a,W({style:W({opacity:0,visibility:B==="exited"&&!c?"hidden":void 0},XK[B],y,a.props.style),ref:P},X))}))});function YK(t){return Tt("MuiBackdrop",t)}Ct("MuiBackdrop",["root","invisible"]);const KK=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],ZK=t=>{const{classes:e,invisible:n}=t;return Rt({root:["root",n&&"invisible"]},YK,e)},JK=qe("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"})),QK=A.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:f={},invisible:h=!1,open:m,slotProps:v={},slots:x={},TransitionComponent:y=qK,transitionDuration:g}=s,b=Qe(s,KK),_=W({},s,{component:c,invisible:h}),S=ZK(_),P=(r=v.root)!=null?r:f.root;return C.jsx(y,W({in:m,timeout:g},b,{children:C.jsx(JK,W({"aria-hidden":!0},P,{as:(i=(o=x.root)!=null?o:u.Root)!=null?i:c,className:st(S.root,l,P==null?void 0:P.className),ownerState:W({},_,P==null?void 0:P.ownerState),classes:S,ref:n,children:a}))}))}),eZ=Ct("MuiBox",["root"]),tZ=bR(),Bs=LX({themeId:gd,defaultTheme:tZ,defaultClassName:eZ.root,generateClassName:Ez.generate});function nZ(t){return Tt("MuiButton",t)}const rv=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"]),rZ=A.createContext({}),iZ=A.createContext(void 0),oZ=["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:o,classes:s}=t,a={root:["root",o,`${o}${bt(e)}`,`size${bt(i)}`,`${o}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=Rt(a,nZ,s);return W({},s,l)},c6=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}}),aZ=qe(vu,{shouldForwardProp:t=>pi(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],o=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})`:Rn(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})`:Rn(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})`:Rn(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:o,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]}),[`&.${rv.focusVisible}`]:W({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${rv.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 ${Rn(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"},[`&.${rv.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${rv.disabled}`]:{boxShadow:"none"}}),lZ=qe("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},c6(t))),cZ=qe("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},c6(t))),ou=A.forwardRef(function(e,n){const r=A.useContext(rZ),i=A.useContext(iZ),o=pm(r,e),s=At({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:x,fullWidth:y=!1,size:g="medium",startIcon:b,type:_,variant:S="text"}=s,P=Qe(s,oZ),N=W({},s,{color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:y,size:g,type:_,variant:S}),T=sZ(N),L=b&&C.jsx(lZ,{className:T.startIcon,ownerState:N,children:b}),U=v&&C.jsx(cZ,{className:T.endIcon,ownerState:N,children:v}),M=i||"";return C.jsxs(aZ,W({ownerState:N,className:st(r.className,T.root,u,M),component:c,disabled:f,focusRipple:!m,focusVisibleClassName:st(T.focusVisible,x),ref:n,type:_},P,{classes:T,children:[L,a,U]}))});function uZ(t){return Tt("MuiCard",t)}Ct("MuiCard",["root"]);const fZ=["className","raised"],dZ=t=>{const{classes:e}=t;return Rt({root:["root"]},uZ,e)},hZ=qe(gu,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),pZ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Qe(r,fZ),a=W({},r,{raised:o}),l=dZ(a);return C.jsx(hZ,W({className:st(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))});function mZ(t){return Tt("MuiCardActions",t)}Ct("MuiCardActions",["root","spacing"]);const gZ=["disableSpacing","className"],vZ=t=>{const{classes:e,disableSpacing:n}=t;return Rt({root:["root",!n&&"spacing"]},mZ,e)},yZ=qe("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}})),xZ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:o}=r,s=Qe(r,gZ),a=W({},r,{disableSpacing:i}),l=vZ(a);return C.jsx(yZ,W({className:st(l.root,o),ownerState:a,ref:n},s))});function bZ(t){return Tt("MuiCardContent",t)}Ct("MuiCardContent",["root"]);const _Z=["className","component"],wZ=t=>{const{classes:e}=t;return Rt({root:["root"]},bZ,e)},SZ=qe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),MZ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardContent"}),{className:i,component:o="div"}=r,s=Qe(r,_Z),a=W({},r,{component:o}),l=wZ(a);return C.jsx(SZ,W({as:o,className:st(l.root,i),ownerState:a,ref:n},s))});function EZ(t){return Tt("PrivateSwitchBase",t)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const CZ=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],TZ=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${bt(i)}`],input:["input"]};return Rt(o,EZ,e)},RZ=qe(vu)(({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})),AZ=qe("input",{shouldForwardProp:pi})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),PZ=A.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:h,inputProps:m,inputRef:v,name:x,onBlur:y,onChange:g,onFocus:b,readOnly:_,required:S=!1,tabIndex:P,type:N,value:T}=e,L=Qe(e,CZ),[U,M]=W2({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),R=yu(),D=Y=>{b&&b(Y),R&&R.onFocus&&R.onFocus(Y)},O=Y=>{y&&y(Y),R&&R.onBlur&&R.onBlur(Y)},B=Y=>{if(Y.nativeEvent.defaultPrevented)return;const K=Y.target.checked;M(K),g&&g(Y,K)};let X=l;R&&typeof X>"u"&&(X=R.disabled);const H=N==="checkbox"||N==="radio",Z=W({},e,{checked:U,disabled:X,disableFocusRipple:c,edge:u}),F=TZ(Z);return C.jsxs(RZ,W({component:"span",className:st(F.root,s),centerRipple:!0,focusRipple:!c,disabled:X,tabIndex:null,role:void 0,onFocus:D,onBlur:O,ownerState:Z,ref:n},L,{children:[C.jsx(AZ,W({autoFocus:r,checked:i,defaultChecked:a,className:F.input,disabled:X,id:H?h:void 0,name:x,onChange:B,readOnly:_,ref:v,required:S,ownerState:Z,tabIndex:P,type:N},N==="checkbox"&&T===void 0?{}:{value:T},m)),U?o:f]}))}),NZ=Gd(C.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"),IZ=Gd(C.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"),LZ=Gd(C.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 kZ(t){return Tt("MuiCheckbox",t)}const KS=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),OZ=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],DZ=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,o={root:["root",n&&"indeterminate",`color${bt(r)}`,`size${bt(i)}`]},s=Rt(o,kZ,e);return W({},e,s)},FZ=qe(PZ,{shouldForwardProp:t=>pi(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})`:Rn(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${KS.checked}, &.${KS.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${KS.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),zZ=C.jsx(IZ,{}),UZ=C.jsx(NZ,{}),BZ=C.jsx(LZ,{}),jZ=A.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiCheckbox"}),{checkedIcon:s=zZ,color:a="primary",icon:l=UZ,indeterminate:c=!1,indeterminateIcon:u=BZ,inputProps:f,size:h="medium",className:m}=o,v=Qe(o,OZ),x=c?u:l,y=c?u:s,g=W({},o,{color:a,indeterminate:c,size:h}),b=DZ(g);return C.jsx(FZ,W({type:"checkbox",inputProps:W({"data-indeterminate":c},f),icon:A.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:h}),checkedIcon:A.cloneElement(y,{fontSize:(i=y.props.fontSize)!=null?i:h}),ownerState:g,ref:n,className:st(b.root,m)},v,{classes:b}))}),VZ=Pq({createStyledComponent:qe("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=>At({props:t,name:"MuiContainer"})}),$Z=(t,e)=>W({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),WZ=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}}),HZ=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([s,a])=>{var l;r[t.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=W({html:$Z(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:W({margin:0},WZ(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const o=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function GZ(t){const e=At({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return C.jsxs(A.Fragment,{children:[C.jsx(l6,{styles:i=>HZ(i,r)}),n]})}function XZ(t){const e=Li(t);return e.body===t?Aa(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Tp(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function i4(t){return parseInt(Aa(t).getComputedStyle(t).paddingRight,10)||0}function qZ(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 o4(t,e,n,r,i){const o=[e,n,...r];[].forEach.call(t.children,s=>{const a=o.indexOf(s)===-1,l=!qZ(s);a&&l&&Tp(s,i)})}function ZS(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function YZ(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(XZ(r)){const s=Vz(Li(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${i4(r)+s}px`;const a=Li(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${i4(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Li(r).body;else{const s=r.parentElement,a=Aa(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function KZ(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class ZZ{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&&Tp(e.modalRef,!1);const i=KZ(n);o4(n,e.mount,e.modalRef,i,!0);const o=ZS(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=ZS(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=YZ(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=ZS(this.containers,s=>s.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&Tp(e.modalRef,n),o4(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Tp(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const JZ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function QZ(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 eJ(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 tJ(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||eJ(t))}function nJ(t){const e=[],n=[];return Array.from(t.querySelectorAll(JZ)).forEach((r,i)=>{const o=QZ(r);o===-1||!tJ(r)||(o===0?e.push(r):n.push({documentOrder:i,tabIndex:o,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 rJ(){return!0}function iJ(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=nJ,isEnabled:s=rJ,open:a}=t,l=A.useRef(!1),c=A.useRef(null),u=A.useRef(null),f=A.useRef(null),h=A.useRef(null),m=A.useRef(!1),v=A.useRef(null),x=_r(e.ref,v),y=A.useRef(null);A.useEffect(()=>{!a||!v.current||(m.current=!n)},[n,a]),A.useEffect(()=>{if(!a||!v.current)return;const _=Li(v.current);return v.current.contains(_.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),A.useEffect(()=>{if(!a||!v.current)return;const _=Li(v.current),S=T=>{y.current=T,!(r||!s()||T.key!=="Tab")&&_.activeElement===v.current&&T.shiftKey&&(l.current=!0,u.current&&u.current.focus())},P=()=>{const T=v.current;if(T===null)return;if(!_.hasFocus()||!s()||l.current){l.current=!1;return}if(T.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=o(v.current)),L.length>0){var U,M;const R=!!((U=y.current)!=null&&U.shiftKey&&((M=y.current)==null?void 0:M.key)==="Tab"),D=L[0],O=L[L.length-1];typeof D!="string"&&typeof O!="string"&&(R?O.focus():D.focus())}else T.focus()};_.addEventListener("focusin",P),_.addEventListener("keydown",S,!0);const N=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(N),_.removeEventListener("focusin",P),_.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);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 C.jsxs(A.Fragment,{children:[C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),A.cloneElement(e,{ref:x,onFocus:g}),C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}function oJ(t){return typeof t=="function"?t():t}function sJ(t){return t?t.props.hasOwnProperty("in"):!1}const aJ=new ZZ;function lJ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=aJ,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:f}=t,h=A.useRef({}),m=A.useRef(null),v=A.useRef(null),x=_r(v,f),[y,g]=A.useState(!u),b=sJ(l);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const S=()=>Li(m.current),P=()=>(h.current.modalRef=v.current,h.current.mount=m.current,h.current),N=()=>{i.mount(P(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},T=va(()=>{const H=oJ(e)||S().body;i.add(P(),H),v.current&&N()}),L=A.useCallback(()=>i.isTopModal(P()),[i]),U=va(H=>{m.current=H,H&&(u&&L()?N():v.current&&Tp(v.current,_))}),M=A.useCallback(()=>{i.remove(P(),_)},[_,i]);A.useEffect(()=>()=>{M()},[M]),A.useEffect(()=>{u?T():(!b||!o)&&M()},[u,M,b,o,T]);const R=H=>Z=>{var F;(F=H.onKeyDown)==null||F.call(H,Z),!(Z.key!=="Escape"||Z.which===229||!L())&&(n||(Z.stopPropagation(),c&&c(Z,"escapeKeyDown")))},D=H=>Z=>{var F;(F=H.onClick)==null||F.call(H,Z),Z.target===Z.currentTarget&&c&&c(Z,"backdropClick")};return{getRootProps:(H={})=>{const Z=Wz(t);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=W({},Z,H);return W({role:"presentation"},F,{onKeyDown:R(F),ref:x})},getBackdropProps:(H={})=>{const Z=H;return W({"aria-hidden":!0},Z,{onClick:D(Z),open:u})},getTransitionProps:()=>{const H=()=>{g(!1),s&&s()},Z=()=>{g(!0),a&&a(),o&&M()};return{onEnter:kI(H,l==null?void 0:l.props.onEnter),onExited:kI(Z,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:U,isTopModal:L,exited:y,hasTransition:b}}function cJ(t){return Tt("MuiModal",t)}Ct("MuiModal",["root","hidden","backdrop"]);const uJ=["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"],fJ=t=>{const{open:e,exited:n,classes:r}=t;return Rt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},cJ,r)},dJ=qe("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"})),hJ=qe(QK,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),pJ=A.forwardRef(function(e,n){var r,i,o,s,a,l;const c=At({name:"MuiModal",props:e}),{BackdropComponent:u=hJ,BackdropProps:f,className:h,closeAfterTransition:m=!1,children:v,container:x,component:y,components:g={},componentsProps:b={},disableAutoFocus:_=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:P=!1,disablePortal:N=!1,disableRestoreFocus:T=!1,disableScrollLock:L=!1,hideBackdrop:U=!1,keepMounted:M=!1,onBackdropClick:R,open:D,slotProps:O,slots:B}=c,X=Qe(c,uJ),H=W({},c,{closeAfterTransition:m,disableAutoFocus:_,disableEnforceFocus:S,disableEscapeKeyDown:P,disablePortal:N,disableRestoreFocus:T,disableScrollLock:L,hideBackdrop:U,keepMounted:M}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:Y,portalRef:K,isTopModal:ee,exited:me,hasTransition:le}=lJ(W({},H,{rootRef:n})),Q=W({},H,{exited:me}),ae=fJ(Q),ge={};if(v.props.tabIndex===void 0&&(ge.tabIndex="-1"),le){const{onEnter:j,onExited:ye}=Y();ge.onEnter=j,ge.onExited=ye}const Me=(r=(i=B==null?void 0:B.root)!=null?i:g.Root)!=null?r:dJ,tt=(o=(s=B==null?void 0:B.backdrop)!=null?s:g.Backdrop)!=null?o:u,He=(a=O==null?void 0:O.root)!=null?a:b.root,rt=(l=O==null?void 0:O.backdrop)!=null?l:b.backdrop,Ve=Us({elementType:Me,externalSlotProps:He,externalForwardedProps:X,getSlotProps:Z,additionalProps:{ref:n,as:y},ownerState:Q,className:st(h,He==null?void 0:He.className,ae==null?void 0:ae.root,!Q.open&&Q.exited&&(ae==null?void 0:ae.hidden))}),se=Us({elementType:tt,externalSlotProps:rt,additionalProps:f,getSlotProps:j=>F(W({},j,{onClick:ye=>{R&&R(ye),j!=null&&j.onClick&&j.onClick(ye)}})),className:st(rt==null?void 0:rt.className,f==null?void 0:f.className,ae==null?void 0:ae.backdrop),ownerState:Q});return!M&&!D&&(!le||me)?null:C.jsx(IK,{ref:K,container:x,disablePortal:N,children:C.jsxs(Me,W({},Ve,{children:[!U&&u?C.jsx(tt,W({},se)):null,C.jsx(iJ,{disableEnforceFocus:S,disableAutoFocus:_,disableRestoreFocus:T,isEnabled:ee,open:D,children:A.cloneElement(v,ge)})]}))})}),s4=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),mJ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],gJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},WK,e);return W({},e,i)},vJ=qe(Gb,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Wb(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)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=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:o,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:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${nc.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${nc.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"},[`&.${nc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${nc.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(.${nc.disabled}, .${nc.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${nc.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}))}),yJ=qe(Xb,{name:"MuiFilledInput",slot:"Input",overridesResolver:Hb})(({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})),TR=A.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:m,slots:v={},type:x="text"}=a,y=Qe(a,mJ),g=W({},a,{fullWidth:u,inputComponent:f,multiline:h,type:x}),b=gJ(a),_={root:{ownerState:g},input:{ownerState:g}},S=m??c?ui(_,m??c):_,P=(r=(i=v.root)!=null?i:l.Root)!=null?r:vJ,N=(o=(s=v.input)!=null?s:l.Input)!=null?o:yJ;return C.jsx(CR,W({slots:{root:P,input:N},componentsProps:S,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:x},y,{classes:b}))});TR.muiName="Input";function xJ(t){return Tt("MuiFormControl",t)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const bJ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],_J=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${bt(n)}`,r&&"fullWidth"]};return Rt(i,xJ,e)},wJ=qe("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%"})),u6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:v=!1,size:x="medium",variant:y="outlined"}=r,g=Qe(r,bJ),b=W({},r,{color:s,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:v,size:x,variant:y}),_=_J(b),[S,P]=A.useState(()=>{let O=!1;return i&&A.Children.forEach(i,B=>{if(!Iy(B,["Input","Select"]))return;const X=Iy(B,["Select"])?B.props.input:B;X&&FK(X.props)&&(O=!0)}),O}),[N,T]=A.useState(()=>{let O=!1;return i&&A.Children.forEach(i,B=>{Iy(B,["Input","Select"])&&(M1(B.props,!0)||M1(B.props.inputProps,!0))&&(O=!0)}),O}),[L,U]=A.useState(!1);l&&L&&U(!1);const M=u!==void 0&&!l?u:L;let R;const D=A.useMemo(()=>({adornedStart:S,setAdornedStart:P,color:s,disabled:l,error:c,filled:N,focused:M,fullWidth:f,hiddenLabel:h,size:x,onBlur:()=>{U(!1)},onEmpty:()=>{T(!1)},onFilled:()=>{T(!0)},onFocus:()=>{U(!0)},registerEffect:R,required:v,variant:y}),[S,s,l,c,N,M,f,h,R,v,x,y]);return C.jsx(ER.Provider,{value:D,children:C.jsx(wJ,W({as:a,ownerState:b,className:st(_.root,o),ref:n},g,{children:i}))})}),rs=zq({createStyledComponent:qe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>At({props:t,name:"MuiStack"})});function SJ(t){return Tt("MuiFormHelperText",t)}const a4=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var l4;const MJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],EJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=t,c={root:["root",i&&"disabled",o&&"error",r&&`size${bt(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Rt(c,SJ,e)},CJ=qe("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,[`&.${a4.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${a4.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),TJ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Qe(r,MJ),l=yu(),c=Xd({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=W({},r,{component:s,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=EJ(u);return C.jsx(CJ,W({as:s,ownerState:u,className:st(f.root,o),ref:n},a,{children:i===" "?l4||(l4=C.jsx("span",{className:"notranslate",children:"​"})):i}))});function RJ(t){return Tt("MuiFormLabel",t)}const Rp=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),AJ=["children","className","color","component","disabled","error","filled","focused","required"],PJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=t,l={root:["root",`color${bt(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return Rt(l,RJ,e)},NJ=qe("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",[`&.${Rp.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Rp.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Rp.error}`]:{color:(t.vars||t).palette.error.main}})),IJ=qe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Rp.error}`]:{color:(t.vars||t).palette.error.main}})),LJ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Qe(r,AJ),l=yu(),c=Xd({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=W({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=PJ(u);return C.jsxs(NJ,W({as:s,ownerState:u,className:st(f.root,o),ref:n},a,{children:[i,c.required&&C.jsxs(IJ,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),c4=A.createContext();function kJ(t){return Tt("MuiGrid",t)}const OJ=[0,1,2,3,4,5,6,7,8,9,10],DJ=["column-reverse","column","row-reverse","row"],FJ=["nowrap","wrap-reverse","wrap"],zh=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],mm=Ct("MuiGrid",["root","container","item","zeroMinWidth",...OJ.map(t=>`spacing-xs-${t}`),...DJ.map(t=>`direction-xs-${t}`),...FJ.map(t=>`wrap-xs-${t}`),...zh.map(t=>`grid-xs-${t}`),...zh.map(t=>`grid-sm-${t}`),...zh.map(t=>`grid-md-${t}`),...zh.map(t=>`grid-lg-${t}`),...zh.map(t=>`grid-xl-${t}`)]),zJ=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function id(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function UJ({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let o={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=Uc({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof s=="object"?s[i]:s;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} + ${id(u)})`;c={flexBasis:f,maxWidth:f}}}o=W({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,o):r[t.breakpoints.up(i)]=o,r},{})}function BJ({theme:t,ownerState:e}){const n=Uc({values:e.direction,breakpoints:t.breakpoints.values});return Di({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${mm.item}`]={maxWidth:"none"}),i})}function f6({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,o)=>t[i]-t[o]);return r.slice(0,r.indexOf(n))}function jJ({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const o=Uc({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=f6({breakpoints:t.breakpoints.values,values:o})),i=Di({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{marginTop:`-${id(u)}`,[`& > .${mm.item}`]:{paddingTop:id(u)}}:(c=s)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${mm.item}`]:{paddingTop:0}}})}return i}function VJ({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const o=Uc({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=f6({breakpoints:t.breakpoints.values,values:o})),i=Di({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{width:`calc(100% + ${id(u)})`,marginLeft:`-${id(u)}`,[`& > .${mm.item}`]:{paddingLeft:id(u)}}:(c=s)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${mm.item}`]:{paddingLeft:0}}})}return i}function $J(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 o=t[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const WJ=qe("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=$J(s,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,o&&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}),BJ,jJ,VJ,UJ);function HJ(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 o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const GJ=t=>{const{classes:e,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=HJ(o,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)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return Rt(f,kJ,e)},_a=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiGrid"}),{breakpoints:i}=mu(),o=sg(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:h=!1,rowSpacing:m,spacing:v=0,wrap:x="wrap",zeroMinWidth:y=!1}=o,g=Qe(o,zJ),b=m||v,_=l||v,S=A.useContext(c4),P=u?a||12:S,N={},T=W({},g);i.keys.forEach(M=>{g[M]!=null&&(N[M]=g[M],delete T[M])});const L=W({},o,{columns:P,container:u,direction:f,item:h,rowSpacing:b,columnSpacing:_,wrap:x,zeroMinWidth:y,spacing:v},N,{breakpoints:i.keys}),U=GJ(L);return C.jsx(c4.Provider,{value:P,children:C.jsx(WJ,W({ownerState:L,className:st(U.root,s),as:c,ref:n},T))})}),XJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function K2(t){return`scale(${t}, ${t**2})`}const qJ={entering:{opacity:1,transform:K2(1)},entered:{opacity:1,transform:"none"}},JS=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),d6=A.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:v,timeout:x="auto",TransitionComponent:y=Hs}=e,g=Qe(e,XJ),b=Bz(),_=A.useRef(),S=mu(),P=A.useRef(null),N=_r(P,o.ref,n),T=X=>H=>{if(X){const Z=P.current;H===void 0?X(Z):X(Z,H)}},L=T(u),U=T((X,H)=>{a6(X);const{duration:Z,delay:F,easing:Y}=S1({style:v,timeout:x,easing:s},{mode:"enter"});let K;x==="auto"?(K=S.transitions.getAutoHeightDuration(X.clientHeight),_.current=K):K=Z,X.style.transition=[S.transitions.create("opacity",{duration:K,delay:F}),S.transitions.create("transform",{duration:JS?K:K*.666,delay:F,easing:Y})].join(","),l&&l(X,H)}),M=T(c),R=T(m),D=T(X=>{const{duration:H,delay:Z,easing:F}=S1({style:v,timeout:x,easing:s},{mode:"exit"});let Y;x==="auto"?(Y=S.transitions.getAutoHeightDuration(X.clientHeight),_.current=Y):Y=H,X.style.transition=[S.transitions.create("opacity",{duration:Y,delay:Z}),S.transitions.create("transform",{duration:JS?Y:Y*.666,delay:JS?Z:Z||Y*.333,easing:F})].join(","),X.style.opacity=0,X.style.transform=K2(.75),f&&f(X)}),O=T(h),B=X=>{x==="auto"&&b.start(_.current||0,X),r&&r(P.current,X)};return C.jsx(y,W({appear:i,in:a,nodeRef:P,onEnter:U,onEntered:M,onEntering:L,onExit:D,onExited:O,onExiting:R,addEndListener:B,timeout:x==="auto"?null:x},g,{children:(X,H)=>A.cloneElement(o,W({style:W({opacity:0,transform:K2(.75),visibility:X==="exited"&&!a?"hidden":void 0},qJ[X],v,o.props.style),ref:N},H))}))});d6.muiSupportAuto=!0;const YJ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],KJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},VK,e);return W({},e,i)},ZJ=qe(Gb,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Wb(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"},[`&.${Fh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fh.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(.${Fh.disabled}, .${Fh.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Fh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),JJ=qe(Xb,{name:"MuiInput",slot:"Input",overridesResolver:Hb})({}),RR=A.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:m=!1,slotProps:v,slots:x={},type:y="text"}=a,g=Qe(a,YJ),b=KJ(a),S={root:{ownerState:{disableUnderline:l}}},P=v??u?ui(v??u,S):S,N=(r=(i=x.root)!=null?i:c.Root)!=null?r:ZJ,T=(o=(s=x.input)!=null?s:c.Input)!=null?o:JJ;return C.jsx(CR,W({slots:{root:N,input:T},slotProps:P,fullWidth:f,inputComponent:h,multiline:m,ref:n,type:y},g,{classes:b}))});RR.muiName="Input";function QJ(t){return Tt("MuiInputLabel",t)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const eQ=["disableAnimation","margin","shrink","variant","className"],tQ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=t,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${bt(r)}`,s],asterisk:[a&&"asterisk"]},c=Rt(l,QJ,e);return W({},e,c)},nQ=qe(LJ,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Rp.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)"}))),h6=A.forwardRef(function(e,n){const r=At({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Qe(r,eQ),l=yu();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Xd({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=tQ(f);return C.jsx(nQ,W({"data-shrink":c,ownerState:f,ref:n,className:st(h.root,s)},a,{classes:h}))});function rQ(t){return Tt("MuiLink",t)}const iQ=Ct("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),p6={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},oQ=t=>p6[t]||t,sQ=({theme:t,ownerState:e})=>{const n=oQ(e.color),r=yd(t,`palette.${n}`,!1)||e.color,i=yd(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:Rn(r,.4)},aQ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],lQ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,o={root:["root",`underline${bt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Rt(o,rQ,e)},cQ=qe(sr,{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"},[`&.${iQ.focusVisible}`]:{outline:"auto"}})),u4=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:f="inherit",sx:h}=r,m=Qe(r,aQ),{isFocusVisibleRef:v,onBlur:x,onFocus:y,ref:g}=jz(),[b,_]=A.useState(!1),S=_r(n,g),P=U=>{x(U),v.current===!1&&_(!1),a&&a(U)},N=U=>{y(U),v.current===!0&&_(!0),l&&l(U)},T=W({},r,{color:o,component:s,focusVisible:b,underline:u,variant:f}),L=lQ(T);return C.jsx(cQ,W({color:o,className:st(L.root,i),classes:c,component:s,onBlur:P,onFocus:N,ref:S,ownerState:T,variant:f,sx:[...Object.keys(p6).includes(o)?[]:[{color:o}],...Array.isArray(h)?h:[h]]},m))}),ks=A.createContext({});function uQ(t){return Tt("MuiList",t)}Ct("MuiList",["root","padding","dense","subheader"]);const fQ=["children","className","component","dense","disablePadding","subheader"],dQ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Rt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},uQ,e)},hQ=qe("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})),m6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=Qe(r,fQ),f=A.useMemo(()=>({dense:a}),[a]),h=W({},r,{component:s,dense:a,disablePadding:l}),m=dQ(h);return C.jsx(ks.Provider,{value:f,children:C.jsxs(hQ,W({as:s,className:st(m.root,o),ref:n,ownerState:h},u,{children:[c,i]}))})});function pQ(t){return Tt("MuiListItem",t)}const Sf=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function mQ(t){return Tt("MuiListItemButton",t)}const Mf=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),gQ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],vQ=(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]},yQ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=t,c=Rt({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},mQ,n);return W({},n,c)},xQ=qe(vu,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:vQ})(({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"}},[`&.${Mf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Mf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Mf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Rn(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})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Mf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Mf.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})),bQ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:h=!1,className:m}=r,v=Qe(r,gQ),x=A.useContext(ks),y=A.useMemo(()=>({dense:l||x.dense||!1,alignItems:i,disableGutters:c}),[i,x.dense,l,c]),g=A.useRef(null);ko(()=>{o&&g.current&&g.current.focus()},[o]);const b=W({},r,{alignItems:i,dense:y.dense,disableGutters:c,divider:u,selected:h}),_=yQ(b),S=_r(g,n);return C.jsx(ks.Provider,{value:y,children:C.jsx(xQ,W({ref:S,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:st(_.focusVisible,f),ownerState:b,className:st(_.root,m)},v,{classes:_,children:a}))})});function _Q(t){return Tt("MuiListItemSecondaryAction",t)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const wQ=["className"],SQ=t=>{const{disableGutters:e,classes:n}=t;return Rt({root:["root",e&&"disableGutters"]},_Q,n)},MQ=qe("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})),g6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Qe(r,wQ),s=A.useContext(ks),a=W({},r,{disableGutters:s.disableGutters}),l=SQ(a);return C.jsx(MQ,W({className:st(l.root,i),ownerState:a,ref:n},o))});g6.muiName="ListItemSecondaryAction";const EQ=["className"],CQ=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],TQ=(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]},RQ=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return Rt({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},pQ,r)},AQ=qe("div",{name:"MuiListItem",slot:"Root",overridesResolver:TQ})(({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&&{[`& > .${Mf.root}`]:{paddingRight:48}},{[`&.${Sf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Sf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Sf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Sf.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"}},[`&.${Sf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Rn(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})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),PQ=qe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),NQ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:f={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:v=!1,disabled:x=!1,disableGutters:y=!1,disablePadding:g=!1,divider:b=!1,focusVisibleClassName:_,secondaryAction:S,selected:P=!1,slotProps:N={},slots:T={}}=r,L=Qe(r.ContainerProps,EQ),U=Qe(r,CQ),M=A.useContext(ks),R=A.useMemo(()=>({dense:v||M.dense||!1,alignItems:i,disableGutters:y}),[i,M.dense,v,y]),D=A.useRef(null);ko(()=>{o&&D.current&&D.current.focus()},[o]);const O=A.Children.toArray(a),B=O.length&&Iy(O[O.length-1],["ListItemSecondaryAction"]),X=W({},r,{alignItems:i,autoFocus:o,button:s,dense:R.dense,disabled:x,disableGutters:y,disablePadding:g,divider:b,hasSecondaryAction:B,selected:P}),H=RQ(X),Z=_r(D,n),F=T.root||u.Root||AQ,Y=N.root||f.root||{},K=W({className:st(H.root,Y.className,l),disabled:x},U);let ee=c||"li";return s&&(K.component=c||"div",K.focusVisibleClassName=st(Sf.focusVisible,_),ee=vu),B?(ee=!K.component&&!c?"div":ee,h==="li"&&(ee==="li"?ee="div":K.component==="li"&&(K.component="div")),C.jsx(ks.Provider,{value:R,children:C.jsxs(PQ,W({as:h,className:st(H.container,m),ref:Z,ownerState:X},L,{children:[C.jsx(F,W({},Y,!xd(F)&&{as:ee,ownerState:W({},X,Y.ownerState)},K,{children:O})),O.pop()]}))})):C.jsx(ks.Provider,{value:R,children:C.jsxs(F,W({},Y,{as:ee,ref:Z},!xd(F)&&{ownerState:W({},X,Y.ownerState)},K,{children:[O,S&&C.jsx(g6,{children:S})]}))})}),f4=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]);function IQ(t){return Tt("MuiListItemText",t)}const E1=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),LQ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],kQ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:o}=t;return Rt({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},IQ,e)},OQ=qe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${E1.primary}`]:e.primary},{[`& .${E1.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})),DQ=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f}=r,h=Qe(r,LQ),{dense:m}=A.useContext(ks);let v=l??i,x=u;const y=W({},r,{disableTypography:s,inset:a,primary:!!v,secondary:!!x,dense:m}),g=kQ(y);return v!=null&&v.type!==sr&&!s&&(v=C.jsx(sr,W({variant:m?"body2":"body1",className:g.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:v}))),x!=null&&x.type!==sr&&!s&&(x=C.jsx(sr,W({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},f,{children:x}))),C.jsxs(OQ,W({className:st(g.root,o),ownerState:y,ref:n},h,{children:[v,x]}))}),FQ=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function QS(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function d4(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function v6(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 Uh(t,e,n,r,i,o){let s=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!v6(a,o)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const zQ=A.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu"}=e,h=Qe(e,FQ),m=A.useRef(null),v=A.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ko(()=>{i&&m.current.focus()},[i]),A.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:S})=>{const P=!m.current.style.width;if(_.clientHeight{const S=m.current,P=_.key,N=Li(S).activeElement;if(P==="ArrowDown")_.preventDefault(),Uh(S,N,c,l,QS);else if(P==="ArrowUp")_.preventDefault(),Uh(S,N,c,l,d4);else if(P==="Home")_.preventDefault(),Uh(S,null,c,l,QS);else if(P==="End")_.preventDefault(),Uh(S,null,c,l,d4);else if(P.length===1){const T=v.current,L=P.toLowerCase(),U=performance.now();T.keys.length>0&&(U-T.lastTime>500?(T.keys=[],T.repeating=!0,T.previousKeyMatched=!0):T.repeating&&L!==T.keys[0]&&(T.repeating=!1)),T.lastTime=U,T.keys.push(L);const M=N&&!T.repeating&&v6(N,T);T.previousKeyMatched&&(M||Uh(S,N,!1,l,QS,T))?_.preventDefault():T.previousKeyMatched=!1}u&&u(_)},y=_r(m,n);let g=-1;A.Children.forEach(s,(_,S)=>{if(!A.isValidElement(_)){g===S&&(g+=1,g>=s.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>=s.length&&(g=-1))});const b=A.Children.map(s,(_,S)=>{if(S===g){const P={};return o&&(P.autoFocus=!0),_.props.tabIndex===void 0&&f==="selectedMenu"&&(P.tabIndex=0),A.cloneElement(_,P)}return _});return C.jsx(m6,W({role:"menu",ref:y,className:a,onKeyDown:x,tabIndex:i?0:-1},h,{children:b}))});function UQ(t){return Tt("MuiPopover",t)}Ct("MuiPopover",["root","paper"]);const BQ=["onEntering"],jQ=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],VQ=["slotProps"];function h4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function p4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function m4(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function eM(t){return typeof t=="function"?t():t}const $Q=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"]},UQ,e)},WQ=qe(pJ,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),y6=qe(gu,{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}),x6=A.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:h,className:m,container:v,elevation:x=8,marginThreshold:y=16,open:g,PaperProps:b={},slots:_,slotProps:S,transformOrigin:P={vertical:"top",horizontal:"left"},TransitionComponent:N=d6,transitionDuration:T="auto",TransitionProps:{onEntering:L}={},disableScrollLock:U=!1}=s,M=Qe(s.TransitionProps,BQ),R=Qe(s,jQ),D=(r=S==null?void 0:S.paper)!=null?r:b,O=A.useRef(),B=_r(O,D.ref),X=W({},s,{anchorOrigin:c,anchorReference:f,elevation:x,marginThreshold:y,externalPaperSlotProps:D,transformOrigin:P,TransitionComponent:N,transitionDuration:T,TransitionProps:M}),H=$Q(X),Z=A.useCallback(()=>{if(f==="anchorPosition")return u;const j=eM(l),xe=(j&&j.nodeType===1?j:Li(O.current).body).getBoundingClientRect();return{top:xe.top+h4(xe,c.vertical),left:xe.left+p4(xe,c.horizontal)}},[l,c.horizontal,c.vertical,u,f]),F=A.useCallback(j=>({vertical:h4(j,P.vertical),horizontal:p4(j,P.horizontal)}),[P.horizontal,P.vertical]),Y=A.useCallback(j=>{const ye={width:j.offsetWidth,height:j.offsetHeight},xe=F(ye);if(f==="none")return{top:null,left:null,transformOrigin:m4(xe)};const Re=Z();let Pe=Re.top-xe.vertical,Ee=Re.left-xe.horizontal;const De=Pe+ye.height,$=Ee+ye.width,z=Aa(eM(l)),re=z.innerHeight-y,he=z.innerWidth-y;if(y!==null&&Pere){const pe=De-re;Pe-=pe,xe.vertical+=pe}if(y!==null&&Eehe){const pe=$-he;Ee-=pe,xe.horizontal+=pe}return{top:`${Math.round(Pe)}px`,left:`${Math.round(Ee)}px`,transformOrigin:m4(xe)}},[l,f,Z,F,y]),[K,ee]=A.useState(g),me=A.useCallback(()=>{const j=O.current;if(!j)return;const ye=Y(j);ye.top!==null&&(j.style.top=ye.top),ye.left!==null&&(j.style.left=ye.left),j.style.transformOrigin=ye.transformOrigin,ee(!0)},[Y]);A.useEffect(()=>(U&&window.addEventListener("scroll",me),()=>window.removeEventListener("scroll",me)),[l,U,me]);const le=(j,ye)=>{L&&L(j,ye),me()},Q=()=>{ee(!1)};A.useEffect(()=>{g&&me()}),A.useImperativeHandle(a,()=>g?{updatePosition:()=>{me()}}:null,[g,me]),A.useEffect(()=>{if(!g)return;const j=Bb(()=>{me()}),ye=Aa(l);return ye.addEventListener("resize",j),()=>{j.clear(),ye.removeEventListener("resize",j)}},[l,g,me]);let ae=T;T==="auto"&&!N.muiSupportAuto&&(ae=void 0);const ge=v||(l?Li(eM(l)).body:void 0),Me=(i=_==null?void 0:_.root)!=null?i:WQ,tt=(o=_==null?void 0:_.paper)!=null?o:y6,He=Us({elementType:tt,externalSlotProps:W({},D,{style:K?D.style:W({},D.style,{opacity:0})}),additionalProps:{elevation:x,ref:B},ownerState:X,className:st(H.paper,D==null?void 0:D.className)}),rt=Us({elementType:Me,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:R,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:ge,open:g},ownerState:X,className:st(H.root,m)}),{slotProps:Ve}=rt,se=Qe(rt,VQ);return C.jsx(Me,W({},se,!xd(Me)&&{slotProps:Ve,disableScrollLock:U},{children:C.jsx(N,W({appear:!0,in:g,onEntering:le,onExited:Q,timeout:ae},M,{children:C.jsx(tt,W({},He,{children:h}))}))}))});function HQ(t){return Tt("MuiMenu",t)}Ct("MuiMenu",["root","paper","list"]);const GQ=["onEntering"],XQ=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],qQ={vertical:"top",horizontal:"right"},YQ={vertical:"top",horizontal:"left"},KQ=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"],list:["list"]},HQ,e)},ZQ=qe(x6,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),JQ=qe(y6,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),QQ=qe(zQ,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),eee=A.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:f,open:h,PaperProps:m={},PopoverClasses:v,transitionDuration:x="auto",TransitionProps:{onEntering:y}={},variant:g="selectedMenu",slots:b={},slotProps:_={}}=o,S=Qe(o.TransitionProps,GQ),P=Qe(o,XQ),N=gR(),T=W({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:y,PaperProps:m,transitionDuration:x,TransitionProps:S,variant:g}),L=KQ(T),U=s&&!c&&h,M=A.useRef(null),R=(F,Y)=>{M.current&&M.current.adjustStyleForScrollbar(F,{direction:N?"rtl":"ltr"}),y&&y(F,Y)},D=F=>{F.key==="Tab"&&(F.preventDefault(),f&&f(F,"tabKeyDown"))};let O=-1;A.Children.map(a,(F,Y)=>{A.isValidElement(F)&&(F.props.disabled||(g==="selectedMenu"&&F.props.selected||O===-1)&&(O=Y))});const B=(r=b.paper)!=null?r:JQ,X=(i=_.paper)!=null?i:m,H=Us({elementType:b.root,externalSlotProps:_.root,ownerState:T,className:[L.root,l]}),Z=Us({elementType:B,externalSlotProps:X,ownerState:T,className:L.paper});return C.jsx(ZQ,W({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:N?"right":"left"},transformOrigin:N?qQ:YQ,slots:{paper:B,root:b.root},slotProps:{root:H,paper:Z},open:h,ref:n,transitionDuration:x,TransitionProps:W({onEntering:R},S),ownerState:T},P,{classes:v,children:C.jsx(QQ,W({onKeyDown:D,actions:M,autoFocus:s&&(O===-1||c),autoFocusItem:U,variant:g},u,{className:st(L.list,u.className),children:a}))}))});function tee(t){return Tt("MuiMenuItem",t)}const Bh=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),nee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],ree=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},iee=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=t,l=Rt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},tee,s);return W({},s,l)},oee=qe(vu,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:ree})(({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"}},[`&.${Bh.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Bh.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Bh.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Rn(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})`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Bh.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Bh.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${s4.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${s4.inset}`]:{marginLeft:52},[`& .${E1.root}`]:{marginTop:0,marginBottom:0},[`& .${E1.inset}`]:{paddingLeft:36},[`& .${f4.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&W({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${f4.root} svg`]:{fontSize:"1.25rem"}}))),g4=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:h}=r,m=Qe(r,nee),v=A.useContext(ks),x=A.useMemo(()=>({dense:s||v.dense||!1,disableGutters:l}),[v.dense,s,l]),y=A.useRef(null);ko(()=>{i&&y.current&&y.current.focus()},[i]);const g=W({},r,{dense:x.dense,divider:a,disableGutters:l}),b=iee(r),_=_r(y,n);let S;return r.disabled||(S=f!==void 0?f:-1),C.jsx(ks.Provider,{value:x,children:C.jsx(oee,W({ref:_,role:u,tabIndex:S,component:o,focusVisibleClassName:st(b.focusVisible,c),className:st(b.root,h)},m,{ownerState:g,classes:b}))})});function see(t){return Tt("MuiNativeSelect",t)}const AR=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),aee=["className","disabled","error","IconComponent","inputRef","variant"],lee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${bt(n)}`,o&&"iconOpen",r&&"disabled"]};return Rt(a,see,e)},b6=({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"},[`&.${AR.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}}),cee=qe("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:pi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${AR.multiple}`]:e.multiple}]}})(b6),_6=({ownerState:t,theme:e})=>W({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${AR.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),uee=qe("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]}})(_6),fee=A.forwardRef(function(e,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=e,c=Qe(e,aee),u=W({},e,{disabled:i,variant:l,error:o}),f=lee(u);return C.jsxs(A.Fragment,{children:[C.jsx(cee,W({ownerState:u,className:st(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:C.jsx(uee,{as:s,ownerState:u,className:f.icon})]})});var v4;const dee=["children","classes","className","label","notched"],hee=qe("fieldset",{shouldForwardProp:pi})({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%"}),pee=qe("legend",{shouldForwardProp:pi})(({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 mee(t){const{className:e,label:n,notched:r}=t,i=Qe(t,dee),o=n!=null&&n!=="",s=W({},t,{notched:r,withLabel:o});return C.jsx(hee,W({"aria-hidden":!0,className:e,ownerState:s},i,{children:C.jsx(pee,{ownerState:s,children:o?C.jsx("span",{children:n}):v4||(v4=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const gee=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],vee=t=>{const{classes:e}=t,r=Rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},$K,e);return W({},e,r)},yee=qe(Gb,{shouldForwardProp:t=>pi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Wb})(({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 .${Za.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Za.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Za.focused} .${Za.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${Za.error} .${Za.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Za.disabled} .${Za.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"}))}),xee=qe(mee,{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}}),bee=qe(Xb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Hb})(({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})),PR=A.forwardRef(function(e,n){var r,i,o,s,a;const l=At({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:f="input",label:h,multiline:m=!1,notched:v,slots:x={},type:y="text"}=l,g=Qe(l,gee),b=vee(l),_=yu(),S=Xd({props:l,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),P=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:y}),N=(r=(i=x.root)!=null?i:c.Root)!=null?r:yee,T=(o=(s=x.input)!=null?s:c.Input)!=null?o:bee;return C.jsx(CR,W({slots:{root:N,input:T},renderSuffix:L=>C.jsx(xee,{ownerState:P,className:b.notchedOutline,label:h!=null&&h!==""&&S.required?a||(a=C.jsxs(A.Fragment,{children:[h," ","*"]})):h,notched:typeof v<"u"?v:!!(L.startAdornment||L.filled||L.focused)}),fullWidth:u,inputComponent:f,multiline:m,ref:n,type:y},g,{classes:W({},b,{notchedOutline:null})}))});PR.muiName="Input";function _ee(t){return Tt("MuiSelect",t)}const jh=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var y4;const wee=["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"],See=qe("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${jh.select}`]:e.select},{[`&.${jh.select}`]:e[n.variant]},{[`&.${jh.error}`]:e.error},{[`&.${jh.multiple}`]:e.multiple}]}})(b6,{[`&.${jh.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Mee=qe("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]}})(_6),Eee=qe("input",{shouldForwardProp:t=>s6(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 x4(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Cee(t){return t==null||typeof t=="string"&&!t.trim()}const Tee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${bt(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Rt(a,_ee,e)},Ree=A.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:v=!1,IconComponent:x,inputRef:y,labelId:g,MenuProps:b={},multiple:_,name:S,onBlur:P,onChange:N,onClose:T,onFocus:L,onOpen:U,open:M,readOnly:R,renderValue:D,SelectDisplayProps:O={},tabIndex:B,value:X,variant:H="standard"}=e,Z=Qe(e,wee),[F,Y]=W2({controlled:X,default:f,name:"Select"}),[K,ee]=W2({controlled:M,default:u,name:"Select"}),me=A.useRef(null),le=A.useRef(null),[Q,ae]=A.useState(null),{current:ge}=A.useRef(M!=null),[Me,tt]=A.useState(),He=_r(n,y),rt=A.useCallback(Oe=>{le.current=Oe,Oe&&ae(Oe)},[]),Ve=Q==null?void 0:Q.parentNode;A.useImperativeHandle(He,()=>({focus:()=>{le.current.focus()},node:me.current,value:F}),[F]),A.useEffect(()=>{u&&K&&Q&&!ge&&(tt(a?null:Ve.clientWidth),le.current.focus())},[Q,a]),A.useEffect(()=>{s&&le.current.focus()},[s]),A.useEffect(()=>{if(!g)return;const Oe=Li(le.current).getElementById(g);if(Oe){const Ue=()=>{getSelection().isCollapsed&&le.current.focus()};return Oe.addEventListener("click",Ue),()=>{Oe.removeEventListener("click",Ue)}}},[g]);const se=(Oe,Ue)=>{Oe?U&&U(Ue):T&&T(Ue),ge||(tt(a?null:Ve.clientWidth),ee(Oe))},j=Oe=>{Oe.button===0&&(Oe.preventDefault(),le.current.focus(),se(!0,Oe))},ye=Oe=>{se(!1,Oe)},xe=A.Children.toArray(l),Re=Oe=>{const Ue=xe.find(Ae=>Ae.props.value===Oe.target.value);Ue!==void 0&&(Y(Ue.props.value),N&&N(Oe,Ue))},Pe=Oe=>Ue=>{let Ae;if(Ue.currentTarget.hasAttribute("tabindex")){if(_){Ae=Array.isArray(F)?F.slice():[];const ke=F.indexOf(Oe.props.value);ke===-1?Ae.push(Oe.props.value):Ae.splice(ke,1)}else Ae=Oe.props.value;if(Oe.props.onClick&&Oe.props.onClick(Ue),F!==Ae&&(Y(Ae),N)){const ke=Ue.nativeEvent||Ue,dt=new ke.constructor(ke.type,ke);Object.defineProperty(dt,"target",{writable:!0,value:{value:Ae,name:S}}),N(dt,Oe)}_||se(!1,Ue)}},Ee=Oe=>{R||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Oe.key)!==-1&&(Oe.preventDefault(),se(!0,Oe))},De=Q!==null&&K,$=Oe=>{!De&&P&&(Object.defineProperty(Oe,"target",{writable:!0,value:{value:F,name:S}}),P(Oe))};delete Z["aria-invalid"];let z,re;const he=[];let pe=!1;(M1({value:F})||m)&&(D?z=D(F):pe=!0);const be=xe.map(Oe=>{if(!A.isValidElement(Oe))return null;let Ue;if(_){if(!Array.isArray(F))throw new Error(Ra(2));Ue=F.some(Ae=>x4(Ae,Oe.props.value)),Ue&&pe&&he.push(Oe.props.children)}else Ue=x4(F,Oe.props.value),Ue&&pe&&(re=Oe.props.children);return A.cloneElement(Oe,{"aria-selected":Ue?"true":"false",onClick:Pe(Oe),onKeyUp:Ae=>{Ae.key===" "&&Ae.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(Ae)},role:"option",selected:Ue,value:void 0,"data-value":Oe.props.value})});pe&&(_?he.length===0?z=null:z=he.reduce((Oe,Ue,Ae)=>(Oe.push(Ue),Ae{const{classes:e}=t;return e},NR={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>pi(t)&&t!=="variant",slot:"Root"},Iee=qe(RR,NR)(""),Lee=qe(PR,NR)(""),kee=qe(TR,NR)(""),IR=A.forwardRef(function(e,n){const r=At({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=HK,id:f,input:h,inputProps:m,label:v,labelId:x,MenuProps:y,multiple:g=!1,native:b=!1,onClose:_,onOpen:S,open:P,renderValue:N,SelectDisplayProps:T,variant:L="outlined"}=r,U=Qe(r,Aee),M=b?fee:Ree,R=yu(),D=Xd({props:r,muiFormControl:R,states:["variant","error"]}),O=D.variant||L,B=W({},r,{variant:O,classes:s}),X=Nee(B),H=Qe(X,Pee),Z=h||{standard:C.jsx(Iee,{ownerState:B}),outlined:C.jsx(Lee,{label:v,ownerState:B}),filled:C.jsx(kee,{ownerState:B})}[O],F=_r(n,Z.ref);return C.jsx(A.Fragment,{children:A.cloneElement(Z,W({inputComponent:M,inputProps:W({children:o,error:D.error,IconComponent:u,variant:O,type:void 0,multiple:g},b?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:x,MenuProps:y,onClose:_,onOpen:S,open:P,renderValue:N,SelectDisplayProps:W({id:f},T)},m,{classes:m?ui(H,m.classes):H},h?h.props.inputProps:{})},(g&&b||c)&&O==="outlined"?{notched:!0}:{},{ref:F,className:st(Z.props.className,a,X.root)},!h&&{variant:O},U))})});IR.muiName="Select";function Oee(t){return Tt("MuiTab",t)}const Ja=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Dee=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Fee=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:l}=t,c={root:["root",o&&s&&"labelIcon",`textColor${bt(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Rt(c,Oee,e)},zee=qe(vu,{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,{[`& .${Ja.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,[`& > .${Ja.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,[`&.${Ja.selected}`]:{opacity:1},[`&.${Ja.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Ja.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Ja.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${Ja.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Ja.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)})),tM=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:h,onClick:m,onFocus:v,selected:x,selectionFollowsFocus:y,textColor:g="inherit",value:b,wrapped:_=!1}=r,S=Qe(r,Dee),P=W({},r,{disabled:o,disableFocusRipple:s,selected:x,icon:!!l,iconPosition:c,label:!!f,fullWidth:a,textColor:g,wrapped:_}),N=Fee(P),T=l&&f&&A.isValidElement(l)?A.cloneElement(l,{className:st(N.iconWrapper,l.props.className)}):l,L=M=>{!x&&h&&h(M,b),m&&m(M)},U=M=>{y&&!x&&h&&h(M,b),v&&v(M)};return C.jsxs(zee,W({focusRipple:!s,className:st(N.root,i),ref:n,role:"tab","aria-selected":x,disabled:o,onClick:L,onFocus:U,ownerState:P,tabIndex:x?0:-1},S,{children:[c==="top"||c==="start"?C.jsxs(A.Fragment,{children:[T,f]}):C.jsxs(A.Fragment,{children:[f,T]}),u]}))}),w6=A.createContext();function Uee(t){return Tt("MuiTable",t)}Ct("MuiTable",["root","stickyHeader"]);const Bee=["className","component","padding","size","stickyHeader"],jee=t=>{const{classes:e,stickyHeader:n}=t;return Rt({root:["root",n&&"stickyHeader"]},Uee,e)},Vee=qe("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"})),b4="table",S6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTable"}),{className:i,component:o=b4,padding:s="normal",size:a="medium",stickyHeader:l=!1}=r,c=Qe(r,Bee),u=W({},r,{component:o,padding:s,size:a,stickyHeader:l}),f=jee(u),h=A.useMemo(()=>({padding:s,size:a,stickyHeader:l}),[s,a,l]);return C.jsx(w6.Provider,{value:h,children:C.jsx(Vee,W({as:o,role:o===b4?null:"table",ref:n,className:st(f.root,i),ownerState:u},c))})}),qb=A.createContext();function $ee(t){return Tt("MuiTableBody",t)}Ct("MuiTableBody",["root"]);const Wee=["className","component"],Hee=t=>{const{classes:e}=t;return Rt({root:["root"]},$ee,e)},Gee=qe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),Xee={variant:"body"},_4="tbody",M6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableBody"}),{className:i,component:o=_4}=r,s=Qe(r,Wee),a=W({},r,{component:o}),l=Hee(a);return C.jsx(qb.Provider,{value:Xee,children:C.jsx(Gee,W({className:st(l.root,i),as:o,ref:n,role:o===_4?null:"rowgroup",ownerState:a},s))})});function qee(t){return Tt("MuiTableCell",t)}const gm=Ct("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Yee=["align","className","component","padding","scope","size","sortDirection","variant"],Kee=t=>{const{classes:e,variant:n,align:r,padding:i,size:o,stickyHeader:s}=t,a={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${bt(r)}`,i!=="normal"&&`padding${bt(i)}`,`size${bt(o)}`]};return Rt(a,qee,e)},Zee=qe("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"?Qz(Rn(t.palette.divider,1),.88):Jz(Rn(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",[`&.${gm.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})),Ts=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:s,padding:a,scope:l,size:c,sortDirection:u,variant:f}=r,h=Qe(r,Yee),m=A.useContext(w6),v=A.useContext(qb),x=v&&v.variant==="head";let y;s?y=s:y=x?"th":"td";let g=l;y==="td"?g=void 0:!g&&x&&(g="col");const b=f||v&&v.variant,_=W({},r,{align:i,component:y,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=Kee(_);let P=null;return u&&(P=u==="asc"?"ascending":"descending"),C.jsx(Zee,W({as:y,ref:n,className:st(S.root,o),"aria-sort":P,scope:g,ownerState:_},h))});function Jee(t){return Tt("MuiTableContainer",t)}Ct("MuiTableContainer",["root"]);const Qee=["className","component"],ete=t=>{const{classes:e}=t;return Rt({root:["root"]},Jee,e)},tte=qe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),E6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableContainer"}),{className:i,component:o="div"}=r,s=Qe(r,Qee),a=W({},r,{component:o}),l=ete(a);return C.jsx(tte,W({ref:n,as:o,className:st(l.root,i),ownerState:a},s))});function nte(t){return Tt("MuiTableHead",t)}Ct("MuiTableHead",["root"]);const rte=["className","component"],ite=t=>{const{classes:e}=t;return Rt({root:["root"]},nte,e)},ote=qe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),ste={variant:"head"},w4="thead",C6=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableHead"}),{className:i,component:o=w4}=r,s=Qe(r,rte),a=W({},r,{component:o}),l=ite(a);return C.jsx(qb.Provider,{value:ste,children:C.jsx(ote,W({as:o,className:st(l.root,i),ref:n,role:o===w4?null:"rowgroup",ownerState:a},s))})});function ate(t){return Tt("MuiToolbar",t)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const lte=["className","component","disableGutters","variant"],cte=t=>{const{classes:e,disableGutters:n,variant:r}=t;return Rt({root:["root",!n&&"gutters",r]},ate,e)},ute=qe("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),fte=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=Qe(r,lte),c=W({},r,{component:o,disableGutters:s,variant:a}),u=cte(c);return C.jsx(ute,W({as:o,className:st(u.root,i),ref:n,ownerState:c},l))}),dte=Gd(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),hte=Gd(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function pte(t){return Tt("MuiTableRow",t)}const S4=Ct("MuiTableRow",["root","selected","hover","head","footer"]),mte=["className","component","hover","selected"],gte=t=>{const{classes:e,selected:n,hover:r,head:i,footer:o}=t;return Rt({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},pte,e)},vte=qe("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,[`&.${S4.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${S4.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Rn(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}))`:Rn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),M4="tr",Yb=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableRow"}),{className:i,component:o=M4,hover:s=!1,selected:a=!1}=r,l=Qe(r,mte),c=A.useContext(qb),u=W({},r,{component:o,hover:s,selected:a,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),f=gte(u);return C.jsx(vte,W({as:o,ref:n,className:st(f.root,i),role:o===M4?null:"row",ownerState:u},l))});function yte(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function xte(t,e,n,r={},i=()=>{}){const{ease:o=yte,duration:s=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)/s);if(e[t]=o(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 bte=["onChange"],_te={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function wte(t){const{onChange:e}=t,n=Qe(t,bte),r=A.useRef(),i=A.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return ko(()=>{const s=Bb(()=>{const l=r.current;o(),l!==r.current&&e(r.current)}),a=Aa(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[e]),A.useEffect(()=>{o(),e(r.current)},[e]),C.jsx("div",W({style:_te,ref:i},n))}function Ste(t){return Tt("MuiTabScrollButton",t)}const Mte=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Ete=["className","slots","slotProps","direction","orientation","disabled"],Cte=t=>{const{classes:e,orientation:n,disabled:r}=t;return Rt({root:["root",n,r&&"disabled"]},Ste,e)},Tte=qe(vu,{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,[`&.${Mte.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Rte=A.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:l={},direction:c}=o,u=Qe(o,Ete),f=gR(),h=W({isRtl:f},o),m=Cte(h),v=(r=a.StartScrollButtonIcon)!=null?r:dte,x=(i=a.EndScrollButtonIcon)!=null?i:hte,y=Us({elementType:v,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),g=Us({elementType:x,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return C.jsx(Tte,W({component:"div",className:st(m.root,s),ref:n,role:null,ownerState:h,tabIndex:null},u,{children:c==="left"?C.jsx(v,W({},y)):C.jsx(x,W({},g))}))});function Ate(t){return Tt("MuiTabs",t)}const nM=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Pte=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],E4=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,C4=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,iv=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(t,i);else{i.focus();return}}},Nte=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:l}=t;return Rt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ate,l)},Ite=qe("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${nM.scrollButtons}`]:e.scrollButtons},{[`& .${nM.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&&{[`& .${nM.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Lte=qe("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"})),kte=qe("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"})),Ote=qe("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})),Dte=qe(wte)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),T4={},Fte=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTabs"}),i=mu(),o=gR(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:v="primary",onChange:x,orientation:y="horizontal",ScrollButtonComponent:g=Rte,scrollButtons:b="auto",selectionFollowsFocus:_,slots:S={},slotProps:P={},TabIndicatorProps:N={},TabScrollButtonProps:T={},textColor:L="primary",value:U,variant:M="standard",visibleScrollbar:R=!1}=r,D=Qe(r,Pte),O=M==="scrollable",B=y==="vertical",X=B?"scrollTop":"scrollLeft",H=B?"top":"left",Z=B?"bottom":"right",F=B?"clientHeight":"clientWidth",Y=B?"height":"width",K=W({},r,{component:h,allowScrollButtonsMobile:m,indicatorColor:v,orientation:y,vertical:B,scrollButtons:b,textColor:L,variant:M,visibleScrollbar:R,fixed:!O,hideScrollbar:O&&!R,scrollableX:O&&!B,scrollableY:O&&B,centered:c&&!O,scrollButtonsHideMobile:!m}),ee=Nte(K),me=Us({elementType:S.StartScrollButtonIcon,externalSlotProps:P.startScrollButtonIcon,ownerState:K}),le=Us({elementType:S.EndScrollButtonIcon,externalSlotProps:P.endScrollButtonIcon,ownerState:K}),[Q,ae]=A.useState(!1),[ge,Me]=A.useState(T4),[tt,He]=A.useState(!1),[rt,Ve]=A.useState(!1),[se,j]=A.useState(!1),[ye,xe]=A.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,Pe=A.useRef(null),Ee=A.useRef(null),De=()=>{const Ae=Pe.current;let ke;if(Ae){const J=Ae.getBoundingClientRect();ke={clientWidth:Ae.clientWidth,scrollLeft:Ae.scrollLeft,scrollTop:Ae.scrollTop,scrollLeftNormalized:uq(Ae,o?"rtl":"ltr"),scrollWidth:Ae.scrollWidth,top:J.top,bottom:J.bottom,left:J.left,right:J.right}}let dt;if(Ae&&U!==!1){const J=Ee.current.children;if(J.length>0){const je=J[Re.get(U)];dt=je?je.getBoundingClientRect():null}}return{tabsMeta:ke,tabMeta:dt}},$=va(()=>{const{tabsMeta:Ae,tabMeta:ke}=De();let dt=0,J;if(B)J="top",ke&&Ae&&(dt=ke.top-Ae.top+Ae.scrollTop);else if(J=o?"right":"left",ke&&Ae){const fe=o?Ae.scrollLeftNormalized+Ae.clientWidth-Ae.scrollWidth:Ae.scrollLeft;dt=(o?-1:1)*(ke[J]-Ae[J]+fe)}const je={[J]:dt,[Y]:ke?ke[Y]:0};if(isNaN(ge[J])||isNaN(ge[Y]))Me(je);else{const fe=Math.abs(ge[J]-je[J]),Te=Math.abs(ge[Y]-je[Y]);(fe>=1||Te>=1)&&Me(je)}}),z=(Ae,{animation:ke=!0}={})=>{ke?xte(X,Pe.current,Ae,{duration:i.transitions.duration.standard}):Pe.current[X]=Ae},re=Ae=>{let ke=Pe.current[X];B?ke+=Ae:(ke+=Ae*(o?-1:1),ke*=o&&$z()==="reverse"?-1:1),z(ke)},he=()=>{const Ae=Pe.current[F];let ke=0;const dt=Array.from(Ee.current.children);for(let J=0;JAe){J===0&&(ke=Ae);break}ke+=je[F]}return ke},pe=()=>{re(-1*he())},be=()=>{re(he())},Ge=A.useCallback(Ae=>{xe({overflow:null,scrollbarWidth:Ae})},[]),Fe=()=>{const Ae={};Ae.scrollbarSizeListener=O?C.jsx(Dte,{onChange:Ge,className:st(ee.scrollableX,ee.hideScrollbar)}):null;const dt=O&&(b==="auto"&&(tt||rt)||b===!0);return Ae.scrollButtonStart=dt?C.jsx(g,W({slots:{StartScrollButtonIcon:S.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:me},orientation:y,direction:o?"right":"left",onClick:pe,disabled:!tt},T,{className:st(ee.scrollButtons,T.className)})):null,Ae.scrollButtonEnd=dt?C.jsx(g,W({slots:{EndScrollButtonIcon:S.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:le},orientation:y,direction:o?"left":"right",onClick:be,disabled:!rt},T,{className:st(ee.scrollButtons,T.className)})):null,Ae},Ne=va(Ae=>{const{tabsMeta:ke,tabMeta:dt}=De();if(!(!dt||!ke)){if(dt[H]ke[Z]){const J=ke[X]+(dt[Z]-ke[Z]);z(J,{animation:Ae})}}}),ze=va(()=>{O&&b!==!1&&j(!se)});A.useEffect(()=>{const Ae=Bb(()=>{Pe.current&&$()});let ke;const dt=fe=>{fe.forEach(Te=>{Te.removedNodes.forEach(Ke=>{var Ye;(Ye=ke)==null||Ye.unobserve(Ke)}),Te.addedNodes.forEach(Ke=>{var Ye;(Ye=ke)==null||Ye.observe(Ke)})}),Ae(),ze()},J=Aa(Pe.current);J.addEventListener("resize",Ae);let je;return typeof ResizeObserver<"u"&&(ke=new ResizeObserver(Ae),Array.from(Ee.current.children).forEach(fe=>{ke.observe(fe)})),typeof MutationObserver<"u"&&(je=new MutationObserver(dt),je.observe(Ee.current,{childList:!0})),()=>{var fe,Te;Ae.clear(),J.removeEventListener("resize",Ae),(fe=je)==null||fe.disconnect(),(Te=ke)==null||Te.disconnect()}},[$,ze]),A.useEffect(()=>{const Ae=Array.from(Ee.current.children),ke=Ae.length;if(typeof IntersectionObserver<"u"&&ke>0&&O&&b!==!1){const dt=Ae[0],J=Ae[ke-1],je={root:Pe.current,threshold:.99},fe=Bt=>{He(!Bt[0].isIntersecting)},Te=new IntersectionObserver(fe,je);Te.observe(dt);const Ke=Bt=>{Ve(!Bt[0].isIntersecting)},Ye=new IntersectionObserver(Ke,je);return Ye.observe(J),()=>{Te.disconnect(),Ye.disconnect()}}},[O,b,se,u==null?void 0:u.length]),A.useEffect(()=>{ae(!0)},[]),A.useEffect(()=>{$()}),A.useEffect(()=>{Ne(T4!==ge)},[Ne,ge]),A.useImperativeHandle(l,()=>({updateIndicator:$,updateScrollButtons:ze}),[$,ze]);const Le=C.jsx(Ote,W({},N,{className:st(ee.indicator,N.className),ownerState:K,style:W({},ge,N.style)}));let Xe=0;const xt=A.Children.map(u,Ae=>{if(!A.isValidElement(Ae))return null;const ke=Ae.props.value===void 0?Xe:Ae.props.value;Re.set(ke,Xe);const dt=ke===U;return Xe+=1,A.cloneElement(Ae,W({fullWidth:M==="fullWidth",indicator:dt&&!Q&&Le,selected:dt,selectionFollowsFocus:_,onChange:x,textColor:L,value:ke},Xe===1&&U===!1&&!Ae.props.tabIndex?{tabIndex:0}:{}))}),Oe=Ae=>{const ke=Ee.current,dt=Li(ke).activeElement;if(dt.getAttribute("role")!=="tab")return;let je=y==="horizontal"?"ArrowLeft":"ArrowUp",fe=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&o&&(je="ArrowRight",fe="ArrowLeft"),Ae.key){case je:Ae.preventDefault(),iv(ke,dt,C4);break;case fe:Ae.preventDefault(),iv(ke,dt,E4);break;case"Home":Ae.preventDefault(),iv(ke,null,E4);break;case"End":Ae.preventDefault(),iv(ke,null,C4);break}},Ue=Fe();return C.jsxs(Ite,W({className:st(ee.root,f),ownerState:K,ref:n,as:h},D,{children:[Ue.scrollButtonStart,Ue.scrollbarSizeListener,C.jsxs(Lte,{className:ee.scroller,ownerState:K,style:{overflow:ye.overflow,[B?`margin${o?"Left":"Right"}`:"marginBottom"]:R?void 0:-ye.scrollbarWidth},ref:Pe,children:[C.jsx(kte,{"aria-label":s,"aria-labelledby":a,"aria-orientation":y==="vertical"?"vertical":null,className:ee.flexContainer,ownerState:K,onKeyDown:Oe,ref:Ee,role:"tablist",children:xt}),Q&&Le]}),Ue.scrollButtonEnd]}))});function zte(t){return Tt("MuiTextField",t)}Ct("MuiTextField",["root"]);const Ute=["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"],Bte={standard:RR,filled:TR,outlined:PR},jte=t=>{const{classes:e}=t;return Rt({root:["root"]},zte,e)},Vte=qe(u6,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),$te=A.forwardRef(function(e,n){const r=At({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:v,id:x,InputLabelProps:y,inputProps:g,InputProps:b,inputRef:_,label:S,maxRows:P,minRows:N,multiline:T=!1,name:L,onBlur:U,onChange:M,onFocus:R,placeholder:D,required:O=!1,rows:B,select:X=!1,SelectProps:H,type:Z,value:F,variant:Y="outlined"}=r,K=Qe(r,Ute),ee=W({},r,{autoFocus:o,color:l,disabled:u,error:f,fullWidth:m,multiline:T,required:O,select:X,variant:Y}),me=jte(ee),le={};Y==="outlined"&&(y&&typeof y.shrink<"u"&&(le.notched=y.shrink),le.label=S),X&&((!H||!H.native)&&(le.id=void 0),le["aria-describedby"]=void 0);const Q=Uz(x),ae=v&&Q?`${Q}-helper-text`:void 0,ge=S&&Q?`${Q}-label`:void 0,Me=Bte[Y],tt=C.jsx(Me,W({"aria-describedby":ae,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:T,name:L,rows:B,maxRows:P,minRows:N,type:Z,value:F,id:Q,inputRef:_,onBlur:U,onChange:M,onFocus:R,placeholder:D,inputProps:g},le,b));return C.jsxs(Vte,W({className:st(me.root,a),disabled:u,error:f,fullWidth:m,ref:n,required:O,color:l,variant:Y,ownerState:ee},K,{children:[S!=null&&S!==""&&C.jsx(h6,W({htmlFor:Q,id:ge},y,{children:S})),X?C.jsx(IR,W({"aria-describedby":ae,id:Q,labelId:ge,value:F,input:tt},H,{children:s})):tt,v&&C.jsx(TJ,W({id:ae},h,{children:v}))]}))});/** + * @remix-run/router v1.20.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function vm(){return vm=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function LR(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Hte(){return Math.random().toString(36).substr(2,8)}function A4(t,e){return{usr:t.state,key:t.key,idx:e}}function Z2(t,e,n,r){return n===void 0&&(n=null),vm({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?xu(e):e,{state:n,key:e&&e.key||r||Hte()})}function C1(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 xu(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 Gte(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=gl.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(vm({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function f(){a=gl.Pop;let y=u(),g=y==null?null:y-c;c=y,l&&l({action:a,location:x.location,delta:g})}function h(y,g){a=gl.Push;let b=Z2(x.location,y,g);n&&n(b,y),c=u()+1;let _=A4(b,c),S=x.createHref(b);try{s.pushState(_,"",S)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(S)}o&&l&&l({action:a,location:x.location,delta:1})}function m(y,g){a=gl.Replace;let b=Z2(x.location,y,g);n&&n(b,y),c=u();let _=A4(b,c),S=x.createHref(b);s.replaceState(_,"",S),o&&l&&l({action:a,location:x.location,delta:0})}function v(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:C1(y);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,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(R4,f),l=y,()=>{i.removeEventListener(R4,f),l=null}},createHref(y){return e(i,y)},createURL:v,encodeLocation(y){let g=v(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(y){return s.go(y)}};return x}var P4;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(P4||(P4={}));function Xte(t,e,n){return n===void 0&&(n="/"),qte(t,e,n,!1)}function qte(t,e,n,r){let i=typeof e=="string"?xu(e):e,o=_d(i.pathname||"/",n);if(o==null)return null;let s=T6(t);Yte(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};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=Cl([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(Wn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),T6(o.children,e,u,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:nne(c,o.index),routesMeta:u})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of R6(o.path))i(o,s,l)}),e}function R6(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=R6(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Yte(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:rne(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Kte=/^:[\w-]+$/,Zte=3,Jte=2,Qte=1,ene=10,tne=-2,N4=t=>t==="*";function nne(t,e){let n=t.split("/"),r=n.length;return n.some(N4)&&(r+=tne),e&&(r+=Jte),n.filter(i=>!N4(i)).reduce((i,o)=>i+(Kte.test(o)?Zte:o===""?Qte:ene),r)}function rne(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 ine(t,e,n){let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a{let{paramName:h,isOptional:m}=u;if(h==="*"){let x=a[f]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=a[f];return m&&!v?c[h]=void 0:c[h]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function one(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),LR(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,(s,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 LR(!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 _d(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 ane(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?xu(t):t;return{pathname:n?n.startsWith("/")?n:lne(n,e):e,search:fne(r),hash:dne(i)}}function lne(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 rM(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 cne(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function A6(t,e){let n=cne(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function P6(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=xu(t):(i=vm({},t),Wn(!i.pathname||!i.pathname.includes("?"),rM("?","pathname","search",i)),Wn(!i.pathname||!i.pathname.includes("#"),rM("#","pathname","hash",i)),Wn(!i.search||!i.search.includes("#"),rM("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=ane(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Cl=t=>t.join("/").replace(/\/\/+/g,"/"),une=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),fne=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,dne=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function hne(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const N6=["post","put","patch","delete"];new Set(N6);const pne=["get",...N6];new Set(pne);/** + * React Router v6.27.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ym(){return ym=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),A.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=P6(c,JSON.parse(s),o,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Cl([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,s,o,t])}function Jb(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=A.useContext(jl),{matches:i}=A.useContext(bu),{pathname:o}=qd(),s=JSON.stringify(A6(i,r.v7_relativeSplatPath));return A.useMemo(()=>P6(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function yne(t,e){return xne(t,e)}function xne(t,e,n,r){lg()||Wn(!1);let{navigator:i}=A.useContext(jl),{matches:o}=A.useContext(bu),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=qd(),u;if(e){var f;let y=typeof e=="string"?xu(e):e;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||Wn(!1),u=y}else u=c;let h=u.pathname||"/",m=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=Xte(t,{pathname:m}),x=Mne(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Cl([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Cl([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return e&&x?A.createElement(Zb.Provider,{value:{location:ym({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:gl.Pop}},x):x}function bne(){let t=Rne(),e=hne(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 A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},e),n?A.createElement("pre",{style:i},n):null,null)}const _ne=A.createElement(bne,null);class wne extends A.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?A.createElement(bu.Provider,{value:this.props.routeContext},A.createElement(L6.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Sne(t){let{routeContext:e,match:n,children:r}=t,i=A.useContext(Kb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),A.createElement(bu.Provider,{value:e},r)}function Mne(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Wn(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,f,h)=>{let m,v=!1,x=null,y=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||_ne,l&&(c<0&&h===0?(v=!0,y=null):c===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let g=e.concat(s.slice(0,h+1)),b=()=>{let _;return m?_=x:v?_=y:f.route.Component?_=A.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=u,A.createElement(Sne,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?A.createElement(wne,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var O6=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(O6||{}),R1=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}(R1||{});function Ene(t){let e=A.useContext(Kb);return e||Wn(!1),e}function Cne(t){let e=A.useContext(I6);return e||Wn(!1),e}function Tne(t){let e=A.useContext(bu);return e||Wn(!1),e}function D6(t){let e=Tne(),n=e.matches[e.matches.length-1];return n.route.id||Wn(!1),n.route.id}function Rne(){var t;let e=A.useContext(L6),n=Cne(R1.UseRouteError),r=D6(R1.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function Ane(){let{router:t}=Ene(O6.UseNavigateStable),e=D6(R1.UseNavigateStable),n=A.useRef(!1);return k6(()=>{n.current=!0}),A.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,ym({fromRouteId:e},o)))},[t,e])}function hp(t){Wn(!1)}function Pne(t){let{basename:e="/",children:n=null,location:r,navigationType:i=gl.Pop,navigator:o,static:s=!1,future:a}=t;lg()&&Wn(!1);let l=e.replace(/^\/*/,"/"),c=A.useMemo(()=>({basename:l,navigator:o,static:s,future:ym({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=xu(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:v="default"}=r,x=A.useMemo(()=>{let y=_d(u,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:m,key:v},navigationType:i}},[l,u,f,h,m,v,i]);return x==null?null:A.createElement(jl.Provider,{value:c},A.createElement(Zb.Provider,{children:n,value:x}))}function Nne(t){let{children:e,location:n}=t;return yne(J2(e),n)}new Promise(()=>{});function J2(t,e){e===void 0&&(e=[]);let n=[];return A.Children.forEach(t,(r,i)=>{if(!A.isValidElement(r))return;let o=[...e,i];if(r.type===A.Fragment){n.push.apply(n,J2(r.props.children,o));return}r.type!==hp&&Wn(!1),!r.props.index||!r.props.children||Wn(!1);let s={id:r.props.id||o.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&&(s.children=J2(r.props.children,o)),n.push(s)}),n}/** + * React Router DOM v6.27.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function A1(){return A1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Ine(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Lne(t,e){return t.button===0&&(!e||e==="_self")&&!Ine(t)}const kne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],One=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Dne="6";try{window.__reactRouterVersion=Dne}catch{}const Fne=A.createContext({isTransitioning:!1}),zne="startTransition",I4=Hp[zne];function Une(t){let{basename:e,children:n,future:r,window:i}=t,o=A.useRef();o.current==null&&(o.current=Wte({window:i,v5Compat:!0}));let s=o.current,[a,l]=A.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=A.useCallback(f=>{c&&I4?I4(()=>l(f)):l(f)},[l,c]);return A.useLayoutEffect(()=>s.listen(u),[s,u]),A.createElement(Pne,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const Bne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oy=A.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,h=F6(e,kne),{basename:m}=A.useContext(jl),v,x=!1;if(typeof c=="string"&&jne.test(c)&&(v=c,Bne))try{let _=new URL(window.location.href),S=c.startsWith("//")?new URL(_.protocol+c):new URL(c),P=_d(S.pathname,m);S.origin===_.origin&&P!=null?c=P+S.search+S.hash:x=!0}catch{}let y=mne(c,{relative:i}),g=$ne(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f});function b(_){r&&r(_),_.defaultPrevented||g(_)}return A.createElement("a",A1({},h,{href:v||y,onClick:x||o?r:b,ref:n,target:l}))}),z6=A.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,viewTransition:c,children:u}=e,f=F6(e,One),h=Jb(l,{relative:f.relative}),m=qd(),v=A.useContext(I6),{navigator:x,basename:y}=A.useContext(jl),g=v!=null&&Wne(h)&&c===!0,b=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(_=_.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&y&&(S=_d(S,y)||S);const P=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let N=_===b||!s&&_.startsWith(b)&&_.charAt(P)==="/",T=S!=null&&(S===b||!s&&S.startsWith(b)&&S.charAt(b.length)==="/"),L={isActive:N,isPending:T,isTransitioning:g},U=N?r:void 0,M;typeof o=="function"?M=o(L):M=[o,N?"active":null,T?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let R=typeof a=="function"?a(L):a;return A.createElement(Oy,A1({},f,{"aria-current":U,className:M,ref:n,style:R,to:l,viewTransition:c}),typeof u=="function"?u(L):u)});var Q2;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Q2||(Q2={}));var L4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(L4||(L4={}));function Vne(t){let e=A.useContext(Kb);return e||Wn(!1),e}function $ne(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:a}=e===void 0?{}:e,l=gne(),c=qd(),u=Jb(t,{relative:s});return A.useCallback(f=>{if(Lne(f,n)){f.preventDefault();let h=r!==void 0?r:C1(c)===C1(u);l(t,{replace:h,state:i,preventScrollReset:o,relative:s,viewTransition:a})}},[c,l,u,r,i,n,t,o,s,a])}function Wne(t,e){e===void 0&&(e={});let n=A.useContext(Fne);n==null&&Wn(!1);let{basename:r}=Vne(Q2.useViewTransitionState),i=Jb(t,{relative:e.relative});if(!n.isTransitioning)return!1;let o=_d(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=_d(n.nextLocation.pathname,r)||n.nextLocation.pathname;return T1(i.pathname,s)!=null||T1(i.pathname,o)!=null}function Hne(t){var n;const e=t.standard;return C.jsxs(pZ,{variant:"outlined",children:[C.jsxs(MZ,{children:[C.jsx(sr,{sx:{fontSize:14},color:"text.secondary",gutterBottom:!0,children:"XAS Metadata"}),C.jsx(sr,{variant:"h5",component:"div",children:e.sample.name}),C.jsx(sr,{variant:"h6",component:"div",children:e.sample.formula}),C.jsx(sr,{sx:{mb:1.5},color:"text.secondary",children:e.sample.prep}),C.jsxs(sr,{sx:{mb:1.5},children:["Measured at ",(n=e.facility)==null?void 0:n.name," on beamline"," ",e.beamline.name]}),C.jsx(sr,{sx:{mb:1.5},children:e.start_time})]}),t.showDownload&&C.jsx(xZ,{children:C.jsxs(rs,{children:[C.jsx(u4,{href:"/webxdiviewer/xdidata/"+String(e.location),download:String(e.id)+".xdi",children:"Download XDI"}),C.jsx(u4,{component:z6,to:"/xdi/"+String(e.location),children:"Persistent Link"})]})})]})}const cg=A.createContext({xdiFile:null,setXDIFile:()=>{},comparisonFiles:[],setComparisonFiles:()=>{}});function kR(t){const{children:e}=t;return C.jsx(cg.Provider,{value:t.value,children:e})}function Gne(){const t=A.useContext(cg);return C.jsx(Bs,{children:C.jsx(sr,{sx:{whiteSpace:"pre-line",overflow:"scroll",maxHeight:"20em"},children:t.xdiFile===null?"":t.xdiFile.rawText()})})}const iM=qe(Ts)(({theme:t})=>({[`&.${gm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${gm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Xne=qe(Yb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function qne(t){var e,n,r,i;return C.jsxs(Xne,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[C.jsx(iM,{align:"left",children:((e=t.xdiFile)==null?void 0:e.element)??" "}),C.jsx(iM,{align:"center",children:((n=t.xdiFile)==null?void 0:n.edge)??""}),C.jsx(iM,{align:"center",children:((i=(r=t.xdiFile)==null?void 0:r.sample)==null?void 0:i.name)??""})]},t.key)}function Yne(){const t=A.useContext(cg),e=()=>{const r=t.xdiFile;if(r!=null&&!t.comparisonFiles.some(i=>i.id==(r==null?void 0:r.id))){const o=[...t.comparisonFiles.length>=3?t.comparisonFiles.slice(1,3):t.comparisonFiles,r];t.setComparisonFiles(o)}},n=()=>{t.setComparisonFiles([])};return C.jsxs(Bs,{children:[C.jsx(ou,{variant:"contained",onClick:e,children:"Store Selected"}),C.jsx(ou,{variant:"outlined",onClick:n,children:"Clear All"}),C.jsx(E6,{component:gu,children:C.jsxs(S6,{sx:{minWidth:650},size:"small","aria-label":"a dense table",children:[C.jsx(C6,{children:C.jsxs(Yb,{children:[C.jsx(Ts,{children:"Element"}),C.jsx(Ts,{align:"center",children:"Edge"}),C.jsx(Ts,{align:"center",children:"Name"})]})}),C.jsx(M6,{children:t.comparisonFiles.map((r,i)=>qne({key:i,xdiFile:r}))})]})})]})}function oM(t){const{children:e,value:n,index:r,...i}=t;return C.jsx("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...i,children:n===r&&C.jsx(Bs,{sx:{p:1},children:e})})}function sM(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}function OR(t){const[e,n]=A.useState(0),r=(i,o)=>{n(o)};return C.jsxs(Bs,{sx:{width:"100%"},children:[C.jsx(Bs,{sx:{borderBottom:1,borderColor:"divider"},children:C.jsxs(Fte,{value:e,onChange:r,"aria-label":"basic tabs example",children:[C.jsx(tM,{label:"Metadata",...sM(0)}),C.jsx(tM,{label:"Raw File",...sM(1)}),t.showCompare&&C.jsx(tM,{label:"Comparison",...sM(2)})]})}),C.jsx(oM,{value:e,index:0,children:C.jsx(Hne,{standard:t.standard,showDownload:t.showDownload})}),C.jsx(oM,{value:e,index:1,children:C.jsx(Gne,{})}),t.showCompare&&C.jsx(oM,{value:e,index:2,children:C.jsx(Yne,{})})]})}const U6=[{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 wc=function(){return wc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{s==null||s.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:C.jsx("div",{className:"symbol",style:{color:t.has(a.Symbol)?n:e,fontSize:"small",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a.Symbol})}):C.jsx("div",{})}}function cre(t){const e=(a,l)=>{t.onClickElement(l.Symbol)},n=mu(),r=n.palette.background.default,i=n.palette.primary.main,o=n.palette.primary.contrastText,s=n.palette.primary.dark;return C.jsx(Bs,{sx:{bgcolor:r},children:C.jsx(Jne,{onClick:e,Element:lre({availableElements:t.availableElements,backgroundColor:i,textColor:o,disabledColor:s}),squareSize:t.elementSize,margin:0})})}function ure(t){const e=t.availableElements,[n,r]=A.useState(null),i=mu(),o=Oz(i.breakpoints.down("lg")),s=f=>{r(f.currentTarget)},a=()=>{r(null)},l=!!n,c=l?"simple-popover":void 0,u=o?30:55;return C.jsxs(rs,{direction:"row",spacing:2,children:[C.jsxs(u6,{children:[C.jsx(h6,{id:"Element",children:"Element"}),C.jsxs(IR,{sx:{minWidth:150},labelId:"Element",id:"Element",value:t.selectedElement,label:"Element",onChange:f=>t.setSelectedElement(f.target.value),children:[C.jsx(g4,{value:"all",children:"All Elements"}),[...e].map((f,h)=>C.jsx(g4,{value:f,children:f},h))]})]}),C.jsx(ou,{"aria-describedby":c,variant:"outlined",sx:{textTransform:"none"},onClick:s,children:"Periodic Table"}),C.jsx(x6,{id:c,open:l,anchorEl:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:C.jsx(cre,{availableElements:t.availableElements,onClickElement:f=>{t.availableElements.has(f)&&t.setSelectedElement(f),r(null)},elementSize:u})})]})}const Qa=7,Vh=qe(Ts)(({theme:t})=>({[`&.${gm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${gm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),fre=qe(Yb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function dre(t){var n,r,i,o,s;const e=t.xasstandard===t.selected?"activeclicked":"";return C.jsxs(fre,{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:[C.jsx(Vh,{align:"left",children:((n=t.xasstandard)==null?void 0:n.element.symbol)??" "}),C.jsx(Vh,{align:"center",children:((r=t.xasstandard)==null?void 0:r.edge.name)??""}),C.jsx(Vh,{align:"center",children:((i=t.xasstandard)==null?void 0:i.sample.name)??""}),C.jsx(Vh,{align:"center",children:((o=t.xasstandard)==null?void 0:o.sample.prep)??""}),C.jsx(Vh,{align:"right",children:((s=t.xasstandard)==null?void 0:s.beamline.name)??""})]},t.key)}function hre(t){const[e,n]=A.useState(-1),r=()=>{t.setOffset(t.offset+Qa)},i=()=>{t.setOffset(t.offset-Qa)},o=a=>{t.updatePlot(a.location),t.setSelectedStandard(a)};let s=[...t.standards];if(s.length<=Qa)for(;s.lengthdre({key:l,xasstandard:a,selected:t.selectedStandard,updatePlot:o,selectedRow:e,setSelectedRow:n}))})]})}),C.jsxs(rs,{direction:"row",spacing:2,children:[C.jsx(ou,{variant:"contained",disabled:t.offset===0,onClick:i,children:"<"}),C.jsx(ou,{variant:"contained",disabled:t.standards.length"})]})]})}function pre(t){const[e,n]=A.useState(),[r,i]=A.useState("all"),[o,s]=A.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),s(0)};return C.jsxs(rs,{spacing:2,children:[C.jsx(ure,{availableElements:l,selectedElement:r,setSelectedElement:u}),C.jsx(hre,{standards:c,updatePlot:t.updatePlot,selectedStandard:e,setSelectedStandard:n,offset:o,setOffset:s}),e&&C.jsx(OR,{standard:e,showDownload:!0,showCompare:!0})]})}class mre{constructor(e,n,r,i){Vt(this,"namespace");Vt(this,"tag");Vt(this,"value");Vt(this,"unit");this.namespace=e,this.tag=n,this.value=r,this.unit=i}}const ht=class ht{constructor(e,n,r,i,o,s,a,l,c,u){Vt(this,"element");Vt(this,"edge");Vt(this,"sample");Vt(this,"beamline");Vt(this,"date");Vt(this,"columns");Vt(this,"comments");Vt(this,"data");Vt(this,"raw");Vt(this,"id");this.element=e,this.edge=n,this.sample=r,this.beamline=i,this.date=o,this.columns=s,this.comments=a,this.data=l,this.raw=c,this.id=u}static parseFile(e,n){const r=e.split(` `),i={},o=[];let s=null,a=null,l=null,c=null;const u=[];let f=!1,h="";for(let v=0;vMath.log2(v/m.itrans[x]))),!("murefer"in m)&&"irefer"in m&&"i0"in m&&(m.murefer=m.i0.map((v,x)=>Math.log2(v/m.irefer[x]))),!("mufluor"in m)&&"ifluor"in m&&"i0"in m&&(m.mufluor=m.i0.map((v,x)=>m.ifluor[x]/v)),new ht(a,l,i,s,c,o,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=(o,s)=>s.some(a=>o.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(),o=n.slice(r+1).trim(),s=i.indexOf("."),a=i.slice(0,s),l=i.slice(s+1).toLowerCase(),c=a===ht.COLUMN;let u=o,f=null;if(c){const h=o.split(" ");u=h[0].trim(),f=c&&h.length>1?h[1].trim():null}return new hne(a,l,u,f)}};Vt(ht,"COMMENT_TOKEN","#"),Vt(ht,"HEADER_SPLIT_TOKEN",":"),Vt(ht,"NAMESPACE_SEPARATOR","."),Vt(ht,"SAMPLE","Sample"),Vt(ht,"ELEMENT","Element"),Vt(ht,"BEAMLINE","Beamline"),Vt(ht,"SCAN","Scan"),Vt(ht,"SYMBOL","symbol"),Vt(ht,"EDGE","edge"),Vt(ht,"PREP","prep"),Vt(ht,"STOICHIOMETRY","stoichiometry"),Vt(ht,"COLUMN","Column"),Vt(ht,"START_TIME","start_time"),Vt(ht,"NAME","name"),Vt(ht,"ENERGY","energy"),Vt(ht,"IREFER","irefer"),Vt(ht,"MUREFER","murefer"),Vt(ht,"TRANS","trans"),Vt(ht,"FLUOR","fluor"),Vt(ht,"MU","mu"),Vt(ht,"I","i"),Vt(ht,"I0","i0"),Vt(ht,"MUSPEC",[ht.MU+ht.TRANS,ht.MU+ht.FLUOR]),Vt(ht,"ISPEC",[ht.I+ht.TRANS,ht.I+ht.FLUOR]);let _d=ht;const pne="/webxdiviewer/xdidata/db.json";function mne(){const[t,e]=A.useState([]);return A.useEffect(()=>{Dn.get(pne).then(n=>{e(n.data)})},[]),t}const OR=A.createContext([]);function gne(t){const{children:e}=t,n=mne();return C.jsx(OR.Provider,{value:n,children:e})}function gr(t){const e=A.useRef(t);return e.current=t,A.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function DR(t){const e=gr(t);A.useEffect(()=>()=>{e.current()},[])}const C1=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function P6(t){const e=gr(t),n=A.useRef(0),r=A.useCallback(()=>{C1&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return DR(r),[A.useMemo(()=>{const i=(...o)=>{C1&&(r(),n.current=requestAnimationFrame(()=>{e.current(...o),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function vne(t,e,n,r=!1){const i=A.useRef(),o=A.useRef();return DR(()=>{i.current&&(clearTimeout(i.current),i.current=void 0)}),A.useMemo(()=>{const s=(l,c)=>{o.current=void 0,t.apply(l,c),i.current=setTimeout(()=>{i.current=void 0,!r&&o.current&&(s(o.current.this,o.current.args),o.current=void 0)},n)},a=function(...l){if(i.current){o.current={args:l,this:this};return}s(this,l)};return Object.defineProperties(a,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__throttled__${n}`}}),a},[n,r,...e])}function N6(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function I6(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const yne=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function xne(t=!1){const e=A.useRef(t),n=A.useCallback(()=>e.current,[]);return A.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const bne=t=>(t+1)%Number.MAX_SAFE_INTEGER;function L6(){const[,t]=A.useState(0);return A.useCallback(()=>{t(bne)},[])}function _ne(t,e){return typeof t=="function"?t(e):t}const sM=Map.prototype;function wne(t){const e=A.useRef(),n=L6();if(!e.current){const r=new Map(t);e.current=r,r.set=(...i)=>(sM.set.apply(r,i),n(),r),r.clear=(...i)=>{sM.clear.apply(r,i),n()},r.delete=(...i)=>{const o=sM.delete.apply(r,i);return n(),o}}return e.current}function R4(t){const e=A.useRef();return A.useEffect(()=>{e.current=t}),e.current}function Sne(t){const[e,n]=A.useState(t),[r,i]=P6(n);return DR(i),[e,r]}function Kb(t=!1,e=!0){const[n,r]=A.useState(t),i=gr(e);return[n,A.useCallback(o=>{r(s=>o===void 0||i.current&&typeof o=="object"&&(o.constructor.name==="SyntheticBaseEvent"||typeof o._reactName=="string")?!s:!!_ne(o,s))},[])]}function Mne(t,e,n){const r=gr(e),i=gr(n);return A.useMemo(()=>{let o=t;return{get current(){return i.current===void 0?o:i.current(o)},set current(s){o=r.current===void 0?s:r.current(s)}}},[])}let ov;function Ene(){if(!C1)return;if(ov)return ov;const t=new Map,e=new ResizeObserver(n=>{var r;for(const i of n)(r=t.get(i.target))==null||r.forEach(o=>setTimeout(()=>{o(i)},0))});return ov={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)))}},ov}function Cne(t,e,n=!0){const r=n&&Ene(),i=gr(e),o=t&&"current"in t?t.current:t;A.useEffect(()=>{const s=t&&"current"in t?t.current:t;if(!r||!s)return;let a=!0;const l=(...c)=>{a&&i.current(...c)};return r.subscribe(s,l),()=>{a=!1,r.unsubscribe(s,l)}},[o,r])}function Tne(t=!0){const[e,n]=A.useState(null),r=Mne(null,a=>(n(a),a)),[i,o]=A.useState(),[s]=P6(a=>{o({width:a.contentRect.width,height:a.contentRect.height})});return Cne(e,s,t),[i,r]}function Bc(t,...e){const n=xne(),r=gr(e[1]),i=A.useMemo(()=>function(...o){n()&&(typeof r.current=="function"?r.current.apply(this,o):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,o))},[]);A.useEffect(()=>{const o=Rne(t)?t.current:t;if(!o)return;const s=e.slice(2);return N6(o,e[0],i,...s),()=>{I6(o,e[0],i,...s)}},[t,e[0]])}function Rne(t){return t!==null&&typeof t=="object"&&yne(t,"current")}const Ane=t=>e=>e.key===t,Pne=C1?window:null;function k6(t,e,n=[],r={}){const{event:i="keydown",target:o=Pne,eventOptions:s}=r,a=gr(e),l=A.useMemo(()=>{const c=Ane(t);return function(u){c(u)&&a.current.call(this,u)}},n);Bc(o,i,l,s)}const Nne=["mousedown","touchstart"];function Ine(t,e,n=Nne){const r=gr(e),i=gr(t);A.useEffect(()=>{function o(s){if(!i.current.current)return;const{target:a}=s,l=r.current;(!a||a&&!i.current.current.contains(a))&&l.call(this,s)}for(const s of n)N6(document,s,o,{passive:!0});return()=>{for(const s of n)I6(document,s,o,{passive:!0})}},[...n])}function Oy(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function Lne(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function O6(t){let e,n,r;t.length!==2?(e=Oy,n=(a,l)=>Oy(t(a),l),r=(a,l)=>t(a)-l):(e=t===Oy||t===Lne?t:kne,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:s,right:o}}function kne(){return 0}function One(t){return t===null?NaN:+t}const Dne=O6(Oy),Fne=Dne.right;O6(One).center;const zne=Math.sqrt(50),Une=Math.sqrt(10),Bne=Math.sqrt(2);function T1(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=zne?10:o>=Une?5:o>=Bne?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,i)*s,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=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function R1(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 wd(t){return t=R1(Math.abs(t)),t?t[1]:NaN}function Vne(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function $ne(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Wne=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vm(t){if(!(e=Wne.exec(t)))throw new Error("invalid format: "+t);var e;return new FR({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]})}vm.prototype=FR.prototype;function FR(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+""}FR.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 Hne(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 z6;function Gne(t,e){var n=R1(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(z6=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+R1(t,Math.max(0,e+o-1))[0]}function A4(t,e){var n=R1(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 P4={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:jne,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)=>A4(t*100,e),r:A4,s:Gne,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function N4(t){return t}var I4=Array.prototype.map,L4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Xne(t){var e=t.grouping===void 0||t.thousands===void 0?N4:Vne(I4.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+"",o=t.numerals===void 0?N4:$ne(I4.call(t.numerals,String)),s=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=vm(f);var h=f.fill,m=f.align,v=f.sign,x=f.symbol,y=f.zero,g=f.width,b=f.comma,_=f.precision,S=f.trim,P=f.type;P==="n"?(b=!0,P="g"):P4[P]||(_===void 0&&(_=12),S=!0,P="g"),(y||h==="0"&&m==="=")&&(y=!0,h="0",m="=");var N=x==="$"?n:x==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",T=x==="$"?r:/[%p]/.test(P)?s:"",L=P4[P],U=/[defgprs%]/.test(P);_=_===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function M(R){var D=N,O=T,B,X,H;if(P==="c")O=L(R)+O,R="";else{R=+R;var Z=R<0||1/R<0;if(R=isNaN(R)?l:L(Math.abs(R),_),S&&(R=Hne(R)),Z&&+R==0&&v!=="+"&&(Z=!1),D=(Z?v==="("?v:a:v==="-"||v==="("?"":v)+D,O=(P==="s"?L4[8+z6/3]:"")+O+(Z&&v==="("?")":""),U){for(B=-1,X=R.length;++BH||H>57){O=(H===46?i+R.slice(B+1):R.slice(B))+O,R=R.slice(0,B);break}}}b&&!y&&(R=e(R,1/0));var F=D.length+R.length+O.length,Y=F>1)+D+R+O+Y.slice(F);break;default:R=Y+D+R+O;break}return o(R)}return M.toString=function(){return f+""},M}function u(f,h){var m=c((f=vm(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(wd(h)/3)))*3,x=Math.pow(10,-v),y=L4[8+v/3];return function(g){return m(x*g)+y}}return{format:c,formatPrefix:u}}var sv,Gs,U6;qne({thousands:",",grouping:[3],currency:["$",""]});function qne(t){return sv=Xne(t),Gs=sv.format,U6=sv.formatPrefix,sv}function Yne(t){return Math.max(0,-wd(Math.abs(t)))}function Kne(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(wd(e)/3)))*3-wd(Math.abs(t)))}function Zne(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,wd(e)-wd(t))+1}function Jne(t){for(var e=new Array(t),n=0;nMath.log2(v/m.itrans[x]))),!("murefer"in m)&&"irefer"in m&&"i0"in m&&(m.murefer=m.i0.map((v,x)=>Math.log2(v/m.irefer[x]))),!("mufluor"in m)&&"ifluor"in m&&"i0"in m&&(m.mufluor=m.i0.map((v,x)=>m.ifluor[x]/v)),new ht(a,l,i,s,c,o,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=(o,s)=>s.some(a=>o.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(),o=n.slice(r+1).trim(),s=i.indexOf("."),a=i.slice(0,s),l=i.slice(s+1).toLowerCase(),c=a===ht.COLUMN;let u=o,f=null;if(c){const h=o.split(" ");u=h[0].trim(),f=c&&h.length>1?h[1].trim():null}return new mre(a,l,u,f)}};Vt(ht,"COMMENT_TOKEN","#"),Vt(ht,"HEADER_SPLIT_TOKEN",":"),Vt(ht,"NAMESPACE_SEPARATOR","."),Vt(ht,"SAMPLE","Sample"),Vt(ht,"ELEMENT","Element"),Vt(ht,"BEAMLINE","Beamline"),Vt(ht,"SCAN","Scan"),Vt(ht,"SYMBOL","symbol"),Vt(ht,"EDGE","edge"),Vt(ht,"PREP","prep"),Vt(ht,"STOICHIOMETRY","stoichiometry"),Vt(ht,"COLUMN","Column"),Vt(ht,"START_TIME","start_time"),Vt(ht,"NAME","name"),Vt(ht,"ENERGY","energy"),Vt(ht,"IREFER","irefer"),Vt(ht,"MUREFER","murefer"),Vt(ht,"TRANS","trans"),Vt(ht,"FLUOR","fluor"),Vt(ht,"MU","mu"),Vt(ht,"I","i"),Vt(ht,"I0","i0"),Vt(ht,"MUSPEC",[ht.MU+ht.TRANS,ht.MU+ht.FLUOR]),Vt(ht,"ISPEC",[ht.I+ht.TRANS,ht.I+ht.FLUOR]);let wd=ht;const gre="/webxdiviewer/xdidata/db.json";function vre(){const[t,e]=A.useState([]);return A.useEffect(()=>{Dn.get(gre).then(n=>{e(n.data)})},[]),t}const DR=A.createContext([]);function yre(t){const{children:e}=t,n=vre();return C.jsx(DR.Provider,{value:n,children:e})}function gr(t){const e=A.useRef(t);return e.current=t,A.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function FR(t){const e=gr(t);A.useEffect(()=>()=>{e.current()},[])}const P1=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function V6(t){const e=gr(t),n=A.useRef(0),r=A.useCallback(()=>{P1&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return FR(r),[A.useMemo(()=>{const i=(...o)=>{P1&&(r(),n.current=requestAnimationFrame(()=>{e.current(...o),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function xre(t,e,n,r=!1){const i=A.useRef(),o=A.useRef();return FR(()=>{i.current&&(clearTimeout(i.current),i.current=void 0)}),A.useMemo(()=>{const s=(l,c)=>{o.current=void 0,t.apply(l,c),i.current=setTimeout(()=>{i.current=void 0,!r&&o.current&&(s(o.current.this,o.current.args),o.current=void 0)},n)},a=function(...l){if(i.current){o.current={args:l,this:this};return}s(this,l)};return Object.defineProperties(a,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__throttled__${n}`}}),a},[n,r,...e])}function $6(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function W6(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const bre=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function _re(t=!1){const e=A.useRef(t),n=A.useCallback(()=>e.current,[]);return A.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const wre=t=>(t+1)%Number.MAX_SAFE_INTEGER;function H6(){const[,t]=A.useState(0);return A.useCallback(()=>{t(wre)},[])}function Sre(t,e){return typeof t=="function"?t(e):t}const aM=Map.prototype;function Mre(t){const e=A.useRef(),n=H6();if(!e.current){const r=new Map(t);e.current=r,r.set=(...i)=>(aM.set.apply(r,i),n(),r),r.clear=(...i)=>{aM.clear.apply(r,i),n()},r.delete=(...i)=>{const o=aM.delete.apply(r,i);return n(),o}}return e.current}function k4(t){const e=A.useRef();return A.useEffect(()=>{e.current=t}),e.current}function Ere(t){const[e,n]=A.useState(t),[r,i]=V6(n);return FR(i),[e,r]}function Qb(t=!1,e=!0){const[n,r]=A.useState(t),i=gr(e);return[n,A.useCallback(o=>{r(s=>o===void 0||i.current&&typeof o=="object"&&(o.constructor.name==="SyntheticBaseEvent"||typeof o._reactName=="string")?!s:!!Sre(o,s))},[])]}function Cre(t,e,n){const r=gr(e),i=gr(n);return A.useMemo(()=>{let o=t;return{get current(){return i.current===void 0?o:i.current(o)},set current(s){o=r.current===void 0?s:r.current(s)}}},[])}let ov;function Tre(){if(!P1)return;if(ov)return ov;const t=new Map,e=new ResizeObserver(n=>{var r;for(const i of n)(r=t.get(i.target))==null||r.forEach(o=>setTimeout(()=>{o(i)},0))});return ov={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)))}},ov}function Rre(t,e,n=!0){const r=n&&Tre(),i=gr(e),o=t&&"current"in t?t.current:t;A.useEffect(()=>{const s=t&&"current"in t?t.current:t;if(!r||!s)return;let a=!0;const l=(...c)=>{a&&i.current(...c)};return r.subscribe(s,l),()=>{a=!1,r.unsubscribe(s,l)}},[o,r])}function Are(t=!0){const[e,n]=A.useState(null),r=Cre(null,a=>(n(a),a)),[i,o]=A.useState(),[s]=V6(a=>{o({width:a.contentRect.width,height:a.contentRect.height})});return Rre(e,s,t),[i,r]}function Bc(t,...e){const n=_re(),r=gr(e[1]),i=A.useMemo(()=>function(...o){n()&&(typeof r.current=="function"?r.current.apply(this,o):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,o))},[]);A.useEffect(()=>{const o=Pre(t)?t.current:t;if(!o)return;const s=e.slice(2);return $6(o,e[0],i,...s),()=>{W6(o,e[0],i,...s)}},[t,e[0]])}function Pre(t){return t!==null&&typeof t=="object"&&bre(t,"current")}const Nre=t=>e=>e.key===t,Ire=P1?window:null;function G6(t,e,n=[],r={}){const{event:i="keydown",target:o=Ire,eventOptions:s}=r,a=gr(e),l=A.useMemo(()=>{const c=Nre(t);return function(u){c(u)&&a.current.call(this,u)}},n);Bc(o,i,l,s)}const Lre=["mousedown","touchstart"];function kre(t,e,n=Lre){const r=gr(e),i=gr(t);A.useEffect(()=>{function o(s){if(!i.current.current)return;const{target:a}=s,l=r.current;(!a||a&&!i.current.current.contains(a))&&l.call(this,s)}for(const s of n)$6(document,s,o,{passive:!0});return()=>{for(const s of n)W6(document,s,o,{passive:!0})}},[...n])}function Dy(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function Ore(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function X6(t){let e,n,r;t.length!==2?(e=Dy,n=(a,l)=>Dy(t(a),l),r=(a,l)=>t(a)-l):(e=t===Dy||t===Ore?t:Dre,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:s,right:o}}function Dre(){return 0}function Fre(t){return t===null?NaN:+t}const zre=X6(Dy),Ure=zre.right;X6(Fre).center;const Bre=Math.sqrt(50),jre=Math.sqrt(10),Vre=Math.sqrt(2);function N1(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Bre?10:o>=jre?5:o>=Vre?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,i)*s,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=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function I1(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 Sd(t){return t=I1(Math.abs(t)),t?t[1]:NaN}function Wre(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Hre(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Gre=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xm(t){if(!(e=Gre.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]})}xm.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 Xre(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 K6;function qre(t,e){var n=I1(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(K6=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+I1(t,Math.max(0,e+o-1))[0]}function O4(t,e){var n=I1(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 D4={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:$re,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)=>O4(t*100,e),r:O4,s:qre,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function F4(t){return t}var z4=Array.prototype.map,U4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Yre(t){var e=t.grouping===void 0||t.thousands===void 0?F4:Wre(z4.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+"",o=t.numerals===void 0?F4:Hre(z4.call(t.numerals,String)),s=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=xm(f);var h=f.fill,m=f.align,v=f.sign,x=f.symbol,y=f.zero,g=f.width,b=f.comma,_=f.precision,S=f.trim,P=f.type;P==="n"?(b=!0,P="g"):D4[P]||(_===void 0&&(_=12),S=!0,P="g"),(y||h==="0"&&m==="=")&&(y=!0,h="0",m="=");var N=x==="$"?n:x==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",T=x==="$"?r:/[%p]/.test(P)?s:"",L=D4[P],U=/[defgprs%]/.test(P);_=_===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function M(R){var D=N,O=T,B,X,H;if(P==="c")O=L(R)+O,R="";else{R=+R;var Z=R<0||1/R<0;if(R=isNaN(R)?l:L(Math.abs(R),_),S&&(R=Xre(R)),Z&&+R==0&&v!=="+"&&(Z=!1),D=(Z?v==="("?v:a:v==="-"||v==="("?"":v)+D,O=(P==="s"?U4[8+K6/3]:"")+O+(Z&&v==="("?")":""),U){for(B=-1,X=R.length;++BH||H>57){O=(H===46?i+R.slice(B+1):R.slice(B))+O,R=R.slice(0,B);break}}}b&&!y&&(R=e(R,1/0));var F=D.length+R.length+O.length,Y=F>1)+D+R+O+Y.slice(F);break;default:R=Y+D+R+O;break}return o(R)}return M.toString=function(){return f+""},M}function u(f,h){var m=c((f=xm(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Sd(h)/3)))*3,x=Math.pow(10,-v),y=U4[8+v/3];return function(g){return m(x*g)+y}}return{format:c,formatPrefix:u}}var sv,Gs,Z6;Kre({thousands:",",grouping:[3],currency:["$",""]});function Kre(t){return sv=Yre(t),Gs=sv.format,Z6=sv.formatPrefix,sv}function Zre(t){return Math.max(0,-Sd(Math.abs(t)))}function Jre(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sd(e)/3)))*3-Sd(Math.abs(t)))}function Qre(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Sd(e)-Sd(t))+1}function eie(t){for(var e=new Array(t),n=0;n * @license MIT - */var ere=function(t){return t!=null&&(B6(t)||tre(t)||!!t._isBuffer)};function B6(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function tre(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&B6(t.slice(0,0))}var nre=Qne,rre=ere,ire=typeof Float64Array<"u";function ore(t,e){return t[0]-e[0]}function sre(){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("+s.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("+s.join(",")+"){"),r?i.push("return this.data.get("+a+")}"):i.push("return this.data["+a+"]}"),i.push("proto.index=function "+n+"_index(",s.join(),"){return "+a+"}"),i.push("proto.hi=function "+n+"_hi("+s.join(",")+"){return new "+n+"(this.data,"+o.map(function(y){return["(typeof i",y,"!=='number'||i",y,"<0)?this.shape[",y,"]:i",y,"|0"].join("")}).join(",")+","+o.map(function(y){return"this.stride["+y+"]"}).join(",")+",this.offset)}");var u=o.map(function(y){return"a"+y+"=this.shape["+y+"]"}),f=o.map(function(y){return"c"+y+"=this.stride["+y+"]"});i.push("proto.lo=function "+n+"_lo("+s.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,"+o.map(function(y){return"a"+y}).join(",")+","+o.map(function(y){return"c"+y}).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+s.join(",")+"){var "+o.map(function(y){return"a"+y+"=this.shape["+y+"]"}).join(",")+","+o.map(function(y){return"b"+y+"=this.stride["+y+"]"}).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,"+o.map(function(y){return"shape["+y+"]"}).join(",")+","+o.map(function(y){return"stride["+y+"]"}).join(",")+",offset)}");var x=new Function("CTOR_LIST","ORDER",i.join(` -`));return x(A1[t],sre)}function lre(t){if(rre(t))return"buffer";if(ire)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 A1={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};function cre(t,e,n,r){if(t===void 0){var c=A1.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 o=i-1,s=1;o>=0;--o)n[o]=s,s*=e[o]}if(r===void 0){r=0;for(var o=0;o0,s=[],a=[],l=0,c=0,u,f;for(u=0;u0&&s.push("var "+a.join(",")),u=r-1;u>=0;--u)l=t[u],s.push(["for(i",u,"=0;i",u,"0&&s.push(["index[",c,"]-=s",c].join("")),s.push(["++index[",l,"]"].join(""))),s.push("}")}return s.join(` -`)}function vre(t,e,n,r){for(var i=e.length,o=n.arrayArgs.length,s=n.blockSize,a=n.indexArgs.length>0,l=[],c=0;c0;){"].join("")),l.push(["if(j",c,"<",s,"){"].join("")),l.push(["s",e[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",e[c],"=",s].join("")),l.push(["j",c,"-=",s,"}"].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("+s.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("+s.join(",")+"){"),r?i.push("return this.data.get("+a+")}"):i.push("return this.data["+a+"]}"),i.push("proto.index=function "+n+"_index(",s.join(),"){return "+a+"}"),i.push("proto.hi=function "+n+"_hi("+s.join(",")+"){return new "+n+"(this.data,"+o.map(function(y){return["(typeof i",y,"!=='number'||i",y,"<0)?this.shape[",y,"]:i",y,"|0"].join("")}).join(",")+","+o.map(function(y){return"this.stride["+y+"]"}).join(",")+",this.offset)}");var u=o.map(function(y){return"a"+y+"=this.shape["+y+"]"}),f=o.map(function(y){return"c"+y+"=this.stride["+y+"]"});i.push("proto.lo=function "+n+"_lo("+s.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,"+o.map(function(y){return"a"+y}).join(",")+","+o.map(function(y){return"c"+y}).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+s.join(",")+"){var "+o.map(function(y){return"a"+y+"=this.shape["+y+"]"}).join(",")+","+o.map(function(y){return"b"+y+"=this.stride["+y+"]"}).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,"+o.map(function(y){return"shape["+y+"]"}).join(",")+","+o.map(function(y){return"stride["+y+"]"}).join(",")+",offset)}");var x=new Function("CTOR_LIST","ORDER",i.join(` +`));return x(L1[t],lie)}function uie(t){if(oie(t))return"buffer";if(sie)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 L1={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};function fie(t,e,n,r){if(t===void 0){var c=L1.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 o=i-1,s=1;o>=0;--o)n[o]=s,s*=e[o]}if(r===void 0){r=0;for(var o=0;o0,s=[],a=[],l=0,c=0,u,f;for(u=0;u0&&s.push("var "+a.join(",")),u=r-1;u>=0;--u)l=t[u],s.push(["for(i",u,"=0;i",u,"0&&s.push(["index[",c,"]-=s",c].join("")),s.push(["++index[",l,"]"].join(""))),s.push("}")}return s.join(` +`)}function xie(t,e,n,r){for(var i=e.length,o=n.arrayArgs.length,s=n.blockSize,a=n.indexArgs.length>0,l=[],c=0;c0;){"].join("")),l.push(["if(j",c,"<",s,"){"].join("")),l.push(["s",e[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",e[c],"=",s].join("")),l.push(["j",c,"-=",s,"}"].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 bre(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),o=0;o0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var y=new Array(n),o=0;o0&&v.push("var "+x.join(","));for(var o=0;o3&&v.push(aM(t.pre,t,i));var S=aM(t.body,t,i),P=yre(u);P3&&v.push(aM(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: +`).trim()}function _ie(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 wie(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),o=0;o0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var y=new Array(n),o=0;o0&&v.push("var "+x.join(","));for(var o=0;o3&&v.push(lM(t.pre,t,i));var S=lM(t.body,t,i),P=bie(u);P3&&v.push(lM(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: `+v.join(` `)+` -----------`);var N=[t.funcName||"unnamed","_cwise_loop_",r[0].join("s"),"m",P,xre(i)].join(""),T=new Function(["function ",N,"(",m.join(","),"){",v.join(` -`),"} return ",N].join(""));return T()}var _re=bre,wre=_re;function Sre(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=[],o=[],s=[["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,Ere(e)}var Rre=Tre;(function(t){var e=Rre,n={body:"",args:[],thisVars:[],localVars:[]};function r(h){if(!h)return n;for(var m=0;m>",rrshift:">>>"};(function(){for(var h in s){var m=s[h];t[h]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+m+"=b"},rvalue:!0,funcName:h+"eq"}),t[h+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"seq"]=o({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]=o({args:["array","array"],body:{args:["a","b"],body:"a="+m+"b"},funcName:h}),t[h+"eq"]=o({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]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+m+"b"},rvalue:!0,count:2,funcName:h+"eq"}),t[h+"seq"]=o({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=o({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=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=o({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"})})(fre);/** +`));return f(Mie.bind(void 0,t))}var Cie=Eie,Tie=Cie;function Rie(){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 Aie(t){var e=new Rie;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,Tie(e)}var Pie=Aie;(function(t){var e=Pie,n={body:"",args:[],thisVars:[],localVars:[]};function r(h){if(!h)return n;for(var m=0;m>",rrshift:">>>"};(function(){for(var h in s){var m=s[h];t[h]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+m+"=b"},rvalue:!0,funcName:h+"eq"}),t[h+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"seq"]=o({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]=o({args:["array","array"],body:{args:["a","b"],body:"a="+m+"b"},funcName:h}),t[h+"eq"]=o({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]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+m+"c"},funcName:h}),t[h+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+m+"s"},funcName:h+"s"}),t[h+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+m+"b"},rvalue:!0,count:2,funcName:h+"eq"}),t[h+"seq"]=o({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=o({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=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=o({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"})})(hie);/** * @license * Copyright 2010-2024 Three.js Authors * SPDX-License-Identifier: MIT - */const Zb="169",Are={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Pre={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},$6=0,eC=1,W6=2,Nre=3,H6=0,Jb=1,Ap=2,Yo=3,Pa=0,fi=1,Qo=2,wa=0,jc=1,tC=2,nC=3,rC=4,G6=5,hl=100,X6=101,q6=102,Y6=103,K6=104,Z6=200,J6=201,Q6=202,eU=203,P1=204,N1=205,tU=206,nU=207,rU=208,iU=209,oU=210,sU=211,aU=212,lU=213,cU=214,I1=0,L1=1,k1=2,su=3,O1=4,D1=5,F1=6,z1=7,cg=0,uU=1,fU=2,Os=0,dU=1,hU=2,pU=3,zR=4,mU=5,gU=6,vU=7,iC="attached",yU="detached",ug=300,Na=301,Nl=302,ym=303,xm=304,qd=306,bm=1e3,Ti=1001,_m=1002,lr=1003,UR=1004,Ire=1004,jf=1005,Lre=1005,tr=1006,Pp=1007,kre=1007,Rs=1008,Ore=1008,Fi=1009,BR=1010,jR=1011,Sd=1012,Qb=1013,Ia=1014,ai=1015,xu=1016,e_=1017,t_=1018,au=1020,VR=35902,$R=1021,WR=1022,Rr=1023,HR=1024,GR=1025,Vc=1026,lu=1027,fg=1028,dg=1029,XR=1030,n_=1031,Dre=1032,r_=1033,Np=33776,Ip=33777,Lp=33778,kp=33779,U1=35840,B1=35841,j1=35842,V1=35843,$1=36196,W1=37492,H1=37496,G1=37808,X1=37809,q1=37810,Y1=37811,K1=37812,Z1=37813,J1=37814,Q1=37815,ex=37816,tx=37817,nx=37818,rx=37819,ix=37820,ox=37821,Op=36492,sx=36494,ax=36495,qR=36283,lx=36284,cx=36285,ux=36286,xU=2200,bU=2201,_U=2202,wm=2300,fx=2301,Dy=2302,Nc=2400,Ic=2401,Sm=2402,i_=2500,YR=2501,Fre=0,zre=1,Ure=2,wU=3200,SU=3201,Bre=3202,jre=3203,jl=0,MU=1,ha="",Eo="srgb",Fa="srgb-linear",o_="display-p3",hg="display-p3-linear",Mm="linear",xn="srgb",Em="rec709",Cm="p3",Vre=0,xc=7680,$re=7681,Wre=7682,Hre=7683,Gre=34055,Xre=34056,qre=5386,Yre=512,Kre=513,Zre=514,Jre=515,Qre=516,eie=517,tie=518,oC=519,EU=512,CU=513,TU=514,KR=515,RU=516,AU=517,PU=518,NU=519,Tm=35044,nie=35048,rie=35040,iie=35045,oie=35049,sie=35041,aie=35046,lie=35050,cie=35042,uie="100",sC="300 es",As=2e3,Rm=2001;class Xs{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){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o>8&255]+jr[t>>16&255]+jr[t>>24&255]+"-"+jr[e&255]+jr[e>>8&255]+"-"+jr[e>>16&15|64]+jr[e>>24&255]+"-"+jr[n&63|128]+jr[n>>8&255]+"-"+jr[n>>16&255]+jr[n>>24&255]+jr[r&255]+jr[r>>8&255]+jr[r>>16&255]+jr[r>>24&255]).toLowerCase()}function $n(t,e,n){return Math.max(e,Math.min(n,t))}function ZR(t,e){return(t%e+e)%e}function fie(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function die(t,e,n){return t!==e?(n-t)/(e-t):0}function Dp(t,e,n){return(1-n)*t+n*e}function hie(t,e,n,r){return Dp(t,e,1-Math.exp(-n*r))}function pie(t,e=1){return e-Math.abs(ZR(t,e*2)-e)}function mie(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function gie(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function vie(t,e){return t+Math.floor(Math.random()*(e-t+1))}function yie(t,e){return t+Math.random()*(e-t)}function xie(t){return t*(.5-Math.random())}function bie(t){t!==void 0&&(k4=t);let e=k4+=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 _ie(t){return t*$c}function wie(t){return t*Md}function Sie(t){return(t&t-1)===0&&t!==0}function Mie(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Eie(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Cie(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),f=o((e-r)/2),h=s((e-r)/2),m=o((r-e)/2),v=s((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*v,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*v,a*c);break;case"ZYZ":t.set(l*v,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function si(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 Dt(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 IU={DEG2RAD:$c,RAD2DEG:Md,generateUUID:eo,clamp:$n,euclideanModulo:ZR,mapLinear:fie,inverseLerp:die,lerp:Dp,damp:hie,pingpong:pie,smoothstep:mie,smootherstep:gie,randInt:vie,randFloat:yie,randFloatSpread:xie,seededRandom:bie,degToRad:_ie,radToDeg:wie,isPowerOfTwo:Sie,ceilPowerOfTwo:Mie,floorPowerOfTwo:Eie,setQuaternionFromProperEuler:Cie,normalize:Dt,denormalize:si};class Ie{constructor(e=0,n=0){Ie.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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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($n(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),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ot{constructor(e,n,r,i,o,s,a,l,c){Ot.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,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,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],f=r[7],h=r[2],m=r[5],v=r[8],x=i[0],y=i[3],g=i[6],b=i[1],_=i[4],S=i[7],P=i[2],N=i[5],T=i[8];return o[0]=s*x+a*b+l*P,o[3]=s*y+a*_+l*N,o[6]=s*g+a*S+l*T,o[1]=c*x+u*b+f*P,o[4]=c*y+u*_+f*N,o[7]=c*g+u*S+f*T,o[2]=h*x+m*b+v*P,o[5]=h*y+m*_+v*N,o[8]=h*g+m*S+v*T,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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*s-a*c,h=a*l-u*o,m=c*o-s*l,v=n*f+r*h+i*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/v;return e[0]=f*x,e[1]=(i*c-u*r)*x,e[2]=(a*r-i*s)*x,e[3]=h*x,e[4]=(u*n-i*l)*x,e[5]=(i*o-a*n)*x,e[6]=m*x,e[7]=(r*l-c*n)*x,e[8]=(s*n-r*o)*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,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(lM.makeScale(e,n)),this}rotate(e){return this.premultiply(lM.makeRotation(-e)),this}translate(e,n){return this.premultiply(lM.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 lM=new Ot;function LU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const Tie={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Vf(t,e){return new Tie[t](e)}function Am(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function kU(){const t=Am("canvas");return t.style.display="block",t}const O4={};function Fy(t){t in O4||(O4[t]=!0,console.warn(t))}function Rie(t,e,n){return new Promise(function(r,i){function o(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(o,n);break;default:r()}}setTimeout(o,n)})}function Aie(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 Pie(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 D4=new Ot().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),F4=new Ot().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),$h={[Fa]:{transfer:Mm,primaries:Em,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t,fromReference:t=>t},[Eo]:{transfer:xn,primaries:Em,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[hg]:{transfer:Mm,primaries:Cm,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.applyMatrix3(F4),fromReference:t=>t.applyMatrix3(D4)},[o_]:{transfer:xn,primaries:Cm,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.convertSRGBToLinear().applyMatrix3(F4),fromReference:t=>t.applyMatrix3(D4).convertLinearToSRGB()}},Nie=new Set([Fa,hg]),an={enabled:!0,_workingColorSpace:Fa,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Nie.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=$h[e].toReference,i=$h[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return $h[t].primaries},getTransfer:function(t){return t===ha?Mm:$h[t].transfer},getLuminanceCoefficients:function(t,e=this._workingColorSpace){return t.fromArray($h[e].luminanceCoefficients)}};function od(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function cM(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Zu;class OU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Zu===void 0&&(Zu=Am("canvas")),Zu.width=e.width,Zu.height=e.height;const r=Zu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Zu}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Am("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),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==ug)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case bm:e.x=e.x-Math.floor(e.x);break;case Ti:e.x=e.x<0?0:1;break;case _m: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 bm:e.y=e.y-Math.floor(e.y);break;case Ti:e.y=e.y<0?0:1;break;case _m: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++}}kn.DEFAULT_IMAGE=null;kn.DEFAULT_MAPPING=ug;kn.DEFAULT_ANISOTROPY=1;class Zt{constructor(e=0,n=0,r=0,i=1){Zt.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,o=this.w,s=e.elements;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.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,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,o;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],m=l[5],v=l[9],x=l[2],y=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-x)<.01&&Math.abs(v-y)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+x)<.1&&Math.abs(v+y)<.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,P=(g+1)/2,N=(u+h)/4,T=(f+x)/4,L=(v+y)/4;return _>S&&_>P?_<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(_),i=N/r,o=T/r):S>P?S<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),r=N/i,o=L/i):P<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(P),r=T/o,i=L/o),this.set(r,i,o,n),this}let b=Math.sqrt((y-v)*(y-v)+(f-x)*(f-x)+(h-u)*(h-u));return Math.abs(b)<.001&&(b=1),this.x=(y-v)/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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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 DU extends Xs{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Zt(0,0,e,n),this.scissorTest=!1,this.viewport=new Zt(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:tr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const o=new kn(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);o.flipY=!1,o.generateMipmaps=r.generateMipmaps,o.internalFormat=r.internalFormat,this.textures=[];const s=r.count;for(let a=0;a=0?1:-1,_=1-g*g;if(_>Number.EPSILON){const P=Math.sqrt(_),N=Math.atan2(P,g*b);y=Math.sin(y*N)/P,a=Math.sin(a*N)/P}const S=a*b;if(l=l*y+h*S,c=c*y+m*S,u=u*y+v*S,f=f*y+x*S,y===1-a){const P=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=P,c*=P,u*=P,f*=P}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],f=o[s],h=o[s+1],m=o[s+2],v=o[s+3];return e[n]=a*v+u*f+l*m-c*h,e[n+1]=l*v+u*h+c*f-a*m,e[n+2]=c*v+u*m+a*h-l*f,e[n+3]=u*v-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,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),f=a(o/2),h=l(r/2),m=l(i/2),v=l(o/2);switch(s){case"XYZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"YXZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"ZXY":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"ZYX":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"YZX":this._x=h*u*f+c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f-h*m*v;break;case"XZY":this._x=h*u*f-c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f+h*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}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],o=n[8],s=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=(o-c)*m,this._z=(s-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+s)/m,this._z=(o+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-r-f);this._w=(o-c)/m,this._x=(i+s)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-r-a);this._w=(s-i)/m,this._x=(o+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($n(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,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*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,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*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=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*s+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*o+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=s*f+this._w*h,this._x=r*f+this._x*h,this._y=i*f+this._y*h,this._z=o*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),o=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),o*Math.sin(n),o*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 G{constructor(e=0,n=0,r=0){G.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(z4.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(z4.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);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}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),f=2*(o*r-s*n);return this.x=n+l*c+s*f-a*u,this.y=r+l*u+a*c-o*f,this.z=i+l*f+o*u-s*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,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,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 fM.copy(this).projectOnVector(e),this.sub(fM)}reflect(e){return this.sub(fM.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($n(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 fM=new G,z4=new ki;class Pr{constructor(e=new G(1/0,1/0,1/0),n=new G(-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,Wo),Wo.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(Wh),lv.subVectors(this.max,Wh),Ju.subVectors(e.a,Wh),Qu.subVectors(e.b,Wh),ef.subVectors(e.c,Wh),el.subVectors(Qu,Ju),tl.subVectors(ef,Qu),rc.subVectors(Ju,ef);let n=[0,-el.z,el.y,0,-tl.z,tl.y,0,-rc.z,rc.y,el.z,0,-el.x,tl.z,0,-tl.x,rc.z,0,-rc.x,-el.y,el.x,0,-tl.y,tl.x,0,-rc.y,rc.x,0];return!dM(n,Ju,Qu,ef,lv)||(n=[1,0,0,0,1,0,0,0,1],!dM(n,Ju,Qu,ef,lv))?!1:(cv.crossVectors(el,tl),n=[cv.x,cv.y,cv.z],dM(n,Ju,Qu,ef,lv))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Wo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Wo).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:(ra[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ra[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ra[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ra[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ra[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ra[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ra[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ra[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ra),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 ra=[new G,new G,new G,new G,new G,new G,new G,new G],Wo=new G,av=new Pr,Ju=new G,Qu=new G,ef=new G,el=new G,tl=new G,rc=new G,Wh=new G,lv=new G,cv=new G,ic=new G;function dM(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){ic.fromArray(t,o);const a=i.x*Math.abs(ic.x)+i.y*Math.abs(ic.y)+i.z*Math.abs(ic.z),l=e.dot(ic),c=n.dot(ic),u=r.dot(ic);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const Die=new Pr,Hh=new G,hM=new G;class qr{constructor(e=new G,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):Die.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.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;Hh.subVectors(e,this.center);const n=Hh.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(Hh,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):(hM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Hh.copy(e.center).add(hM)),this.expandByPoint(Hh.copy(e.center).sub(hM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ia=new G,pM=new G,uv=new G,nl=new G,mM=new G,fv=new G,gM=new G;class Yd{constructor(e=new G,n=new G(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,ia)),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=ia.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ia.copy(this.origin).addScaledVector(this.direction,n),ia.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){pM.copy(e).add(n).multiplyScalar(.5),uv.copy(n).sub(e).normalize(),nl.copy(this.origin).sub(pM);const o=e.distanceTo(n)*.5,s=-this.direction.dot(uv),a=nl.dot(this.direction),l=-nl.dot(uv),c=nl.lengthSq(),u=Math.abs(1-s*s);let f,h,m,v;if(u>0)if(f=s*l-a,h=s*a-l,v=o*u,f>=0)if(h>=-v)if(h<=v){const x=1/u;f*=x,h*=x,m=f*(f+s*h+2*a)+h*(s*f+h+2*l)+c}else h=o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h=-o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h<=-v?(f=Math.max(0,-(-s*o+a)),h=f>0?-o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c):h<=v?(f=0,h=Math.min(Math.max(-o,-l),o),m=h*(h+2*l)+c):(f=Math.max(0,-(s*o+a)),h=f>0?o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c);else h=s>0?-o:o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(pM).addScaledVector(uv,h),m}intersectSphere(e,n){ia.subVectors(e.center,this.origin);const r=ia.dot(this.direction),i=ia.dot(ia)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;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,o,s,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?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=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,ia)!==null}intersectTriangle(e,n,r,i,o){mM.subVectors(n,e),fv.subVectors(r,e),gM.crossVectors(mM,fv);let s=this.direction.dot(gM),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;nl.subVectors(this.origin,e);const l=a*this.direction.dot(fv.crossVectors(nl,fv));if(l<0)return null;const c=a*this.direction.dot(mM.cross(nl));if(c<0||l+c>s)return null;const u=-a*nl.dot(gM);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class wt{constructor(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){wt.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,o,s,a,l,c,u,f,h,m,v,x,y)}set(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){const g=this.elements;return g[0]=e,g[4]=n,g[8]=r,g[12]=i,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=m,g[7]=v,g[11]=x,g[15]=y,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 wt().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/tf.setFromMatrixColumn(e,0).length(),o=1/tf.setFromMatrixColumn(e,1).length(),s=1/tf.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]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,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,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),f=Math.sin(o);if(e.order==="XYZ"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+v*c,n[5]=h-x*c,n[9]=-a*l,n[2]=x-h*c,n[6]=v+m*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h+x*a,n[4]=v*a-m,n[8]=s*c,n[1]=s*f,n[5]=s*u,n[9]=-a,n[2]=m*a-v,n[6]=x+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h-x*a,n[4]=-s*f,n[8]=v+m*a,n[1]=m+v*a,n[5]=s*u,n[9]=x-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=v*c-m,n[8]=h*c+x,n[1]=l*f,n[5]=x*c+h,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=x-h*f,n[8]=v*f+m,n[1]=f,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+v,n[10]=h-x*f}else if(e.order==="XZY"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+x,n[5]=s*u,n[9]=m*f-v,n[2]=v*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(Fie,e,zie)}lookAt(e,n,r){const i=this.elements;return Wi.subVectors(e,n),Wi.lengthSq()===0&&(Wi.z=1),Wi.normalize(),rl.crossVectors(r,Wi),rl.lengthSq()===0&&(Math.abs(r.z)===1?Wi.x+=1e-4:Wi.z+=1e-4,Wi.normalize(),rl.crossVectors(r,Wi)),rl.normalize(),dv.crossVectors(Wi,rl),i[0]=rl.x,i[4]=dv.x,i[8]=Wi.x,i[1]=rl.y,i[5]=dv.y,i[9]=Wi.y,i[2]=rl.z,i[6]=dv.z,i[10]=Wi.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,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],f=r[5],h=r[9],m=r[13],v=r[2],x=r[6],y=r[10],g=r[14],b=r[3],_=r[7],S=r[11],P=r[15],N=i[0],T=i[4],L=i[8],U=i[12],M=i[1],R=i[5],D=i[9],O=i[13],B=i[2],X=i[6],H=i[10],Z=i[14],F=i[3],Y=i[7],K=i[11],ee=i[15];return o[0]=s*N+a*M+l*B+c*F,o[4]=s*T+a*R+l*X+c*Y,o[8]=s*L+a*D+l*H+c*K,o[12]=s*U+a*O+l*Z+c*ee,o[1]=u*N+f*M+h*B+m*F,o[5]=u*T+f*R+h*X+m*Y,o[9]=u*L+f*D+h*H+m*K,o[13]=u*U+f*O+h*Z+m*ee,o[2]=v*N+x*M+y*B+g*F,o[6]=v*T+x*R+y*X+g*Y,o[10]=v*L+x*D+y*H+g*K,o[14]=v*U+x*O+y*Z+g*ee,o[3]=b*N+_*M+S*B+P*F,o[7]=b*T+_*R+S*X+P*Y,o[11]=b*L+_*D+S*H+P*K,o[15]=b*U+_*O+S*Z+P*ee,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],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],m=e[14],v=e[3],x=e[7],y=e[11],g=e[15];return v*(+o*l*f-i*c*f-o*a*h+r*c*h+i*a*m-r*l*m)+x*(+n*l*m-n*c*h+o*s*h-i*s*m+i*c*u-o*l*u)+y*(+n*c*f-n*a*m-o*s*f+r*s*m+o*a*u-r*c*u)+g*(-i*a*u-n*l*f+n*a*h+i*s*f-r*s*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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],m=e[11],v=e[12],x=e[13],y=e[14],g=e[15],b=f*y*c-x*h*c+x*l*m-a*y*m-f*l*g+a*h*g,_=v*h*c-u*y*c-v*l*m+s*y*m+u*l*g-s*h*g,S=u*x*c-v*f*c+v*a*m-s*x*m-u*a*g+s*f*g,P=v*f*l-u*x*l-v*a*h+s*x*h+u*a*y-s*f*y,N=n*b+r*_+i*S+o*P;if(N===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const T=1/N;return e[0]=b*T,e[1]=(x*h*o-f*y*o-x*i*m+r*y*m+f*i*g-r*h*g)*T,e[2]=(a*y*o-x*l*o+x*i*c-r*y*c-a*i*g+r*l*g)*T,e[3]=(f*l*o-a*h*o-f*i*c+r*h*c+a*i*m-r*l*m)*T,e[4]=_*T,e[5]=(u*y*o-v*h*o+v*i*m-n*y*m-u*i*g+n*h*g)*T,e[6]=(v*l*o-s*y*o-v*i*c+n*y*c+s*i*g-n*l*g)*T,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*m+n*l*m)*T,e[8]=S*T,e[9]=(v*f*o-u*x*o-v*r*m+n*x*m+u*r*g-n*f*g)*T,e[10]=(s*x*o-v*a*o+v*r*c-n*x*c-s*r*g+n*a*g)*T,e[11]=(u*a*o-s*f*o-u*r*c+n*f*c+s*r*m-n*a*m)*T,e[12]=P*T,e[13]=(u*x*i-v*f*i+v*r*h-n*x*h-u*r*y+n*f*y)*T,e[14]=(v*a*i-s*x*i-v*r*l+n*x*l+s*r*y-n*a*y)*T,e[15]=(s*f*i-u*a*i+u*r*l-n*f*l-s*r*h+n*a*h)*T,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,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),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*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,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,f=a+a,h=o*c,m=o*u,v=o*f,x=s*u,y=s*f,g=a*f,b=l*c,_=l*u,S=l*f,P=r.x,N=r.y,T=r.z;return i[0]=(1-(x+g))*P,i[1]=(m+S)*P,i[2]=(v-_)*P,i[3]=0,i[4]=(m-S)*N,i[5]=(1-(h+g))*N,i[6]=(y+b)*N,i[7]=0,i[8]=(v+_)*T,i[9]=(y-b)*T,i[10]=(1-(h+x))*T,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 o=tf.set(i[0],i[1],i[2]).length();const s=tf.set(i[4],i[5],i[6]).length(),a=tf.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],Ho.copy(this);const c=1/o,u=1/s,f=1/a;return Ho.elements[0]*=c,Ho.elements[1]*=c,Ho.elements[2]*=c,Ho.elements[4]*=u,Ho.elements[5]*=u,Ho.elements[6]*=u,Ho.elements[8]*=f,Ho.elements[9]*=f,Ho.elements[10]*=f,n.setFromRotationMatrix(Ho),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=As){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),f=(n+e)/(n-e),h=(r+i)/(r-i);let m,v;if(a===As)m=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Rm)m=-s/(s-o),v=-s*o/(s-o);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]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=As){const l=this.elements,c=1/(n-e),u=1/(r-i),f=1/(s-o),h=(n+e)*c,m=(r+i)*u;let v,x;if(a===As)v=(s+o)*f,x=-2*f;else if(a===Rm)v=o*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]=-v,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 tf=new G,Ho=new wt,Fie=new G(0,0,0),zie=new G(1,1,1),rl=new G,dv=new G,Wi=new G,U4=new wt,B4=new ki;class ro{constructor(e=0,n=0,r=0,i=ro.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,o=i[0],s=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($n(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-$n(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,o),this._z=0);break;case"ZXY":this._x=Math.asin($n(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-$n(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin($n(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,o)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-$n(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(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 U4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(U4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return B4.setFromEuler(this),this.setFromQuaternion(B4,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}}ro.DEFAULT_ORDER="XYZ";class Wc{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 o(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=o(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),v.length>0&&(r.nodes=v)}return r.object=i,r;function s(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(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){Go.subVectors(i,n),sa.subVectors(r,n),yM.subVectors(e,n);const s=Go.dot(Go),a=Go.dot(sa),l=Go.dot(yM),c=sa.dot(sa),u=sa.dot(yM),f=s*c-a*a;if(f===0)return o.set(0,0,0),null;const h=1/f,m=(c*l-a*u)*h,v=(s*u-a*l)*h;return o.set(1-m-v,v,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,aa)===null?!1:aa.x>=0&&aa.y>=0&&aa.x+aa.y<=1}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,aa)===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(o,aa.x),l.addScaledVector(s,aa.y),l.addScaledVector(a,aa.z),l)}static getInterpolatedAttribute(e,n,r,i,o,s){return wM.setScalar(0),SM.setScalar(0),MM.setScalar(0),wM.fromBufferAttribute(e,n),SM.fromBufferAttribute(e,r),MM.fromBufferAttribute(e,i),s.setScalar(0),s.addScaledVector(wM,o.x),s.addScaledVector(SM,o.y),s.addScaledVector(MM,o.z),s}static isFrontFacing(e,n,r,i){return Go.subVectors(r,n),sa.subVectors(e,n),Go.cross(sa).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 Go.subVectors(this.c,this.b),sa.subVectors(this.a,this.b),Go.cross(sa).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Mi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Mi.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,o){return Mi.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return Mi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Mi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;of.subVectors(i,r),sf.subVectors(o,r),xM.subVectors(e,r);const l=of.dot(xM),c=sf.dot(xM);if(l<=0&&c<=0)return n.copy(r);bM.subVectors(e,i);const u=of.dot(bM),f=sf.dot(bM);if(u>=0&&f<=u)return n.copy(i);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(of,s);_M.subVectors(e,o);const m=of.dot(_M),v=sf.dot(_M);if(v>=0&&m<=v)return n.copy(o);const x=m*c-l*v;if(x<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(r).addScaledVector(sf,a);const y=u*v-m*f;if(y<=0&&f-u>=0&&m-v>=0)return G4.subVectors(o,i),a=(f-u)/(f-u+(m-v)),n.copy(i).addScaledVector(G4,a);const g=1/(y+x+h);return s=x*g,a=h*g,n.copy(r).addScaledVector(of,s).addScaledVector(sf,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const FU={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},il={h:0,s:0,l:0},pv={h:0,s:0,l:0};function EM(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=Eo){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,an.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=an.workingColorSpace){return this.r=e,this.g=n,this.b=r,an.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=an.workingColorSpace){if(e=ZR(e,1),n=$n(n,0,1),r=$n(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=EM(s,o,e+1/3),this.g=EM(s,o,e),this.b=EM(s,o,e-1/3)}return an.toWorkingColorSpace(this,i),this}setStyle(e,n=Eo){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,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=Eo){const r=FU[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=od(e.r),this.g=od(e.g),this.b=od(e.b),this}copyLinearToSRGB(e){return this.r=cM(e.r),this.g=cM(e.g),this.b=cM(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Eo){return an.fromWorkingColorSpace(Vr.copy(this),e),Math.round($n(Vr.r*255,0,255))*65536+Math.round($n(Vr.g*255,0,255))*256+Math.round($n(Vr.b*255,0,255))}getHexString(e=Eo){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=an.workingColorSpace){an.fromWorkingColorSpace(Vr.copy(this),n);const r=Vr.r,i=Vr.g,o=Vr.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const f=s-a;switch(c=u<=.5?f/(s+a):f/(2-s-a),s){case r:l=(i-o)/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!==jc&&(r.blending=this.blending),this.side!==Pa&&(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!==P1&&(r.blendSrc=this.blendSrc),this.blendDst!==N1&&(r.blendDst=this.blendDst),this.blendEquation!==hl&&(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!==su&&(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!==oC&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==xc&&(r.stencilFail=this.stencilFail),this.stencilZFail!==xc&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==xc&&(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(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}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 o=0;o!==i;++o)r[o]=n[o].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 Vl extends Ir{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 ro,this.combine=cg,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 pa=Wie();function Wie(){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 o=new Uint32Array(2048),s=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,o[l]=c|u}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:a}}function xi(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=$n(t,-65504,65504),pa.floatView[0]=t;const e=pa.uint32View[0],n=e>>23&511;return pa.baseTable[n]+((e&8388607)>>pa.shiftTable[n])}function hp(t){const e=t>>10;return pa.uint32View[0]=pa.mantissaTable[pa.offsetTable[e]+(t&1023)]+pa.exponentTable[e],pa.floatView[0]}const Hie={toHalfFloat:xi,fromHalfFloat:hp},Jn=new G,mv=new Ie;class hn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Tm,this.updateRanges=[],this.gpuType=ai,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,o=this.itemSize;i0&&(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 o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));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 o=e.morphAttributes;for(const c in o){const u=[],f=o[c];for(let h=0,m=f.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(X4.copy(o).invert(),oc.copy(e.ray).applyMatrix4(X4),!(r.boundingBox!==null&&oc.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,oc)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,f=o.attributes.normal,h=o.groups,m=o.drawRange;if(a!==null)if(Array.isArray(s))for(let v=0,x=h.length;vn.far?null:{distance:c,point:_v.clone(),object:t}}function wv(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,vv),t.getVertexPosition(l,yv),t.getVertexPosition(c,xv);const u=Qie(t,e,n,r,vv,yv,xv,Y4);if(u){const f=new G;Mi.getBarycoord(Y4,vv,yv,xv,f),i&&(u.uv=Mi.getInterpolatedAttribute(i,a,l,c,f,new Ie)),o&&(u.uv1=Mi.getInterpolatedAttribute(o,a,l,c,f,new Ie)),s&&(u.normal=Mi.getInterpolatedAttribute(s,a,l,c,f,new G),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new G,materialIndex:0};Mi.getNormal(vv,yv,xv,h.normal),u.face=h,u.barycoord=f}return u}class bu extends zt{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],f=[];let h=0,m=0;v("z","y","x",-1,-1,r,n,e,s,o,0),v("z","y","x",1,-1,r,n,-e,s,o,1),v("x","z","y",1,1,e,r,n,i,s,2),v("x","z","y",1,-1,e,r,-n,i,s,3),v("x","y","z",1,-1,e,n,r,i,o,4),v("x","y","z",-1,-1,e,n,-r,i,o,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 v(x,y,g,b,_,S,P,N,T,L,U){const M=S/T,R=P/L,D=S/2,O=P/2,B=N/2,X=T+1,H=L+1;let Z=0,F=0;const Y=new G;for(let K=0;K0?1:-1,u.push(Y.x,Y.y,Y.z),f.push(me/T),f.push(1-K/L),Z+=1}}for(let K=0;K>8&255]+jr[t>>16&255]+jr[t>>24&255]+"-"+jr[e&255]+jr[e>>8&255]+"-"+jr[e>>16&15|64]+jr[e>>24&255]+"-"+jr[n&63|128]+jr[n>>8&255]+"-"+jr[n>>16&255]+jr[n>>24&255]+jr[r&255]+jr[r>>8&255]+jr[r>>16&255]+jr[r>>24&255]).toLowerCase()}function $n(t,e,n){return Math.max(e,Math.min(n,t))}function JR(t,e){return(t%e+e)%e}function hoe(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function poe(t,e,n){return t!==e?(n-t)/(e-t):0}function Dp(t,e,n){return(1-n)*t+n*e}function moe(t,e,n,r){return Dp(t,e,1-Math.exp(-n*r))}function goe(t,e=1){return e-Math.abs(JR(t,e*2)-e)}function voe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function yoe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function xoe(t,e){return t+Math.floor(Math.random()*(e-t+1))}function boe(t,e){return t+Math.random()*(e-t)}function _oe(t){return t*(.5-Math.random())}function woe(t){t!==void 0&&(B4=t);let e=B4+=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 Soe(t){return t*$c}function Moe(t){return t*Ed}function Eoe(t){return(t&t-1)===0&&t!==0}function Coe(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Toe(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Roe(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),f=o((e-r)/2),h=s((e-r)/2),m=o((r-e)/2),v=s((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*v,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*v,a*c);break;case"ZYZ":t.set(l*v,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function si(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 Dt(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 WU={DEG2RAD:$c,RAD2DEG:Ed,generateUUID:eo,clamp:$n,euclideanModulo:JR,mapLinear:hoe,inverseLerp:poe,lerp:Dp,damp:moe,pingpong:goe,smoothstep:voe,smootherstep:yoe,randInt:xoe,randFloat:boe,randFloatSpread:_oe,seededRandom:woe,degToRad:Soe,radToDeg:Moe,isPowerOfTwo:Eoe,ceilPowerOfTwo:Coe,floorPowerOfTwo:Toe,setQuaternionFromProperEuler:Roe,normalize:Dt,denormalize:si};class Ie{constructor(e=0,n=0){Ie.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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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($n(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),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ot{constructor(e,n,r,i,o,s,a,l,c){Ot.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,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,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],f=r[7],h=r[2],m=r[5],v=r[8],x=i[0],y=i[3],g=i[6],b=i[1],_=i[4],S=i[7],P=i[2],N=i[5],T=i[8];return o[0]=s*x+a*b+l*P,o[3]=s*y+a*_+l*N,o[6]=s*g+a*S+l*T,o[1]=c*x+u*b+f*P,o[4]=c*y+u*_+f*N,o[7]=c*g+u*S+f*T,o[2]=h*x+m*b+v*P,o[5]=h*y+m*_+v*N,o[8]=h*g+m*S+v*T,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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*s-a*c,h=a*l-u*o,m=c*o-s*l,v=n*f+r*h+i*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/v;return e[0]=f*x,e[1]=(i*c-u*r)*x,e[2]=(a*r-i*s)*x,e[3]=h*x,e[4]=(u*n-i*l)*x,e[5]=(i*o-a*n)*x,e[6]=m*x,e[7]=(r*l-c*n)*x,e[8]=(s*n-r*o)*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,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(cM.makeScale(e,n)),this}rotate(e){return this.premultiply(cM.makeRotation(-e)),this}translate(e,n){return this.premultiply(cM.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 cM=new Ot;function HU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const Aoe={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Vf(t,e){return new Aoe[t](e)}function Nm(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function GU(){const t=Nm("canvas");return t.style.display="block",t}const j4={};function zy(t){t in j4||(j4[t]=!0,console.warn(t))}function Poe(t,e,n){return new Promise(function(r,i){function o(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(o,n);break;default:r()}}setTimeout(o,n)})}function Noe(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 Ioe(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 V4=new Ot().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),$4=new Ot().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),$h={[Fa]:{transfer:Cm,primaries:Tm,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t,fromReference:t=>t},[Eo]:{transfer:xn,primaries:Tm,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[pg]:{transfer:Cm,primaries:Rm,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.applyMatrix3($4),fromReference:t=>t.applyMatrix3(V4)},[l_]:{transfer:xn,primaries:Rm,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.convertSRGBToLinear().applyMatrix3($4),fromReference:t=>t.applyMatrix3(V4).convertLinearToSRGB()}},Loe=new Set([Fa,pg]),an={enabled:!0,_workingColorSpace:Fa,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Loe.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=$h[e].toReference,i=$h[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return $h[t].primaries},getTransfer:function(t){return t===ha?Cm:$h[t].transfer},getLuminanceCoefficients:function(t,e=this._workingColorSpace){return t.fromArray($h[e].luminanceCoefficients)}};function od(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function uM(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Zu;class XU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Zu===void 0&&(Zu=Nm("canvas")),Zu.width=e.width,Zu.height=e.height;const r=Zu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Zu}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Nm("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),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==fg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case wm:e.x=e.x-Math.floor(e.x);break;case Ti:e.x=e.x<0?0:1;break;case Sm: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 wm:e.y=e.y-Math.floor(e.y);break;case Ti:e.y=e.y<0?0:1;break;case Sm: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++}}kn.DEFAULT_IMAGE=null;kn.DEFAULT_MAPPING=fg;kn.DEFAULT_ANISOTROPY=1;class Zt{constructor(e=0,n=0,r=0,i=1){Zt.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,o=this.w,s=e.elements;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.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,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,o;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],m=l[5],v=l[9],x=l[2],y=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-x)<.01&&Math.abs(v-y)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+x)<.1&&Math.abs(v+y)<.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,P=(g+1)/2,N=(u+h)/4,T=(f+x)/4,L=(v+y)/4;return _>S&&_>P?_<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(_),i=N/r,o=T/r):S>P?S<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),r=N/i,o=L/i):P<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(P),r=T/o,i=L/o),this.set(r,i,o,n),this}let b=Math.sqrt((y-v)*(y-v)+(f-x)*(f-x)+(h-u)*(h-u));return Math.abs(b)<.001&&(b=1),this.x=(y-v)/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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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 qU extends Xs{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Zt(0,0,e,n),this.scissorTest=!1,this.viewport=new Zt(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:tr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const o=new kn(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);o.flipY=!1,o.generateMipmaps=r.generateMipmaps,o.internalFormat=r.internalFormat,this.textures=[];const s=r.count;for(let a=0;a=0?1:-1,_=1-g*g;if(_>Number.EPSILON){const P=Math.sqrt(_),N=Math.atan2(P,g*b);y=Math.sin(y*N)/P,a=Math.sin(a*N)/P}const S=a*b;if(l=l*y+h*S,c=c*y+m*S,u=u*y+v*S,f=f*y+x*S,y===1-a){const P=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=P,c*=P,u*=P,f*=P}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],f=o[s],h=o[s+1],m=o[s+2],v=o[s+3];return e[n]=a*v+u*f+l*m-c*h,e[n+1]=l*v+u*h+c*f-a*m,e[n+2]=c*v+u*m+a*h-l*f,e[n+3]=u*v-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,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),f=a(o/2),h=l(r/2),m=l(i/2),v=l(o/2);switch(s){case"XYZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"YXZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"ZXY":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"ZYX":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"YZX":this._x=h*u*f+c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f-h*m*v;break;case"XZY":this._x=h*u*f-c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f+h*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}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],o=n[8],s=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=(o-c)*m,this._z=(s-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+s)/m,this._z=(o+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-r-f);this._w=(o-c)/m,this._x=(i+s)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-r-a);this._w=(s-i)/m,this._x=(o+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($n(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,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*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,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*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=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*s+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*o+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=s*f+this._w*h,this._x=r*f+this._x*h,this._y=i*f+this._y*h,this._z=o*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),o=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),o*Math.sin(n),o*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 G{constructor(e=0,n=0,r=0){G.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(W4.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(W4.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);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}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),f=2*(o*r-s*n);return this.x=n+l*c+s*f-a*u,this.y=r+l*u+a*c-o*f,this.z=i+l*f+o*u-s*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,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,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 dM.copy(this).projectOnVector(e),this.sub(dM)}reflect(e){return this.sub(dM.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($n(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 dM=new G,W4=new ki;class Pr{constructor(e=new G(1/0,1/0,1/0),n=new G(-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,Wo),Wo.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(Wh),lv.subVectors(this.max,Wh),Ju.subVectors(e.a,Wh),Qu.subVectors(e.b,Wh),ef.subVectors(e.c,Wh),el.subVectors(Qu,Ju),tl.subVectors(ef,Qu),rc.subVectors(Ju,ef);let n=[0,-el.z,el.y,0,-tl.z,tl.y,0,-rc.z,rc.y,el.z,0,-el.x,tl.z,0,-tl.x,rc.z,0,-rc.x,-el.y,el.x,0,-tl.y,tl.x,0,-rc.y,rc.x,0];return!hM(n,Ju,Qu,ef,lv)||(n=[1,0,0,0,1,0,0,0,1],!hM(n,Ju,Qu,ef,lv))?!1:(cv.crossVectors(el,tl),n=[cv.x,cv.y,cv.z],hM(n,Ju,Qu,ef,lv))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Wo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Wo).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:(ra[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ra[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ra[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ra[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ra[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ra[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ra[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ra[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ra),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 ra=[new G,new G,new G,new G,new G,new G,new G,new G],Wo=new G,av=new Pr,Ju=new G,Qu=new G,ef=new G,el=new G,tl=new G,rc=new G,Wh=new G,lv=new G,cv=new G,ic=new G;function hM(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){ic.fromArray(t,o);const a=i.x*Math.abs(ic.x)+i.y*Math.abs(ic.y)+i.z*Math.abs(ic.z),l=e.dot(ic),c=n.dot(ic),u=r.dot(ic);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const zoe=new Pr,Hh=new G,pM=new G;class qr{constructor(e=new G,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):zoe.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.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;Hh.subVectors(e,this.center);const n=Hh.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(Hh,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):(pM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Hh.copy(e.center).add(pM)),this.expandByPoint(Hh.copy(e.center).sub(pM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ia=new G,mM=new G,uv=new G,nl=new G,gM=new G,fv=new G,vM=new G;class Kd{constructor(e=new G,n=new G(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,ia)),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=ia.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ia.copy(this.origin).addScaledVector(this.direction,n),ia.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){mM.copy(e).add(n).multiplyScalar(.5),uv.copy(n).sub(e).normalize(),nl.copy(this.origin).sub(mM);const o=e.distanceTo(n)*.5,s=-this.direction.dot(uv),a=nl.dot(this.direction),l=-nl.dot(uv),c=nl.lengthSq(),u=Math.abs(1-s*s);let f,h,m,v;if(u>0)if(f=s*l-a,h=s*a-l,v=o*u,f>=0)if(h>=-v)if(h<=v){const x=1/u;f*=x,h*=x,m=f*(f+s*h+2*a)+h*(s*f+h+2*l)+c}else h=o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h=-o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h<=-v?(f=Math.max(0,-(-s*o+a)),h=f>0?-o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c):h<=v?(f=0,h=Math.min(Math.max(-o,-l),o),m=h*(h+2*l)+c):(f=Math.max(0,-(s*o+a)),h=f>0?o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c);else h=s>0?-o:o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(mM).addScaledVector(uv,h),m}intersectSphere(e,n){ia.subVectors(e.center,this.origin);const r=ia.dot(this.direction),i=ia.dot(ia)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;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,o,s,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?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=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,ia)!==null}intersectTriangle(e,n,r,i,o){gM.subVectors(n,e),fv.subVectors(r,e),vM.crossVectors(gM,fv);let s=this.direction.dot(vM),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;nl.subVectors(this.origin,e);const l=a*this.direction.dot(fv.crossVectors(nl,fv));if(l<0)return null;const c=a*this.direction.dot(gM.cross(nl));if(c<0||l+c>s)return null;const u=-a*nl.dot(vM);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class wt{constructor(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){wt.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,o,s,a,l,c,u,f,h,m,v,x,y)}set(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){const g=this.elements;return g[0]=e,g[4]=n,g[8]=r,g[12]=i,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=m,g[7]=v,g[11]=x,g[15]=y,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 wt().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/tf.setFromMatrixColumn(e,0).length(),o=1/tf.setFromMatrixColumn(e,1).length(),s=1/tf.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]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,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,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),f=Math.sin(o);if(e.order==="XYZ"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+v*c,n[5]=h-x*c,n[9]=-a*l,n[2]=x-h*c,n[6]=v+m*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h+x*a,n[4]=v*a-m,n[8]=s*c,n[1]=s*f,n[5]=s*u,n[9]=-a,n[2]=m*a-v,n[6]=x+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h-x*a,n[4]=-s*f,n[8]=v+m*a,n[1]=m+v*a,n[5]=s*u,n[9]=x-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=v*c-m,n[8]=h*c+x,n[1]=l*f,n[5]=x*c+h,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=x-h*f,n[8]=v*f+m,n[1]=f,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+v,n[10]=h-x*f}else if(e.order==="XZY"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+x,n[5]=s*u,n[9]=m*f-v,n[2]=v*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(Uoe,e,Boe)}lookAt(e,n,r){const i=this.elements;return Wi.subVectors(e,n),Wi.lengthSq()===0&&(Wi.z=1),Wi.normalize(),rl.crossVectors(r,Wi),rl.lengthSq()===0&&(Math.abs(r.z)===1?Wi.x+=1e-4:Wi.z+=1e-4,Wi.normalize(),rl.crossVectors(r,Wi)),rl.normalize(),dv.crossVectors(Wi,rl),i[0]=rl.x,i[4]=dv.x,i[8]=Wi.x,i[1]=rl.y,i[5]=dv.y,i[9]=Wi.y,i[2]=rl.z,i[6]=dv.z,i[10]=Wi.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,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],f=r[5],h=r[9],m=r[13],v=r[2],x=r[6],y=r[10],g=r[14],b=r[3],_=r[7],S=r[11],P=r[15],N=i[0],T=i[4],L=i[8],U=i[12],M=i[1],R=i[5],D=i[9],O=i[13],B=i[2],X=i[6],H=i[10],Z=i[14],F=i[3],Y=i[7],K=i[11],ee=i[15];return o[0]=s*N+a*M+l*B+c*F,o[4]=s*T+a*R+l*X+c*Y,o[8]=s*L+a*D+l*H+c*K,o[12]=s*U+a*O+l*Z+c*ee,o[1]=u*N+f*M+h*B+m*F,o[5]=u*T+f*R+h*X+m*Y,o[9]=u*L+f*D+h*H+m*K,o[13]=u*U+f*O+h*Z+m*ee,o[2]=v*N+x*M+y*B+g*F,o[6]=v*T+x*R+y*X+g*Y,o[10]=v*L+x*D+y*H+g*K,o[14]=v*U+x*O+y*Z+g*ee,o[3]=b*N+_*M+S*B+P*F,o[7]=b*T+_*R+S*X+P*Y,o[11]=b*L+_*D+S*H+P*K,o[15]=b*U+_*O+S*Z+P*ee,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],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],m=e[14],v=e[3],x=e[7],y=e[11],g=e[15];return v*(+o*l*f-i*c*f-o*a*h+r*c*h+i*a*m-r*l*m)+x*(+n*l*m-n*c*h+o*s*h-i*s*m+i*c*u-o*l*u)+y*(+n*c*f-n*a*m-o*s*f+r*s*m+o*a*u-r*c*u)+g*(-i*a*u-n*l*f+n*a*h+i*s*f-r*s*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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],m=e[11],v=e[12],x=e[13],y=e[14],g=e[15],b=f*y*c-x*h*c+x*l*m-a*y*m-f*l*g+a*h*g,_=v*h*c-u*y*c-v*l*m+s*y*m+u*l*g-s*h*g,S=u*x*c-v*f*c+v*a*m-s*x*m-u*a*g+s*f*g,P=v*f*l-u*x*l-v*a*h+s*x*h+u*a*y-s*f*y,N=n*b+r*_+i*S+o*P;if(N===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const T=1/N;return e[0]=b*T,e[1]=(x*h*o-f*y*o-x*i*m+r*y*m+f*i*g-r*h*g)*T,e[2]=(a*y*o-x*l*o+x*i*c-r*y*c-a*i*g+r*l*g)*T,e[3]=(f*l*o-a*h*o-f*i*c+r*h*c+a*i*m-r*l*m)*T,e[4]=_*T,e[5]=(u*y*o-v*h*o+v*i*m-n*y*m-u*i*g+n*h*g)*T,e[6]=(v*l*o-s*y*o-v*i*c+n*y*c+s*i*g-n*l*g)*T,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*m+n*l*m)*T,e[8]=S*T,e[9]=(v*f*o-u*x*o-v*r*m+n*x*m+u*r*g-n*f*g)*T,e[10]=(s*x*o-v*a*o+v*r*c-n*x*c-s*r*g+n*a*g)*T,e[11]=(u*a*o-s*f*o-u*r*c+n*f*c+s*r*m-n*a*m)*T,e[12]=P*T,e[13]=(u*x*i-v*f*i+v*r*h-n*x*h-u*r*y+n*f*y)*T,e[14]=(v*a*i-s*x*i-v*r*l+n*x*l+s*r*y-n*a*y)*T,e[15]=(s*f*i-u*a*i+u*r*l-n*f*l-s*r*h+n*a*h)*T,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,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),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*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,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,f=a+a,h=o*c,m=o*u,v=o*f,x=s*u,y=s*f,g=a*f,b=l*c,_=l*u,S=l*f,P=r.x,N=r.y,T=r.z;return i[0]=(1-(x+g))*P,i[1]=(m+S)*P,i[2]=(v-_)*P,i[3]=0,i[4]=(m-S)*N,i[5]=(1-(h+g))*N,i[6]=(y+b)*N,i[7]=0,i[8]=(v+_)*T,i[9]=(y-b)*T,i[10]=(1-(h+x))*T,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 o=tf.set(i[0],i[1],i[2]).length();const s=tf.set(i[4],i[5],i[6]).length(),a=tf.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],Ho.copy(this);const c=1/o,u=1/s,f=1/a;return Ho.elements[0]*=c,Ho.elements[1]*=c,Ho.elements[2]*=c,Ho.elements[4]*=u,Ho.elements[5]*=u,Ho.elements[6]*=u,Ho.elements[8]*=f,Ho.elements[9]*=f,Ho.elements[10]*=f,n.setFromRotationMatrix(Ho),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=As){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),f=(n+e)/(n-e),h=(r+i)/(r-i);let m,v;if(a===As)m=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Pm)m=-s/(s-o),v=-s*o/(s-o);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]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=As){const l=this.elements,c=1/(n-e),u=1/(r-i),f=1/(s-o),h=(n+e)*c,m=(r+i)*u;let v,x;if(a===As)v=(s+o)*f,x=-2*f;else if(a===Pm)v=o*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]=-v,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 tf=new G,Ho=new wt,Uoe=new G(0,0,0),Boe=new G(1,1,1),rl=new G,dv=new G,Wi=new G,H4=new wt,G4=new ki;class ro{constructor(e=0,n=0,r=0,i=ro.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,o=i[0],s=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($n(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-$n(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,o),this._z=0);break;case"ZXY":this._x=Math.asin($n(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-$n(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin($n(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,o)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-$n(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(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 H4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(H4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return G4.setFromEuler(this),this.setFromQuaternion(G4,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}}ro.DEFAULT_ORDER="XYZ";class Wc{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 o(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=o(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),v.length>0&&(r.nodes=v)}return r.object=i,r;function s(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(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){Go.subVectors(i,n),sa.subVectors(r,n),xM.subVectors(e,n);const s=Go.dot(Go),a=Go.dot(sa),l=Go.dot(xM),c=sa.dot(sa),u=sa.dot(xM),f=s*c-a*a;if(f===0)return o.set(0,0,0),null;const h=1/f,m=(c*l-a*u)*h,v=(s*u-a*l)*h;return o.set(1-m-v,v,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,aa)===null?!1:aa.x>=0&&aa.y>=0&&aa.x+aa.y<=1}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,aa)===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(o,aa.x),l.addScaledVector(s,aa.y),l.addScaledVector(a,aa.z),l)}static getInterpolatedAttribute(e,n,r,i,o,s){return SM.setScalar(0),MM.setScalar(0),EM.setScalar(0),SM.fromBufferAttribute(e,n),MM.fromBufferAttribute(e,r),EM.fromBufferAttribute(e,i),s.setScalar(0),s.addScaledVector(SM,o.x),s.addScaledVector(MM,o.y),s.addScaledVector(EM,o.z),s}static isFrontFacing(e,n,r,i){return Go.subVectors(r,n),sa.subVectors(e,n),Go.cross(sa).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 Go.subVectors(this.c,this.b),sa.subVectors(this.a,this.b),Go.cross(sa).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Mi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Mi.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,o){return Mi.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return Mi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Mi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;of.subVectors(i,r),sf.subVectors(o,r),bM.subVectors(e,r);const l=of.dot(bM),c=sf.dot(bM);if(l<=0&&c<=0)return n.copy(r);_M.subVectors(e,i);const u=of.dot(_M),f=sf.dot(_M);if(u>=0&&f<=u)return n.copy(i);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(of,s);wM.subVectors(e,o);const m=of.dot(wM),v=sf.dot(wM);if(v>=0&&m<=v)return n.copy(o);const x=m*c-l*v;if(x<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(r).addScaledVector(sf,a);const y=u*v-m*f;if(y<=0&&f-u>=0&&m-v>=0)return J4.subVectors(o,i),a=(f-u)/(f-u+(m-v)),n.copy(i).addScaledVector(J4,a);const g=1/(y+x+h);return s=x*g,a=h*g,n.copy(r).addScaledVector(of,s).addScaledVector(sf,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const YU={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},il={h:0,s:0,l:0},pv={h:0,s:0,l:0};function CM(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=Eo){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,an.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=an.workingColorSpace){return this.r=e,this.g=n,this.b=r,an.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=an.workingColorSpace){if(e=JR(e,1),n=$n(n,0,1),r=$n(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=CM(s,o,e+1/3),this.g=CM(s,o,e),this.b=CM(s,o,e-1/3)}return an.toWorkingColorSpace(this,i),this}setStyle(e,n=Eo){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,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=Eo){const r=YU[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=od(e.r),this.g=od(e.g),this.b=od(e.b),this}copyLinearToSRGB(e){return this.r=uM(e.r),this.g=uM(e.g),this.b=uM(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Eo){return an.fromWorkingColorSpace(Vr.copy(this),e),Math.round($n(Vr.r*255,0,255))*65536+Math.round($n(Vr.g*255,0,255))*256+Math.round($n(Vr.b*255,0,255))}getHexString(e=Eo){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=an.workingColorSpace){an.fromWorkingColorSpace(Vr.copy(this),n);const r=Vr.r,i=Vr.g,o=Vr.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const f=s-a;switch(c=u<=.5?f/(s+a):f/(2-s-a),s){case r:l=(i-o)/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!==jc&&(r.blending=this.blending),this.side!==Pa&&(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!==k1&&(r.blendSrc=this.blendSrc),this.blendDst!==O1&&(r.blendDst=this.blendDst),this.blendEquation!==hl&&(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!==su&&(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!==lC&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==xc&&(r.stencilFail=this.stencilFail),this.stencilZFail!==xc&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==xc&&(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(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}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 o=0;o!==i;++o)r[o]=n[o].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 $l extends Ir{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 ro,this.combine=ug,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 pa=Goe();function Goe(){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 o=new Uint32Array(2048),s=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,o[l]=c|u}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:a}}function xi(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=$n(t,-65504,65504),pa.floatView[0]=t;const e=pa.uint32View[0],n=e>>23&511;return pa.baseTable[n]+((e&8388607)>>pa.shiftTable[n])}function pp(t){const e=t>>10;return pa.uint32View[0]=pa.mantissaTable[pa.offsetTable[e]+(t&1023)]+pa.exponentTable[e],pa.floatView[0]}const Xoe={toHalfFloat:xi,fromHalfFloat:pp},Jn=new G,mv=new Ie;class hn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Am,this.updateRanges=[],this.gpuType=ai,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,o=this.itemSize;i0&&(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 o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));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 o=e.morphAttributes;for(const c in o){const u=[],f=o[c];for(let h=0,m=f.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(Q4.copy(o).invert(),oc.copy(e.ray).applyMatrix4(Q4),!(r.boundingBox!==null&&oc.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,oc)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,f=o.attributes.normal,h=o.groups,m=o.drawRange;if(a!==null)if(Array.isArray(s))for(let v=0,x=h.length;vn.far?null:{distance:c,point:_v.clone(),object:t}}function wv(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,vv),t.getVertexPosition(l,yv),t.getVertexPosition(c,xv);const u=tse(t,e,n,r,vv,yv,xv,tL);if(u){const f=new G;Mi.getBarycoord(tL,vv,yv,xv,f),i&&(u.uv=Mi.getInterpolatedAttribute(i,a,l,c,f,new Ie)),o&&(u.uv1=Mi.getInterpolatedAttribute(o,a,l,c,f,new Ie)),s&&(u.normal=Mi.getInterpolatedAttribute(s,a,l,c,f,new G),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new G,materialIndex:0};Mi.getNormal(vv,yv,xv,h.normal),u.face=h,u.barycoord=f}return u}class wu extends zt{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],f=[];let h=0,m=0;v("z","y","x",-1,-1,r,n,e,s,o,0),v("z","y","x",1,-1,r,n,-e,s,o,1),v("x","z","y",1,1,e,r,n,i,s,2),v("x","z","y",1,-1,e,r,-n,i,s,3),v("x","y","z",1,-1,e,n,r,i,o,4),v("x","y","z",-1,-1,e,n,-r,i,o,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 v(x,y,g,b,_,S,P,N,T,L,U){const M=S/T,R=P/L,D=S/2,O=P/2,B=N/2,X=T+1,H=L+1;let Z=0,F=0;const Y=new G;for(let K=0;K0?1:-1,u.push(Y.x,Y.y,Y.z),f.push(me/T),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 pg extends tn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new wt,this.projectionMatrix=new wt,this.projectionMatrixInverse=new wt,this.coordinateSystem=As}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 ol=new G,K4=new Ie,Z4=new Ie;class vr extends pg{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=Md*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan($c*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Md*2*Math.atan(Math.tan($c*.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){ol.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ol.x,ol.y).multiplyScalar(-e/ol.z),ol.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(ol.x,ol.y).multiplyScalar(-e/ol.z)}getViewSize(e,n){return this.getViewBounds(e,K4,Z4),n.subVectors(Z4,K4)}setViewOffset(e,n,r,i,o,s){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=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan($c*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+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 lf=-90,cf=1;class BU extends tn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new vr(lf,cf,e,n);i.layers=this.layers,this.add(i);const o=new vr(lf,cf,e,n);o.layers=this.layers,this.add(o);const s=new vr(lf,cf,e,n);s.layers=this.layers,this.add(s);const a=new vr(lf,cf,e,n);a.layers=this.layers,this.add(a);const l=new vr(lf,cf,e,n);l.layers=this.layers,this.add(l);const c=new vr(lf,cf,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===As)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.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===Rm)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.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[o,s,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),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=v,r.texture.needsPMREMUpdate=!0}}class mg extends kn{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:Na,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class jU extends os{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 mg(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:tr}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 ss extends Ir{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=rse,this.fragmentShader=ise,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=Cd(e.uniforms),this.uniformsGroups=nse(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 s=this.uniforms[i].value;s&&s.isTexture?n.uniforms[i]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?n.uniforms[i]={type:"c",value:s.getHex()}:s&&s.isVector2?n.uniforms[i]={type:"v2",value:s.toArray()}:s&&s.isVector3?n.uniforms[i]={type:"v3",value:s.toArray()}:s&&s.isVector4?n.uniforms[i]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?n.uniforms[i]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?n.uniforms[i]={type:"m4",value:s.toArray()}:n.uniforms[i]={value:s}}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 mg extends tn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new wt,this.projectionMatrix=new wt,this.projectionMatrixInverse=new wt,this.coordinateSystem=As}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 ol=new G,nL=new Ie,rL=new Ie;class vr extends mg{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=Ed*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan($c*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ed*2*Math.atan(Math.tan($c*.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){ol.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ol.x,ol.y).multiplyScalar(-e/ol.z),ol.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(ol.x,ol.y).multiplyScalar(-e/ol.z)}getViewSize(e,n){return this.getViewBounds(e,nL,rL),n.subVectors(rL,nL)}setViewOffset(e,n,r,i,o,s){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=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan($c*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+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 lf=-90,cf=1;class JU extends tn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new vr(lf,cf,e,n);i.layers=this.layers,this.add(i);const o=new vr(lf,cf,e,n);o.layers=this.layers,this.add(o);const s=new vr(lf,cf,e,n);s.layers=this.layers,this.add(s);const a=new vr(lf,cf,e,n);a.layers=this.layers,this.add(a);const l=new vr(lf,cf,e,n);l.layers=this.layers,this.add(l);const c=new vr(lf,cf,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===As)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.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===Pm)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.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[o,s,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),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=v,r.texture.needsPMREMUpdate=!0}}class gg extends kn{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:Na,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class QU extends os{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 gg(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:tr}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; @@ -196,9 +223,9 @@ Error generating stack: `+o.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new bu(5,5,5),o=new ss({name:"CubemapFromEquirect",uniforms:Ed(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:fi,blending:wa});o.uniforms.tEquirect.value=n;const s=new nr(i,o),a=n.minFilter;return n.minFilter===Rs&&(n.minFilter=tr),new BU(1,10,this).update(e,s),n.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,n,r,i){const o=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(n,r,i);e.setRenderTarget(o)}}const RM=new G,roe=new G,ioe=new Ot;class ul{constructor(e=new G(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=RM.subVectors(r,n).cross(roe.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(RM),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:n.copy(e.start).addScaledVector(r,o)}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||ioe.getNormalMatrix(e),i=this.coplanarPoint(RM).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const sc=new qr,Sv=new G;class gg{constructor(e=new ul,n=new ul,r=new ul,i=new ul,o=new ul,s=new ul){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),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=As){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],f=i[6],h=i[7],m=i[8],v=i[9],x=i[10],y=i[11],g=i[12],b=i[13],_=i[14],S=i[15];if(r[0].setComponents(l-o,h-c,y-m,S-g).normalize(),r[1].setComponents(l+o,h+c,y+m,S+g).normalize(),r[2].setComponents(l+s,h+u,y+v,S+b).normalize(),r[3].setComponents(l-s,h-u,y-v,S-b).normalize(),r[4].setComponents(l-a,h-f,y-x,S-_).normalize(),n===As)r[5].setComponents(l+a,h+f,y+x,S+_).normalize();else if(n===Rm)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(),sc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),sc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(sc)}intersectsSprite(e){return sc.center.set(0,0,0),sc.radius=.7071067811865476,sc.applyMatrix4(e.matrixWorld),this.intersectsSphere(sc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,Sv.y=i.normal.y>0?e.max.y:e.min.y,Sv.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Sv)<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 VU(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),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(o){n=o},setContext:function(o){t=o}}}function ooe(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,v)=>m.start-v.start);let h=0;for(let m=1;m1?null:n.copy(e.start).addScaledVector(r,o)}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||sse.getNormalMatrix(e),i=this.coplanarPoint(AM).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const sc=new qr,Sv=new G;class vg{constructor(e=new ul,n=new ul,r=new ul,i=new ul,o=new ul,s=new ul){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),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=As){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],f=i[6],h=i[7],m=i[8],v=i[9],x=i[10],y=i[11],g=i[12],b=i[13],_=i[14],S=i[15];if(r[0].setComponents(l-o,h-c,y-m,S-g).normalize(),r[1].setComponents(l+o,h+c,y+m,S+g).normalize(),r[2].setComponents(l+s,h+u,y+v,S+b).normalize(),r[3].setComponents(l-s,h-u,y-v,S-b).normalize(),r[4].setComponents(l-a,h-f,y-x,S-_).normalize(),n===As)r[5].setComponents(l+a,h+f,y+x,S+_).normalize();else if(n===Pm)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(),sc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),sc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(sc)}intersectsSprite(e){return sc.center.set(0,0,0),sc.radius=.7071067811865476,sc.applyMatrix4(e.matrixWorld),this.intersectsSphere(sc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,Sv.y=i.normal.y>0?e.max.y:e.min.y,Sv.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Sv)<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 eB(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),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(o){n=o},setContext:function(o){t=o}}}function ase(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,v)=>m.start-v.start);let h=0;for(let m=1;m 0 +#endif`,Sse=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -448,26 +475,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve if ( clipped ) discard; #endif #endif -#endif`,woe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,Mse=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,Soe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,Ese=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,Moe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,Cse=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,Eoe=`#if defined( USE_COLOR_ALPHA ) +#endif`,Tse=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,Coe=`#if defined( USE_COLOR_ALPHA ) +#endif`,Rse=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,Toe=`#if defined( USE_COLOR_ALPHA ) +#endif`,Ase=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) varying vec3 vColor; -#endif`,Roe=`#if defined( USE_COLOR_ALPHA ) +#endif`,Pse=`#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 ); @@ -481,7 +508,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`,Aoe=`#define PI 3.141592653589793 +#endif`,Nse=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -555,7 +582,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`,Poe=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,Ise=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -648,7 +675,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`,Noe=`vec3 transformedNormal = objectNormal; +#endif`,Lse=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -677,18 +704,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,Ioe=`#ifdef USE_DISPLACEMENTMAP +#endif`,kse=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,Loe=`#ifdef USE_DISPLACEMENTMAP +#endif`,Ose=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,koe=`#ifdef USE_EMISSIVEMAP +#endif`,Dse=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,Ooe=`#ifdef USE_EMISSIVEMAP +#endif`,Fse=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,Doe="gl_FragColor = linearToOutputTexel( gl_FragColor );",Foe=` +#endif`,zse="gl_FragColor = linearToOutputTexel( gl_FragColor );",Use=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -710,7 +737,7 @@ vec4 LinearTransferOETF( 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 ); -}`,zoe=`#ifdef USE_ENVMAP +}`,Bse=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -739,7 +766,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,Uoe=`#ifdef USE_ENVMAP +#endif`,jse=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -749,7 +776,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,Boe=`#ifdef USE_ENVMAP +#endif`,Vse=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -760,7 +787,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,joe=`#ifdef USE_ENVMAP +#endif`,$se=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -771,7 +798,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,Voe=`#ifdef USE_ENVMAP +#endif`,Wse=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -788,18 +815,18 @@ vec4 sRGBTransferOETF( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,$oe=`#ifdef USE_FOG +#endif`,Hse=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,Woe=`#ifdef USE_FOG +#endif`,Gse=`#ifdef USE_FOG varying float vFogDepth; -#endif`,Hoe=`#ifdef USE_FOG +#endif`,Xse=`#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`,Goe=`#ifdef USE_FOG +#endif`,qse=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -808,7 +835,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,Xoe=`#ifdef USE_GRADIENTMAP +#endif`,Yse=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -820,12 +847,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 -}`,qoe=`#ifdef USE_LIGHTMAP +}`,Kse=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,Yoe=`LambertMaterial material; +#endif`,Zse=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,Koe=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Jse=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -839,7 +866,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`,Zoe=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Qse=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -955,7 +982,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,Joe=`#ifdef USE_ENVMAP +#endif`,eae=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -988,8 +1015,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,Qoe=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,ese=`varying vec3 vViewPosition; +#endif`,tae=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,nae=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1001,11 +1028,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`,tse=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,rae=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,nse=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,iae=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1022,7 +1049,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`,rse=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,oae=`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 ); @@ -1108,7 +1135,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`,ise=`struct PhysicalMaterial { +#endif`,sae=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1409,7 +1436,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 ); -}`,ose=` +}`,aae=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1524,7 +1551,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,sse=`#if defined( RE_IndirectDiffuse ) +#endif`,lae=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1543,33 +1570,33 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,ase=`#if defined( RE_IndirectDiffuse ) +#endif`,cae=`#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`,lse=`#if defined( USE_LOGDEPTHBUF ) +#endif`,uae=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,cse=`#if defined( USE_LOGDEPTHBUF ) +#endif`,fae=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,use=`#ifdef USE_LOGDEPTHBUF +#endif`,dae=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; -#endif`,fse=`#ifdef USE_LOGDEPTHBUF +#endif`,hae=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,dse=`#ifdef USE_MAP +#endif`,pae=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,hse=`#ifdef USE_MAP +#endif`,mae=`#ifdef USE_MAP uniform sampler2D map; -#endif`,pse=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,gae=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1581,7 +1608,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,mse=`#if defined( USE_POINTS_UV ) +#endif`,vae=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1593,19 +1620,19 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,gse=`float metalnessFactor = metalness; +#endif`,yae=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,vse=`#ifdef USE_METALNESSMAP +#endif`,xae=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,yse=`#ifdef USE_INSTANCING_MORPH +#endif`,bae=`#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`,xse=`#if defined( USE_MORPHCOLORS ) +#endif`,_ae=`#if defined( USE_MORPHCOLORS ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1614,12 +1641,12 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,bse=`#ifdef USE_MORPHNORMALS +#endif`,wae=`#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`,_se=`#ifdef USE_MORPHTARGETS +#endif`,Sae=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1633,12 +1660,12 @@ IncidentLight directLight; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } -#endif`,wse=`#ifdef USE_MORPHTARGETS +#endif`,Mae=`#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`,Sse=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,Eae=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1679,7 +1706,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,Mse=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,Cae=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1694,25 +1721,25 @@ vec3 nonPerturbedNormal = normal;`,Mse=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,Ese=`#ifndef FLAT_SHADED +#endif`,Tae=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,Cse=`#ifndef FLAT_SHADED +#endif`,Rae=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,Tse=`#ifndef FLAT_SHADED +#endif`,Aae=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,Rse=`#ifdef USE_NORMALMAP +#endif`,Pae=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1734,13 +1761,13 @@ vec3 nonPerturbedNormal = normal;`,Mse=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,Ase=`#ifdef USE_CLEARCOAT +#endif`,Nae=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,Pse=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,Iae=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,Nse=`#ifdef USE_CLEARCOATMAP +#endif`,Lae=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1749,18 +1776,18 @@ vec3 nonPerturbedNormal = normal;`,Mse=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,Ise=`#ifdef USE_IRIDESCENCEMAP +#endif`,kae=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,Lse=`#ifdef OPAQUE +#endif`,Oae=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,kse=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Dae=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1829,9 +1856,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 ); -}`,Ose=`#ifdef PREMULTIPLIED_ALPHA +}`,Fae=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,Dse=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,zae=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1839,22 +1866,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,Uae=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,zse=`#ifdef DITHERING +#endif`,Bae=`#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`,Use=`float roughnessFactor = roughness; +#endif`,jae=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,Bse=`#ifdef USE_ROUGHNESSMAP +#endif`,Vae=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,jse=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,$ae=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2040,7 +2067,7 @@ gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING } return mix( 1.0, shadow, shadowIntensity ); } -#endif`,Vse=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,Wae=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2081,7 +2108,7 @@ gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,$se=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,Hae=`#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 @@ -2113,7 +2140,7 @@ gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,Wse=`float getShadowMask() { +#endif`,Gae=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2145,12 +2172,12 @@ gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING #endif #endif return shadow; -}`,Hse=`#ifdef USE_SKINNING +}`,Xae=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,Gse=`#ifdef USE_SKINNING +#endif`,qae=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2165,7 +2192,7 @@ gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,Xse=`#ifdef USE_SKINNING +#endif`,Yae=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2173,7 +2200,7 @@ gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,qse=`#ifdef USE_SKINNING +#endif`,Kae=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2184,17 +2211,17 @@ gl_Position = projectionMatrix * mvPosition;`,Fse=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,Yse=`float specularStrength; +#endif`,Zae=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,Kse=`#ifdef USE_SPECULARMAP +#endif`,Jae=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,Zse=`#if defined( TONE_MAPPING ) +#endif`,Qae=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,Jse=`#ifndef saturate +#endif`,ele=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2291,7 +2318,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; }`,Qse=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,tle=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2312,7 +2339,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Qse=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,eae=`#ifdef USE_TRANSMISSION +#endif`,nle=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2443,7 +2470,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Qse=`#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`,tae=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,rle=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2513,7 +2540,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Qse=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,nae=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,ile=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2607,7 +2634,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Qse=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,rae=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,ole=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2678,7 +2705,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Qse=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,iae=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,sle=`#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; @@ -2687,12 +2714,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Qse=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const oae=`varying vec2 vUv; +#endif`;const ale=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,sae=`uniform sampler2D t2D; +}`,lle=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2704,14 +2731,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,aae=`varying vec3 vWorldDirection; +}`,cle=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,lae=`#ifdef ENVMAP_TYPE_CUBE +}`,ule=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2734,14 +2761,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,cae=`varying vec3 vWorldDirection; +}`,fle=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,uae=`uniform samplerCube tCube; +}`,dle=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2751,7 +2778,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,fae=`#include +}`,hle=`#include #include #include #include @@ -2778,7 +2805,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,dae=`#if DEPTH_PACKING == 3200 +}`,ple=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2812,7 +2839,7 @@ void main() { #elif DEPTH_PACKING == 3203 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); #endif -}`,hae=`#define DISTANCE +}`,mle=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2839,7 +2866,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,pae=`#define DISTANCE +}`,gle=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2863,13 +2890,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,mae=`varying vec3 vWorldDirection; +}`,vle=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,gae=`uniform sampler2D tEquirect; +}`,yle=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2878,7 +2905,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,vae=`uniform float scale; +}`,xle=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2900,7 +2927,7 @@ void main() { #include #include #include -}`,yae=`uniform vec3 diffuse; +}`,ble=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2928,7 +2955,7 @@ void main() { #include #include #include -}`,xae=`#include +}`,_le=`#include #include #include #include @@ -2960,7 +2987,7 @@ void main() { #include #include #include -}`,bae=`uniform vec3 diffuse; +}`,wle=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -3008,7 +3035,7 @@ void main() { #include #include #include -}`,_ae=`#define LAMBERT +}`,Sle=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -3047,7 +3074,7 @@ void main() { #include #include #include -}`,wae=`#define LAMBERT +}`,Mle=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3104,7 +3131,7 @@ void main() { #include #include #include -}`,Sae=`#define MATCAP +}`,Ele=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3138,7 +3165,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,Mae=`#define MATCAP +}`,Cle=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3184,7 +3211,7 @@ void main() { #include #include #include -}`,Eae=`#define NORMAL +}`,Tle=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3217,7 +3244,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,Cae=`#define NORMAL +}`,Rle=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3239,7 +3266,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,Tae=`#define PHONG +}`,Ale=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3278,7 +3305,7 @@ void main() { #include #include #include -}`,Rae=`#define PHONG +}`,Ple=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3337,7 +3364,7 @@ void main() { #include #include #include -}`,Aae=`#define STANDARD +}`,Nle=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3380,7 +3407,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,Pae=`#define STANDARD +}`,Ile=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3505,7 +3532,7 @@ void main() { #include #include #include -}`,Nae=`#define TOON +}`,Lle=`#define TOON varying vec3 vViewPosition; #include #include @@ -3542,7 +3569,7 @@ void main() { #include #include #include -}`,Iae=`#define TOON +}`,kle=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3595,7 +3622,7 @@ void main() { #include #include #include -}`,Lae=`uniform float size; +}`,Ole=`uniform float size; uniform float scale; #include #include @@ -3626,7 +3653,7 @@ void main() { #include #include #include -}`,kae=`uniform vec3 diffuse; +}`,Dle=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3651,7 +3678,7 @@ void main() { #include #include #include -}`,Oae=`#include +}`,Fle=`#include #include #include #include @@ -3674,7 +3701,7 @@ void main() { #include #include #include -}`,Dae=`uniform vec3 color; +}`,zle=`uniform vec3 color; uniform float opacity; #include #include @@ -3690,7 +3717,7 @@ void main() { #include #include #include -}`,Fae=`uniform float rotation; +}`,Ule=`uniform float rotation; uniform vec2 center; #include #include @@ -3714,7 +3741,7 @@ void main() { #include #include #include -}`,zae=`uniform vec3 diffuse; +}`,Ble=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3739,7 +3766,7 @@ void main() { #include #include #include -}`,Ut={alphahash_fragment:soe,alphahash_pars_fragment:aoe,alphamap_fragment:loe,alphamap_pars_fragment:coe,alphatest_fragment:uoe,alphatest_pars_fragment:foe,aomap_fragment:doe,aomap_pars_fragment:hoe,batching_pars_vertex:poe,batching_vertex:moe,begin_vertex:goe,beginnormal_vertex:voe,bsdfs:yoe,iridescence_fragment:xoe,bumpmap_pars_fragment:boe,clipping_planes_fragment:_oe,clipping_planes_pars_fragment:woe,clipping_planes_pars_vertex:Soe,clipping_planes_vertex:Moe,color_fragment:Eoe,color_pars_fragment:Coe,color_pars_vertex:Toe,color_vertex:Roe,common:Aoe,cube_uv_reflection_fragment:Poe,defaultnormal_vertex:Noe,displacementmap_pars_vertex:Ioe,displacementmap_vertex:Loe,emissivemap_fragment:koe,emissivemap_pars_fragment:Ooe,colorspace_fragment:Doe,colorspace_pars_fragment:Foe,envmap_fragment:zoe,envmap_common_pars_fragment:Uoe,envmap_pars_fragment:Boe,envmap_pars_vertex:joe,envmap_physical_pars_fragment:Joe,envmap_vertex:Voe,fog_vertex:$oe,fog_pars_vertex:Woe,fog_fragment:Hoe,fog_pars_fragment:Goe,gradientmap_pars_fragment:Xoe,lightmap_pars_fragment:qoe,lights_lambert_fragment:Yoe,lights_lambert_pars_fragment:Koe,lights_pars_begin:Zoe,lights_toon_fragment:Qoe,lights_toon_pars_fragment:ese,lights_phong_fragment:tse,lights_phong_pars_fragment:nse,lights_physical_fragment:rse,lights_physical_pars_fragment:ise,lights_fragment_begin:ose,lights_fragment_maps:sse,lights_fragment_end:ase,logdepthbuf_fragment:lse,logdepthbuf_pars_fragment:cse,logdepthbuf_pars_vertex:use,logdepthbuf_vertex:fse,map_fragment:dse,map_pars_fragment:hse,map_particle_fragment:pse,map_particle_pars_fragment:mse,metalnessmap_fragment:gse,metalnessmap_pars_fragment:vse,morphinstance_vertex:yse,morphcolor_vertex:xse,morphnormal_vertex:bse,morphtarget_pars_vertex:_se,morphtarget_vertex:wse,normal_fragment_begin:Sse,normal_fragment_maps:Mse,normal_pars_fragment:Ese,normal_pars_vertex:Cse,normal_vertex:Tse,normalmap_pars_fragment:Rse,clearcoat_normal_fragment_begin:Ase,clearcoat_normal_fragment_maps:Pse,clearcoat_pars_fragment:Nse,iridescence_pars_fragment:Ise,opaque_fragment:Lse,packing:kse,premultiplied_alpha_fragment:Ose,project_vertex:Dse,dithering_fragment:Fse,dithering_pars_fragment:zse,roughnessmap_fragment:Use,roughnessmap_pars_fragment:Bse,shadowmap_pars_fragment:jse,shadowmap_pars_vertex:Vse,shadowmap_vertex:$se,shadowmask_pars_fragment:Wse,skinbase_vertex:Hse,skinning_pars_vertex:Gse,skinning_vertex:Xse,skinnormal_vertex:qse,specularmap_fragment:Yse,specularmap_pars_fragment:Kse,tonemapping_fragment:Zse,tonemapping_pars_fragment:Jse,transmission_fragment:Qse,transmission_pars_fragment:eae,uv_pars_fragment:tae,uv_pars_vertex:nae,uv_vertex:rae,worldpos_vertex:iae,background_vert:oae,background_frag:sae,backgroundCube_vert:aae,backgroundCube_frag:lae,cube_vert:cae,cube_frag:uae,depth_vert:fae,depth_frag:dae,distanceRGBA_vert:hae,distanceRGBA_frag:pae,equirect_vert:mae,equirect_frag:gae,linedashed_vert:vae,linedashed_frag:yae,meshbasic_vert:xae,meshbasic_frag:bae,meshlambert_vert:_ae,meshlambert_frag:wae,meshmatcap_vert:Sae,meshmatcap_frag:Mae,meshnormal_vert:Eae,meshnormal_frag:Cae,meshphong_vert:Tae,meshphong_frag:Rae,meshphysical_vert:Aae,meshphysical_frag:Pae,meshtoon_vert:Nae,meshtoon_frag:Iae,points_vert:Lae,points_frag:kae,shadow_vert:Oae,shadow_frag:Dae,sprite_vert:Fae,sprite_frag:zae},Je={common:{diffuse:{value:new ot(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ot}},envmap:{envMap:{value:null},envMapRotation:{value:new Ot},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ot}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ot}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ot},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ot},normalScale:{value:new Ie(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ot},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ot}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ot}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ot}},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 Ot},alphaTest:{value:0},uvTransform:{value:new Ot}},sprite:{diffuse:{value:new ot(16777215)},opacity:{value:1},center:{value:new Ie(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}}},Jo={basic:{uniforms:ni([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Ut.meshbasic_vert,fragmentShader:Ut.meshbasic_frag},lambert:{uniforms:ni([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new ot(0)}}]),vertexShader:Ut.meshlambert_vert,fragmentShader:Ut.meshlambert_frag},phong:{uniforms:ni([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new ot(0)},specular:{value:new ot(1118481)},shininess:{value:30}}]),vertexShader:Ut.meshphong_vert,fragmentShader:Ut.meshphong_frag},standard:{uniforms:ni([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new ot(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag},toon:{uniforms:ni([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new ot(0)}}]),vertexShader:Ut.meshtoon_vert,fragmentShader:Ut.meshtoon_frag},matcap:{uniforms:ni([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Ut.meshmatcap_vert,fragmentShader:Ut.meshmatcap_frag},points:{uniforms:ni([Je.points,Je.fog]),vertexShader:Ut.points_vert,fragmentShader:Ut.points_frag},dashed:{uniforms:ni([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ut.linedashed_vert,fragmentShader:Ut.linedashed_frag},depth:{uniforms:ni([Je.common,Je.displacementmap]),vertexShader:Ut.depth_vert,fragmentShader:Ut.depth_frag},normal:{uniforms:ni([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Ut.meshnormal_vert,fragmentShader:Ut.meshnormal_frag},sprite:{uniforms:ni([Je.sprite,Je.fog]),vertexShader:Ut.sprite_vert,fragmentShader:Ut.sprite_frag},background:{uniforms:{uvTransform:{value:new Ot},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ut.background_vert,fragmentShader:Ut.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ot}},vertexShader:Ut.backgroundCube_vert,fragmentShader:Ut.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ut.cube_vert,fragmentShader:Ut.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ut.equirect_vert,fragmentShader:Ut.equirect_frag},distanceRGBA:{uniforms:ni([Je.common,Je.displacementmap,{referencePosition:{value:new G},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ut.distanceRGBA_vert,fragmentShader:Ut.distanceRGBA_frag},shadow:{uniforms:ni([Je.lights,Je.fog,{color:{value:new ot(0)},opacity:{value:1}}]),vertexShader:Ut.shadow_vert,fragmentShader:Ut.shadow_frag}};Jo.physical={uniforms:ni([Jo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ot},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ot},clearcoatNormalScale:{value:new Ie(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ot},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ot},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ot},sheen:{value:0},sheenColor:{value:new ot(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ot},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ot},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ot},transmissionSamplerSize:{value:new Ie},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ot},attenuationDistance:{value:0},attenuationColor:{value:new ot(0)},specularColor:{value:new ot(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ot},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ot},anisotropyVector:{value:new Ie},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ot}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag};const Mv={r:0,b:0,g:0},ac=new ro,Uae=new wt;function Bae(t,e,n,r,i,o,s){const a=new ot(0);let l=o===!0?0:1,c,u,f=null,h=0,m=null;function v(b){let _=b.isScene===!0?b.background:null;return _&&_.isTexture&&(_=(b.backgroundBlurriness>0?n:e).get(_)),_}function x(b){let _=!1;const S=v(b);S===null?g(a,l):S&&S.isColor&&(g(S,1),_=!0);const P=t.xr.getEnvironmentBlendMode();P==="additive"?r.buffers.color.setClear(0,0,0,1,s):P==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||_)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function y(b,_){const S=v(_);S&&(S.isCubeTexture||S.mapping===qd)?(u===void 0&&(u=new nr(new bu(1,1,1),new ss({name:"BackgroundCubeMaterial",uniforms:Ed(Jo.backgroundCube.uniforms),vertexShader:Jo.backgroundCube.vertexShader,fragmentShader:Jo.backgroundCube.fragmentShader,side:fi,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(P,N,T){this.matrixWorld.copyPosition(T.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),ac.copy(_.backgroundRotation),ac.x*=-1,ac.y*=-1,ac.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(ac.y*=-1,ac.z*=-1),u.material.uniforms.envMap.value=S,u.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(Uae.makeRotationFromEuler(ac)),u.material.toneMapped=an.getTransfer(S.colorSpace)!==xn,(f!==S||h!==S.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):S&&S.isTexture&&(c===void 0&&(c=new nr(new Kd(2,2),new ss({name:"BackgroundMaterial",uniforms:Ed(Jo.background.uniforms),vertexShader:Jo.background.vertexShader,fragmentShader:Jo.background.fragmentShader,side:Pa,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=S,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=an.getTransfer(S.colorSpace)!==xn,S.matrixAutoUpdate===!0&&S.updateMatrix(),c.material.uniforms.uvTransform.value.copy(S.matrix),(f!==S||h!==S.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function g(b,_){b.getRGB(Mv,zU(t)),r.buffers.color.setClear(Mv.r,Mv.g,Mv.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(b,_=1){a.set(b),l=_,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,g(a,l)},render:x,addToRenderList:y}}function jae(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=h(null);let o=i,s=!1;function a(M,R,D,O,B){let X=!1;const H=f(O,D,R);o!==H&&(o=H,c(o.object)),X=m(M,O,D,B),X&&v(M,O,D,B),B!==null&&e.update(B,t.ELEMENT_ARRAY_BUFFER),(X||s)&&(s=!1,S(M,R,D,O),B!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(B).buffer))}function l(){return t.createVertexArray()}function c(M){return t.bindVertexArray(M)}function u(M){return t.deleteVertexArray(M)}function f(M,R,D){const O=D.wireframe===!0;let B=r[M.id];B===void 0&&(B={},r[M.id]=B);let X=B[R.id];X===void 0&&(X={},B[R.id]=X);let H=X[O];return H===void 0&&(H=h(l()),X[O]=H),H}function h(M){const R=[],D=[],O=[];for(let B=0;B=0){const K=B[F];let ee=X[F];if(ee===void 0&&(F==="instanceMatrix"&&M.instanceMatrix&&(ee=M.instanceMatrix),F==="instanceColor"&&M.instanceColor&&(ee=M.instanceColor)),K===void 0||K.attribute!==ee||ee&&K.data!==ee.data)return!0;H++}return o.attributesNum!==H||o.index!==O}function v(M,R,D,O){const B={},X=R.attributes;let H=0;const Z=D.getAttributes();for(const F in Z)if(Z[F].location>=0){let K=X[F];K===void 0&&(F==="instanceMatrix"&&M.instanceMatrix&&(K=M.instanceMatrix),F==="instanceColor"&&M.instanceColor&&(K=M.instanceColor));const ee={};ee.attribute=K,K&&K.data&&(ee.data=K.data),B[F]=ee,H++}o.attributes=B,o.attributesNum=H,o.index=O}function x(){const M=o.newAttributes;for(let R=0,D=M.length;R=0){let Y=B[Z];if(Y===void 0&&(Z==="instanceMatrix"&&M.instanceMatrix&&(Y=M.instanceMatrix),Z==="instanceColor"&&M.instanceColor&&(Y=M.instanceColor)),Y!==void 0){const K=Y.normalized,ee=Y.itemSize,me=e.get(Y);if(me===void 0)continue;const le=me.buffer,Q=me.type,ae=me.bytesPerElement,ge=Q===t.INT||Q===t.UNSIGNED_INT||Y.gpuType===Qb;if(Y.isInterleavedBufferAttribute){const Me=Y.data,tt=Me.stride,He=Y.offset;if(Me.isInstancedInterleavedBuffer){for(let rt=0;rt0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="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");if(h===!0){const T=e.get("EXT_clip_control");T.clipControlEXT(T.LOWER_LEFT_EXT,T.ZERO_TO_ONE_EXT)}const m=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=t.getParameter(t.MAX_TEXTURE_SIZE),y=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),P=v>0,N=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:l,textureFormatReadable:s,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:m,maxVertexTextures:v,maxTextureSize:x,maxCubemapSize:y,maxAttributes:g,maxVertexUniforms:b,maxVaryings:_,maxFragmentUniforms:S,vertexTextures:P,maxSamples:N}}function Wae(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new ul,a=new Ot,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(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,m){const v=f.clippingPlanes,x=f.clipIntersection,y=f.clipShadows,g=t.get(f);if(!i||v===null||v.length===0||o&&!y)o?u(null):c();else{const b=o?0:r,_=b*4;let S=g.clippingState||null;l.value=S,S=u(v,h,_,m);for(let P=0;P!==_;++P)S[P]=n[P];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,v){const x=f!==null?f.length:0;let y=null;if(x!==0){if(y=l.value,v!==!0||y===null){const g=m+x*4,b=h.matrixWorldInverse;a.getNormalMatrix(b),(y===null||y.length0){const c=new jU(l.height);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class vg extends pg{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,o,s){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=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const $f=4,J4=[.125,.215,.35,.446,.526,.582],Sc=20,AM=new vg,Q4=new ot;let PM=null,NM=0,IM=0,LM=!1;const bc=(1+Math.sqrt(5))/2,uf=1/bc,eL=[new G(-bc,uf,0),new G(bc,uf,0),new G(-uf,0,bc),new G(uf,0,bc),new G(0,bc,-uf),new G(0,bc,uf),new G(-1,1,-1),new G(1,1,-1),new G(-1,1,1),new G(1,1,1)];class aC{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){PM=this._renderer.getRenderTarget(),NM=this._renderer.getActiveCubeFace(),IM=this._renderer.getActiveMipmapLevel(),LM=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=rL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=nL(),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(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=y}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===Na||e.mapping===Nl;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=rL()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=nL());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new nr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;Ev(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,AM)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let o=1;oSc&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${Sc}`);const g=[];let b=0;for(let T=0;T_-$f?i-_+$f:0),N=4*(this._cubeSize-S);Ev(n,P,N,3*S,2*S),l.setRenderTarget(n),l.render(f,AM)}}function Gae(t){const e=[],n=[],r=[];let i=t;const o=t-$f+1+J4.length;for(let s=0;st-$f?l=J4[s-t+$f-1]:s===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,v=6,x=3,y=2,g=1,b=new Float32Array(x*v*m),_=new Float32Array(y*v*m),S=new Float32Array(g*v*m);for(let N=0;N2?0:-1,U=[T,L,0,T+2/3,L,0,T+2/3,L+1,0,T,L,0,T+2/3,L+1,0,T,L+1,0];b.set(U,x*v*N),_.set(h,y*v*N);const M=[N,N,N,N,N,N];S.set(M,g*v*N)}const P=new zt;P.setAttribute("position",new hn(b,x)),P.setAttribute("uv",new hn(_,y)),P.setAttribute("faceIndex",new hn(S,g)),e.push(P),i>$f&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function tL(t,e,n){const r=new os(t,e,n);return r.texture.mapping=qd,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Ev(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function Xae(t,e,n){const r=new Float32Array(Sc),i=new G(0,1,0);return new ss({name:"SphericalGaussianBlur",defines:{n:Sc,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:tA(),fragmentShader:` +}`,Ut={alphahash_fragment:lse,alphahash_pars_fragment:cse,alphamap_fragment:use,alphamap_pars_fragment:fse,alphatest_fragment:dse,alphatest_pars_fragment:hse,aomap_fragment:pse,aomap_pars_fragment:mse,batching_pars_vertex:gse,batching_vertex:vse,begin_vertex:yse,beginnormal_vertex:xse,bsdfs:bse,iridescence_fragment:_se,bumpmap_pars_fragment:wse,clipping_planes_fragment:Sse,clipping_planes_pars_fragment:Mse,clipping_planes_pars_vertex:Ese,clipping_planes_vertex:Cse,color_fragment:Tse,color_pars_fragment:Rse,color_pars_vertex:Ase,color_vertex:Pse,common:Nse,cube_uv_reflection_fragment:Ise,defaultnormal_vertex:Lse,displacementmap_pars_vertex:kse,displacementmap_vertex:Ose,emissivemap_fragment:Dse,emissivemap_pars_fragment:Fse,colorspace_fragment:zse,colorspace_pars_fragment:Use,envmap_fragment:Bse,envmap_common_pars_fragment:jse,envmap_pars_fragment:Vse,envmap_pars_vertex:$se,envmap_physical_pars_fragment:eae,envmap_vertex:Wse,fog_vertex:Hse,fog_pars_vertex:Gse,fog_fragment:Xse,fog_pars_fragment:qse,gradientmap_pars_fragment:Yse,lightmap_pars_fragment:Kse,lights_lambert_fragment:Zse,lights_lambert_pars_fragment:Jse,lights_pars_begin:Qse,lights_toon_fragment:tae,lights_toon_pars_fragment:nae,lights_phong_fragment:rae,lights_phong_pars_fragment:iae,lights_physical_fragment:oae,lights_physical_pars_fragment:sae,lights_fragment_begin:aae,lights_fragment_maps:lae,lights_fragment_end:cae,logdepthbuf_fragment:uae,logdepthbuf_pars_fragment:fae,logdepthbuf_pars_vertex:dae,logdepthbuf_vertex:hae,map_fragment:pae,map_pars_fragment:mae,map_particle_fragment:gae,map_particle_pars_fragment:vae,metalnessmap_fragment:yae,metalnessmap_pars_fragment:xae,morphinstance_vertex:bae,morphcolor_vertex:_ae,morphnormal_vertex:wae,morphtarget_pars_vertex:Sae,morphtarget_vertex:Mae,normal_fragment_begin:Eae,normal_fragment_maps:Cae,normal_pars_fragment:Tae,normal_pars_vertex:Rae,normal_vertex:Aae,normalmap_pars_fragment:Pae,clearcoat_normal_fragment_begin:Nae,clearcoat_normal_fragment_maps:Iae,clearcoat_pars_fragment:Lae,iridescence_pars_fragment:kae,opaque_fragment:Oae,packing:Dae,premultiplied_alpha_fragment:Fae,project_vertex:zae,dithering_fragment:Uae,dithering_pars_fragment:Bae,roughnessmap_fragment:jae,roughnessmap_pars_fragment:Vae,shadowmap_pars_fragment:$ae,shadowmap_pars_vertex:Wae,shadowmap_vertex:Hae,shadowmask_pars_fragment:Gae,skinbase_vertex:Xae,skinning_pars_vertex:qae,skinning_vertex:Yae,skinnormal_vertex:Kae,specularmap_fragment:Zae,specularmap_pars_fragment:Jae,tonemapping_fragment:Qae,tonemapping_pars_fragment:ele,transmission_fragment:tle,transmission_pars_fragment:nle,uv_pars_fragment:rle,uv_pars_vertex:ile,uv_vertex:ole,worldpos_vertex:sle,background_vert:ale,background_frag:lle,backgroundCube_vert:cle,backgroundCube_frag:ule,cube_vert:fle,cube_frag:dle,depth_vert:hle,depth_frag:ple,distanceRGBA_vert:mle,distanceRGBA_frag:gle,equirect_vert:vle,equirect_frag:yle,linedashed_vert:xle,linedashed_frag:ble,meshbasic_vert:_le,meshbasic_frag:wle,meshlambert_vert:Sle,meshlambert_frag:Mle,meshmatcap_vert:Ele,meshmatcap_frag:Cle,meshnormal_vert:Tle,meshnormal_frag:Rle,meshphong_vert:Ale,meshphong_frag:Ple,meshphysical_vert:Nle,meshphysical_frag:Ile,meshtoon_vert:Lle,meshtoon_frag:kle,points_vert:Ole,points_frag:Dle,shadow_vert:Fle,shadow_frag:zle,sprite_vert:Ule,sprite_frag:Ble},Je={common:{diffuse:{value:new ot(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ot}},envmap:{envMap:{value:null},envMapRotation:{value:new Ot},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ot}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ot}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ot},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ot},normalScale:{value:new Ie(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ot},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ot}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ot}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ot}},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 Ot},alphaTest:{value:0},uvTransform:{value:new Ot}},sprite:{diffuse:{value:new ot(16777215)},opacity:{value:1},center:{value:new Ie(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}}},Jo={basic:{uniforms:ni([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Ut.meshbasic_vert,fragmentShader:Ut.meshbasic_frag},lambert:{uniforms:ni([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new ot(0)}}]),vertexShader:Ut.meshlambert_vert,fragmentShader:Ut.meshlambert_frag},phong:{uniforms:ni([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new ot(0)},specular:{value:new ot(1118481)},shininess:{value:30}}]),vertexShader:Ut.meshphong_vert,fragmentShader:Ut.meshphong_frag},standard:{uniforms:ni([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new ot(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag},toon:{uniforms:ni([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new ot(0)}}]),vertexShader:Ut.meshtoon_vert,fragmentShader:Ut.meshtoon_frag},matcap:{uniforms:ni([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Ut.meshmatcap_vert,fragmentShader:Ut.meshmatcap_frag},points:{uniforms:ni([Je.points,Je.fog]),vertexShader:Ut.points_vert,fragmentShader:Ut.points_frag},dashed:{uniforms:ni([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ut.linedashed_vert,fragmentShader:Ut.linedashed_frag},depth:{uniforms:ni([Je.common,Je.displacementmap]),vertexShader:Ut.depth_vert,fragmentShader:Ut.depth_frag},normal:{uniforms:ni([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Ut.meshnormal_vert,fragmentShader:Ut.meshnormal_frag},sprite:{uniforms:ni([Je.sprite,Je.fog]),vertexShader:Ut.sprite_vert,fragmentShader:Ut.sprite_frag},background:{uniforms:{uvTransform:{value:new Ot},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ut.background_vert,fragmentShader:Ut.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ot}},vertexShader:Ut.backgroundCube_vert,fragmentShader:Ut.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ut.cube_vert,fragmentShader:Ut.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ut.equirect_vert,fragmentShader:Ut.equirect_frag},distanceRGBA:{uniforms:ni([Je.common,Je.displacementmap,{referencePosition:{value:new G},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ut.distanceRGBA_vert,fragmentShader:Ut.distanceRGBA_frag},shadow:{uniforms:ni([Je.lights,Je.fog,{color:{value:new ot(0)},opacity:{value:1}}]),vertexShader:Ut.shadow_vert,fragmentShader:Ut.shadow_frag}};Jo.physical={uniforms:ni([Jo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ot},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ot},clearcoatNormalScale:{value:new Ie(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ot},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ot},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ot},sheen:{value:0},sheenColor:{value:new ot(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ot},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ot},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ot},transmissionSamplerSize:{value:new Ie},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ot},attenuationDistance:{value:0},attenuationColor:{value:new ot(0)},specularColor:{value:new ot(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ot},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ot},anisotropyVector:{value:new Ie},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ot}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag};const Mv={r:0,b:0,g:0},ac=new ro,jle=new wt;function Vle(t,e,n,r,i,o,s){const a=new ot(0);let l=o===!0?0:1,c,u,f=null,h=0,m=null;function v(b){let _=b.isScene===!0?b.background:null;return _&&_.isTexture&&(_=(b.backgroundBlurriness>0?n:e).get(_)),_}function x(b){let _=!1;const S=v(b);S===null?g(a,l):S&&S.isColor&&(g(S,1),_=!0);const P=t.xr.getEnvironmentBlendMode();P==="additive"?r.buffers.color.setClear(0,0,0,1,s):P==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||_)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function y(b,_){const S=v(_);S&&(S.isCubeTexture||S.mapping===Yd)?(u===void 0&&(u=new nr(new wu(1,1,1),new ss({name:"BackgroundCubeMaterial",uniforms:Cd(Jo.backgroundCube.uniforms),vertexShader:Jo.backgroundCube.vertexShader,fragmentShader:Jo.backgroundCube.fragmentShader,side:fi,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(P,N,T){this.matrixWorld.copyPosition(T.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),ac.copy(_.backgroundRotation),ac.x*=-1,ac.y*=-1,ac.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(ac.y*=-1,ac.z*=-1),u.material.uniforms.envMap.value=S,u.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(jle.makeRotationFromEuler(ac)),u.material.toneMapped=an.getTransfer(S.colorSpace)!==xn,(f!==S||h!==S.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):S&&S.isTexture&&(c===void 0&&(c=new nr(new Zd(2,2),new ss({name:"BackgroundMaterial",uniforms:Cd(Jo.background.uniforms),vertexShader:Jo.background.vertexShader,fragmentShader:Jo.background.fragmentShader,side:Pa,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=S,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=an.getTransfer(S.colorSpace)!==xn,S.matrixAutoUpdate===!0&&S.updateMatrix(),c.material.uniforms.uvTransform.value.copy(S.matrix),(f!==S||h!==S.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function g(b,_){b.getRGB(Mv,KU(t)),r.buffers.color.setClear(Mv.r,Mv.g,Mv.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(b,_=1){a.set(b),l=_,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,g(a,l)},render:x,addToRenderList:y}}function $le(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=h(null);let o=i,s=!1;function a(M,R,D,O,B){let X=!1;const H=f(O,D,R);o!==H&&(o=H,c(o.object)),X=m(M,O,D,B),X&&v(M,O,D,B),B!==null&&e.update(B,t.ELEMENT_ARRAY_BUFFER),(X||s)&&(s=!1,S(M,R,D,O),B!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(B).buffer))}function l(){return t.createVertexArray()}function c(M){return t.bindVertexArray(M)}function u(M){return t.deleteVertexArray(M)}function f(M,R,D){const O=D.wireframe===!0;let B=r[M.id];B===void 0&&(B={},r[M.id]=B);let X=B[R.id];X===void 0&&(X={},B[R.id]=X);let H=X[O];return H===void 0&&(H=h(l()),X[O]=H),H}function h(M){const R=[],D=[],O=[];for(let B=0;B=0){const K=B[F];let ee=X[F];if(ee===void 0&&(F==="instanceMatrix"&&M.instanceMatrix&&(ee=M.instanceMatrix),F==="instanceColor"&&M.instanceColor&&(ee=M.instanceColor)),K===void 0||K.attribute!==ee||ee&&K.data!==ee.data)return!0;H++}return o.attributesNum!==H||o.index!==O}function v(M,R,D,O){const B={},X=R.attributes;let H=0;const Z=D.getAttributes();for(const F in Z)if(Z[F].location>=0){let K=X[F];K===void 0&&(F==="instanceMatrix"&&M.instanceMatrix&&(K=M.instanceMatrix),F==="instanceColor"&&M.instanceColor&&(K=M.instanceColor));const ee={};ee.attribute=K,K&&K.data&&(ee.data=K.data),B[F]=ee,H++}o.attributes=B,o.attributesNum=H,o.index=O}function x(){const M=o.newAttributes;for(let R=0,D=M.length;R=0){let Y=B[Z];if(Y===void 0&&(Z==="instanceMatrix"&&M.instanceMatrix&&(Y=M.instanceMatrix),Z==="instanceColor"&&M.instanceColor&&(Y=M.instanceColor)),Y!==void 0){const K=Y.normalized,ee=Y.itemSize,me=e.get(Y);if(me===void 0)continue;const le=me.buffer,Q=me.type,ae=me.bytesPerElement,ge=Q===t.INT||Q===t.UNSIGNED_INT||Y.gpuType===n_;if(Y.isInterleavedBufferAttribute){const Me=Y.data,tt=Me.stride,He=Y.offset;if(Me.isInstancedInterleavedBuffer){for(let rt=0;rt0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="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");if(h===!0){const T=e.get("EXT_clip_control");T.clipControlEXT(T.LOWER_LEFT_EXT,T.ZERO_TO_ONE_EXT)}const m=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=t.getParameter(t.MAX_TEXTURE_SIZE),y=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),P=v>0,N=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:l,textureFormatReadable:s,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:m,maxVertexTextures:v,maxTextureSize:x,maxCubemapSize:y,maxAttributes:g,maxVertexUniforms:b,maxVaryings:_,maxFragmentUniforms:S,vertexTextures:P,maxSamples:N}}function Gle(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new ul,a=new Ot,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(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,m){const v=f.clippingPlanes,x=f.clipIntersection,y=f.clipShadows,g=t.get(f);if(!i||v===null||v.length===0||o&&!y)o?u(null):c();else{const b=o?0:r,_=b*4;let S=g.clippingState||null;l.value=S,S=u(v,h,_,m);for(let P=0;P!==_;++P)S[P]=n[P];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,v){const x=f!==null?f.length:0;let y=null;if(x!==0){if(y=l.value,v!==!0||y===null){const g=m+x*4,b=h.matrixWorldInverse;a.getNormalMatrix(b),(y===null||y.length0){const c=new QU(l.height);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class yg extends mg{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,o,s){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=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const $f=4,iL=[.125,.215,.35,.446,.526,.582],Sc=20,PM=new yg,oL=new ot;let NM=null,IM=0,LM=0,kM=!1;const bc=(1+Math.sqrt(5))/2,uf=1/bc,sL=[new G(-bc,uf,0),new G(bc,uf,0),new G(-uf,0,bc),new G(uf,0,bc),new G(0,bc,-uf),new G(0,bc,uf),new G(-1,1,-1),new G(1,1,-1),new G(-1,1,1),new G(1,1,1)];class uC{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){NM=this._renderer.getRenderTarget(),IM=this._renderer.getActiveCubeFace(),LM=this._renderer.getActiveMipmapLevel(),kM=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=cL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=lL(),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(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=y}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===Na||e.mapping===Nl;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=cL()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=lL());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new nr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;Ev(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,PM)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let o=1;oSc&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${Sc}`);const g=[];let b=0;for(let T=0;T_-$f?i-_+$f:0),N=4*(this._cubeSize-S);Ev(n,P,N,3*S,2*S),l.setRenderTarget(n),l.render(f,PM)}}function qle(t){const e=[],n=[],r=[];let i=t;const o=t-$f+1+iL.length;for(let s=0;st-$f?l=iL[s-t+$f-1]:s===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,v=6,x=3,y=2,g=1,b=new Float32Array(x*v*m),_=new Float32Array(y*v*m),S=new Float32Array(g*v*m);for(let N=0;N2?0:-1,U=[T,L,0,T+2/3,L,0,T+2/3,L+1,0,T,L,0,T+2/3,L+1,0,T,L+1,0];b.set(U,x*v*N),_.set(h,y*v*N);const M=[N,N,N,N,N,N];S.set(M,g*v*N)}const P=new zt;P.setAttribute("position",new hn(b,x)),P.setAttribute("uv",new hn(_,y)),P.setAttribute("faceIndex",new hn(S,g)),e.push(P),i>$f&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function aL(t,e,n){const r=new os(t,e,n);return r.texture.mapping=Yd,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Ev(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function Yle(t,e,n){const r=new Float32Array(Sc),i=new G(0,1,0);return new ss({name:"SphericalGaussianBlur",defines:{n:Sc,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:nA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3799,7 +3826,7 @@ void main() { } } - `,blending:wa,depthTest:!1,depthWrite:!1})}function nL(){return new ss({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:tA(),fragmentShader:` + `,blending:wa,depthTest:!1,depthWrite:!1})}function lL(){return new ss({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:nA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3818,7 +3845,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:wa,depthTest:!1,depthWrite:!1})}function rL(){return new ss({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:tA(),fragmentShader:` + `,blending:wa,depthTest:!1,depthWrite:!1})}function cL(){return new ss({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:nA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3834,7 +3861,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:wa,depthTest:!1,depthWrite:!1})}function tA(){return` + `,blending:wa,depthTest:!1,depthWrite:!1})}function nA(){return` precision mediump float; precision mediump int; @@ -3889,16 +3916,16 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function qae(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===ym||l===xm,u=l===Na||l===Nl;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 aC(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 aC(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",o),f.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(N=Math.ceil(P/e.maxTextureSize),P=e.maxTextureSize);const T=new Float32Array(P*N*4*f),L=new s_(T,P,N,f);L.type=ai,L.needsUpdate=!0;const U=S*4;for(let R=0;R0)return t;const i=e*n;let o=oL[i];if(o===void 0&&(o=new Float32Array(i),oL[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function cr(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 uC(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",o),f.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(N=Math.ceil(P/e.maxTextureSize),P=e.maxTextureSize);const T=new Float32Array(P*N*4*f),L=new c_(T,P,N,f);L.type=ai,L.needsUpdate=!0;const U=S*4;for(let R=0;R0)return t;const i=e*n;let o=fL[i];if(o===void 0&&(o=new Float32Array(i),fL[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function cr(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[s]}`)}return r.join(` -`)}function qle(t){const e=an.getPrimaries(an.workingColorSpace),n=an.getPrimaries(t);let r;switch(e===n?r="":e===Cm&&n===Em?r="LinearDisplayP3ToLinearSRGB":e===Em&&n===Cm&&(r="LinearSRGBToLinearDisplayP3"),t){case Fa:case hg:return[r,"LinearTransferOETF"];case Eo:case o_:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function dL(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` +`)}function Kce(t){const e=an.getPrimaries(an.workingColorSpace),n=an.getPrimaries(t);let r;switch(e===n?r="":e===Rm&&n===Tm?r="LinearDisplayP3ToLinearSRGB":e===Tm&&n===Rm&&(r="LinearSRGBToLinearDisplayP3"),t){case Fa:case pg:return[r,"LinearTransferOETF"];case Eo:case l_:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function yL(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` `+i+` -`+Xle(t.getShaderSource(e),s)}else return i}function Yle(t,e){const n=qle(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function Kle(t,e){let n;switch(e){case dU:n="Linear";break;case hU:n="Reinhard";break;case pU:n="Cineon";break;case zR:n="ACESFilmic";break;case gU:n="AgX";break;case vU:n="Neutral";break;case mU:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Cv=new G;function Zle(){an.getLuminanceCoefficients(Cv);const t=Cv.x.toFixed(4),e=Cv.y.toFixed(4),n=Cv.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${t}, ${e}, ${n} );`," return dot( weights, rgb );","}"].join(` -`)}function Jle(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(pp).join(` -`)}function Qle(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` -`)}function ece(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function lC(t){return t.replace(tce,rce)}const nce=new Map;function rce(t,e){let n=Ut[e];if(n===void 0){const r=nce.get(e);if(r!==void 0)n=Ut[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 lC(n)}const ice=/#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 mL(t){return t.replace(ice,oce)}function oce(t,e,n,r){let i="";for(let o=parseInt(e);o/gm;function fC(t){return t.replace(rue,oue)}const iue=new Map;function oue(t,e){let n=Ut[e];if(n===void 0){const r=iue.get(e);if(r!==void 0)n=Ut[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 fC(n)}const sue=/#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 _L(t){return t.replace(sue,aue)}function aue(t,e,n,r){let i="";for(let o=parseInt(e);o0&&(y+=` -`),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(pp).join(` +`),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(mp).join(` `),g.length>0&&(g+=` -`)):(y=[gL(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+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(pp).join(` -`),g=[gL(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+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.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Os?"#define TONE_MAPPING":"",n.toneMapping!==Os?Ut.tonemapping_pars_fragment:"",n.toneMapping!==Os?Kle("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ut.colorspace_pars_fragment,Yle("linearToOutputTexel",n.outputColorSpace),Zle(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` -`].filter(pp).join(` -`)),s=lC(s),s=hL(s,n),s=pL(s,n),a=lC(a),a=hL(a,n),a=pL(a,n),s=mL(s),a=mL(a),n.isRawShaderMaterial!==!0&&(b=`#version 300 es +`)):(y=[wL(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+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(mp).join(` +`),g=[wL(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+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.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Os?"#define TONE_MAPPING":"",n.toneMapping!==Os?Ut.tonemapping_pars_fragment:"",n.toneMapping!==Os?Jce("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ut.colorspace_pars_fragment,Zce("linearToOutputTexel",n.outputColorSpace),Qce(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`].filter(mp).join(` +`)),s=fC(s),s=xL(s,n),s=bL(s,n),a=fC(a),a=xL(a,n),a=bL(a,n),s=_L(s),a=_L(a),n.isRawShaderMaterial!==!0&&(b=`#version 300 es `,y=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+y,g=["#define varying in",n.glslVersion===sC?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===sC?"":"#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(` +`+y,g=["#define varying in",n.glslVersion===cC?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===cC?"":"#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+y+s,S=b+g+a,P=fL(i,i.VERTEX_SHADER,_),N=fL(i,i.FRAGMENT_SHADER,S);i.attachShader(x,P),i.attachShader(x,N),n.index0AttributeName!==void 0?i.bindAttribLocation(x,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function T(R){if(t.debug.checkShaderErrors){const D=i.getProgramInfoLog(x).trim(),O=i.getShaderInfoLog(P).trim(),B=i.getShaderInfoLog(N).trim();let X=!0,H=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(X=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,x,P,N);else{const Z=dL(i,P,"vertex"),F=dL(i,N,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` +`+g);const _=b+y+s,S=b+g+a,P=vL(i,i.VERTEX_SHADER,_),N=vL(i,i.FRAGMENT_SHADER,S);i.attachShader(x,P),i.attachShader(x,N),n.index0AttributeName!==void 0?i.bindAttribLocation(x,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function T(R){if(t.debug.checkShaderErrors){const D=i.getProgramInfoLog(x).trim(),O=i.getShaderInfoLog(P).trim(),B=i.getShaderInfoLog(N).trim();let X=!0,H=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(X=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,x,P,N);else{const Z=yL(i,P,"vertex"),F=yL(i,N,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` Material Name: `+R.name+` Material Type: `+R.type+` Program Info Log: `+D+` `+Z+` -`+F)}else D!==""?console.warn("THREE.WebGLProgram: Program Info Log:",D):(O===""||B==="")&&(H=!1);H&&(R.diagnostics={runnable:X,programLog:D,vertexShader:{log:O,prefix:y},fragmentShader:{log:B,prefix:g}})}i.deleteShader(P),i.deleteShader(N),L=new zy(i,x),U=ece(i,x)}let L;this.getUniforms=function(){return L===void 0&&T(this),L};let U;this.getAttributes=function(){return U===void 0&&T(this),U};let M=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=i.getProgramParameter(x,Hle)),M},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Gle++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=P,this.fragmentShader=N,this}let dce=0;class hce{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.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 pce(e),n.set(e,r)),r}}class pce{constructor(e){this.id=dce++,this.code=e,this.usedTimes=0}}function mce(t,e,n,r,i,o,s){const a=new Wc,l=new hce,c=new Set,u=[],f=i.logarithmicDepthBuffer,h=i.reverseDepthBuffer,m=i.vertexTextures;let v=i.precision;const x={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 y(M){return c.add(M),M===0?"uv":`uv${M}`}function g(M,R,D,O,B){const X=O.fog,H=B.geometry,Z=M.isMeshStandardMaterial?O.environment:null,F=(M.isMeshStandardMaterial?n:e).get(M.envMap||Z),Y=F&&F.mapping===qd?F.image.height:null,K=x[M.type];M.precision!==null&&(v=i.getMaxPrecision(M.precision),v!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",v,"instead."));const ee=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,me=ee!==void 0?ee.length:0;let le=0;H.morphAttributes.position!==void 0&&(le=1),H.morphAttributes.normal!==void 0&&(le=2),H.morphAttributes.color!==void 0&&(le=3);let Q,ae,ge,Me;if(K){const Mr=Jo[K];Q=Mr.vertexShader,ae=Mr.fragmentShader}else Q=M.vertexShader,ae=M.fragmentShader,l.update(M),ge=l.getVertexShaderID(M),Me=l.getFragmentShaderID(M);const tt=t.getRenderTarget(),He=B.isInstancedMesh===!0,rt=B.isBatchedMesh===!0,Ve=!!M.map,se=!!M.matcap,j=!!F,ye=!!M.aoMap,xe=!!M.lightMap,Re=!!M.bumpMap,Pe=!!M.normalMap,Ee=!!M.displacementMap,De=!!M.emissiveMap,$=!!M.metalnessMap,z=!!M.roughnessMap,re=M.anisotropy>0,he=M.clearcoat>0,pe=M.dispersion>0,be=M.iridescence>0,Ge=M.sheen>0,Fe=M.transmission>0,Ne=re&&!!M.anisotropyMap,ze=he&&!!M.clearcoatMap,Le=he&&!!M.clearcoatNormalMap,Xe=he&&!!M.clearcoatRoughnessMap,xt=be&&!!M.iridescenceMap,Oe=be&&!!M.iridescenceThicknessMap,Ue=Ge&&!!M.sheenColorMap,Ae=Ge&&!!M.sheenRoughnessMap,ke=!!M.specularMap,dt=!!M.specularColorMap,J=!!M.specularIntensityMap,je=Fe&&!!M.transmissionMap,fe=Fe&&!!M.thicknessMap,Te=!!M.gradientMap,Ke=!!M.alphaMap,Ye=M.alphaTest>0,Bt=!!M.alphaHash,An=!!M.extensions;let kr=Os;M.toneMapped&&(tt===null||tt.isXRRenderTarget===!0)&&(kr=t.toneMapping);const Yt={shaderID:K,shaderType:M.type,shaderName:M.name,vertexShader:Q,fragmentShader:ae,defines:M.defines,customVertexShaderID:ge,customFragmentShaderID:Me,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:v,batching:rt,batchingColor:rt&&B._colorsTexture!==null,instancing:He,instancingColor:He&&B.instanceColor!==null,instancingMorph:He&&B.morphTexture!==null,supportsVertexTextures:m,outputColorSpace:tt===null?t.outputColorSpace:tt.isXRRenderTarget===!0?tt.texture.colorSpace:Fa,alphaToCoverage:!!M.alphaToCoverage,map:Ve,matcap:se,envMap:j,envMapMode:j&&F.mapping,envMapCubeUVHeight:Y,aoMap:ye,lightMap:xe,bumpMap:Re,normalMap:Pe,displacementMap:m&&Ee,emissiveMap:De,normalMapObjectSpace:Pe&&M.normalMapType===MU,normalMapTangentSpace:Pe&&M.normalMapType===jl,metalnessMap:$,roughnessMap:z,anisotropy:re,anisotropyMap:Ne,clearcoat:he,clearcoatMap:ze,clearcoatNormalMap:Le,clearcoatRoughnessMap:Xe,dispersion:pe,iridescence:be,iridescenceMap:xt,iridescenceThicknessMap:Oe,sheen:Ge,sheenColorMap:Ue,sheenRoughnessMap:Ae,specularMap:ke,specularColorMap:dt,specularIntensityMap:J,transmission:Fe,transmissionMap:je,thicknessMap:fe,gradientMap:Te,opaque:M.transparent===!1&&M.blending===jc&&M.alphaToCoverage===!1,alphaMap:Ke,alphaTest:Ye,alphaHash:Bt,combine:M.combine,mapUv:Ve&&y(M.map.channel),aoMapUv:ye&&y(M.aoMap.channel),lightMapUv:xe&&y(M.lightMap.channel),bumpMapUv:Re&&y(M.bumpMap.channel),normalMapUv:Pe&&y(M.normalMap.channel),displacementMapUv:Ee&&y(M.displacementMap.channel),emissiveMapUv:De&&y(M.emissiveMap.channel),metalnessMapUv:$&&y(M.metalnessMap.channel),roughnessMapUv:z&&y(M.roughnessMap.channel),anisotropyMapUv:Ne&&y(M.anisotropyMap.channel),clearcoatMapUv:ze&&y(M.clearcoatMap.channel),clearcoatNormalMapUv:Le&&y(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Xe&&y(M.clearcoatRoughnessMap.channel),iridescenceMapUv:xt&&y(M.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&y(M.iridescenceThicknessMap.channel),sheenColorMapUv:Ue&&y(M.sheenColorMap.channel),sheenRoughnessMapUv:Ae&&y(M.sheenRoughnessMap.channel),specularMapUv:ke&&y(M.specularMap.channel),specularColorMapUv:dt&&y(M.specularColorMap.channel),specularIntensityMapUv:J&&y(M.specularIntensityMap.channel),transmissionMapUv:je&&y(M.transmissionMap.channel),thicknessMapUv:fe&&y(M.thicknessMap.channel),alphaMapUv:Ke&&y(M.alphaMap.channel),vertexTangents:!!H.attributes.tangent&&(Pe||re),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,pointsUvs:B.isPoints===!0&&!!H.attributes.uv&&(Ve||Ke),fog:!!X,useFog:M.fog===!0,fogExp2:!!X&&X.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:h,skinning:B.isSkinnedMesh===!0,morphTargets:H.morphAttributes.position!==void 0,morphNormals:H.morphAttributes.normal!==void 0,morphColors:H.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:le,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numLightProbes:R.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:M.dithering,shadowMapEnabled:t.shadowMap.enabled&&D.length>0,shadowMapType:t.shadowMap.type,toneMapping:kr,decodeVideoTexture:Ve&&M.map.isVideoTexture===!0&&an.getTransfer(M.map.colorSpace)===xn,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Qo,flipSided:M.side===fi,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:An&&M.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(An&&M.extensions.multiDraw===!0||rt)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return Yt.vertexUv1s=c.has(1),Yt.vertexUv2s=c.has(2),Yt.vertexUv3s=c.has(3),c.clear(),Yt}function b(M){const R=[];if(M.shaderID?R.push(M.shaderID):(R.push(M.customVertexShaderID),R.push(M.customFragmentShaderID)),M.defines!==void 0)for(const D in M.defines)R.push(D),R.push(M.defines[D]);return M.isRawShaderMaterial===!1&&(_(R,M),S(R,M),R.push(t.outputColorSpace)),R.push(M.customProgramCacheKey),R.join()}function _(M,R){M.push(R.precision),M.push(R.outputColorSpace),M.push(R.envMapMode),M.push(R.envMapCubeUVHeight),M.push(R.mapUv),M.push(R.alphaMapUv),M.push(R.lightMapUv),M.push(R.aoMapUv),M.push(R.bumpMapUv),M.push(R.normalMapUv),M.push(R.displacementMapUv),M.push(R.emissiveMapUv),M.push(R.metalnessMapUv),M.push(R.roughnessMapUv),M.push(R.anisotropyMapUv),M.push(R.clearcoatMapUv),M.push(R.clearcoatNormalMapUv),M.push(R.clearcoatRoughnessMapUv),M.push(R.iridescenceMapUv),M.push(R.iridescenceThicknessMapUv),M.push(R.sheenColorMapUv),M.push(R.sheenRoughnessMapUv),M.push(R.specularMapUv),M.push(R.specularColorMapUv),M.push(R.specularIntensityMapUv),M.push(R.transmissionMapUv),M.push(R.thicknessMapUv),M.push(R.combine),M.push(R.fogExp2),M.push(R.sizeAttenuation),M.push(R.morphTargetsCount),M.push(R.morphAttributeCount),M.push(R.numDirLights),M.push(R.numPointLights),M.push(R.numSpotLights),M.push(R.numSpotLightMaps),M.push(R.numHemiLights),M.push(R.numRectAreaLights),M.push(R.numDirLightShadows),M.push(R.numPointLightShadows),M.push(R.numSpotLightShadows),M.push(R.numSpotLightShadowsWithMaps),M.push(R.numLightProbes),M.push(R.shadowMapType),M.push(R.toneMapping),M.push(R.numClippingPlanes),M.push(R.numClipIntersection),M.push(R.depthPacking)}function S(M,R){a.disableAll(),R.supportsVertexTextures&&a.enable(0),R.instancing&&a.enable(1),R.instancingColor&&a.enable(2),R.instancingMorph&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUv1s&&a.enable(13),R.vertexUv2s&&a.enable(14),R.vertexUv3s&&a.enable(15),R.vertexTangents&&a.enable(16),R.anisotropy&&a.enable(17),R.alphaHash&&a.enable(18),R.batching&&a.enable(19),R.dispersion&&a.enable(20),R.batchingColor&&a.enable(21),M.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.reverseDepthBuffer&&a.enable(4),R.skinning&&a.enable(5),R.morphTargets&&a.enable(6),R.morphNormals&&a.enable(7),R.morphColors&&a.enable(8),R.premultipliedAlpha&&a.enable(9),R.shadowMapEnabled&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.opaque&&a.enable(17),R.pointsUvs&&a.enable(18),R.decodeVideoTexture&&a.enable(19),R.alphaToCoverage&&a.enable(20),M.push(a.mask)}function P(M){const R=x[M.type];let D;if(R){const O=Jo[R];D=UU.clone(O.uniforms)}else D=M.uniforms;return D}function N(M,R){let D;for(let O=0,B=u.length;O0?r.push(g):m.transparent===!0?i.push(g):n.push(g)}function l(f,h,m,v,x,y){const g=s(f,h,m,v,x,y);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||vce),r.length>1&&r.sort(h||vL),i.length>1&&i.sort(h||vL)}function u(){for(let f=e,h=t.length;f=o.length?(s=new yL,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function xce(){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 G,color:new ot};break;case"SpotLight":n={position:new G,direction:new G,color:new ot,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new G,color:new ot,distance:0,decay:0};break;case"HemisphereLight":n={direction:new G,skyColor:new ot,groundColor:new ot};break;case"RectAreaLight":n={color:new ot,position:new G,halfWidth:new G,halfHeight:new G};break}return t[e.id]=n,n}}}function bce(){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 Ie};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ie};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ie,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let _ce=0;function wce(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Sce(t){const e=new xce,n=bce(),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 G);const i=new G,o=new wt,s=new wt;function a(c){let u=0,f=0,h=0;for(let U=0;U<9;U++)r.probe[U].set(0,0,0);let m=0,v=0,x=0,y=0,g=0,b=0,_=0,S=0,P=0,N=0,T=0;c.sort(wce);for(let U=0,M=c.length;U0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Je.LTC_FLOAT_1,r.rectAreaLTC2=Je.LTC_FLOAT_2):(r.rectAreaLTC1=Je.LTC_HALF_1,r.rectAreaLTC2=Je.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=f,r.ambient[2]=h;const L=r.hash;(L.directionalLength!==m||L.pointLength!==v||L.spotLength!==x||L.rectAreaLength!==y||L.hemiLength!==g||L.numDirectionalShadows!==b||L.numPointShadows!==_||L.numSpotShadows!==S||L.numSpotMaps!==P||L.numLightProbes!==T)&&(r.directional.length=m,r.spot.length=x,r.rectArea.length=y,r.point.length=v,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+P-N,r.spotLightMap.length=P,r.numSpotLightShadowsWithMaps=N,r.numLightProbes=T,L.directionalLength=m,L.pointLength=v,L.spotLength=x,L.rectAreaLength=y,L.hemiLength=g,L.numDirectionalShadows=b,L.numPointShadows=_,L.numSpotShadows=S,L.numSpotMaps=P,L.numLightProbes=T,r.version=_ce++)}function l(c,u){let f=0,h=0,m=0,v=0,x=0;const y=u.matrixWorldInverse;for(let g=0,b=c.length;g=s.length?(a=new xL(t),s.push(a)):a=s[o],a}function r(){e=new WeakMap}return{get:n,dispose:r}}class rA extends Ir{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=wU,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 iA extends Ir{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Ece=`void main() { +`+F)}else D!==""?console.warn("THREE.WebGLProgram: Program Info Log:",D):(O===""||B==="")&&(H=!1);H&&(R.diagnostics={runnable:X,programLog:D,vertexShader:{log:O,prefix:y},fragmentShader:{log:B,prefix:g}})}i.deleteShader(P),i.deleteShader(N),L=new Uy(i,x),U=nue(i,x)}let L;this.getUniforms=function(){return L===void 0&&T(this),L};let U;this.getAttributes=function(){return U===void 0&&T(this),U};let M=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=i.getProgramParameter(x,Xce)),M},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=qce++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=P,this.fragmentShader=N,this}let pue=0;class mue{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.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 gue(e),n.set(e,r)),r}}class gue{constructor(e){this.id=pue++,this.code=e,this.usedTimes=0}}function vue(t,e,n,r,i,o,s){const a=new Wc,l=new mue,c=new Set,u=[],f=i.logarithmicDepthBuffer,h=i.reverseDepthBuffer,m=i.vertexTextures;let v=i.precision;const x={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 y(M){return c.add(M),M===0?"uv":`uv${M}`}function g(M,R,D,O,B){const X=O.fog,H=B.geometry,Z=M.isMeshStandardMaterial?O.environment:null,F=(M.isMeshStandardMaterial?n:e).get(M.envMap||Z),Y=F&&F.mapping===Yd?F.image.height:null,K=x[M.type];M.precision!==null&&(v=i.getMaxPrecision(M.precision),v!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",v,"instead."));const ee=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,me=ee!==void 0?ee.length:0;let le=0;H.morphAttributes.position!==void 0&&(le=1),H.morphAttributes.normal!==void 0&&(le=2),H.morphAttributes.color!==void 0&&(le=3);let Q,ae,ge,Me;if(K){const Mr=Jo[K];Q=Mr.vertexShader,ae=Mr.fragmentShader}else Q=M.vertexShader,ae=M.fragmentShader,l.update(M),ge=l.getVertexShaderID(M),Me=l.getFragmentShaderID(M);const tt=t.getRenderTarget(),He=B.isInstancedMesh===!0,rt=B.isBatchedMesh===!0,Ve=!!M.map,se=!!M.matcap,j=!!F,ye=!!M.aoMap,xe=!!M.lightMap,Re=!!M.bumpMap,Pe=!!M.normalMap,Ee=!!M.displacementMap,De=!!M.emissiveMap,$=!!M.metalnessMap,z=!!M.roughnessMap,re=M.anisotropy>0,he=M.clearcoat>0,pe=M.dispersion>0,be=M.iridescence>0,Ge=M.sheen>0,Fe=M.transmission>0,Ne=re&&!!M.anisotropyMap,ze=he&&!!M.clearcoatMap,Le=he&&!!M.clearcoatNormalMap,Xe=he&&!!M.clearcoatRoughnessMap,xt=be&&!!M.iridescenceMap,Oe=be&&!!M.iridescenceThicknessMap,Ue=Ge&&!!M.sheenColorMap,Ae=Ge&&!!M.sheenRoughnessMap,ke=!!M.specularMap,dt=!!M.specularColorMap,J=!!M.specularIntensityMap,je=Fe&&!!M.transmissionMap,fe=Fe&&!!M.thicknessMap,Te=!!M.gradientMap,Ke=!!M.alphaMap,Ye=M.alphaTest>0,Bt=!!M.alphaHash,An=!!M.extensions;let kr=Os;M.toneMapped&&(tt===null||tt.isXRRenderTarget===!0)&&(kr=t.toneMapping);const Yt={shaderID:K,shaderType:M.type,shaderName:M.name,vertexShader:Q,fragmentShader:ae,defines:M.defines,customVertexShaderID:ge,customFragmentShaderID:Me,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:v,batching:rt,batchingColor:rt&&B._colorsTexture!==null,instancing:He,instancingColor:He&&B.instanceColor!==null,instancingMorph:He&&B.morphTexture!==null,supportsVertexTextures:m,outputColorSpace:tt===null?t.outputColorSpace:tt.isXRRenderTarget===!0?tt.texture.colorSpace:Fa,alphaToCoverage:!!M.alphaToCoverage,map:Ve,matcap:se,envMap:j,envMapMode:j&&F.mapping,envMapCubeUVHeight:Y,aoMap:ye,lightMap:xe,bumpMap:Re,normalMap:Pe,displacementMap:m&&Ee,emissiveMap:De,normalMapObjectSpace:Pe&&M.normalMapType===DU,normalMapTangentSpace:Pe&&M.normalMapType===Vl,metalnessMap:$,roughnessMap:z,anisotropy:re,anisotropyMap:Ne,clearcoat:he,clearcoatMap:ze,clearcoatNormalMap:Le,clearcoatRoughnessMap:Xe,dispersion:pe,iridescence:be,iridescenceMap:xt,iridescenceThicknessMap:Oe,sheen:Ge,sheenColorMap:Ue,sheenRoughnessMap:Ae,specularMap:ke,specularColorMap:dt,specularIntensityMap:J,transmission:Fe,transmissionMap:je,thicknessMap:fe,gradientMap:Te,opaque:M.transparent===!1&&M.blending===jc&&M.alphaToCoverage===!1,alphaMap:Ke,alphaTest:Ye,alphaHash:Bt,combine:M.combine,mapUv:Ve&&y(M.map.channel),aoMapUv:ye&&y(M.aoMap.channel),lightMapUv:xe&&y(M.lightMap.channel),bumpMapUv:Re&&y(M.bumpMap.channel),normalMapUv:Pe&&y(M.normalMap.channel),displacementMapUv:Ee&&y(M.displacementMap.channel),emissiveMapUv:De&&y(M.emissiveMap.channel),metalnessMapUv:$&&y(M.metalnessMap.channel),roughnessMapUv:z&&y(M.roughnessMap.channel),anisotropyMapUv:Ne&&y(M.anisotropyMap.channel),clearcoatMapUv:ze&&y(M.clearcoatMap.channel),clearcoatNormalMapUv:Le&&y(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Xe&&y(M.clearcoatRoughnessMap.channel),iridescenceMapUv:xt&&y(M.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&y(M.iridescenceThicknessMap.channel),sheenColorMapUv:Ue&&y(M.sheenColorMap.channel),sheenRoughnessMapUv:Ae&&y(M.sheenRoughnessMap.channel),specularMapUv:ke&&y(M.specularMap.channel),specularColorMapUv:dt&&y(M.specularColorMap.channel),specularIntensityMapUv:J&&y(M.specularIntensityMap.channel),transmissionMapUv:je&&y(M.transmissionMap.channel),thicknessMapUv:fe&&y(M.thicknessMap.channel),alphaMapUv:Ke&&y(M.alphaMap.channel),vertexTangents:!!H.attributes.tangent&&(Pe||re),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,pointsUvs:B.isPoints===!0&&!!H.attributes.uv&&(Ve||Ke),fog:!!X,useFog:M.fog===!0,fogExp2:!!X&&X.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:h,skinning:B.isSkinnedMesh===!0,morphTargets:H.morphAttributes.position!==void 0,morphNormals:H.morphAttributes.normal!==void 0,morphColors:H.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:le,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numLightProbes:R.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:M.dithering,shadowMapEnabled:t.shadowMap.enabled&&D.length>0,shadowMapType:t.shadowMap.type,toneMapping:kr,decodeVideoTexture:Ve&&M.map.isVideoTexture===!0&&an.getTransfer(M.map.colorSpace)===xn,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Qo,flipSided:M.side===fi,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:An&&M.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(An&&M.extensions.multiDraw===!0||rt)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return Yt.vertexUv1s=c.has(1),Yt.vertexUv2s=c.has(2),Yt.vertexUv3s=c.has(3),c.clear(),Yt}function b(M){const R=[];if(M.shaderID?R.push(M.shaderID):(R.push(M.customVertexShaderID),R.push(M.customFragmentShaderID)),M.defines!==void 0)for(const D in M.defines)R.push(D),R.push(M.defines[D]);return M.isRawShaderMaterial===!1&&(_(R,M),S(R,M),R.push(t.outputColorSpace)),R.push(M.customProgramCacheKey),R.join()}function _(M,R){M.push(R.precision),M.push(R.outputColorSpace),M.push(R.envMapMode),M.push(R.envMapCubeUVHeight),M.push(R.mapUv),M.push(R.alphaMapUv),M.push(R.lightMapUv),M.push(R.aoMapUv),M.push(R.bumpMapUv),M.push(R.normalMapUv),M.push(R.displacementMapUv),M.push(R.emissiveMapUv),M.push(R.metalnessMapUv),M.push(R.roughnessMapUv),M.push(R.anisotropyMapUv),M.push(R.clearcoatMapUv),M.push(R.clearcoatNormalMapUv),M.push(R.clearcoatRoughnessMapUv),M.push(R.iridescenceMapUv),M.push(R.iridescenceThicknessMapUv),M.push(R.sheenColorMapUv),M.push(R.sheenRoughnessMapUv),M.push(R.specularMapUv),M.push(R.specularColorMapUv),M.push(R.specularIntensityMapUv),M.push(R.transmissionMapUv),M.push(R.thicknessMapUv),M.push(R.combine),M.push(R.fogExp2),M.push(R.sizeAttenuation),M.push(R.morphTargetsCount),M.push(R.morphAttributeCount),M.push(R.numDirLights),M.push(R.numPointLights),M.push(R.numSpotLights),M.push(R.numSpotLightMaps),M.push(R.numHemiLights),M.push(R.numRectAreaLights),M.push(R.numDirLightShadows),M.push(R.numPointLightShadows),M.push(R.numSpotLightShadows),M.push(R.numSpotLightShadowsWithMaps),M.push(R.numLightProbes),M.push(R.shadowMapType),M.push(R.toneMapping),M.push(R.numClippingPlanes),M.push(R.numClipIntersection),M.push(R.depthPacking)}function S(M,R){a.disableAll(),R.supportsVertexTextures&&a.enable(0),R.instancing&&a.enable(1),R.instancingColor&&a.enable(2),R.instancingMorph&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUv1s&&a.enable(13),R.vertexUv2s&&a.enable(14),R.vertexUv3s&&a.enable(15),R.vertexTangents&&a.enable(16),R.anisotropy&&a.enable(17),R.alphaHash&&a.enable(18),R.batching&&a.enable(19),R.dispersion&&a.enable(20),R.batchingColor&&a.enable(21),M.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.reverseDepthBuffer&&a.enable(4),R.skinning&&a.enable(5),R.morphTargets&&a.enable(6),R.morphNormals&&a.enable(7),R.morphColors&&a.enable(8),R.premultipliedAlpha&&a.enable(9),R.shadowMapEnabled&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.opaque&&a.enable(17),R.pointsUvs&&a.enable(18),R.decodeVideoTexture&&a.enable(19),R.alphaToCoverage&&a.enable(20),M.push(a.mask)}function P(M){const R=x[M.type];let D;if(R){const O=Jo[R];D=ZU.clone(O.uniforms)}else D=M.uniforms;return D}function N(M,R){let D;for(let O=0,B=u.length;O0?r.push(g):m.transparent===!0?i.push(g):n.push(g)}function l(f,h,m,v,x,y){const g=s(f,h,m,v,x,y);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||xue),r.length>1&&r.sort(h||SL),i.length>1&&i.sort(h||SL)}function u(){for(let f=e,h=t.length;f=o.length?(s=new ML,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function _ue(){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 G,color:new ot};break;case"SpotLight":n={position:new G,direction:new G,color:new ot,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new G,color:new ot,distance:0,decay:0};break;case"HemisphereLight":n={direction:new G,skyColor:new ot,groundColor:new ot};break;case"RectAreaLight":n={color:new ot,position:new G,halfWidth:new G,halfHeight:new G};break}return t[e.id]=n,n}}}function wue(){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 Ie};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ie};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ie,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let Sue=0;function Mue(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Eue(t){const e=new _ue,n=wue(),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 G);const i=new G,o=new wt,s=new wt;function a(c){let u=0,f=0,h=0;for(let U=0;U<9;U++)r.probe[U].set(0,0,0);let m=0,v=0,x=0,y=0,g=0,b=0,_=0,S=0,P=0,N=0,T=0;c.sort(Mue);for(let U=0,M=c.length;U0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Je.LTC_FLOAT_1,r.rectAreaLTC2=Je.LTC_FLOAT_2):(r.rectAreaLTC1=Je.LTC_HALF_1,r.rectAreaLTC2=Je.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=f,r.ambient[2]=h;const L=r.hash;(L.directionalLength!==m||L.pointLength!==v||L.spotLength!==x||L.rectAreaLength!==y||L.hemiLength!==g||L.numDirectionalShadows!==b||L.numPointShadows!==_||L.numSpotShadows!==S||L.numSpotMaps!==P||L.numLightProbes!==T)&&(r.directional.length=m,r.spot.length=x,r.rectArea.length=y,r.point.length=v,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+P-N,r.spotLightMap.length=P,r.numSpotLightShadowsWithMaps=N,r.numLightProbes=T,L.directionalLength=m,L.pointLength=v,L.spotLength=x,L.rectAreaLength=y,L.hemiLength=g,L.numDirectionalShadows=b,L.numPointShadows=_,L.numSpotShadows=S,L.numSpotMaps=P,L.numLightProbes=T,r.version=Sue++)}function l(c,u){let f=0,h=0,m=0,v=0,x=0;const y=u.matrixWorldInverse;for(let g=0,b=c.length;g=s.length?(a=new EL(t),s.push(a)):a=s[o],a}function r(){e=new WeakMap}return{get:n,dispose:r}}class iA extends Ir{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=kU,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 oA extends Ir{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Tue=`void main() { gl_Position = vec4( position, 1.0 ); -}`,Cce=`uniform sampler2D shadow_pass; +}`,Rue=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3967,12 +3994,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function Tce(t,e,n){let r=new gg;const i=new Ie,o=new Ie,s=new Zt,a=new rA({depthPacking:SU}),l=new iA,c={},u=n.maxTextureSize,f={[Pa]:fi,[fi]:Pa,[Qo]:Qo},h=new ss({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ie},radius:{value:4}},vertexShader:Ece,fragmentShader:Cce}),m=h.clone();m.defines.HORIZONTAL_PASS=1;const v=new zt;v.setAttribute("position",new hn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new nr(v,h),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Jb;let g=this.type;this.render=function(N,T,L){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||N.length===0)return;const U=t.getRenderTarget(),M=t.getActiveCubeFace(),R=t.getActiveMipmapLevel(),D=t.state;D.setBlending(wa),D.buffers.color.setClear(1,1,1,1),D.buffers.depth.setTest(!0),D.setScissorTest(!1);const O=g!==Yo&&this.type===Yo,B=g===Yo&&this.type!==Yo;for(let X=0,H=N.length;Xu||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/Y.x),i.x=o.x*Y.x,F.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/Y.y),i.y=o.y*Y.y,F.mapSize.y=o.y)),F.map===null||O===!0||B===!0){const ee=this.type!==Yo?{minFilter:lr,magFilter:lr}:{};F.map!==null&&F.map.dispose(),F.map=new os(i.x,i.y,ee),F.map.texture.name=Z.name+".shadowMap",F.camera.updateProjectionMatrix()}t.setRenderTarget(F.map),t.clear();const K=F.getViewportCount();for(let ee=0;ee0||T.map&&T.alphaTest>0){const D=M.uuid,O=T.uuid;let B=c[D];B===void 0&&(B={},c[D]=B);let X=B[O];X===void 0&&(X=M.clone(),B[O]=X,T.addEventListener("dispose",P)),M=X}if(M.visible=T.visible,M.wireframe=T.wireframe,U===Yo?M.side=T.shadowSide!==null?T.shadowSide:T.side:M.side=T.shadowSide!==null?T.shadowSide:f[T.side],M.alphaMap=T.alphaMap,M.alphaTest=T.alphaTest,M.map=T.map,M.clipShadows=T.clipShadows,M.clippingPlanes=T.clippingPlanes,M.clipIntersection=T.clipIntersection,M.displacementMap=T.displacementMap,M.displacementScale=T.displacementScale,M.displacementBias=T.displacementBias,M.wireframeLinewidth=T.wireframeLinewidth,M.linewidth=T.linewidth,L.isPointLight===!0&&M.isMeshDistanceMaterial===!0){const D=t.properties.get(M);D.light=L}return M}function S(N,T,L,U,M){if(N.visible===!1)return;if(N.layers.test(T.layers)&&(N.isMesh||N.isLine||N.isPoints)&&(N.castShadow||N.receiveShadow&&M===Yo)&&(!N.frustumCulled||r.intersectsObject(N))){N.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,N.matrixWorld);const O=e.update(N),B=N.material;if(Array.isArray(B)){const X=O.groups;for(let H=0,Z=X.length;H=1):Z.indexOf("OpenGL ES")!==-1&&(H=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),X=H>=2);let F=null,Y={};const K=t.getParameter(t.SCISSOR_BOX),ee=t.getParameter(t.VIEWPORT),me=new Zt().fromArray(K),le=new Zt().fromArray(ee);function Q(J,je,fe,Te){const Ke=new Uint8Array(4),Ye=t.createTexture();t.bindTexture(J,Ye),t.texParameteri(J,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(J,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Bt=0;Bte?(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 Nce(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 Ice(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function cC(t,e,n,r){const i=Lce(r);switch(n){case $R:return t*e;case HR:return t*e;case GR:return t*e*2;case fg:return t*e/i.components*i.byteLength;case dg:return t*e/i.components*i.byteLength;case XR:return t*e*2/i.components*i.byteLength;case n_:return t*e*2/i.components*i.byteLength;case WR:return t*e*3/i.components*i.byteLength;case Rr:return t*e*4/i.components*i.byteLength;case r_:return t*e*4/i.components*i.byteLength;case Np:case Ip:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Lp:case kp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case B1:case V1:return Math.max(t,16)*Math.max(e,8)/4;case U1:case j1:return Math.max(t,8)*Math.max(e,8)/2;case $1:case W1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case H1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case G1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case X1:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case q1:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case Y1:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case K1:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case Z1:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case J1:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case Q1:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case ex:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case tx:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case nx:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case rx:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case ix:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case ox:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Op:case sx:case ax:return Math.ceil(t/4)*Math.ceil(e/4)*16;case qR:case lx:return Math.ceil(t/4)*Math.ceil(e/4)*8;case cx:case ux:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function Lce(t){switch(t){case Fi:case BR:return{byteLength:1,components:1};case Sd:case jR:case xu:return{byteLength:2,components:1};case e_:case t_:return{byteLength:2,components:4};case Ia:case Qb:case ai:return{byteLength:4,components:1};case VR:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const kce={contain:Pce,cover:Nce,fill:Ice,getByteLength:cC};function Oce(t,e,n,r,i,o,s){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Ie,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 v($,z){return m?new OffscreenCanvas($,z):Am("canvas")}function x($,z,re){let he=1;const pe=De($);if((pe.width>re||pe.height>re)&&(he=re/Math.max(pe.width,pe.height)),he<1)if(typeof HTMLImageElement<"u"&&$ instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&$ instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&$ instanceof ImageBitmap||typeof VideoFrame<"u"&&$ instanceof VideoFrame){const be=Math.floor(he*pe.width),Ge=Math.floor(he*pe.height);f===void 0&&(f=v(be,Ge));const Fe=z?v(be,Ge):f;return Fe.width=be,Fe.height=Ge,Fe.getContext("2d").drawImage($,0,0,be,Ge),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+pe.width+"x"+pe.height+") to ("+be+"x"+Ge+")."),Fe}else return"data"in $&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+pe.width+"x"+pe.height+")."),$;return $}function y($){return $.generateMipmaps&&$.minFilter!==lr&&$.minFilter!==tr}function g($){t.generateMipmap($)}function b($,z,re,he,pe=!1){if($!==null){if(t[$]!==void 0)return t[$];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+$+"'")}let be=z;if(z===t.RED&&(re===t.FLOAT&&(be=t.R32F),re===t.HALF_FLOAT&&(be=t.R16F),re===t.UNSIGNED_BYTE&&(be=t.R8)),z===t.RED_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.R8UI),re===t.UNSIGNED_SHORT&&(be=t.R16UI),re===t.UNSIGNED_INT&&(be=t.R32UI),re===t.BYTE&&(be=t.R8I),re===t.SHORT&&(be=t.R16I),re===t.INT&&(be=t.R32I)),z===t.RG&&(re===t.FLOAT&&(be=t.RG32F),re===t.HALF_FLOAT&&(be=t.RG16F),re===t.UNSIGNED_BYTE&&(be=t.RG8)),z===t.RG_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.RG8UI),re===t.UNSIGNED_SHORT&&(be=t.RG16UI),re===t.UNSIGNED_INT&&(be=t.RG32UI),re===t.BYTE&&(be=t.RG8I),re===t.SHORT&&(be=t.RG16I),re===t.INT&&(be=t.RG32I)),z===t.RGB_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.RGB8UI),re===t.UNSIGNED_SHORT&&(be=t.RGB16UI),re===t.UNSIGNED_INT&&(be=t.RGB32UI),re===t.BYTE&&(be=t.RGB8I),re===t.SHORT&&(be=t.RGB16I),re===t.INT&&(be=t.RGB32I)),z===t.RGBA_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.RGBA8UI),re===t.UNSIGNED_SHORT&&(be=t.RGBA16UI),re===t.UNSIGNED_INT&&(be=t.RGBA32UI),re===t.BYTE&&(be=t.RGBA8I),re===t.SHORT&&(be=t.RGBA16I),re===t.INT&&(be=t.RGBA32I)),z===t.RGB&&re===t.UNSIGNED_INT_5_9_9_9_REV&&(be=t.RGB9_E5),z===t.RGBA){const Ge=pe?Mm:an.getTransfer(he);re===t.FLOAT&&(be=t.RGBA32F),re===t.HALF_FLOAT&&(be=t.RGBA16F),re===t.UNSIGNED_BYTE&&(be=Ge===xn?t.SRGB8_ALPHA8:t.RGBA8),re===t.UNSIGNED_SHORT_4_4_4_4&&(be=t.RGBA4),re===t.UNSIGNED_SHORT_5_5_5_1&&(be=t.RGB5_A1)}return(be===t.R16F||be===t.R32F||be===t.RG16F||be===t.RG32F||be===t.RGBA16F||be===t.RGBA32F)&&e.get("EXT_color_buffer_float"),be}function _($,z){let re;return $?z===null||z===Ia||z===au?re=t.DEPTH24_STENCIL8:z===ai?re=t.DEPTH32F_STENCIL8:z===Sd&&(re=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):z===null||z===Ia||z===au?re=t.DEPTH_COMPONENT24:z===ai?re=t.DEPTH_COMPONENT32F:z===Sd&&(re=t.DEPTH_COMPONENT16),re}function S($,z){return y($)===!0||$.isFramebufferTexture&&$.minFilter!==lr&&$.minFilter!==tr?Math.log2(Math.max(z.width,z.height))+1:$.mipmaps!==void 0&&$.mipmaps.length>0?$.mipmaps.length:$.isCompressedTexture&&Array.isArray($.image)?z.mipmaps.length:1}function P($){const z=$.target;z.removeEventListener("dispose",P),T(z),z.isVideoTexture&&u.delete(z)}function N($){const z=$.target;z.removeEventListener("dispose",N),U(z)}function T($){const z=r.get($);if(z.__webglInit===void 0)return;const re=$.source,he=h.get(re);if(he){const pe=he[z.__cacheKey];pe.usedTimes--,pe.usedTimes===0&&L($),Object.keys(he).length===0&&h.delete(re)}r.remove($)}function L($){const z=r.get($);t.deleteTexture(z.__webglTexture);const re=$.source,he=h.get(re);delete he[z.__cacheKey],s.memory.textures--}function U($){const z=r.get($);if($.depthTexture&&$.depthTexture.dispose(),$.isWebGLCubeRenderTarget)for(let he=0;he<6;he++){if(Array.isArray(z.__webglFramebuffer[he]))for(let pe=0;pe=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+$+" texture units while this GPU supports only "+i.maxTextures),M+=1,$}function O($){const z=[];return z.push($.wrapS),z.push($.wrapT),z.push($.wrapR||0),z.push($.magFilter),z.push($.minFilter),z.push($.anisotropy),z.push($.internalFormat),z.push($.format),z.push($.type),z.push($.generateMipmaps),z.push($.premultiplyAlpha),z.push($.flipY),z.push($.unpackAlignment),z.push($.colorSpace),z.join()}function B($,z){const re=r.get($);if($.isVideoTexture&&Pe($),$.isRenderTargetTexture===!1&&$.version>0&&re.__version!==$.version){const he=$.image;if(he===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(he.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{le(re,$,z);return}}n.bindTexture(t.TEXTURE_2D,re.__webglTexture,t.TEXTURE0+z)}function X($,z){const re=r.get($);if($.version>0&&re.__version!==$.version){le(re,$,z);return}n.bindTexture(t.TEXTURE_2D_ARRAY,re.__webglTexture,t.TEXTURE0+z)}function H($,z){const re=r.get($);if($.version>0&&re.__version!==$.version){le(re,$,z);return}n.bindTexture(t.TEXTURE_3D,re.__webglTexture,t.TEXTURE0+z)}function Z($,z){const re=r.get($);if($.version>0&&re.__version!==$.version){Q(re,$,z);return}n.bindTexture(t.TEXTURE_CUBE_MAP,re.__webglTexture,t.TEXTURE0+z)}const F={[bm]:t.REPEAT,[Ti]:t.CLAMP_TO_EDGE,[_m]:t.MIRRORED_REPEAT},Y={[lr]:t.NEAREST,[UR]:t.NEAREST_MIPMAP_NEAREST,[jf]:t.NEAREST_MIPMAP_LINEAR,[tr]:t.LINEAR,[Pp]:t.LINEAR_MIPMAP_NEAREST,[Rs]:t.LINEAR_MIPMAP_LINEAR},K={[EU]:t.NEVER,[NU]:t.ALWAYS,[CU]:t.LESS,[KR]:t.LEQUAL,[TU]:t.EQUAL,[PU]:t.GEQUAL,[RU]:t.GREATER,[AU]:t.NOTEQUAL};function ee($,z){if(z.type===ai&&e.has("OES_texture_float_linear")===!1&&(z.magFilter===tr||z.magFilter===Pp||z.magFilter===jf||z.magFilter===Rs||z.minFilter===tr||z.minFilter===Pp||z.minFilter===jf||z.minFilter===Rs)&&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,F[z.wrapS]),t.texParameteri($,t.TEXTURE_WRAP_T,F[z.wrapT]),($===t.TEXTURE_3D||$===t.TEXTURE_2D_ARRAY)&&t.texParameteri($,t.TEXTURE_WRAP_R,F[z.wrapR]),t.texParameteri($,t.TEXTURE_MAG_FILTER,Y[z.magFilter]),t.texParameteri($,t.TEXTURE_MIN_FILTER,Y[z.minFilter]),z.compareFunction&&(t.texParameteri($,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri($,t.TEXTURE_COMPARE_FUNC,K[z.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(z.magFilter===lr||z.minFilter!==jf&&z.minFilter!==Rs||z.type===ai&&e.has("OES_texture_float_linear")===!1)return;if(z.anisotropy>1||r.get(z).__currentAnisotropy){const re=e.get("EXT_texture_filter_anisotropic");t.texParameterf($,re.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(z.anisotropy,i.getMaxAnisotropy())),r.get(z).__currentAnisotropy=z.anisotropy}}}function me($,z){let re=!1;$.__webglInit===void 0&&($.__webglInit=!0,z.addEventListener("dispose",P));const he=z.source;let pe=h.get(he);pe===void 0&&(pe={},h.set(he,pe));const be=O(z);if(be!==$.__cacheKey){pe[be]===void 0&&(pe[be]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,re=!0),pe[be].usedTimes++;const Ge=pe[$.__cacheKey];Ge!==void 0&&(pe[$.__cacheKey].usedTimes--,Ge.usedTimes===0&&L(z)),$.__cacheKey=be,$.__webglTexture=pe[be].texture}return re}function le($,z,re){let he=t.TEXTURE_2D;(z.isDataArrayTexture||z.isCompressedArrayTexture)&&(he=t.TEXTURE_2D_ARRAY),z.isData3DTexture&&(he=t.TEXTURE_3D);const pe=me($,z),be=z.source;n.bindTexture(he,$.__webglTexture,t.TEXTURE0+re);const Ge=r.get(be);if(be.version!==Ge.__version||pe===!0){n.activeTexture(t.TEXTURE0+re);const Fe=an.getPrimaries(an.workingColorSpace),Ne=z.colorSpace===ha?null:an.getPrimaries(z.colorSpace),ze=z.colorSpace===ha||Fe===Ne?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,z.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,z.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);let Le=x(z.image,!1,i.maxTextureSize);Le=Ee(z,Le);const Xe=o.convert(z.format,z.colorSpace),xt=o.convert(z.type);let Oe=b(z.internalFormat,Xe,xt,z.colorSpace,z.isVideoTexture);ee(he,z);let Ue;const Ae=z.mipmaps,ke=z.isVideoTexture!==!0,dt=Ge.__version===void 0||pe===!0,J=be.dataReady,je=S(z,Le);if(z.isDepthTexture)Oe=_(z.format===lu,z.type),dt&&(ke?n.texStorage2D(t.TEXTURE_2D,1,Oe,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,Oe,Le.width,Le.height,0,Xe,xt,null));else if(z.isDataTexture)if(Ae.length>0){ke&&dt&&n.texStorage2D(t.TEXTURE_2D,je,Oe,Ae[0].width,Ae[0].height);for(let fe=0,Te=Ae.length;fe0){const Ke=cC(Ue.width,Ue.height,z.format,z.type);for(const Ye of z.layerUpdates){const Bt=Ue.data.subarray(Ye*Ke/Ue.data.BYTES_PER_ELEMENT,(Ye+1)*Ke/Ue.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,Ye,Ue.width,Ue.height,1,Xe,Bt,0,0)}z.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,0,Ue.width,Ue.height,Le.depth,Xe,Ue.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,fe,Oe,Ue.width,Ue.height,Le.depth,0,Ue.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else ke?J&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,0,Ue.width,Ue.height,Le.depth,Xe,xt,Ue.data):n.texImage3D(t.TEXTURE_2D_ARRAY,fe,Oe,Ue.width,Ue.height,Le.depth,0,Xe,xt,Ue.data)}else{ke&&dt&&n.texStorage2D(t.TEXTURE_2D,je,Oe,Ae[0].width,Ae[0].height);for(let fe=0,Te=Ae.length;fe0){const fe=cC(Le.width,Le.height,z.format,z.type);for(const Te of z.layerUpdates){const Ke=Le.data.subarray(Te*fe/Le.data.BYTES_PER_ELEMENT,(Te+1)*fe/Le.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Te,Le.width,Le.height,1,Xe,xt,Ke)}z.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Le.width,Le.height,Le.depth,Xe,xt,Le.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Oe,Le.width,Le.height,Le.depth,0,Xe,xt,Le.data);else if(z.isData3DTexture)ke?(dt&&n.texStorage3D(t.TEXTURE_3D,je,Oe,Le.width,Le.height,Le.depth),J&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Le.width,Le.height,Le.depth,Xe,xt,Le.data)):n.texImage3D(t.TEXTURE_3D,0,Oe,Le.width,Le.height,Le.depth,0,Xe,xt,Le.data);else if(z.isFramebufferTexture){if(dt)if(ke)n.texStorage2D(t.TEXTURE_2D,je,Oe,Le.width,Le.height);else{let fe=Le.width,Te=Le.height;for(let Ke=0;Ke>=1,Te>>=1}}else if(Ae.length>0){if(ke&&dt){const fe=De(Ae[0]);n.texStorage2D(t.TEXTURE_2D,je,Oe,fe.width,fe.height)}for(let fe=0,Te=Ae.length;fe0&&je++;const Te=De(Xe[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,je,Ae,Te.width,Te.height)}for(let Te=0;Te<6;Te++)if(Le){ke?J&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Te,0,0,0,Xe[Te].width,Xe[Te].height,Oe,Ue,Xe[Te].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Te,0,Ae,Xe[Te].width,Xe[Te].height,0,Oe,Ue,Xe[Te].data);for(let Ke=0;Ke>be),Xe=Math.max(1,z.height>>be);pe===t.TEXTURE_3D||pe===t.TEXTURE_2D_ARRAY?n.texImage3D(pe,be,Ne,Le,Xe,z.depth,0,Ge,Fe,null):n.texImage2D(pe,be,Ne,Le,Xe,0,Ge,Fe,null)}n.bindFramebuffer(t.FRAMEBUFFER,$),Re(z)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,he,pe,r.get(re).__webglTexture,0,xe(z)):(pe===t.TEXTURE_2D||pe>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&pe<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,he,pe,r.get(re).__webglTexture,be),n.bindFramebuffer(t.FRAMEBUFFER,null)}function ge($,z,re){if(t.bindRenderbuffer(t.RENDERBUFFER,$),z.depthBuffer){const he=z.depthTexture,pe=he&&he.isDepthTexture?he.type:null,be=_(z.stencilBuffer,pe),Ge=z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Fe=xe(z);Re(z)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Fe,be,z.width,z.height):re?t.renderbufferStorageMultisample(t.RENDERBUFFER,Fe,be,z.width,z.height):t.renderbufferStorage(t.RENDERBUFFER,be,z.width,z.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ge,t.RENDERBUFFER,$)}else{const he=z.textures;for(let pe=0;pe{delete z.__boundDepthTexture,delete z.__depthDisposeCallback,he.removeEventListener("dispose",pe)};he.addEventListener("dispose",pe),z.__depthDisposeCallback=pe}z.__boundDepthTexture=he}if($.depthTexture&&!z.__autoAllocateDepthBuffer){if(re)throw new Error("target.depthTexture not supported in Cube render targets");Me(z.__webglFramebuffer,$)}else if(re){z.__webglDepthbuffer=[];for(let he=0;he<6;he++)if(n.bindFramebuffer(t.FRAMEBUFFER,z.__webglFramebuffer[he]),z.__webglDepthbuffer[he]===void 0)z.__webglDepthbuffer[he]=t.createRenderbuffer(),ge(z.__webglDepthbuffer[he],$,!1);else{const pe=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,be=z.__webglDepthbuffer[he];t.bindRenderbuffer(t.RENDERBUFFER,be),t.framebufferRenderbuffer(t.FRAMEBUFFER,pe,t.RENDERBUFFER,be)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,z.__webglFramebuffer),z.__webglDepthbuffer===void 0)z.__webglDepthbuffer=t.createRenderbuffer(),ge(z.__webglDepthbuffer,$,!1);else{const he=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,pe=z.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,pe),t.framebufferRenderbuffer(t.FRAMEBUFFER,he,t.RENDERBUFFER,pe)}n.bindFramebuffer(t.FRAMEBUFFER,null)}function He($,z,re){const he=r.get($);z!==void 0&&ae(he.__webglFramebuffer,$,$.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),re!==void 0&&tt($)}function rt($){const z=$.texture,re=r.get($),he=r.get(z);$.addEventListener("dispose",N);const pe=$.textures,be=$.isWebGLCubeRenderTarget===!0,Ge=pe.length>1;if(Ge||(he.__webglTexture===void 0&&(he.__webglTexture=t.createTexture()),he.__version=z.version,s.memory.textures++),be){re.__webglFramebuffer=[];for(let Fe=0;Fe<6;Fe++)if(z.mipmaps&&z.mipmaps.length>0){re.__webglFramebuffer[Fe]=[];for(let Ne=0;Ne0){re.__webglFramebuffer=[];for(let Fe=0;Fe0&&Re($)===!1){re.__webglMultisampledFramebuffer=t.createFramebuffer(),re.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,re.__webglMultisampledFramebuffer);for(let Fe=0;Fe0)for(let Ne=0;Ne0)for(let Ne=0;Ne0){if(Re($)===!1){const z=$.textures,re=$.width,he=$.height;let pe=t.COLOR_BUFFER_BIT;const be=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ge=r.get($),Fe=z.length>1;if(Fe)for(let Ne=0;Ne0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&z.__useRenderToTexture!==!1}function Pe($){const z=s.render.frame;u.get($)!==z&&(u.set($,z),$.update())}function Ee($,z){const re=$.colorSpace,he=$.format,pe=$.type;return $.isCompressedTexture===!0||$.isVideoTexture===!0||re!==Fa&&re!==ha&&(an.getTransfer(re)===xn?(he!==Rr||pe!==Fi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",re)),z}function De($){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=R,this.setTexture2D=B,this.setTexture2DArray=X,this.setTexture3D=H,this.setTextureCube=Z,this.rebindTextures=He,this.setupRenderTarget=rt,this.updateRenderTargetMipmap=Ve,this.updateMultisampleRenderTarget=ye,this.setupDepthRenderbuffer=tt,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=Re}function XU(t,e){function n(r,i=ha){let o;const s=an.getTransfer(i);if(r===Fi)return t.UNSIGNED_BYTE;if(r===e_)return t.UNSIGNED_SHORT_4_4_4_4;if(r===t_)return t.UNSIGNED_SHORT_5_5_5_1;if(r===VR)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===BR)return t.BYTE;if(r===jR)return t.SHORT;if(r===Sd)return t.UNSIGNED_SHORT;if(r===Qb)return t.INT;if(r===Ia)return t.UNSIGNED_INT;if(r===ai)return t.FLOAT;if(r===xu)return t.HALF_FLOAT;if(r===$R)return t.ALPHA;if(r===WR)return t.RGB;if(r===Rr)return t.RGBA;if(r===HR)return t.LUMINANCE;if(r===GR)return t.LUMINANCE_ALPHA;if(r===Vc)return t.DEPTH_COMPONENT;if(r===lu)return t.DEPTH_STENCIL;if(r===fg)return t.RED;if(r===dg)return t.RED_INTEGER;if(r===XR)return t.RG;if(r===n_)return t.RG_INTEGER;if(r===r_)return t.RGBA_INTEGER;if(r===Np||r===Ip||r===Lp||r===kp)if(s===xn)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(r===Np)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Ip)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Lp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===kp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(r===Np)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Ip)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Lp)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===kp)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===U1||r===B1||r===j1||r===V1)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(r===U1)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===B1)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===j1)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===V1)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===$1||r===W1||r===H1)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(r===$1||r===W1)return s===xn?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(r===H1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===G1||r===X1||r===q1||r===Y1||r===K1||r===Z1||r===J1||r===Q1||r===ex||r===tx||r===nx||r===rx||r===ix||r===ox)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(r===G1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===X1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===q1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===Y1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===K1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===Z1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===J1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===Q1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===ex)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===tx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===nx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===rx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===ix)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===ox)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Op||r===sx||r===ax)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(r===Op)return s===xn?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===sx)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===ax)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===qR||r===lx||r===cx||r===ux)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(r===Op)return o.COMPRESSED_RED_RGTC1_EXT;if(r===lx)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===cx)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===ux)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===au?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}class qU extends vr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let Wf=class extends tn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const Dce={type:"move"};class OM{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Wf,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Wf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new G,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new G),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Wf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new G,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new G),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,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const x of e.hand.values()){const y=n.getJointPose(x,r),g=this._getHandJoint(c,x);y!==null&&(g.matrix.fromArray(y.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=y.radius),g.visible=y!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),m=.02,v=.005;c.inputState.pinching&&h>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),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(Dce)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Wf;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}const Fce=` +}`;function Aue(t,e,n){let r=new vg;const i=new Ie,o=new Ie,s=new Zt,a=new iA({depthPacking:OU}),l=new oA,c={},u=n.maxTextureSize,f={[Pa]:fi,[fi]:Pa,[Qo]:Qo},h=new ss({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ie},radius:{value:4}},vertexShader:Tue,fragmentShader:Rue}),m=h.clone();m.defines.HORIZONTAL_PASS=1;const v=new zt;v.setAttribute("position",new hn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new nr(v,h),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=t_;let g=this.type;this.render=function(N,T,L){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||N.length===0)return;const U=t.getRenderTarget(),M=t.getActiveCubeFace(),R=t.getActiveMipmapLevel(),D=t.state;D.setBlending(wa),D.buffers.color.setClear(1,1,1,1),D.buffers.depth.setTest(!0),D.setScissorTest(!1);const O=g!==Yo&&this.type===Yo,B=g===Yo&&this.type!==Yo;for(let X=0,H=N.length;Xu||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/Y.x),i.x=o.x*Y.x,F.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/Y.y),i.y=o.y*Y.y,F.mapSize.y=o.y)),F.map===null||O===!0||B===!0){const ee=this.type!==Yo?{minFilter:lr,magFilter:lr}:{};F.map!==null&&F.map.dispose(),F.map=new os(i.x,i.y,ee),F.map.texture.name=Z.name+".shadowMap",F.camera.updateProjectionMatrix()}t.setRenderTarget(F.map),t.clear();const K=F.getViewportCount();for(let ee=0;ee0||T.map&&T.alphaTest>0){const D=M.uuid,O=T.uuid;let B=c[D];B===void 0&&(B={},c[D]=B);let X=B[O];X===void 0&&(X=M.clone(),B[O]=X,T.addEventListener("dispose",P)),M=X}if(M.visible=T.visible,M.wireframe=T.wireframe,U===Yo?M.side=T.shadowSide!==null?T.shadowSide:T.side:M.side=T.shadowSide!==null?T.shadowSide:f[T.side],M.alphaMap=T.alphaMap,M.alphaTest=T.alphaTest,M.map=T.map,M.clipShadows=T.clipShadows,M.clippingPlanes=T.clippingPlanes,M.clipIntersection=T.clipIntersection,M.displacementMap=T.displacementMap,M.displacementScale=T.displacementScale,M.displacementBias=T.displacementBias,M.wireframeLinewidth=T.wireframeLinewidth,M.linewidth=T.linewidth,L.isPointLight===!0&&M.isMeshDistanceMaterial===!0){const D=t.properties.get(M);D.light=L}return M}function S(N,T,L,U,M){if(N.visible===!1)return;if(N.layers.test(T.layers)&&(N.isMesh||N.isLine||N.isPoints)&&(N.castShadow||N.receiveShadow&&M===Yo)&&(!N.frustumCulled||r.intersectsObject(N))){N.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,N.matrixWorld);const O=e.update(N),B=N.material;if(Array.isArray(B)){const X=O.groups;for(let H=0,Z=X.length;H=1):Z.indexOf("OpenGL ES")!==-1&&(H=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),X=H>=2);let F=null,Y={};const K=t.getParameter(t.SCISSOR_BOX),ee=t.getParameter(t.VIEWPORT),me=new Zt().fromArray(K),le=new Zt().fromArray(ee);function Q(J,je,fe,Te){const Ke=new Uint8Array(4),Ye=t.createTexture();t.bindTexture(J,Ye),t.texParameteri(J,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(J,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Bt=0;Bte?(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 Lue(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 kue(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function dC(t,e,n,r){const i=Oue(r);switch(n){case WR:return t*e;case GR:return t*e;case XR:return t*e*2;case dg:return t*e/i.components*i.byteLength;case hg:return t*e/i.components*i.byteLength;case qR:return t*e*2/i.components*i.byteLength;case o_:return t*e*2/i.components*i.byteLength;case HR:return t*e*3/i.components*i.byteLength;case Rr:return t*e*4/i.components*i.byteLength;case s_:return t*e*4/i.components*i.byteLength;case Np:case Ip:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Lp:case kp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case W1:case G1:return Math.max(t,16)*Math.max(e,8)/4;case $1:case H1:return Math.max(t,8)*Math.max(e,8)/2;case X1:case q1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Y1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case K1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Z1:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case J1:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case Q1:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case ex:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case tx:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case nx:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case rx:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case ix:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case ox:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case sx:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case ax:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case lx:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case cx:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Op:case ux:case fx:return Math.ceil(t/4)*Math.ceil(e/4)*16;case YR:case dx:return Math.ceil(t/4)*Math.ceil(e/4)*8;case hx:case px:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function Oue(t){switch(t){case Fi:case jR:return{byteLength:1,components:1};case Md:case VR:case _u:return{byteLength:2,components:1};case r_:case i_:return{byteLength:2,components:4};case Ia:case n_:case ai:return{byteLength:4,components:1};case $R:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const Due={contain:Iue,cover:Lue,fill:kue,getByteLength:dC};function Fue(t,e,n,r,i,o,s){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Ie,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 v($,z){return m?new OffscreenCanvas($,z):Nm("canvas")}function x($,z,re){let he=1;const pe=De($);if((pe.width>re||pe.height>re)&&(he=re/Math.max(pe.width,pe.height)),he<1)if(typeof HTMLImageElement<"u"&&$ instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&$ instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&$ instanceof ImageBitmap||typeof VideoFrame<"u"&&$ instanceof VideoFrame){const be=Math.floor(he*pe.width),Ge=Math.floor(he*pe.height);f===void 0&&(f=v(be,Ge));const Fe=z?v(be,Ge):f;return Fe.width=be,Fe.height=Ge,Fe.getContext("2d").drawImage($,0,0,be,Ge),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+pe.width+"x"+pe.height+") to ("+be+"x"+Ge+")."),Fe}else return"data"in $&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+pe.width+"x"+pe.height+")."),$;return $}function y($){return $.generateMipmaps&&$.minFilter!==lr&&$.minFilter!==tr}function g($){t.generateMipmap($)}function b($,z,re,he,pe=!1){if($!==null){if(t[$]!==void 0)return t[$];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+$+"'")}let be=z;if(z===t.RED&&(re===t.FLOAT&&(be=t.R32F),re===t.HALF_FLOAT&&(be=t.R16F),re===t.UNSIGNED_BYTE&&(be=t.R8)),z===t.RED_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.R8UI),re===t.UNSIGNED_SHORT&&(be=t.R16UI),re===t.UNSIGNED_INT&&(be=t.R32UI),re===t.BYTE&&(be=t.R8I),re===t.SHORT&&(be=t.R16I),re===t.INT&&(be=t.R32I)),z===t.RG&&(re===t.FLOAT&&(be=t.RG32F),re===t.HALF_FLOAT&&(be=t.RG16F),re===t.UNSIGNED_BYTE&&(be=t.RG8)),z===t.RG_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.RG8UI),re===t.UNSIGNED_SHORT&&(be=t.RG16UI),re===t.UNSIGNED_INT&&(be=t.RG32UI),re===t.BYTE&&(be=t.RG8I),re===t.SHORT&&(be=t.RG16I),re===t.INT&&(be=t.RG32I)),z===t.RGB_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.RGB8UI),re===t.UNSIGNED_SHORT&&(be=t.RGB16UI),re===t.UNSIGNED_INT&&(be=t.RGB32UI),re===t.BYTE&&(be=t.RGB8I),re===t.SHORT&&(be=t.RGB16I),re===t.INT&&(be=t.RGB32I)),z===t.RGBA_INTEGER&&(re===t.UNSIGNED_BYTE&&(be=t.RGBA8UI),re===t.UNSIGNED_SHORT&&(be=t.RGBA16UI),re===t.UNSIGNED_INT&&(be=t.RGBA32UI),re===t.BYTE&&(be=t.RGBA8I),re===t.SHORT&&(be=t.RGBA16I),re===t.INT&&(be=t.RGBA32I)),z===t.RGB&&re===t.UNSIGNED_INT_5_9_9_9_REV&&(be=t.RGB9_E5),z===t.RGBA){const Ge=pe?Cm:an.getTransfer(he);re===t.FLOAT&&(be=t.RGBA32F),re===t.HALF_FLOAT&&(be=t.RGBA16F),re===t.UNSIGNED_BYTE&&(be=Ge===xn?t.SRGB8_ALPHA8:t.RGBA8),re===t.UNSIGNED_SHORT_4_4_4_4&&(be=t.RGBA4),re===t.UNSIGNED_SHORT_5_5_5_1&&(be=t.RGB5_A1)}return(be===t.R16F||be===t.R32F||be===t.RG16F||be===t.RG32F||be===t.RGBA16F||be===t.RGBA32F)&&e.get("EXT_color_buffer_float"),be}function _($,z){let re;return $?z===null||z===Ia||z===au?re=t.DEPTH24_STENCIL8:z===ai?re=t.DEPTH32F_STENCIL8:z===Md&&(re=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):z===null||z===Ia||z===au?re=t.DEPTH_COMPONENT24:z===ai?re=t.DEPTH_COMPONENT32F:z===Md&&(re=t.DEPTH_COMPONENT16),re}function S($,z){return y($)===!0||$.isFramebufferTexture&&$.minFilter!==lr&&$.minFilter!==tr?Math.log2(Math.max(z.width,z.height))+1:$.mipmaps!==void 0&&$.mipmaps.length>0?$.mipmaps.length:$.isCompressedTexture&&Array.isArray($.image)?z.mipmaps.length:1}function P($){const z=$.target;z.removeEventListener("dispose",P),T(z),z.isVideoTexture&&u.delete(z)}function N($){const z=$.target;z.removeEventListener("dispose",N),U(z)}function T($){const z=r.get($);if(z.__webglInit===void 0)return;const re=$.source,he=h.get(re);if(he){const pe=he[z.__cacheKey];pe.usedTimes--,pe.usedTimes===0&&L($),Object.keys(he).length===0&&h.delete(re)}r.remove($)}function L($){const z=r.get($);t.deleteTexture(z.__webglTexture);const re=$.source,he=h.get(re);delete he[z.__cacheKey],s.memory.textures--}function U($){const z=r.get($);if($.depthTexture&&$.depthTexture.dispose(),$.isWebGLCubeRenderTarget)for(let he=0;he<6;he++){if(Array.isArray(z.__webglFramebuffer[he]))for(let pe=0;pe=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+$+" texture units while this GPU supports only "+i.maxTextures),M+=1,$}function O($){const z=[];return z.push($.wrapS),z.push($.wrapT),z.push($.wrapR||0),z.push($.magFilter),z.push($.minFilter),z.push($.anisotropy),z.push($.internalFormat),z.push($.format),z.push($.type),z.push($.generateMipmaps),z.push($.premultiplyAlpha),z.push($.flipY),z.push($.unpackAlignment),z.push($.colorSpace),z.join()}function B($,z){const re=r.get($);if($.isVideoTexture&&Pe($),$.isRenderTargetTexture===!1&&$.version>0&&re.__version!==$.version){const he=$.image;if(he===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(he.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{le(re,$,z);return}}n.bindTexture(t.TEXTURE_2D,re.__webglTexture,t.TEXTURE0+z)}function X($,z){const re=r.get($);if($.version>0&&re.__version!==$.version){le(re,$,z);return}n.bindTexture(t.TEXTURE_2D_ARRAY,re.__webglTexture,t.TEXTURE0+z)}function H($,z){const re=r.get($);if($.version>0&&re.__version!==$.version){le(re,$,z);return}n.bindTexture(t.TEXTURE_3D,re.__webglTexture,t.TEXTURE0+z)}function Z($,z){const re=r.get($);if($.version>0&&re.__version!==$.version){Q(re,$,z);return}n.bindTexture(t.TEXTURE_CUBE_MAP,re.__webglTexture,t.TEXTURE0+z)}const F={[wm]:t.REPEAT,[Ti]:t.CLAMP_TO_EDGE,[Sm]:t.MIRRORED_REPEAT},Y={[lr]:t.NEAREST,[BR]:t.NEAREST_MIPMAP_NEAREST,[jf]:t.NEAREST_MIPMAP_LINEAR,[tr]:t.LINEAR,[Pp]:t.LINEAR_MIPMAP_NEAREST,[Rs]:t.LINEAR_MIPMAP_LINEAR},K={[FU]:t.NEVER,[$U]:t.ALWAYS,[zU]:t.LESS,[ZR]:t.LEQUAL,[UU]:t.EQUAL,[VU]:t.GEQUAL,[BU]:t.GREATER,[jU]:t.NOTEQUAL};function ee($,z){if(z.type===ai&&e.has("OES_texture_float_linear")===!1&&(z.magFilter===tr||z.magFilter===Pp||z.magFilter===jf||z.magFilter===Rs||z.minFilter===tr||z.minFilter===Pp||z.minFilter===jf||z.minFilter===Rs)&&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,F[z.wrapS]),t.texParameteri($,t.TEXTURE_WRAP_T,F[z.wrapT]),($===t.TEXTURE_3D||$===t.TEXTURE_2D_ARRAY)&&t.texParameteri($,t.TEXTURE_WRAP_R,F[z.wrapR]),t.texParameteri($,t.TEXTURE_MAG_FILTER,Y[z.magFilter]),t.texParameteri($,t.TEXTURE_MIN_FILTER,Y[z.minFilter]),z.compareFunction&&(t.texParameteri($,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri($,t.TEXTURE_COMPARE_FUNC,K[z.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(z.magFilter===lr||z.minFilter!==jf&&z.minFilter!==Rs||z.type===ai&&e.has("OES_texture_float_linear")===!1)return;if(z.anisotropy>1||r.get(z).__currentAnisotropy){const re=e.get("EXT_texture_filter_anisotropic");t.texParameterf($,re.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(z.anisotropy,i.getMaxAnisotropy())),r.get(z).__currentAnisotropy=z.anisotropy}}}function me($,z){let re=!1;$.__webglInit===void 0&&($.__webglInit=!0,z.addEventListener("dispose",P));const he=z.source;let pe=h.get(he);pe===void 0&&(pe={},h.set(he,pe));const be=O(z);if(be!==$.__cacheKey){pe[be]===void 0&&(pe[be]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,re=!0),pe[be].usedTimes++;const Ge=pe[$.__cacheKey];Ge!==void 0&&(pe[$.__cacheKey].usedTimes--,Ge.usedTimes===0&&L(z)),$.__cacheKey=be,$.__webglTexture=pe[be].texture}return re}function le($,z,re){let he=t.TEXTURE_2D;(z.isDataArrayTexture||z.isCompressedArrayTexture)&&(he=t.TEXTURE_2D_ARRAY),z.isData3DTexture&&(he=t.TEXTURE_3D);const pe=me($,z),be=z.source;n.bindTexture(he,$.__webglTexture,t.TEXTURE0+re);const Ge=r.get(be);if(be.version!==Ge.__version||pe===!0){n.activeTexture(t.TEXTURE0+re);const Fe=an.getPrimaries(an.workingColorSpace),Ne=z.colorSpace===ha?null:an.getPrimaries(z.colorSpace),ze=z.colorSpace===ha||Fe===Ne?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,z.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,z.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);let Le=x(z.image,!1,i.maxTextureSize);Le=Ee(z,Le);const Xe=o.convert(z.format,z.colorSpace),xt=o.convert(z.type);let Oe=b(z.internalFormat,Xe,xt,z.colorSpace,z.isVideoTexture);ee(he,z);let Ue;const Ae=z.mipmaps,ke=z.isVideoTexture!==!0,dt=Ge.__version===void 0||pe===!0,J=be.dataReady,je=S(z,Le);if(z.isDepthTexture)Oe=_(z.format===lu,z.type),dt&&(ke?n.texStorage2D(t.TEXTURE_2D,1,Oe,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,Oe,Le.width,Le.height,0,Xe,xt,null));else if(z.isDataTexture)if(Ae.length>0){ke&&dt&&n.texStorage2D(t.TEXTURE_2D,je,Oe,Ae[0].width,Ae[0].height);for(let fe=0,Te=Ae.length;fe0){const Ke=dC(Ue.width,Ue.height,z.format,z.type);for(const Ye of z.layerUpdates){const Bt=Ue.data.subarray(Ye*Ke/Ue.data.BYTES_PER_ELEMENT,(Ye+1)*Ke/Ue.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,Ye,Ue.width,Ue.height,1,Xe,Bt,0,0)}z.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,0,Ue.width,Ue.height,Le.depth,Xe,Ue.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,fe,Oe,Ue.width,Ue.height,Le.depth,0,Ue.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else ke?J&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,0,Ue.width,Ue.height,Le.depth,Xe,xt,Ue.data):n.texImage3D(t.TEXTURE_2D_ARRAY,fe,Oe,Ue.width,Ue.height,Le.depth,0,Xe,xt,Ue.data)}else{ke&&dt&&n.texStorage2D(t.TEXTURE_2D,je,Oe,Ae[0].width,Ae[0].height);for(let fe=0,Te=Ae.length;fe0){const fe=dC(Le.width,Le.height,z.format,z.type);for(const Te of z.layerUpdates){const Ke=Le.data.subarray(Te*fe/Le.data.BYTES_PER_ELEMENT,(Te+1)*fe/Le.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Te,Le.width,Le.height,1,Xe,xt,Ke)}z.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Le.width,Le.height,Le.depth,Xe,xt,Le.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Oe,Le.width,Le.height,Le.depth,0,Xe,xt,Le.data);else if(z.isData3DTexture)ke?(dt&&n.texStorage3D(t.TEXTURE_3D,je,Oe,Le.width,Le.height,Le.depth),J&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Le.width,Le.height,Le.depth,Xe,xt,Le.data)):n.texImage3D(t.TEXTURE_3D,0,Oe,Le.width,Le.height,Le.depth,0,Xe,xt,Le.data);else if(z.isFramebufferTexture){if(dt)if(ke)n.texStorage2D(t.TEXTURE_2D,je,Oe,Le.width,Le.height);else{let fe=Le.width,Te=Le.height;for(let Ke=0;Ke>=1,Te>>=1}}else if(Ae.length>0){if(ke&&dt){const fe=De(Ae[0]);n.texStorage2D(t.TEXTURE_2D,je,Oe,fe.width,fe.height)}for(let fe=0,Te=Ae.length;fe0&&je++;const Te=De(Xe[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,je,Ae,Te.width,Te.height)}for(let Te=0;Te<6;Te++)if(Le){ke?J&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Te,0,0,0,Xe[Te].width,Xe[Te].height,Oe,Ue,Xe[Te].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Te,0,Ae,Xe[Te].width,Xe[Te].height,0,Oe,Ue,Xe[Te].data);for(let Ke=0;Ke>be),Xe=Math.max(1,z.height>>be);pe===t.TEXTURE_3D||pe===t.TEXTURE_2D_ARRAY?n.texImage3D(pe,be,Ne,Le,Xe,z.depth,0,Ge,Fe,null):n.texImage2D(pe,be,Ne,Le,Xe,0,Ge,Fe,null)}n.bindFramebuffer(t.FRAMEBUFFER,$),Re(z)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,he,pe,r.get(re).__webglTexture,0,xe(z)):(pe===t.TEXTURE_2D||pe>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&pe<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,he,pe,r.get(re).__webglTexture,be),n.bindFramebuffer(t.FRAMEBUFFER,null)}function ge($,z,re){if(t.bindRenderbuffer(t.RENDERBUFFER,$),z.depthBuffer){const he=z.depthTexture,pe=he&&he.isDepthTexture?he.type:null,be=_(z.stencilBuffer,pe),Ge=z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Fe=xe(z);Re(z)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Fe,be,z.width,z.height):re?t.renderbufferStorageMultisample(t.RENDERBUFFER,Fe,be,z.width,z.height):t.renderbufferStorage(t.RENDERBUFFER,be,z.width,z.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ge,t.RENDERBUFFER,$)}else{const he=z.textures;for(let pe=0;pe{delete z.__boundDepthTexture,delete z.__depthDisposeCallback,he.removeEventListener("dispose",pe)};he.addEventListener("dispose",pe),z.__depthDisposeCallback=pe}z.__boundDepthTexture=he}if($.depthTexture&&!z.__autoAllocateDepthBuffer){if(re)throw new Error("target.depthTexture not supported in Cube render targets");Me(z.__webglFramebuffer,$)}else if(re){z.__webglDepthbuffer=[];for(let he=0;he<6;he++)if(n.bindFramebuffer(t.FRAMEBUFFER,z.__webglFramebuffer[he]),z.__webglDepthbuffer[he]===void 0)z.__webglDepthbuffer[he]=t.createRenderbuffer(),ge(z.__webglDepthbuffer[he],$,!1);else{const pe=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,be=z.__webglDepthbuffer[he];t.bindRenderbuffer(t.RENDERBUFFER,be),t.framebufferRenderbuffer(t.FRAMEBUFFER,pe,t.RENDERBUFFER,be)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,z.__webglFramebuffer),z.__webglDepthbuffer===void 0)z.__webglDepthbuffer=t.createRenderbuffer(),ge(z.__webglDepthbuffer,$,!1);else{const he=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,pe=z.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,pe),t.framebufferRenderbuffer(t.FRAMEBUFFER,he,t.RENDERBUFFER,pe)}n.bindFramebuffer(t.FRAMEBUFFER,null)}function He($,z,re){const he=r.get($);z!==void 0&&ae(he.__webglFramebuffer,$,$.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),re!==void 0&&tt($)}function rt($){const z=$.texture,re=r.get($),he=r.get(z);$.addEventListener("dispose",N);const pe=$.textures,be=$.isWebGLCubeRenderTarget===!0,Ge=pe.length>1;if(Ge||(he.__webglTexture===void 0&&(he.__webglTexture=t.createTexture()),he.__version=z.version,s.memory.textures++),be){re.__webglFramebuffer=[];for(let Fe=0;Fe<6;Fe++)if(z.mipmaps&&z.mipmaps.length>0){re.__webglFramebuffer[Fe]=[];for(let Ne=0;Ne0){re.__webglFramebuffer=[];for(let Fe=0;Fe0&&Re($)===!1){re.__webglMultisampledFramebuffer=t.createFramebuffer(),re.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,re.__webglMultisampledFramebuffer);for(let Fe=0;Fe0)for(let Ne=0;Ne0)for(let Ne=0;Ne0){if(Re($)===!1){const z=$.textures,re=$.width,he=$.height;let pe=t.COLOR_BUFFER_BIT;const be=$.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ge=r.get($),Fe=z.length>1;if(Fe)for(let Ne=0;Ne0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&z.__useRenderToTexture!==!1}function Pe($){const z=s.render.frame;u.get($)!==z&&(u.set($,z),$.update())}function Ee($,z){const re=$.colorSpace,he=$.format,pe=$.type;return $.isCompressedTexture===!0||$.isVideoTexture===!0||re!==Fa&&re!==ha&&(an.getTransfer(re)===xn?(he!==Rr||pe!==Fi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",re)),z}function De($){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=R,this.setTexture2D=B,this.setTexture2DArray=X,this.setTexture3D=H,this.setTextureCube=Z,this.rebindTextures=He,this.setupRenderTarget=rt,this.updateRenderTargetMipmap=Ve,this.updateMultisampleRenderTarget=ye,this.setupDepthRenderbuffer=tt,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=Re}function oB(t,e){function n(r,i=ha){let o;const s=an.getTransfer(i);if(r===Fi)return t.UNSIGNED_BYTE;if(r===r_)return t.UNSIGNED_SHORT_4_4_4_4;if(r===i_)return t.UNSIGNED_SHORT_5_5_5_1;if(r===$R)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===jR)return t.BYTE;if(r===VR)return t.SHORT;if(r===Md)return t.UNSIGNED_SHORT;if(r===n_)return t.INT;if(r===Ia)return t.UNSIGNED_INT;if(r===ai)return t.FLOAT;if(r===_u)return t.HALF_FLOAT;if(r===WR)return t.ALPHA;if(r===HR)return t.RGB;if(r===Rr)return t.RGBA;if(r===GR)return t.LUMINANCE;if(r===XR)return t.LUMINANCE_ALPHA;if(r===Vc)return t.DEPTH_COMPONENT;if(r===lu)return t.DEPTH_STENCIL;if(r===dg)return t.RED;if(r===hg)return t.RED_INTEGER;if(r===qR)return t.RG;if(r===o_)return t.RG_INTEGER;if(r===s_)return t.RGBA_INTEGER;if(r===Np||r===Ip||r===Lp||r===kp)if(s===xn)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(r===Np)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Ip)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Lp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===kp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(r===Np)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Ip)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Lp)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===kp)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===$1||r===W1||r===H1||r===G1)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(r===$1)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===W1)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===H1)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===G1)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===X1||r===q1||r===Y1)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(r===X1||r===q1)return s===xn?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(r===Y1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===K1||r===Z1||r===J1||r===Q1||r===ex||r===tx||r===nx||r===rx||r===ix||r===ox||r===sx||r===ax||r===lx||r===cx)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(r===K1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===Z1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===J1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===Q1)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===ex)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===tx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===nx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===rx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===ix)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===ox)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===sx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===ax)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===lx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===cx)return s===xn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Op||r===ux||r===fx)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(r===Op)return s===xn?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===ux)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===fx)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===YR||r===dx||r===hx||r===px)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(r===Op)return o.COMPRESSED_RED_RGTC1_EXT;if(r===dx)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===hx)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===px)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===au?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}class sB extends vr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let Wf=class extends tn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const zue={type:"move"};class DM{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Wf,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Wf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new G,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new G),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Wf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new G,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new G),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,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const x of e.hand.values()){const y=n.getJointPose(x,r),g=this._getHandJoint(c,x);y!==null&&(g.matrix.fromArray(y.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=y.radius),g.visible=y!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),m=.02,v=.005;c.inputState.pinching&&h>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),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(zue)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Wf;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}const Uue=` void main() { gl_Position = vec4( position, 1.0 ); -}`,zce=` +}`,Bue=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -3991,7 +4018,7 @@ void main() { } -}`;class Uce{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,r){if(this.texture===null){const i=new kn,o=e.properties.get(i);o.__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 ss({vertexShader:Fce,fragmentShader:zce,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new nr(new Kd(20,20),r)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Bce extends Xs{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,m=null,v=null;const x=new Uce,y=n.getContextAttributes();let g=null,b=null;const _=[],S=[],P=new Ie;let N=null;const T=new vr;T.layers.enable(1),T.viewport=new Zt;const L=new vr;L.layers.enable(2),L.viewport=new Zt;const U=[T,L],M=new qU;M.layers.enable(1),M.layers.enable(2);let R=null,D=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Q){let ae=_[Q];return ae===void 0&&(ae=new OM,_[Q]=ae),ae.getTargetRaySpace()},this.getControllerGrip=function(Q){let ae=_[Q];return ae===void 0&&(ae=new OM,_[Q]=ae),ae.getGripSpace()},this.getHand=function(Q){let ae=_[Q];return ae===void 0&&(ae=new OM,_[Q]=ae),ae.getHandSpace()};function O(Q){const ae=S.indexOf(Q.inputSource);if(ae===-1)return;const ge=_[ae];ge!==void 0&&(ge.update(Q.inputSource,Q.frame,c||s),ge.dispatchEvent({type:Q.type,data:Q.inputSource}))}function B(){i.removeEventListener("select",O),i.removeEventListener("selectstart",O),i.removeEventListener("selectend",O),i.removeEventListener("squeeze",O),i.removeEventListener("squeezestart",O),i.removeEventListener("squeezeend",O),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",X);for(let Q=0;Q<_.length;Q++){const ae=S[Q];ae!==null&&(S[Q]=null,_[Q].disconnect(ae))}R=null,D=null,x.reset(),e.setRenderTarget(g),m=null,h=null,f=null,i=null,b=null,le.stop(),r.isPresenting=!1,e.setPixelRatio(N),e.setSize(P.width,P.height,!1),r.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Q){o=Q,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Q){a=Q,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||s},this.setReferenceSpace=function(Q){c=Q},this.getBaseLayer=function(){return h!==null?h:m},this.getBinding=function(){return f},this.getFrame=function(){return v},this.getSession=function(){return i},this.setSession=async function(Q){if(i=Q,i!==null){if(g=e.getRenderTarget(),i.addEventListener("select",O),i.addEventListener("selectstart",O),i.addEventListener("selectend",O),i.addEventListener("squeeze",O),i.addEventListener("squeezestart",O),i.addEventListener("squeezeend",O),i.addEventListener("end",B),i.addEventListener("inputsourceschange",X),y.xrCompatible!==!0&&await n.makeXRCompatible(),N=e.getPixelRatio(),e.getSize(P),i.renderState.layers===void 0){const ae={antialias:y.antialias,alpha:!0,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:o};m=new XRWebGLLayer(i,n,ae),i.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),b=new os(m.framebufferWidth,m.framebufferHeight,{format:Rr,type:Fi,colorSpace:e.outputColorSpace,stencilBuffer:y.stencil})}else{let ae=null,ge=null,Me=null;y.depth&&(Me=y.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,ae=y.stencil?lu:Vc,ge=y.stencil?au:Ia);const tt={colorFormat:n.RGBA8,depthFormat:Me,scaleFactor:o};f=new XRWebGLBinding(i,n),h=f.createProjectionLayer(tt),i.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),b=new os(h.textureWidth,h.textureHeight,{format:Rr,type:Fi,depthTexture:new nA(h.textureWidth,h.textureHeight,ge,void 0,void 0,void 0,void 0,void 0,void 0,ae),stencilBuffer:y.stencil,colorSpace:e.outputColorSpace,samples:y.antialias?4:0,resolveDepthBuffer:h.ignoreDepthValues===!1})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,s=await i.requestReferenceSpace(a),le.setContext(i),le.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return x.getDepthTexture()};function X(Q){for(let ae=0;ae=0&&(S[Me]=null,_[Me].disconnect(ge))}for(let ae=0;ae=S.length){S.push(ge),Me=He;break}else if(S[He]===null){S[He]=ge,Me=He;break}if(Me===-1)break}const tt=_[Me];tt&&tt.connect(ge)}}const H=new G,Z=new G;function F(Q,ae,ge){H.setFromMatrixPosition(ae.matrixWorld),Z.setFromMatrixPosition(ge.matrixWorld);const Me=H.distanceTo(Z),tt=ae.projectionMatrix.elements,He=ge.projectionMatrix.elements,rt=tt[14]/(tt[10]-1),Ve=tt[14]/(tt[10]+1),se=(tt[9]+1)/tt[5],j=(tt[9]-1)/tt[5],ye=(tt[8]-1)/tt[0],xe=(He[8]+1)/He[0],Re=rt*ye,Pe=rt*xe,Ee=Me/(-ye+xe),De=Ee*-ye;if(ae.matrixWorld.decompose(Q.position,Q.quaternion,Q.scale),Q.translateX(De),Q.translateZ(Ee),Q.matrixWorld.compose(Q.position,Q.quaternion,Q.scale),Q.matrixWorldInverse.copy(Q.matrixWorld).invert(),tt[10]===-1)Q.projectionMatrix.copy(ae.projectionMatrix),Q.projectionMatrixInverse.copy(ae.projectionMatrixInverse);else{const $=rt+Ee,z=Ve+Ee,re=Re-De,he=Pe+(Me-De),pe=se*Ve/z*$,be=j*Ve/z*$;Q.projectionMatrix.makePerspective(re,he,pe,be,$,z),Q.projectionMatrixInverse.copy(Q.projectionMatrix).invert()}}function Y(Q,ae){ae===null?Q.matrixWorld.copy(Q.matrix):Q.matrixWorld.multiplyMatrices(ae.matrixWorld,Q.matrix),Q.matrixWorldInverse.copy(Q.matrixWorld).invert()}this.updateCamera=function(Q){if(i===null)return;let ae=Q.near,ge=Q.far;x.texture!==null&&(x.depthNear>0&&(ae=x.depthNear),x.depthFar>0&&(ge=x.depthFar)),M.near=L.near=T.near=ae,M.far=L.far=T.far=ge,(R!==M.near||D!==M.far)&&(i.updateRenderState({depthNear:M.near,depthFar:M.far}),R=M.near,D=M.far);const Me=Q.parent,tt=M.cameras;Y(M,Me);for(let He=0;He0&&(y.alphaTest.value=g.alphaTest);const b=e.get(g),_=b.envMap,S=b.envMapRotation;_&&(y.envMap.value=_,lc.copy(S),lc.x*=-1,lc.y*=-1,lc.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(lc.y*=-1,lc.z*=-1),y.envMapRotation.value.setFromMatrix4(jce.makeRotationFromEuler(lc)),y.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=g.reflectivity,y.ior.value=g.ior,y.refractionRatio.value=g.refractionRatio),g.lightMap&&(y.lightMap.value=g.lightMap,y.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,y.lightMapTransform)),g.aoMap&&(y.aoMap.value=g.aoMap,y.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,y.aoMapTransform))}function s(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform))}function a(y,g){y.dashSize.value=g.dashSize,y.totalSize.value=g.dashSize+g.gapSize,y.scale.value=g.scale}function l(y,g,b,_){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.size.value=g.size*b,y.scale.value=_*.5,g.map&&(y.map.value=g.map,n(g.map,y.uvTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function c(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.rotation.value=g.rotation,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function u(y,g){y.specular.value.copy(g.specular),y.shininess.value=Math.max(g.shininess,1e-4)}function f(y,g){g.gradientMap&&(y.gradientMap.value=g.gradientMap)}function h(y,g){y.metalness.value=g.metalness,g.metalnessMap&&(y.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,y.metalnessMapTransform)),y.roughness.value=g.roughness,g.roughnessMap&&(y.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,y.roughnessMapTransform)),g.envMap&&(y.envMapIntensity.value=g.envMapIntensity)}function m(y,g,b){y.ior.value=g.ior,g.sheen>0&&(y.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),y.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(y.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,y.sheenColorMapTransform)),g.sheenRoughnessMap&&(y.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,y.sheenRoughnessMapTransform))),g.clearcoat>0&&(y.clearcoat.value=g.clearcoat,y.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(y.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,y.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(y.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===fi&&y.clearcoatNormalScale.value.negate())),g.dispersion>0&&(y.dispersion.value=g.dispersion),g.iridescence>0&&(y.iridescence.value=g.iridescence,y.iridescenceIOR.value=g.iridescenceIOR,y.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(y.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,y.iridescenceMapTransform)),g.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),g.transmission>0&&(y.transmission.value=g.transmission,y.transmissionSamplerMap.value=b.texture,y.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(y.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,y.transmissionMapTransform)),y.thickness.value=g.thickness,g.thicknessMap&&(y.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=g.attenuationDistance,y.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(y.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(y.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=g.specularIntensity,y.specularColor.value.copy(g.specularColor),g.specularColorMap&&(y.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,y.specularColorMapTransform)),g.specularIntensityMap&&(y.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,y.specularIntensityMapTransform))}function v(y,g){g.matcap&&(y.matcap.value=g.matcap)}function x(y,g){const b=e.get(g).light;y.referencePosition.value.setFromMatrixPosition(b.matrixWorld),y.nearDistance.value=b.shadow.camera.near,y.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function $ce(t,e,n,r){let i={},o={},s=[];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&&(v(b),S=u(b),i[b.id]=S,b.addEventListener("dispose",y));const P=_.program;r.updateUBOMapping(b,P);const N=e.render.frame;o[b.id]!==N&&(h(b),o[b.id]=N)}function u(b){const _=f();b.__bindingPointIndex=_;const S=t.createBuffer(),P=b.__size,N=b.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,P,N),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,S),S}function f(){for(let b=0;b0&&(S+=P-N),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 y(b){const _=b.target;_.removeEventListener("dispose",y);const S=s.indexOf(_.__bindingPointIndex);s.splice(S,1),t.deleteBuffer(i[_.id]),delete i[_.id],delete o[_.id]}function g(){for(const b in i)t.deleteBuffer(i[b]);s=[],i={},o={}}return{bind:l,update:c,dispose:g}}class YU{constructor(e={}){const{canvas:n=kU(),context:r=null,depth:i=!0,stencil:o=!1,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let h;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=r.getContextAttributes().alpha}else h=s;const m=new Uint32Array(4),v=new Int32Array(4);let x=null,y=null;const g=[],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=Eo,this.toneMapping=Os,this.toneMappingExposure=1;const _=this;let S=!1,P=0,N=0,T=null,L=-1,U=null;const M=new Zt,R=new Zt;let D=null;const O=new ot(0);let B=0,X=n.width,H=n.height,Z=1,F=null,Y=null;const K=new Zt(0,0,X,H),ee=new Zt(0,0,X,H);let me=!1;const le=new gg;let Q=!1,ae=!1;const ge=new wt,Me=new wt,tt=new G,He=new Zt,rt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ve=!1;function se(){return T===null?Z:1}let j=r;function ye(V,ne){return n.getContext(V,ne)}try{const V={alpha:!0,depth:i,stencil:o,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${Zb}`),n.addEventListener("webglcontextlost",Te,!1),n.addEventListener("webglcontextrestored",Ke,!1),n.addEventListener("webglcontextcreationerror",Ye,!1),j===null){const ne="webgl2";if(j=ye(ne,V),j===null)throw ye(ne)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(V){throw console.error("THREE.WebGLRenderer: "+V.message),V}let xe,Re,Pe,Ee,De,$,z,re,he,pe,be,Ge,Fe,Ne,ze,Le,Xe,xt,Oe,Ue,Ae,ke,dt,J;function je(){xe=new Yae(j),xe.init(),ke=new XU(j,xe),Re=new $ae(j,xe,e,ke),Pe=new Ace(j),Re.reverseDepthBuffer&&Pe.buffers.depth.setReversed(!0),Ee=new Jae(j),De=new gce,$=new Oce(j,xe,Pe,De,Re,ke,Ee),z=new Hae(_),re=new qae(_),he=new ooe(j),dt=new jae(j,he),pe=new Kae(j,he,Ee,dt),be=new ele(j,pe,he,Ee),Oe=new Qae(j,Re,$),Le=new Wae(De),Ge=new mce(_,z,re,xe,Re,dt,Le),Fe=new Vce(_,De),Ne=new yce,ze=new Mce(xe),xt=new Bae(_,z,re,Pe,be,h,l),Xe=new Tce(_,be,Re),J=new $ce(j,Ee,Re,Pe),Ue=new Vae(j,xe,Ee),Ae=new Zae(j,xe,Ee),Ee.programs=Ge.programs,_.capabilities=Re,_.extensions=xe,_.properties=De,_.renderLists=Ne,_.shadowMap=Xe,_.state=Pe,_.info=Ee}je();const fe=new Bce(_,j);this.xr=fe,this.getContext=function(){return j},this.getContextAttributes=function(){return j.getContextAttributes()},this.forceContextLoss=function(){const V=xe.get("WEBGL_lose_context");V&&V.loseContext()},this.forceContextRestore=function(){const V=xe.get("WEBGL_lose_context");V&&V.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(V){V!==void 0&&(Z=V,this.setSize(X,H,!1))},this.getSize=function(V){return V.set(X,H)},this.setSize=function(V,ne,ue=!0){if(fe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=V,H=ne,n.width=Math.floor(V*Z),n.height=Math.floor(ne*Z),ue===!0&&(n.style.width=V+"px",n.style.height=ne+"px"),this.setViewport(0,0,V,ne)},this.getDrawingBufferSize=function(V){return V.set(X*Z,H*Z).floor()},this.setDrawingBufferSize=function(V,ne,ue){X=V,H=ne,Z=ue,n.width=Math.floor(V*ue),n.height=Math.floor(ne*ue),this.setViewport(0,0,V,ne)},this.getCurrentViewport=function(V){return V.copy(M)},this.getViewport=function(V){return V.copy(K)},this.setViewport=function(V,ne,ue,de){V.isVector4?K.set(V.x,V.y,V.z,V.w):K.set(V,ne,ue,de),Pe.viewport(M.copy(K).multiplyScalar(Z).round())},this.getScissor=function(V){return V.copy(ee)},this.setScissor=function(V,ne,ue,de){V.isVector4?ee.set(V.x,V.y,V.z,V.w):ee.set(V,ne,ue,de),Pe.scissor(R.copy(ee).multiplyScalar(Z).round())},this.getScissorTest=function(){return me},this.setScissorTest=function(V){Pe.setScissorTest(me=V)},this.setOpaqueSort=function(V){F=V},this.setTransparentSort=function(V){Y=V},this.getClearColor=function(V){return V.copy(xt.getClearColor())},this.setClearColor=function(){xt.setClearColor.apply(xt,arguments)},this.getClearAlpha=function(){return xt.getClearAlpha()},this.setClearAlpha=function(){xt.setClearAlpha.apply(xt,arguments)},this.clear=function(V=!0,ne=!0,ue=!0){let de=0;if(V){let oe=!1;if(T!==null){const We=T.texture.format;oe=We===r_||We===n_||We===dg}if(oe){const We=T.texture.type,it=We===Fi||We===Ia||We===Sd||We===au||We===e_||We===t_,lt=xt.getClearColor(),ct=xt.getClearAlpha(),St=lt.r,Et=lt.g,mt=lt.b;it?(m[0]=St,m[1]=Et,m[2]=mt,m[3]=ct,j.clearBufferuiv(j.COLOR,0,m)):(v[0]=St,v[1]=Et,v[2]=mt,v[3]=ct,j.clearBufferiv(j.COLOR,0,v))}else de|=j.COLOR_BUFFER_BIT}ne&&(de|=j.DEPTH_BUFFER_BIT,j.clearDepth(this.capabilities.reverseDepthBuffer?0:1)),ue&&(de|=j.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),j.clear(de)},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",Te,!1),n.removeEventListener("webglcontextrestored",Ke,!1),n.removeEventListener("webglcontextcreationerror",Ye,!1),Ne.dispose(),ze.dispose(),De.dispose(),z.dispose(),re.dispose(),be.dispose(),dt.dispose(),J.dispose(),Ge.dispose(),fe.dispose(),fe.removeEventListener("sessionstart",kg),fe.removeEventListener("sessionend",Og),Ks.stop()};function Te(V){V.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),S=!0}function Ke(){console.log("THREE.WebGLRenderer: Context Restored."),S=!1;const V=Ee.autoReset,ne=Xe.enabled,ue=Xe.autoUpdate,de=Xe.needsUpdate,oe=Xe.type;je(),Ee.autoReset=V,Xe.enabled=ne,Xe.autoUpdate=ue,Xe.needsUpdate=de,Xe.type=oe}function Ye(V){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",V.statusMessage)}function Bt(V){const ne=V.target;ne.removeEventListener("dispose",Bt),An(ne)}function An(V){kr(V),De.remove(V)}function kr(V){const ne=De.get(V).programs;ne!==void 0&&(ne.forEach(function(ue){Ge.releaseProgram(ue)}),V.isShaderMaterial&&Ge.releaseShaderCache(V))}this.renderBufferDirect=function(V,ne,ue,de,oe,We){ne===null&&(ne=rt);const it=oe.isMesh&&oe.matrixWorld.determinant()<0,lt=tw(V,ne,ue,de,oe);Pe.setMaterial(de,it);let ct=ue.index,St=1;if(de.wireframe===!0){if(ct=pe.getWireframeAttribute(ue),ct===void 0)return;St=2}const Et=ue.drawRange,mt=ue.attributes.position;let Jt=Et.start*St,nn=(Et.start+Et.count)*St;We!==null&&(Jt=Math.max(Jt,We.start*St),nn=Math.min(nn,(We.start+We.count)*St)),ct!==null?(Jt=Math.max(Jt,0),nn=Math.min(nn,ct.count)):mt!=null&&(Jt=Math.max(Jt,0),nn=Math.min(nn,mt.count));const ln=nn-Jt;if(ln<0||ln===1/0)return;dt.setup(oe,de,lt,ue,ct);let $t,vt=Ue;if(ct!==null&&($t=he.get(ct),vt=Ae,vt.setIndex($t)),oe.isMesh)de.wireframe===!0?(Pe.setLineWidth(de.wireframeLinewidth*se()),vt.setMode(j.LINES)):vt.setMode(j.TRIANGLES);else if(oe.isLine){let ft=de.linewidth;ft===void 0&&(ft=1),Pe.setLineWidth(ft*se()),oe.isLineSegments?vt.setMode(j.LINES):oe.isLineLoop?vt.setMode(j.LINE_LOOP):vt.setMode(j.LINE_STRIP)}else oe.isPoints?vt.setMode(j.POINTS):oe.isSprite&&vt.setMode(j.TRIANGLES);if(oe.isBatchedMesh)if(oe._multiDrawInstances!==null)vt.renderMultiDrawInstances(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount,oe._multiDrawInstances);else if(xe.get("WEBGL_multi_draw"))vt.renderMultiDraw(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount);else{const ft=oe._multiDrawStarts,Kt=oe._multiDrawCounts,Pt=oe._multiDrawCount,rr=ct?he.get(ct).bytesPerElement:1,Ui=De.get(de).currentProgram.getUniforms();for(let gn=0;gn{function We(){if(de.forEach(function(it){De.get(it).currentProgram.isReady()&&de.delete(it)}),de.size===0){oe(V);return}setTimeout(We,10)}xe.get("KHR_parallel_shader_compile")!==null?We():setTimeout(We,10)})};let Mr=null;function co(V){Mr&&Mr(V)}function kg(){Ks.stop()}function Og(){Ks.start()}const Ks=new VU;Ks.setAnimationLoop(co),typeof self<"u"&&Ks.setContext(self),this.setAnimationLoop=function(V){Mr=V,fe.setAnimationLoop(V),V===null?Ks.stop():Ks.start()},fe.addEventListener("sessionstart",kg),fe.addEventListener("sessionend",Og),this.render=function(V,ne){if(ne!==void 0&&ne.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;if(V.matrixWorldAutoUpdate===!0&&V.updateMatrixWorld(),ne.parent===null&&ne.matrixWorldAutoUpdate===!0&&ne.updateMatrixWorld(),fe.enabled===!0&&fe.isPresenting===!0&&(fe.cameraAutoUpdate===!0&&fe.updateCamera(ne),ne=fe.getCamera()),V.isScene===!0&&V.onBeforeRender(_,V,ne,T),y=ze.get(V,b.length),y.init(ne),b.push(y),Me.multiplyMatrices(ne.projectionMatrix,ne.matrixWorldInverse),le.setFromProjectionMatrix(Me),ae=this.localClippingEnabled,Q=Le.init(this.clippingPlanes,ae),x=Ne.get(V,g.length),x.init(),g.push(x),fe.enabled===!0&&fe.isPresenting===!0){const We=_.xr.getDepthSensingMesh();We!==null&&Ru(We,ne,-1/0,_.sortObjects)}Ru(V,ne,0,_.sortObjects),x.finish(),_.sortObjects===!0&&x.sort(F,Y),Ve=fe.enabled===!1||fe.isPresenting===!1||fe.hasDepthSensing()===!1,Ve&&xt.addToRenderList(x,V),this.info.render.frame++,Q===!0&&Le.beginShadows();const ue=y.state.shadowsArray;Xe.render(ue,V,ne),Q===!0&&Le.endShadows(),this.info.autoReset===!0&&this.info.reset();const de=x.opaque,oe=x.transmissive;if(y.setupLights(),ne.isArrayCamera){const We=ne.cameras;if(oe.length>0)for(let it=0,lt=We.length;it0&&Dg(de,oe,V,ne),Ve&&xt.render(V),Au(x,V,ne);T!==null&&($.updateMultisampleRenderTarget(T),$.updateRenderTargetMipmap(T)),V.isScene===!0&&V.onAfterRender(_,V,ne),dt.resetDefaultState(),L=-1,U=null,b.pop(),b.length>0?(y=b[b.length-1],Q===!0&&Le.setGlobalState(_.clippingPlanes,y.state.camera)):y=null,g.pop(),g.length>0?x=g[g.length-1]:x=null};function Ru(V,ne,ue,de){if(V.visible===!1)return;if(V.layers.test(ne.layers)){if(V.isGroup)ue=V.renderOrder;else if(V.isLOD)V.autoUpdate===!0&&V.update(ne);else if(V.isLight)y.pushLight(V),V.castShadow&&y.pushShadow(V);else if(V.isSprite){if(!V.frustumCulled||le.intersectsSprite(V)){de&&He.setFromMatrixPosition(V.matrixWorld).applyMatrix4(Me);const it=be.update(V),lt=V.material;lt.visible&&x.push(V,it,lt,ue,He.z,null)}}else if((V.isMesh||V.isLine||V.isPoints)&&(!V.frustumCulled||le.intersectsObject(V))){const it=be.update(V),lt=V.material;if(de&&(V.boundingSphere!==void 0?(V.boundingSphere===null&&V.computeBoundingSphere(),He.copy(V.boundingSphere.center)):(it.boundingSphere===null&&it.computeBoundingSphere(),He.copy(it.boundingSphere.center)),He.applyMatrix4(V.matrixWorld).applyMatrix4(Me)),Array.isArray(lt)){const ct=it.groups;for(let St=0,Et=ct.length;St0&&hs(oe,ne,ue),We.length>0&&hs(We,ne,ue),it.length>0&&hs(it,ne,ue),Pe.buffers.depth.setTest(!0),Pe.buffers.depth.setMask(!0),Pe.buffers.color.setMask(!0),Pe.setPolygonOffset(!1)}function Dg(V,ne,ue,de){if((ue.isScene===!0?ue.overrideMaterial:null)!==null)return;y.state.transmissionRenderTarget[de.id]===void 0&&(y.state.transmissionRenderTarget[de.id]=new os(1,1,{generateMipmaps:!0,type:xe.has("EXT_color_buffer_half_float")||xe.has("EXT_color_buffer_float")?xu:Fi,minFilter:Rs,samples:4,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:an.workingColorSpace}));const We=y.state.transmissionRenderTarget[de.id],it=de.viewport||M;We.setSize(it.z,it.w);const lt=_.getRenderTarget();_.setRenderTarget(We),_.getClearColor(O),B=_.getClearAlpha(),B<1&&_.setClearColor(16777215,.5),_.clear(),Ve&&xt.render(ue);const ct=_.toneMapping;_.toneMapping=Os;const St=de.viewport;if(de.viewport!==void 0&&(de.viewport=void 0),y.setupLightsView(de),Q===!0&&Le.setGlobalState(_.clippingPlanes,de),hs(V,ue,de),$.updateMultisampleRenderTarget(We),$.updateRenderTargetMipmap(We),xe.has("WEBGL_multisampled_render_to_texture")===!1){let Et=!1;for(let mt=0,Jt=ne.length;mt0),mt=!!ue.morphAttributes.position,Jt=!!ue.morphAttributes.normal,nn=!!ue.morphAttributes.color;let ln=Os;de.toneMapped&&(T===null||T.isXRRenderTarget===!0)&&(ln=_.toneMapping);const $t=ue.morphAttributes.position||ue.morphAttributes.normal||ue.morphAttributes.color,vt=$t!==void 0?$t.length:0,ft=De.get(de),Kt=y.state.lights;if(Q===!0&&(ae===!0||V!==U)){const Kr=V===U&&de.id===L;Le.setState(de,V,Kr)}let Pt=!1;de.version===ft.__version?(ft.needsLights&&ft.lightsStateVersion!==Kt.state.version||ft.outputColorSpace!==lt||oe.isBatchedMesh&&ft.batching===!1||!oe.isBatchedMesh&&ft.batching===!0||oe.isBatchedMesh&&ft.batchingColor===!0&&oe.colorTexture===null||oe.isBatchedMesh&&ft.batchingColor===!1&&oe.colorTexture!==null||oe.isInstancedMesh&&ft.instancing===!1||!oe.isInstancedMesh&&ft.instancing===!0||oe.isSkinnedMesh&&ft.skinning===!1||!oe.isSkinnedMesh&&ft.skinning===!0||oe.isInstancedMesh&&ft.instancingColor===!0&&oe.instanceColor===null||oe.isInstancedMesh&&ft.instancingColor===!1&&oe.instanceColor!==null||oe.isInstancedMesh&&ft.instancingMorph===!0&&oe.morphTexture===null||oe.isInstancedMesh&&ft.instancingMorph===!1&&oe.morphTexture!==null||ft.envMap!==ct||de.fog===!0&&ft.fog!==We||ft.numClippingPlanes!==void 0&&(ft.numClippingPlanes!==Le.numPlanes||ft.numIntersection!==Le.numIntersection)||ft.vertexAlphas!==St||ft.vertexTangents!==Et||ft.morphTargets!==mt||ft.morphNormals!==Jt||ft.morphColors!==nn||ft.toneMapping!==ln||ft.morphTargetsCount!==vt)&&(Pt=!0):(Pt=!0,ft.__version=de.version);let rr=ft.currentProgram;Pt===!0&&(rr=Pu(de,ne,oe));let Ui=!1,gn=!1,Ua=!1;const Mn=rr.getUniforms(),Uo=ft.uniforms;if(Pe.useProgram(rr.program)&&(Ui=!0,gn=!0,Ua=!0),de.id!==L&&(L=de.id,gn=!0),Ui||U!==V){Re.reverseDepthBuffer?(ge.copy(V.projectionMatrix),Aie(ge),Pie(ge),Mn.setValue(j,"projectionMatrix",ge)):Mn.setValue(j,"projectionMatrix",V.projectionMatrix),Mn.setValue(j,"viewMatrix",V.matrixWorldInverse);const Kr=Mn.map.cameraPosition;Kr!==void 0&&Kr.setValue(j,tt.setFromMatrixPosition(V.matrixWorld)),Re.logarithmicDepthBuffer&&Mn.setValue(j,"logDepthBufFC",2/(Math.log(V.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&Mn.setValue(j,"isOrthographic",V.isOrthographicCamera===!0),U!==V&&(U=V,gn=!0,Ua=!0)}if(oe.isSkinnedMesh){Mn.setOptional(j,oe,"bindMatrix"),Mn.setOptional(j,oe,"bindMatrixInverse");const Kr=oe.skeleton;Kr&&(Kr.boneTexture===null&&Kr.computeBoneTexture(),Mn.setValue(j,"boneTexture",Kr.boneTexture,$))}oe.isBatchedMesh&&(Mn.setOptional(j,oe,"batchingTexture"),Mn.setValue(j,"batchingTexture",oe._matricesTexture,$),Mn.setOptional(j,oe,"batchingIdTexture"),Mn.setValue(j,"batchingIdTexture",oe._indirectTexture,$),Mn.setOptional(j,oe,"batchingColorTexture"),oe._colorsTexture!==null&&Mn.setValue(j,"batchingColorTexture",oe._colorsTexture,$));const Ba=ue.morphAttributes;if((Ba.position!==void 0||Ba.normal!==void 0||Ba.color!==void 0)&&Oe.update(oe,ue,rr),(gn||ft.receiveShadow!==oe.receiveShadow)&&(ft.receiveShadow=oe.receiveShadow,Mn.setValue(j,"receiveShadow",oe.receiveShadow)),de.isMeshGouraudMaterial&&de.envMap!==null&&(Uo.envMap.value=ct,Uo.flipEnvMap.value=ct.isCubeTexture&&ct.isRenderTargetTexture===!1?-1:1),de.isMeshStandardMaterial&&de.envMap===null&&ne.environment!==null&&(Uo.envMapIntensity.value=ne.environmentIntensity),gn&&(Mn.setValue(j,"toneMappingExposure",_.toneMappingExposure),ft.needsLights&&nw(Uo,Ua),We&&de.fog===!0&&Fe.refreshFogUniforms(Uo,We),Fe.refreshMaterialUniforms(Uo,de,Z,H,y.state.transmissionRenderTarget[V.id]),zy.upload(j,zg(ft),Uo,$)),de.isShaderMaterial&&de.uniformsNeedUpdate===!0&&(zy.upload(j,zg(ft),Uo,$),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&Mn.setValue(j,"center",oe.center),Mn.setValue(j,"modelViewMatrix",oe.modelViewMatrix),Mn.setValue(j,"normalMatrix",oe.normalMatrix),Mn.setValue(j,"modelMatrix",oe.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const Kr=de.uniformsGroups;for(let Zr=0,iw=Kr.length;Zr0&&$.useMultisampledRTT(V)===!1?oe=De.get(V).__webglMultisampledFramebuffer:Array.isArray(Et)?oe=Et[ue]:oe=Et,M.copy(V.viewport),R.copy(V.scissor),D=V.scissorTest}else M.copy(K).multiplyScalar(Z).floor(),R.copy(ee).multiplyScalar(Z).floor(),D=me;if(Pe.bindFramebuffer(j.FRAMEBUFFER,oe)&&de&&Pe.drawBuffers(V,oe),Pe.viewport(M),Pe.scissor(R),Pe.setScissorTest(D),We){const ct=De.get(V.texture);j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_CUBE_MAP_POSITIVE_X+ne,ct.__webglTexture,ue)}else if(it){const ct=De.get(V.texture),St=ne||0;j.framebufferTextureLayer(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,ct.__webglTexture,ue||0,St)}L=-1},this.readRenderTargetPixels=function(V,ne,ue,de,oe,We,it){if(!(V&&V.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let lt=De.get(V).__webglFramebuffer;if(V.isWebGLCubeRenderTarget&&it!==void 0&&(lt=lt[it]),lt){Pe.bindFramebuffer(j.FRAMEBUFFER,lt);try{const ct=V.texture,St=ct.format,Et=ct.type;if(!Re.textureFormatReadable(St)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Re.textureTypeReadable(Et)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ne>=0&&ne<=V.width-de&&ue>=0&&ue<=V.height-oe&&j.readPixels(ne,ue,de,oe,ke.convert(St),ke.convert(Et),We)}finally{const ct=T!==null?De.get(T).__webglFramebuffer:null;Pe.bindFramebuffer(j.FRAMEBUFFER,ct)}}},this.readRenderTargetPixelsAsync=async function(V,ne,ue,de,oe,We,it){if(!(V&&V.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let lt=De.get(V).__webglFramebuffer;if(V.isWebGLCubeRenderTarget&&it!==void 0&&(lt=lt[it]),lt){const ct=V.texture,St=ct.format,Et=ct.type;if(!Re.textureFormatReadable(St))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Re.textureTypeReadable(Et))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ne>=0&&ne<=V.width-de&&ue>=0&&ue<=V.height-oe){Pe.bindFramebuffer(j.FRAMEBUFFER,lt);const mt=j.createBuffer();j.bindBuffer(j.PIXEL_PACK_BUFFER,mt),j.bufferData(j.PIXEL_PACK_BUFFER,We.byteLength,j.STREAM_READ),j.readPixels(ne,ue,de,oe,ke.convert(St),ke.convert(Et),0);const Jt=T!==null?De.get(T).__webglFramebuffer:null;Pe.bindFramebuffer(j.FRAMEBUFFER,Jt);const nn=j.fenceSync(j.SYNC_GPU_COMMANDS_COMPLETE,0);return j.flush(),await Rie(j,nn,4),j.bindBuffer(j.PIXEL_PACK_BUFFER,mt),j.getBufferSubData(j.PIXEL_PACK_BUFFER,0,We),j.deleteBuffer(mt),j.deleteSync(nn),We}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(V,ne=null,ue=0){V.isTexture!==!0&&(Fy("WebGLRenderer: copyFramebufferToTexture function signature has changed."),ne=arguments[0]||null,V=arguments[1]);const de=Math.pow(2,-ue),oe=Math.floor(V.image.width*de),We=Math.floor(V.image.height*de),it=ne!==null?ne.x:0,lt=ne!==null?ne.y:0;$.setTexture2D(V,0),j.copyTexSubImage2D(j.TEXTURE_2D,ue,0,0,it,lt,oe,We),Pe.unbindTexture()},this.copyTextureToTexture=function(V,ne,ue=null,de=null,oe=0){V.isTexture!==!0&&(Fy("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,V=arguments[1],ne=arguments[2],oe=arguments[3]||0,ue=null);let We,it,lt,ct,St,Et;ue!==null?(We=ue.max.x-ue.min.x,it=ue.max.y-ue.min.y,lt=ue.min.x,ct=ue.min.y):(We=V.image.width,it=V.image.height,lt=0,ct=0),de!==null?(St=de.x,Et=de.y):(St=0,Et=0);const mt=ke.convert(ne.format),Jt=ke.convert(ne.type);$.setTexture2D(ne,0),j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ne.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ne.unpackAlignment);const nn=j.getParameter(j.UNPACK_ROW_LENGTH),ln=j.getParameter(j.UNPACK_IMAGE_HEIGHT),$t=j.getParameter(j.UNPACK_SKIP_PIXELS),vt=j.getParameter(j.UNPACK_SKIP_ROWS),ft=j.getParameter(j.UNPACK_SKIP_IMAGES),Kt=V.isCompressedTexture?V.mipmaps[oe]:V.image;j.pixelStorei(j.UNPACK_ROW_LENGTH,Kt.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Kt.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,lt),j.pixelStorei(j.UNPACK_SKIP_ROWS,ct),V.isDataTexture?j.texSubImage2D(j.TEXTURE_2D,oe,St,Et,We,it,mt,Jt,Kt.data):V.isCompressedTexture?j.compressedTexSubImage2D(j.TEXTURE_2D,oe,St,Et,Kt.width,Kt.height,mt,Kt.data):j.texSubImage2D(j.TEXTURE_2D,oe,St,Et,We,it,mt,Jt,Kt),j.pixelStorei(j.UNPACK_ROW_LENGTH,nn),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,ln),j.pixelStorei(j.UNPACK_SKIP_PIXELS,$t),j.pixelStorei(j.UNPACK_SKIP_ROWS,vt),j.pixelStorei(j.UNPACK_SKIP_IMAGES,ft),oe===0&&ne.generateMipmaps&&j.generateMipmap(j.TEXTURE_2D),Pe.unbindTexture()},this.copyTextureToTexture3D=function(V,ne,ue=null,de=null,oe=0){V.isTexture!==!0&&(Fy("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ue=arguments[0]||null,de=arguments[1]||null,V=arguments[2],ne=arguments[3],oe=arguments[4]||0);let We,it,lt,ct,St,Et,mt,Jt,nn;const ln=V.isCompressedTexture?V.mipmaps[oe]:V.image;ue!==null?(We=ue.max.x-ue.min.x,it=ue.max.y-ue.min.y,lt=ue.max.z-ue.min.z,ct=ue.min.x,St=ue.min.y,Et=ue.min.z):(We=ln.width,it=ln.height,lt=ln.depth,ct=0,St=0,Et=0),de!==null?(mt=de.x,Jt=de.y,nn=de.z):(mt=0,Jt=0,nn=0);const $t=ke.convert(ne.format),vt=ke.convert(ne.type);let ft;if(ne.isData3DTexture)$.setTexture3D(ne,0),ft=j.TEXTURE_3D;else if(ne.isDataArrayTexture||ne.isCompressedArrayTexture)$.setTexture2DArray(ne,0),ft=j.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ne.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ne.unpackAlignment);const Kt=j.getParameter(j.UNPACK_ROW_LENGTH),Pt=j.getParameter(j.UNPACK_IMAGE_HEIGHT),rr=j.getParameter(j.UNPACK_SKIP_PIXELS),Ui=j.getParameter(j.UNPACK_SKIP_ROWS),gn=j.getParameter(j.UNPACK_SKIP_IMAGES);j.pixelStorei(j.UNPACK_ROW_LENGTH,ln.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,ln.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,ct),j.pixelStorei(j.UNPACK_SKIP_ROWS,St),j.pixelStorei(j.UNPACK_SKIP_IMAGES,Et),V.isDataTexture||V.isData3DTexture?j.texSubImage3D(ft,oe,mt,Jt,nn,We,it,lt,$t,vt,ln.data):ne.isCompressedArrayTexture?j.compressedTexSubImage3D(ft,oe,mt,Jt,nn,We,it,lt,$t,ln.data):j.texSubImage3D(ft,oe,mt,Jt,nn,We,it,lt,$t,vt,ln),j.pixelStorei(j.UNPACK_ROW_LENGTH,Kt),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Pt),j.pixelStorei(j.UNPACK_SKIP_PIXELS,rr),j.pixelStorei(j.UNPACK_SKIP_ROWS,Ui),j.pixelStorei(j.UNPACK_SKIP_IMAGES,gn),oe===0&&ne.generateMipmaps&&j.generateMipmap(ft),Pe.unbindTexture()},this.initRenderTarget=function(V){De.get(V).__webglFramebuffer===void 0&&$.setupRenderTarget(V)},this.initTexture=function(V){V.isCubeTexture?$.setTextureCube(V,0):V.isData3DTexture?$.setTexture3D(V,0):V.isDataArrayTexture||V.isCompressedArrayTexture?$.setTexture2DArray(V,0):$.setTexture2D(V,0),Pe.unbindTexture()},this.resetState=function(){P=0,N=0,T=null,Pe.reset(),dt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return As}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===o_?"display-p3":"srgb",n.unpackColorSpace=an.workingColorSpace===hg?"display-p3":"srgb"}}class l_{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new ot(e),this.density=n}clone(){return new l_(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class c_{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 c_(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class dx extends tn{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 ro,this.environmentIntensity=1,this.environmentRotation=new ro,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 u_{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Tm,this.updateRanges=[],this.version=0,this.uuid=eo()}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,o=this.stride;ie.far||n.push({distance:l,point:qh.clone(),uv:Mi.getInterpolation(qh,Tv,Kh,Rv,bL,DM,_L,new Ie),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 Av(t,e,n,r,i,o){pf.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(Yh.x=o*pf.x-i*pf.y,Yh.y=i*pf.x+o*pf.y):Yh.copy(pf),t.copy(e),t.x+=Yh.x,t.y+=Yh.y,t.applyMatrix4(KU)}const Pv=new G,wL=new G;class JU extends tn{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){Pv.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Pv);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){Pv.setFromMatrixPosition(e.matrixWorld),wL.setFromMatrixPosition(this.matrixWorld);const r=Pv.distanceTo(wL)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=s)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});const s=i[this.index];o.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=n,s.index=r}reset(){this.list.length=0,this.index=0}}const sl=new wt,UM=new wt,Kce=new wt,Zce=new ot(1,1,1),NL=new wt,BM=new gg,Lv=new Pr,cc=new qr,Qh=new G,IL=new G,Jce=new G,jM=new Yce,$r=new nr,kv=[];function Qce(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let o=0;o65535?new Uint32Array(i):new Uint16Array(i);n.setIndex(new hn(o,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(!e.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),o=n.getAttribute(r);if(i.itemSize!==o.itemSize||i.normalized!==o.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Pr);const e=this.boundingBox,n=this._drawInfo;e.makeEmpty();for(let r=0,i=n.length;r=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("BatchedMesh: Maximum item count reached.");const r={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(i=this._availableInstanceIds.pop(),this._drawInfo[i]=r):(i=this._drawInfo.length,this._drawInfo.push(r));const o=this._matricesTexture,s=o.image.data;Kce.toArray(s,i*16),o.needsUpdate=!0;const a=this._colorsTexture;return a&&(Zce.toArray(a.image.data,i*4),a.needsUpdate=!0),i}addGeometry(e,n=-1,r=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._drawInfo.length>=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");const i={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let o=null;const s=this._reservedRanges,a=this._drawRanges,l=this._bounds;this._geometryCount!==0&&(o=s[s.length-1]),n===-1?i.vertexCount=e.getAttribute("position").count:i.vertexCount=n,o===null?i.vertexStart=0:i.vertexStart=o.vertexStart+o.vertexCount;const c=e.getIndex(),u=c!==null;if(u&&(r===-1?i.indexCount=c.count:i.indexCount=r,o===null?i.indexStart=0:i.indexStart=o.indexStart+o.indexCount),i.indexStart!==-1&&i.indexStart+i.indexCount>this._maxIndexCount||i.vertexStart+i.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const f=this._geometryCount;return this._geometryCount++,s.push(i),a.push({start:u?i.indexStart:i.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new Pr,sphereInitialized:!1,sphere:new qr}),this.setGeometryAt(f,e),f}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,o=r.getIndex(),s=n.getIndex(),a=this._reservedRanges[e];if(i&&s.count>a.indexCount||n.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.vertexCount;for(const m in r.attributes){const v=n.getAttribute(m),x=r.getAttribute(m);Qce(v,x,l);const y=v.itemSize;for(let g=v.count,b=c;g=n.length||n[e].active===!1?this:(n[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this)}getBoundingBoxAt(e,n){if(e>=this._geometryCount)return null;const r=this._bounds[e],i=r.box,o=this.geometry;if(r.boxInitialized===!1){i.makeEmpty();const s=o.index,a=o.attributes.position,l=this._drawRanges[e];for(let c=l.start,u=l.start+l.count;c=this._geometryCount)return null;const r=this._bounds[e],i=r.sphere,o=this.geometry;if(r.sphereInitialized===!1){i.makeEmpty(),this.getBoundingBoxAt(e,Lv),Lv.getCenter(i.center);const s=o.index,a=o.attributes.position,l=this._drawRanges[e];let c=0;for(let u=l.start,f=l.start+l.count;u=r.length||r[e].active===!1?this:(n.toArray(o,e*16),i.needsUpdate=!0,this)}getMatrixAt(e,n){const r=this._drawInfo,i=this._matricesTexture.image.data;return e>=r.length||r[e].active===!1?null:n.fromArray(i,e*16)}setColorAt(e,n){this._colorsTexture===null&&this._initColorsTexture();const r=this._colorsTexture,i=this._colorsTexture.image.data,o=this._drawInfo;return e>=o.length||o[e].active===!1?this:(n.toArray(i,e*4),r.needsUpdate=!0,this)}getColorAt(e,n){const r=this._colorsTexture.image.data,i=this._drawInfo;return e>=i.length||i[e].active===!1?null:n.fromArray(r,e*4)}setVisibleAt(e,n){const r=this._drawInfo;return e>=r.length||r[e].active===!1||r[e].visible===n?this:(r[e].visible=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._drawInfo;return e>=n.length||n[e].active===!1?!1:n[e].visible}setGeometryIdAt(e,n){const r=this._drawInfo;return e>=r.length||r[e].active===!1||n<0||n>=this._geometryCount?null:(r[e].geometryIndex=n,this)}getGeometryIdAt(e){const n=this._drawInfo;return e>=n.length||n[e].active===!1?-1:n[e].geometryIndex}getGeometryRangeAt(e,n={}){if(e<0||e>=this._geometryCount)return null;const r=this._drawRanges[e];return n.start=r.start,n.count=r.count,n}raycast(e,n){const r=this._drawInfo,i=this._drawRanges,o=this.matrixWorld,s=this.geometry;$r.material=this.material,$r.geometry.index=s.index,$r.geometry.attributes=s.attributes,$r.geometry.boundingBox===null&&($r.geometry.boundingBox=new Pr),$r.geometry.boundingSphere===null&&($r.geometry.boundingSphere=new qr);for(let a=0,l=r.length;a({...n})),this._reservedRanges=e._reservedRanges.map(n=>({...n})),this._drawInfo=e._drawInfo.map(n=>({...n})),this._bounds=e._bounds.map(n=>({boxInitialized:n.boxInitialized,box:n.box.clone(),sphereInitialized:n.sphereInitialized,sphere:n.sphere.clone()})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,r,i,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=i.getIndex(),a=s===null?1:s.array.BYTES_PER_ELEMENT,l=this._drawInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._drawRanges,h=this.perObjectFrustumCulled,m=this._indirectTexture,v=m.image.data;h&&(NL.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),BM.setFromProjectionMatrix(NL,e.coordinateSystem));let x=0;if(this.sortObjects){UM.copy(this.matrixWorld).invert(),Qh.setFromMatrixPosition(r.matrixWorld).applyMatrix4(UM),IL.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(UM);for(let b=0,_=l.length;b<_;b++)if(l[b].visible&&l[b].active){const S=l[b].geometryIndex;this.getMatrixAt(b,sl),this.getBoundingSphereAt(S,cc).applyMatrix4(sl);let P=!1;if(h&&(P=!BM.intersectsSphere(cc)),!P){const N=Jce.subVectors(cc.center,Qh).dot(IL);jM.push(f[S],N,b)}}const y=jM.list,g=this.customSort;g===null?y.sort(o.transparent?qce:Xce):g.call(this,y,r);for(let b=0,_=y.length;b<_;b++){const S=y[b];c[x]=S.start*a,u[x]=S.count,v[x]=S.index,x++}jM.reset()}else for(let y=0,g=l.length;y0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;or)return;VM.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(VM);if(!(le.far))return{distance:l,point:kL.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:t}}const OL=new G,DL=new G;class qs extends La{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,o=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:s})}}class eue extends kn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:tr,this.magFilter=o!==void 0?o:tr,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 tue extends kn{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=lr,this.minFilter=lr,this.generateMipmaps=!1,this.needsUpdate=!0}}class d_ extends kn{constructor(e,n,r,i,o,s,a,l,c,u,f,h){super(null,s,a,l,c,u,i,o,f,h),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class nue extends d_{constructor(e,n,r,i,o,s){super(e,n,r,o,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ti,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class rue extends d_{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,Na),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class iue extends kn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class us{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),o=0;n.push(0);for(let s=1;s<=e;s++)r=this.getPoint(s/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let s;n?s=n:s=e*r[o-1];let a=0,l=o-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-s,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===s)return i/(o-1);const u=r[i],h=r[i+1]-u,m=(s-u)/h;return(i+m)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const s=this.getPoint(i),a=this.getPoint(o),l=n||(s.isVector2?new Ie:new G);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new G,i=[],o=[],s=[],a=new G,l=new wt;for(let m=0;m<=e;m++){const v=m/e;i[m]=this.getTangentAt(v,new G)}o[0]=new G,s[0]=new G;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(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let m=1;m<=e;m++){if(o[m]=o[m-1].clone(),s[m]=s[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos($n(i[m-1].dot(i[m]),-1,1));o[m].applyMatrix4(l.makeRotationAxis(a,v))}s[m].crossVectors(i[m],o[m])}if(n===!0){let m=Math.acos($n(o[0].dot(o[e]),-1,1));m/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(m=-m);for(let v=1;v<=e;v++)o[v].applyMatrix4(l.makeRotationAxis(i[v],m*v)),s[v].crossVectors(i[v],o[v])}return{tangents:i,normals:o,binormals:s}}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 h_ extends us{constructor(e=0,n=0,r=1,i=1,o=0,s=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=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new Ie){const r=n,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%o]:(Uv.subVectors(i[0],i[1]).add(i[0]),c=Uv);const f=i[a%o],h=i[(a+1)%o];if(this.closed||a+2i.length-2?i.length-1:s+1],f=i[s>i.length-3?i.length-1:s+2];return r.set(UL(a,l.x,c.x,u.x,f.x),UL(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 s=i[o]-r,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,n)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let 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 yg extends zt{constructor(e=[new Ie(0,-.5),new Ie(.5,0),new Ie(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=$n(i,0,Math.PI*2);const o=[],s=[],a=[],l=[],c=[],u=1/n,f=new G,h=new Ie,m=new G,v=new G,x=new G;let y=0,g=0;for(let b=0;b<=e.length-1;b++)switch(b){case 0:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,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:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,m.z=g*0,v.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(v)}for(let b=0;b<=n;b++){const _=r+b*u*i,S=Math.sin(_),P=Math.cos(_);for(let N=0;N<=e.length-1;N++){f.x=e[N].x*S,f.y=e[N].y,f.z=e[N].x*P,s.push(f.x,f.y,f.z),h.x=b/n,h.y=N/(e.length-1),a.push(h.x,h.y);const T=l[3*N+0]*S,L=l[3*N+1],U=l[3*N+0]*P;c.push(T,L,U)}}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 G,P=new G;let N=0;const T=(n-e)/r;for(let L=0;L<=o;L++){const U=[],M=L/o,R=M*(n-e)+e;for(let D=0;D<=i;D++){const O=D/i,B=O*l+a,X=Math.sin(B),H=Math.cos(B);P.x=R*X,P.y=-M*r+y,P.z=R*H,f.push(P.x,P.y,P.z),S.set(X,T,H).normalize(),h.push(S.x,S.y,S.z),m.push(O,1-M),U.push(v++)}x.push(U)}for(let L=0;L0&&(u.push(M,R,O),N+=3),n>0&&(u.push(R,D,O),N+=3)}c.addGroup(g,N,0),g+=N}function _(S){const P=v,N=new Ie,T=new G;let L=0;const U=S===!0?e:n,M=S===!0?1:-1;for(let D=1;D<=i;D++)f.push(0,y*M,0),h.push(0,M,0),m.push(.5,.5),v++;const R=v;for(let D=0;D<=i;D++){const B=D/i*l+a,X=Math.cos(B),H=Math.sin(B);T.x=U*H,T.y=y*M,T.z=U*X,f.push(T.x,T.y,T.z),h.push(0,M,0),N.x=X*.5+.5,N.y=H*.5*M+.5,m.push(N.x,N.y),v++}for(let D=0;D.9&&T<.1&&(_<.2&&(s[b+0]+=1),S<.2&&(s[b+2]+=1),P<.2&&(s[b+4]+=1))}}function h(b){o.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 v(){const b=new G,_=new G,S=new G,P=new G,N=new Ie,T=new Ie,L=new Ie;for(let U=0,M=0;U80*n){a=c=t[0],l=u=t[1];for(let v=n;vc&&(c=f),h>u&&(u=h);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return Nm(o,s,n,a,l,m,0),s}};function uB(t,e,n,r,i){let o,s;if(i===Rue(t,e,n,r)>0)for(o=e;o=e;o-=r)s=BL(o,t[o],t[o+1],s);return s&&y_(s,s.next)&&(Lm(s),s=s.next),s}function uu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(y_(n,n.next)||In(n.prev,n,n.next)===0)){if(Lm(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function Nm(t,e,n,r,i,o,s){if(!t)return;!s&&o&&wue(t,r,i,o);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,o?pue(t,r,i,o):hue(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Lm(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=mue(uu(t),e,n),Nm(t,e,n,r,i,o,2)):s===2&&gue(t,e,n,r,i,o):Nm(uu(t),e,n,r,i,o,1);break}}}function hue(t){const e=t.prev,n=t,r=t.next;if(In(e,n,r)>=0)return!1;const i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,c=r.y,u=io?i>s?i:s:o>s?o:s,m=a>l?a>c?a:c:l>c?l:c;let v=r.next;for(;v!==e;){if(v.x>=u&&v.x<=h&&v.y>=f&&v.y<=m&&Hf(i,a,o,l,s,c,v.x,v.y)&&In(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function pue(t,e,n,r){const i=t.prev,o=t,s=t.next;if(In(i,o,s)>=0)return!1;const a=i.x,l=o.x,c=s.x,u=i.y,f=o.y,h=s.y,m=al?a>c?a:c:l>c?l:c,y=u>f?u>h?u:h:f>h?f:h,g=fC(m,v,e,n,r),b=fC(x,y,e,n,r);let _=t.prevZ,S=t.nextZ;for(;_&&_.z>=g&&S&&S.z<=b;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Hf(a,u,l,f,c,h,_.x,_.y)&&In(_.prev,_,_.next)>=0||(_=_.prevZ,S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Hf(a,u,l,f,c,h,S.x,S.y)&&In(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;_&&_.z>=g;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Hf(a,u,l,f,c,h,_.x,_.y)&&In(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;S&&S.z<=b;){if(S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Hf(a,u,l,f,c,h,S.x,S.y)&&In(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function mue(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!y_(i,o)&&fB(i,r,r.next,o)&&Im(i,o)&&Im(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),Lm(r),Lm(r.next),r=t=o),r=r.next}while(r!==t);return uu(r)}function gue(t,e,n,r,i,o){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Eue(s,a)){let l=dB(s,a);s=uu(s,s.next),l=uu(l,l.next),Nm(s,e,n,r,i,o,0),Nm(l,e,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==t)}function vue(t,e,n,r){const i=[];let o,s,a,l,c;for(o=0,s=e.length;o=n.next.y&&n.next.y!==n.y){const h=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=o&&h>r&&(r=h,i=n.x=n.x&&n.x>=l&&o!==n.x&&Hf(si.x||n.x===i.x&&_ue(i,n)))&&(i=n,u=f)),n=n.next;while(n!==a);return i}function _ue(t,e){return In(t.prev,t,e.prev)<0&&In(e.next,t,t.next)<0}function wue(t,e,n,r){let i=t;do i.z===0&&(i.z=fC(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,Sue(i)}function Sue(t){let e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,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--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return t}function fC(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 Mue(t){let e=t,n=t;do(e.x=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function Eue(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Cue(t,e)&&(Im(t,e)&&Im(e,t)&&Tue(t,e)&&(In(t.prev,t,e.prev)||In(t,e.prev,e))||y_(t,e)&&In(t.prev,t,t.next)>0&&In(e.prev,e,e.next)>0)}function In(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function y_(t,e){return t.x===e.x&&t.y===e.y}function fB(t,e,n,r){const i=Wv(In(t,e,n)),o=Wv(In(t,e,r)),s=Wv(In(n,r,t)),a=Wv(In(n,r,e));return!!(i!==o&&s!==a||i===0&&$v(t,n,e)||o===0&&$v(t,r,e)||s===0&&$v(n,t,r)||a===0&&$v(n,e,r))}function $v(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 Wv(t){return t>0?1:t<0?-1:0}function Cue(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&&fB(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Im(t,e){return In(t.prev,t,t.next)<0?In(t,e,t.next)>=0&&In(t,t.prev,e)>=0:In(t,e,t.prev)<0||In(t,t.next,e)<0}function Tue(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function dB(t,e){const n=new dC(t.i,t.x,t.y),r=new dC(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function BL(t,e,n,r){const i=new dC(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 Lm(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 dC(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 Rue(t,e,n,r){let i=0;for(let o=e,s=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function VL(t,e){for(let n=0;nNumber.EPSILON){const pe=Math.sqrt(re),be=Math.sqrt($*$+z*z),Ge=j.x-De/pe,Fe=j.y+Ee/pe,Ne=ye.x-z/be,ze=ye.y+$/be,Le=((Ne-Ge)*z-(ze-Fe)*$)/(Ee*z-De*$);xe=Ge+Ee*Le-se.x,Re=Fe+De*Le-se.y;const Xe=xe*xe+Re*Re;if(Xe<=2)return new Ie(xe,Re);Pe=Math.sqrt(Xe/2)}else{let pe=!1;Ee>Number.EPSILON?$>Number.EPSILON&&(pe=!0):Ee<-Number.EPSILON?$<-Number.EPSILON&&(pe=!0):Math.sign(De)===Math.sign(z)&&(pe=!0),pe?(xe=-De,Re=Ee,Pe=Math.sqrt(re)):(xe=Ee,Re=De,Pe=Math.sqrt(re/2))}return new Ie(xe/Pe,Re/Pe)}const Y=[];for(let se=0,j=B.length,ye=j-1,xe=se+1;se=0;se--){const j=se/y,ye=m*Math.cos(j*Math.PI/2),xe=v*Math.sin(j*Math.PI/2)+x;for(let Re=0,Pe=B.length;Re=0;){const xe=ye;let Re=ye-1;Re<0&&(Re=se.length-1);for(let Pe=0,Ee=u+y*2;Pe0)&&m.push(_,S,N),(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 vB extends Ir{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=jl,this.normalScale=new Ie(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ro,this.combine=cg,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 yB extends Ir{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=jl,this.normalScale=new Ie(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 xB extends Ir{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=jl,this.normalScale=new Ie(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 bB extends Ir{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=jl,this.normalScale=new Ie(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ro,this.combine=cg,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 _B extends Ir{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=jl,this.normalScale=new Ie(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 wB extends mi{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 kc(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 SB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function MB(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function hC(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function mA(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}function Iue(t,e,n,r,i=30){const o=t.clone();o.name=e;const s=[];for(let l=0;l=r)){f.push(c.times[m]);for(let x=0;xo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[v]){const g=v*f+u,b=g+f-u;x=a.values.slice(g,b)}else{const g=a.createInterpolant(),b=u,_=f-u;g.evaluate(o),x=g.resultBuffer.slice(b,_)}l==="quaternion"&&new ki().fromArray(x).normalize().conjugate().toArray(x);const y=c.times.length;for(let g=0;g=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*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,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;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(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&SB(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()===Dy,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*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}}fs.prototype.TimeBufferType=Float32Array;fs.prototype.ValueBufferType=Float32Array;fs.prototype.DefaultInterpolation=fx;class _u extends fs{constructor(e,n,r){super(e,n,r)}}_u.prototype.ValueTypeName="bool";_u.prototype.ValueBufferType=Array;_u.prototype.DefaultInterpolation=wm;_u.prototype.InterpolantFactoryMethodLinear=void 0;_u.prototype.InterpolantFactoryMethodSmooth=void 0;class vA extends fs{}vA.prototype.ValueTypeName="color";class km extends fs{}km.prototype.ValueTypeName="number";class TB extends _g{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)ki.slerpFlat(o,0,s,c-a,s,c,l);return o}}class wg extends fs{InterpolantFactoryMethodLinear(e){return new TB(this.times,this.values,this.getValueSize(),e)}}wg.prototype.ValueTypeName="quaternion";wg.prototype.InterpolantFactoryMethodSmooth=void 0;class wu extends fs{constructor(e,n,r){super(e,n,r)}}wu.prototype.ValueTypeName="string";wu.prototype.ValueBufferType=Array;wu.prototype.DefaultInterpolation=wm;wu.prototype.InterpolantFactoryMethodLinear=void 0;wu.prototype.InterpolantFactoryMethodSmooth=void 0;class Om extends fs{}Om.prototype.ValueTypeName="vector";class Dm{constructor(e="",n=-1,r=[],i=i_){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=eo(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(Due(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}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 o=0,s=r.length;o!==s;++o)n.push(fs.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const f=u[1];let h=i[f];h||(i[f]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,h,m,v,x){if(m.length!==0){const y=[],g=[];mA(m,y,g,v),y.length!==0&&x.push(new f(h,y,g))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{n&&n(o),this.manager.itemEnd(e)},0),o;if(la[e]!==void 0){la[e].push({onLoad:n,onProgress:r,onError:i});return}la[e]=[],la[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).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=la[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=h?parseInt(h):0,v=m!==0;let x=0;const y=new ReadableStream({start(g){b();function b(){f.read().then(({done:_,value:S})=>{if(_)g.close();else{x+=S.byteLength;const P=new ProgressEvent("progress",{lengthComputable:v,loaded:x,total:m});for(let N=0,T=u.length;N{g.error(_)})}}});return new Response(y)}else throw new Fue(`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(v=>m.decode(v))}}}).then(c=>{ya.add(e,c);const u=la[e];delete la[e];for(let f=0,h=u.length;f{const u=la[e];if(u===void 0)throw this.manager.itemError(e),c;delete la[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 zue extends zi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new ka(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=r(s.value);break;case"c":i.uniforms[o].value=new ot().setHex(s.value);break;case"v2":i.uniforms[o].value=new Ie().fromArray(s.value);break;case"v3":i.uniforms[o].value=new G().fromArray(s.value);break;case"v4":i.uniforms[o].value=new Zt().fromArray(s.value);break;case"m3":i.uniforms[o].value=new Ot().fromArray(s.value);break;case"m4":i.uniforms[o].value=new wt().fromArray(s.value);break;default:i.uniforms[o].value=s.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 o in e.extensions)i.extensions[o]=e.extensions[o];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 o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Ie().fromArray(o)}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 Ie().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 T_.createMaterialFromType(e)}static createMaterialFromType(e){const n={ShadowMaterial:pB,SpriteMaterial:oA,RawShaderMaterial:mB,ShaderMaterial:ss,PointsMaterial:aA,MeshPhysicalMaterial:gB,MeshStandardMaterial:pA,MeshPhongMaterial:vB,MeshToonMaterial:yB,MeshNormalMaterial:xB,MeshLambertMaterial:bB,MeshDepthMaterial:rA,MeshDistanceMaterial:iA,MeshBasicMaterial:Vl,MeshMatcapMaterial:_B,LineDashedMaterial:wB,LineBasicMaterial:mi,Material:Ir};return new n[e]}}class pC{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 yA(n);o=new Fm(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new Fm(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s{const y=new Pr;y.min.fromArray(x.boxMin),y.max.fromArray(x.boxMax);const g=new qr;return g.radius=x.sphereRadius,g.center.fromArray(x.sphereCenter),{boxInitialized:x.boxInitialized,box:y,sphereInitialized:x.sphereInitialized,sphere:g}}),s._maxInstanceCount=e.maxInstanceCount,s._maxVertexCount=e.maxVertexCount,s._maxIndexCount=e.maxIndexCount,s._geometryInitialized=e.geometryInitialized,s._geometryCount=e.geometryCount,s._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(s._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":s=new JU;break;case"Line":s=new La(a(e.geometry),l(e.material));break;case"LineLoop":s=new nB(a(e.geometry),l(e.material));break;case"LineSegments":s=new qs(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":s=new rB(a(e.geometry),l(e.material));break;case"Sprite":s=new ZU(l(e.material));break;case"Group":s=new Wf;break;case"Bone":s=new sA;break;default:s=new tn}if(s.uuid=e.uuid,e.name!==void 0&&(s.name=e.name),e.matrix!==void 0?(s.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(e.position!==void 0&&s.position.fromArray(e.position),e.rotation!==void 0&&s.rotation.fromArray(e.rotation),e.quaternion!==void 0&&s.quaternion.fromArray(e.quaternion),e.scale!==void 0&&s.scale.fromArray(e.scale)),e.up!==void 0&&s.up.fromArray(e.up),e.castShadow!==void 0&&(s.castShadow=e.castShadow),e.receiveShadow!==void 0&&(s.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(s.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(s.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(s.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(s.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(s.visible=e.visible),e.frustumCulled!==void 0&&(s.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(s.renderOrder=e.renderOrder),e.userData!==void 0&&(s.userData=e.userData),e.layers!==void 0&&(s.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 o=this,s=ya.get(e);if(s!==void 0){if(o.manager.itemStart(e),s.then){s.then(c=>{n&&n(c),o.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s}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(o.options,{colorSpaceConversion:"none"}))}).then(function(c){return ya.add(e,c),n&&n(c),o.manager.itemEnd(e),c}).catch(function(c){i&&i(c),ya.remove(e),o.manager.itemError(e),o.manager.itemEnd(e)});ya.add(e,l),o.manager.itemStart(e)}}let Hv;class bA{static getContext(){return Hv===void 0&&(Hv=new(window.AudioContext||window.webkitAudioContext)),Hv}static setContext(e){Hv=e}}class Yue extends zi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new ka(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(l){try{const c=l.slice(0);bA.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),o.manager.itemError(e)}}}const KL=new wt,ZL=new wt,uc=new wt;class Kue{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new vr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new vr,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,uc.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,s=n.near*Math.tan($c*n.fov*.5)/n.zoom;let a,l;ZL.elements[12]=-i,KL.elements[12]=i,a=-s*n.aspect+o,l=s*n.aspect+o,uc.elements[0]=2*n.near/(l-a),uc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(uc),a=-s*n.aspect-o,l=s*n.aspect-o,uc.elements[0]=2*n.near/(l-a),uc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(uc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ZL),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(KL)}}class _A{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=JL(),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=JL();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function JL(){return performance.now()}const fc=new G,QL=new ki,Zue=new G,dc=new G;class Jue extends tn{constructor(){super(),this.type="AudioListener",this.context=bA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new _A}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(fc,QL,Zue),dc.set(0,0,-1).applyQuaternion(QL),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(fc.x,i),n.positionY.linearRampToValueAtTime(fc.y,i),n.positionZ.linearRampToValueAtTime(fc.z,i),n.forwardX.linearRampToValueAtTime(dc.x,i),n.forwardY.linearRampToValueAtTime(dc.y,i),n.forwardZ.linearRampToValueAtTime(dc.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(fc.x,fc.y,fc.z),n.setOrientation(dc.x,dc.y,dc.z,r.x,r.y,r.z)}}class UB extends tn{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 o=r,s=i;o!==s;++o)n[o]=n[i+o%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 s=0;s!==o;++s)e[n+s]=e[r+s]}_slerp(e,n,r,i){ki.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const s=this._workIndex*o;ki.multiplyQuaternionsFlat(e,s,e,n,e,r),ki.slerpFlat(e,n,e,n,e,s,i)}_lerp(e,n,r,i,o){const s=1-i;for(let a=0;a!==o;++a){const l=n+a;e[l]=e[l]*s+e[r+a]*i}}_lerpAdditive(e,n,r,i,o){for(let s=0;s!==o;++s){const a=n+s;e[a]=e[a]+e[r+s]*i}}}const wA="\\[\\]\\.:\\/",nfe=new RegExp("["+wA+"]","g"),SA="[^"+wA+"]",rfe="[^"+wA.replace("\\.","")+"]",ife=/((?:WC+[\/:])*)/.source.replace("WC",SA),ofe=/(WCOD+)?/.source.replace("WCOD",rfe),sfe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",SA),afe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",SA),lfe=new RegExp("^"+ife+ofe+sfe+afe+"$"),cfe=["material","materials","bones","map"];class ufe{constructor(e,n,r){const i=r||Qt.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_,o=r.length;i!==o;++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 Qt{constructor(e,n,r){this.path=n,this.parsedPath=r||Qt.parseTrackName(n),this.node=Qt.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 Qt.Composite(e,n,r):new Qt(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(nfe,"")}static parseTrackName(e){const n=lfe.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 o=r.nodeName.substring(i+1);cfe.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}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(o){for(let s=0;s=o){const f=o++,h=e[f];n[h.uuid]=u,e[u]=h,n[c]=f,e[f]=l;for(let m=0,v=i;m!==v;++m){const x=r[m],y=x[f],g=x[u];x[u]=y,x[f]=g}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,s=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 v=0,x=i;v!==x;++v){const y=r[v];y[f]=y[h],y.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);i=o.length,r[e]=i,s.push(e),a.push(n),o.push(f);for(let h=u,m=l.length;h!==m;++h){const v=l[h];f[h]=new Qt(v,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];n[c]=r,s[r]=l,s.pop(),o[r]=o[a],o.pop(),i[r]=i[a],i.pop()}}}class jB{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,s=o.length,a=new Array(s),l={endingStart:Nc,endingEnd:Nc};for(let c=0;c!==s;++c){const u=o[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bU,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,o=e._clip.duration,s=o/i,a=i/o;e.warp(1,s,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,o=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+r,c[0]=e/s,c[1]=n/s,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 o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const s=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case YR:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),c[u].accumulateAdditive(a);break;case i_:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),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,o=this._loopCount;const s=r===_U;if(e===0)return o===-1?i:s&&(o&1)===1?n-i:i;if(r===xU){o===-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(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,o+=Math.abs(a);const l=this.repetitions-o;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,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(s&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Ic,i.endingEnd=Ic):(e?i.endingStart=this.zeroSlopeAtStart?Ic:Nc:i.endingStart=Sm,n?i.endingEnd=this.zeroSlopeAtEnd?Ic:Nc:i.endingEnd=Sm)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let s=this._weightInterpolant;s===null&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=n,a[1]=o+e,l[1]=r,this}}const dfe=new Float32Array(1);class hfe extends Xs{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,o=i.length,s=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!==o;++f){const h=i[f],m=h.name;let v=u[m];if(v!==void 0)++v.referenceCount,s[f]=v;else{if(v=s[f],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;v=new BB(Qt.create(r,m,x),h.ValueTypeName,h.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),s[f]=v}a[f].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.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 o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const 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,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,o,s);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);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,rk).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 ik=new G,Gv=new G;class _fe{constructor(e=new G,n=new G){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){ik.subVectors(e,this.start),Gv.subVectors(this.end,this.start);const r=Gv.dot(Gv);let o=Gv.dot(ik)/r;return n&&(o=$n(o,0,1)),o}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 ok=new G;class wfe extends tn{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new zt,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 s=0,a=1,l=32;s1)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{uk.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(uk,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 Ofe extends qs{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 zt;i.setAttribute("position",new pt(n,3)),i.setAttribute("color",new pt(r,3));const o=new mi({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new ot,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Dfe{constructor(){this.type="ShapePath",this.color=new ot,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Pm,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,o,s){return this.currentPath.bezierCurveTo(e,n,r,i,o,s),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(M<0&&(T=b[N],U=-U,L=b[P],M=-M),g.yL.y)continue;if(g.y===T.y){if(g.x===T.x)return!0}else{const R=M*(g.x-T.x)-U*(g.y-T.y);if(R===0)return!0;if(R<0)continue;S=!S}}else{if(g.y!==T.y)continue;if(L.x<=g.x&&g.x<=T.x||T.x<=g.x&&g.x<=L.x)return!0}}return S}const i=Ds.isClockWise,o=this.subPaths;if(o.length===0)return[];let s,a,l;const c=[];if(o.length===1)return a=o[0],l=new Hc,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const f=[],h=[];let m=[],v=0,x;h[v]=void 0,m[v]=[];for(let g=0,b=o.length;g1){let g=!1,b=0;for(let _=0,S=h.length;_0&&g===!1&&(m=f)}let y;for(let g=0,b=h.length;g=0&&(S[Me]=null,_[Me].disconnect(ge))}for(let ae=0;ae=S.length){S.push(ge),Me=He;break}else if(S[He]===null){S[He]=ge,Me=He;break}if(Me===-1)break}const tt=_[Me];tt&&tt.connect(ge)}}const H=new G,Z=new G;function F(Q,ae,ge){H.setFromMatrixPosition(ae.matrixWorld),Z.setFromMatrixPosition(ge.matrixWorld);const Me=H.distanceTo(Z),tt=ae.projectionMatrix.elements,He=ge.projectionMatrix.elements,rt=tt[14]/(tt[10]-1),Ve=tt[14]/(tt[10]+1),se=(tt[9]+1)/tt[5],j=(tt[9]-1)/tt[5],ye=(tt[8]-1)/tt[0],xe=(He[8]+1)/He[0],Re=rt*ye,Pe=rt*xe,Ee=Me/(-ye+xe),De=Ee*-ye;if(ae.matrixWorld.decompose(Q.position,Q.quaternion,Q.scale),Q.translateX(De),Q.translateZ(Ee),Q.matrixWorld.compose(Q.position,Q.quaternion,Q.scale),Q.matrixWorldInverse.copy(Q.matrixWorld).invert(),tt[10]===-1)Q.projectionMatrix.copy(ae.projectionMatrix),Q.projectionMatrixInverse.copy(ae.projectionMatrixInverse);else{const $=rt+Ee,z=Ve+Ee,re=Re-De,he=Pe+(Me-De),pe=se*Ve/z*$,be=j*Ve/z*$;Q.projectionMatrix.makePerspective(re,he,pe,be,$,z),Q.projectionMatrixInverse.copy(Q.projectionMatrix).invert()}}function Y(Q,ae){ae===null?Q.matrixWorld.copy(Q.matrix):Q.matrixWorld.multiplyMatrices(ae.matrixWorld,Q.matrix),Q.matrixWorldInverse.copy(Q.matrixWorld).invert()}this.updateCamera=function(Q){if(i===null)return;let ae=Q.near,ge=Q.far;x.texture!==null&&(x.depthNear>0&&(ae=x.depthNear),x.depthFar>0&&(ge=x.depthFar)),M.near=L.near=T.near=ae,M.far=L.far=T.far=ge,(R!==M.near||D!==M.far)&&(i.updateRenderState({depthNear:M.near,depthFar:M.far}),R=M.near,D=M.far);const Me=Q.parent,tt=M.cameras;Y(M,Me);for(let He=0;He0&&(y.alphaTest.value=g.alphaTest);const b=e.get(g),_=b.envMap,S=b.envMapRotation;_&&(y.envMap.value=_,lc.copy(S),lc.x*=-1,lc.y*=-1,lc.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(lc.y*=-1,lc.z*=-1),y.envMapRotation.value.setFromMatrix4($ue.makeRotationFromEuler(lc)),y.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=g.reflectivity,y.ior.value=g.ior,y.refractionRatio.value=g.refractionRatio),g.lightMap&&(y.lightMap.value=g.lightMap,y.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,y.lightMapTransform)),g.aoMap&&(y.aoMap.value=g.aoMap,y.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,y.aoMapTransform))}function s(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform))}function a(y,g){y.dashSize.value=g.dashSize,y.totalSize.value=g.dashSize+g.gapSize,y.scale.value=g.scale}function l(y,g,b,_){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.size.value=g.size*b,y.scale.value=_*.5,g.map&&(y.map.value=g.map,n(g.map,y.uvTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function c(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.rotation.value=g.rotation,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function u(y,g){y.specular.value.copy(g.specular),y.shininess.value=Math.max(g.shininess,1e-4)}function f(y,g){g.gradientMap&&(y.gradientMap.value=g.gradientMap)}function h(y,g){y.metalness.value=g.metalness,g.metalnessMap&&(y.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,y.metalnessMapTransform)),y.roughness.value=g.roughness,g.roughnessMap&&(y.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,y.roughnessMapTransform)),g.envMap&&(y.envMapIntensity.value=g.envMapIntensity)}function m(y,g,b){y.ior.value=g.ior,g.sheen>0&&(y.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),y.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(y.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,y.sheenColorMapTransform)),g.sheenRoughnessMap&&(y.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,y.sheenRoughnessMapTransform))),g.clearcoat>0&&(y.clearcoat.value=g.clearcoat,y.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(y.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,y.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(y.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===fi&&y.clearcoatNormalScale.value.negate())),g.dispersion>0&&(y.dispersion.value=g.dispersion),g.iridescence>0&&(y.iridescence.value=g.iridescence,y.iridescenceIOR.value=g.iridescenceIOR,y.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(y.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,y.iridescenceMapTransform)),g.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),g.transmission>0&&(y.transmission.value=g.transmission,y.transmissionSamplerMap.value=b.texture,y.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(y.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,y.transmissionMapTransform)),y.thickness.value=g.thickness,g.thicknessMap&&(y.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=g.attenuationDistance,y.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(y.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(y.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=g.specularIntensity,y.specularColor.value.copy(g.specularColor),g.specularColorMap&&(y.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,y.specularColorMapTransform)),g.specularIntensityMap&&(y.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,y.specularIntensityMapTransform))}function v(y,g){g.matcap&&(y.matcap.value=g.matcap)}function x(y,g){const b=e.get(g).light;y.referencePosition.value.setFromMatrixPosition(b.matrixWorld),y.nearDistance.value=b.shadow.camera.near,y.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function Hue(t,e,n,r){let i={},o={},s=[];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&&(v(b),S=u(b),i[b.id]=S,b.addEventListener("dispose",y));const P=_.program;r.updateUBOMapping(b,P);const N=e.render.frame;o[b.id]!==N&&(h(b),o[b.id]=N)}function u(b){const _=f();b.__bindingPointIndex=_;const S=t.createBuffer(),P=b.__size,N=b.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,P,N),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,S),S}function f(){for(let b=0;b0&&(S+=P-N),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 y(b){const _=b.target;_.removeEventListener("dispose",y);const S=s.indexOf(_.__bindingPointIndex);s.splice(S,1),t.deleteBuffer(i[_.id]),delete i[_.id],delete o[_.id]}function g(){for(const b in i)t.deleteBuffer(i[b]);s=[],i={},o={}}return{bind:l,update:c,dispose:g}}class aB{constructor(e={}){const{canvas:n=GU(),context:r=null,depth:i=!0,stencil:o=!1,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let h;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=r.getContextAttributes().alpha}else h=s;const m=new Uint32Array(4),v=new Int32Array(4);let x=null,y=null;const g=[],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=Eo,this.toneMapping=Os,this.toneMappingExposure=1;const _=this;let S=!1,P=0,N=0,T=null,L=-1,U=null;const M=new Zt,R=new Zt;let D=null;const O=new ot(0);let B=0,X=n.width,H=n.height,Z=1,F=null,Y=null;const K=new Zt(0,0,X,H),ee=new Zt(0,0,X,H);let me=!1;const le=new vg;let Q=!1,ae=!1;const ge=new wt,Me=new wt,tt=new G,He=new Zt,rt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ve=!1;function se(){return T===null?Z:1}let j=r;function ye(V,ne){return n.getContext(V,ne)}try{const V={alpha:!0,depth:i,stencil:o,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${e_}`),n.addEventListener("webglcontextlost",Te,!1),n.addEventListener("webglcontextrestored",Ke,!1),n.addEventListener("webglcontextcreationerror",Ye,!1),j===null){const ne="webgl2";if(j=ye(ne,V),j===null)throw ye(ne)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(V){throw console.error("THREE.WebGLRenderer: "+V.message),V}let xe,Re,Pe,Ee,De,$,z,re,he,pe,be,Ge,Fe,Ne,ze,Le,Xe,xt,Oe,Ue,Ae,ke,dt,J;function je(){xe=new Zle(j),xe.init(),ke=new oB(j,xe),Re=new Hle(j,xe,e,ke),Pe=new Nue(j),Re.reverseDepthBuffer&&Pe.buffers.depth.setReversed(!0),Ee=new ece(j),De=new yue,$=new Fue(j,xe,Pe,De,Re,ke,Ee),z=new Xle(_),re=new Kle(_),he=new ase(j),dt=new $le(j,he),pe=new Jle(j,he,Ee,dt),be=new nce(j,pe,he,Ee),Oe=new tce(j,Re,$),Le=new Gle(De),Ge=new vue(_,z,re,xe,Re,dt,Le),Fe=new Wue(_,De),Ne=new bue,ze=new Cue(xe),xt=new Vle(_,z,re,Pe,be,h,l),Xe=new Aue(_,be,Re),J=new Hue(j,Ee,Re,Pe),Ue=new Wle(j,xe,Ee),Ae=new Qle(j,xe,Ee),Ee.programs=Ge.programs,_.capabilities=Re,_.extensions=xe,_.properties=De,_.renderLists=Ne,_.shadowMap=Xe,_.state=Pe,_.info=Ee}je();const fe=new Vue(_,j);this.xr=fe,this.getContext=function(){return j},this.getContextAttributes=function(){return j.getContextAttributes()},this.forceContextLoss=function(){const V=xe.get("WEBGL_lose_context");V&&V.loseContext()},this.forceContextRestore=function(){const V=xe.get("WEBGL_lose_context");V&&V.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(V){V!==void 0&&(Z=V,this.setSize(X,H,!1))},this.getSize=function(V){return V.set(X,H)},this.setSize=function(V,ne,ue=!0){if(fe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=V,H=ne,n.width=Math.floor(V*Z),n.height=Math.floor(ne*Z),ue===!0&&(n.style.width=V+"px",n.style.height=ne+"px"),this.setViewport(0,0,V,ne)},this.getDrawingBufferSize=function(V){return V.set(X*Z,H*Z).floor()},this.setDrawingBufferSize=function(V,ne,ue){X=V,H=ne,Z=ue,n.width=Math.floor(V*ue),n.height=Math.floor(ne*ue),this.setViewport(0,0,V,ne)},this.getCurrentViewport=function(V){return V.copy(M)},this.getViewport=function(V){return V.copy(K)},this.setViewport=function(V,ne,ue,de){V.isVector4?K.set(V.x,V.y,V.z,V.w):K.set(V,ne,ue,de),Pe.viewport(M.copy(K).multiplyScalar(Z).round())},this.getScissor=function(V){return V.copy(ee)},this.setScissor=function(V,ne,ue,de){V.isVector4?ee.set(V.x,V.y,V.z,V.w):ee.set(V,ne,ue,de),Pe.scissor(R.copy(ee).multiplyScalar(Z).round())},this.getScissorTest=function(){return me},this.setScissorTest=function(V){Pe.setScissorTest(me=V)},this.setOpaqueSort=function(V){F=V},this.setTransparentSort=function(V){Y=V},this.getClearColor=function(V){return V.copy(xt.getClearColor())},this.setClearColor=function(){xt.setClearColor.apply(xt,arguments)},this.getClearAlpha=function(){return xt.getClearAlpha()},this.setClearAlpha=function(){xt.setClearAlpha.apply(xt,arguments)},this.clear=function(V=!0,ne=!0,ue=!0){let de=0;if(V){let oe=!1;if(T!==null){const We=T.texture.format;oe=We===s_||We===o_||We===hg}if(oe){const We=T.texture.type,it=We===Fi||We===Ia||We===Md||We===au||We===r_||We===i_,lt=xt.getClearColor(),ct=xt.getClearAlpha(),St=lt.r,Et=lt.g,mt=lt.b;it?(m[0]=St,m[1]=Et,m[2]=mt,m[3]=ct,j.clearBufferuiv(j.COLOR,0,m)):(v[0]=St,v[1]=Et,v[2]=mt,v[3]=ct,j.clearBufferiv(j.COLOR,0,v))}else de|=j.COLOR_BUFFER_BIT}ne&&(de|=j.DEPTH_BUFFER_BIT,j.clearDepth(this.capabilities.reverseDepthBuffer?0:1)),ue&&(de|=j.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),j.clear(de)},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",Te,!1),n.removeEventListener("webglcontextrestored",Ke,!1),n.removeEventListener("webglcontextcreationerror",Ye,!1),Ne.dispose(),ze.dispose(),De.dispose(),z.dispose(),re.dispose(),be.dispose(),dt.dispose(),J.dispose(),Ge.dispose(),fe.dispose(),fe.removeEventListener("sessionstart",kg),fe.removeEventListener("sessionend",Og),Ks.stop()};function Te(V){V.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),S=!0}function Ke(){console.log("THREE.WebGLRenderer: Context Restored."),S=!1;const V=Ee.autoReset,ne=Xe.enabled,ue=Xe.autoUpdate,de=Xe.needsUpdate,oe=Xe.type;je(),Ee.autoReset=V,Xe.enabled=ne,Xe.autoUpdate=ue,Xe.needsUpdate=de,Xe.type=oe}function Ye(V){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",V.statusMessage)}function Bt(V){const ne=V.target;ne.removeEventListener("dispose",Bt),An(ne)}function An(V){kr(V),De.remove(V)}function kr(V){const ne=De.get(V).programs;ne!==void 0&&(ne.forEach(function(ue){Ge.releaseProgram(ue)}),V.isShaderMaterial&&Ge.releaseShaderCache(V))}this.renderBufferDirect=function(V,ne,ue,de,oe,We){ne===null&&(ne=rt);const it=oe.isMesh&&oe.matrixWorld.determinant()<0,lt=tw(V,ne,ue,de,oe);Pe.setMaterial(de,it);let ct=ue.index,St=1;if(de.wireframe===!0){if(ct=pe.getWireframeAttribute(ue),ct===void 0)return;St=2}const Et=ue.drawRange,mt=ue.attributes.position;let Jt=Et.start*St,nn=(Et.start+Et.count)*St;We!==null&&(Jt=Math.max(Jt,We.start*St),nn=Math.min(nn,(We.start+We.count)*St)),ct!==null?(Jt=Math.max(Jt,0),nn=Math.min(nn,ct.count)):mt!=null&&(Jt=Math.max(Jt,0),nn=Math.min(nn,mt.count));const ln=nn-Jt;if(ln<0||ln===1/0)return;dt.setup(oe,de,lt,ue,ct);let $t,vt=Ue;if(ct!==null&&($t=he.get(ct),vt=Ae,vt.setIndex($t)),oe.isMesh)de.wireframe===!0?(Pe.setLineWidth(de.wireframeLinewidth*se()),vt.setMode(j.LINES)):vt.setMode(j.TRIANGLES);else if(oe.isLine){let ft=de.linewidth;ft===void 0&&(ft=1),Pe.setLineWidth(ft*se()),oe.isLineSegments?vt.setMode(j.LINES):oe.isLineLoop?vt.setMode(j.LINE_LOOP):vt.setMode(j.LINE_STRIP)}else oe.isPoints?vt.setMode(j.POINTS):oe.isSprite&&vt.setMode(j.TRIANGLES);if(oe.isBatchedMesh)if(oe._multiDrawInstances!==null)vt.renderMultiDrawInstances(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount,oe._multiDrawInstances);else if(xe.get("WEBGL_multi_draw"))vt.renderMultiDraw(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount);else{const ft=oe._multiDrawStarts,Kt=oe._multiDrawCounts,Pt=oe._multiDrawCount,rr=ct?he.get(ct).bytesPerElement:1,Ui=De.get(de).currentProgram.getUniforms();for(let gn=0;gn{function We(){if(de.forEach(function(it){De.get(it).currentProgram.isReady()&&de.delete(it)}),de.size===0){oe(V);return}setTimeout(We,10)}xe.get("KHR_parallel_shader_compile")!==null?We():setTimeout(We,10)})};let Mr=null;function co(V){Mr&&Mr(V)}function kg(){Ks.stop()}function Og(){Ks.start()}const Ks=new eB;Ks.setAnimationLoop(co),typeof self<"u"&&Ks.setContext(self),this.setAnimationLoop=function(V){Mr=V,fe.setAnimationLoop(V),V===null?Ks.stop():Ks.start()},fe.addEventListener("sessionstart",kg),fe.addEventListener("sessionend",Og),this.render=function(V,ne){if(ne!==void 0&&ne.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;if(V.matrixWorldAutoUpdate===!0&&V.updateMatrixWorld(),ne.parent===null&&ne.matrixWorldAutoUpdate===!0&&ne.updateMatrixWorld(),fe.enabled===!0&&fe.isPresenting===!0&&(fe.cameraAutoUpdate===!0&&fe.updateCamera(ne),ne=fe.getCamera()),V.isScene===!0&&V.onBeforeRender(_,V,ne,T),y=ze.get(V,b.length),y.init(ne),b.push(y),Me.multiplyMatrices(ne.projectionMatrix,ne.matrixWorldInverse),le.setFromProjectionMatrix(Me),ae=this.localClippingEnabled,Q=Le.init(this.clippingPlanes,ae),x=Ne.get(V,g.length),x.init(),g.push(x),fe.enabled===!0&&fe.isPresenting===!0){const We=_.xr.getDepthSensingMesh();We!==null&&Ru(We,ne,-1/0,_.sortObjects)}Ru(V,ne,0,_.sortObjects),x.finish(),_.sortObjects===!0&&x.sort(F,Y),Ve=fe.enabled===!1||fe.isPresenting===!1||fe.hasDepthSensing()===!1,Ve&&xt.addToRenderList(x,V),this.info.render.frame++,Q===!0&&Le.beginShadows();const ue=y.state.shadowsArray;Xe.render(ue,V,ne),Q===!0&&Le.endShadows(),this.info.autoReset===!0&&this.info.reset();const de=x.opaque,oe=x.transmissive;if(y.setupLights(),ne.isArrayCamera){const We=ne.cameras;if(oe.length>0)for(let it=0,lt=We.length;it0&&Dg(de,oe,V,ne),Ve&&xt.render(V),Au(x,V,ne);T!==null&&($.updateMultisampleRenderTarget(T),$.updateRenderTargetMipmap(T)),V.isScene===!0&&V.onAfterRender(_,V,ne),dt.resetDefaultState(),L=-1,U=null,b.pop(),b.length>0?(y=b[b.length-1],Q===!0&&Le.setGlobalState(_.clippingPlanes,y.state.camera)):y=null,g.pop(),g.length>0?x=g[g.length-1]:x=null};function Ru(V,ne,ue,de){if(V.visible===!1)return;if(V.layers.test(ne.layers)){if(V.isGroup)ue=V.renderOrder;else if(V.isLOD)V.autoUpdate===!0&&V.update(ne);else if(V.isLight)y.pushLight(V),V.castShadow&&y.pushShadow(V);else if(V.isSprite){if(!V.frustumCulled||le.intersectsSprite(V)){de&&He.setFromMatrixPosition(V.matrixWorld).applyMatrix4(Me);const it=be.update(V),lt=V.material;lt.visible&&x.push(V,it,lt,ue,He.z,null)}}else if((V.isMesh||V.isLine||V.isPoints)&&(!V.frustumCulled||le.intersectsObject(V))){const it=be.update(V),lt=V.material;if(de&&(V.boundingSphere!==void 0?(V.boundingSphere===null&&V.computeBoundingSphere(),He.copy(V.boundingSphere.center)):(it.boundingSphere===null&&it.computeBoundingSphere(),He.copy(it.boundingSphere.center)),He.applyMatrix4(V.matrixWorld).applyMatrix4(Me)),Array.isArray(lt)){const ct=it.groups;for(let St=0,Et=ct.length;St0&&hs(oe,ne,ue),We.length>0&&hs(We,ne,ue),it.length>0&&hs(it,ne,ue),Pe.buffers.depth.setTest(!0),Pe.buffers.depth.setMask(!0),Pe.buffers.color.setMask(!0),Pe.setPolygonOffset(!1)}function Dg(V,ne,ue,de){if((ue.isScene===!0?ue.overrideMaterial:null)!==null)return;y.state.transmissionRenderTarget[de.id]===void 0&&(y.state.transmissionRenderTarget[de.id]=new os(1,1,{generateMipmaps:!0,type:xe.has("EXT_color_buffer_half_float")||xe.has("EXT_color_buffer_float")?_u:Fi,minFilter:Rs,samples:4,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:an.workingColorSpace}));const We=y.state.transmissionRenderTarget[de.id],it=de.viewport||M;We.setSize(it.z,it.w);const lt=_.getRenderTarget();_.setRenderTarget(We),_.getClearColor(O),B=_.getClearAlpha(),B<1&&_.setClearColor(16777215,.5),_.clear(),Ve&&xt.render(ue);const ct=_.toneMapping;_.toneMapping=Os;const St=de.viewport;if(de.viewport!==void 0&&(de.viewport=void 0),y.setupLightsView(de),Q===!0&&Le.setGlobalState(_.clippingPlanes,de),hs(V,ue,de),$.updateMultisampleRenderTarget(We),$.updateRenderTargetMipmap(We),xe.has("WEBGL_multisampled_render_to_texture")===!1){let Et=!1;for(let mt=0,Jt=ne.length;mt0),mt=!!ue.morphAttributes.position,Jt=!!ue.morphAttributes.normal,nn=!!ue.morphAttributes.color;let ln=Os;de.toneMapped&&(T===null||T.isXRRenderTarget===!0)&&(ln=_.toneMapping);const $t=ue.morphAttributes.position||ue.morphAttributes.normal||ue.morphAttributes.color,vt=$t!==void 0?$t.length:0,ft=De.get(de),Kt=y.state.lights;if(Q===!0&&(ae===!0||V!==U)){const Kr=V===U&&de.id===L;Le.setState(de,V,Kr)}let Pt=!1;de.version===ft.__version?(ft.needsLights&&ft.lightsStateVersion!==Kt.state.version||ft.outputColorSpace!==lt||oe.isBatchedMesh&&ft.batching===!1||!oe.isBatchedMesh&&ft.batching===!0||oe.isBatchedMesh&&ft.batchingColor===!0&&oe.colorTexture===null||oe.isBatchedMesh&&ft.batchingColor===!1&&oe.colorTexture!==null||oe.isInstancedMesh&&ft.instancing===!1||!oe.isInstancedMesh&&ft.instancing===!0||oe.isSkinnedMesh&&ft.skinning===!1||!oe.isSkinnedMesh&&ft.skinning===!0||oe.isInstancedMesh&&ft.instancingColor===!0&&oe.instanceColor===null||oe.isInstancedMesh&&ft.instancingColor===!1&&oe.instanceColor!==null||oe.isInstancedMesh&&ft.instancingMorph===!0&&oe.morphTexture===null||oe.isInstancedMesh&&ft.instancingMorph===!1&&oe.morphTexture!==null||ft.envMap!==ct||de.fog===!0&&ft.fog!==We||ft.numClippingPlanes!==void 0&&(ft.numClippingPlanes!==Le.numPlanes||ft.numIntersection!==Le.numIntersection)||ft.vertexAlphas!==St||ft.vertexTangents!==Et||ft.morphTargets!==mt||ft.morphNormals!==Jt||ft.morphColors!==nn||ft.toneMapping!==ln||ft.morphTargetsCount!==vt)&&(Pt=!0):(Pt=!0,ft.__version=de.version);let rr=ft.currentProgram;Pt===!0&&(rr=Pu(de,ne,oe));let Ui=!1,gn=!1,Ua=!1;const Mn=rr.getUniforms(),Uo=ft.uniforms;if(Pe.useProgram(rr.program)&&(Ui=!0,gn=!0,Ua=!0),de.id!==L&&(L=de.id,gn=!0),Ui||U!==V){Re.reverseDepthBuffer?(ge.copy(V.projectionMatrix),Noe(ge),Ioe(ge),Mn.setValue(j,"projectionMatrix",ge)):Mn.setValue(j,"projectionMatrix",V.projectionMatrix),Mn.setValue(j,"viewMatrix",V.matrixWorldInverse);const Kr=Mn.map.cameraPosition;Kr!==void 0&&Kr.setValue(j,tt.setFromMatrixPosition(V.matrixWorld)),Re.logarithmicDepthBuffer&&Mn.setValue(j,"logDepthBufFC",2/(Math.log(V.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&Mn.setValue(j,"isOrthographic",V.isOrthographicCamera===!0),U!==V&&(U=V,gn=!0,Ua=!0)}if(oe.isSkinnedMesh){Mn.setOptional(j,oe,"bindMatrix"),Mn.setOptional(j,oe,"bindMatrixInverse");const Kr=oe.skeleton;Kr&&(Kr.boneTexture===null&&Kr.computeBoneTexture(),Mn.setValue(j,"boneTexture",Kr.boneTexture,$))}oe.isBatchedMesh&&(Mn.setOptional(j,oe,"batchingTexture"),Mn.setValue(j,"batchingTexture",oe._matricesTexture,$),Mn.setOptional(j,oe,"batchingIdTexture"),Mn.setValue(j,"batchingIdTexture",oe._indirectTexture,$),Mn.setOptional(j,oe,"batchingColorTexture"),oe._colorsTexture!==null&&Mn.setValue(j,"batchingColorTexture",oe._colorsTexture,$));const Ba=ue.morphAttributes;if((Ba.position!==void 0||Ba.normal!==void 0||Ba.color!==void 0)&&Oe.update(oe,ue,rr),(gn||ft.receiveShadow!==oe.receiveShadow)&&(ft.receiveShadow=oe.receiveShadow,Mn.setValue(j,"receiveShadow",oe.receiveShadow)),de.isMeshGouraudMaterial&&de.envMap!==null&&(Uo.envMap.value=ct,Uo.flipEnvMap.value=ct.isCubeTexture&&ct.isRenderTargetTexture===!1?-1:1),de.isMeshStandardMaterial&&de.envMap===null&&ne.environment!==null&&(Uo.envMapIntensity.value=ne.environmentIntensity),gn&&(Mn.setValue(j,"toneMappingExposure",_.toneMappingExposure),ft.needsLights&&nw(Uo,Ua),We&&de.fog===!0&&Fe.refreshFogUniforms(Uo,We),Fe.refreshMaterialUniforms(Uo,de,Z,H,y.state.transmissionRenderTarget[V.id]),Uy.upload(j,zg(ft),Uo,$)),de.isShaderMaterial&&de.uniformsNeedUpdate===!0&&(Uy.upload(j,zg(ft),Uo,$),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&Mn.setValue(j,"center",oe.center),Mn.setValue(j,"modelViewMatrix",oe.modelViewMatrix),Mn.setValue(j,"normalMatrix",oe.normalMatrix),Mn.setValue(j,"modelMatrix",oe.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const Kr=de.uniformsGroups;for(let Zr=0,iw=Kr.length;Zr0&&$.useMultisampledRTT(V)===!1?oe=De.get(V).__webglMultisampledFramebuffer:Array.isArray(Et)?oe=Et[ue]:oe=Et,M.copy(V.viewport),R.copy(V.scissor),D=V.scissorTest}else M.copy(K).multiplyScalar(Z).floor(),R.copy(ee).multiplyScalar(Z).floor(),D=me;if(Pe.bindFramebuffer(j.FRAMEBUFFER,oe)&&de&&Pe.drawBuffers(V,oe),Pe.viewport(M),Pe.scissor(R),Pe.setScissorTest(D),We){const ct=De.get(V.texture);j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_CUBE_MAP_POSITIVE_X+ne,ct.__webglTexture,ue)}else if(it){const ct=De.get(V.texture),St=ne||0;j.framebufferTextureLayer(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,ct.__webglTexture,ue||0,St)}L=-1},this.readRenderTargetPixels=function(V,ne,ue,de,oe,We,it){if(!(V&&V.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let lt=De.get(V).__webglFramebuffer;if(V.isWebGLCubeRenderTarget&&it!==void 0&&(lt=lt[it]),lt){Pe.bindFramebuffer(j.FRAMEBUFFER,lt);try{const ct=V.texture,St=ct.format,Et=ct.type;if(!Re.textureFormatReadable(St)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Re.textureTypeReadable(Et)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ne>=0&&ne<=V.width-de&&ue>=0&&ue<=V.height-oe&&j.readPixels(ne,ue,de,oe,ke.convert(St),ke.convert(Et),We)}finally{const ct=T!==null?De.get(T).__webglFramebuffer:null;Pe.bindFramebuffer(j.FRAMEBUFFER,ct)}}},this.readRenderTargetPixelsAsync=async function(V,ne,ue,de,oe,We,it){if(!(V&&V.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let lt=De.get(V).__webglFramebuffer;if(V.isWebGLCubeRenderTarget&&it!==void 0&&(lt=lt[it]),lt){const ct=V.texture,St=ct.format,Et=ct.type;if(!Re.textureFormatReadable(St))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Re.textureTypeReadable(Et))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(ne>=0&&ne<=V.width-de&&ue>=0&&ue<=V.height-oe){Pe.bindFramebuffer(j.FRAMEBUFFER,lt);const mt=j.createBuffer();j.bindBuffer(j.PIXEL_PACK_BUFFER,mt),j.bufferData(j.PIXEL_PACK_BUFFER,We.byteLength,j.STREAM_READ),j.readPixels(ne,ue,de,oe,ke.convert(St),ke.convert(Et),0);const Jt=T!==null?De.get(T).__webglFramebuffer:null;Pe.bindFramebuffer(j.FRAMEBUFFER,Jt);const nn=j.fenceSync(j.SYNC_GPU_COMMANDS_COMPLETE,0);return j.flush(),await Poe(j,nn,4),j.bindBuffer(j.PIXEL_PACK_BUFFER,mt),j.getBufferSubData(j.PIXEL_PACK_BUFFER,0,We),j.deleteBuffer(mt),j.deleteSync(nn),We}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(V,ne=null,ue=0){V.isTexture!==!0&&(zy("WebGLRenderer: copyFramebufferToTexture function signature has changed."),ne=arguments[0]||null,V=arguments[1]);const de=Math.pow(2,-ue),oe=Math.floor(V.image.width*de),We=Math.floor(V.image.height*de),it=ne!==null?ne.x:0,lt=ne!==null?ne.y:0;$.setTexture2D(V,0),j.copyTexSubImage2D(j.TEXTURE_2D,ue,0,0,it,lt,oe,We),Pe.unbindTexture()},this.copyTextureToTexture=function(V,ne,ue=null,de=null,oe=0){V.isTexture!==!0&&(zy("WebGLRenderer: copyTextureToTexture function signature has changed."),de=arguments[0]||null,V=arguments[1],ne=arguments[2],oe=arguments[3]||0,ue=null);let We,it,lt,ct,St,Et;ue!==null?(We=ue.max.x-ue.min.x,it=ue.max.y-ue.min.y,lt=ue.min.x,ct=ue.min.y):(We=V.image.width,it=V.image.height,lt=0,ct=0),de!==null?(St=de.x,Et=de.y):(St=0,Et=0);const mt=ke.convert(ne.format),Jt=ke.convert(ne.type);$.setTexture2D(ne,0),j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ne.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ne.unpackAlignment);const nn=j.getParameter(j.UNPACK_ROW_LENGTH),ln=j.getParameter(j.UNPACK_IMAGE_HEIGHT),$t=j.getParameter(j.UNPACK_SKIP_PIXELS),vt=j.getParameter(j.UNPACK_SKIP_ROWS),ft=j.getParameter(j.UNPACK_SKIP_IMAGES),Kt=V.isCompressedTexture?V.mipmaps[oe]:V.image;j.pixelStorei(j.UNPACK_ROW_LENGTH,Kt.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Kt.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,lt),j.pixelStorei(j.UNPACK_SKIP_ROWS,ct),V.isDataTexture?j.texSubImage2D(j.TEXTURE_2D,oe,St,Et,We,it,mt,Jt,Kt.data):V.isCompressedTexture?j.compressedTexSubImage2D(j.TEXTURE_2D,oe,St,Et,Kt.width,Kt.height,mt,Kt.data):j.texSubImage2D(j.TEXTURE_2D,oe,St,Et,We,it,mt,Jt,Kt),j.pixelStorei(j.UNPACK_ROW_LENGTH,nn),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,ln),j.pixelStorei(j.UNPACK_SKIP_PIXELS,$t),j.pixelStorei(j.UNPACK_SKIP_ROWS,vt),j.pixelStorei(j.UNPACK_SKIP_IMAGES,ft),oe===0&&ne.generateMipmaps&&j.generateMipmap(j.TEXTURE_2D),Pe.unbindTexture()},this.copyTextureToTexture3D=function(V,ne,ue=null,de=null,oe=0){V.isTexture!==!0&&(zy("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ue=arguments[0]||null,de=arguments[1]||null,V=arguments[2],ne=arguments[3],oe=arguments[4]||0);let We,it,lt,ct,St,Et,mt,Jt,nn;const ln=V.isCompressedTexture?V.mipmaps[oe]:V.image;ue!==null?(We=ue.max.x-ue.min.x,it=ue.max.y-ue.min.y,lt=ue.max.z-ue.min.z,ct=ue.min.x,St=ue.min.y,Et=ue.min.z):(We=ln.width,it=ln.height,lt=ln.depth,ct=0,St=0,Et=0),de!==null?(mt=de.x,Jt=de.y,nn=de.z):(mt=0,Jt=0,nn=0);const $t=ke.convert(ne.format),vt=ke.convert(ne.type);let ft;if(ne.isData3DTexture)$.setTexture3D(ne,0),ft=j.TEXTURE_3D;else if(ne.isDataArrayTexture||ne.isCompressedArrayTexture)$.setTexture2DArray(ne,0),ft=j.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ne.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ne.unpackAlignment);const Kt=j.getParameter(j.UNPACK_ROW_LENGTH),Pt=j.getParameter(j.UNPACK_IMAGE_HEIGHT),rr=j.getParameter(j.UNPACK_SKIP_PIXELS),Ui=j.getParameter(j.UNPACK_SKIP_ROWS),gn=j.getParameter(j.UNPACK_SKIP_IMAGES);j.pixelStorei(j.UNPACK_ROW_LENGTH,ln.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,ln.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,ct),j.pixelStorei(j.UNPACK_SKIP_ROWS,St),j.pixelStorei(j.UNPACK_SKIP_IMAGES,Et),V.isDataTexture||V.isData3DTexture?j.texSubImage3D(ft,oe,mt,Jt,nn,We,it,lt,$t,vt,ln.data):ne.isCompressedArrayTexture?j.compressedTexSubImage3D(ft,oe,mt,Jt,nn,We,it,lt,$t,ln.data):j.texSubImage3D(ft,oe,mt,Jt,nn,We,it,lt,$t,vt,ln),j.pixelStorei(j.UNPACK_ROW_LENGTH,Kt),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Pt),j.pixelStorei(j.UNPACK_SKIP_PIXELS,rr),j.pixelStorei(j.UNPACK_SKIP_ROWS,Ui),j.pixelStorei(j.UNPACK_SKIP_IMAGES,gn),oe===0&&ne.generateMipmaps&&j.generateMipmap(ft),Pe.unbindTexture()},this.initRenderTarget=function(V){De.get(V).__webglFramebuffer===void 0&&$.setupRenderTarget(V)},this.initTexture=function(V){V.isCubeTexture?$.setTextureCube(V,0):V.isData3DTexture?$.setTexture3D(V,0):V.isDataArrayTexture||V.isCompressedArrayTexture?$.setTexture2DArray(V,0):$.setTexture2D(V,0),Pe.unbindTexture()},this.resetState=function(){P=0,N=0,T=null,Pe.reset(),dt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return As}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===l_?"display-p3":"srgb",n.unpackColorSpace=an.workingColorSpace===pg?"display-p3":"srgb"}}class f_{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new ot(e),this.density=n}clone(){return new f_(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class d_{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 d_(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class gx extends tn{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 ro,this.environmentIntensity=1,this.environmentRotation=new ro,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 h_{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Am,this.updateRanges=[],this.version=0,this.uuid=eo()}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,o=this.stride;ie.far||n.push({distance:l,point:qh.clone(),uv:Mi.getInterpolation(qh,Tv,Kh,Rv,CL,FM,TL,new Ie),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 Av(t,e,n,r,i,o){pf.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(Yh.x=o*pf.x-i*pf.y,Yh.y=i*pf.x+o*pf.y):Yh.copy(pf),t.copy(e),t.x+=Yh.x,t.y+=Yh.y,t.applyMatrix4(lB)}const Pv=new G,RL=new G;class uB extends tn{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){Pv.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Pv);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){Pv.setFromMatrixPosition(e.matrixWorld),RL.setFromMatrixPosition(this.matrixWorld);const r=Pv.distanceTo(RL)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=s)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});const s=i[this.index];o.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=n,s.index=r}reset(){this.list.length=0,this.index=0}}const sl=new wt,BM=new wt,Jue=new wt,Que=new ot(1,1,1),FL=new wt,jM=new vg,Lv=new Pr,cc=new qr,Qh=new G,zL=new G,efe=new G,VM=new Zue,$r=new nr,kv=[];function tfe(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let o=0;o65535?new Uint32Array(i):new Uint16Array(i);n.setIndex(new hn(o,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(!e.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),o=n.getAttribute(r);if(i.itemSize!==o.itemSize||i.normalized!==o.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Pr);const e=this.boundingBox,n=this._drawInfo;e.makeEmpty();for(let r=0,i=n.length;r=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("BatchedMesh: Maximum item count reached.");const r={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(i=this._availableInstanceIds.pop(),this._drawInfo[i]=r):(i=this._drawInfo.length,this._drawInfo.push(r));const o=this._matricesTexture,s=o.image.data;Jue.toArray(s,i*16),o.needsUpdate=!0;const a=this._colorsTexture;return a&&(Que.toArray(a.image.data,i*4),a.needsUpdate=!0),i}addGeometry(e,n=-1,r=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._drawInfo.length>=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");const i={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let o=null;const s=this._reservedRanges,a=this._drawRanges,l=this._bounds;this._geometryCount!==0&&(o=s[s.length-1]),n===-1?i.vertexCount=e.getAttribute("position").count:i.vertexCount=n,o===null?i.vertexStart=0:i.vertexStart=o.vertexStart+o.vertexCount;const c=e.getIndex(),u=c!==null;if(u&&(r===-1?i.indexCount=c.count:i.indexCount=r,o===null?i.indexStart=0:i.indexStart=o.indexStart+o.indexCount),i.indexStart!==-1&&i.indexStart+i.indexCount>this._maxIndexCount||i.vertexStart+i.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const f=this._geometryCount;return this._geometryCount++,s.push(i),a.push({start:u?i.indexStart:i.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new Pr,sphereInitialized:!1,sphere:new qr}),this.setGeometryAt(f,e),f}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,o=r.getIndex(),s=n.getIndex(),a=this._reservedRanges[e];if(i&&s.count>a.indexCount||n.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.vertexCount;for(const m in r.attributes){const v=n.getAttribute(m),x=r.getAttribute(m);tfe(v,x,l);const y=v.itemSize;for(let g=v.count,b=c;g=n.length||n[e].active===!1?this:(n[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this)}getBoundingBoxAt(e,n){if(e>=this._geometryCount)return null;const r=this._bounds[e],i=r.box,o=this.geometry;if(r.boxInitialized===!1){i.makeEmpty();const s=o.index,a=o.attributes.position,l=this._drawRanges[e];for(let c=l.start,u=l.start+l.count;c=this._geometryCount)return null;const r=this._bounds[e],i=r.sphere,o=this.geometry;if(r.sphereInitialized===!1){i.makeEmpty(),this.getBoundingBoxAt(e,Lv),Lv.getCenter(i.center);const s=o.index,a=o.attributes.position,l=this._drawRanges[e];let c=0;for(let u=l.start,f=l.start+l.count;u=r.length||r[e].active===!1?this:(n.toArray(o,e*16),i.needsUpdate=!0,this)}getMatrixAt(e,n){const r=this._drawInfo,i=this._matricesTexture.image.data;return e>=r.length||r[e].active===!1?null:n.fromArray(i,e*16)}setColorAt(e,n){this._colorsTexture===null&&this._initColorsTexture();const r=this._colorsTexture,i=this._colorsTexture.image.data,o=this._drawInfo;return e>=o.length||o[e].active===!1?this:(n.toArray(i,e*4),r.needsUpdate=!0,this)}getColorAt(e,n){const r=this._colorsTexture.image.data,i=this._drawInfo;return e>=i.length||i[e].active===!1?null:n.fromArray(r,e*4)}setVisibleAt(e,n){const r=this._drawInfo;return e>=r.length||r[e].active===!1||r[e].visible===n?this:(r[e].visible=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._drawInfo;return e>=n.length||n[e].active===!1?!1:n[e].visible}setGeometryIdAt(e,n){const r=this._drawInfo;return e>=r.length||r[e].active===!1||n<0||n>=this._geometryCount?null:(r[e].geometryIndex=n,this)}getGeometryIdAt(e){const n=this._drawInfo;return e>=n.length||n[e].active===!1?-1:n[e].geometryIndex}getGeometryRangeAt(e,n={}){if(e<0||e>=this._geometryCount)return null;const r=this._drawRanges[e];return n.start=r.start,n.count=r.count,n}raycast(e,n){const r=this._drawInfo,i=this._drawRanges,o=this.matrixWorld,s=this.geometry;$r.material=this.material,$r.geometry.index=s.index,$r.geometry.attributes=s.attributes,$r.geometry.boundingBox===null&&($r.geometry.boundingBox=new Pr),$r.geometry.boundingSphere===null&&($r.geometry.boundingSphere=new qr);for(let a=0,l=r.length;a({...n})),this._reservedRanges=e._reservedRanges.map(n=>({...n})),this._drawInfo=e._drawInfo.map(n=>({...n})),this._bounds=e._bounds.map(n=>({boxInitialized:n.boxInitialized,box:n.box.clone(),sphereInitialized:n.sphereInitialized,sphere:n.sphere.clone()})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,r,i,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=i.getIndex(),a=s===null?1:s.array.BYTES_PER_ELEMENT,l=this._drawInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._drawRanges,h=this.perObjectFrustumCulled,m=this._indirectTexture,v=m.image.data;h&&(FL.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),jM.setFromProjectionMatrix(FL,e.coordinateSystem));let x=0;if(this.sortObjects){BM.copy(this.matrixWorld).invert(),Qh.setFromMatrixPosition(r.matrixWorld).applyMatrix4(BM),zL.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(BM);for(let b=0,_=l.length;b<_;b++)if(l[b].visible&&l[b].active){const S=l[b].geometryIndex;this.getMatrixAt(b,sl),this.getBoundingSphereAt(S,cc).applyMatrix4(sl);let P=!1;if(h&&(P=!jM.intersectsSphere(cc)),!P){const N=efe.subVectors(cc.center,Qh).dot(zL);VM.push(f[S],N,b)}}const y=VM.list,g=this.customSort;g===null?y.sort(o.transparent?Kue:Yue):g.call(this,y,r);for(let b=0,_=y.length;b<_;b++){const S=y[b];c[x]=S.start*a,u[x]=S.count,v[x]=S.index,x++}VM.reset()}else for(let y=0,g=l.length;y0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;or)return;$M.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo($M);if(!(le.far))return{distance:l,point:BL.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:t}}const jL=new G,VL=new G;class qs extends La{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,o=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:s})}}class nfe extends kn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:tr,this.magFilter=o!==void 0?o:tr,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 rfe extends kn{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=lr,this.minFilter=lr,this.generateMipmaps=!1,this.needsUpdate=!0}}class m_ extends kn{constructor(e,n,r,i,o,s,a,l,c,u,f,h){super(null,s,a,l,c,u,i,o,f,h),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class ife extends m_{constructor(e,n,r,i,o,s){super(e,n,r,o,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ti,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class ofe extends m_{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,Na),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class sfe extends kn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class us{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),o=0;n.push(0);for(let s=1;s<=e;s++)r=this.getPoint(s/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let s;n?s=n:s=e*r[o-1];let a=0,l=o-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-s,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===s)return i/(o-1);const u=r[i],h=r[i+1]-u,m=(s-u)/h;return(i+m)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const s=this.getPoint(i),a=this.getPoint(o),l=n||(s.isVector2?new Ie:new G);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new G,i=[],o=[],s=[],a=new G,l=new wt;for(let m=0;m<=e;m++){const v=m/e;i[m]=this.getTangentAt(v,new G)}o[0]=new G,s[0]=new G;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(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let m=1;m<=e;m++){if(o[m]=o[m-1].clone(),s[m]=s[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos($n(i[m-1].dot(i[m]),-1,1));o[m].applyMatrix4(l.makeRotationAxis(a,v))}s[m].crossVectors(i[m],o[m])}if(n===!0){let m=Math.acos($n(o[0].dot(o[e]),-1,1));m/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(m=-m);for(let v=1;v<=e;v++)o[v].applyMatrix4(l.makeRotationAxis(i[v],m*v)),s[v].crossVectors(i[v],o[v])}return{tangents:i,normals:o,binormals:s}}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 g_ extends us{constructor(e=0,n=0,r=1,i=1,o=0,s=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=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new Ie){const r=n,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%o]:(Uv.subVectors(i[0],i[1]).add(i[0]),c=Uv);const f=i[a%o],h=i[(a+1)%o];if(this.closed||a+2i.length-2?i.length-1:s+1],f=i[s>i.length-3?i.length-1:s+2];return r.set(HL(a,l.x,c.x,u.x,f.x),HL(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 s=i[o]-r,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,n)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let 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 xg extends zt{constructor(e=[new Ie(0,-.5),new Ie(.5,0),new Ie(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=$n(i,0,Math.PI*2);const o=[],s=[],a=[],l=[],c=[],u=1/n,f=new G,h=new Ie,m=new G,v=new G,x=new G;let y=0,g=0;for(let b=0;b<=e.length-1;b++)switch(b){case 0:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,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:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,m.z=g*0,v.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(v)}for(let b=0;b<=n;b++){const _=r+b*u*i,S=Math.sin(_),P=Math.cos(_);for(let N=0;N<=e.length-1;N++){f.x=e[N].x*S,f.y=e[N].y,f.z=e[N].x*P,s.push(f.x,f.y,f.z),h.x=b/n,h.y=N/(e.length-1),a.push(h.x,h.y);const T=l[3*N+0]*S,L=l[3*N+1],U=l[3*N+0]*P;c.push(T,L,U)}}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 G,P=new G;let N=0;const T=(n-e)/r;for(let L=0;L<=o;L++){const U=[],M=L/o,R=M*(n-e)+e;for(let D=0;D<=i;D++){const O=D/i,B=O*l+a,X=Math.sin(B),H=Math.cos(B);P.x=R*X,P.y=-M*r+y,P.z=R*H,f.push(P.x,P.y,P.z),S.set(X,T,H).normalize(),h.push(S.x,S.y,S.z),m.push(O,1-M),U.push(v++)}x.push(U)}for(let L=0;L0&&(u.push(M,R,O),N+=3),n>0&&(u.push(R,D,O),N+=3)}c.addGroup(g,N,0),g+=N}function _(S){const P=v,N=new Ie,T=new G;let L=0;const U=S===!0?e:n,M=S===!0?1:-1;for(let D=1;D<=i;D++)f.push(0,y*M,0),h.push(0,M,0),m.push(.5,.5),v++;const R=v;for(let D=0;D<=i;D++){const B=D/i*l+a,X=Math.cos(B),H=Math.sin(B);T.x=U*H,T.y=y*M,T.z=U*X,f.push(T.x,T.y,T.z),h.push(0,M,0),N.x=X*.5+.5,N.y=H*.5*M+.5,m.push(N.x,N.y),v++}for(let D=0;D.9&&T<.1&&(_<.2&&(s[b+0]+=1),S<.2&&(s[b+2]+=1),P<.2&&(s[b+4]+=1))}}function h(b){o.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 v(){const b=new G,_=new G,S=new G,P=new G,N=new Ie,T=new Ie,L=new Ie;for(let U=0,M=0;U80*n){a=c=t[0],l=u=t[1];for(let v=n;vc&&(c=f),h>u&&(u=h);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return Lm(o,s,n,a,l,m,0),s}};function wB(t,e,n,r,i){let o,s;if(i===Pfe(t,e,n,r)>0)for(o=e;o=e;o-=r)s=GL(o,t[o],t[o+1],s);return s&&__(s,s.next)&&(Om(s),s=s.next),s}function uu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(__(n,n.next)||In(n.prev,n,n.next)===0)){if(Om(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function Lm(t,e,n,r,i,o,s){if(!t)return;!s&&o&&Mfe(t,r,i,o);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,o?gfe(t,r,i,o):mfe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Om(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=vfe(uu(t),e,n),Lm(t,e,n,r,i,o,2)):s===2&&yfe(t,e,n,r,i,o):Lm(uu(t),e,n,r,i,o,1);break}}}function mfe(t){const e=t.prev,n=t,r=t.next;if(In(e,n,r)>=0)return!1;const i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,c=r.y,u=io?i>s?i:s:o>s?o:s,m=a>l?a>c?a:c:l>c?l:c;let v=r.next;for(;v!==e;){if(v.x>=u&&v.x<=h&&v.y>=f&&v.y<=m&&Hf(i,a,o,l,s,c,v.x,v.y)&&In(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function gfe(t,e,n,r){const i=t.prev,o=t,s=t.next;if(In(i,o,s)>=0)return!1;const a=i.x,l=o.x,c=s.x,u=i.y,f=o.y,h=s.y,m=al?a>c?a:c:l>c?l:c,y=u>f?u>h?u:h:f>h?f:h,g=pC(m,v,e,n,r),b=pC(x,y,e,n,r);let _=t.prevZ,S=t.nextZ;for(;_&&_.z>=g&&S&&S.z<=b;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Hf(a,u,l,f,c,h,_.x,_.y)&&In(_.prev,_,_.next)>=0||(_=_.prevZ,S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Hf(a,u,l,f,c,h,S.x,S.y)&&In(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;_&&_.z>=g;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Hf(a,u,l,f,c,h,_.x,_.y)&&In(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;S&&S.z<=b;){if(S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Hf(a,u,l,f,c,h,S.x,S.y)&&In(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function vfe(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!__(i,o)&&SB(i,r,r.next,o)&&km(i,o)&&km(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),Om(r),Om(r.next),r=t=o),r=r.next}while(r!==t);return uu(r)}function yfe(t,e,n,r,i,o){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Tfe(s,a)){let l=MB(s,a);s=uu(s,s.next),l=uu(l,l.next),Lm(s,e,n,r,i,o,0),Lm(l,e,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==t)}function xfe(t,e,n,r){const i=[];let o,s,a,l,c;for(o=0,s=e.length;o=n.next.y&&n.next.y!==n.y){const h=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=o&&h>r&&(r=h,i=n.x=n.x&&n.x>=l&&o!==n.x&&Hf(si.x||n.x===i.x&&Sfe(i,n)))&&(i=n,u=f)),n=n.next;while(n!==a);return i}function Sfe(t,e){return In(t.prev,t,e.prev)<0&&In(e.next,t,t.next)<0}function Mfe(t,e,n,r){let i=t;do i.z===0&&(i.z=pC(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,Efe(i)}function Efe(t){let e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,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--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return t}function pC(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 Cfe(t){let e=t,n=t;do(e.x=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function Tfe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Rfe(t,e)&&(km(t,e)&&km(e,t)&&Afe(t,e)&&(In(t.prev,t,e.prev)||In(t,e.prev,e))||__(t,e)&&In(t.prev,t,t.next)>0&&In(e.prev,e,e.next)>0)}function In(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function __(t,e){return t.x===e.x&&t.y===e.y}function SB(t,e,n,r){const i=Wv(In(t,e,n)),o=Wv(In(t,e,r)),s=Wv(In(n,r,t)),a=Wv(In(n,r,e));return!!(i!==o&&s!==a||i===0&&$v(t,n,e)||o===0&&$v(t,r,e)||s===0&&$v(n,t,r)||a===0&&$v(n,e,r))}function $v(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 Wv(t){return t>0?1:t<0?-1:0}function Rfe(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&&SB(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function km(t,e){return In(t.prev,t,t.next)<0?In(t,e,t.next)>=0&&In(t,t.prev,e)>=0:In(t,e,t.prev)<0||In(t,t.next,e)<0}function Afe(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function MB(t,e){const n=new mC(t.i,t.x,t.y),r=new mC(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function GL(t,e,n,r){const i=new mC(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 Om(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 mC(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 Pfe(t,e,n,r){let i=0;for(let o=e,s=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function qL(t,e){for(let n=0;nNumber.EPSILON){const pe=Math.sqrt(re),be=Math.sqrt($*$+z*z),Ge=j.x-De/pe,Fe=j.y+Ee/pe,Ne=ye.x-z/be,ze=ye.y+$/be,Le=((Ne-Ge)*z-(ze-Fe)*$)/(Ee*z-De*$);xe=Ge+Ee*Le-se.x,Re=Fe+De*Le-se.y;const Xe=xe*xe+Re*Re;if(Xe<=2)return new Ie(xe,Re);Pe=Math.sqrt(Xe/2)}else{let pe=!1;Ee>Number.EPSILON?$>Number.EPSILON&&(pe=!0):Ee<-Number.EPSILON?$<-Number.EPSILON&&(pe=!0):Math.sign(De)===Math.sign(z)&&(pe=!0),pe?(xe=-De,Re=Ee,Pe=Math.sqrt(re)):(xe=Ee,Re=De,Pe=Math.sqrt(re/2))}return new Ie(xe/Pe,Re/Pe)}const Y=[];for(let se=0,j=B.length,ye=j-1,xe=se+1;se=0;se--){const j=se/y,ye=m*Math.cos(j*Math.PI/2),xe=v*Math.sin(j*Math.PI/2)+x;for(let Re=0,Pe=B.length;Re=0;){const xe=ye;let Re=ye-1;Re<0&&(Re=se.length-1);for(let Pe=0,Ee=u+y*2;Pe0)&&m.push(_,S,N),(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 AB extends Ir{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=Vl,this.normalScale=new Ie(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ro,this.combine=ug,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 PB extends Ir{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=Vl,this.normalScale=new Ie(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 NB extends Ir{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Vl,this.normalScale=new Ie(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 IB extends Ir{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=Vl,this.normalScale=new Ie(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ro,this.combine=ug,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 LB extends Ir{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=Vl,this.normalScale=new Ie(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 kB extends mi{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 kc(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 OB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function DB(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function gC(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function gA(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}function kfe(t,e,n,r,i=30){const o=t.clone();o.name=e;const s=[];for(let l=0;l=r)){f.push(c.times[m]);for(let x=0;xo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[v]){const g=v*f+u,b=g+f-u;x=a.values.slice(g,b)}else{const g=a.createInterpolant(),b=u,_=f-u;g.evaluate(o),x=g.resultBuffer.slice(b,_)}l==="quaternion"&&new ki().fromArray(x).normalize().conjugate().toArray(x);const y=c.times.length;for(let g=0;g=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*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,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;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(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&OB(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()===Fy,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*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}}fs.prototype.TimeBufferType=Float32Array;fs.prototype.ValueBufferType=Float32Array;fs.prototype.DefaultInterpolation=mx;class Su extends fs{constructor(e,n,r){super(e,n,r)}}Su.prototype.ValueTypeName="bool";Su.prototype.ValueBufferType=Array;Su.prototype.DefaultInterpolation=Mm;Su.prototype.InterpolantFactoryMethodLinear=void 0;Su.prototype.InterpolantFactoryMethodSmooth=void 0;class yA extends fs{}yA.prototype.ValueTypeName="color";class Dm extends fs{}Dm.prototype.ValueTypeName="number";class UB extends wg{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)ki.slerpFlat(o,0,s,c-a,s,c,l);return o}}class Sg extends fs{InterpolantFactoryMethodLinear(e){return new UB(this.times,this.values,this.getValueSize(),e)}}Sg.prototype.ValueTypeName="quaternion";Sg.prototype.InterpolantFactoryMethodSmooth=void 0;class Mu extends fs{constructor(e,n,r){super(e,n,r)}}Mu.prototype.ValueTypeName="string";Mu.prototype.ValueBufferType=Array;Mu.prototype.DefaultInterpolation=Mm;Mu.prototype.InterpolantFactoryMethodLinear=void 0;Mu.prototype.InterpolantFactoryMethodSmooth=void 0;class Fm extends fs{}Fm.prototype.ValueTypeName="vector";class zm{constructor(e="",n=-1,r=[],i=a_){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=eo(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(zfe(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}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 o=0,s=r.length;o!==s;++o)n.push(fs.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const f=u[1];let h=i[f];h||(i[f]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,h,m,v,x){if(m.length!==0){const y=[],g=[];gA(m,y,g,v),y.length!==0&&x.push(new f(h,y,g))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{n&&n(o),this.manager.itemEnd(e)},0),o;if(la[e]!==void 0){la[e].push({onLoad:n,onProgress:r,onError:i});return}la[e]=[],la[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).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=la[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=h?parseInt(h):0,v=m!==0;let x=0;const y=new ReadableStream({start(g){b();function b(){f.read().then(({done:_,value:S})=>{if(_)g.close();else{x+=S.byteLength;const P=new ProgressEvent("progress",{lengthComputable:v,loaded:x,total:m});for(let N=0,T=u.length;N{g.error(_)})}}});return new Response(y)}else throw new Ufe(`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(v=>m.decode(v))}}}).then(c=>{ya.add(e,c);const u=la[e];delete la[e];for(let f=0,h=u.length;f{const u=la[e];if(u===void 0)throw this.manager.itemError(e),c;delete la[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 Bfe extends zi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new ka(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=r(s.value);break;case"c":i.uniforms[o].value=new ot().setHex(s.value);break;case"v2":i.uniforms[o].value=new Ie().fromArray(s.value);break;case"v3":i.uniforms[o].value=new G().fromArray(s.value);break;case"v4":i.uniforms[o].value=new Zt().fromArray(s.value);break;case"m3":i.uniforms[o].value=new Ot().fromArray(s.value);break;case"m4":i.uniforms[o].value=new wt().fromArray(s.value);break;default:i.uniforms[o].value=s.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 o in e.extensions)i.extensions[o]=e.extensions[o];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 o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Ie().fromArray(o)}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 Ie().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 P_.createMaterialFromType(e)}static createMaterialFromType(e){const n={ShadowMaterial:CB,SpriteMaterial:sA,RawShaderMaterial:TB,ShaderMaterial:ss,PointsMaterial:lA,MeshPhysicalMaterial:RB,MeshStandardMaterial:mA,MeshPhongMaterial:AB,MeshToonMaterial:PB,MeshNormalMaterial:NB,MeshLambertMaterial:IB,MeshDepthMaterial:iA,MeshDistanceMaterial:oA,MeshBasicMaterial:$l,MeshMatcapMaterial:LB,LineDashedMaterial:kB,LineBasicMaterial:mi,Material:Ir};return new n[e]}}class vC{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 xA(n);o=new Um(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new Um(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s{const y=new Pr;y.min.fromArray(x.boxMin),y.max.fromArray(x.boxMax);const g=new qr;return g.radius=x.sphereRadius,g.center.fromArray(x.sphereCenter),{boxInitialized:x.boxInitialized,box:y,sphereInitialized:x.sphereInitialized,sphere:g}}),s._maxInstanceCount=e.maxInstanceCount,s._maxVertexCount=e.maxVertexCount,s._maxIndexCount=e.maxIndexCount,s._geometryInitialized=e.geometryInitialized,s._geometryCount=e.geometryCount,s._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(s._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":s=new uB;break;case"Line":s=new La(a(e.geometry),l(e.material));break;case"LineLoop":s=new pB(a(e.geometry),l(e.material));break;case"LineSegments":s=new qs(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":s=new mB(a(e.geometry),l(e.material));break;case"Sprite":s=new cB(l(e.material));break;case"Group":s=new Wf;break;case"Bone":s=new aA;break;default:s=new tn}if(s.uuid=e.uuid,e.name!==void 0&&(s.name=e.name),e.matrix!==void 0?(s.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(e.position!==void 0&&s.position.fromArray(e.position),e.rotation!==void 0&&s.rotation.fromArray(e.rotation),e.quaternion!==void 0&&s.quaternion.fromArray(e.quaternion),e.scale!==void 0&&s.scale.fromArray(e.scale)),e.up!==void 0&&s.up.fromArray(e.up),e.castShadow!==void 0&&(s.castShadow=e.castShadow),e.receiveShadow!==void 0&&(s.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(s.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(s.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(s.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(s.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(s.visible=e.visible),e.frustumCulled!==void 0&&(s.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(s.renderOrder=e.renderOrder),e.userData!==void 0&&(s.userData=e.userData),e.layers!==void 0&&(s.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 o=this,s=ya.get(e);if(s!==void 0){if(o.manager.itemStart(e),s.then){s.then(c=>{n&&n(c),o.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s}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(o.options,{colorSpaceConversion:"none"}))}).then(function(c){return ya.add(e,c),n&&n(c),o.manager.itemEnd(e),c}).catch(function(c){i&&i(c),ya.remove(e),o.manager.itemError(e),o.manager.itemEnd(e)});ya.add(e,l),o.manager.itemStart(e)}}let Hv;class _A{static getContext(){return Hv===void 0&&(Hv=new(window.AudioContext||window.webkitAudioContext)),Hv}static setContext(e){Hv=e}}class Zfe extends zi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new ka(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(l){try{const c=l.slice(0);_A.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),o.manager.itemError(e)}}}const nk=new wt,rk=new wt,uc=new wt;class Jfe{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new vr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new vr,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,uc.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,s=n.near*Math.tan($c*n.fov*.5)/n.zoom;let a,l;rk.elements[12]=-i,nk.elements[12]=i,a=-s*n.aspect+o,l=s*n.aspect+o,uc.elements[0]=2*n.near/(l-a),uc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(uc),a=-s*n.aspect-o,l=s*n.aspect-o,uc.elements[0]=2*n.near/(l-a),uc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(uc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(rk),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(nk)}}class wA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ik(),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=ik();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function ik(){return performance.now()}const fc=new G,ok=new ki,Qfe=new G,dc=new G;class ede extends tn{constructor(){super(),this.type="AudioListener",this.context=_A.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new wA}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(fc,ok,Qfe),dc.set(0,0,-1).applyQuaternion(ok),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(fc.x,i),n.positionY.linearRampToValueAtTime(fc.y,i),n.positionZ.linearRampToValueAtTime(fc.z,i),n.forwardX.linearRampToValueAtTime(dc.x,i),n.forwardY.linearRampToValueAtTime(dc.y,i),n.forwardZ.linearRampToValueAtTime(dc.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(fc.x,fc.y,fc.z),n.setOrientation(dc.x,dc.y,dc.z,r.x,r.y,r.z)}}class ZB extends tn{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 o=r,s=i;o!==s;++o)n[o]=n[i+o%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 s=0;s!==o;++s)e[n+s]=e[r+s]}_slerp(e,n,r,i){ki.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const s=this._workIndex*o;ki.multiplyQuaternionsFlat(e,s,e,n,e,r),ki.slerpFlat(e,n,e,n,e,s,i)}_lerp(e,n,r,i,o){const s=1-i;for(let a=0;a!==o;++a){const l=n+a;e[l]=e[l]*s+e[r+a]*i}}_lerpAdditive(e,n,r,i,o){for(let s=0;s!==o;++s){const a=n+s;e[a]=e[a]+e[r+s]*i}}}const SA="\\[\\]\\.:\\/",ide=new RegExp("["+SA+"]","g"),MA="[^"+SA+"]",ode="[^"+SA.replace("\\.","")+"]",sde=/((?:WC+[\/:])*)/.source.replace("WC",MA),ade=/(WCOD+)?/.source.replace("WCOD",ode),lde=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",MA),cde=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",MA),ude=new RegExp("^"+sde+ade+lde+cde+"$"),fde=["material","materials","bones","map"];class dde{constructor(e,n,r){const i=r||Qt.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_,o=r.length;i!==o;++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 Qt{constructor(e,n,r){this.path=n,this.parsedPath=r||Qt.parseTrackName(n),this.node=Qt.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 Qt.Composite(e,n,r):new Qt(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ide,"")}static parseTrackName(e){const n=ude.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 o=r.nodeName.substring(i+1);fde.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}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(o){for(let s=0;s=o){const f=o++,h=e[f];n[h.uuid]=u,e[u]=h,n[c]=f,e[f]=l;for(let m=0,v=i;m!==v;++m){const x=r[m],y=x[f],g=x[u];x[u]=y,x[f]=g}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,s=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 v=0,x=i;v!==x;++v){const y=r[v];y[f]=y[h],y.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);i=o.length,r[e]=i,s.push(e),a.push(n),o.push(f);for(let h=u,m=l.length;h!==m;++h){const v=l[h];f[h]=new Qt(v,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];n[c]=r,s[r]=l,s.pop(),o[r]=o[a],o.pop(),i[r]=i[a],i.pop()}}}class QB{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,s=o.length,a=new Array(s),l={endingStart:Nc,endingEnd:Nc};for(let c=0;c!==s;++c){const u=o[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=IU,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,o=e._clip.duration,s=o/i,a=i/o;e.warp(1,s,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,o=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+r,c[0]=e/s,c[1]=n/s,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 o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const s=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case KR:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),c[u].accumulateAdditive(a);break;case a_:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),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,o=this._loopCount;const s=r===LU;if(e===0)return o===-1?i:s&&(o&1)===1?n-i:i;if(r===NU){o===-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(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,o+=Math.abs(a);const l=this.repetitions-o;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,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(s&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Ic,i.endingEnd=Ic):(e?i.endingStart=this.zeroSlopeAtStart?Ic:Nc:i.endingStart=Em,n?i.endingEnd=this.zeroSlopeAtEnd?Ic:Nc:i.endingEnd=Em)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let s=this._weightInterpolant;s===null&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=n,a[1]=o+e,l[1]=r,this}}const pde=new Float32Array(1);class mde extends Xs{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,o=i.length,s=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!==o;++f){const h=i[f],m=h.name;let v=u[m];if(v!==void 0)++v.referenceCount,s[f]=v;else{if(v=s[f],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;v=new JB(Qt.create(r,m,x),h.ValueTypeName,h.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),s[f]=v}a[f].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.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 o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const 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,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,o,s);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);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,ck).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 uk=new G,Gv=new G;class Sde{constructor(e=new G,n=new G){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){uk.subVectors(e,this.start),Gv.subVectors(this.end,this.start);const r=Gv.dot(Gv);let o=Gv.dot(uk)/r;return n&&(o=$n(o,0,1)),o}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 fk=new G;class Mde extends tn{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new zt,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 s=0,a=1,l=32;s1)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{gk.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(gk,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 Fde extends qs{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 zt;i.setAttribute("position",new pt(n,3)),i.setAttribute("color",new pt(r,3));const o=new mi({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new ot,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class zde{constructor(){this.type="ShapePath",this.color=new ot,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Im,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,o,s){return this.currentPath.bezierCurveTo(e,n,r,i,o,s),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(M<0&&(T=b[N],U=-U,L=b[P],M=-M),g.yL.y)continue;if(g.y===T.y){if(g.x===T.x)return!0}else{const R=M*(g.x-T.x)-U*(g.y-T.y);if(R===0)return!0;if(R<0)continue;S=!S}}else{if(g.y!==T.y)continue;if(L.x<=g.x&&g.x<=T.x||T.x<=g.x&&g.x<=L.x)return!0}}return S}const i=Ds.isClockWise,o=this.subPaths;if(o.length===0)return[];let s,a,l;const c=[];if(o.length===1)return a=o[0],l=new Hc,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const f=[],h=[];let m=[],v=0,x;h[v]=void 0,m[v]=[];for(let g=0,b=o.length;g1){let g=!1,b=0;for(let _=0,S=h.length;_0&&g===!1&&(m=f)}let y;for(let g=0,b=h.length;g{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,o=(c,u=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=u(e);function m(){const v=u(e);if(!f(h,v)){const x=h;c(h=v,x)}}return n.add(m),()=>n.delete(m)},l={setState:r,getState:i,subscribe:(c,u,f)=>u||f?o(c,u,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const jfe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),fk=jfe?A.useEffect:A.useLayoutEffect;function Vfe(t){const e=typeof t=="function"?Bfe(t):t,n=(r=e.getState,i=Object.is)=>{const[,o]=A.useReducer(y=>y+1,0),s=e.getState(),a=A.useRef(s),l=A.useRef(r),c=A.useRef(i),u=A.useRef(!1),f=A.useRef();f.current===void 0&&(f.current=r(s));let h,m=!1;(a.current!==s||l.current!==r||c.current!==i||u.current)&&(h=r(s),m=!i(f.current,h)),fk(()=>{m&&(f.current=h),a.current=s,l.current=r,c.current=i,u.current=!1});const v=A.useRef(s);fk(()=>{const y=()=>{try{const b=e.getState(),_=l.current(b);c.current(f.current,_)||(a.current=b,f.current=_,o())}catch{u.current=!0,o()}},g=e.subscribe(y);return e.getState()!==v.current&&y(),g},[]);const x=m?h:f.current;return A.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 HB={exports:{}},GB={exports:{}},XB={};/** + */Eu.ConcurrentRoot=1;Eu.ContinuousEventPriority=4;Eu.DefaultEventPriority=16;Eu.DiscreteEventPriority=1;Eu.IdleEventPriority=536870912;Eu.LegacyRoot=0;n8.exports=Eu;var Gf=n8.exports;function Vde(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,o=(c,u=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=u(e);function m(){const v=u(e);if(!f(h,v)){const x=h;c(h=v,x)}}return n.add(m),()=>n.delete(m)},l={setState:r,getState:i,subscribe:(c,u,f)=>u||f?o(c,u,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const $de=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),vk=$de?A.useEffect:A.useLayoutEffect;function Wde(t){const e=typeof t=="function"?Vde(t):t,n=(r=e.getState,i=Object.is)=>{const[,o]=A.useReducer(y=>y+1,0),s=e.getState(),a=A.useRef(s),l=A.useRef(r),c=A.useRef(i),u=A.useRef(!1),f=A.useRef();f.current===void 0&&(f.current=r(s));let h,m=!1;(a.current!==s||l.current!==r||c.current!==i||u.current)&&(h=r(s),m=!i(f.current,h)),vk(()=>{m&&(f.current=h),a.current=s,l.current=r,c.current=i,u.current=!1});const v=A.useRef(s);vk(()=>{const y=()=>{try{const b=e.getState(),_=l.current(b);c.current(f.current,_)||(a.current=b,f.current=_,o())}catch{u.current=!0,o()}},g=e.subscribe(y);return e.getState()!==v.current&&y(),g},[]);const x=m?h:f.current;return A.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 r8={exports:{}},i8={exports:{}},o8={};/** * @license React * scheduler.production.min.js * @@ -4007,7 +4034,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,Y){var K=F.length;F.push(Y);e:for(;0>>1,me=F[ee];if(0>>1;eei(ae,K))gei(Me,ae)?(F[ee]=Me,F[ge]=K,ee=ge):(F[ee]=ae,F[Q]=K,ee=Q);else if(gei(Me,K))F[ee]=Me,F[ge]=K,ee=ge;else break e}}return Y}function i(F,Y){var K=F.sortIndex-Y.sortIndex;return K!==0?K:F.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,x=!1,y=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 Y=n(c);Y!==null;){if(Y.callback===null)r(c);else if(Y.startTime<=F)r(c),Y.sortIndex=Y.expirationTime,e(l,Y);else break;Y=n(c)}}function S(F){if(x=!1,_(F),!v)if(n(l)!==null)v=!0,H(P);else{var Y=n(c);Y!==null&&Z(S,Y.startTime-F)}}function P(F,Y){v=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(Y),f=n(l);f!==null&&(!(f.expirationTime>Y)||F&&!R());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,h=f.priorityLevel;var me=ee(f.expirationTime<=Y);Y=t.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),_(Y)}else r(l);f=n(l)}if(f!==null)var le=!0;else{var Q=n(c);Q!==null&&Z(S,Q.startTime-Y),le=!1}return le}finally{f=null,h=K,m=!1}}var N=!1,T=null,L=-1,U=5,M=-1;function R(){return!(t.unstable_now()-MF||125ee?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-ee))):(F.sortIndex=me,e(l,F),v||m||(v=!0,H(P))),F},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(F){var Y=h;return function(){var K=h;h=Y;try{return F.apply(this,arguments)}finally{h=K}}}})(XB);GB.exports=XB;var gC=GB.exports;/** + */(function(t){function e(F,Y){var K=F.length;F.push(Y);e:for(;0>>1,me=F[ee];if(0>>1;eei(ae,K))gei(Me,ae)?(F[ee]=Me,F[ge]=K,ee=ge):(F[ee]=ae,F[Q]=K,ee=Q);else if(gei(Me,K))F[ee]=Me,F[ge]=K,ee=ge;else break e}}return Y}function i(F,Y){var K=F.sortIndex-Y.sortIndex;return K!==0?K:F.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,x=!1,y=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 Y=n(c);Y!==null;){if(Y.callback===null)r(c);else if(Y.startTime<=F)r(c),Y.sortIndex=Y.expirationTime,e(l,Y);else break;Y=n(c)}}function S(F){if(x=!1,_(F),!v)if(n(l)!==null)v=!0,H(P);else{var Y=n(c);Y!==null&&Z(S,Y.startTime-F)}}function P(F,Y){v=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(Y),f=n(l);f!==null&&(!(f.expirationTime>Y)||F&&!R());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,h=f.priorityLevel;var me=ee(f.expirationTime<=Y);Y=t.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),_(Y)}else r(l);f=n(l)}if(f!==null)var le=!0;else{var Q=n(c);Q!==null&&Z(S,Q.startTime-Y),le=!1}return le}finally{f=null,h=K,m=!1}}var N=!1,T=null,L=-1,U=5,M=-1;function R(){return!(t.unstable_now()-MF||125ee?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-ee))):(F.sortIndex=me,e(l,F),v||m||(v=!0,H(P))),F},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(F){var Y=h;return function(){var K=h;h=Y;try{return F.apply(this,arguments)}finally{h=K}}}})(o8);i8.exports=o8;var xC=i8.exports;/** * @license React * react-reconciler.production.min.js * @@ -4015,21 +4042,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 $fe=function(e){var n={},r=A,i=gC,o=Object.assign;function s(d){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+d,w=1;wte||I[q]!==k[te]){var Se=` -`+I[q].replace(" at new "," at ");return d.displayName&&Se.includes("")&&(Se=Se.replace("",d.displayName)),Se}while(1<=q&&0<=te);break}}}finally{St=!1,Error.prepareStackTrace=w}return(d=d?d.displayName||d.name:"")?ct(d):""}var mt=Object.prototype.hasOwnProperty,Jt=[],nn=-1;function ln(d){return{current:d}}function $t(d){0>nn||(d.current=Jt[nn],Jt[nn]=null,nn--)}function vt(d,p){nn++,Jt[nn]=d.current,d.current=p}var ft={},Kt=ln(ft),Pt=ln(!1),rr=ft;function Ui(d,p){var w=d.type.contextTypes;if(!w)return ft;var E=d.stateNode;if(E&&E.__reactInternalMemoizedUnmaskedChildContext===p)return E.__reactInternalMemoizedMaskedChildContext;var I={},k;for(k in w)I[k]=p[k];return E&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=p,d.__reactInternalMemoizedMaskedChildContext=I),I}function gn(d){return d=d.childContextTypes,d!=null}function Ua(){$t(Pt),$t(Kt)}function Mn(d,p,w){if(Kt.current!==ft)throw Error(s(168));vt(Kt,p),vt(Pt,w)}function Uo(d,p,w){var E=d.stateNode;if(p=p.childContextTypes,typeof E.getChildContext!="function")return w;E=E.getChildContext();for(var I in E)if(!(I in p))throw Error(s(108,L(d)||"Unknown",I));return o({},w,E)}function Ba(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||ft,rr=Kt.current,vt(Kt,d),vt(Pt,Pt.current),!0}function Kr(d,p,w){var E=d.stateNode;if(!E)throw Error(s(169));w?(d=Uo(d,p,rr),E.__reactInternalMemoizedMergedChildContext=d,$t(Pt),$t(Kt),vt(Kt,d)):$t(Pt),vt(Pt,w)}var Zr=Math.clz32?Math.clz32:M7,iw=Math.log,Bg=Math.LN2;function M7(d){return d>>>=0,d===0?32:31-(iw(d)/Bg|0)|0}var jg=64,Vg=4194304;function ah(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 $g(d,p){var w=d.pendingLanes;if(w===0)return 0;var E=0,I=d.suspendedLanes,k=d.pingedLanes,q=w&268435455;if(q!==0){var te=q&~I;te!==0?E=ah(te):(k&=q,k!==0&&(E=ah(k)))}else q=w&~I,q!==0?E=ah(q):k!==0&&(E=ah(k));if(E===0)return 0;if(p!==0&&p!==E&&!(p&I)&&(I=E&-E,k=p&-p,I>=k||I===16&&(k&4194240)!==0))return p;if(E&4&&(E|=w&16),p=d.entangledLanes,p!==0)for(d=d.entanglements,p&=E;0w;w++)p.push(d);return p}function lh(d,p,w){d.pendingLanes|=p,p!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,p=31-Zr(p),d[p]=w}function T7(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 E=d.eventTimes;for(d=d.expirationTimes;0>=q,I-=q,Qs=1<<32-Zr(p)+I|w<on?(hr=It,It=null):hr=It.sibling;var sn=_t(ce,It,ve[on],nt);if(sn===null){It===null&&(It=hr);break}d&&It&&sn.alternate===null&&p(ce,It),ie=k(sn,ie,on),jt===null?gt=sn:jt.sibling=sn,jt=sn,It=hr}if(on===ve.length)return w(ce,It),En&&ql(ce,on),gt;if(It===null){for(;onon?(hr=It,It=null):hr=It.sibling;var qa=_t(ce,It,sn.value,nt);if(qa===null){It===null&&(It=hr);break}d&&It&&qa.alternate===null&&p(ce,It),ie=k(qa,ie,on),jt===null?gt=qa:jt.sibling=qa,jt=qa,It=hr}if(sn.done)return w(ce,It),En&&ql(ce,on),gt;if(It===null){for(;!sn.done;on++,sn=ve.next())sn=Nt(ce,sn.value,nt),sn!==null&&(ie=k(sn,ie,on),jt===null?gt=sn:jt.sibling=sn,jt=sn);return En&&ql(ce,on),gt}for(It=E(ce,It);!sn.done;on++,sn=ve.next())sn=vn(It,ce,on,sn.value,nt),sn!==null&&(d&&sn.alternate!==null&&It.delete(sn.key===null?on:sn.key),ie=k(sn,ie,on),jt===null?gt=sn:jt.sibling=sn,jt=sn);return d&&It.forEach(function(dj){return p(ce,dj)}),En&&ql(ce,on),gt}function yo(ce,ie,ve,nt){if(typeof ve=="object"&&ve!==null&&ve.type===u&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var gt=ve.key,jt=ie;jt!==null;){if(jt.key===gt){if(gt=ve.type,gt===u){if(jt.tag===7){w(ce,jt.sibling),ie=I(jt,ve.props.children),ie.return=ce,ce=ie;break e}}else if(jt.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===_&&OP(gt)===jt.type){w(ce,jt.sibling),ie=I(jt,ve.props),ie.ref=fh(ce,jt,ve),ie.return=ce,ce=ie;break e}w(ce,jt);break}else p(ce,jt);jt=jt.sibling}ve.type===u?(ie=tc(ve.props.children,ce.mode,nt,ve.key),ie.return=ce,ce=ie):(nt=N0(ve.type,ve.key,ve.props,null,ce.mode,nt),nt.ref=fh(ce,ie,ve),nt.return=ce,ce=nt)}return q(ce);case c:e:{for(jt=ve.key;ie!==null;){if(ie.key===jt)if(ie.tag===4&&ie.stateNode.containerInfo===ve.containerInfo&&ie.stateNode.implementation===ve.implementation){w(ce,ie.sibling),ie=I(ie,ve.children||[]),ie.return=ce,ce=ie;break e}else{w(ce,ie);break}else p(ce,ie);ie=ie.sibling}ie=aS(ve,ce.mode,nt),ie.return=ce,ce=ie}return q(ce);case _:return jt=ve._init,yo(ce,ie,jt(ve._payload),nt)}if(X(ve))return yt(ce,ie,ve,nt);if(N(ve))return zr(ce,ie,ve,nt);e0(ce,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,ie!==null&&ie.tag===6?(w(ce,ie.sibling),ie=I(ie,ve),ie.return=ce,ce=ie):(w(ce,ie),ie=sS(ve,ce.mode,nt),ie.return=ce,ce=ie),q(ce)):w(ce,ie)}return yo}var Du=DP(!0),FP=DP(!1),dh={},po=ln(dh),hh=ln(dh),Fu=ln(dh);function ys(d){if(d===dh)throw Error(s(174));return d}function Mw(d,p){vt(Fu,p),vt(hh,d),vt(po,dh),d=Z(p),$t(po),vt(po,d)}function zu(){$t(po),$t(hh),$t(Fu)}function zP(d){var p=ys(Fu.current),w=ys(po.current);p=F(w,d.type,p),w!==p&&(vt(hh,d),vt(po,p))}function Ew(d){hh.current===d&&($t(po),$t(hh))}var Pn=ln(0);function t0(d){for(var p=d;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||Ru(w)||Au(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 Cw=[];function Tw(){for(var d=0;dw?w:4,d(!0);var E=mo.transition;mo.transition={};try{d(!1),p()}finally{rn=w,mo.transition=E}}function JP(){return xs().memoizedState}function U7(d,p,w){var E=Ha(d);w={lane:E,action:w,hasEagerState:!1,eagerState:null,next:null},QP(d)?e3(p,w):(t3(d,p,w),w=Qr(),d=go(d,E,w),d!==null&&n3(d,p,E))}function B7(d,p,w){var E=Ha(d),I={lane:E,action:w,hasEagerState:!1,eagerState:null,next:null};if(QP(d))e3(p,I);else{t3(d,p,I);var k=d.alternate;if(d.lanes===0&&(k===null||k.lanes===0)&&(k=p.lastRenderedReducer,k!==null))try{var q=p.lastRenderedState,te=k(q,w);if(I.hasEagerState=!0,I.eagerState=te,ms(te,q))return}catch{}finally{}w=Qr(),d=go(d,E,w),d!==null&&n3(d,p,E)}}function QP(d){var p=d.alternate;return d===zn||p!==null&&p===zn}function e3(d,p){ph=r0=!0;var w=d.pending;w===null?p.next=p:(p.next=w.next,w.next=p),d.pending=p}function t3(d,p,w){Kn!==null&&d.mode&1&&!(Wt&2)?(d=p.interleaved,d===null?(w.next=w,vs===null?vs=[p]:vs.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 n3(d,p,w){if(w&4194240){var E=p.lanes;E&=d.pendingLanes,w|=E,p.lanes=w,aw(d,w)}}var l0={readContext:uo,useCallback:Dr,useContext:Dr,useEffect:Dr,useImperativeHandle:Dr,useInsertionEffect:Dr,useLayoutEffect:Dr,useMemo:Dr,useReducer:Dr,useRef:Dr,useState:Dr,useDebugValue:Dr,useDeferredValue:Dr,useTransition:Dr,useMutableSource:Dr,useSyncExternalStore:Dr,useId:Dr,unstable_isNewReconciler:!1},j7={readContext:uo,useCallback:function(d,p){return ta().memoizedState=[d,p===void 0?null:p],d},useContext:uo,useEffect:Iw,useImperativeHandle:function(d,p,w){return w=w!=null?w.concat([d]):null,s0(4194308,4,qP.bind(null,p,d),w)},useLayoutEffect:function(d,p){return s0(4194308,4,d,p)},useInsertionEffect:function(d,p){return s0(4,2,d,p)},useMemo:function(d,p){var w=ta();return p=p===void 0?null:p,d=d(),w.memoizedState=[d,p],d},useReducer:function(d,p,w){var E=ta();return p=w!==void 0?w(p):p,E.memoizedState=E.baseState=p,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:p},E.queue=d,d=d.dispatch=U7.bind(null,zn,d),[E.memoizedState,d]},useRef:function(d){var p=ta();return d={current:d},p.memoizedState=d},useState:Nw,useDebugValue:Lw,useDeferredValue:function(d){var p=Nw(d),w=p[0],E=p[1];return Iw(function(){var I=mo.transition;mo.transition={};try{E(d)}finally{mo.transition=I}},[d]),w},useTransition:function(){var d=Nw(!1),p=d[0];return d=z7.bind(null,d[1]),ta().memoizedState=d,[p,d]},useMutableSource:function(){},useSyncExternalStore:function(d,p,w){var E=zn,I=ta();if(En){if(w===void 0)throw Error(s(407));w=w()}else{if(w=p(),Kn===null)throw Error(s(349));Uu&30||jP(E,p,w)}I.memoizedState=w;var k={value:w,getSnapshot:p};return I.queue=k,Iw($P.bind(null,E,k,d),[d]),E.flags|=2048,gh(9,VP.bind(null,E,k,w,p),void 0,null),w},useId:function(){var d=ta(),p=Kn.identifierPrefix;if(En){var w=ea,E=Qs;w=(E&~(1<<32-Zr(E)-1)).toString(32)+w,p=":"+p+"R"+w,w=mh++,0")&&(Se=Se.replace("",d.displayName)),Se}while(1<=q&&0<=te);break}}}finally{St=!1,Error.prepareStackTrace=w}return(d=d?d.displayName||d.name:"")?ct(d):""}var mt=Object.prototype.hasOwnProperty,Jt=[],nn=-1;function ln(d){return{current:d}}function $t(d){0>nn||(d.current=Jt[nn],Jt[nn]=null,nn--)}function vt(d,p){nn++,Jt[nn]=d.current,d.current=p}var ft={},Kt=ln(ft),Pt=ln(!1),rr=ft;function Ui(d,p){var w=d.type.contextTypes;if(!w)return ft;var E=d.stateNode;if(E&&E.__reactInternalMemoizedUnmaskedChildContext===p)return E.__reactInternalMemoizedMaskedChildContext;var I={},k;for(k in w)I[k]=p[k];return E&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=p,d.__reactInternalMemoizedMaskedChildContext=I),I}function gn(d){return d=d.childContextTypes,d!=null}function Ua(){$t(Pt),$t(Kt)}function Mn(d,p,w){if(Kt.current!==ft)throw Error(s(168));vt(Kt,p),vt(Pt,w)}function Uo(d,p,w){var E=d.stateNode;if(p=p.childContextTypes,typeof E.getChildContext!="function")return w;E=E.getChildContext();for(var I in E)if(!(I in p))throw Error(s(108,L(d)||"Unknown",I));return o({},w,E)}function Ba(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||ft,rr=Kt.current,vt(Kt,d),vt(Pt,Pt.current),!0}function Kr(d,p,w){var E=d.stateNode;if(!E)throw Error(s(169));w?(d=Uo(d,p,rr),E.__reactInternalMemoizedMergedChildContext=d,$t(Pt),$t(Kt),vt(Kt,d)):$t(Pt),vt(Pt,w)}var Zr=Math.clz32?Math.clz32:E7,iw=Math.log,Bg=Math.LN2;function E7(d){return d>>>=0,d===0?32:31-(iw(d)/Bg|0)|0}var jg=64,Vg=4194304;function ah(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 $g(d,p){var w=d.pendingLanes;if(w===0)return 0;var E=0,I=d.suspendedLanes,k=d.pingedLanes,q=w&268435455;if(q!==0){var te=q&~I;te!==0?E=ah(te):(k&=q,k!==0&&(E=ah(k)))}else q=w&~I,q!==0?E=ah(q):k!==0&&(E=ah(k));if(E===0)return 0;if(p!==0&&p!==E&&!(p&I)&&(I=E&-E,k=p&-p,I>=k||I===16&&(k&4194240)!==0))return p;if(E&4&&(E|=w&16),p=d.entangledLanes,p!==0)for(d=d.entanglements,p&=E;0w;w++)p.push(d);return p}function lh(d,p,w){d.pendingLanes|=p,p!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,p=31-Zr(p),d[p]=w}function R7(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 E=d.eventTimes;for(d=d.expirationTimes;0>=q,I-=q,Qs=1<<32-Zr(p)+I|w<on?(hr=It,It=null):hr=It.sibling;var sn=_t(ce,It,ve[on],nt);if(sn===null){It===null&&(It=hr);break}d&&It&&sn.alternate===null&&p(ce,It),ie=k(sn,ie,on),jt===null?gt=sn:jt.sibling=sn,jt=sn,It=hr}if(on===ve.length)return w(ce,It),En&&ql(ce,on),gt;if(It===null){for(;onon?(hr=It,It=null):hr=It.sibling;var qa=_t(ce,It,sn.value,nt);if(qa===null){It===null&&(It=hr);break}d&&It&&qa.alternate===null&&p(ce,It),ie=k(qa,ie,on),jt===null?gt=qa:jt.sibling=qa,jt=qa,It=hr}if(sn.done)return w(ce,It),En&&ql(ce,on),gt;if(It===null){for(;!sn.done;on++,sn=ve.next())sn=Nt(ce,sn.value,nt),sn!==null&&(ie=k(sn,ie,on),jt===null?gt=sn:jt.sibling=sn,jt=sn);return En&&ql(ce,on),gt}for(It=E(ce,It);!sn.done;on++,sn=ve.next())sn=vn(It,ce,on,sn.value,nt),sn!==null&&(d&&sn.alternate!==null&&It.delete(sn.key===null?on:sn.key),ie=k(sn,ie,on),jt===null?gt=sn:jt.sibling=sn,jt=sn);return d&&It.forEach(function(hj){return p(ce,hj)}),En&&ql(ce,on),gt}function yo(ce,ie,ve,nt){if(typeof ve=="object"&&ve!==null&&ve.type===u&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var gt=ve.key,jt=ie;jt!==null;){if(jt.key===gt){if(gt=ve.type,gt===u){if(jt.tag===7){w(ce,jt.sibling),ie=I(jt,ve.props.children),ie.return=ce,ce=ie;break e}}else if(jt.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===_&&OP(gt)===jt.type){w(ce,jt.sibling),ie=I(jt,ve.props),ie.ref=fh(ce,jt,ve),ie.return=ce,ce=ie;break e}w(ce,jt);break}else p(ce,jt);jt=jt.sibling}ve.type===u?(ie=tc(ve.props.children,ce.mode,nt,ve.key),ie.return=ce,ce=ie):(nt=N0(ve.type,ve.key,ve.props,null,ce.mode,nt),nt.ref=fh(ce,ie,ve),nt.return=ce,ce=nt)}return q(ce);case c:e:{for(jt=ve.key;ie!==null;){if(ie.key===jt)if(ie.tag===4&&ie.stateNode.containerInfo===ve.containerInfo&&ie.stateNode.implementation===ve.implementation){w(ce,ie.sibling),ie=I(ie,ve.children||[]),ie.return=ce,ce=ie;break e}else{w(ce,ie);break}else p(ce,ie);ie=ie.sibling}ie=aS(ve,ce.mode,nt),ie.return=ce,ce=ie}return q(ce);case _:return jt=ve._init,yo(ce,ie,jt(ve._payload),nt)}if(X(ve))return yt(ce,ie,ve,nt);if(N(ve))return zr(ce,ie,ve,nt);e0(ce,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,ie!==null&&ie.tag===6?(w(ce,ie.sibling),ie=I(ie,ve),ie.return=ce,ce=ie):(w(ce,ie),ie=sS(ve,ce.mode,nt),ie.return=ce,ce=ie),q(ce)):w(ce,ie)}return yo}var Du=DP(!0),FP=DP(!1),dh={},po=ln(dh),hh=ln(dh),Fu=ln(dh);function ys(d){if(d===dh)throw Error(s(174));return d}function Mw(d,p){vt(Fu,p),vt(hh,d),vt(po,dh),d=Z(p),$t(po),vt(po,d)}function zu(){$t(po),$t(hh),$t(Fu)}function zP(d){var p=ys(Fu.current),w=ys(po.current);p=F(w,d.type,p),w!==p&&(vt(hh,d),vt(po,p))}function Ew(d){hh.current===d&&($t(po),$t(hh))}var Pn=ln(0);function t0(d){for(var p=d;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||Ru(w)||Au(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 Cw=[];function Tw(){for(var d=0;dw?w:4,d(!0);var E=mo.transition;mo.transition={};try{d(!1),p()}finally{rn=w,mo.transition=E}}function JP(){return xs().memoizedState}function B7(d,p,w){var E=Ha(d);w={lane:E,action:w,hasEagerState:!1,eagerState:null,next:null},QP(d)?e3(p,w):(t3(d,p,w),w=Qr(),d=go(d,E,w),d!==null&&n3(d,p,E))}function j7(d,p,w){var E=Ha(d),I={lane:E,action:w,hasEagerState:!1,eagerState:null,next:null};if(QP(d))e3(p,I);else{t3(d,p,I);var k=d.alternate;if(d.lanes===0&&(k===null||k.lanes===0)&&(k=p.lastRenderedReducer,k!==null))try{var q=p.lastRenderedState,te=k(q,w);if(I.hasEagerState=!0,I.eagerState=te,ms(te,q))return}catch{}finally{}w=Qr(),d=go(d,E,w),d!==null&&n3(d,p,E)}}function QP(d){var p=d.alternate;return d===zn||p!==null&&p===zn}function e3(d,p){ph=r0=!0;var w=d.pending;w===null?p.next=p:(p.next=w.next,w.next=p),d.pending=p}function t3(d,p,w){Kn!==null&&d.mode&1&&!(Wt&2)?(d=p.interleaved,d===null?(w.next=w,vs===null?vs=[p]:vs.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 n3(d,p,w){if(w&4194240){var E=p.lanes;E&=d.pendingLanes,w|=E,p.lanes=w,aw(d,w)}}var l0={readContext:uo,useCallback:Dr,useContext:Dr,useEffect:Dr,useImperativeHandle:Dr,useInsertionEffect:Dr,useLayoutEffect:Dr,useMemo:Dr,useReducer:Dr,useRef:Dr,useState:Dr,useDebugValue:Dr,useDeferredValue:Dr,useTransition:Dr,useMutableSource:Dr,useSyncExternalStore:Dr,useId:Dr,unstable_isNewReconciler:!1},V7={readContext:uo,useCallback:function(d,p){return ta().memoizedState=[d,p===void 0?null:p],d},useContext:uo,useEffect:Iw,useImperativeHandle:function(d,p,w){return w=w!=null?w.concat([d]):null,s0(4194308,4,qP.bind(null,p,d),w)},useLayoutEffect:function(d,p){return s0(4194308,4,d,p)},useInsertionEffect:function(d,p){return s0(4,2,d,p)},useMemo:function(d,p){var w=ta();return p=p===void 0?null:p,d=d(),w.memoizedState=[d,p],d},useReducer:function(d,p,w){var E=ta();return p=w!==void 0?w(p):p,E.memoizedState=E.baseState=p,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:p},E.queue=d,d=d.dispatch=B7.bind(null,zn,d),[E.memoizedState,d]},useRef:function(d){var p=ta();return d={current:d},p.memoizedState=d},useState:Nw,useDebugValue:Lw,useDeferredValue:function(d){var p=Nw(d),w=p[0],E=p[1];return Iw(function(){var I=mo.transition;mo.transition={};try{E(d)}finally{mo.transition=I}},[d]),w},useTransition:function(){var d=Nw(!1),p=d[0];return d=U7.bind(null,d[1]),ta().memoizedState=d,[p,d]},useMutableSource:function(){},useSyncExternalStore:function(d,p,w){var E=zn,I=ta();if(En){if(w===void 0)throw Error(s(407));w=w()}else{if(w=p(),Kn===null)throw Error(s(349));Uu&30||jP(E,p,w)}I.memoizedState=w;var k={value:w,getSnapshot:p};return I.queue=k,Iw($P.bind(null,E,k,d),[d]),E.flags|=2048,gh(9,VP.bind(null,E,k,w,p),void 0,null),w},useId:function(){var d=ta(),p=Kn.identifierPrefix;if(En){var w=ea,E=Qs;w=(E&~(1<<32-Zr(E)-1)).toString(32)+w,p=":"+p+"R"+w,w=mh++,0Jw&&(p.flags|=128,E=!0,bh(I,!1),p.lanes=4194304)}else{if(!E)if(d=t0(k),d!==null){if(p.flags|=128,E=!0,d=d.updateQueue,d!==null&&(p.updateQueue=d,p.flags|=4),bh(I,!0),I.tail===null&&I.tailMode==="hidden"&&!k.alternate&&!En)return Fr(p),null}else 2*fr()-I.renderingStartTime>Jw&&w!==1073741824&&(p.flags|=128,E=!0,bh(I,!1),p.lanes=4194304);I.isBackwards?(k.sibling=p.child,p.child=k):(d=I.last,d!==null?d.sibling=k:p.child=k,I.last=k)}return I.tail!==null?(p=I.tail,I.rendering=p,I.tail=p.sibling,I.renderingStartTime=fr(),p.sibling=null,d=Pn.current,vt(Pn,E?d&1|2:d&1),p):(Fr(p),null);case 22:case 23:return rS(),E=p.memoizedState!==null,d!==null&&d.memoizedState!==null!==E&&(p.flags|=8192),E&&p.mode&1?$i&1073741824&&(Fr(p),Ve&&p.subtreeFlags&6&&(p.flags|=8192)):Fr(p),null;case 24:return null;case 25:return null}throw Error(s(156,p.tag))}var G7=a.ReactCurrentOwner,Vi=!1;function Jr(d,p,w,E){p.child=d===null?FP(p,null,w,E):Du(p,d.child,w,E)}function u3(d,p,w,E,I){w=w.render;var k=p.ref;return Iu(p,I),E=Aw(d,p,w,E,k,I),w=Pw(),d!==null&&!Vi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,na(d,p,I)):(En&&w&&xw(p),p.flags|=1,Jr(d,p,E,I),p.child)}function f3(d,p,w,E,I){if(d===null){var k=w.type;return typeof k=="function"&&!oS(k)&&k.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=k,d3(d,p,k,E,I)):(d=N0(w.type,null,E,p,p.mode,I),d.ref=p.ref,d.return=p,p.child=d)}if(k=d.child,!(d.lanes&I)){var q=k.memoizedProps;if(w=w.compare,w=w!==null?w:Gg,w(q,E)&&d.ref===p.ref)return na(d,p,I)}return p.flags|=1,d=Xa(k,E),d.ref=p.ref,d.return=p,p.child=d}function d3(d,p,w,E,I){if(d!==null&&Gg(d.memoizedProps,E)&&d.ref===p.ref)if(Vi=!1,(d.lanes&I)!==0)d.flags&131072&&(Vi=!0);else return p.lanes=d.lanes,na(d,p,I);return Dw(d,p,w,E,I)}function h3(d,p,w){var E=p.pendingProps,I=E.children,k=d!==null?d.memoizedState:null;if(E.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},vt(Bu,$i),$i|=w;else if(w&1073741824)p.memoizedState={baseLanes:0,cachePool:null},E=k!==null?k.baseLanes:w,vt(Bu,$i),$i|=E;else return d=k!==null?k.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:d,cachePool:null},p.updateQueue=null,vt(Bu,$i),$i|=d,null;else k!==null?(E=k.baseLanes|w,p.memoizedState=null):E=w,vt(Bu,$i),$i|=E;return Jr(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 Dw(d,p,w,E,I){var k=gn(w)?rr:Kt.current;return k=Ui(p,k),Iu(p,I),w=Aw(d,p,w,E,k,I),E=Pw(),d!==null&&!Vi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,na(d,p,I)):(En&&E&&xw(p),p.flags|=1,Jr(d,p,w,I),p.child)}function m3(d,p,w,E,I){if(gn(w)){var k=!0;Ba(p)}else k=!1;if(Iu(p,I),p.stateNode===null)d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),AP(p,w,E),yw(p,w,E,I),E=!0;else if(d===null){var q=p.stateNode,te=p.memoizedProps;q.props=te;var Se=q.context,$e=w.contextType;typeof $e=="object"&&$e!==null?$e=uo($e):($e=gn(w)?rr:Kt.current,$e=Ui(p,$e));var ut=w.getDerivedStateFromProps,Nt=typeof ut=="function"||typeof q.getSnapshotBeforeUpdate=="function";Nt||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(te!==E||Se!==$e)&&PP(p,q,E,$e),ja=!1;var _t=p.memoizedState;q.state=_t,Kg(p,E,q,I),Se=p.memoizedState,te!==E||_t!==Se||Pt.current||ja?(typeof ut=="function"&&(vw(p,w,ut,E),Se=p.memoizedState),(te=ja||RP(p,w,te,E,_t,Se,$e))?(Nt||typeof q.UNSAFE_componentWillMount!="function"&&typeof q.componentWillMount!="function"||(typeof q.componentWillMount=="function"&&q.componentWillMount(),typeof q.UNSAFE_componentWillMount=="function"&&q.UNSAFE_componentWillMount()),typeof q.componentDidMount=="function"&&(p.flags|=4194308)):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=E,p.memoizedState=Se),q.props=E,q.state=Se,q.context=$e,E=te):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),E=!1)}else{q=p.stateNode,MP(d,p),te=p.memoizedProps,$e=p.type===p.elementType?te:Bo(p.type,te),q.props=$e,Nt=p.pendingProps,_t=q.context,Se=w.contextType,typeof Se=="object"&&Se!==null?Se=uo(Se):(Se=gn(w)?rr:Kt.current,Se=Ui(p,Se));var vn=w.getDerivedStateFromProps;(ut=typeof vn=="function"||typeof q.getSnapshotBeforeUpdate=="function")||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(te!==Nt||_t!==Se)&&PP(p,q,E,Se),ja=!1,_t=p.memoizedState,q.state=_t,Kg(p,E,q,I);var yt=p.memoizedState;te!==Nt||_t!==yt||Pt.current||ja?(typeof vn=="function"&&(vw(p,w,vn,E),yt=p.memoizedState),($e=ja||RP(p,w,$e,E,_t,yt,Se)||!1)?(ut||typeof q.UNSAFE_componentWillUpdate!="function"&&typeof q.componentWillUpdate!="function"||(typeof q.componentWillUpdate=="function"&&q.componentWillUpdate(E,yt,Se),typeof q.UNSAFE_componentWillUpdate=="function"&&q.UNSAFE_componentWillUpdate(E,yt,Se)),typeof q.componentDidUpdate=="function"&&(p.flags|=4),typeof q.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof q.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),p.memoizedProps=E,p.memoizedState=yt),q.props=E,q.state=yt,q.context=Se,E=$e):(typeof q.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),E=!1)}return Fw(d,p,w,E,k,I)}function Fw(d,p,w,E,I,k){p3(d,p);var q=(p.flags&128)!==0;if(!E&&!q)return I&&Kr(p,w,!1),na(d,p,k);E=p.stateNode,G7.current=p;var te=q&&typeof w.getDerivedStateFromError!="function"?null:E.render();return p.flags|=1,d!==null&&q?(p.child=Du(p,d.child,null,k),p.child=Du(p,null,te,k)):Jr(d,p,te,k),p.memoizedState=E.state,I&&Kr(p,w,!0),p.child}function g3(d){var p=d.stateNode;p.pendingContext?Mn(d,p.pendingContext,p.pendingContext!==p.context):p.context&&Mn(d,p.context,!1),Mw(d,p.containerInfo)}function v3(d,p,w,E,I){return Ou(),Sw(I),p.flags|=256,Jr(d,p,w,E),p.child}var f0={dehydrated:null,treeContext:null,retryLane:0};function d0(d){return{baseLanes:d,cachePool:null}}function y3(d,p,w){var E=p.pendingProps,I=Pn.current,k=!1,q=(p.flags&128)!==0,te;if((te=q)||(te=d!==null&&d.memoizedState===null?!1:(I&2)!==0),te?(k=!0,p.flags&=-129):(d===null||d.memoizedState!==null)&&(I|=1),vt(Pn,I&1),d===null)return ww(p),d=p.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(p.mode&1?Au(d)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(I=E.children,d=E.fallback,k?(E=p.mode,k=p.child,I={mode:"hidden",children:I},!(E&1)&&k!==null?(k.childLanes=0,k.pendingProps=I):k=I0(I,E,0,null),d=tc(d,E,w,null),k.return=p,d.return=p,k.sibling=d,p.child=k,p.child.memoizedState=d0(w),p.memoizedState=f0,d):zw(p,I));if(I=d.memoizedState,I!==null){if(te=I.dehydrated,te!==null){if(q)return p.flags&256?(p.flags&=-257,h0(d,p,w,Error(s(422)))):p.memoizedState!==null?(p.child=d.child,p.flags|=128,null):(k=E.fallback,I=p.mode,E=I0({mode:"visible",children:E.children},I,0,null),k=tc(k,I,w,null),k.flags|=2,E.return=p,k.return=p,E.sibling=k,p.child=E,p.mode&1&&Du(p,d.child,null,w),p.child.memoizedState=d0(w),p.memoizedState=f0,k);if(!(p.mode&1))p=h0(d,p,w,null);else if(Au(te))p=h0(d,p,w,Error(s(419)));else if(E=(w&d.childLanes)!==0,Vi||E){if(E=Kn,E!==null){switch(w&-w){case 4:k=2;break;case 16:k=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:k=32;break;case 536870912:k=268435456;break;default:k=0}E=k&(E.suspendedLanes|w)?0:k,E!==0&&E!==I.retryLane&&(I.retryLane=E,go(d,E,-1))}iS(),p=h0(d,p,w,Error(s(421)))}else Ru(te)?(p.flags|=128,p.child=d.child,p=oj.bind(null,d),Dg(te,p),p=null):(w=I.treeContext,j&&(ji=zg(te),Bi=p,En=!0,jo=null,ch=!1,w!==null&&(fo[ho++]=Qs,fo[ho++]=ea,fo[ho++]=Xl,Qs=w.id,ea=w.overflow,Xl=p)),p=zw(p,p.pendingProps.children),p.flags|=4096);return p}return k?(E=b3(d,p,E.children,E.fallback,w),k=p.child,I=d.child.memoizedState,k.memoizedState=I===null?d0(w):{baseLanes:I.baseLanes|w,cachePool:null},k.childLanes=d.childLanes&~w,p.memoizedState=f0,E):(w=x3(d,p,E.children,w),p.memoizedState=null,w)}return k?(E=b3(d,p,E.children,E.fallback,w),k=p.child,I=d.child.memoizedState,k.memoizedState=I===null?d0(w):{baseLanes:I.baseLanes|w,cachePool:null},k.childLanes=d.childLanes&~w,p.memoizedState=f0,E):(w=x3(d,p,E.children,w),p.memoizedState=null,w)}function zw(d,p){return p=I0({mode:"visible",children:p},d.mode,0,null),p.return=d,d.child=p}function x3(d,p,w,E){var I=d.child;return d=I.sibling,w=Xa(I,{mode:"visible",children:w}),!(p.mode&1)&&(w.lanes=E),w.return=p,w.sibling=null,d!==null&&(E=p.deletions,E===null?(p.deletions=[d],p.flags|=16):E.push(d)),p.child=w}function b3(d,p,w,E,I){var k=p.mode;d=d.child;var q=d.sibling,te={mode:"hidden",children:w};return!(k&1)&&p.child!==d?(w=p.child,w.childLanes=0,w.pendingProps=te,p.deletions=null):(w=Xa(d,te),w.subtreeFlags=d.subtreeFlags&14680064),q!==null?E=Xa(q,E):(E=tc(E,k,I,null),E.flags|=2),E.return=p,w.return=p,w.sibling=E,p.child=w,E}function h0(d,p,w,E){return E!==null&&Sw(E),Du(p,d.child,null,w),d=zw(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function _3(d,p,w){d.lanes|=p;var E=d.alternate;E!==null&&(E.lanes|=p),mw(d.return,p,w)}function Uw(d,p,w,E,I){var k=d.memoizedState;k===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:E,tail:w,tailMode:I}:(k.isBackwards=p,k.rendering=null,k.renderingStartTime=0,k.last=E,k.tail=w,k.tailMode=I)}function w3(d,p,w){var E=p.pendingProps,I=E.revealOrder,k=E.tail;if(Jr(d,p,E.children,w),E=Pn.current,E&2)E=E&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&&_3(d,w,p);else if(d.tag===19)_3(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}E&=1}if(vt(Pn,E),!(p.mode&1))p.memoizedState=null;else switch(I){case"forwards":for(w=p.child,I=null;w!==null;)d=w.alternate,d!==null&&t0(d)===null&&(I=w),w=w.sibling;w=I,w===null?(I=p.child,p.child=null):(I=w.sibling,w.sibling=null),Uw(p,!1,I,w,k);break;case"backwards":for(w=null,I=p.child,p.child=null;I!==null;){if(d=I.alternate,d!==null&&t0(d)===null){p.child=I;break}d=I.sibling,I.sibling=w,w=I,I=d}Uw(p,!0,w,null,k);break;case"together":Uw(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function na(d,p,w){if(d!==null&&(p.dependencies=d.dependencies),ju|=p.lanes,!(w&p.childLanes))return null;if(d!==null&&p.child!==d.child)throw Error(s(153));if(p.child!==null){for(d=p.child,w=Xa(d,d.pendingProps),p.child=w,w.return=p;d.sibling!==null;)d=d.sibling,w=w.sibling=Xa(d,d.pendingProps),w.return=p;w.sibling=null}return p.child}function X7(d,p,w){switch(p.tag){case 3:g3(p),Ou();break;case 5:zP(p);break;case 1:gn(p.type)&&Ba(p);break;case 4:Mw(p,p.stateNode.containerInfo);break;case 10:SP(p,p.type._context,p.memoizedProps.value);break;case 13:var E=p.memoizedState;if(E!==null)return E.dehydrated!==null?(vt(Pn,Pn.current&1),p.flags|=128,null):w&p.child.childLanes?y3(d,p,w):(vt(Pn,Pn.current&1),d=na(d,p,w),d!==null?d.sibling:null);vt(Pn,Pn.current&1);break;case 19:if(E=(w&p.childLanes)!==0,d.flags&128){if(E)return w3(d,p,w);p.flags|=128}var I=p.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),vt(Pn,Pn.current),E)break;return null;case 22:case 23:return p.lanes=0,h3(d,p,w)}return na(d,p,w)}function q7(d,p){switch(bw(p),p.tag){case 1:return gn(p.type)&&Ua(),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return zu(),$t(Pt),$t(Kt),Tw(),d=p.flags,d&65536&&!(d&128)?(p.flags=d&-65537|128,p):null;case 5:return Ew(p),null;case 13:if($t(Pn),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(s(340));Ou()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return $t(Pn),null;case 4:return zu(),null;case 10:return pw(p.type._context),null;case 22:case 23:return rS(),null;case 24:return null;default:return null}}var p0=!1,Kl=!1,Y7=typeof WeakSet=="function"?WeakSet:Set,et=null;function m0(d,p){var w=d.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(E){yi(d,p,E)}else w.current=null}function Bw(d,p,w){try{w()}catch(E){yi(d,p,E)}}var S3=!1;function K7(d,p){for(Y(d.containerInfo),et=p;et!==null;)if(d=et,p=d.child,(d.subtreeFlags&1028)!==0&&p!==null)p.return=d,et=p;else for(;et!==null;){d=et;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 E=w.memoizedProps,I=w.memoizedState,k=d.stateNode,q=k.getSnapshotBeforeUpdate(d.elementType===d.type?E:Bo(d.type,E),I);k.__reactInternalSnapshotBeforeUpdate=q}break;case 3:Ve&&Ke(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(te){yi(d,d.return,te)}if(p=d.sibling,p!==null){p.return=d.return,et=p;break}et=d.return}return w=S3,S3=!1,w}function Zl(d,p,w){var E=p.updateQueue;if(E=E!==null?E.lastEffect:null,E!==null){var I=E=E.next;do{if((I.tag&d)===d){var k=I.destroy;I.destroy=void 0,k!==void 0&&Bw(p,w,k)}I=I.next}while(I!==E)}}function _h(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 E=w.create;w.destroy=E()}w=w.next}while(w!==p)}}function jw(d){var p=d.ref;if(p!==null){var w=d.stateNode;switch(d.tag){case 5:d=H(w);break;default:d=w}typeof p=="function"?p(d):p.current=d}}function M3(d,p,w){if(ps&&typeof ps.onCommitFiberUnmount=="function")try{ps.onCommitFiberUnmount(Wg,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 E=d=d.next;do{var I=E,k=I.destroy;I=I.tag,k!==void 0&&(I&2||I&4)&&Bw(p,w,k),E=E.next}while(E!==d)}break;case 1:if(m0(p,w),d=p.stateNode,typeof d.componentWillUnmount=="function")try{d.props=p.memoizedProps,d.state=p.memoizedState,d.componentWillUnmount()}catch(q){yi(p,w,q)}break;case 5:m0(p,w);break;case 4:Ve?P3(d,p,w):se&&se&&(p=p.stateNode.containerInfo,w=Bt(p),Yt(p,w))}}function E3(d,p,w){for(var E=p;;)if(M3(d,E,w),E.child===null||Ve&&E.tag===4){if(E===p)break;for(;E.sibling===null;){if(E.return===null||E.return===p)return;E=E.return}E.sibling.return=E.return,E=E.sibling}else E.child.return=E,E=E.child}function C3(d){var p=d.alternate;p!==null&&(d.alternate=null,C3(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&Pe(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 T3(d){return d.tag===5||d.tag===3||d.tag===4}function R3(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||T3(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 A3(d){if(Ve){e:{for(var p=d.return;p!==null;){if(T3(p))break e;p=p.return}throw Error(s(160))}var w=p;switch(w.tag){case 5:p=w.stateNode,w.flags&32&&(dt(p),w.flags&=-33),w=R3(d),$w(d,w,p);break;case 3:case 4:p=w.stateNode.containerInfo,w=R3(d),Vw(d,w,p);break;default:throw Error(s(161))}}}function Vw(d,p,w){var E=d.tag;if(E===5||E===6)d=d.stateNode,p?Ue(w,d,p):ze(w,d);else if(E!==4&&(d=d.child,d!==null))for(Vw(d,p,w),d=d.sibling;d!==null;)Vw(d,p,w),d=d.sibling}function $w(d,p,w){var E=d.tag;if(E===5||E===6)d=d.stateNode,p?Oe(w,d,p):Ne(w,d);else if(E!==4&&(d=d.child,d!==null))for($w(d,p,w),d=d.sibling;d!==null;)$w(d,p,w),d=d.sibling}function P3(d,p,w){for(var E=p,I=!1,k,q;;){if(!I){I=E.return;e:for(;;){if(I===null)throw Error(s(160));switch(k=I.stateNode,I.tag){case 5:q=!1;break e;case 3:k=k.containerInfo,q=!0;break e;case 4:k=k.containerInfo,q=!0;break e}I=I.return}I=!0}if(E.tag===5||E.tag===6)E3(d,E,w),q?ke(k,E.stateNode):Ae(k,E.stateNode);else if(E.tag===18)q?de(k,E.stateNode):ue(k,E.stateNode);else if(E.tag===4){if(E.child!==null){k=E.stateNode.containerInfo,q=!0,E.child.return=E,E=E.child;continue}}else if(M3(d,E,w),E.child!==null){E.child.return=E,E=E.child;continue}if(E===p)break;for(;E.sibling===null;){if(E.return===null||E.return===p)return;E=E.return,E.tag===4&&(I=!1)}E.sibling.return=E.return,E=E.sibling}}function Ww(d,p){if(Ve){switch(p.tag){case 0:case 11:case 14:case 15:Zl(3,p,p.return),_h(3,p),Zl(5,p,p.return);return;case 1:return;case 5:var w=p.stateNode;if(w!=null){var E=p.memoizedProps;d=d!==null?d.memoizedProps:E;var I=p.type,k=p.updateQueue;p.updateQueue=null,k!==null&&xt(w,k,I,d,E,p)}return;case 6:if(p.stateNode===null)throw Error(s(162));w=p.memoizedProps,Le(p.stateNode,d!==null?d.memoizedProps:w,w);return;case 3:j&&d!==null&&d.memoizedState.isDehydrated&&V(p.stateNode.containerInfo);return;case 12:return;case 13:g0(p);return;case 19:g0(p);return;case 17:return}throw Error(s(163))}switch(p.tag){case 0:case 11:case 14:case 15:Zl(3,p,p.return),_h(3,p),Zl(5,p,p.return);return;case 12:return;case 13:g0(p);return;case 19:g0(p);return;case 3:j&&d!==null&&d.memoizedState.isDehydrated&&V(p.stateNode.containerInfo);break;case 22:case 23:return}e:if(se){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,Yt(p.containerInfo,p.pendingChildren);break e}throw Error(s(163))}}function g0(d){var p=d.updateQueue;if(p!==null){d.updateQueue=null;var w=d.stateNode;w===null&&(w=d.stateNode=new Y7),p.forEach(function(E){var I=sj.bind(null,d,E);w.has(E)||(w.add(E),E.then(I,I))})}}function Z7(d,p){for(et=p;et!==null;){p=et;var w=p.deletions;if(w!==null)for(var E=0;E";case y0:return":has("+(Xw(d)||"")+")";case x0:return'[role="'+d.value+'"]';case _0:return'"'+d.value+'"';case b0:return'[data-testname="'+d.value+'"]';default:throw Error(s(365))}}function O3(d,p){var w=[];d=[d,0];for(var E=0;EI&&(I=q),E&=~k}if(E=I,E=fr()-E,E=(120>E?120:480>E?480:1080>E?1080:1920>E?1920:3e3>E?3e3:4320>E?4320:1960*Q7(E/1960))-E,10d?16:d,Wa===null)var E=!1;else{if(d=Wa,Wa=null,C0=0,Wt&6)throw Error(s(331));var I=Wt;for(Wt|=4,et=d.current;et!==null;){var k=et,q=k.child;if(et.flags&16){var te=k.deletions;if(te!==null){for(var Se=0;Sefr()-Zw?Jl(d,0):Kw|=w),vi(d,p)}function W3(d,p){p===0&&(d.mode&1?(p=Vg,Vg<<=1,!(Vg&130023424)&&(Vg=4194304)):p=1);var w=Qr();d=A0(d,p),d!==null&&(lh(d,p,w),vi(d,w))}function oj(d){var p=d.memoizedState,w=0;p!==null&&(w=p.retryLane),W3(d,w)}function sj(d,p){var w=0;switch(d.tag){case 13:var E=d.stateNode,I=d.memoizedState;I!==null&&(w=I.retryLane);break;case 19:E=d.stateNode;break;default:throw Error(s(314))}E!==null&&E.delete(p),W3(d,w)}var H3;H3=function(d,p,w){if(d!==null)if(d.memoizedProps!==p.pendingProps||Pt.current)Vi=!0;else{if(!(d.lanes&w)&&!(p.flags&128))return Vi=!1,X7(d,p,w);Vi=!!(d.flags&131072)}else Vi=!1,En&&p.flags&1048576&&NP(p,Qg,p.index);switch(p.lanes=0,p.tag){case 2:var E=p.type;d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps;var I=Ui(p,Kt.current);Iu(p,w),I=Aw(null,p,E,d,I,w);var k=Pw();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,gn(E)?(k=!0,Ba(p)):k=!1,p.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,gw(p),I.updater=Zg,p.stateNode=I,I._reactInternals=p,yw(p,E,d,w),p=Fw(null,p,E,!0,k,w)):(p.tag=0,En&&k&&xw(p),Jr(null,p,I,w),p=p.child),p;case 16:E=p.elementType;e:{switch(d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps,I=E._init,E=I(E._payload),p.type=E,I=p.tag=lj(E),d=Bo(E,d),I){case 0:p=Dw(null,p,E,d,w);break e;case 1:p=m3(null,p,E,d,w);break e;case 11:p=u3(null,p,E,d,w);break e;case 14:p=f3(null,p,E,Bo(E.type,d),w);break e}throw Error(s(306,E,""))}return p;case 0:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),Dw(d,p,E,I,w);case 1:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),m3(d,p,E,I,w);case 3:e:{if(g3(p),d===null)throw Error(s(387));E=p.pendingProps,k=p.memoizedState,I=k.element,MP(d,p),Kg(p,E,null,w);var q=p.memoizedState;if(E=q.element,j&&k.isDehydrated)if(k={element:E,isDehydrated:!1,cache:q.cache,transitions:q.transitions},p.updateQueue.baseState=k,p.memoizedState=k,p.flags&256){I=Error(s(423)),p=v3(d,p,E,w,I);break e}else if(E!==I){I=Error(s(424)),p=v3(d,p,E,w,I);break e}else for(j&&(ji=Pu(p.stateNode.containerInfo),Bi=p,En=!0,jo=null,ch=!1),w=FP(p,null,E,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Ou(),E===I){p=na(d,p,w);break e}Jr(d,p,E,w)}p=p.child}return p;case 5:return zP(p),d===null&&ww(p),E=p.type,I=p.pendingProps,k=d!==null?d.memoizedProps:null,q=I.children,ae(E,I)?q=null:k!==null&&ae(E,k)&&(p.flags|=32),p3(d,p),Jr(d,p,q,w),p.child;case 6:return d===null&&ww(p),null;case 13:return y3(d,p,w);case 4:return Mw(p,p.stateNode.containerInfo),E=p.pendingProps,d===null?p.child=Du(p,null,E,w):Jr(d,p,E,w),p.child;case 11:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),u3(d,p,E,I,w);case 7:return Jr(d,p,p.pendingProps,w),p.child;case 8:return Jr(d,p,p.pendingProps.children,w),p.child;case 12:return Jr(d,p,p.pendingProps.children,w),p.child;case 10:e:{if(E=p.type._context,I=p.pendingProps,k=p.memoizedProps,q=I.value,SP(p,E,q),k!==null)if(ms(k.value,q)){if(k.children===I.children&&!Pt.current){p=na(d,p,w);break e}}else for(k=p.child,k!==null&&(k.return=p);k!==null;){var te=k.dependencies;if(te!==null){q=k.child;for(var Se=te.firstContext;Se!==null;){if(Se.context===E){if(k.tag===1){Se=Js(-1,w&-w),Se.tag=2;var $e=k.updateQueue;if($e!==null){$e=$e.shared;var ut=$e.pending;ut===null?Se.next=Se:(Se.next=ut.next,ut.next=Se),$e.pending=Se}}k.lanes|=w,Se=k.alternate,Se!==null&&(Se.lanes|=w),mw(k.return,w,p),te.lanes|=w;break}Se=Se.next}}else if(k.tag===10)q=k.type===p.type?null:k.child;else if(k.tag===18){if(q=k.return,q===null)throw Error(s(341));q.lanes|=w,te=q.alternate,te!==null&&(te.lanes|=w),mw(q,w,p),q=k.sibling}else q=k.child;if(q!==null)q.return=k;else for(q=k;q!==null;){if(q===p){q=null;break}if(k=q.sibling,k!==null){k.return=q.return,q=k;break}q=q.return}k=q}Jr(d,p,I.children,w),p=p.child}return p;case 9:return I=p.type,E=p.pendingProps.children,Iu(p,w),I=uo(I),E=E(I),p.flags|=1,Jr(d,p,E,w),p.child;case 14:return E=p.type,I=Bo(E,p.pendingProps),I=Bo(E.type,I),f3(d,p,E,I,w);case 15:return d3(d,p,p.type,p.pendingProps,w);case 17:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,gn(E)?(d=!0,Ba(p)):d=!1,Iu(p,w),AP(p,E,I),yw(p,E,I,w),Fw(null,p,E,!0,d,w);case 19:return w3(d,p,w);case 22:return h3(d,p,w)}throw Error(s(156,p.tag))};function G3(d,p){return lw(d,p)}function aj(d,p,w,E){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=E,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vo(d,p,w,E){return new aj(d,p,w,E)}function oS(d){return d=d.prototype,!(!d||!d.isReactComponent)}function lj(d){if(typeof d=="function")return oS(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===b)return 14}return 2}function Xa(d,p){var w=d.alternate;return w===null?(w=vo(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 N0(d,p,w,E,I,k){var q=2;if(E=d,typeof d=="function")oS(d)&&(q=1);else if(typeof d=="string")q=5;else e:switch(d){case u:return tc(w.children,I,k,p);case f:q=8,I|=8;break;case h:return d=vo(12,w,p,I|2),d.elementType=h,d.lanes=k,d;case y:return d=vo(13,w,p,I),d.elementType=y,d.lanes=k,d;case g:return d=vo(19,w,p,I),d.elementType=g,d.lanes=k,d;case S:return I0(w,I,k,p);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case m:q=10;break e;case v:q=9;break e;case x:q=11;break e;case b:q=14;break e;case _:q=16,E=null;break e}throw Error(s(130,d==null?d:typeof d,""))}return p=vo(q,w,p,I),p.elementType=d,p.type=E,p.lanes=k,p}function tc(d,p,w,E){return d=vo(7,d,E,p),d.lanes=w,d}function I0(d,p,w,E){return d=vo(22,d,E,p),d.elementType=S,d.lanes=w,d.stateNode={},d}function sS(d,p,w){return d=vo(6,d,null,p),d.lanes=w,d}function aS(d,p,w){return p=vo(4,d.children!==null?d.children:[],d.key,p),p.lanes=w,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}function cj(d,p,w,E,I){this.tag=p,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=He,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sw(0),this.expirationTimes=sw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sw(0),this.identifierPrefix=E,this.onRecoverableError=I,j&&(this.mutableSourceEagerHydrationData=null)}function X3(d,p,w,E,I,k,q,te,Se){return d=new cj(d,p,w,te,Se),p===1?(p=1,k===!0&&(p|=8)):p=0,k=vo(3,null,null,p),d.current=k,k.stateNode=d,k.memoizedState={element:E,isDehydrated:w,cache:null,transitions:null},gw(k),d}function q3(d){if(!d)return ft;d=d._reactInternals;e:{if(U(d)!==d||d.tag!==1)throw Error(s(170));var p=d;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(gn(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(s(171))}if(d.tag===1){var w=d.type;if(gn(w))return Uo(d,w,p)}return p}function Y3(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(s(188)):(d=Object.keys(d).join(","),Error(s(268,d)));return d=D(p),d===null?null:d.stateNode}function K3(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var w=d.retryLane;d.retryLane=w!==0&&w=$e&&k>=Nt&&I<=ut&&q<=_t){d.splice(p,1);break}else if(E!==$e||w.width!==Se.width||_tq){if(!(k!==Nt||w.height!==Se.height||utI)){$e>E&&(Se.width+=$e-E,Se.x=E),utk&&(Se.height+=Nt-k,Se.y=k),_tw&&(w=q)),qJw&&(p.flags|=128,E=!0,bh(I,!1),p.lanes=4194304)}else{if(!E)if(d=t0(k),d!==null){if(p.flags|=128,E=!0,d=d.updateQueue,d!==null&&(p.updateQueue=d,p.flags|=4),bh(I,!0),I.tail===null&&I.tailMode==="hidden"&&!k.alternate&&!En)return Fr(p),null}else 2*fr()-I.renderingStartTime>Jw&&w!==1073741824&&(p.flags|=128,E=!0,bh(I,!1),p.lanes=4194304);I.isBackwards?(k.sibling=p.child,p.child=k):(d=I.last,d!==null?d.sibling=k:p.child=k,I.last=k)}return I.tail!==null?(p=I.tail,I.rendering=p,I.tail=p.sibling,I.renderingStartTime=fr(),p.sibling=null,d=Pn.current,vt(Pn,E?d&1|2:d&1),p):(Fr(p),null);case 22:case 23:return rS(),E=p.memoizedState!==null,d!==null&&d.memoizedState!==null!==E&&(p.flags|=8192),E&&p.mode&1?$i&1073741824&&(Fr(p),Ve&&p.subtreeFlags&6&&(p.flags|=8192)):Fr(p),null;case 24:return null;case 25:return null}throw Error(s(156,p.tag))}var X7=a.ReactCurrentOwner,Vi=!1;function Jr(d,p,w,E){p.child=d===null?FP(p,null,w,E):Du(p,d.child,w,E)}function u3(d,p,w,E,I){w=w.render;var k=p.ref;return Iu(p,I),E=Aw(d,p,w,E,k,I),w=Pw(),d!==null&&!Vi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,na(d,p,I)):(En&&w&&xw(p),p.flags|=1,Jr(d,p,E,I),p.child)}function f3(d,p,w,E,I){if(d===null){var k=w.type;return typeof k=="function"&&!oS(k)&&k.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=k,d3(d,p,k,E,I)):(d=N0(w.type,null,E,p,p.mode,I),d.ref=p.ref,d.return=p,p.child=d)}if(k=d.child,!(d.lanes&I)){var q=k.memoizedProps;if(w=w.compare,w=w!==null?w:Gg,w(q,E)&&d.ref===p.ref)return na(d,p,I)}return p.flags|=1,d=Xa(k,E),d.ref=p.ref,d.return=p,p.child=d}function d3(d,p,w,E,I){if(d!==null&&Gg(d.memoizedProps,E)&&d.ref===p.ref)if(Vi=!1,(d.lanes&I)!==0)d.flags&131072&&(Vi=!0);else return p.lanes=d.lanes,na(d,p,I);return Dw(d,p,w,E,I)}function h3(d,p,w){var E=p.pendingProps,I=E.children,k=d!==null?d.memoizedState:null;if(E.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},vt(Bu,$i),$i|=w;else if(w&1073741824)p.memoizedState={baseLanes:0,cachePool:null},E=k!==null?k.baseLanes:w,vt(Bu,$i),$i|=E;else return d=k!==null?k.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:d,cachePool:null},p.updateQueue=null,vt(Bu,$i),$i|=d,null;else k!==null?(E=k.baseLanes|w,p.memoizedState=null):E=w,vt(Bu,$i),$i|=E;return Jr(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 Dw(d,p,w,E,I){var k=gn(w)?rr:Kt.current;return k=Ui(p,k),Iu(p,I),w=Aw(d,p,w,E,k,I),E=Pw(),d!==null&&!Vi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,na(d,p,I)):(En&&E&&xw(p),p.flags|=1,Jr(d,p,w,I),p.child)}function m3(d,p,w,E,I){if(gn(w)){var k=!0;Ba(p)}else k=!1;if(Iu(p,I),p.stateNode===null)d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),AP(p,w,E),yw(p,w,E,I),E=!0;else if(d===null){var q=p.stateNode,te=p.memoizedProps;q.props=te;var Se=q.context,$e=w.contextType;typeof $e=="object"&&$e!==null?$e=uo($e):($e=gn(w)?rr:Kt.current,$e=Ui(p,$e));var ut=w.getDerivedStateFromProps,Nt=typeof ut=="function"||typeof q.getSnapshotBeforeUpdate=="function";Nt||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(te!==E||Se!==$e)&&PP(p,q,E,$e),ja=!1;var _t=p.memoizedState;q.state=_t,Kg(p,E,q,I),Se=p.memoizedState,te!==E||_t!==Se||Pt.current||ja?(typeof ut=="function"&&(vw(p,w,ut,E),Se=p.memoizedState),(te=ja||RP(p,w,te,E,_t,Se,$e))?(Nt||typeof q.UNSAFE_componentWillMount!="function"&&typeof q.componentWillMount!="function"||(typeof q.componentWillMount=="function"&&q.componentWillMount(),typeof q.UNSAFE_componentWillMount=="function"&&q.UNSAFE_componentWillMount()),typeof q.componentDidMount=="function"&&(p.flags|=4194308)):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=E,p.memoizedState=Se),q.props=E,q.state=Se,q.context=$e,E=te):(typeof q.componentDidMount=="function"&&(p.flags|=4194308),E=!1)}else{q=p.stateNode,MP(d,p),te=p.memoizedProps,$e=p.type===p.elementType?te:Bo(p.type,te),q.props=$e,Nt=p.pendingProps,_t=q.context,Se=w.contextType,typeof Se=="object"&&Se!==null?Se=uo(Se):(Se=gn(w)?rr:Kt.current,Se=Ui(p,Se));var vn=w.getDerivedStateFromProps;(ut=typeof vn=="function"||typeof q.getSnapshotBeforeUpdate=="function")||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(te!==Nt||_t!==Se)&&PP(p,q,E,Se),ja=!1,_t=p.memoizedState,q.state=_t,Kg(p,E,q,I);var yt=p.memoizedState;te!==Nt||_t!==yt||Pt.current||ja?(typeof vn=="function"&&(vw(p,w,vn,E),yt=p.memoizedState),($e=ja||RP(p,w,$e,E,_t,yt,Se)||!1)?(ut||typeof q.UNSAFE_componentWillUpdate!="function"&&typeof q.componentWillUpdate!="function"||(typeof q.componentWillUpdate=="function"&&q.componentWillUpdate(E,yt,Se),typeof q.UNSAFE_componentWillUpdate=="function"&&q.UNSAFE_componentWillUpdate(E,yt,Se)),typeof q.componentDidUpdate=="function"&&(p.flags|=4),typeof q.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof q.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),p.memoizedProps=E,p.memoizedState=yt),q.props=E,q.state=yt,q.context=Se,E=$e):(typeof q.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),E=!1)}return Fw(d,p,w,E,k,I)}function Fw(d,p,w,E,I,k){p3(d,p);var q=(p.flags&128)!==0;if(!E&&!q)return I&&Kr(p,w,!1),na(d,p,k);E=p.stateNode,X7.current=p;var te=q&&typeof w.getDerivedStateFromError!="function"?null:E.render();return p.flags|=1,d!==null&&q?(p.child=Du(p,d.child,null,k),p.child=Du(p,null,te,k)):Jr(d,p,te,k),p.memoizedState=E.state,I&&Kr(p,w,!0),p.child}function g3(d){var p=d.stateNode;p.pendingContext?Mn(d,p.pendingContext,p.pendingContext!==p.context):p.context&&Mn(d,p.context,!1),Mw(d,p.containerInfo)}function v3(d,p,w,E,I){return Ou(),Sw(I),p.flags|=256,Jr(d,p,w,E),p.child}var f0={dehydrated:null,treeContext:null,retryLane:0};function d0(d){return{baseLanes:d,cachePool:null}}function y3(d,p,w){var E=p.pendingProps,I=Pn.current,k=!1,q=(p.flags&128)!==0,te;if((te=q)||(te=d!==null&&d.memoizedState===null?!1:(I&2)!==0),te?(k=!0,p.flags&=-129):(d===null||d.memoizedState!==null)&&(I|=1),vt(Pn,I&1),d===null)return ww(p),d=p.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(p.mode&1?Au(d)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(I=E.children,d=E.fallback,k?(E=p.mode,k=p.child,I={mode:"hidden",children:I},!(E&1)&&k!==null?(k.childLanes=0,k.pendingProps=I):k=I0(I,E,0,null),d=tc(d,E,w,null),k.return=p,d.return=p,k.sibling=d,p.child=k,p.child.memoizedState=d0(w),p.memoizedState=f0,d):zw(p,I));if(I=d.memoizedState,I!==null){if(te=I.dehydrated,te!==null){if(q)return p.flags&256?(p.flags&=-257,h0(d,p,w,Error(s(422)))):p.memoizedState!==null?(p.child=d.child,p.flags|=128,null):(k=E.fallback,I=p.mode,E=I0({mode:"visible",children:E.children},I,0,null),k=tc(k,I,w,null),k.flags|=2,E.return=p,k.return=p,E.sibling=k,p.child=E,p.mode&1&&Du(p,d.child,null,w),p.child.memoizedState=d0(w),p.memoizedState=f0,k);if(!(p.mode&1))p=h0(d,p,w,null);else if(Au(te))p=h0(d,p,w,Error(s(419)));else if(E=(w&d.childLanes)!==0,Vi||E){if(E=Kn,E!==null){switch(w&-w){case 4:k=2;break;case 16:k=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:k=32;break;case 536870912:k=268435456;break;default:k=0}E=k&(E.suspendedLanes|w)?0:k,E!==0&&E!==I.retryLane&&(I.retryLane=E,go(d,E,-1))}iS(),p=h0(d,p,w,Error(s(421)))}else Ru(te)?(p.flags|=128,p.child=d.child,p=sj.bind(null,d),Dg(te,p),p=null):(w=I.treeContext,j&&(ji=zg(te),Bi=p,En=!0,jo=null,ch=!1,w!==null&&(fo[ho++]=Qs,fo[ho++]=ea,fo[ho++]=Xl,Qs=w.id,ea=w.overflow,Xl=p)),p=zw(p,p.pendingProps.children),p.flags|=4096);return p}return k?(E=b3(d,p,E.children,E.fallback,w),k=p.child,I=d.child.memoizedState,k.memoizedState=I===null?d0(w):{baseLanes:I.baseLanes|w,cachePool:null},k.childLanes=d.childLanes&~w,p.memoizedState=f0,E):(w=x3(d,p,E.children,w),p.memoizedState=null,w)}return k?(E=b3(d,p,E.children,E.fallback,w),k=p.child,I=d.child.memoizedState,k.memoizedState=I===null?d0(w):{baseLanes:I.baseLanes|w,cachePool:null},k.childLanes=d.childLanes&~w,p.memoizedState=f0,E):(w=x3(d,p,E.children,w),p.memoizedState=null,w)}function zw(d,p){return p=I0({mode:"visible",children:p},d.mode,0,null),p.return=d,d.child=p}function x3(d,p,w,E){var I=d.child;return d=I.sibling,w=Xa(I,{mode:"visible",children:w}),!(p.mode&1)&&(w.lanes=E),w.return=p,w.sibling=null,d!==null&&(E=p.deletions,E===null?(p.deletions=[d],p.flags|=16):E.push(d)),p.child=w}function b3(d,p,w,E,I){var k=p.mode;d=d.child;var q=d.sibling,te={mode:"hidden",children:w};return!(k&1)&&p.child!==d?(w=p.child,w.childLanes=0,w.pendingProps=te,p.deletions=null):(w=Xa(d,te),w.subtreeFlags=d.subtreeFlags&14680064),q!==null?E=Xa(q,E):(E=tc(E,k,I,null),E.flags|=2),E.return=p,w.return=p,w.sibling=E,p.child=w,E}function h0(d,p,w,E){return E!==null&&Sw(E),Du(p,d.child,null,w),d=zw(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function _3(d,p,w){d.lanes|=p;var E=d.alternate;E!==null&&(E.lanes|=p),mw(d.return,p,w)}function Uw(d,p,w,E,I){var k=d.memoizedState;k===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:E,tail:w,tailMode:I}:(k.isBackwards=p,k.rendering=null,k.renderingStartTime=0,k.last=E,k.tail=w,k.tailMode=I)}function w3(d,p,w){var E=p.pendingProps,I=E.revealOrder,k=E.tail;if(Jr(d,p,E.children,w),E=Pn.current,E&2)E=E&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&&_3(d,w,p);else if(d.tag===19)_3(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}E&=1}if(vt(Pn,E),!(p.mode&1))p.memoizedState=null;else switch(I){case"forwards":for(w=p.child,I=null;w!==null;)d=w.alternate,d!==null&&t0(d)===null&&(I=w),w=w.sibling;w=I,w===null?(I=p.child,p.child=null):(I=w.sibling,w.sibling=null),Uw(p,!1,I,w,k);break;case"backwards":for(w=null,I=p.child,p.child=null;I!==null;){if(d=I.alternate,d!==null&&t0(d)===null){p.child=I;break}d=I.sibling,I.sibling=w,w=I,I=d}Uw(p,!0,w,null,k);break;case"together":Uw(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function na(d,p,w){if(d!==null&&(p.dependencies=d.dependencies),ju|=p.lanes,!(w&p.childLanes))return null;if(d!==null&&p.child!==d.child)throw Error(s(153));if(p.child!==null){for(d=p.child,w=Xa(d,d.pendingProps),p.child=w,w.return=p;d.sibling!==null;)d=d.sibling,w=w.sibling=Xa(d,d.pendingProps),w.return=p;w.sibling=null}return p.child}function q7(d,p,w){switch(p.tag){case 3:g3(p),Ou();break;case 5:zP(p);break;case 1:gn(p.type)&&Ba(p);break;case 4:Mw(p,p.stateNode.containerInfo);break;case 10:SP(p,p.type._context,p.memoizedProps.value);break;case 13:var E=p.memoizedState;if(E!==null)return E.dehydrated!==null?(vt(Pn,Pn.current&1),p.flags|=128,null):w&p.child.childLanes?y3(d,p,w):(vt(Pn,Pn.current&1),d=na(d,p,w),d!==null?d.sibling:null);vt(Pn,Pn.current&1);break;case 19:if(E=(w&p.childLanes)!==0,d.flags&128){if(E)return w3(d,p,w);p.flags|=128}var I=p.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),vt(Pn,Pn.current),E)break;return null;case 22:case 23:return p.lanes=0,h3(d,p,w)}return na(d,p,w)}function Y7(d,p){switch(bw(p),p.tag){case 1:return gn(p.type)&&Ua(),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return zu(),$t(Pt),$t(Kt),Tw(),d=p.flags,d&65536&&!(d&128)?(p.flags=d&-65537|128,p):null;case 5:return Ew(p),null;case 13:if($t(Pn),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(s(340));Ou()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return $t(Pn),null;case 4:return zu(),null;case 10:return pw(p.type._context),null;case 22:case 23:return rS(),null;case 24:return null;default:return null}}var p0=!1,Kl=!1,K7=typeof WeakSet=="function"?WeakSet:Set,et=null;function m0(d,p){var w=d.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(E){yi(d,p,E)}else w.current=null}function Bw(d,p,w){try{w()}catch(E){yi(d,p,E)}}var S3=!1;function Z7(d,p){for(Y(d.containerInfo),et=p;et!==null;)if(d=et,p=d.child,(d.subtreeFlags&1028)!==0&&p!==null)p.return=d,et=p;else for(;et!==null;){d=et;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 E=w.memoizedProps,I=w.memoizedState,k=d.stateNode,q=k.getSnapshotBeforeUpdate(d.elementType===d.type?E:Bo(d.type,E),I);k.__reactInternalSnapshotBeforeUpdate=q}break;case 3:Ve&&Ke(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(te){yi(d,d.return,te)}if(p=d.sibling,p!==null){p.return=d.return,et=p;break}et=d.return}return w=S3,S3=!1,w}function Zl(d,p,w){var E=p.updateQueue;if(E=E!==null?E.lastEffect:null,E!==null){var I=E=E.next;do{if((I.tag&d)===d){var k=I.destroy;I.destroy=void 0,k!==void 0&&Bw(p,w,k)}I=I.next}while(I!==E)}}function _h(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 E=w.create;w.destroy=E()}w=w.next}while(w!==p)}}function jw(d){var p=d.ref;if(p!==null){var w=d.stateNode;switch(d.tag){case 5:d=H(w);break;default:d=w}typeof p=="function"?p(d):p.current=d}}function M3(d,p,w){if(ps&&typeof ps.onCommitFiberUnmount=="function")try{ps.onCommitFiberUnmount(Wg,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 E=d=d.next;do{var I=E,k=I.destroy;I=I.tag,k!==void 0&&(I&2||I&4)&&Bw(p,w,k),E=E.next}while(E!==d)}break;case 1:if(m0(p,w),d=p.stateNode,typeof d.componentWillUnmount=="function")try{d.props=p.memoizedProps,d.state=p.memoizedState,d.componentWillUnmount()}catch(q){yi(p,w,q)}break;case 5:m0(p,w);break;case 4:Ve?P3(d,p,w):se&&se&&(p=p.stateNode.containerInfo,w=Bt(p),Yt(p,w))}}function E3(d,p,w){for(var E=p;;)if(M3(d,E,w),E.child===null||Ve&&E.tag===4){if(E===p)break;for(;E.sibling===null;){if(E.return===null||E.return===p)return;E=E.return}E.sibling.return=E.return,E=E.sibling}else E.child.return=E,E=E.child}function C3(d){var p=d.alternate;p!==null&&(d.alternate=null,C3(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&Pe(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 T3(d){return d.tag===5||d.tag===3||d.tag===4}function R3(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||T3(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 A3(d){if(Ve){e:{for(var p=d.return;p!==null;){if(T3(p))break e;p=p.return}throw Error(s(160))}var w=p;switch(w.tag){case 5:p=w.stateNode,w.flags&32&&(dt(p),w.flags&=-33),w=R3(d),$w(d,w,p);break;case 3:case 4:p=w.stateNode.containerInfo,w=R3(d),Vw(d,w,p);break;default:throw Error(s(161))}}}function Vw(d,p,w){var E=d.tag;if(E===5||E===6)d=d.stateNode,p?Ue(w,d,p):ze(w,d);else if(E!==4&&(d=d.child,d!==null))for(Vw(d,p,w),d=d.sibling;d!==null;)Vw(d,p,w),d=d.sibling}function $w(d,p,w){var E=d.tag;if(E===5||E===6)d=d.stateNode,p?Oe(w,d,p):Ne(w,d);else if(E!==4&&(d=d.child,d!==null))for($w(d,p,w),d=d.sibling;d!==null;)$w(d,p,w),d=d.sibling}function P3(d,p,w){for(var E=p,I=!1,k,q;;){if(!I){I=E.return;e:for(;;){if(I===null)throw Error(s(160));switch(k=I.stateNode,I.tag){case 5:q=!1;break e;case 3:k=k.containerInfo,q=!0;break e;case 4:k=k.containerInfo,q=!0;break e}I=I.return}I=!0}if(E.tag===5||E.tag===6)E3(d,E,w),q?ke(k,E.stateNode):Ae(k,E.stateNode);else if(E.tag===18)q?de(k,E.stateNode):ue(k,E.stateNode);else if(E.tag===4){if(E.child!==null){k=E.stateNode.containerInfo,q=!0,E.child.return=E,E=E.child;continue}}else if(M3(d,E,w),E.child!==null){E.child.return=E,E=E.child;continue}if(E===p)break;for(;E.sibling===null;){if(E.return===null||E.return===p)return;E=E.return,E.tag===4&&(I=!1)}E.sibling.return=E.return,E=E.sibling}}function Ww(d,p){if(Ve){switch(p.tag){case 0:case 11:case 14:case 15:Zl(3,p,p.return),_h(3,p),Zl(5,p,p.return);return;case 1:return;case 5:var w=p.stateNode;if(w!=null){var E=p.memoizedProps;d=d!==null?d.memoizedProps:E;var I=p.type,k=p.updateQueue;p.updateQueue=null,k!==null&&xt(w,k,I,d,E,p)}return;case 6:if(p.stateNode===null)throw Error(s(162));w=p.memoizedProps,Le(p.stateNode,d!==null?d.memoizedProps:w,w);return;case 3:j&&d!==null&&d.memoizedState.isDehydrated&&V(p.stateNode.containerInfo);return;case 12:return;case 13:g0(p);return;case 19:g0(p);return;case 17:return}throw Error(s(163))}switch(p.tag){case 0:case 11:case 14:case 15:Zl(3,p,p.return),_h(3,p),Zl(5,p,p.return);return;case 12:return;case 13:g0(p);return;case 19:g0(p);return;case 3:j&&d!==null&&d.memoizedState.isDehydrated&&V(p.stateNode.containerInfo);break;case 22:case 23:return}e:if(se){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,Yt(p.containerInfo,p.pendingChildren);break e}throw Error(s(163))}}function g0(d){var p=d.updateQueue;if(p!==null){d.updateQueue=null;var w=d.stateNode;w===null&&(w=d.stateNode=new K7),p.forEach(function(E){var I=aj.bind(null,d,E);w.has(E)||(w.add(E),E.then(I,I))})}}function J7(d,p){for(et=p;et!==null;){p=et;var w=p.deletions;if(w!==null)for(var E=0;E";case y0:return":has("+(Xw(d)||"")+")";case x0:return'[role="'+d.value+'"]';case _0:return'"'+d.value+'"';case b0:return'[data-testname="'+d.value+'"]';default:throw Error(s(365))}}function O3(d,p){var w=[];d=[d,0];for(var E=0;EI&&(I=q),E&=~k}if(E=I,E=fr()-E,E=(120>E?120:480>E?480:1080>E?1080:1920>E?1920:3e3>E?3e3:4320>E?4320:1960*ej(E/1960))-E,10d?16:d,Wa===null)var E=!1;else{if(d=Wa,Wa=null,C0=0,Wt&6)throw Error(s(331));var I=Wt;for(Wt|=4,et=d.current;et!==null;){var k=et,q=k.child;if(et.flags&16){var te=k.deletions;if(te!==null){for(var Se=0;Sefr()-Zw?Jl(d,0):Kw|=w),vi(d,p)}function W3(d,p){p===0&&(d.mode&1?(p=Vg,Vg<<=1,!(Vg&130023424)&&(Vg=4194304)):p=1);var w=Qr();d=A0(d,p),d!==null&&(lh(d,p,w),vi(d,w))}function sj(d){var p=d.memoizedState,w=0;p!==null&&(w=p.retryLane),W3(d,w)}function aj(d,p){var w=0;switch(d.tag){case 13:var E=d.stateNode,I=d.memoizedState;I!==null&&(w=I.retryLane);break;case 19:E=d.stateNode;break;default:throw Error(s(314))}E!==null&&E.delete(p),W3(d,w)}var H3;H3=function(d,p,w){if(d!==null)if(d.memoizedProps!==p.pendingProps||Pt.current)Vi=!0;else{if(!(d.lanes&w)&&!(p.flags&128))return Vi=!1,q7(d,p,w);Vi=!!(d.flags&131072)}else Vi=!1,En&&p.flags&1048576&&NP(p,Qg,p.index);switch(p.lanes=0,p.tag){case 2:var E=p.type;d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps;var I=Ui(p,Kt.current);Iu(p,w),I=Aw(null,p,E,d,I,w);var k=Pw();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,gn(E)?(k=!0,Ba(p)):k=!1,p.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,gw(p),I.updater=Zg,p.stateNode=I,I._reactInternals=p,yw(p,E,d,w),p=Fw(null,p,E,!0,k,w)):(p.tag=0,En&&k&&xw(p),Jr(null,p,I,w),p=p.child),p;case 16:E=p.elementType;e:{switch(d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps,I=E._init,E=I(E._payload),p.type=E,I=p.tag=cj(E),d=Bo(E,d),I){case 0:p=Dw(null,p,E,d,w);break e;case 1:p=m3(null,p,E,d,w);break e;case 11:p=u3(null,p,E,d,w);break e;case 14:p=f3(null,p,E,Bo(E.type,d),w);break e}throw Error(s(306,E,""))}return p;case 0:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),Dw(d,p,E,I,w);case 1:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),m3(d,p,E,I,w);case 3:e:{if(g3(p),d===null)throw Error(s(387));E=p.pendingProps,k=p.memoizedState,I=k.element,MP(d,p),Kg(p,E,null,w);var q=p.memoizedState;if(E=q.element,j&&k.isDehydrated)if(k={element:E,isDehydrated:!1,cache:q.cache,transitions:q.transitions},p.updateQueue.baseState=k,p.memoizedState=k,p.flags&256){I=Error(s(423)),p=v3(d,p,E,w,I);break e}else if(E!==I){I=Error(s(424)),p=v3(d,p,E,w,I);break e}else for(j&&(ji=Pu(p.stateNode.containerInfo),Bi=p,En=!0,jo=null,ch=!1),w=FP(p,null,E,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Ou(),E===I){p=na(d,p,w);break e}Jr(d,p,E,w)}p=p.child}return p;case 5:return zP(p),d===null&&ww(p),E=p.type,I=p.pendingProps,k=d!==null?d.memoizedProps:null,q=I.children,ae(E,I)?q=null:k!==null&&ae(E,k)&&(p.flags|=32),p3(d,p),Jr(d,p,q,w),p.child;case 6:return d===null&&ww(p),null;case 13:return y3(d,p,w);case 4:return Mw(p,p.stateNode.containerInfo),E=p.pendingProps,d===null?p.child=Du(p,null,E,w):Jr(d,p,E,w),p.child;case 11:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),u3(d,p,E,I,w);case 7:return Jr(d,p,p.pendingProps,w),p.child;case 8:return Jr(d,p,p.pendingProps.children,w),p.child;case 12:return Jr(d,p,p.pendingProps.children,w),p.child;case 10:e:{if(E=p.type._context,I=p.pendingProps,k=p.memoizedProps,q=I.value,SP(p,E,q),k!==null)if(ms(k.value,q)){if(k.children===I.children&&!Pt.current){p=na(d,p,w);break e}}else for(k=p.child,k!==null&&(k.return=p);k!==null;){var te=k.dependencies;if(te!==null){q=k.child;for(var Se=te.firstContext;Se!==null;){if(Se.context===E){if(k.tag===1){Se=Js(-1,w&-w),Se.tag=2;var $e=k.updateQueue;if($e!==null){$e=$e.shared;var ut=$e.pending;ut===null?Se.next=Se:(Se.next=ut.next,ut.next=Se),$e.pending=Se}}k.lanes|=w,Se=k.alternate,Se!==null&&(Se.lanes|=w),mw(k.return,w,p),te.lanes|=w;break}Se=Se.next}}else if(k.tag===10)q=k.type===p.type?null:k.child;else if(k.tag===18){if(q=k.return,q===null)throw Error(s(341));q.lanes|=w,te=q.alternate,te!==null&&(te.lanes|=w),mw(q,w,p),q=k.sibling}else q=k.child;if(q!==null)q.return=k;else for(q=k;q!==null;){if(q===p){q=null;break}if(k=q.sibling,k!==null){k.return=q.return,q=k;break}q=q.return}k=q}Jr(d,p,I.children,w),p=p.child}return p;case 9:return I=p.type,E=p.pendingProps.children,Iu(p,w),I=uo(I),E=E(I),p.flags|=1,Jr(d,p,E,w),p.child;case 14:return E=p.type,I=Bo(E,p.pendingProps),I=Bo(E.type,I),f3(d,p,E,I,w);case 15:return d3(d,p,p.type,p.pendingProps,w);case 17:return E=p.type,I=p.pendingProps,I=p.elementType===E?I:Bo(E,I),d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,gn(E)?(d=!0,Ba(p)):d=!1,Iu(p,w),AP(p,E,I),yw(p,E,I,w),Fw(null,p,E,!0,d,w);case 19:return w3(d,p,w);case 22:return h3(d,p,w)}throw Error(s(156,p.tag))};function G3(d,p){return lw(d,p)}function lj(d,p,w,E){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=E,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vo(d,p,w,E){return new lj(d,p,w,E)}function oS(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cj(d){if(typeof d=="function")return oS(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===b)return 14}return 2}function Xa(d,p){var w=d.alternate;return w===null?(w=vo(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 N0(d,p,w,E,I,k){var q=2;if(E=d,typeof d=="function")oS(d)&&(q=1);else if(typeof d=="string")q=5;else e:switch(d){case u:return tc(w.children,I,k,p);case f:q=8,I|=8;break;case h:return d=vo(12,w,p,I|2),d.elementType=h,d.lanes=k,d;case y:return d=vo(13,w,p,I),d.elementType=y,d.lanes=k,d;case g:return d=vo(19,w,p,I),d.elementType=g,d.lanes=k,d;case S:return I0(w,I,k,p);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case m:q=10;break e;case v:q=9;break e;case x:q=11;break e;case b:q=14;break e;case _:q=16,E=null;break e}throw Error(s(130,d==null?d:typeof d,""))}return p=vo(q,w,p,I),p.elementType=d,p.type=E,p.lanes=k,p}function tc(d,p,w,E){return d=vo(7,d,E,p),d.lanes=w,d}function I0(d,p,w,E){return d=vo(22,d,E,p),d.elementType=S,d.lanes=w,d.stateNode={},d}function sS(d,p,w){return d=vo(6,d,null,p),d.lanes=w,d}function aS(d,p,w){return p=vo(4,d.children!==null?d.children:[],d.key,p),p.lanes=w,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}function uj(d,p,w,E,I){this.tag=p,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=He,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sw(0),this.expirationTimes=sw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sw(0),this.identifierPrefix=E,this.onRecoverableError=I,j&&(this.mutableSourceEagerHydrationData=null)}function X3(d,p,w,E,I,k,q,te,Se){return d=new uj(d,p,w,te,Se),p===1?(p=1,k===!0&&(p|=8)):p=0,k=vo(3,null,null,p),d.current=k,k.stateNode=d,k.memoizedState={element:E,isDehydrated:w,cache:null,transitions:null},gw(k),d}function q3(d){if(!d)return ft;d=d._reactInternals;e:{if(U(d)!==d||d.tag!==1)throw Error(s(170));var p=d;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(gn(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(s(171))}if(d.tag===1){var w=d.type;if(gn(w))return Uo(d,w,p)}return p}function Y3(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(s(188)):(d=Object.keys(d).join(","),Error(s(268,d)));return d=D(p),d===null?null:d.stateNode}function K3(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var w=d.retryLane;d.retryLane=w!==0&&w=$e&&k>=Nt&&I<=ut&&q<=_t){d.splice(p,1);break}else if(E!==$e||w.width!==Se.width||_tq){if(!(k!==Nt||w.height!==Se.height||utI)){$e>E&&(Se.width+=$e-E,Se.x=E),utk&&(Se.height+=Nt-k,Se.y=k),_tw&&(w=q)),q ")+` 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 H(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:uj,findFiberByHostInstance:d.findFiberByHostInstance||fj,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{Wg=p.inject(d),ps=p}catch{}d=!!p.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,p,w,E){if(!$)throw Error(s(363));d=qw(d,p);var I=Fe(d,w,E).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=rn;try{return rn=d,p()}finally{rn=w}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,p,w,E){var I=p.current,k=Qr(),q=Ha(I);return w=q3(w),p.context===null?p.context=w:p.pendingContext=w,p=Js(k,q),p.payload={element:d},E=E===void 0?null:E,E!==null&&(p.callback=E),Va(I,p),d=go(I,q,k),d!==null&&Yg(d,I,q),q},n};HB.exports=$fe;var Wfe=HB.exports;const Hfe=$s(Wfe),CA={},qB=t=>void Object.assign(CA,t);function Gfe(t,e){function n(u,{args:f=[],attach:h,...m},v){let x=`${u[0].toUpperCase()}${u.slice(1)}`,y;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;y=Ef(g,{type:u,root:v,attach:h,primitive:!0})}else{const g=CA[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!");y=Ef(new g(...f),{type:u,root:v,attach:h,memoizedProps:{args:f}})}return y.__r3f.attach===void 0&&(y instanceof zt?y.__r3f.attach="geometry":y instanceof Ir&&(y.__r3f.attach="material")),x!=="inject"&&QM(y,m),y}function r(u,f){let h=!1;if(f){var m,v;(m=f.__r3f)!=null&&m.attach?JM(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),h=!0),h||(v=u.__r3f)==null||v.objects.push(f),f.__r3f||Ef(f,{}),f.__r3f.parent=u,yC(f),Cf(f)}}function i(u,f,h){let m=!1;if(f){var v,x;if((v=f.__r3f)!=null&&v.attach)JM(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 y=u.children.filter(b=>b!==f),g=y.indexOf(h);u.children=[...y.slice(0,g),f,...y.slice(g)],m=!0}m||(x=u.__r3f)==null||x.objects.push(f),f.__r3f||Ef(f,{}),f.__r3f.parent=u,yC(f),Cf(f)}}function o(u,f,h=!1){u&&[...u].forEach(m=>s(f,m,h))}function s(u,f,h){if(f){var m,v,x;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==f)),(v=f.__r3f)!=null&&v.attach)gk(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var y;u.remove(f),(y=f.__r3f)!=null&&y.root&&ede(Uy(f),f)}const b=(x=f.__r3f)==null?void 0:x.primitive,_=!b&&(h===void 0?f.dispose!==null:h);if(!b){var g;o((g=f.__r3f)==null?void 0:g.objects,f,_),o(f.children,f,_)}if(delete f.__r3f,_&&f.dispose&&f.type!=="Scene"){const S=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?gC.unstable_scheduleCallback(gC.unstable_IdlePriority,S):S()}Cf(u)}}function a(u,f,h,m){var v;const x=(v=u.__r3f)==null?void 0:v.parent;if(!x)return;const y=n(f,h,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&r(y,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>r(y,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||s(x,u),y.parent&&(y.__r3f.autoRemovedBeforeAppend=!0),r(x,y),y.raycast&&y.__r3f.eventCount&&Uy(y).getState().internal.interaction.push(y),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=y,g.ref&&(typeof g.ref=="function"?g.ref(y):g.ref.current=y))})}const l=()=>{};return{reconciler:Hfe({createInstance:n,removeChild:s,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&&s(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 v;if(((v=u==null?void 0:u.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:y=[],children:g,...b}=m,{args:_=[],children:S,...P}=h;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((T,L)=>T!==_[L]))return[!0];const N=t8(u,b,P,!0);return N.changes.length?[!1,N]:null}},commitUpdate(u,[f,h],m,v,x,y){f?a(u,m,x,y):QM(u,h)},commitMount(u,f,h,m){var v;const x=(v=u.__r3f)!=null?v:{};u.raycast&&x.handlers&&x.eventCount&&Uy(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Ef(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:h,parent:m}=(f=u.__r3f)!=null?f:{};h&&m&&gk(m,u,h),u.isObject3D&&(u.visible=!1),Cf(u)},unhideInstance(u,f){var h;const{attach:m,parent:v}=(h=u.__r3f)!=null?h:{};m&&v&&JM(v,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Cf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Gf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&wn.fun(performance.now)?performance.now:wn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:wn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:wn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:QM}}var dk,hk;const ZM=t=>"colorSpace"in t||"outputColorSpace"in t,YB=()=>{var t;return(t=CA.ColorManagement)!=null?t:null},KB=t=>t&&t.isOrthographicCamera,Xfe=t=>t&&t.hasOwnProperty("current"),Sg=typeof window<"u"&&((dk=window.document)!=null&&dk.createElement||((hk=window.navigator)==null?void 0:hk.product)==="ReactNative")?A.useLayoutEffect:A.useEffect;function ZB(t){const e=A.useRef(t);return Sg(()=>void(e.current=t),[t]),e}function qfe({set:t}){return Sg(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class JB extends A.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}JB.getDerivedStateFromError=()=>({error:!0});const QB="__default",pk=new Map,Yfe=t=>t&&!!t.memoized&&!!t.changes;function e8(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 np=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function Uy(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const wn={obj:t=>t===Object(t)&&!wn.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(wn.str(t)||wn.num(t)||wn.boo(t))return t===e;const o=wn.obj(t);if(o&&r==="reference")return t===e;const s=wn.arr(t);if(s&&n==="reference")return t===e;if((s||o)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!wn.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(wn.und(a)){if(s&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function Kfe(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function Ef(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function vC(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,s)=>o[s],t),{target:n,key:i}}else return{target:n,key:e}}const mk=/-\d+$/;function JM(t,e,n){if(wn.str(n)){if(mk.test(n)){const o=n.replace(mk,""),{target:s,key:a}=vC(t,o);Array.isArray(s[a])||(s[a]=[])}const{target:r,key:i}=vC(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function gk(t,e,n){var r,i;if(wn.str(n)){const{target:o,key:s}=vC(t,n),a=e.__r3f.previousAttach;a===void 0?delete o[s]:o[s]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function t8(t,{children:e,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(i),h=[];if(c){const v=Object.keys(l);for(let x=0;x{var y;if((y=t.__r3f)!=null&&y.primitive&&v==="object"||wn.equ(x,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return h.push([v,x,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),h.push([v,x,!1,g]);for(const b in i){const _=i[b];b.startsWith(`${v}-`)&&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}}const Zfe=typeof process<"u"&&!1;function QM(t,e){var n;const r=t.__r3f,i=r==null?void 0:r.root,o=i==null||i.getState==null?void 0:i.getState(),{memoized:s,changes:a}=Yfe(e)?e:t8(t,e),l=r==null?void 0:r.eventCount;t.__r3f&&(t.__r3f.memoizedProps=s);for(let u=0;ug[b],t),!(y&&y.set))){const[g,...b]=v.reverse();x=b.reverse().reduce((_,S)=>_[S],t),f=g}if(h===QB+"remove")if(x.constructor){let g=pk.get(x.constructor);g||(g=new x.constructor,pk.set(x.constructor,g)),h=g[f]}else h=0;if(m&&r)h?r.handlers[f]=h:delete r.handlers[f],r.eventCount=Object.keys(r.handlers).length;else if(y&&y.set&&(y.copy||y instanceof Wc)){if(Array.isArray(h))y.fromArray?y.fromArray(h):y.set(...h);else if(y.copy&&h&&h.constructor&&(Zfe?y.constructor.name===h.constructor.name:y.constructor===h.constructor))y.copy(h);else if(h!==void 0){const g=y instanceof ot;!g&&y.setScalar?y.setScalar(h):y instanceof Wc&&h instanceof Wc?y.mask=h.mask:y.set(h),!YB()&&o&&!o.linear&&g&&y.convertSRGBToLinear()}}else if(x[f]=h,x[f]instanceof kn&&x[f].format===Rr&&x[f].type===Fi&&o){const g=x[f];ZM(g)&&ZM(o.gl)?g.colorSpace=o.gl.outputColorSpace:g.encoding=o.gl.outputEncoding}Cf(t)}if(r&&r.parent&&t.raycast&&l!==r.eventCount){const u=Uy(t).getState().internal,f=u.interaction.indexOf(t);f>-1&&u.interaction.splice(f,1),r.eventCount&&u.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&yC(t),t}function Cf(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 yC(t){t.onUpdate==null||t.onUpdate(t)}function Jfe(t,e){t.manual||(KB(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 Jv(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function Qfe(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Gf.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Gf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Gf.ContinuousEventPriority;default:return Gf.DefaultEventPriority}}function n8(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function ede(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)=>{n8(n.capturedMap,e,r,i)})}function tde(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 _=np(g.object),S=np(b.object);return!_||!S?g.distance-b.distance:S.events.priority-_.events.priority||g.distance-b.distance}).filter(g=>{const b=Jv(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 y;(y=b.__r3f)!=null&&y.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(Jv(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 v of l){const x=np(v.object)||h,{raycaster:y,pointer:g,camera:b,internal:_}=x,S=new G(g.x,g.y,0).unproject(b),P=M=>{var R,D;return(R=(D=_.capturedMap.get(M))==null?void 0:D.has(v.eventObject))!=null?R:!1},N=M=>{const R={intersection:v,target:c.target};_.capturedMap.has(M)?_.capturedMap.get(M).set(v.eventObject,R):_.capturedMap.set(M,new Map([[v.eventObject,R]])),c.target.setPointerCapture(M)},T=M=>{const R=_.capturedMap.get(M);R&&n8(_.capturedMap,v.eventObject,R,M)};let L={};for(let M in c){let R=c[M];typeof R!="function"&&(L[M]=R)}let U={...v,...L,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:S,ray:y.ray,camera:b,stopPropagation(){const M="pointerId"in c&&_.capturedMap.get(c.pointerId);if((!M||M.has(v.eventObject))&&(U.stopped=m.stopped=!0,_.hovered.size&&Array.from(_.hovered.values()).find(R=>R.eventObject===v.eventObject))){const R=l.slice(0,l.indexOf(v));o([...R,v])}},target:{hasPointerCapture:P,setPointerCapture:N,releasePointerCapture:T},currentTarget:{hasPointerCapture:P,setPointerCapture:N,releasePointerCapture:T},nativeEvent:c};if(f(U),m.stopped===!0)break}}return l}function o(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(Jv(u)),h!=null&&h.eventCount){const v={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function s(l,c){for(let u=0;uo([]);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),o([]))})}}return function(u){const{onPointerMissed:f,internal:h}=t.getState();h.lastEvent.current=u;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",y=r(u,m?n:void 0),g=v?e(u):0;l==="onPointerDown"&&(h.initialClick=[u.offsetX,u.offsetY],h.initialHits=y.map(_=>_.eventObject)),v&&!y.length&&g<=2&&(s(u,h.interaction),f&&f(u)),m&&o(y);function b(_){const S=_.eventObject,P=S.__r3f,N=P==null?void 0:P.handlers;if(P!=null&&P.eventCount)if(m){if(N.onPointerOver||N.onPointerEnter||N.onPointerOut||N.onPointerLeave){const T=Jv(_),L=h.hovered.get(T);L?L.stopped&&_.stopPropagation():(h.hovered.set(T,_),N.onPointerOver==null||N.onPointerOver(_),N.onPointerEnter==null||N.onPointerEnter(_))}N.onPointerMove==null||N.onPointerMove(_)}else{const T=N[l];T?(!v||h.initialHits.includes(S))&&(s(u,h.interaction.filter(L=>!h.initialHits.includes(L))),T(_)):v&&h.initialHits.includes(S)&&s(u,h.interaction.filter(L=>!h.initialHits.includes(L)))}}i(y,u,g,b)}}return{handlePointer:a}}const r8=t=>!!(t!=null&&t.render),i8=A.createContext(null),nde=(t,e)=>{const n=Vfe((a,l)=>{const c=new G,u=new G,f=new G;function h(g=l().camera,b=u,_=l().size){const{width:S,height:P,top:N,left:T}=_,L=S/P;b instanceof G?f.copy(b):f.set(...b);const U=g.getWorldPosition(c).distanceTo(f);if(KB(g))return{width:S/g.zoom,height:P/g.zoom,top:N,left:T,factor:1,distance:U,aspect:L};{const M=g.fov*Math.PI/180,R=2*Math.tan(M/2)*U,D=R*(S/P);return{width:D,height:R,top:N,left:T,factor:S/D,distance:U,aspect:L}}}let m;const v=g=>a(b=>({performance:{...b.performance,current:g}})),x=new Ie;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 _A,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&&v(g.performance.min),m=setTimeout(()=>v(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:h},setEvents:g=>a(b=>({...b,events:{...b.events,...g}})),setSize:(g,b,_,S,P)=>{const N=l().camera,T={width:g,height:b,top:S||0,left:P||0,updateStyle:_};a(L=>({size:T,viewport:{...L.viewport,...h(N,u,T)}}))},setDpr:g=>a(b=>{const _=e8(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:A.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((P,N)=>P.priority-N.priority),()=>{const P=l().internal;P!=null&&P.subscribers&&(P.priority=P.priority-(b>0?1:0),P.subscribers=P.subscribers.filter(N=>N.ref!==g))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,s=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!==o){var h;i=l,o=c.dpr,Jfe(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!==s&&(s=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let Qv,rde=new Set,ide=new Set,ode=new Set;function eE(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function rp(t,e){switch(t){case"before":return eE(rde,e);case"after":return eE(ide,e);case"tail":return eE(ode,e)}}let tE,nE;function rE(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),tE=e.internal.subscribers,Qv=0;Qv0)&&!((u=o.gl.xr)!=null&&u.isPresenting)&&(r+=rE(c,o))}if(n=!1,rp("after",c),r===0)return rp("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(s)))}function l(c,u=!0,f,h){if(u&&rp("before",c),f)rE(c,f,h);else for(const m of t.values())rE(c,m.store.getState());u&&rp("after",c)}return{loop:s,invalidate:a,advance:l}}function o8(){const t=A.useContext(i8);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function wr(t=n=>n,e){return o8()(t,e)}function TA(t,e=0){const n=o8(),r=n.getState().internal.subscribe,i=ZB(t);return Sg(()=>r(i,e,n),[e,r,n]),null}const Td=new Map,{invalidate:vk,advance:yk}=sde(Td),{reconciler:gx,applyProps:gf}=Gfe(Td,Qfe),vf={objects:"shallow",strict:!1},ade=(t,e)=>{const n=typeof t=="function"?t(e):t;return r8(n)?n:new YU({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function lde(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:o,left:s,updateStyle:a=n}=e;return{width:r,height:i,top:o,left:s,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:o,left:s}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:o,left:s,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 cde(t){const e=Td.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,o=r||nde(vk,yk),s=n||gx.createContainer(o,Gf.ConcurrentRoot,null,!1,null,"",i,null);e||Td.set(t,{fiber:s,store:o});let a,l=!1,c;return{configure(u={}){let{gl:f,size:h,scene:m,events:v,onCreated:x,shadows:y=!1,linear:g=!1,flat:b=!1,legacy:_=!1,orthographic:S=!1,frameloop:P="always",dpr:N=[1,2],performance:T,raycaster:L,camera:U,onPointerMissed:M}=u,R=o.getState(),D=R.gl;R.gl||R.set({gl:D=ade(f,t)});let O=R.raycaster;O||R.set({raycaster:O=new VB});const{params:B,...X}=L||{};if(wn.equ(X,O,vf)||gf(O,{...X}),wn.equ(B,O.params,vf)||gf(O,{params:{...O.params,...B}}),!R.camera||R.camera===c&&!wn.equ(c,U,vf)){c=U;const K=U instanceof pg,ee=K?U:S?new vg(0,0,0,0,.1,1e3):new vr(75,0,.1,1e3);K||(ee.position.z=5,U&&(gf(ee,U),("aspect"in U||"left"in U||"right"in U||"bottom"in U||"top"in U)&&(ee.manual=!0,ee.updateProjectionMatrix())),!R.camera&&!(U!=null&&U.rotation)&&ee.lookAt(0,0,0)),R.set({camera:ee}),O.camera=ee}if(!R.scene){let K;m instanceof dx?K=m:(K=new dx,m&&gf(K,m)),R.set({scene:Ef(K)})}if(!R.xr){var H;const K=(le,Q)=>{const ae=o.getState();ae.frameloop!=="never"&&yk(le,!0,ae,Q)},ee=()=>{const le=o.getState();le.gl.xr.enabled=le.gl.xr.isPresenting,le.gl.xr.setAnimationLoop(le.gl.xr.isPresenting?K:null),le.gl.xr.isPresenting||vk(le)},me={connect(){const le=o.getState().gl;le.xr.addEventListener("sessionstart",ee),le.xr.addEventListener("sessionend",ee)},disconnect(){const le=o.getState().gl;le.xr.removeEventListener("sessionstart",ee),le.xr.removeEventListener("sessionend",ee)}};typeof((H=D.xr)==null?void 0:H.addEventListener)=="function"&&me.connect(),R.set({xr:me})}if(D.shadowMap){const K=D.shadowMap.enabled,ee=D.shadowMap.type;if(D.shadowMap.enabled=!!y,wn.boo(y))D.shadowMap.type=Ap;else if(wn.str(y)){var Z;const me={basic:H6,percentage:Jb,soft:Ap,variance:Yo};D.shadowMap.type=(Z=me[y])!=null?Z:Ap}else wn.obj(y)&&Object.assign(D.shadowMap,y);(K!==D.shadowMap.enabled||ee!==D.shadowMap.type)&&(D.shadowMap.needsUpdate=!0)}const F=YB();F&&("enabled"in F?F.enabled=!_:"legacyMode"in F&&(F.legacyMode=_)),l||gf(D,{outputEncoding:g?3e3:3001,toneMapping:b?Os:zR}),R.legacy!==_&&R.set(()=>({legacy:_})),R.linear!==g&&R.set(()=>({linear:g})),R.flat!==b&&R.set(()=>({flat:b})),f&&!wn.fun(f)&&!r8(f)&&!wn.equ(f,D,vf)&&gf(D,f),v&&!R.events.handlers&&R.set({events:v(o)});const Y=lde(t,h);return wn.equ(Y,R.size,vf)||R.setSize(Y.width,Y.height,Y.updateStyle,Y.top,Y.left),N&&R.viewport.dpr!==e8(N)&&R.setDpr(N),R.frameloop!==P&&R.setFrameloop(P),R.onPointerMissed||R.set({onPointerMissed:M}),T&&!wn.equ(T,R.performance,vf)&&R.set(K=>({performance:{...K.performance,...T}})),a=x,l=!0,this},render(u){return l||this.configure(),gx.updateContainer(C.jsx(ude,{store:o,children:u,onCreated:a,rootElement:t}),s,null,()=>{}),o},unmount(){s8(t)}}}function ude({store:t,children:e,onCreated:n,rootElement:r}){return Sg(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),C.jsx(i8.Provider,{value:t,children:e})}function s8(t,e){const n=Td.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),gx.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,s,a,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(s=o.renderLists)==null||s.dispose==null||s.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),Kfe(i),Td.delete(t)}catch{}},500)})}}gx.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:A.version});const iE={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 fde(t){const{handlePointer:e}=tde(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(iE).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:o}=t.getState();o.disconnect==null||o.disconnect(),i(s=>({events:{...s.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([s,a])=>{const[l,c]=iE[s];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(([o,s])=>{if(r&&r.connected instanceof HTMLElement){const[a]=iE[o];r.connected.removeEventListener(a,s)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}function xC(t,e,n){var r,i,o,s,a;e==null&&(e=100);function l(){var u=Date.now()-s;u=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}var c=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}xC.debounce=xC;var dde=xC;const xk=$s(dde);var hde=Object.defineProperty,pde=Object.defineProperties,mde=Object.getOwnPropertyDescriptors,bk=Object.getOwnPropertySymbols,gde=Object.prototype.hasOwnProperty,vde=Object.prototype.propertyIsEnumerable,_k=(t,e,n)=>e in t?hde(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wk=(t,e)=>{for(var n in e||(e={}))gde.call(e,n)&&_k(t,n,e[n]);if(bk)for(var n of bk(e))vde.call(e,n)&&_k(t,n,e[n]);return t},yde=(t,e)=>pde(t,mde(e)),Sk,Mk;typeof window<"u"&&((Sk=window.document)!=null&&Sk.createElement||((Mk=window.navigator)==null?void 0:Mk.product)==="ReactNative")?A.useLayoutEffect:A.useEffect;function a8(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const i=a8(r,e,n);if(i)return i;r=r.sibling}}function l8(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const Ek=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=Ek;return}return Ek.apply(this,arguments)};const RA=l8(A.createContext(null));class c8 extends A.Component{render(){return A.createElement(RA.Provider,{value:this._reactInternals},this.props.children)}}function xde(){const t=A.useContext(RA);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=A.useId();return A.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=a8(r,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(i)return i}},[t,e])}function bde(){const t=xde(),[e]=A.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!==RA&&!e.has(i)&&e.set(i,A.useContext(l8(i)))}n=n.return}return e}function _de(){const t=bde();return A.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>A.createElement(e,null,A.createElement(n.Provider,yde(wk({},r),{value:t.get(n)}))),e=>A.createElement(c8,wk({},e))),[t])}function wde({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||typeof window<"u"&&window.ResizeObserver,[o,s]=A.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!i)return o.width=1280,o.height=800,[()=>{},o,()=>{}];const a=A.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=A.useRef(!1);A.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[f,h,m]=A.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:b,top:_,width:S,height:P,bottom:N,right:T,x:L,y:U}=a.current.element.getBoundingClientRect(),M={left:b,top:_,width:S,height:P,bottom:N,right:T,x:L,y:U};a.current.element instanceof HTMLElement&&r&&(M.height=a.current.element.offsetHeight,M.width=a.current.element.offsetWidth),Object.freeze(M),u.current&&!Cde(a.current.lastBounds,M)&&s(a.current.lastBounds=M)};return[g,c?xk(g,c):g,l?xk(g,l):g]},[s,r,l,c]);function v(){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(){var g;a.current.element&&(a.current.resizeObserver=new i(h),(g=a.current.resizeObserver)==null||g.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(b=>b.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 y=g=>{!g||g===a.current.element||(v(),a.current.element=g,a.current.scrollContainers=u8(g),x())};return Mde(m,!!e),Sde(h),A.useEffect(()=>{v(),x()},[e,m,h]),A.useEffect(()=>v,[]),[y,o,f]}function Sde(t){A.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Mde(t,e){A.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function u8(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(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...u8(t.parentElement)]}const Ede=["x","y","top","bottom","left","right","width","height"],Cde=(t,e)=>Ede.every(n=>t[n]===e[n]),Tde=A.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:s=fde,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,onPointerMissed:S,onCreated:P,...N},T){A.useMemo(()=>qB(Ufe),[]);const L=_de(),[U,M]=wde({scroll:!0,debounce:{scroll:50,resize:0},...r}),R=A.useRef(null),D=A.useRef(null);A.useImperativeHandle(T,()=>R.current);const O=ZB(S),[B,X]=A.useState(!1),[H,Z]=A.useState(!1);if(B)throw B;if(H)throw H;const F=A.useRef(null);Sg(()=>{const K=R.current;M.width>0&&M.height>0&&K&&(F.current||(F.current=cde(K)),F.current.configure({gl:o,events:s,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,size:M,onPointerMissed:(...ee)=>O.current==null?void 0:O.current(...ee),onCreated:ee=>{ee.events.connect==null||ee.events.connect(a?Xfe(a)?a.current:a:D.current),l&&ee.setEvents({compute:(me,le)=>{const Q=me[l+"X"],ae=me[l+"Y"];le.pointer.set(Q/le.size.width*2-1,-(ae/le.size.height)*2+1),le.raycaster.setFromCamera(le.pointer,le.camera)}}),P==null||P(ee)}}),F.current.render(C.jsx(L,{children:C.jsx(JB,{set:Z,children:C.jsx(A.Suspense,{fallback:C.jsx(qfe,{set:X}),children:e})})})))}),A.useEffect(()=>{const K=R.current;if(K)return()=>s8(K)},[]);const Y=a?"none":"auto";return C.jsx("div",{ref:D,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:Y,...i},...N,children:C.jsx("div",{ref:U,style:{width:"100%",height:"100%"},children:C.jsx("canvas",{ref:R,style:{display:"block"},children:n})})})}),Rde=A.forwardRef(function(e,n){return C.jsx(c8,{children:C.jsx(Tde,{...e,ref:n})})});function R_(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Qd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Mg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Hl(){}var fu=.7,Rd=1/fu,sd="\\s*([+-]?\\d+)\\s*",zm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ade=/^#([0-9a-f]{3,8})$/,Pde=new RegExp(`^rgb\\(${sd},${sd},${sd}\\)$`),Nde=new RegExp(`^rgb\\(${Fs},${Fs},${Fs}\\)$`),Ide=new RegExp(`^rgba\\(${sd},${sd},${sd},${zm}\\)$`),Lde=new RegExp(`^rgba\\(${Fs},${Fs},${Fs},${zm}\\)$`),kde=new RegExp(`^hsl\\(${zm},${Fs},${Fs}\\)$`),Ode=new RegExp(`^hsla\\(${zm},${Fs},${Fs},${zm}\\)$`),Ck={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};Qd(Hl,Um,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Tk,formatHex:Tk,formatHex8:Dde,formatHsl:Fde,formatRgb:Rk,toString:Rk});function Tk(){return this.rgb().formatHex()}function Dde(){return this.rgb().formatHex8()}function Fde(){return f8(this).formatHsl()}function Rk(){return this.rgb().formatRgb()}function Um(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ade.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ak(e):n===3?new yr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ey(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ey(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=Pde.exec(t))?new yr(e[1],e[2],e[3],1):(e=Nde.exec(t))?new yr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Ide.exec(t))?ey(e[1],e[2],e[3],e[4]):(e=Lde.exec(t))?ey(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=kde.exec(t))?Ik(e[1],e[2]/100,e[3]/100,1):(e=Ode.exec(t))?Ik(e[1],e[2]/100,e[3]/100,e[4]):Ck.hasOwnProperty(t)?Ak(Ck[t]):t==="transparent"?new yr(NaN,NaN,NaN,0):null}function Ak(t){return new yr(t>>16&255,t>>8&255,t&255,1)}function ey(t,e,n,r){return r<=0&&(t=e=n=NaN),new yr(t,e,n,r)}function AA(t){return t instanceof Hl||(t=Um(t)),t?(t=t.rgb(),new yr(t.r,t.g,t.b,t.opacity)):new yr}function Il(t,e,n,r){return arguments.length===1?AA(t):new yr(t,e,n,r??1)}function yr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Qd(yr,Il,Mg(Hl,{brighter(t){return t=t==null?Rd:Math.pow(Rd,t),new yr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fu:Math.pow(fu,t),new yr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new yr(Gc(this.r),Gc(this.g),Gc(this.b),vx(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:Pk,formatHex:Pk,formatHex8:zde,formatRgb:Nk,toString:Nk}));function Pk(){return`#${Oc(this.r)}${Oc(this.g)}${Oc(this.b)}`}function zde(){return`#${Oc(this.r)}${Oc(this.g)}${Oc(this.b)}${Oc((isNaN(this.opacity)?1:this.opacity)*255)}`}function Nk(){const t=vx(this.opacity);return`${t===1?"rgb(":"rgba("}${Gc(this.r)}, ${Gc(this.g)}, ${Gc(this.b)}${t===1?")":`, ${t})`}`}function vx(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Oc(t){return t=Gc(t),(t<16?"0":"")+t.toString(16)}function Ik(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new es(t,e,n,r)}function f8(t){if(t instanceof es)return new es(t.h,t.s,t.l,t.opacity);if(t instanceof Hl||(t=Um(t)),!t)return new es;if(t instanceof es)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n0&&l<1?0:s,new es(s,a,l,t.opacity)}function yx(t,e,n,r){return arguments.length===1?f8(t):new es(t,e,n,r??1)}function es(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Qd(es,yx,Mg(Hl,{brighter(t){return t=t==null?Rd:Math.pow(Rd,t),new es(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fu:Math.pow(fu,t),new es(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 yr(oE(t>=240?t-240:t+120,i,r),oE(t,i,r),oE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new es(Lk(this.h),ty(this.s),ty(this.l),vx(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=vx(this.opacity);return`${t===1?"hsl(":"hsla("}${Lk(this.h)}, ${ty(this.s)*100}%, ${ty(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Lk(t){return t=(t||0)%360,t<0?t+360:t}function ty(t){return Math.max(0,Math.min(1,t||0))}function oE(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,h8=180/Math.PI,xx=18,p8=.96422,m8=1,g8=.82521,v8=4/29,ad=6/29,y8=3*ad*ad,Ude=ad*ad*ad;function x8(t){if(t instanceof zs)return new zs(t.l,t.a,t.b,t.opacity);if(t instanceof xa)return b8(t);t instanceof yr||(t=AA(t));var e=cE(t.r),n=cE(t.g),r=cE(t.b),i=sE((.2225045*e+.7168786*n+.0606169*r)/m8),o,s;return e===n&&n===r?o=s=i:(o=sE((.4360747*e+.3850649*n+.1430804*r)/p8),s=sE((.0139322*e+.0971045*n+.7141733*r)/g8)),new zs(116*i-16,500*(o-i),200*(i-s),t.opacity)}function bC(t,e,n,r){return arguments.length===1?x8(t):new zs(t,e,n,r??1)}function zs(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Qd(zs,bC,Mg(Hl,{brighter(t){return new zs(this.l+xx*(t??1),this.a,this.b,this.opacity)},darker(t){return new zs(this.l-xx*(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=p8*aE(e),t=m8*aE(t),n=g8*aE(n),new yr(lE(3.1338561*e-1.6168667*t-.4906146*n),lE(-.9787684*e+1.9161415*t+.033454*n),lE(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function sE(t){return t>Ude?Math.pow(t,1/3):t/y8+v8}function aE(t){return t>ad?t*t*t:y8*(t-v8)}function lE(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function cE(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Bde(t){if(t instanceof xa)return new xa(t.h,t.c,t.l,t.opacity);if(t instanceof zs||(t=x8(t)),t.a===0&&t.b===0)return new xa(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r()=>t;function w8(t,e){return function(n){return t+n*e}}function Wde(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 IA(t,e){var n=e-t;return n?w8(t,n>180||n<-180?n-360*Math.round(n/360):n):P_(isNaN(t)?e:t)}function Hde(t){return(t=+t)==1?xr:function(e,n){return n-e?Wde(e,n,t):P_(isNaN(e)?n:e)}}function xr(t,e){var n=e-t;return n?w8(t,n):P_(isNaN(t)?e:t)}const wC=function t(e){var n=Hde(e);function r(i,o){var s=n((i=Il(i)).r,(o=Il(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=xr(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function Gde(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),s,a;for(s=0;sn&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ad(r,i)})),n=uE.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function fhe(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i2?dhe:fhe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(r),e,n)))(r(s(h)))}return f.invert=function(h){return s(i((c||(c=a(e,t.map(r),Ad)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,che),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=kA,u()},f.clamp=function(h){return arguments.length?(s=h?!0:Ps,u()):s!==Ps},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,m){return r=h,i=m,u()}}function hhe(){return L_()(Ps,Ps)}function phe(t,e,n,r){var i=D6(t,e,n),o;switch(r=vm(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Kne(i,s))&&(r.precision=o),U6(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Zne(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Yne(i))&&(r.precision=o-(r.type==="%")*2);break}}return Gs(r)}function OA(t){var e=t.domain;return t.ticks=function(n){var r=e();return J2(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return phe(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,u=10;for(a0;){if(c=Q2(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function C8(){var t=hhe();return t.copy=function(){return I_(t,C8())},R_.apply(t,arguments),OA(t)}function mhe(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return oMath.pow(t,e)}function bhe(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 Bk(t){return(e,n)=>-t(-e,n)}function _he(t){const e=t(zk,Uk),n=e.domain;let r=10,i,o;function s(){return i=bhe(r),o=xhe(r),n()[0]<0?(i=Bk(i),o=Bk(o),t(ghe,vhe)):t(zk,Uk),e}return e.base=function(a){return arguments.length?(r=+a,s()):r},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=m;++h)for(v=1;vu)break;g.push(x)}}else for(;h<=m;++h)for(v=r-1;v>=1;--v)if(x=h>0?v/o(-h):v*o(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=vm(l)).precision==null&&(l.trim=!0),l=Gs(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/o(Math.round(i(u)));return f*rn(mhe(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),e}function T8(){const t=_he(L_()).domain([1,10]);return t.copy=()=>I_(t,T8()).base(t.base()),R_.apply(t,arguments),t}function jk(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Vk(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function whe(t){var e=1,n=t(jk(e),Vk(e));return n.constant=function(r){return arguments.length?t(jk(e=+r),Vk(e)):e},OA(n)}function R8(){var t=whe(L_());return t.copy=function(){return I_(t,R8()).constant(t.constant())},R_.apply(t,arguments)}function $k(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function She(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Mhe(t){return t<0?-t*t:t*t}function Ehe(t){var e=t(Ps,Ps),n=1;function r(){return n===1?t(Ps,Ps):n===.5?t(She,Mhe):t($k(n),$k(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},OA(e)}function DA(){var t=Ehe(L_());return t.copy=function(){return I_(t,DA()).exponent(t.exponent())},R_.apply(t,arguments),t}function Che(){return DA.apply(null,arguments).exponent(.5)}const fE=new Date,dE=new Date;function Lr(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const l=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(cLr(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(fE.setTime(+o),dE.setTime(+s),t(fE),t(dE),Math.floor(n(fE,dE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const jm=1e3,Ll=jm*60,Vm=Ll*60,$m=Vm*24,A8=$m*7,FA=Lr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*jm)},(t,e)=>(e-t)/jm,t=>t.getUTCSeconds());FA.range;const P8=Lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*jm)},(t,e)=>{t.setTime(+t+e*Ll)},(t,e)=>(e-t)/Ll,t=>t.getMinutes());P8.range;const N8=Lr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Ll)},(t,e)=>(e-t)/Ll,t=>t.getUTCMinutes());N8.range;const I8=Lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*jm-t.getMinutes()*Ll)},(t,e)=>{t.setTime(+t+e*Vm)},(t,e)=>(e-t)/Vm,t=>t.getHours());I8.range;const L8=Lr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Vm)},(t,e)=>(e-t)/Vm,t=>t.getUTCHours());L8.range;const k8=Lr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ll)/$m,t=>t.getDate()-1);k8.range;const O8=Lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/$m,t=>t.getUTCDate()-1);O8.range;const The=Lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/$m,t=>Math.floor(t/$m));The.range;function Mu(t){return Lr(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())*Ll)/A8)}const D8=Mu(0),Rhe=Mu(1),Ahe=Mu(2),Phe=Mu(3),Nhe=Mu(4),Ihe=Mu(5),Lhe=Mu(6);D8.range;Rhe.range;Ahe.range;Phe.range;Nhe.range;Ihe.range;Lhe.range;function Eu(t){return Lr(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)/A8)}const F8=Eu(0),khe=Eu(1),Ohe=Eu(2),Dhe=Eu(3),Fhe=Eu(4),zhe=Eu(5),Uhe=Eu(6);F8.range;khe.range;Ohe.range;Dhe.range;Fhe.range;zhe.range;Uhe.range;const z8=Lr(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());z8.range;const U8=Lr(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());U8.range;const zA=Lr(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());zA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Lr(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)});zA.range;const UA=Lr(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());UA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Lr(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)});UA.range;function Bhe(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function jhe(t,e){e.range&&("padding"in t,t.range(e.range))}function Vhe(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function $he(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function Whe(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function Hhe(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function Ghe(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var Wk={lab:ihe,hcl:ohe,"hcl-long":she,hsl:nhe,"hsl-long":rhe,cubehelix:ahe,"cubehelix-long":N_,rgb:wC};function Xhe(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Wk[t]}var e=t.type,n=t.gamma,r=Wk[e];return typeof n>"u"?r:r.gamma(n)}function qhe(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=Xhe(e.interpolate);t.interpolate(n)}}var Yhe=new Date(Date.UTC(2020,1,2,3,4,5)),Khe="%Y-%m-%d %H:%M";function Zhe(t){var e=t.tickFormat(1,Khe)(Yhe);return e==="2020-02-02 03:04"}var Hk={day:k8,hour:I8,minute:P8,month:z8,second:FA,week:D8,year:zA},Gk={day:O8,hour:L8,minute:N8,month:U8,second:FA,week:F8,year:UA};function Jhe(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=Zhe(r);if(typeof n=="string")r.nice(i?Gk[n]:Hk[n]);else{var o=n.interval,s=n.step,a=(i?Gk[o]:Hk[o]).every(s);a!=null&&r.nice(a)}}}}function Qhe(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 epe(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function tpe(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(kA))}function npe(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function rpe(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],o=i=0)&&(n[i]=t[i]);return n}function bx(){return bx=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 H(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:fj,findFiberByHostInstance:d.findFiberByHostInstance||dj,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{Wg=p.inject(d),ps=p}catch{}d=!!p.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,p,w,E){if(!$)throw Error(s(363));d=qw(d,p);var I=Fe(d,w,E).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=rn;try{return rn=d,p()}finally{rn=w}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,p,w,E){var I=p.current,k=Qr(),q=Ha(I);return w=q3(w),p.context===null?p.context=w:p.pendingContext=w,p=Js(k,q),p.payload={element:d},E=E===void 0?null:E,E!==null&&(p.callback=E),Va(I,p),d=go(I,q,k),d!==null&&Yg(d,I,q),q},n};r8.exports=Hde;var Gde=r8.exports;const Xde=$s(Gde),TA={},s8=t=>void Object.assign(TA,t);function qde(t,e){function n(u,{args:f=[],attach:h,...m},v){let x=`${u[0].toUpperCase()}${u.slice(1)}`,y;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;y=Ef(g,{type:u,root:v,attach:h,primitive:!0})}else{const g=TA[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!");y=Ef(new g(...f),{type:u,root:v,attach:h,memoizedProps:{args:f}})}return y.__r3f.attach===void 0&&(y instanceof zt?y.__r3f.attach="geometry":y instanceof Ir&&(y.__r3f.attach="material")),x!=="inject"&&eE(y,m),y}function r(u,f){let h=!1;if(f){var m,v;(m=f.__r3f)!=null&&m.attach?QM(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),h=!0),h||(v=u.__r3f)==null||v.objects.push(f),f.__r3f||Ef(f,{}),f.__r3f.parent=u,_C(f),Cf(f)}}function i(u,f,h){let m=!1;if(f){var v,x;if((v=f.__r3f)!=null&&v.attach)QM(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 y=u.children.filter(b=>b!==f),g=y.indexOf(h);u.children=[...y.slice(0,g),f,...y.slice(g)],m=!0}m||(x=u.__r3f)==null||x.objects.push(f),f.__r3f||Ef(f,{}),f.__r3f.parent=u,_C(f),Cf(f)}}function o(u,f,h=!1){u&&[...u].forEach(m=>s(f,m,h))}function s(u,f,h){if(f){var m,v,x;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==f)),(v=f.__r3f)!=null&&v.attach)wk(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var y;u.remove(f),(y=f.__r3f)!=null&&y.root&&nhe(By(f),f)}const b=(x=f.__r3f)==null?void 0:x.primitive,_=!b&&(h===void 0?f.dispose!==null:h);if(!b){var g;o((g=f.__r3f)==null?void 0:g.objects,f,_),o(f.children,f,_)}if(delete f.__r3f,_&&f.dispose&&f.type!=="Scene"){const S=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?xC.unstable_scheduleCallback(xC.unstable_IdlePriority,S):S()}Cf(u)}}function a(u,f,h,m){var v;const x=(v=u.__r3f)==null?void 0:v.parent;if(!x)return;const y=n(f,h,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&r(y,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>r(y,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||s(x,u),y.parent&&(y.__r3f.autoRemovedBeforeAppend=!0),r(x,y),y.raycast&&y.__r3f.eventCount&&By(y).getState().internal.interaction.push(y),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=y,g.ref&&(typeof g.ref=="function"?g.ref(y):g.ref.current=y))})}const l=()=>{};return{reconciler:Xde({createInstance:n,removeChild:s,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&&s(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 v;if(((v=u==null?void 0:u.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:y=[],children:g,...b}=m,{args:_=[],children:S,...P}=h;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((T,L)=>T!==_[L]))return[!0];const N=h8(u,b,P,!0);return N.changes.length?[!1,N]:null}},commitUpdate(u,[f,h],m,v,x,y){f?a(u,m,x,y):eE(u,h)},commitMount(u,f,h,m){var v;const x=(v=u.__r3f)!=null?v:{};u.raycast&&x.handlers&&x.eventCount&&By(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Ef(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:h,parent:m}=(f=u.__r3f)!=null?f:{};h&&m&&wk(m,u,h),u.isObject3D&&(u.visible=!1),Cf(u)},unhideInstance(u,f){var h;const{attach:m,parent:v}=(h=u.__r3f)!=null?h:{};m&&v&&QM(v,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Cf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Gf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&wn.fun(performance.now)?performance.now:wn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:wn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:wn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:eE}}var yk,xk;const JM=t=>"colorSpace"in t||"outputColorSpace"in t,a8=()=>{var t;return(t=TA.ColorManagement)!=null?t:null},l8=t=>t&&t.isOrthographicCamera,Yde=t=>t&&t.hasOwnProperty("current"),Mg=typeof window<"u"&&((yk=window.document)!=null&&yk.createElement||((xk=window.navigator)==null?void 0:xk.product)==="ReactNative")?A.useLayoutEffect:A.useEffect;function c8(t){const e=A.useRef(t);return Mg(()=>void(e.current=t),[t]),e}function Kde({set:t}){return Mg(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class u8 extends A.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}u8.getDerivedStateFromError=()=>({error:!0});const f8="__default",bk=new Map,Zde=t=>t&&!!t.memoized&&!!t.changes;function d8(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 np=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function By(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const wn={obj:t=>t===Object(t)&&!wn.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(wn.str(t)||wn.num(t)||wn.boo(t))return t===e;const o=wn.obj(t);if(o&&r==="reference")return t===e;const s=wn.arr(t);if(s&&n==="reference")return t===e;if((s||o)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!wn.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(wn.und(a)){if(s&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function Jde(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function Ef(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function bC(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,s)=>o[s],t),{target:n,key:i}}else return{target:n,key:e}}const _k=/-\d+$/;function QM(t,e,n){if(wn.str(n)){if(_k.test(n)){const o=n.replace(_k,""),{target:s,key:a}=bC(t,o);Array.isArray(s[a])||(s[a]=[])}const{target:r,key:i}=bC(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function wk(t,e,n){var r,i;if(wn.str(n)){const{target:o,key:s}=bC(t,n),a=e.__r3f.previousAttach;a===void 0?delete o[s]:o[s]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function h8(t,{children:e,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(i),h=[];if(c){const v=Object.keys(l);for(let x=0;x{var y;if((y=t.__r3f)!=null&&y.primitive&&v==="object"||wn.equ(x,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return h.push([v,x,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),h.push([v,x,!1,g]);for(const b in i){const _=i[b];b.startsWith(`${v}-`)&&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}}const Qde=typeof process<"u"&&!1;function eE(t,e){var n;const r=t.__r3f,i=r==null?void 0:r.root,o=i==null||i.getState==null?void 0:i.getState(),{memoized:s,changes:a}=Zde(e)?e:h8(t,e),l=r==null?void 0:r.eventCount;t.__r3f&&(t.__r3f.memoizedProps=s);for(let u=0;ug[b],t),!(y&&y.set))){const[g,...b]=v.reverse();x=b.reverse().reduce((_,S)=>_[S],t),f=g}if(h===f8+"remove")if(x.constructor){let g=bk.get(x.constructor);g||(g=new x.constructor,bk.set(x.constructor,g)),h=g[f]}else h=0;if(m&&r)h?r.handlers[f]=h:delete r.handlers[f],r.eventCount=Object.keys(r.handlers).length;else if(y&&y.set&&(y.copy||y instanceof Wc)){if(Array.isArray(h))y.fromArray?y.fromArray(h):y.set(...h);else if(y.copy&&h&&h.constructor&&(Qde?y.constructor.name===h.constructor.name:y.constructor===h.constructor))y.copy(h);else if(h!==void 0){const g=y instanceof ot;!g&&y.setScalar?y.setScalar(h):y instanceof Wc&&h instanceof Wc?y.mask=h.mask:y.set(h),!a8()&&o&&!o.linear&&g&&y.convertSRGBToLinear()}}else if(x[f]=h,x[f]instanceof kn&&x[f].format===Rr&&x[f].type===Fi&&o){const g=x[f];JM(g)&&JM(o.gl)?g.colorSpace=o.gl.outputColorSpace:g.encoding=o.gl.outputEncoding}Cf(t)}if(r&&r.parent&&t.raycast&&l!==r.eventCount){const u=By(t).getState().internal,f=u.interaction.indexOf(t);f>-1&&u.interaction.splice(f,1),r.eventCount&&u.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&_C(t),t}function Cf(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 _C(t){t.onUpdate==null||t.onUpdate(t)}function ehe(t,e){t.manual||(l8(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 Jv(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function the(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Gf.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Gf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Gf.ContinuousEventPriority;default:return Gf.DefaultEventPriority}}function p8(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function nhe(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)=>{p8(n.capturedMap,e,r,i)})}function rhe(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 _=np(g.object),S=np(b.object);return!_||!S?g.distance-b.distance:S.events.priority-_.events.priority||g.distance-b.distance}).filter(g=>{const b=Jv(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 y;(y=b.__r3f)!=null&&y.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(Jv(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 v of l){const x=np(v.object)||h,{raycaster:y,pointer:g,camera:b,internal:_}=x,S=new G(g.x,g.y,0).unproject(b),P=M=>{var R,D;return(R=(D=_.capturedMap.get(M))==null?void 0:D.has(v.eventObject))!=null?R:!1},N=M=>{const R={intersection:v,target:c.target};_.capturedMap.has(M)?_.capturedMap.get(M).set(v.eventObject,R):_.capturedMap.set(M,new Map([[v.eventObject,R]])),c.target.setPointerCapture(M)},T=M=>{const R=_.capturedMap.get(M);R&&p8(_.capturedMap,v.eventObject,R,M)};let L={};for(let M in c){let R=c[M];typeof R!="function"&&(L[M]=R)}let U={...v,...L,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:S,ray:y.ray,camera:b,stopPropagation(){const M="pointerId"in c&&_.capturedMap.get(c.pointerId);if((!M||M.has(v.eventObject))&&(U.stopped=m.stopped=!0,_.hovered.size&&Array.from(_.hovered.values()).find(R=>R.eventObject===v.eventObject))){const R=l.slice(0,l.indexOf(v));o([...R,v])}},target:{hasPointerCapture:P,setPointerCapture:N,releasePointerCapture:T},currentTarget:{hasPointerCapture:P,setPointerCapture:N,releasePointerCapture:T},nativeEvent:c};if(f(U),m.stopped===!0)break}}return l}function o(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(Jv(u)),h!=null&&h.eventCount){const v={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function s(l,c){for(let u=0;uo([]);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),o([]))})}}return function(u){const{onPointerMissed:f,internal:h}=t.getState();h.lastEvent.current=u;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",y=r(u,m?n:void 0),g=v?e(u):0;l==="onPointerDown"&&(h.initialClick=[u.offsetX,u.offsetY],h.initialHits=y.map(_=>_.eventObject)),v&&!y.length&&g<=2&&(s(u,h.interaction),f&&f(u)),m&&o(y);function b(_){const S=_.eventObject,P=S.__r3f,N=P==null?void 0:P.handlers;if(P!=null&&P.eventCount)if(m){if(N.onPointerOver||N.onPointerEnter||N.onPointerOut||N.onPointerLeave){const T=Jv(_),L=h.hovered.get(T);L?L.stopped&&_.stopPropagation():(h.hovered.set(T,_),N.onPointerOver==null||N.onPointerOver(_),N.onPointerEnter==null||N.onPointerEnter(_))}N.onPointerMove==null||N.onPointerMove(_)}else{const T=N[l];T?(!v||h.initialHits.includes(S))&&(s(u,h.interaction.filter(L=>!h.initialHits.includes(L))),T(_)):v&&h.initialHits.includes(S)&&s(u,h.interaction.filter(L=>!h.initialHits.includes(L)))}}i(y,u,g,b)}}return{handlePointer:a}}const m8=t=>!!(t!=null&&t.render),g8=A.createContext(null),ihe=(t,e)=>{const n=Wde((a,l)=>{const c=new G,u=new G,f=new G;function h(g=l().camera,b=u,_=l().size){const{width:S,height:P,top:N,left:T}=_,L=S/P;b instanceof G?f.copy(b):f.set(...b);const U=g.getWorldPosition(c).distanceTo(f);if(l8(g))return{width:S/g.zoom,height:P/g.zoom,top:N,left:T,factor:1,distance:U,aspect:L};{const M=g.fov*Math.PI/180,R=2*Math.tan(M/2)*U,D=R*(S/P);return{width:D,height:R,top:N,left:T,factor:S/D,distance:U,aspect:L}}}let m;const v=g=>a(b=>({performance:{...b.performance,current:g}})),x=new Ie;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 wA,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&&v(g.performance.min),m=setTimeout(()=>v(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:h},setEvents:g=>a(b=>({...b,events:{...b.events,...g}})),setSize:(g,b,_,S,P)=>{const N=l().camera,T={width:g,height:b,top:S||0,left:P||0,updateStyle:_};a(L=>({size:T,viewport:{...L.viewport,...h(N,u,T)}}))},setDpr:g=>a(b=>{const _=d8(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:A.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((P,N)=>P.priority-N.priority),()=>{const P=l().internal;P!=null&&P.subscribers&&(P.priority=P.priority-(b>0?1:0),P.subscribers=P.subscribers.filter(N=>N.ref!==g))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,s=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!==o){var h;i=l,o=c.dpr,ehe(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!==s&&(s=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let Qv,ohe=new Set,she=new Set,ahe=new Set;function tE(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function rp(t,e){switch(t){case"before":return tE(ohe,e);case"after":return tE(she,e);case"tail":return tE(ahe,e)}}let nE,rE;function iE(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),nE=e.internal.subscribers,Qv=0;Qv0)&&!((u=o.gl.xr)!=null&&u.isPresenting)&&(r+=iE(c,o))}if(n=!1,rp("after",c),r===0)return rp("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(s)))}function l(c,u=!0,f,h){if(u&&rp("before",c),f)iE(c,f,h);else for(const m of t.values())iE(c,m.store.getState());u&&rp("after",c)}return{loop:s,invalidate:a,advance:l}}function v8(){const t=A.useContext(g8);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function wr(t=n=>n,e){return v8()(t,e)}function RA(t,e=0){const n=v8(),r=n.getState().internal.subscribe,i=c8(t);return Mg(()=>r(i,e,n),[e,r,n]),null}const Rd=new Map,{invalidate:Sk,advance:Mk}=lhe(Rd),{reconciler:bx,applyProps:gf}=qde(Rd,the),vf={objects:"shallow",strict:!1},che=(t,e)=>{const n=typeof t=="function"?t(e):t;return m8(n)?n:new aB({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function uhe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:o,left:s,updateStyle:a=n}=e;return{width:r,height:i,top:o,left:s,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:o,left:s}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:o,left:s,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 fhe(t){const e=Rd.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,o=r||ihe(Sk,Mk),s=n||bx.createContainer(o,Gf.ConcurrentRoot,null,!1,null,"",i,null);e||Rd.set(t,{fiber:s,store:o});let a,l=!1,c;return{configure(u={}){let{gl:f,size:h,scene:m,events:v,onCreated:x,shadows:y=!1,linear:g=!1,flat:b=!1,legacy:_=!1,orthographic:S=!1,frameloop:P="always",dpr:N=[1,2],performance:T,raycaster:L,camera:U,onPointerMissed:M}=u,R=o.getState(),D=R.gl;R.gl||R.set({gl:D=che(f,t)});let O=R.raycaster;O||R.set({raycaster:O=new e8});const{params:B,...X}=L||{};if(wn.equ(X,O,vf)||gf(O,{...X}),wn.equ(B,O.params,vf)||gf(O,{params:{...O.params,...B}}),!R.camera||R.camera===c&&!wn.equ(c,U,vf)){c=U;const K=U instanceof mg,ee=K?U:S?new yg(0,0,0,0,.1,1e3):new vr(75,0,.1,1e3);K||(ee.position.z=5,U&&(gf(ee,U),("aspect"in U||"left"in U||"right"in U||"bottom"in U||"top"in U)&&(ee.manual=!0,ee.updateProjectionMatrix())),!R.camera&&!(U!=null&&U.rotation)&&ee.lookAt(0,0,0)),R.set({camera:ee}),O.camera=ee}if(!R.scene){let K;m instanceof gx?K=m:(K=new gx,m&&gf(K,m)),R.set({scene:Ef(K)})}if(!R.xr){var H;const K=(le,Q)=>{const ae=o.getState();ae.frameloop!=="never"&&Mk(le,!0,ae,Q)},ee=()=>{const le=o.getState();le.gl.xr.enabled=le.gl.xr.isPresenting,le.gl.xr.setAnimationLoop(le.gl.xr.isPresenting?K:null),le.gl.xr.isPresenting||Sk(le)},me={connect(){const le=o.getState().gl;le.xr.addEventListener("sessionstart",ee),le.xr.addEventListener("sessionend",ee)},disconnect(){const le=o.getState().gl;le.xr.removeEventListener("sessionstart",ee),le.xr.removeEventListener("sessionend",ee)}};typeof((H=D.xr)==null?void 0:H.addEventListener)=="function"&&me.connect(),R.set({xr:me})}if(D.shadowMap){const K=D.shadowMap.enabled,ee=D.shadowMap.type;if(D.shadowMap.enabled=!!y,wn.boo(y))D.shadowMap.type=Ap;else if(wn.str(y)){var Z;const me={basic:rU,percentage:t_,soft:Ap,variance:Yo};D.shadowMap.type=(Z=me[y])!=null?Z:Ap}else wn.obj(y)&&Object.assign(D.shadowMap,y);(K!==D.shadowMap.enabled||ee!==D.shadowMap.type)&&(D.shadowMap.needsUpdate=!0)}const F=a8();F&&("enabled"in F?F.enabled=!_:"legacyMode"in F&&(F.legacyMode=_)),l||gf(D,{outputEncoding:g?3e3:3001,toneMapping:b?Os:UR}),R.legacy!==_&&R.set(()=>({legacy:_})),R.linear!==g&&R.set(()=>({linear:g})),R.flat!==b&&R.set(()=>({flat:b})),f&&!wn.fun(f)&&!m8(f)&&!wn.equ(f,D,vf)&&gf(D,f),v&&!R.events.handlers&&R.set({events:v(o)});const Y=uhe(t,h);return wn.equ(Y,R.size,vf)||R.setSize(Y.width,Y.height,Y.updateStyle,Y.top,Y.left),N&&R.viewport.dpr!==d8(N)&&R.setDpr(N),R.frameloop!==P&&R.setFrameloop(P),R.onPointerMissed||R.set({onPointerMissed:M}),T&&!wn.equ(T,R.performance,vf)&&R.set(K=>({performance:{...K.performance,...T}})),a=x,l=!0,this},render(u){return l||this.configure(),bx.updateContainer(C.jsx(dhe,{store:o,children:u,onCreated:a,rootElement:t}),s,null,()=>{}),o},unmount(){y8(t)}}}function dhe({store:t,children:e,onCreated:n,rootElement:r}){return Mg(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),C.jsx(g8.Provider,{value:t,children:e})}function y8(t,e){const n=Rd.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),bx.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,s,a,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(s=o.renderLists)==null||s.dispose==null||s.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),Jde(i),Rd.delete(t)}catch{}},500)})}}bx.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:A.version});const oE={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 hhe(t){const{handlePointer:e}=rhe(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(oE).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:o}=t.getState();o.disconnect==null||o.disconnect(),i(s=>({events:{...s.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([s,a])=>{const[l,c]=oE[s];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(([o,s])=>{if(r&&r.connected instanceof HTMLElement){const[a]=oE[o];r.connected.removeEventListener(a,s)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}function wC(t,e,n){var r,i,o,s,a;e==null&&(e=100);function l(){var u=Date.now()-s;u=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}var c=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}wC.debounce=wC;var phe=wC;const Ek=$s(phe);var mhe=Object.defineProperty,ghe=Object.defineProperties,vhe=Object.getOwnPropertyDescriptors,Ck=Object.getOwnPropertySymbols,yhe=Object.prototype.hasOwnProperty,xhe=Object.prototype.propertyIsEnumerable,Tk=(t,e,n)=>e in t?mhe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rk=(t,e)=>{for(var n in e||(e={}))yhe.call(e,n)&&Tk(t,n,e[n]);if(Ck)for(var n of Ck(e))xhe.call(e,n)&&Tk(t,n,e[n]);return t},bhe=(t,e)=>ghe(t,vhe(e)),Ak,Pk;typeof window<"u"&&((Ak=window.document)!=null&&Ak.createElement||((Pk=window.navigator)==null?void 0:Pk.product)==="ReactNative")?A.useLayoutEffect:A.useEffect;function x8(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const i=x8(r,e,n);if(i)return i;r=r.sibling}}function b8(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const Nk=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=Nk;return}return Nk.apply(this,arguments)};const AA=b8(A.createContext(null));class _8 extends A.Component{render(){return A.createElement(AA.Provider,{value:this._reactInternals},this.props.children)}}function _he(){const t=A.useContext(AA);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=A.useId();return A.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=x8(r,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(i)return i}},[t,e])}function whe(){const t=_he(),[e]=A.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!==AA&&!e.has(i)&&e.set(i,A.useContext(b8(i)))}n=n.return}return e}function She(){const t=whe();return A.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>A.createElement(e,null,A.createElement(n.Provider,bhe(Rk({},r),{value:t.get(n)}))),e=>A.createElement(_8,Rk({},e))),[t])}function Mhe({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||typeof window<"u"&&window.ResizeObserver,[o,s]=A.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!i)return o.width=1280,o.height=800,[()=>{},o,()=>{}];const a=A.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=A.useRef(!1);A.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[f,h,m]=A.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:b,top:_,width:S,height:P,bottom:N,right:T,x:L,y:U}=a.current.element.getBoundingClientRect(),M={left:b,top:_,width:S,height:P,bottom:N,right:T,x:L,y:U};a.current.element instanceof HTMLElement&&r&&(M.height=a.current.element.offsetHeight,M.width=a.current.element.offsetWidth),Object.freeze(M),u.current&&!Rhe(a.current.lastBounds,M)&&s(a.current.lastBounds=M)};return[g,c?Ek(g,c):g,l?Ek(g,l):g]},[s,r,l,c]);function v(){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(){var g;a.current.element&&(a.current.resizeObserver=new i(h),(g=a.current.resizeObserver)==null||g.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(b=>b.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 y=g=>{!g||g===a.current.element||(v(),a.current.element=g,a.current.scrollContainers=w8(g),x())};return Che(m,!!e),Ehe(h),A.useEffect(()=>{v(),x()},[e,m,h]),A.useEffect(()=>v,[]),[y,o,f]}function Ehe(t){A.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Che(t,e){A.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function w8(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(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...w8(t.parentElement)]}const The=["x","y","top","bottom","left","right","width","height"],Rhe=(t,e)=>The.every(n=>t[n]===e[n]),Ahe=A.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:s=hhe,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,onPointerMissed:S,onCreated:P,...N},T){A.useMemo(()=>s8(jde),[]);const L=She(),[U,M]=Mhe({scroll:!0,debounce:{scroll:50,resize:0},...r}),R=A.useRef(null),D=A.useRef(null);A.useImperativeHandle(T,()=>R.current);const O=c8(S),[B,X]=A.useState(!1),[H,Z]=A.useState(!1);if(B)throw B;if(H)throw H;const F=A.useRef(null);Mg(()=>{const K=R.current;M.width>0&&M.height>0&&K&&(F.current||(F.current=fhe(K)),F.current.configure({gl:o,events:s,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,size:M,onPointerMissed:(...ee)=>O.current==null?void 0:O.current(...ee),onCreated:ee=>{ee.events.connect==null||ee.events.connect(a?Yde(a)?a.current:a:D.current),l&&ee.setEvents({compute:(me,le)=>{const Q=me[l+"X"],ae=me[l+"Y"];le.pointer.set(Q/le.size.width*2-1,-(ae/le.size.height)*2+1),le.raycaster.setFromCamera(le.pointer,le.camera)}}),P==null||P(ee)}}),F.current.render(C.jsx(L,{children:C.jsx(u8,{set:Z,children:C.jsx(A.Suspense,{fallback:C.jsx(Kde,{set:X}),children:e})})})))}),A.useEffect(()=>{const K=R.current;if(K)return()=>y8(K)},[]);const Y=a?"none":"auto";return C.jsx("div",{ref:D,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:Y,...i},...N,children:C.jsx("div",{ref:U,style:{width:"100%",height:"100%"},children:C.jsx("canvas",{ref:R,style:{display:"block"},children:n})})})}),Phe=A.forwardRef(function(e,n){return C.jsx(_8,{children:C.jsx(Ahe,{...e,ref:n})})});function N_(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function eh(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Eg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Gl(){}var fu=.7,Ad=1/fu,sd="\\s*([+-]?\\d+)\\s*",Bm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nhe=/^#([0-9a-f]{3,8})$/,Ihe=new RegExp(`^rgb\\(${sd},${sd},${sd}\\)$`),Lhe=new RegExp(`^rgb\\(${Fs},${Fs},${Fs}\\)$`),khe=new RegExp(`^rgba\\(${sd},${sd},${sd},${Bm}\\)$`),Ohe=new RegExp(`^rgba\\(${Fs},${Fs},${Fs},${Bm}\\)$`),Dhe=new RegExp(`^hsl\\(${Bm},${Fs},${Fs}\\)$`),Fhe=new RegExp(`^hsla\\(${Bm},${Fs},${Fs},${Bm}\\)$`),Ik={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};eh(Gl,jm,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Lk,formatHex:Lk,formatHex8:zhe,formatHsl:Uhe,formatRgb:kk,toString:kk});function Lk(){return this.rgb().formatHex()}function zhe(){return this.rgb().formatHex8()}function Uhe(){return S8(this).formatHsl()}function kk(){return this.rgb().formatRgb()}function jm(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Nhe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ok(e):n===3?new yr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ey(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ey(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=Ihe.exec(t))?new yr(e[1],e[2],e[3],1):(e=Lhe.exec(t))?new yr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=khe.exec(t))?ey(e[1],e[2],e[3],e[4]):(e=Ohe.exec(t))?ey(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Dhe.exec(t))?zk(e[1],e[2]/100,e[3]/100,1):(e=Fhe.exec(t))?zk(e[1],e[2]/100,e[3]/100,e[4]):Ik.hasOwnProperty(t)?Ok(Ik[t]):t==="transparent"?new yr(NaN,NaN,NaN,0):null}function Ok(t){return new yr(t>>16&255,t>>8&255,t&255,1)}function ey(t,e,n,r){return r<=0&&(t=e=n=NaN),new yr(t,e,n,r)}function PA(t){return t instanceof Gl||(t=jm(t)),t?(t=t.rgb(),new yr(t.r,t.g,t.b,t.opacity)):new yr}function Il(t,e,n,r){return arguments.length===1?PA(t):new yr(t,e,n,r??1)}function yr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}eh(yr,Il,Eg(Gl,{brighter(t){return t=t==null?Ad:Math.pow(Ad,t),new yr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fu:Math.pow(fu,t),new yr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new yr(Gc(this.r),Gc(this.g),Gc(this.b),_x(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:Dk,formatHex:Dk,formatHex8:Bhe,formatRgb:Fk,toString:Fk}));function Dk(){return`#${Oc(this.r)}${Oc(this.g)}${Oc(this.b)}`}function Bhe(){return`#${Oc(this.r)}${Oc(this.g)}${Oc(this.b)}${Oc((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fk(){const t=_x(this.opacity);return`${t===1?"rgb(":"rgba("}${Gc(this.r)}, ${Gc(this.g)}, ${Gc(this.b)}${t===1?")":`, ${t})`}`}function _x(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Oc(t){return t=Gc(t),(t<16?"0":"")+t.toString(16)}function zk(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new es(t,e,n,r)}function S8(t){if(t instanceof es)return new es(t.h,t.s,t.l,t.opacity);if(t instanceof Gl||(t=jm(t)),!t)return new es;if(t instanceof es)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n0&&l<1?0:s,new es(s,a,l,t.opacity)}function wx(t,e,n,r){return arguments.length===1?S8(t):new es(t,e,n,r??1)}function es(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}eh(es,wx,Eg(Gl,{brighter(t){return t=t==null?Ad:Math.pow(Ad,t),new es(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fu:Math.pow(fu,t),new es(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 yr(sE(t>=240?t-240:t+120,i,r),sE(t,i,r),sE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new es(Uk(this.h),ty(this.s),ty(this.l),_x(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=_x(this.opacity);return`${t===1?"hsl(":"hsla("}${Uk(this.h)}, ${ty(this.s)*100}%, ${ty(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Uk(t){return t=(t||0)%360,t<0?t+360:t}function ty(t){return Math.max(0,Math.min(1,t||0))}function sE(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 M8=Math.PI/180,E8=180/Math.PI,Sx=18,C8=.96422,T8=1,R8=.82521,A8=4/29,ad=6/29,P8=3*ad*ad,jhe=ad*ad*ad;function N8(t){if(t instanceof zs)return new zs(t.l,t.a,t.b,t.opacity);if(t instanceof xa)return I8(t);t instanceof yr||(t=PA(t));var e=uE(t.r),n=uE(t.g),r=uE(t.b),i=aE((.2225045*e+.7168786*n+.0606169*r)/T8),o,s;return e===n&&n===r?o=s=i:(o=aE((.4360747*e+.3850649*n+.1430804*r)/C8),s=aE((.0139322*e+.0971045*n+.7141733*r)/R8)),new zs(116*i-16,500*(o-i),200*(i-s),t.opacity)}function SC(t,e,n,r){return arguments.length===1?N8(t):new zs(t,e,n,r??1)}function zs(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}eh(zs,SC,Eg(Gl,{brighter(t){return new zs(this.l+Sx*(t??1),this.a,this.b,this.opacity)},darker(t){return new zs(this.l-Sx*(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=C8*lE(e),t=T8*lE(t),n=R8*lE(n),new yr(cE(3.1338561*e-1.6168667*t-.4906146*n),cE(-.9787684*e+1.9161415*t+.033454*n),cE(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function aE(t){return t>jhe?Math.pow(t,1/3):t/P8+A8}function lE(t){return t>ad?t*t*t:P8*(t-A8)}function cE(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function uE(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Vhe(t){if(t instanceof xa)return new xa(t.h,t.c,t.l,t.opacity);if(t instanceof zs||(t=N8(t)),t.a===0&&t.b===0)return new xa(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r()=>t;function k8(t,e){return function(n){return t+n*e}}function Ghe(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 LA(t,e){var n=e-t;return n?k8(t,n>180||n<-180?n-360*Math.round(n/360):n):L_(isNaN(t)?e:t)}function Xhe(t){return(t=+t)==1?xr:function(e,n){return n-e?Ghe(e,n,t):L_(isNaN(e)?n:e)}}function xr(t,e){var n=e-t;return n?k8(t,n):L_(isNaN(t)?e:t)}const EC=function t(e){var n=Xhe(e);function r(i,o){var s=n((i=Il(i)).r,(o=Il(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=xr(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function qhe(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),s,a;for(s=0;sn&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Pd(r,i)})),n=fE.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function hpe(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i2?ppe:hpe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(r),e,n)))(r(s(h)))}return f.invert=function(h){return s(i((c||(c=a(e,t.map(r),Pd)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,fpe),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=OA,u()},f.clamp=function(h){return arguments.length?(s=h?!0:Ps,u()):s!==Ps},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,m){return r=h,i=m,u()}}function mpe(){return D_()(Ps,Ps)}function gpe(t,e,n,r){var i=q6(t,e,n),o;switch(r=xm(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Jre(i,s))&&(r.precision=o),Z6(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Qre(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Zre(i))&&(r.precision=o-(r.type==="%")*2);break}}return Gs(r)}function DA(t){var e=t.domain;return t.ticks=function(n){var r=e();return tC(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return gpe(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,u=10;for(a0;){if(c=nC(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function z8(){var t=mpe();return t.copy=function(){return O_(t,z8())},N_.apply(t,arguments),DA(t)}function vpe(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return oMath.pow(t,e)}function wpe(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 Gk(t){return(e,n)=>-t(-e,n)}function Spe(t){const e=t(Wk,Hk),n=e.domain;let r=10,i,o;function s(){return i=wpe(r),o=_pe(r),n()[0]<0?(i=Gk(i),o=Gk(o),t(ype,xpe)):t(Wk,Hk),e}return e.base=function(a){return arguments.length?(r=+a,s()):r},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=m;++h)for(v=1;vu)break;g.push(x)}}else for(;h<=m;++h)for(v=r-1;v>=1;--v)if(x=h>0?v/o(-h):v*o(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=xm(l)).precision==null&&(l.trim=!0),l=Gs(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/o(Math.round(i(u)));return f*rn(vpe(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),e}function U8(){const t=Spe(D_()).domain([1,10]);return t.copy=()=>O_(t,U8()).base(t.base()),N_.apply(t,arguments),t}function Xk(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function qk(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Mpe(t){var e=1,n=t(Xk(e),qk(e));return n.constant=function(r){return arguments.length?t(Xk(e=+r),qk(e)):e},DA(n)}function B8(){var t=Mpe(D_());return t.copy=function(){return O_(t,B8()).constant(t.constant())},N_.apply(t,arguments)}function Yk(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Epe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Cpe(t){return t<0?-t*t:t*t}function Tpe(t){var e=t(Ps,Ps),n=1;function r(){return n===1?t(Ps,Ps):n===.5?t(Epe,Cpe):t(Yk(n),Yk(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},DA(e)}function FA(){var t=Tpe(D_());return t.copy=function(){return O_(t,FA()).exponent(t.exponent())},N_.apply(t,arguments),t}function Rpe(){return FA.apply(null,arguments).exponent(.5)}const dE=new Date,hE=new Date;function Lr(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const l=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(cLr(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(dE.setTime(+o),hE.setTime(+s),t(dE),t(hE),Math.floor(n(dE,hE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const $m=1e3,Ll=$m*60,Wm=Ll*60,Hm=Wm*24,j8=Hm*7,zA=Lr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*$m)},(t,e)=>(e-t)/$m,t=>t.getUTCSeconds());zA.range;const V8=Lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$m)},(t,e)=>{t.setTime(+t+e*Ll)},(t,e)=>(e-t)/Ll,t=>t.getMinutes());V8.range;const $8=Lr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Ll)},(t,e)=>(e-t)/Ll,t=>t.getUTCMinutes());$8.range;const W8=Lr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$m-t.getMinutes()*Ll)},(t,e)=>{t.setTime(+t+e*Wm)},(t,e)=>(e-t)/Wm,t=>t.getHours());W8.range;const H8=Lr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Wm)},(t,e)=>(e-t)/Wm,t=>t.getUTCHours());H8.range;const G8=Lr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ll)/Hm,t=>t.getDate()-1);G8.range;const X8=Lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Hm,t=>t.getUTCDate()-1);X8.range;const Ape=Lr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Hm,t=>Math.floor(t/Hm));Ape.range;function Cu(t){return Lr(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())*Ll)/j8)}const q8=Cu(0),Ppe=Cu(1),Npe=Cu(2),Ipe=Cu(3),Lpe=Cu(4),kpe=Cu(5),Ope=Cu(6);q8.range;Ppe.range;Npe.range;Ipe.range;Lpe.range;kpe.range;Ope.range;function Tu(t){return Lr(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)/j8)}const Y8=Tu(0),Dpe=Tu(1),Fpe=Tu(2),zpe=Tu(3),Upe=Tu(4),Bpe=Tu(5),jpe=Tu(6);Y8.range;Dpe.range;Fpe.range;zpe.range;Upe.range;Bpe.range;jpe.range;const K8=Lr(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());K8.range;const Z8=Lr(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());Z8.range;const UA=Lr(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());UA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Lr(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)});UA.range;const BA=Lr(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());BA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Lr(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)});BA.range;function Vpe(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function $pe(t,e){e.range&&("padding"in t,t.range(e.range))}function Wpe(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function Hpe(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function Gpe(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function Xpe(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function qpe(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var Kk={lab:spe,hcl:ape,"hcl-long":lpe,hsl:ipe,"hsl-long":ope,cubehelix:cpe,"cubehelix-long":k_,rgb:EC};function Ype(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Kk[t]}var e=t.type,n=t.gamma,r=Kk[e];return typeof n>"u"?r:r.gamma(n)}function Kpe(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=Ype(e.interpolate);t.interpolate(n)}}var Zpe=new Date(Date.UTC(2020,1,2,3,4,5)),Jpe="%Y-%m-%d %H:%M";function Qpe(t){var e=t.tickFormat(1,Jpe)(Zpe);return e==="2020-02-02 03:04"}var Zk={day:G8,hour:W8,minute:V8,month:K8,second:zA,week:q8,year:UA},Jk={day:X8,hour:H8,minute:$8,month:Z8,second:zA,week:Y8,year:BA};function eme(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=Qpe(r);if(typeof n=="string")r.nice(i?Jk[n]:Zk[n]);else{var o=n.interval,s=n.step,a=(i?Jk[o]:Zk[o]).every(s);a!=null&&r.nice(a)}}}}function tme(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 nme(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function rme(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(OA))}function ime(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function ome(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],o=i=0)&&(n[i]=t[i]);return n}function Mx(){return Mx=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var V8={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"},$A=Mt.forwardRef(function(t,e){var n=t.className,r=t.top,i=t.left,o=t.offsetLeft,s=o===void 0?10:o,a=t.offsetTop,l=a===void 0?10:a,c=t.style,u=c===void 0?V8:c,f=t.children,h=t.unstyled,m=h===void 0?!1:h,v=t.applyPositionStyle,x=v===void 0?!1:v,y=bpe(t,xpe);return Mt.createElement("div",_x({ref:e,className:as("visx-tooltip",n),style:_x({top:r==null||l==null?r:r+l,left:i==null||s==null?i:i+s},x&&{position:"absolute"},!m&&u)},y),f)});$A.propTypes={children:qt.node,className:qt.string,left:qt.number,offsetLeft:qt.number,offsetTop:qt.number,top:qt.number,applyPositionStyle:qt.bool,unstyled:qt.bool};$A.displayName="Tooltip";function EC(){return EC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function W8(t){var e=t.children;t.getRects;var n=t.left,r=n===void 0?0:n,i=t.offsetLeft,o=i===void 0?10:i,s=t.offsetTop,a=s===void 0?10:s,l=t.parentRect,c=t.rect,u=t.style,f=u===void 0?V8:u,h=t.top,m=h===void 0?0:h,v=t.unstyled,x=v===void 0?!1:v,y=t.nodeRef,g=Cpe(t,Epe),b,_=!1,S=!1;if(c&&l){var P=r,N=m;if(l.width){var T=P+o+c.width-l.width,L=c.width-P-o;_=T>0&&T>L}else{var U=P+o+c.width-window.innerWidth,M=c.width-P-o;_=U>0&&U>M}if(l.height){var R=N+a+c.height-l.height,D=c.height-N-a;S=R>0&&R>D}else S=N+a+c.height>window.innerHeight;P=_?P-c.width-o:P+o,N=S?N-c.height-a:N+a,P=Math.round(P),N=Math.round(N),b="translate("+P+"px, "+N+"px)"}return Mt.createElement($A,wx({ref:y,style:wx({left:0,top:0,transform:b},!x&&f)},g),Mt.createElement(Mpe,{value:{isFlippedVertically:!S,isFlippedHorizontally:!_}},e))}W8.propTypes={nodeRef:qt.oneOfType([qt.string,qt.func,qt.object])};const Tpe=Spe(W8);var Rpe=["top","left","transform","className","children","innerRef"];function TC(){return TC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Cg(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.transform,s=t.className,a=t.children,l=t.innerRef,c=Ape(t,Rpe);return Mt.createElement("g",TC({ref:l,className:as("visx-group",s),transform:o||"translate("+i+", "+n+")"},c),a)}Cg.propTypes={top:qt.number,left:qt.number,transform:qt.string,className:qt.string,children:qt.node,innerRef:qt.oneOfType([qt.string,qt.func,qt.object])};var Ppe=["from","to","fill","className","innerRef"];function RC(){return RC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Sx(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,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=Npe(t,Ppe),u=n.x===i.x||n.y===i.y;return Mt.createElement("line",RC({ref:l,className:as("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}var Ipe=H8;function H8(t,e,n){t instanceof RegExp&&(t=qk(t,n)),e instanceof RegExp&&(e=qk(e,n));var r=G8(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 qk(t,e){var n=e.match(t);return n?n[0]:null}H8.range=G8;function G8(t,e,n){var r,i,o,s,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){for(r=[],o=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=[o,s])}return a}var Lpe=X8;function X8(t,e,n){t instanceof RegExp&&(t=Yk(t,n)),e instanceof RegExp&&(e=Yk(e,n));var r=q8(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 Yk(t,e){var n=e.match(t);return n?n[0]:null}X8.range=q8;function q8(t,e,n){var r,i,o,s,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=[],o=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=[o,s])}return a}var kpe=Lpe,Ope=Y8;function Y8(t,e,n){var r=t;return Dpe(t,e).reduce(function(i,o){return i.replace(o.functionIdentifier+"("+o.matches.body+")",Fpe(o.matches.body,o.functionIdentifier,n,r,e))},t)}function Dpe(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 o=i[1],s=i.index,a=kpe("(",")",t.substring(s));if(!a||a.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:a,functionIdentifier:o}),t=a.post}while(r.test(t));return n}function Fpe(t,e,n,r,i){return n(Y8(t,i,n),e,r)}var ri=function(t){this.value=t};ri.math={isDegree:!0,acos:function(t){return ri.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return ri.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return ri.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-s;i>0;i--)if(oi[i]!==void 0)for(o=0;o0&&cr)s.push(e);else{for(;r>=i&&!c||c&&i"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===8){for(var l=[],c=0;c"u"?(r.value=r.concat(n),r.value.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===2||o[a].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:o[a].value(i.value,r.value,new Up(n))})):o[a].type===13&&(s?e.push({value:t[o[a].value],type:3}):e.push([o[a]]));if(e.length>1)throw new Up.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};Up.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 Gpe=Up,Z8=Gpe;Z8.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o"+e.value+""+i[o].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[o].type===2||i[o].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[o].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[o].type})):i[o].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var Xpe=Z8,qpe=Ipe,Ype=Ope,Kpe=Xpe,Zpe=100,Jpe=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,hE,Qpe=eme;function eme(t,e){hE=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,o,s){if(hE++>Zpe)throw hE=0,new Error("Call stack overflow for "+s);if(i==="")throw new Error(o+"(): '"+s+"' must contain a non-whitespace string");i=r(i,s);var a=tme(i);if(a.length>1||i.indexOf("var(")>-1)return o+"("+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=Kpe.eval(c)}catch{return o+"("+i+")"}return l==="%"&&(u*=100),(o.length||l==="%")&&(u=Math.round(u*e)/e),u+=l,u}function r(i,o){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",a=i,l;l=Jpe.exec(a);){l[0].index>0&&(s+=a.substring(0,l[0].index));var c=qpe("(",")",a.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",o);s+=c.pre+u,a=c.post}return s+a}return Ype(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function tme(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 pE=$s(Qpe);var nme=typeof k0=="object"&&k0&&k0.Object===Object&&k0,rme=nme,ime=rme,ome=typeof self=="object"&&self&&self.Object===Object&&self,sme=ime||ome||Function("return this")(),WA=sme,ame=WA,lme=ame.Symbol,J8=lme,Kk=J8,Q8=Object.prototype,cme=Q8.hasOwnProperty,ume=Q8.toString,sp=Kk?Kk.toStringTag:void 0;function fme(t){var e=cme.call(t,sp),n=t[sp];try{t[sp]=void 0;var r=!0}catch{}var i=ume.call(t);return r&&(e?t[sp]=n:delete t[sp]),i}var dme=fme,hme=Object.prototype,pme=hme.toString;function mme(t){return pme.call(t)}var gme=mme,Zk=J8,vme=dme,yme=gme,xme="[object Null]",bme="[object Undefined]",Jk=Zk?Zk.toStringTag:void 0;function _me(t){return t==null?t===void 0?bme:xme:Jk&&Jk in Object(t)?vme(t):yme(t)}var wme=_me;function Sme(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var e9=Sme,Mme=wme,Eme=e9,Cme="[object AsyncFunction]",Tme="[object Function]",Rme="[object GeneratorFunction]",Ame="[object Proxy]";function Pme(t){if(!Eme(t))return!1;var e=Mme(t);return e==Tme||e==Rme||e==Cme||e==Ame}var Nme=Pme,Ime=WA,Lme=Ime["__core-js_shared__"],kme=Lme,mE=kme,Qk=function(){var t=/[^.]+$/.exec(mE&&mE.keys&&mE.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ome(t){return!!Qk&&Qk in t}var Dme=Ome,Fme=Function.prototype,zme=Fme.toString;function Ume(t){if(t!=null){try{return zme.call(t)}catch{}try{return t+""}catch{}}return""}var Bme=Ume,jme=Nme,Vme=Dme,$me=e9,Wme=Bme,Hme=/[\\^$.*+?()[\]{}|]/g,Gme=/^\[object .+?Constructor\]$/,Xme=Function.prototype,qme=Object.prototype,Yme=Xme.toString,Kme=qme.hasOwnProperty,Zme=RegExp("^"+Yme.call(Kme).replace(Hme,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Jme(t){if(!$me(t)||Vme(t))return!1;var e=jme(t)?Zme:Gme;return e.test(Wme(t))}var Qme=Jme;function ege(t,e){return t==null?void 0:t[e]}var tge=ege,nge=Qme,rge=tge;function ige(t,e){var n=rge(t,e);return nge(n)?n:void 0}var t9=ige,oge=t9,sge=oge(Object,"create"),k_=sge,eO=k_;function age(){this.__data__=eO?eO(null):{},this.size=0}var lge=age;function cge(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var uge=cge,fge=k_,dge="__lodash_hash_undefined__",hge=Object.prototype,pge=hge.hasOwnProperty;function mge(t){var e=this.__data__;if(fge){var n=e[t];return n===dge?void 0:n}return pge.call(e,t)?e[t]:void 0}var gge=mge,vge=k_,yge=Object.prototype,xge=yge.hasOwnProperty;function bge(t){var e=this.__data__;return vge?e[t]!==void 0:xge.call(e,t)}var _ge=bge,wge=k_,Sge="__lodash_hash_undefined__";function Mge(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=wge&&e===void 0?Sge:e,this}var Ege=Mge,Cge=lge,Tge=uge,Rge=gge,Age=_ge,Pge=Ege;function eh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var qge=Xge,Yge=O_;function Kge(t,e){var n=this.__data__,r=Yge(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Zge=Kge,Jge=Lge,Qge=Vge,e0e=Hge,t0e=qge,n0e=Zge;function th(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function gE(t){return typeof t=="number"}function iO(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function B0e(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,o=t.angle,s=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=U0e(t,z0e),v=m.x,x=v===void 0?0:v,y=m.y,g=y===void 0?0:y,b=!iO(x)||!iO(g),_=A.useMemo(function(){var U=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:U.map(function(M){return{word:M,wordWidth:rO(M,h)||0}}),spaceWidth:rO(" ",h)||0}},[f,h]),S=_.wordsWithWidth,P=_.spaceWidth,N=A.useMemo(function(){return b?[]:s||i?S.reduce(function(U,M){var R=M.word,D=M.wordWidth,O=U[U.length-1];if(O&&(s==null||i||(O.width||0)+D+P0){var M=N[0].width||1,R=i==="shrink-only"?Math.min(s/M,1):s/M,D=R,O=x-R*x,B=g-D*g;U.push("matrix("+R+", 0, 0, "+D+", "+O+", "+B+")")}return o&&U.push("rotate("+o+", "+x+", "+g+")"),U.length>0?U.join(" "):""},[b,x,g,s,i,N,o]);return{wordsByLines:N,startDy:T,transform:L}}var j0e=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function NC(){return NC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var $0e={overflow:"visible"};function r9(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,o=t.textAnchor,s=o===void 0?"start":o,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=V0e(t,j0e),h=f.x,m=h===void 0?0:h,v=f.fontSize,x=B0e(t),y=x.wordsByLines,g=x.startDy,b=x.transform;return Mt.createElement("svg",{ref:a,x:n,y:i,fontSize:v,style:$0e},y.length>0?Mt.createElement("text",NC({ref:l,transform:b},f,{textAnchor:s}),y.map(function(_,S){return Mt.createElement("tspan",{key:S,x:m,dy:S===0?g:u},_.words.join(" "))})):null)}var Yi={top:"top",left:"left",right:"right",bottom:"bottom"};function W0e(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,o=t.tickLabelFontSize,s=t.tickLength,a=r===Yi.left||r===Yi.top?-1:1,l,c,u;if(r===Yi.top||r===Yi.bottom){var f=r===Yi.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=a*(s+e+o+f)}else l=a*((Number(i[0])+Number(i[i.length-1]))/2),c=-(s+e),u="rotate("+a*90+")";return{x:l,y:c,transform:u}}function Bp(){return Bp=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?G0e:e,r=t.axisClassName,i=t.hideAxisLine,o=i===void 0?!1:i,s=t.hideTicks,a=s===void 0?!1:s,l=t.hideZero,c=l===void 0?!1:l,u=t.innerRef,f=t.left,h=f===void 0?0:f,m=t.numTicks,v=m===void 0?10:m,x=t.orientation,y=x===void 0?Yi.bottom:x,g=t.rangePadding,b=g===void 0?0:g,_=t.scale,S=t.tickFormat,P=t.tickLength,N=P===void 0?8:P,T=t.tickValues,L=t.top,U=L===void 0?0:L,M=Z0e(t,K0e),R=S??q0e(_),D=y===Yi.left,O=y===Yi.top,B=O||y===Yi.bottom,X=X0e(_),H=D||O?-1:1,Z=_.range(),F=Y0e(b),Y=iy({x:Number(Z[0])+.5-F.start,y:0},B),K=iy({x:Number(Z[Z.length-1])+.5+F.end,y:0},B),ee=(T??VA(_,v)).filter(function(le){return!c||le!==0&&le!=="0"}).map(function(le,Q){return{value:le,index:Q}}),me=ee.map(function(le){var Q=le.value,ae=le.index,ge=jA(X(Q));return{value:Q,index:ae,from:iy({x:ge,y:0},B),to:iy({x:ge,y:N*H},B),formattedValue:R(Q,ae,ee)}});return Mt.createElement(Cg,{className:as("visx-axis",r),innerRef:u,top:U,left:h},n(LC({},M,{axisFromPoint:Y,axisToPoint:K,hideAxisLine:o,hideTicks:a,hideZero:c,horizontal:B,numTicks:v,orientation:y,rangePadding:b,scale:_,tickFormat:R,tickLength:N,tickPosition:X,tickSign:H,ticks:me})))}var J0e=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Mx(){return Mx=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var eve={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function tve(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=Q0e(t,J0e),l=typeof s=="function"?s:Mx({},eve,s);return Mt.createElement(i9,Mx({axisClassName:as("visx-axis-left",e),labelOffset:r,orientation:Yi.left,tickLabelProps:l,tickLength:o},a))}var nve=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Ex(){return Ex=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var ive={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function ove(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=rve(t,nve),l=typeof s=="function"?s:Ex({},ive,s);return Mt.createElement(i9,Ex({axisClassName:as("visx-axis-bottom",e),labelOffset:r,orientation:Yi.bottom,tickLabelProps:l,tickLength:o},a))}var o9=uve,sve=s9(A),ave=s9(j8),lve=["from","to","fill","className","innerRef"];function s9(t){return t&&t.__esModule?t:{default:t}}function kC(){return kC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function uve(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,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=cve(t,lve),u=n.x===i.x||n.y===i.y;return sve.default.createElement("line",kC({ref:l,className:(0,ave.default)("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}function a9(t){return"bandwidth"in t?t.bandwidth():0}var fve=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function OC(){return OC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function l9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=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,v=t.numTicks,x=v===void 0?10:v,y=t.lineStyle,g=t.offset,b=t.tickValues,_=dve(t,fve),S=b??VA(o,x),P=(g??0)+a9(o)/2,N=S.map(function(T,L){var U,M=((U=jA(o(T)))!=null?U:0)+P;return{index:L,from:new Wm({x:0,y:M}),to:new Wm({x:s,y:M})}});return Mt.createElement(Cg,{className:as("visx-rows",h),top:n,left:i},m?m({lines:N}):N.map(function(T){var L=T.from,U=T.to,M=T.index;return Mt.createElement(o9,OC({key:"row-line-"+M,from:L,to:U,stroke:l,strokeWidth:u,strokeDasharray:f,style:y},_))}))}l9.propTypes={tickValues:qt.array,width:qt.number.isRequired};var hve=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function DC(){return DC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function c9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=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,v=m===void 0?10:m,x=t.lineStyle,y=t.offset,g=t.tickValues,b=t.children,_=pve(t,hve),S=g??VA(o,v),P=(y??0)+a9(o)/2,N=S.map(function(T,L){var U,M=((U=jA(o(T)))!=null?U:0)+P;return{index:L,from:new Wm({x:M,y:0}),to:new Wm({x:M,y:s})}});return Mt.createElement(Cg,{className:as("visx-columns",h),top:n,left:i},b?b({lines:N}):N.map(function(T){var L=T.from,U=T.to,M=T.index;return Mt.createElement(o9,DC({key:"column-line-"+M,from:L,to:U,stroke:l,strokeWidth:u,strokeDasharray:f,style:x},_))}))}c9.propTypes={tickValues:qt.array,height:qt.number.isRequired};function fn(t){for(var e=t.length/6|0,n=new Array(e),r=0;rXde(t[t.length-1]);var mve=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(fn);const gve=yn(mve);var vve=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(fn);const yve=yn(vve);var xve=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(fn);const bve=yn(xve);var _ve=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(fn);const wve=yn(_ve);var Sve=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(fn);const Mve=yn(Sve);var Eve=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(fn);const Cve=yn(Eve);var Tve=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(fn);const Rve=yn(Tve);var Ave=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(fn);const Pve=yn(Ave);var Nve=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(fn);const Ive=yn(Nve);var Lve=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(fn);const kve=yn(Lve);var Ove=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(fn);const Dve=yn(Ove);var Fve=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(fn);const zve=yn(Fve);var Uve=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(fn);const Bve=yn(Uve);var jve=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(fn);const Vve=yn(jve);var $ve=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(fn);const Wve=yn($ve);var Hve=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(fn);const Gve=yn(Hve);var Xve=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(fn);const qve=yn(Xve);var Yve=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(fn);const Kve=yn(Yve);var Zve=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(fn);const Jve=yn(Zve);var Qve=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(fn);const eye=yn(Qve);var tye=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(fn);const nye=yn(tye);var rye=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(fn);const iye=yn(rye);var oye=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(fn);const sye=yn(oye);var aye=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(fn);const lye=yn(aye);var cye=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(fn);const uye=yn(cye);var fye=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(fn);const dye=yn(fye);var hye=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(fn);const pye=yn(hye);function mye(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 gye=N_(js(300,.5,0),js(-240,.5,1));var vye=N_(js(-100,.75,.35),js(80,1.5,.8)),yye=N_(js(260,.75,.35),js(80,1.5,.8)),oy=js();function xye(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return oy.h=360*t-100,oy.s=1.5-1.5*e,oy.l=.8-.9*e,oy+""}var sy=Il(),bye=Math.PI/3,_ye=Math.PI*2/3;function wye(t){var e;return t=(.5-t)*Math.PI,sy.r=255*(e=Math.sin(t))*e,sy.g=255*(e=Math.sin(t+bye))*e,sy.b=255*(e=Math.sin(t+_ye))*e,sy+""}function Sye(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 F_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Mye=F_(fn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Eye=F_(fn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Cye=F_(fn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Tye=F_(fn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function GA(t,e=0,n=[]){return A.Children.toArray(t).reduce((r,i,o)=>(V2.isFragment(i)?r.push.apply(r,GA(i.props.children,e+1,n.concat(i.key||o))):A.isValidElement(i)?r.push(A.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&r.push(i),r),[])}function z_(){return typeof window<"u"}function rh(t){return u9(t)?(t.nodeName||"").toLowerCase():"#document"}function to(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ys(t){var e;return(e=(u9(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function u9(t){return z_()?t instanceof Node||t instanceof to(t).Node:!1}function li(t){return z_()?t instanceof Element||t instanceof to(t).Element:!1}function io(t){return z_()?t instanceof HTMLElement||t instanceof to(t).HTMLElement:!1}function FC(t){return!z_()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof to(t).ShadowRoot}function Tg(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=ls(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Rye(t){return["table","td","th"].includes(rh(t))}function U_(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function XA(t){const e=qA(),n=li(t)?ls(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Aye(t){let e=kl(t);for(;io(e)&&!Pd(e);){if(XA(e))return e;if(U_(e))return null;e=kl(e)}return null}function qA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Pd(t){return["html","body","#document"].includes(rh(t))}function ls(t){return to(t).getComputedStyle(t)}function B_(t){return li(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kl(t){if(rh(t)==="html")return t;const e=t.assignedSlot||t.parentNode||FC(t)&&t.host||Ys(t);return FC(e)?e.host:e}function f9(t){const e=kl(t);return Pd(e)?t.ownerDocument?t.ownerDocument.body:t.body:io(e)&&Tg(e)?e:f9(e)}function Hm(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=f9(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=to(i);if(o){const a=zC(s);return e.concat(s,s.visualViewport||[],Tg(i)?i:[],a&&n?Hm(a):[])}return e.concat(i,Hm(i,[],n))}function zC(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function sO(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 Pye(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&FC(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function d9(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function h9(){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 Nye(t){return t.mozInputSource===0&&t.isTrusted?!0:UC()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Iye(t){return Oye()?!1:!UC()&&t.width===0&&t.height===0||UC()&&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 Lye(){return/apple/i.test(navigator.vendor)}function UC(){const t=/android/i;return t.test(d9())||t.test(h9())}function kye(){return d9().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Oye(){return h9().includes("jsdom/")}function aO(t,e){return["mouse","pen"].includes(t)}function Dye(t){return(t==null?void 0:t.ownerDocument)||document}const Fye="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function p9(t){return io(t)&&t.matches(Fye)}function So(t){t.preventDefault(),t.stopPropagation()}function zye(t){return t?t.getAttribute("role")==="combobox"&&p9(t):!1}const Nd=Math.min,Xi=Math.max,Cx=Math.round,Xf=Math.floor,Ol=t=>({x:t,y:t});function lO(t,e,n){return Xi(t,Nd(e,n))}function j_(t,e){return typeof t=="function"?t(e):t}function Rg(t){return t.split("-")[0]}function YA(t){return t.split("-")[1]}function m9(t){return t==="x"?"y":"x"}function Uye(t){return t==="y"?"height":"width"}function Ag(t){return["top","bottom"].includes(Rg(t))?"y":"x"}function Bye(t){return m9(Ag(t))}function jye(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vye(t){return typeof t!="number"?jye(t):{top:t,right:t,bottom:t,left:t}}function Tx(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 cO(t,e,n){let{reference:r,floating:i}=t;const o=Ag(e),s=Bye(e),a=Uye(s),l=Rg(e),c=o==="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(YA(e)){case"start":m[s]-=h*(n&&c?-1:1);break;case"end":m[s]+=h*(n&&c?-1:1);break}return m}const $ye=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=cO(c,r,l),h=r,m={},v=0;for(let x=0;x{let{x:g,y:b}=y;return{x:g,y:b}}},...l}=j_(t,e),c={x:n,y:r},u=await g9(e,l),f=Ag(Rg(i)),h=m9(f);let m=c[h],v=c[f];if(o){const y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",b=m+u[y],_=m-u[g];m=lO(b,m,_)}if(s){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=v+u[y],_=v-u[g];v=lO(b,v,_)}const x=a.fn({...e,[h]:m,[f]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:o,[f]:s}}}}}},Xye=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...c}=j_(t,e),u=await g9(e,c),f=Rg(i),h=YA(i),m=Ag(i)==="y",{width:v,height:x}=o.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,y=h==="end"?"top":"bottom");const b=x-u.top-u.bottom,_=v-u.left-u.right,S=Nd(x-u[y],b),P=Nd(v-u[g],_),N=!e.middlewareData.shift;let T=S,L=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(L=_),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(T=b),N&&!h){const M=Xi(u.left,0),R=Xi(u.right,0),D=Xi(u.top,0),O=Xi(u.bottom,0);m?L=v-2*(M!==0||R!==0?M+R:Xi(u.left,u.right)):T=x-2*(D!==0||O!==0?D+O:Xi(u.top,u.bottom))}await l({...e,availableWidth:L,availableHeight:T});const U=await s.getDimensions(a.floating);return v!==U.width||x!==U.height?{reset:{rects:!0}}:{}}}};function v9(t){const e=ls(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=io(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Cx(n)!==o||Cx(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function KA(t){return li(t)?t:t.contextElement}function ld(t){const e=KA(t);if(!io(e))return Ol(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=v9(e);let s=(o?Cx(n.width):n.width)/r,a=(o?Cx(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const qye=Ol(0);function y9(t){const e=to(t);return!qA()||!e.visualViewport?qye:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Yye(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==to(t)?!1:e}function du(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=KA(t);let s=Ol(1);e&&(r?li(r)&&(s=ld(r)):s=ld(t));const a=Yye(o,n,r)?y9(o):Ol(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=to(o),m=r&&li(r)?to(r):r;let v=h,x=zC(v);for(;x&&r&&m!==v;){const y=ld(x),g=x.getBoundingClientRect(),b=ls(x),_=g.left+(x.clientLeft+parseFloat(b.paddingLeft))*y.x,S=g.top+(x.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=_,c+=S,v=to(x),x=zC(v)}}return Tx({width:u,height:f,x:l,y:c})}function Kye(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Ys(r),a=e?U_(e.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Ol(1);const u=Ol(0),f=io(r);if((f||!f&&!o)&&((rh(r)!=="body"||Tg(s))&&(l=B_(r)),io(r))){const h=du(r);c=ld(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function Zye(t){return Array.from(t.getClientRects())}function BC(t,e){const n=B_(t).scrollLeft;return e?e.left+n:du(Ys(t)).left+n}function Jye(t){const e=Ys(t),n=B_(t),r=t.ownerDocument.body,i=Xi(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Xi(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+BC(t);const a=-n.scrollTop;return ls(r).direction==="rtl"&&(s+=Xi(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function Qye(t,e){const n=to(t),r=Ys(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const c=qA();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function e1e(t,e){const n=du(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=io(t)?ld(t):Ol(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function uO(t,e,n){let r;if(e==="viewport")r=Qye(t,n);else if(e==="document")r=Jye(Ys(t));else if(li(e))r=e1e(e,n);else{const i=y9(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return Tx(r)}function x9(t,e){const n=kl(t);return n===e||!li(n)||Pd(n)?!1:ls(n).position==="fixed"||x9(n,e)}function t1e(t,e){const n=e.get(t);if(n)return n;let r=Hm(t,[],!1).filter(a=>li(a)&&rh(a)!=="body"),i=null;const o=ls(t).position==="fixed";let s=o?kl(t):t;for(;li(s)&&!Pd(s);){const a=ls(s),l=XA(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Tg(s)&&!l&&x9(t,s))?r=r.filter(u=>u!==s):i=a,s=kl(s)}return e.set(t,r),r}function n1e(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?U_(e)?[]:t1e(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=uO(e,u,i);return c.top=Xi(f.top,c.top),c.right=Nd(f.right,c.right),c.bottom=Nd(f.bottom,c.bottom),c.left=Xi(f.left,c.left),c},uO(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function r1e(t){const{width:e,height:n}=v9(t);return{width:e,height:n}}function i1e(t,e,n){const r=io(e),i=Ys(e),o=n==="fixed",s=du(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Ol(0);if(r||!r&&!o)if((rh(e)!=="body"||Tg(i))&&(a=B_(e)),r){const m=du(e,!0,o,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&(l.x=BC(i));let c=0,u=0;if(i&&!r&&!o){const m=i.getBoundingClientRect();u=m.top+a.scrollTop,c=m.left+a.scrollLeft-BC(i,m)}const f=s.left+a.scrollLeft-l.x-c,h=s.top+a.scrollTop-l.y-u;return{x:f,y:h,width:s.width,height:s.height}}function yE(t){return ls(t).position==="static"}function fO(t,e){if(!io(t)||ls(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ys(t)===n&&(n=n.ownerDocument.body),n}function b9(t,e){const n=to(t);if(U_(t))return n;if(!io(t)){let i=kl(t);for(;i&&!Pd(i);){if(li(i)&&!yE(i))return i;i=kl(i)}return n}let r=fO(t,e);for(;r&&Rye(r)&&yE(r);)r=fO(r,e);return r&&Pd(r)&&yE(r)&&!XA(r)?n:r||Aye(t)||n}const o1e=async function(t){const e=this.getOffsetParent||b9,n=this.getDimensions,r=await n(t.floating);return{reference:i1e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function s1e(t){return ls(t).direction==="rtl"}const a1e={convertOffsetParentRelativeRectToViewportRelativeRect:Kye,getDocumentElement:Ys,getClippingRect:n1e,getOffsetParent:b9,getElementRects:o1e,getClientRects:Zye,getDimensions:r1e,getScale:ld,isElement:li,isRTL:s1e};function l1e(t,e){let n=null,r;const i=Ys(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const m=Xf(u),v=Xf(i.clientWidth-(c+f)),x=Xf(i.clientHeight-(u+h)),y=Xf(c),b={rootMargin:-m+"px "+-v+"px "+-x+"px "+-y+"px",threshold:Xi(0,Nd(1,l))||1};let _=!0;function S(P){const N=P[0].intersectionRatio;if(N!==l){if(!_)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return s(!0),o}function ZA(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=KA(t),u=i||o?[...c?Hm(c):[],...Hm(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=c&&a?l1e(c,n):null;let h=-1,m=null;s&&(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 v,x=l?du(t):null;l&&y();function y(){const g=du(t);x&&(g.x!==x.x||g.y!==x.y||g.width!==x.width||g.height!==x.height)&&n(),x=g,v=requestAnimationFrame(y)}return n(),()=>{var g;u.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const c1e=Hye,u1e=Gye,f1e=Xye,d1e=(t,e,n)=>{const r=new Map,i={platform:a1e,...n},o={...i.platform,_c:r};return $ye(t,e,{...i,platform:o})};var By=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Rx(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(!Rx(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 o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Rx(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function _9(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function dO(t,e){const n=_9(t);return Math.round(e*n)/n}function xE(t){const e=A.useRef(t);return By(()=>{e.current=t}),e}function h1e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=A.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=A.useState(r);Rx(h,r)||m(r);const[v,x]=A.useState(null),[y,g]=A.useState(null),b=A.useCallback(F=>{F!==N.current&&(N.current=F,x(F))},[]),_=A.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),S=o||v,P=s||y,N=A.useRef(null),T=A.useRef(null),L=A.useRef(u),U=l!=null,M=xE(l),R=xE(i),D=xE(c),O=A.useCallback(()=>{if(!N.current||!T.current)return;const F={placement:e,strategy:n,middleware:h};R.current&&(F.platform=R.current),d1e(N.current,T.current,F).then(Y=>{const K={...Y,isPositioned:D.current!==!1};B.current&&!Rx(L.current,K)&&(L.current=K,Bl.flushSync(()=>{f(K)}))})},[h,e,n,R,D]);By(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[c]);const B=A.useRef(!1);By(()=>(B.current=!0,()=>{B.current=!1}),[]),By(()=>{if(S&&(N.current=S),P&&(T.current=P),S&&P){if(M.current)return M.current(S,P,O);O()}},[S,P,O,M,U]);const X=A.useMemo(()=>({reference:N,floating:T,setReference:b,setFloating:_}),[b,_]),H=A.useMemo(()=>({reference:S,floating:P}),[S,P]),Z=A.useMemo(()=>{const F={position:n,left:0,top:0};if(!H.floating)return F;const Y=dO(H.floating,u.x),K=dO(H.floating,u.y);return a?{...F,transform:"translate("+Y+"px, "+K+"px)",..._9(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:K}},[n,a,H.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:O,refs:X,elements:H,floatingStyles:Z}),[u,O,X,H,Z])}const JA=(t,e)=>({...c1e(t),options:[t,e]}),QA=(t,e)=>({...u1e(t),options:[t,e]}),p1e=(t,e)=>({...f1e(t),options:[t,e]}),w9={...Hp},m1e=w9.useInsertionEffect,g1e=m1e||(t=>t());function jC(t){const e=A.useRef(()=>{});return g1e(()=>{e.current=t}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=t.current.length}function bE(t,e){return Gr(t,{disabledIndices:e})}function hO(t,e){return Gr(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function Gr(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=e===void 0?{}:e;const s=t.current,a=i?c=>i.includes(c):c=>{const u=s[c];return u==null||u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-o:o;while(l>=0&&l<=s.length-1&&a(l));return l}function v1e(t,e){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===eP){if(u&&So(n),c===-1)f=l;else if(f=Gr(t,{startingIndex:f,amount:o,decrement:!0,disabledIndices:s}),i&&(c-oh?v:v-o}Vp(t,f)&&(f=c)}if(n.key===Pg&&(u&&So(n),c===-1?f=a:(f=Gr(t,{startingIndex:c,amount:o,disabledIndices:s}),i&&c+o>l&&(f=Gr(t,{startingIndex:c%o-o,amount:o,disabledIndices:s}))),Vp(t,f)&&(f=c)),r==="both"){const h=Xf(c/o);n.key===ih&&(u&&So(n),c%o!==o-1?(f=Gr(t,{startingIndex:c,disabledIndices:s}),i&&ay(f,o,h)&&(f=Gr(t,{startingIndex:c-c%o-1,disabledIndices:s}))):i&&(f=Gr(t,{startingIndex:c-c%o-1,disabledIndices:s})),ay(f,o,h)&&(f=c)),n.key===Id&&(u&&So(n),c%o!==0?(f=Gr(t,{startingIndex:c,disabledIndices:s,decrement:!0}),i&&ay(f,o,h)&&(f=Gr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s}))):i&&(f=Gr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s})),ay(f,o,h)&&(f=c));const m=Xf(l/o)===h;Vp(t,f)&&(i&&m?f=n.key===Id?l:Gr(t,{startingIndex:c-c%o-1,disabledIndices:s}):f=c)}return f}function y1e(t,e,n){const r=[];let i=0;return t.forEach((o,s)=>{let{width:a,height:l}=o,c=!1;for(n&&(i=0);!c;){const u=[];for(let f=0;fr[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):i++}}),[...r]}function x1e(t,e,n,r,i){if(t===-1)return-1;const o=n.indexOf(t);switch(i){case"tl":return o;case"tr":return o+e[t].width-1;case"bl":return o+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function b1e(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let pO=0;function mO(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=e;r&&cancelAnimationFrame(pO);const o=()=>t==null?void 0:t.focus({preventScroll:n});i?o():pO=requestAnimationFrame(o)}var bi=typeof document<"u"?A.useLayoutEffect:A.useEffect;function _1e(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 w1e(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 S9=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function S1e(t){const{children:e,elementsRef:n,labelsRef:r}=t,[i,o]=A.useState(()=>new Map),s=A.useCallback(l=>{o(c=>new Map(c).set(l,null))},[]),a=A.useCallback(l=>{o(c=>{const u=new Map(c);return u.delete(l),u})},[]);return bi(()=>{const l=new Map(i);Array.from(l.keys()).sort(_1e).forEach((u,f)=>{l.set(u,f)}),w1e(i,l)||o(l)},[i]),A.createElement(S9.Provider,{value:A.useMemo(()=>({register:s,unregister:a,map:i,elementsRef:n,labelsRef:r}),[s,a,i,n,r])},e)}function M1e(t){t===void 0&&(t={});const{label:e}=t,{register:n,unregister:r,map:i,elementsRef:o,labelsRef:s}=A.useContext(S9),[a,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(f=>{if(c.current=f,a!==null&&(o.current[a]=f,s)){var h;const m=e!==void 0;s.current[a]=m?e:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,o,s,e]);return bi(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),bi(()=>{const f=c.current?i.get(c.current):null;f!=null&&l(f)},[i]),A.useMemo(()=>({ref:u,index:a??-1}),[a,u])}let gO=!1,E1e=0;const vO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+E1e++;function C1e(){const[t,e]=A.useState(()=>gO?vO():void 0);return bi(()=>{t==null&&e(vO())},[]),A.useEffect(()=>{gO=!0},[]),t}const T1e=w9.useId,R1e=T1e||C1e;function A1e(){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 P1e=A.createContext(null),N1e=A.createContext(null),M9=()=>{var t;return((t=A.useContext(P1e))==null?void 0:t.id)||null},E9=()=>A.useContext(N1e);function ly(t){const e=A.useRef(t);return bi(()=>{e.current=t}),e}function I1e(t,e){let n=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=t.filter(i=>{var o;return(o=r)==null?void 0:o.some(s=>{var a;return i.parentId===s.id&&((a=i.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function L1e(t,e){let n,r=-1;function i(o,s){s>r&&(n=o,r=s),I1e(t,o).forEach(l=>{i(l.id,s+1)})}return i(e,0),t.find(o=>o.id===n)}function yO(t){return io(t.target)&&t.target.tagName==="BUTTON"}function xO(t){return p9(t)}function tP(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=A.useRef(),h=A.useRef(!1);return A.useMemo(()=>s?{reference:{onPointerDown(m){f.current=m.pointerType},onMouseDown(m){m.button===0&&(aO(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}aO(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||yO(m))&&(m.key===" "&&!xO(o)&&(m.preventDefault(),h.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||yO(m)||xO(o)||m.key===" "&&h.current&&(h.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}}:{},[s,i,a,c,u,o,l,n,r])}function k1e(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=R1e(),o=A.useRef({}),[s]=A.useState(()=>A1e()),a=M9()!=null,[l,c]=A.useState(r.reference),u=jC((m,v,x)=>{o.current.openEvent=m?v:void 0,s.emit("openchange",{open:m,event:v,reason:x,nested:a}),n==null||n(m,v,x)}),f=A.useMemo(()=>({setPositionReference:c}),[]),h=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:o,open:e,onOpenChange:u,elements:h,events:s,floatingId:i,refs:f}),[e,u,h,s,i,f])}function nP(t){t===void 0&&(t={});const{nodeId:e}=t,n=k1e({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[o,s]=A.useState(null),[a,l]=A.useState(null),u=(i==null?void 0:i.reference)||o,f=A.useRef(null),h=E9();bi(()=>{u&&(f.current=u)},[u]);const m=h1e({...t,elements:{...i,...a&&{reference:a}}}),v=A.useCallback(_=>{const S=li(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(S),m.refs.setReference(S)},[m.refs]),x=A.useCallback(_=>{(li(_)||_===null)&&(f.current=_,s(_)),(li(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!li(_))&&m.refs.setReference(_)},[m.refs]),y=A.useMemo(()=>({...m.refs,setReference:x,setPositionReference:v,domReference:f}),[m.refs,x,v]),g=A.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),b=A.useMemo(()=>({...m,...r,refs:y,elements:g,nodeId:e}),[m,y,g,e,r]);return bi(()=>{r.dataRef.current.floatingContext=b;const _=h==null?void 0:h.nodesRef.current.find(S=>S.id===e);_&&(_.context=b)}),A.useMemo(()=>({...m,context:b,refs:y,elements:g}),[m,y,g,b])}const bO="active",_O="selected";function _E(t,e,n){const r=new Map,i=n==="item";let o=t;if(i&&t){const{[bO]:s,[_O]:a,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1},...o,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[bO,_O].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),s[c]=function(){for(var h,m=arguments.length,v=new Array(m),x=0;xy(...v)).find(y=>y!==void 0)}}}else s[c]=u}),s),{})}}function rP(t){t===void 0&&(t=[]);const e=t,n=A.useCallback(o=>_E(o,t,"reference"),e),r=A.useCallback(o=>_E(o,t,"floating"),e),i=A.useCallback(o=>_E(o,t,"item"),t.map(o=>o==null?void 0:o.item));return A.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let wO=!1;function V_(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function SO(t,e){return V_(e,t===eP||t===Pg,t===Id||t===ih)}function wE(t,e,n){return V_(e,t===Pg,n?t===Id:t===ih)||t==="Enter"||t===" "||t===""}function O1e(t,e,n){return V_(e,n?t===Id:t===ih,t===Pg)}function MO(t,e,n){return V_(e,n?t===ih:t===Id,t===eP)}function D1e(t,e){const{open:n,onOpenChange:r,elements:{domReference:i,floating:o}}=t,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:v=!1,virtual:x=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:_=void 0,orientation:S="vertical",cols:P=1,scrollItemIntoView:N=!0,virtualItemRef:T,itemSizes:L,dense:U=!1}=e,M=M9(),R=E9(),D=jC(l),O=A.useRef(y),B=A.useRef(u??-1),X=A.useRef(null),H=A.useRef(!0),Z=A.useRef(D),F=A.useRef(!!o),Y=A.useRef(!1),K=A.useRef(!1),ee=ly(_),me=ly(n),le=ly(N),Q=ly(o),[ae,ge]=A.useState(),[Me,tt]=A.useState(),He=jC(function(se,j,ye){ye===void 0&&(ye=!1);const xe=se.current[j.current];xe&&(x?(ge(xe.id),R==null||R.events.emit("virtualfocus",xe),T&&(T.current=xe)):mO(xe,{preventScroll:!0,sync:kye()&&Lye()?wO||Y.current:!1}),requestAnimationFrame(()=>{const Re=le.current;Re&&xe&&(ye||!H.current)&&(xe.scrollIntoView==null||xe.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))}))});bi(()=>{document.createElement("div").focus({get preventScroll(){return wO=!0,!1}})},[]),bi(()=>{c&&(n&&o?O.current&&u!=null&&(K.current=!0,B.current=u,D(u)):F.current&&(B.current=-1,Z.current(null)))},[c,n,o,u,D]),bi(()=>{if(c&&n&&o)if(a==null){if(Y.current=!1,u!=null)return;if(F.current&&(B.current=-1,He(s,B)),!F.current&&O.current&&(X.current!=null||O.current===!0&&X.current==null)){let se=0;const j=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(j),se++):(B.current=X.current==null||wE(X.current,S,v)||m?bE(s,ee.current):hO(s,ee.current),X.current=null,D(B.current))};j()}}else Vp(s,a)||(B.current=a,He(s,B,K.current),K.current=!1)},[c,n,o,a,u,m,s,S,v,D,He,ee]),bi(()=>{var se;if(!c||o||!R||x||!F.current)return;const j=R.nodesRef.current,ye=(se=j.find(Pe=>Pe.id===M))==null||(se=se.context)==null?void 0:se.elements.floating,xe=sO(Dye(o)),Re=j.some(Pe=>Pe.context&&Pye(Pe.context.elements.floating,xe));ye&&!Re&&H.current&&ye.focus({preventScroll:!0})},[c,o,R,M,x]),bi(()=>{if(!c||!R||!x||M)return;function se(j){tt(j.id),T&&(T.current=j)}return R.events.on("virtualfocus",se),()=>{R.events.off("virtualfocus",se)}},[c,R,x,M,T]),bi(()=>{Z.current=D,F.current=!!o}),bi(()=>{n||(X.current=null)},[n]);const rt=a!=null,Ve=A.useMemo(()=>{function se(ye){if(!n)return;const xe=s.current.indexOf(ye);xe!==-1&&D(xe)}return{onFocus(ye){let{currentTarget:xe}=ye;se(xe)},onClick:ye=>{let{currentTarget:xe}=ye;return xe.focus({preventScroll:!0})},...g&&{onMouseMove(ye){let{currentTarget:xe}=ye;se(xe)},onPointerLeave(ye){let{pointerType:xe}=ye;!H.current||xe==="touch"||(B.current=-1,He(s,B),D(null),x||mO(Q.current,{preventScroll:!0}))}}}},[n,Q,He,g,s,D,x]);return A.useMemo(()=>{if(!c)return{};const se=ee.current;function j(Ee){if(H.current=!1,Y.current=!0,!me.current&&Ee.currentTarget===Q.current)return;if(m&&MO(Ee.key,S,v)){So(Ee),r(!1,Ee.nativeEvent,"list-navigation"),io(i)&&!x&&i.focus();return}const De=B.current,$=bE(s,se),z=hO(s,se);if(Ee.key==="Home"&&(So(Ee),B.current=$,D(B.current)),Ee.key==="End"&&(So(Ee),B.current=z,D(B.current)),P>1){const re=L||Array.from({length:s.current.length},()=>({width:1,height:1})),he=y1e(re,P,U),pe=he.findIndex(Ge=>Ge!=null&&!(se!=null&&se.includes(Ge))),be=he.reduce((Ge,Fe,Ne)=>Fe!=null&&!(se!=null&&se.includes(Fe))?Ne:Ge,-1);if(B.current=he[v1e({current:he.map(Ge=>Ge!=null?s.current[Ge]:null)},{event:Ee,orientation:S,loop:h,cols:P,disabledIndices:b1e([...se||[],void 0],he),minIndex:pe,maxIndex:be,prevIndex:x1e(B.current,re,he,P,Ee.key===Pg?"bl":Ee.key===ih?"tr":"tl"),stopEvent:!0})],D(B.current),S==="both")return}if(SO(Ee.key,S)){if(So(Ee),n&&!x&&sO(Ee.currentTarget.ownerDocument)===Ee.currentTarget){B.current=wE(Ee.key,S,v)?$:z,D(B.current);return}wE(Ee.key,S,v)?h?B.current=De>=z?f&&De!==s.current.length?-1:$:Gr(s,{startingIndex:De,disabledIndices:se}):B.current=Math.min(z,Gr(s,{startingIndex:De,disabledIndices:se})):h?B.current=De<=$?f&&De!==-1?s.current.length:z:Gr(s,{startingIndex:De,decrement:!0,disabledIndices:se}):B.current=Math.max($,Gr(s,{startingIndex:De,decrement:!0,disabledIndices:se})),Vp(s,B.current)?D(null):D(B.current)}}function ye(Ee){y==="auto"&&Nye(Ee.nativeEvent)&&(O.current=!0)}function xe(Ee){O.current=y,y==="auto"&&Iye(Ee.nativeEvent)&&(O.current=!0)}const Re=x&&n&&rt&&{"aria-activedescendant":Me||ae},Pe=s.current.find(Ee=>(Ee==null?void 0:Ee.id)===ae);return{reference:{...Re,onKeyDown(Ee){H.current=!1;const De=Ee.key.indexOf("Arrow")===0,$=O1e(Ee.key,S,v),z=MO(Ee.key,S,v),re=SO(Ee.key,S),he=(m?$:re)||Ee.key==="Enter"||Ee.key.trim()==="";if(x&&n){const Fe=R==null?void 0:R.nodesRef.current.find(ze=>ze.parentId==null),Ne=R&&Fe?L1e(R.nodesRef.current,Fe.id):null;if(De&&Ne&&T){const ze=new KeyboardEvent("keydown",{key:Ee.key,bubbles:!0});if($||z){var pe,be;const Le=((pe=Ne.context)==null?void 0:pe.elements.domReference)===Ee.currentTarget,Xe=z&&!Le?(be=Ne.context)==null?void 0:be.elements.domReference:$?Pe:null;Xe&&(So(Ee),Xe.dispatchEvent(ze),tt(void 0))}if(re&&Ne.context&&Ne.context.open&&Ne.parentId&&Ee.currentTarget!==Ne.context.elements.domReference){var Ge;So(Ee),(Ge=Ne.context.elements.domReference)==null||Ge.dispatchEvent(ze);return}}return j(Ee)}if(!(!n&&!b&&De)){if(he&&(X.current=m&&re?null:Ee.key),m){$&&(So(Ee),n?(B.current=bE(s,se),D(B.current)):r(!0,Ee.nativeEvent,"list-navigation"));return}re&&(u!=null&&(B.current=u),So(Ee),!n&&b?r(!0,Ee.nativeEvent,"list-navigation"):j(Ee),n&&D(B.current))}},onFocus(){n&&D(null)},onPointerDown:xe,onMouseDown:ye,onClick:ye},floating:{"aria-orientation":S==="both"?void 0:S,...!zye(i)&&Re,onKeyDown:j,onPointerMove(){H.current=!0}},item:Ve}},[i,Q,ae,Me,ee,me,s,c,S,v,x,n,rt,m,u,b,f,P,h,y,D,r,Ve,R,T,L,U])}var C9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},EO=Mt.createContext&&Mt.createContext(C9),F1e=["attr","size","title"];function z1e(t,e){if(t==null)return{};var n=U1e(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function U1e(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 Ax(){return Ax=Object.assign?Object.assign.bind():function(t){for(var e=1;eMt.createElement(e.tag,Px({key:n},e.attr),T9(e.child)))}function ds(t){return e=>Mt.createElement($1e,Ax({attr:Px({},t.attr)},e),T9(t.child))}function $1e(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=z1e(t,F1e),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Mt.createElement("svg",Ax({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Px(Px({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&Mt.createElement("title",null,o),t.children)};return EO!==void 0?Mt.createElement(EO.Consumer,null,n=>e(n)):e(C9)}function W1e(t){return ds({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 H1e(t){return ds({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 G1e(t){return ds({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 X1e(t){return ds({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 q1e(t){return ds({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 Y1e(t){return ds({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 K1e(t){return ds({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 Z1e(t){return ds({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 J1e(t){return ds({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 Q1e(t){return ds({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 R9(t){return ds({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 A9=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!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,o=this.__entries__;i0},t.prototype.connect_=function(){!VC||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),oxe?(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(){!VC||!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=ixe.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),P9=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof Ld(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new pxe(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 Ld(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 mxe(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}(),I9=typeof WeakMap<"u"?new WeakMap:new A9,L9=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=sxe.getInstance(),r=new gxe(e,n,this);I9.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){L9.prototype[t]=function(){var e;return(e=I9.get(this))[t].apply(e,arguments)}});var vxe=function(){return typeof Nx.ResizeObserver<"u"?Nx.ResizeObserver:L9}(),yxe=["client","offset","scroll","bounds","margin"];function RO(t){var e=[];return yxe.forEach(function(n){t[n]&&e.push(n)}),e}function AO(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 xxe(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function bxe(t){return function(e){var n,r;return r=n=function(i){wR(o,i);function o(){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(v=>v(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(_xe?"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},wxe=t=>t?PO(t):PO;var k9={exports:{}},O9={},D9={exports:{}},F9={};/** +*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s=0)&&(n[i]=t[i]);return n}var e9={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"},WA=Mt.forwardRef(function(t,e){var n=t.className,r=t.top,i=t.left,o=t.offsetLeft,s=o===void 0?10:o,a=t.offsetTop,l=a===void 0?10:a,c=t.style,u=c===void 0?e9:c,f=t.children,h=t.unstyled,m=h===void 0?!1:h,v=t.applyPositionStyle,x=v===void 0?!1:v,y=wme(t,_me);return Mt.createElement("div",Ex({ref:e,className:as("visx-tooltip",n),style:Ex({top:r==null||l==null?r:r+l,left:i==null||s==null?i:i+s},x&&{position:"absolute"},!m&&u)},y),f)});WA.propTypes={children:qt.node,className:qt.string,left:qt.number,offsetLeft:qt.number,offsetTop:qt.number,top:qt.number,applyPositionStyle:qt.bool,unstyled:qt.bool};WA.displayName="Tooltip";function RC(){return RC=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.children;t.getRects;var n=t.left,r=n===void 0?0:n,i=t.offsetLeft,o=i===void 0?10:i,s=t.offsetTop,a=s===void 0?10:s,l=t.parentRect,c=t.rect,u=t.style,f=u===void 0?e9:u,h=t.top,m=h===void 0?0:h,v=t.unstyled,x=v===void 0?!1:v,y=t.nodeRef,g=Rme(t,Tme),b,_=!1,S=!1;if(c&&l){var P=r,N=m;if(l.width){var T=P+o+c.width-l.width,L=c.width-P-o;_=T>0&&T>L}else{var U=P+o+c.width-window.innerWidth,M=c.width-P-o;_=U>0&&U>M}if(l.height){var R=N+a+c.height-l.height,D=c.height-N-a;S=R>0&&R>D}else S=N+a+c.height>window.innerHeight;P=_?P-c.width-o:P+o,N=S?N-c.height-a:N+a,P=Math.round(P),N=Math.round(N),b="translate("+P+"px, "+N+"px)"}return Mt.createElement(WA,Cx({ref:y,style:Cx({left:0,top:0,transform:b},!x&&f)},g),Mt.createElement(Cme,{value:{isFlippedVertically:!S,isFlippedHorizontally:!_}},e))}n9.propTypes={nodeRef:qt.oneOfType([qt.string,qt.func,qt.object])};const Ame=Eme(n9);var Pme=["top","left","transform","className","children","innerRef"];function PC(){return PC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Tg(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.transform,s=t.className,a=t.children,l=t.innerRef,c=Nme(t,Pme);return Mt.createElement("g",PC({ref:l,className:as("visx-group",s),transform:o||"translate("+i+", "+n+")"},c),a)}Tg.propTypes={top:qt.number,left:qt.number,transform:qt.string,className:qt.string,children:qt.node,innerRef:qt.oneOfType([qt.string,qt.func,qt.object])};var Ime=["from","to","fill","className","innerRef"];function NC(){return NC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Tx(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,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=Lme(t,Ime),u=n.x===i.x||n.y===i.y;return Mt.createElement("line",NC({ref:l,className:as("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}var kme=r9;function r9(t,e,n){t instanceof RegExp&&(t=eO(t,n)),e instanceof RegExp&&(e=eO(e,n));var r=i9(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 eO(t,e){var n=e.match(t);return n?n[0]:null}r9.range=i9;function i9(t,e,n){var r,i,o,s,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){for(r=[],o=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=[o,s])}return a}var Ome=o9;function o9(t,e,n){t instanceof RegExp&&(t=tO(t,n)),e instanceof RegExp&&(e=tO(e,n));var r=s9(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 tO(t,e){var n=e.match(t);return n?n[0]:null}o9.range=s9;function s9(t,e,n){var r,i,o,s,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=[],o=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=[o,s])}return a}var Dme=Ome,Fme=a9;function a9(t,e,n){var r=t;return zme(t,e).reduce(function(i,o){return i.replace(o.functionIdentifier+"("+o.matches.body+")",Ume(o.matches.body,o.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 o=i[1],s=i.index,a=Dme("(",")",t.substring(s));if(!a||a.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:a,functionIdentifier:o}),t=a.post}while(r.test(t));return n}function Ume(t,e,n,r,i){return n(a9(t,i,n),e,r)}var ri=function(t){this.value=t};ri.math={isDegree:!0,acos:function(t){return ri.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return ri.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return ri.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-s;i>0;i--)if(oi[i]!==void 0)for(o=0;o0&&cr)s.push(e);else{for(;r>=i&&!c||c&&i"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===8){for(var l=[],c=0;c"u"?(r.value=r.concat(n),r.value.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===2||o[a].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:o[a].value(i.value,r.value,new Up(n))})):o[a].type===13&&(s?e.push({value:t[o[a].value],type:3}):e.push([o[a]]));if(e.length>1)throw new Up.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};Up.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 qme=Up,c9=qme;c9.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o"+e.value+""+i[o].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[o].type===2||i[o].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[o].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[o].type})):i[o].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var Yme=c9,Kme=kme,Zme=Fme,Jme=Yme,Qme=100,ege=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,pE,tge=nge;function nge(t,e){pE=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,o,s){if(pE++>Qme)throw pE=0,new Error("Call stack overflow for "+s);if(i==="")throw new Error(o+"(): '"+s+"' must contain a non-whitespace string");i=r(i,s);var a=rge(i);if(a.length>1||i.indexOf("var(")>-1)return o+"("+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=Jme.eval(c)}catch{return o+"("+i+")"}return l==="%"&&(u*=100),(o.length||l==="%")&&(u=Math.round(u*e)/e),u+=l,u}function r(i,o){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",a=i,l;l=ege.exec(a);){l[0].index>0&&(s+=a.substring(0,l[0].index));var c=Kme("(",")",a.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",o);s+=c.pre+u,a=c.post}return s+a}return Zme(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function rge(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 mE=$s(tge);var ige=typeof k0=="object"&&k0&&k0.Object===Object&&k0,oge=ige,sge=oge,age=typeof self=="object"&&self&&self.Object===Object&&self,lge=sge||age||Function("return this")(),HA=lge,cge=HA,uge=cge.Symbol,u9=uge,nO=u9,f9=Object.prototype,fge=f9.hasOwnProperty,dge=f9.toString,sp=nO?nO.toStringTag:void 0;function hge(t){var e=fge.call(t,sp),n=t[sp];try{t[sp]=void 0;var r=!0}catch{}var i=dge.call(t);return r&&(e?t[sp]=n:delete t[sp]),i}var pge=hge,mge=Object.prototype,gge=mge.toString;function vge(t){return gge.call(t)}var yge=vge,rO=u9,xge=pge,bge=yge,_ge="[object Null]",wge="[object Undefined]",iO=rO?rO.toStringTag:void 0;function Sge(t){return t==null?t===void 0?wge:_ge:iO&&iO in Object(t)?xge(t):bge(t)}var Mge=Sge;function Ege(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var d9=Ege,Cge=Mge,Tge=d9,Rge="[object AsyncFunction]",Age="[object Function]",Pge="[object GeneratorFunction]",Nge="[object Proxy]";function Ige(t){if(!Tge(t))return!1;var e=Cge(t);return e==Age||e==Pge||e==Rge||e==Nge}var Lge=Ige,kge=HA,Oge=kge["__core-js_shared__"],Dge=Oge,gE=Dge,oO=function(){var t=/[^.]+$/.exec(gE&&gE.keys&&gE.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Fge(t){return!!oO&&oO in t}var zge=Fge,Uge=Function.prototype,Bge=Uge.toString;function jge(t){if(t!=null){try{return Bge.call(t)}catch{}try{return t+""}catch{}}return""}var Vge=jge,$ge=Lge,Wge=zge,Hge=d9,Gge=Vge,Xge=/[\\^$.*+?()[\]{}|]/g,qge=/^\[object .+?Constructor\]$/,Yge=Function.prototype,Kge=Object.prototype,Zge=Yge.toString,Jge=Kge.hasOwnProperty,Qge=RegExp("^"+Zge.call(Jge).replace(Xge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function e0e(t){if(!Hge(t)||Wge(t))return!1;var e=$ge(t)?Qge:qge;return e.test(Gge(t))}var t0e=e0e;function n0e(t,e){return t==null?void 0:t[e]}var r0e=n0e,i0e=t0e,o0e=r0e;function s0e(t,e){var n=o0e(t,e);return i0e(n)?n:void 0}var h9=s0e,a0e=h9,l0e=a0e(Object,"create"),F_=l0e,sO=F_;function c0e(){this.__data__=sO?sO(null):{},this.size=0}var u0e=c0e;function f0e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var d0e=f0e,h0e=F_,p0e="__lodash_hash_undefined__",m0e=Object.prototype,g0e=m0e.hasOwnProperty;function v0e(t){var e=this.__data__;if(h0e){var n=e[t];return n===p0e?void 0:n}return g0e.call(e,t)?e[t]:void 0}var y0e=v0e,x0e=F_,b0e=Object.prototype,_0e=b0e.hasOwnProperty;function w0e(t){var e=this.__data__;return x0e?e[t]!==void 0:_0e.call(e,t)}var S0e=w0e,M0e=F_,E0e="__lodash_hash_undefined__";function C0e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=M0e&&e===void 0?E0e:e,this}var T0e=C0e,R0e=u0e,A0e=d0e,P0e=y0e,N0e=S0e,I0e=T0e;function th(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var K0e=Y0e,Z0e=z_;function J0e(t,e){var n=this.__data__,r=Z0e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Q0e=J0e,eve=O0e,tve=W0e,nve=X0e,rve=K0e,ive=Q0e;function nh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function vE(t){return typeof t=="number"}function uO(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function Vve(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,o=t.angle,s=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=jve(t,Bve),v=m.x,x=v===void 0?0:v,y=m.y,g=y===void 0?0:y,b=!uO(x)||!uO(g),_=A.useMemo(function(){var U=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:U.map(function(M){return{word:M,wordWidth:cO(M,h)||0}}),spaceWidth:cO(" ",h)||0}},[f,h]),S=_.wordsWithWidth,P=_.spaceWidth,N=A.useMemo(function(){return b?[]:s||i?S.reduce(function(U,M){var R=M.word,D=M.wordWidth,O=U[U.length-1];if(O&&(s==null||i||(O.width||0)+D+P0){var M=N[0].width||1,R=i==="shrink-only"?Math.min(s/M,1):s/M,D=R,O=x-R*x,B=g-D*g;U.push("matrix("+R+", 0, 0, "+D+", "+O+", "+B+")")}return o&&U.push("rotate("+o+", "+x+", "+g+")"),U.length>0?U.join(" "):""},[b,x,g,s,i,N,o]);return{wordsByLines:N,startDy:T,transform:L}}var $ve=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function kC(){return kC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var Hve={overflow:"visible"};function m9(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,o=t.textAnchor,s=o===void 0?"start":o,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=Wve(t,$ve),h=f.x,m=h===void 0?0:h,v=f.fontSize,x=Vve(t),y=x.wordsByLines,g=x.startDy,b=x.transform;return Mt.createElement("svg",{ref:a,x:n,y:i,fontSize:v,style:Hve},y.length>0?Mt.createElement("text",kC({ref:l,transform:b},f,{textAnchor:s}),y.map(function(_,S){return Mt.createElement("tspan",{key:S,x:m,dy:S===0?g:u},_.words.join(" "))})):null)}var Yi={top:"top",left:"left",right:"right",bottom:"bottom"};function Gve(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,o=t.tickLabelFontSize,s=t.tickLength,a=r===Yi.left||r===Yi.top?-1:1,l,c,u;if(r===Yi.top||r===Yi.bottom){var f=r===Yi.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=a*(s+e+o+f)}else l=a*((Number(i[0])+Number(i[i.length-1]))/2),c=-(s+e),u="rotate("+a*90+")";return{x:l,y:c,transform:u}}function Bp(){return Bp=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function g9(t){var e=t.children,n=e===void 0?qve:e,r=t.axisClassName,i=t.hideAxisLine,o=i===void 0?!1:i,s=t.hideTicks,a=s===void 0?!1:s,l=t.hideZero,c=l===void 0?!1:l,u=t.innerRef,f=t.left,h=f===void 0?0:f,m=t.numTicks,v=m===void 0?10:m,x=t.orientation,y=x===void 0?Yi.bottom:x,g=t.rangePadding,b=g===void 0?0:g,_=t.scale,S=t.tickFormat,P=t.tickLength,N=P===void 0?8:P,T=t.tickValues,L=t.top,U=L===void 0?0:L,M=Qve(t,Jve),R=S??Kve(_),D=y===Yi.left,O=y===Yi.top,B=O||y===Yi.bottom,X=Yve(_),H=D||O?-1:1,Z=_.range(),F=Zve(b),Y=iy({x:Number(Z[0])+.5-F.start,y:0},B),K=iy({x:Number(Z[Z.length-1])+.5+F.end,y:0},B),ee=(T??$A(_,v)).filter(function(le){return!c||le!==0&&le!=="0"}).map(function(le,Q){return{value:le,index:Q}}),me=ee.map(function(le){var Q=le.value,ae=le.index,ge=VA(X(Q));return{value:Q,index:ae,from:iy({x:ge,y:0},B),to:iy({x:ge,y:N*H},B),formattedValue:R(Q,ae,ee)}});return Mt.createElement(Tg,{className:as("visx-axis",r),innerRef:u,top:U,left:h},n(DC({},M,{axisFromPoint:Y,axisToPoint:K,hideAxisLine:o,hideTicks:a,hideZero:c,horizontal:B,numTicks:v,orientation:y,rangePadding:b,scale:_,tickFormat:R,tickLength:N,tickPosition:X,tickSign:H,ticks:me})))}var eye=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var nye={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function rye(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=tye(t,eye),l=typeof s=="function"?s:Rx({},nye,s);return Mt.createElement(g9,Rx({axisClassName:as("visx-axis-left",e),labelOffset:r,orientation:Yi.left,tickLabelProps:l,tickLength:o},a))}var iye=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Ax(){return Ax=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var sye={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function aye(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=oye(t,iye),l=typeof s=="function"?s:Ax({},sye,s);return Mt.createElement(g9,Ax({axisClassName:as("visx-axis-bottom",e),labelOffset:r,orientation:Yi.bottom,tickLabelProps:l,tickLength:o},a))}var v9=dye,lye=y9(A),cye=y9(Q8),uye=["from","to","fill","className","innerRef"];function y9(t){return t&&t.__esModule?t:{default:t}}function FC(){return FC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function dye(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,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=fye(t,uye),u=n.x===i.x||n.y===i.y;return lye.default.createElement("line",FC({ref:l,className:(0,cye.default)("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}function x9(t){return"bandwidth"in t?t.bandwidth():0}var hye=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function zC(){return zC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function b9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=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,v=t.numTicks,x=v===void 0?10:v,y=t.lineStyle,g=t.offset,b=t.tickValues,_=pye(t,hye),S=b??$A(o,x),P=(g??0)+x9(o)/2,N=S.map(function(T,L){var U,M=((U=VA(o(T)))!=null?U:0)+P;return{index:L,from:new Gm({x:0,y:M}),to:new Gm({x:s,y:M})}});return Mt.createElement(Tg,{className:as("visx-rows",h),top:n,left:i},m?m({lines:N}):N.map(function(T){var L=T.from,U=T.to,M=T.index;return Mt.createElement(v9,zC({key:"row-line-"+M,from:L,to:U,stroke:l,strokeWidth:u,strokeDasharray:f,style:y},_))}))}b9.propTypes={tickValues:qt.array,width:qt.number.isRequired};var mye=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function UC(){return UC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function _9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=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,v=m===void 0?10:m,x=t.lineStyle,y=t.offset,g=t.tickValues,b=t.children,_=gye(t,mye),S=g??$A(o,v),P=(y??0)+x9(o)/2,N=S.map(function(T,L){var U,M=((U=VA(o(T)))!=null?U:0)+P;return{index:L,from:new Gm({x:M,y:0}),to:new Gm({x:M,y:s})}});return Mt.createElement(Tg,{className:as("visx-columns",h),top:n,left:i},b?b({lines:N}):N.map(function(T){var L=T.from,U=T.to,M=T.index;return Mt.createElement(v9,UC({key:"column-line-"+M,from:L,to:U,stroke:l,strokeWidth:u,strokeDasharray:f,style:x},_))}))}_9.propTypes={tickValues:qt.array,height:qt.number.isRequired};function fn(t){for(var e=t.length/6|0,n=new Array(e),r=0;rYhe(t[t.length-1]);var vye=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(fn);const yye=yn(vye);var xye=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(fn);const bye=yn(xye);var _ye=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(fn);const wye=yn(_ye);var Sye=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(fn);const Mye=yn(Sye);var Eye=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(fn);const Cye=yn(Eye);var Tye=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(fn);const Rye=yn(Tye);var Aye=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(fn);const Pye=yn(Aye);var Nye=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(fn);const Iye=yn(Nye);var Lye=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(fn);const kye=yn(Lye);var Oye=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(fn);const Dye=yn(Oye);var Fye=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(fn);const zye=yn(Fye);var Uye=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(fn);const Bye=yn(Uye);var jye=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(fn);const Vye=yn(jye);var $ye=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(fn);const Wye=yn($ye);var Hye=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(fn);const Gye=yn(Hye);var Xye=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(fn);const qye=yn(Xye);var Yye=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(fn);const Kye=yn(Yye);var Zye=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(fn);const Jye=yn(Zye);var Qye=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(fn);const e1e=yn(Qye);var t1e=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(fn);const n1e=yn(t1e);var r1e=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(fn);const i1e=yn(r1e);var o1e=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(fn);const s1e=yn(o1e);var a1e=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(fn);const l1e=yn(a1e);var c1e=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(fn);const u1e=yn(c1e);var f1e=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(fn);const d1e=yn(f1e);var h1e=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(fn);const p1e=yn(h1e);var m1e=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(fn);const g1e=yn(m1e);function v1e(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 y1e=k_(js(300,.5,0),js(-240,.5,1));var x1e=k_(js(-100,.75,.35),js(80,1.5,.8)),b1e=k_(js(260,.75,.35),js(80,1.5,.8)),oy=js();function _1e(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return oy.h=360*t-100,oy.s=1.5-1.5*e,oy.l=.8-.9*e,oy+""}var sy=Il(),w1e=Math.PI/3,S1e=Math.PI*2/3;function M1e(t){var e;return t=(.5-t)*Math.PI,sy.r=255*(e=Math.sin(t))*e,sy.g=255*(e=Math.sin(t+w1e))*e,sy.b=255*(e=Math.sin(t+S1e))*e,sy+""}function E1e(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 B_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const C1e=B_(fn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var T1e=B_(fn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),R1e=B_(fn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),A1e=B_(fn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function XA(t,e=0,n=[]){return A.Children.toArray(t).reduce((r,i,o)=>(V2.isFragment(i)?r.push.apply(r,XA(i.props.children,e+1,n.concat(i.key||o))):A.isValidElement(i)?r.push(A.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&r.push(i),r),[])}function j_(){return typeof window<"u"}function ih(t){return w9(t)?(t.nodeName||"").toLowerCase():"#document"}function to(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ys(t){var e;return(e=(w9(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function w9(t){return j_()?t instanceof Node||t instanceof to(t).Node:!1}function li(t){return j_()?t instanceof Element||t instanceof to(t).Element:!1}function io(t){return j_()?t instanceof HTMLElement||t instanceof to(t).HTMLElement:!1}function BC(t){return!j_()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof to(t).ShadowRoot}function Rg(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=ls(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function P1e(t){return["table","td","th"].includes(ih(t))}function V_(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function qA(t){const e=YA(),n=li(t)?ls(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function N1e(t){let e=kl(t);for(;io(e)&&!Nd(e);){if(qA(e))return e;if(V_(e))return null;e=kl(e)}return null}function YA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Nd(t){return["html","body","#document"].includes(ih(t))}function ls(t){return to(t).getComputedStyle(t)}function $_(t){return li(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kl(t){if(ih(t)==="html")return t;const e=t.assignedSlot||t.parentNode||BC(t)&&t.host||Ys(t);return BC(e)?e.host:e}function S9(t){const e=kl(t);return Nd(e)?t.ownerDocument?t.ownerDocument.body:t.body:io(e)&&Rg(e)?e:S9(e)}function Xm(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=S9(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=to(i);if(o){const a=jC(s);return e.concat(s,s.visualViewport||[],Rg(i)?i:[],a&&n?Xm(a):[])}return e.concat(i,Xm(i,[],n))}function jC(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function dO(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 I1e(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&BC(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function M9(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function E9(){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 L1e(t){return t.mozInputSource===0&&t.isTrusted?!0:VC()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function k1e(t){return F1e()?!1:!VC()&&t.width===0&&t.height===0||VC()&&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 O1e(){return/apple/i.test(navigator.vendor)}function VC(){const t=/android/i;return t.test(M9())||t.test(E9())}function D1e(){return M9().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function F1e(){return E9().includes("jsdom/")}function hO(t,e){return["mouse","pen"].includes(t)}function z1e(t){return(t==null?void 0:t.ownerDocument)||document}const U1e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function C9(t){return io(t)&&t.matches(U1e)}function So(t){t.preventDefault(),t.stopPropagation()}function B1e(t){return t?t.getAttribute("role")==="combobox"&&C9(t):!1}const Id=Math.min,Xi=Math.max,Px=Math.round,Xf=Math.floor,Ol=t=>({x:t,y:t});function pO(t,e,n){return Xi(t,Id(e,n))}function W_(t,e){return typeof t=="function"?t(e):t}function Ag(t){return t.split("-")[0]}function KA(t){return t.split("-")[1]}function T9(t){return t==="x"?"y":"x"}function j1e(t){return t==="y"?"height":"width"}function Pg(t){return["top","bottom"].includes(Ag(t))?"y":"x"}function V1e(t){return T9(Pg(t))}function $1e(t){return{top:0,right:0,bottom:0,left:0,...t}}function W1e(t){return typeof t!="number"?$1e(t):{top:t,right:t,bottom:t,left:t}}function Nx(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 mO(t,e,n){let{reference:r,floating:i}=t;const o=Pg(e),s=V1e(e),a=j1e(s),l=Ag(e),c=o==="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(KA(e)){case"start":m[s]-=h*(n&&c?-1:1);break;case"end":m[s]+=h*(n&&c?-1:1);break}return m}const H1e=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=mO(c,r,l),h=r,m={},v=0;for(let x=0;x{let{x:g,y:b}=y;return{x:g,y:b}}},...l}=W_(t,e),c={x:n,y:r},u=await R9(e,l),f=Pg(Ag(i)),h=T9(f);let m=c[h],v=c[f];if(o){const y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",b=m+u[y],_=m-u[g];m=pO(b,m,_)}if(s){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=v+u[y],_=v-u[g];v=pO(b,v,_)}const x=a.fn({...e,[h]:m,[f]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:o,[f]:s}}}}}},Y1e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...c}=W_(t,e),u=await R9(e,c),f=Ag(i),h=KA(i),m=Pg(i)==="y",{width:v,height:x}=o.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,y=h==="end"?"top":"bottom");const b=x-u.top-u.bottom,_=v-u.left-u.right,S=Id(x-u[y],b),P=Id(v-u[g],_),N=!e.middlewareData.shift;let T=S,L=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(L=_),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(T=b),N&&!h){const M=Xi(u.left,0),R=Xi(u.right,0),D=Xi(u.top,0),O=Xi(u.bottom,0);m?L=v-2*(M!==0||R!==0?M+R:Xi(u.left,u.right)):T=x-2*(D!==0||O!==0?D+O:Xi(u.top,u.bottom))}await l({...e,availableWidth:L,availableHeight:T});const U=await s.getDimensions(a.floating);return v!==U.width||x!==U.height?{reset:{rects:!0}}:{}}}};function A9(t){const e=ls(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=io(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Px(n)!==o||Px(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function ZA(t){return li(t)?t:t.contextElement}function ld(t){const e=ZA(t);if(!io(e))return Ol(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=A9(e);let s=(o?Px(n.width):n.width)/r,a=(o?Px(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const K1e=Ol(0);function P9(t){const e=to(t);return!YA()||!e.visualViewport?K1e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Z1e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==to(t)?!1:e}function du(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=ZA(t);let s=Ol(1);e&&(r?li(r)&&(s=ld(r)):s=ld(t));const a=Z1e(o,n,r)?P9(o):Ol(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=to(o),m=r&&li(r)?to(r):r;let v=h,x=jC(v);for(;x&&r&&m!==v;){const y=ld(x),g=x.getBoundingClientRect(),b=ls(x),_=g.left+(x.clientLeft+parseFloat(b.paddingLeft))*y.x,S=g.top+(x.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=_,c+=S,v=to(x),x=jC(v)}}return Nx({width:u,height:f,x:l,y:c})}function J1e(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Ys(r),a=e?V_(e.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Ol(1);const u=Ol(0),f=io(r);if((f||!f&&!o)&&((ih(r)!=="body"||Rg(s))&&(l=$_(r)),io(r))){const h=du(r);c=ld(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function Q1e(t){return Array.from(t.getClientRects())}function $C(t,e){const n=$_(t).scrollLeft;return e?e.left+n:du(Ys(t)).left+n}function exe(t){const e=Ys(t),n=$_(t),r=t.ownerDocument.body,i=Xi(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Xi(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+$C(t);const a=-n.scrollTop;return ls(r).direction==="rtl"&&(s+=Xi(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function txe(t,e){const n=to(t),r=Ys(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const c=YA();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function nxe(t,e){const n=du(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=io(t)?ld(t):Ol(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function gO(t,e,n){let r;if(e==="viewport")r=txe(t,n);else if(e==="document")r=exe(Ys(t));else if(li(e))r=nxe(e,n);else{const i=P9(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return Nx(r)}function N9(t,e){const n=kl(t);return n===e||!li(n)||Nd(n)?!1:ls(n).position==="fixed"||N9(n,e)}function rxe(t,e){const n=e.get(t);if(n)return n;let r=Xm(t,[],!1).filter(a=>li(a)&&ih(a)!=="body"),i=null;const o=ls(t).position==="fixed";let s=o?kl(t):t;for(;li(s)&&!Nd(s);){const a=ls(s),l=qA(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Rg(s)&&!l&&N9(t,s))?r=r.filter(u=>u!==s):i=a,s=kl(s)}return e.set(t,r),r}function ixe(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?V_(e)?[]:rxe(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=gO(e,u,i);return c.top=Xi(f.top,c.top),c.right=Id(f.right,c.right),c.bottom=Id(f.bottom,c.bottom),c.left=Xi(f.left,c.left),c},gO(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function oxe(t){const{width:e,height:n}=A9(t);return{width:e,height:n}}function sxe(t,e,n){const r=io(e),i=Ys(e),o=n==="fixed",s=du(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Ol(0);if(r||!r&&!o)if((ih(e)!=="body"||Rg(i))&&(a=$_(e)),r){const m=du(e,!0,o,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&(l.x=$C(i));let c=0,u=0;if(i&&!r&&!o){const m=i.getBoundingClientRect();u=m.top+a.scrollTop,c=m.left+a.scrollLeft-$C(i,m)}const f=s.left+a.scrollLeft-l.x-c,h=s.top+a.scrollTop-l.y-u;return{x:f,y:h,width:s.width,height:s.height}}function xE(t){return ls(t).position==="static"}function vO(t,e){if(!io(t)||ls(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ys(t)===n&&(n=n.ownerDocument.body),n}function I9(t,e){const n=to(t);if(V_(t))return n;if(!io(t)){let i=kl(t);for(;i&&!Nd(i);){if(li(i)&&!xE(i))return i;i=kl(i)}return n}let r=vO(t,e);for(;r&&P1e(r)&&xE(r);)r=vO(r,e);return r&&Nd(r)&&xE(r)&&!qA(r)?n:r||N1e(t)||n}const axe=async function(t){const e=this.getOffsetParent||I9,n=this.getDimensions,r=await n(t.floating);return{reference:sxe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lxe(t){return ls(t).direction==="rtl"}const cxe={convertOffsetParentRelativeRectToViewportRelativeRect:J1e,getDocumentElement:Ys,getClippingRect:ixe,getOffsetParent:I9,getElementRects:axe,getClientRects:Q1e,getDimensions:oxe,getScale:ld,isElement:li,isRTL:lxe};function uxe(t,e){let n=null,r;const i=Ys(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const m=Xf(u),v=Xf(i.clientWidth-(c+f)),x=Xf(i.clientHeight-(u+h)),y=Xf(c),b={rootMargin:-m+"px "+-v+"px "+-x+"px "+-y+"px",threshold:Xi(0,Id(1,l))||1};let _=!0;function S(P){const N=P[0].intersectionRatio;if(N!==l){if(!_)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return s(!0),o}function JA(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ZA(t),u=i||o?[...c?Xm(c):[],...Xm(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=c&&a?uxe(c,n):null;let h=-1,m=null;s&&(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 v,x=l?du(t):null;l&&y();function y(){const g=du(t);x&&(g.x!==x.x||g.y!==x.y||g.width!==x.width||g.height!==x.height)&&n(),x=g,v=requestAnimationFrame(y)}return n(),()=>{var g;u.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const fxe=X1e,dxe=q1e,hxe=Y1e,pxe=(t,e,n)=>{const r=new Map,i={platform:cxe,...n},o={...i.platform,_c:r};return H1e(t,e,{...i,platform:o})};var jy=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Ix(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(!Ix(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 o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Ix(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function L9(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yO(t,e){const n=L9(t);return Math.round(e*n)/n}function bE(t){const e=A.useRef(t);return jy(()=>{e.current=t}),e}function mxe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=A.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=A.useState(r);Ix(h,r)||m(r);const[v,x]=A.useState(null),[y,g]=A.useState(null),b=A.useCallback(F=>{F!==N.current&&(N.current=F,x(F))},[]),_=A.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),S=o||v,P=s||y,N=A.useRef(null),T=A.useRef(null),L=A.useRef(u),U=l!=null,M=bE(l),R=bE(i),D=bE(c),O=A.useCallback(()=>{if(!N.current||!T.current)return;const F={placement:e,strategy:n,middleware:h};R.current&&(F.platform=R.current),pxe(N.current,T.current,F).then(Y=>{const K={...Y,isPositioned:D.current!==!1};B.current&&!Ix(L.current,K)&&(L.current=K,Bl.flushSync(()=>{f(K)}))})},[h,e,n,R,D]);jy(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[c]);const B=A.useRef(!1);jy(()=>(B.current=!0,()=>{B.current=!1}),[]),jy(()=>{if(S&&(N.current=S),P&&(T.current=P),S&&P){if(M.current)return M.current(S,P,O);O()}},[S,P,O,M,U]);const X=A.useMemo(()=>({reference:N,floating:T,setReference:b,setFloating:_}),[b,_]),H=A.useMemo(()=>({reference:S,floating:P}),[S,P]),Z=A.useMemo(()=>{const F={position:n,left:0,top:0};if(!H.floating)return F;const Y=yO(H.floating,u.x),K=yO(H.floating,u.y);return a?{...F,transform:"translate("+Y+"px, "+K+"px)",...L9(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:K}},[n,a,H.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:O,refs:X,elements:H,floatingStyles:Z}),[u,O,X,H,Z])}const QA=(t,e)=>({...fxe(t),options:[t,e]}),eP=(t,e)=>({...dxe(t),options:[t,e]}),gxe=(t,e)=>({...hxe(t),options:[t,e]}),k9={...Hp},vxe=k9.useInsertionEffect,yxe=vxe||(t=>t());function WC(t){const e=A.useRef(()=>{});return yxe(()=>{e.current=t}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=t.current.length}function _E(t,e){return Gr(t,{disabledIndices:e})}function xO(t,e){return Gr(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function Gr(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=e===void 0?{}:e;const s=t.current,a=i?c=>i.includes(c):c=>{const u=s[c];return u==null||u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-o:o;while(l>=0&&l<=s.length-1&&a(l));return l}function xxe(t,e){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===tP){if(u&&So(n),c===-1)f=l;else if(f=Gr(t,{startingIndex:f,amount:o,decrement:!0,disabledIndices:s}),i&&(c-oh?v:v-o}Vp(t,f)&&(f=c)}if(n.key===Ng&&(u&&So(n),c===-1?f=a:(f=Gr(t,{startingIndex:c,amount:o,disabledIndices:s}),i&&c+o>l&&(f=Gr(t,{startingIndex:c%o-o,amount:o,disabledIndices:s}))),Vp(t,f)&&(f=c)),r==="both"){const h=Xf(c/o);n.key===oh&&(u&&So(n),c%o!==o-1?(f=Gr(t,{startingIndex:c,disabledIndices:s}),i&&ay(f,o,h)&&(f=Gr(t,{startingIndex:c-c%o-1,disabledIndices:s}))):i&&(f=Gr(t,{startingIndex:c-c%o-1,disabledIndices:s})),ay(f,o,h)&&(f=c)),n.key===Ld&&(u&&So(n),c%o!==0?(f=Gr(t,{startingIndex:c,disabledIndices:s,decrement:!0}),i&&ay(f,o,h)&&(f=Gr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s}))):i&&(f=Gr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s})),ay(f,o,h)&&(f=c));const m=Xf(l/o)===h;Vp(t,f)&&(i&&m?f=n.key===Ld?l:Gr(t,{startingIndex:c-c%o-1,disabledIndices:s}):f=c)}return f}function bxe(t,e,n){const r=[];let i=0;return t.forEach((o,s)=>{let{width:a,height:l}=o,c=!1;for(n&&(i=0);!c;){const u=[];for(let f=0;fr[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):i++}}),[...r]}function _xe(t,e,n,r,i){if(t===-1)return-1;const o=n.indexOf(t);switch(i){case"tl":return o;case"tr":return o+e[t].width-1;case"bl":return o+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function wxe(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let bO=0;function _O(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=e;r&&cancelAnimationFrame(bO);const o=()=>t==null?void 0:t.focus({preventScroll:n});i?o():bO=requestAnimationFrame(o)}var bi=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Sxe(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 Mxe(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 O9=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Exe(t){const{children:e,elementsRef:n,labelsRef:r}=t,[i,o]=A.useState(()=>new Map),s=A.useCallback(l=>{o(c=>new Map(c).set(l,null))},[]),a=A.useCallback(l=>{o(c=>{const u=new Map(c);return u.delete(l),u})},[]);return bi(()=>{const l=new Map(i);Array.from(l.keys()).sort(Sxe).forEach((u,f)=>{l.set(u,f)}),Mxe(i,l)||o(l)},[i]),A.createElement(O9.Provider,{value:A.useMemo(()=>({register:s,unregister:a,map:i,elementsRef:n,labelsRef:r}),[s,a,i,n,r])},e)}function Cxe(t){t===void 0&&(t={});const{label:e}=t,{register:n,unregister:r,map:i,elementsRef:o,labelsRef:s}=A.useContext(O9),[a,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(f=>{if(c.current=f,a!==null&&(o.current[a]=f,s)){var h;const m=e!==void 0;s.current[a]=m?e:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,o,s,e]);return bi(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),bi(()=>{const f=c.current?i.get(c.current):null;f!=null&&l(f)},[i]),A.useMemo(()=>({ref:u,index:a??-1}),[a,u])}let wO=!1,Txe=0;const SO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Txe++;function Rxe(){const[t,e]=A.useState(()=>wO?SO():void 0);return bi(()=>{t==null&&e(SO())},[]),A.useEffect(()=>{wO=!0},[]),t}const Axe=k9.useId,Pxe=Axe||Rxe;function Nxe(){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 Ixe=A.createContext(null),Lxe=A.createContext(null),D9=()=>{var t;return((t=A.useContext(Ixe))==null?void 0:t.id)||null},F9=()=>A.useContext(Lxe);function ly(t){const e=A.useRef(t);return bi(()=>{e.current=t}),e}function kxe(t,e){let n=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=t.filter(i=>{var o;return(o=r)==null?void 0:o.some(s=>{var a;return i.parentId===s.id&&((a=i.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function Oxe(t,e){let n,r=-1;function i(o,s){s>r&&(n=o,r=s),kxe(t,o).forEach(l=>{i(l.id,s+1)})}return i(e,0),t.find(o=>o.id===n)}function MO(t){return io(t.target)&&t.target.tagName==="BUTTON"}function EO(t){return C9(t)}function nP(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=A.useRef(),h=A.useRef(!1);return A.useMemo(()=>s?{reference:{onPointerDown(m){f.current=m.pointerType},onMouseDown(m){m.button===0&&(hO(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}hO(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||MO(m))&&(m.key===" "&&!EO(o)&&(m.preventDefault(),h.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||MO(m)||EO(o)||m.key===" "&&h.current&&(h.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}}:{},[s,i,a,c,u,o,l,n,r])}function Dxe(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=Pxe(),o=A.useRef({}),[s]=A.useState(()=>Nxe()),a=D9()!=null,[l,c]=A.useState(r.reference),u=WC((m,v,x)=>{o.current.openEvent=m?v:void 0,s.emit("openchange",{open:m,event:v,reason:x,nested:a}),n==null||n(m,v,x)}),f=A.useMemo(()=>({setPositionReference:c}),[]),h=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:o,open:e,onOpenChange:u,elements:h,events:s,floatingId:i,refs:f}),[e,u,h,s,i,f])}function rP(t){t===void 0&&(t={});const{nodeId:e}=t,n=Dxe({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[o,s]=A.useState(null),[a,l]=A.useState(null),u=(i==null?void 0:i.reference)||o,f=A.useRef(null),h=F9();bi(()=>{u&&(f.current=u)},[u]);const m=mxe({...t,elements:{...i,...a&&{reference:a}}}),v=A.useCallback(_=>{const S=li(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(S),m.refs.setReference(S)},[m.refs]),x=A.useCallback(_=>{(li(_)||_===null)&&(f.current=_,s(_)),(li(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!li(_))&&m.refs.setReference(_)},[m.refs]),y=A.useMemo(()=>({...m.refs,setReference:x,setPositionReference:v,domReference:f}),[m.refs,x,v]),g=A.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),b=A.useMemo(()=>({...m,...r,refs:y,elements:g,nodeId:e}),[m,y,g,e,r]);return bi(()=>{r.dataRef.current.floatingContext=b;const _=h==null?void 0:h.nodesRef.current.find(S=>S.id===e);_&&(_.context=b)}),A.useMemo(()=>({...m,context:b,refs:y,elements:g}),[m,y,g,b])}const CO="active",TO="selected";function wE(t,e,n){const r=new Map,i=n==="item";let o=t;if(i&&t){const{[CO]:s,[TO]:a,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1},...o,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[CO,TO].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),s[c]=function(){for(var h,m=arguments.length,v=new Array(m),x=0;xy(...v)).find(y=>y!==void 0)}}}else s[c]=u}),s),{})}}function iP(t){t===void 0&&(t=[]);const e=t,n=A.useCallback(o=>wE(o,t,"reference"),e),r=A.useCallback(o=>wE(o,t,"floating"),e),i=A.useCallback(o=>wE(o,t,"item"),t.map(o=>o==null?void 0:o.item));return A.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let RO=!1;function H_(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function AO(t,e){return H_(e,t===tP||t===Ng,t===Ld||t===oh)}function SE(t,e,n){return H_(e,t===Ng,n?t===Ld:t===oh)||t==="Enter"||t===" "||t===""}function Fxe(t,e,n){return H_(e,n?t===Ld:t===oh,t===Ng)}function PO(t,e,n){return H_(e,n?t===oh:t===Ld,t===tP)}function zxe(t,e){const{open:n,onOpenChange:r,elements:{domReference:i,floating:o}}=t,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:v=!1,virtual:x=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:_=void 0,orientation:S="vertical",cols:P=1,scrollItemIntoView:N=!0,virtualItemRef:T,itemSizes:L,dense:U=!1}=e,M=D9(),R=F9(),D=WC(l),O=A.useRef(y),B=A.useRef(u??-1),X=A.useRef(null),H=A.useRef(!0),Z=A.useRef(D),F=A.useRef(!!o),Y=A.useRef(!1),K=A.useRef(!1),ee=ly(_),me=ly(n),le=ly(N),Q=ly(o),[ae,ge]=A.useState(),[Me,tt]=A.useState(),He=WC(function(se,j,ye){ye===void 0&&(ye=!1);const xe=se.current[j.current];xe&&(x?(ge(xe.id),R==null||R.events.emit("virtualfocus",xe),T&&(T.current=xe)):_O(xe,{preventScroll:!0,sync:D1e()&&O1e()?RO||Y.current:!1}),requestAnimationFrame(()=>{const Re=le.current;Re&&xe&&(ye||!H.current)&&(xe.scrollIntoView==null||xe.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))}))});bi(()=>{document.createElement("div").focus({get preventScroll(){return RO=!0,!1}})},[]),bi(()=>{c&&(n&&o?O.current&&u!=null&&(K.current=!0,B.current=u,D(u)):F.current&&(B.current=-1,Z.current(null)))},[c,n,o,u,D]),bi(()=>{if(c&&n&&o)if(a==null){if(Y.current=!1,u!=null)return;if(F.current&&(B.current=-1,He(s,B)),!F.current&&O.current&&(X.current!=null||O.current===!0&&X.current==null)){let se=0;const j=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(j),se++):(B.current=X.current==null||SE(X.current,S,v)||m?_E(s,ee.current):xO(s,ee.current),X.current=null,D(B.current))};j()}}else Vp(s,a)||(B.current=a,He(s,B,K.current),K.current=!1)},[c,n,o,a,u,m,s,S,v,D,He,ee]),bi(()=>{var se;if(!c||o||!R||x||!F.current)return;const j=R.nodesRef.current,ye=(se=j.find(Pe=>Pe.id===M))==null||(se=se.context)==null?void 0:se.elements.floating,xe=dO(z1e(o)),Re=j.some(Pe=>Pe.context&&I1e(Pe.context.elements.floating,xe));ye&&!Re&&H.current&&ye.focus({preventScroll:!0})},[c,o,R,M,x]),bi(()=>{if(!c||!R||!x||M)return;function se(j){tt(j.id),T&&(T.current=j)}return R.events.on("virtualfocus",se),()=>{R.events.off("virtualfocus",se)}},[c,R,x,M,T]),bi(()=>{Z.current=D,F.current=!!o}),bi(()=>{n||(X.current=null)},[n]);const rt=a!=null,Ve=A.useMemo(()=>{function se(ye){if(!n)return;const xe=s.current.indexOf(ye);xe!==-1&&D(xe)}return{onFocus(ye){let{currentTarget:xe}=ye;se(xe)},onClick:ye=>{let{currentTarget:xe}=ye;return xe.focus({preventScroll:!0})},...g&&{onMouseMove(ye){let{currentTarget:xe}=ye;se(xe)},onPointerLeave(ye){let{pointerType:xe}=ye;!H.current||xe==="touch"||(B.current=-1,He(s,B),D(null),x||_O(Q.current,{preventScroll:!0}))}}}},[n,Q,He,g,s,D,x]);return A.useMemo(()=>{if(!c)return{};const se=ee.current;function j(Ee){if(H.current=!1,Y.current=!0,!me.current&&Ee.currentTarget===Q.current)return;if(m&&PO(Ee.key,S,v)){So(Ee),r(!1,Ee.nativeEvent,"list-navigation"),io(i)&&!x&&i.focus();return}const De=B.current,$=_E(s,se),z=xO(s,se);if(Ee.key==="Home"&&(So(Ee),B.current=$,D(B.current)),Ee.key==="End"&&(So(Ee),B.current=z,D(B.current)),P>1){const re=L||Array.from({length:s.current.length},()=>({width:1,height:1})),he=bxe(re,P,U),pe=he.findIndex(Ge=>Ge!=null&&!(se!=null&&se.includes(Ge))),be=he.reduce((Ge,Fe,Ne)=>Fe!=null&&!(se!=null&&se.includes(Fe))?Ne:Ge,-1);if(B.current=he[xxe({current:he.map(Ge=>Ge!=null?s.current[Ge]:null)},{event:Ee,orientation:S,loop:h,cols:P,disabledIndices:wxe([...se||[],void 0],he),minIndex:pe,maxIndex:be,prevIndex:_xe(B.current,re,he,P,Ee.key===Ng?"bl":Ee.key===oh?"tr":"tl"),stopEvent:!0})],D(B.current),S==="both")return}if(AO(Ee.key,S)){if(So(Ee),n&&!x&&dO(Ee.currentTarget.ownerDocument)===Ee.currentTarget){B.current=SE(Ee.key,S,v)?$:z,D(B.current);return}SE(Ee.key,S,v)?h?B.current=De>=z?f&&De!==s.current.length?-1:$:Gr(s,{startingIndex:De,disabledIndices:se}):B.current=Math.min(z,Gr(s,{startingIndex:De,disabledIndices:se})):h?B.current=De<=$?f&&De!==-1?s.current.length:z:Gr(s,{startingIndex:De,decrement:!0,disabledIndices:se}):B.current=Math.max($,Gr(s,{startingIndex:De,decrement:!0,disabledIndices:se})),Vp(s,B.current)?D(null):D(B.current)}}function ye(Ee){y==="auto"&&L1e(Ee.nativeEvent)&&(O.current=!0)}function xe(Ee){O.current=y,y==="auto"&&k1e(Ee.nativeEvent)&&(O.current=!0)}const Re=x&&n&&rt&&{"aria-activedescendant":Me||ae},Pe=s.current.find(Ee=>(Ee==null?void 0:Ee.id)===ae);return{reference:{...Re,onKeyDown(Ee){H.current=!1;const De=Ee.key.indexOf("Arrow")===0,$=Fxe(Ee.key,S,v),z=PO(Ee.key,S,v),re=AO(Ee.key,S),he=(m?$:re)||Ee.key==="Enter"||Ee.key.trim()==="";if(x&&n){const Fe=R==null?void 0:R.nodesRef.current.find(ze=>ze.parentId==null),Ne=R&&Fe?Oxe(R.nodesRef.current,Fe.id):null;if(De&&Ne&&T){const ze=new KeyboardEvent("keydown",{key:Ee.key,bubbles:!0});if($||z){var pe,be;const Le=((pe=Ne.context)==null?void 0:pe.elements.domReference)===Ee.currentTarget,Xe=z&&!Le?(be=Ne.context)==null?void 0:be.elements.domReference:$?Pe:null;Xe&&(So(Ee),Xe.dispatchEvent(ze),tt(void 0))}if(re&&Ne.context&&Ne.context.open&&Ne.parentId&&Ee.currentTarget!==Ne.context.elements.domReference){var Ge;So(Ee),(Ge=Ne.context.elements.domReference)==null||Ge.dispatchEvent(ze);return}}return j(Ee)}if(!(!n&&!b&&De)){if(he&&(X.current=m&&re?null:Ee.key),m){$&&(So(Ee),n?(B.current=_E(s,se),D(B.current)):r(!0,Ee.nativeEvent,"list-navigation"));return}re&&(u!=null&&(B.current=u),So(Ee),!n&&b?r(!0,Ee.nativeEvent,"list-navigation"):j(Ee),n&&D(B.current))}},onFocus(){n&&D(null)},onPointerDown:xe,onMouseDown:ye,onClick:ye},floating:{"aria-orientation":S==="both"?void 0:S,...!B1e(i)&&Re,onKeyDown:j,onPointerMove(){H.current=!0}},item:Ve}},[i,Q,ae,Me,ee,me,s,c,S,v,x,n,rt,m,u,b,f,P,h,y,D,r,Ve,R,T,L,U])}var z9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},NO=Mt.createContext&&Mt.createContext(z9),Uxe=["attr","size","title"];function Bxe(t,e){if(t==null)return{};var n=jxe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jxe(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 Lx(){return Lx=Object.assign?Object.assign.bind():function(t){for(var e=1;eMt.createElement(e.tag,kx({key:n},e.attr),U9(e.child)))}function ds(t){return e=>Mt.createElement(Hxe,Lx({attr:kx({},t.attr)},e),U9(t.child))}function Hxe(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=Bxe(t,Uxe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Mt.createElement("svg",Lx({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:kx(kx({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&Mt.createElement("title",null,o),t.children)};return NO!==void 0?Mt.createElement(NO.Consumer,null,n=>e(n)):e(z9)}function Gxe(t){return ds({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 Xxe(t){return ds({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 qxe(t){return ds({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 Yxe(t){return ds({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 Kxe(t){return ds({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 Zxe(t){return ds({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 Jxe(t){return ds({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 Qxe(t){return ds({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 ebe(t){return ds({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 tbe(t){return ds({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 B9(t){return ds({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 j9=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!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,o=this.__entries__;i0},t.prototype.connect_=function(){!HC||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),abe?(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(){!HC||!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=sbe.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),V9=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof kd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new gbe(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 kd(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 vbe(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}(),W9=typeof WeakMap<"u"?new WeakMap:new j9,H9=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=lbe.getInstance(),r=new ybe(e,n,this);W9.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){H9.prototype[t]=function(){var e;return(e=W9.get(this))[t].apply(e,arguments)}});var xbe=function(){return typeof Ox.ResizeObserver<"u"?Ox.ResizeObserver:H9}(),bbe=["client","offset","scroll","bounds","margin"];function kO(t){var e=[];return bbe.forEach(function(n){t[n]&&e.push(n)}),e}function OO(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 _be(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function wbe(t){return function(e){var n,r;return r=n=function(i){wR(o,i);function o(){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(v=>v(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(Sbe?"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},Mbe=t=>t?DO(t):DO;var G9={exports:{}},X9={},q9={exports:{}},Y9={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -4037,7 +4064,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 kd=A;function Sxe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Mxe=typeof Object.is=="function"?Object.is:Sxe,Exe=kd.useState,Cxe=kd.useEffect,Txe=kd.useLayoutEffect,Rxe=kd.useDebugValue;function Axe(t,e){var n=e(),r=Exe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Txe(function(){i.value=n,i.getSnapshot=e,SE(i)&&o({inst:i})},[t,n,e]),Cxe(function(){return SE(i)&&o({inst:i}),t(function(){SE(i)&&o({inst:i})})},[t]),Rxe(n),n}function SE(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Mxe(t,n)}catch{return!0}}function Pxe(t,e){return e()}var Nxe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Pxe:Axe;F9.useSyncExternalStore=kd.useSyncExternalStore!==void 0?kd.useSyncExternalStore:Nxe;D9.exports=F9;var Ixe=D9.exports;/** + */var Od=A;function Ebe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Cbe=typeof Object.is=="function"?Object.is:Ebe,Tbe=Od.useState,Rbe=Od.useEffect,Abe=Od.useLayoutEffect,Pbe=Od.useDebugValue;function Nbe(t,e){var n=e(),r=Tbe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Abe(function(){i.value=n,i.getSnapshot=e,ME(i)&&o({inst:i})},[t,n,e]),Rbe(function(){return ME(i)&&o({inst:i}),t(function(){ME(i)&&o({inst:i})})},[t]),Pbe(n),n}function ME(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Cbe(t,n)}catch{return!0}}function Ibe(t,e){return e()}var Lbe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ibe:Nbe;Y9.useSyncExternalStore=Od.useSyncExternalStore!==void 0?Od.useSyncExternalStore:Lbe;q9.exports=Y9;var kbe=q9.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -4045,14 +4072,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 W_=A,Lxe=Ixe;function kxe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Oxe=typeof Object.is=="function"?Object.is:kxe,Dxe=Lxe.useSyncExternalStore,Fxe=W_.useRef,zxe=W_.useEffect,Uxe=W_.useMemo,Bxe=W_.useDebugValue;O9.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Fxe(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Uxe(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),i!==void 0&&s.hasValue){var v=s.value;if(i(v,m))return f=v}return f=m}if(v=f,Oxe(u,m))return v;var x=r(m);return i!==void 0&&i(v,x)?v:(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=Dxe(t,o[0],o[1]);return zxe(function(){s.hasValue=!0,s.value=a},[a]),Bxe(a),a};k9.exports=O9;var jxe=k9.exports;const Vxe=$s(jxe),z9={BASE_URL:"/webxdiviewer/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_XDI_REPO_LOCATION:"jacobfilik/XASDataLibrary"},{useDebugValue:$xe}=Mt,{useSyncExternalStoreWithSelector:Wxe}=Vxe;let NO=!1;const Hxe=t=>t;function Gxe(t,e=Hxe,n){(z9?"production":void 0)!=="production"&&n&&!NO&&(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"),NO=!0);const r=Wxe(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return $xe(r),r}const IO=t=>{(z9?"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"?wxe(t):t,n=(r,i)=>Gxe(e,r,i);return Object.assign(n,e),n},Xxe=t=>t?IO(t):IO;var qxe=Object.defineProperty,Yxe=(t,e,n)=>e in t?qxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mp=(t,e,n)=>(Yxe(t,typeof e!="symbol"?e+"":e,n),n);const oP=A.createContext({}),Kxe=A.createContext(void 0),Zxe="_wrapper_9665499",Jxe="_grid_5146261",Qxe="_innerContainer_27a3adb",ebe="_colHeaders_a985f35",tbe="_rowHeaders_63b4056",nbe="_indexCell_080a16e",rbe="_stickyGrid_33fa7fa",ibe="_cell_2658e21",obe="_topLeftCell_e826718 _indexCell_080a16e",Mc={wrapper:Zxe,grid:Jxe,innerContainer:Qxe,colHeaders:ebe,rowHeaders:tbe,indexCell:nbe,stickyGrid:rbe,cell:ibe,topLeftCell:obe};function sbe(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:o,cellFormatter:s}=A.useContext(oP);return C.jsx("div",{className:Mc.cell,style:{...r,left:r.left+i,top:r.top+o.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:s(e,n)})}A.memo(sbe);function LO(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:o}=t,{cellSize:s}=A.useContext(oP);return F6(e,n+1).map(a=>C.jsx("div",{className:Mc.indexCell,style:{width:r||s.width,height:s.height,transform:i},"data-bg":a%2===1?"":void 0,children:a>=0&&o?o[a]:a},a.toString()))}const abe=A.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:o,cellSize:s,sticky:a,rowHeaderCellsWidth:l,columnHeaders:c}=A.useContext(oP),u=A.useContext(Kxe),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:h=0,overscanRowStartIndex:m=0,overscanRowStopIndex:v=0}=u||{};return C.jsxs("div",{ref:e,className:Mc.stickyGrid,style:{...r,width:r.width+l,height:r.height+s.height},role:"table","aria-rowcount":i,"aria-colcount":o,"data-sticky":a||void 0,children:[C.jsxs("div",{className:Mc.colHeaders,children:[C.jsx("div",{className:Mc.topLeftCell,style:{width:l,height:s.height},"data-bg":!0,"aria-hidden":"true"}),C.jsx(LO,{indexMin:f,indexMax:h,transform:`translateX(${s.width*f}px)`,headers:c})]}),C.jsxs("div",{className:Mc.innerContainer,children:[C.jsx("div",{className:Mc.rowHeaders,"aria-hidden":"true",children:C.jsx(LO,{indexMin:m,indexMax:v,transform:`translateY(${s.height*m}px)`,width:l})}),n]})]})});abe.displayName="StickyGrid";var _c=(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))(_c||{}),Ht=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Ht||{}),jy=(t=>(t.Phase="phase",t.Amplitude="amplitude",t.PhaseAmplitude="phase-amplitude",t))(jy||{});Ht.Linear,Ht.Log,Ht.SymLog;Ht.Linear,Ht.Log,Ht.SymLog,Ht.Sqrt;const kO=Gs(".3~e"),ME=Gs(".5~e");Gs(".5~g");Gs(".3~g");fbe(".12~g");const sP=3,lbe=/0\.([0-9]+)$/u,cbe=Gs(`.${sP}~g`),ube=Gs(`.${sP}~e`);function EE(t){const e=cbe(t),n=lbe.exec(e);return n&&n[1].length>sP?ube(t):e}function fbe(t,e=!1){const n=Gs(t);return r=>{const[i,o]=r;if(o===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(o)} i`;const s=Math.sign(o)>=0?" + ":" − ";return`${n(i)}${s}${n(Math.abs(o))} i`}}function $C(t){return vbe(t)?t.data:t}function CE(t,e){const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=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,o):o}}function dbe(t,e,n){const r=$C(t),i=e&&$C(e);gbe(e,r.length,"error");const o=r.reduce((s,a,l)=>{if(!Number.isFinite(a)||n!=null&&n(a))return s;const c=CE(s,a),u=i==null?void 0:i[l];return u?CE(CE(c,a-u),a+u):c},{min:1/0,max:-1/0,positiveMin:1/0,strictPositiveMin:1/0});return Number.isFinite(o.min)?o:void 0}function hbe(t,e){if(t===void 0)return;const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=t;return e===Ht.Log&&n*r<=0?Number.isFinite(o)?[o,r]:void 0:e===Ht.Sqrt&&n*r<0?[i,r]:[n,r]}function pbe(t){const[e,n]=t.shape;return{rows:e,cols:n}}function WC(t){return Array.isArray(t)?t:[t]}_c.Unsigned,_c.Integer,_c.Float,_c.String,_c.Bool,_c.Complex;function U9(t){return t!==void 0}function mbe(t){return t!==null}function Vy(t,e="Expected some value"){if(!U9(t))throw new TypeError(e)}function TE(t,e="Expected value to not be null"){if(!mbe(t))throw new TypeError(e)}function gbe(t,e,n){if(!t)return;const{length:r}=$C(t);if(r!==e)throw new Error(`Expected ${n} array to have length ${e} instead of ${r}`)}function vbe(t){return"data"in t}const ybe=new G(0,0,0);class qf extends Pr{get size(){const{x:e,y:n}=this.getSize(new G);return{width:e,height:n}}get center(){return this.getCenter(new G)}static empty(e=ybe){return new qf(e.clone(),e.clone())}static fromPoints(...e){return new qf().setFromPoints(e)}static fromSize({width:e,height:n}){return qf.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new G)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,o=n<0?Math.max(n,-r.height):n;return this.expandByVector(new G(i,o).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:o}=e.size,s=qf.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(o-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(s)}toRect(){return[this.min,this.max]}}const Dl=qf;function OO(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function B9(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,o=Ad,s;const a=function(T){const L=typeof T=="number"?T:T.valueOf();return Number.isNaN(L)?s:o(...n)(OO(...e)(l(L))**r)};function l(T){if(!i)return T;const[L,U]=e;return Math.max(L,Math.min(U,T))}function c(T){return T?(e=T,N):[...e]}function u(T){return T?(n=T,N):[...n]}function f(T){return T?(n=T,o=kA,N):[...n]}function h(T){return T?(i=T,N):i}function m(){return s}function v(T){return T?(o=T,N):o}function x(T){return T?(r=T,N):r}function y(T){return l(Ad(...e)(OO(...n)(T)**(1/r)))}function g(){return upe({domain:e,range:n,exponent:r,clamp:i})}function b(T){return e=g().nice(T).domain(),N}function _(T){return g().ticks(T)}function S(T,L){return g().tickFormat(T,L)}function P(){return B9().domain(e).range(n).exponent(r).clamp(i).interpolate(o)}const N=Object.assign(a,{domain:c,range:u,rangeRound:f,clamp:h,interpolate:v,invert:y,unknown:m,exponent:x,nice:b,ticks:_,tickFormat:S,copy:P});return N}const xbe=0,aP=1e3,j9=aP,bbe=j9-aP,wi=bbe-1,_be=[.1,1],wbe={left:80,right:24,top:16,bottom:34},Sbe=28,DO=24;Ht.Linear+"",Ht.Log+"",Number.MIN_VALUE,Ht.SymLog+"",Ht.Sqrt+"",Ht.Gamma+"";const Mbe=BA({domain:[300,900],range:[3,10],clamp:!0,round:!0}),Ebe=BA({domain:[300,500],range:[.8,1.4]});function V9(t,e){if(Array.isArray(t)){const[,n]=t;return B9({...e,exponent:n})}switch(t){case Ht.Linear:return BA(e);case Ht.Log:return lpe(e);case Ht.SymLog:return dpe(e);case Ht.Sqrt:return ppe(e)}throw new Error("Unknown scale type")}function Cbe(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 FO(t,e=Ht.Linear,n,r){const i=dbe(t,n,r);return hbe(i,e)}function Tbe(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return IU.clamp(t,n,r)}function zO(t,e){const{scaleType:n,visDomain:r,flip:i,nice:o=!1}=t;return V9(n??Ht.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:o})}function Rbe(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),o=Math.floor(r),s=o-i+1,a=Math.min(s,e);if(a===0)return[];const l=Math.max(D6(i,o,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 Abe(t,e,n){if(n!==Ht.Log)return EE;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],o=Ebe(e);return i/r<10**o?EE:s=>{const a=Math.log10(Math.abs(s.valueOf()));return a===Math.floor(a)?EE(s):""}}function UO(t){const e=t.filter(U9);if(e.length!==0)return e.reduce((n,r)=>[Math.min(n[0],r[0]),Math.max(n[1],r[1])])}function $9(t,e,n){if(t==="auto")return;if(t==="equal")return $9(1,e,n);const[r,i]=e,[o,s]=n;return Math.abs(i-r)/Math.abs(s-o)/t}function Pbe(t={}){const{left:e,right:n,top:r,bottom:i}=wbe;return{left:e+(t.left?DO:0),right:n,top:r+(t.top?Sbe:0),bottom:i+(t.bottom?DO:0)}}const Nbe=` + */var X_=A,Obe=kbe;function Dbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Fbe=typeof Object.is=="function"?Object.is:Dbe,zbe=Obe.useSyncExternalStore,Ube=X_.useRef,Bbe=X_.useEffect,jbe=X_.useMemo,Vbe=X_.useDebugValue;X9.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Ube(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=jbe(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),i!==void 0&&s.hasValue){var v=s.value;if(i(v,m))return f=v}return f=m}if(v=f,Fbe(u,m))return v;var x=r(m);return i!==void 0&&i(v,x)?v:(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=zbe(t,o[0],o[1]);return Bbe(function(){s.hasValue=!0,s.value=a},[a]),Vbe(a),a};G9.exports=X9;var $be=G9.exports;const Wbe=$s($be),K9={BASE_URL:"/webxdiviewer/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_XDI_REPO_LOCATION:"jacobfilik/XASDataLibrary"},{useDebugValue:Hbe}=Mt,{useSyncExternalStoreWithSelector:Gbe}=Wbe;let FO=!1;const Xbe=t=>t;function qbe(t,e=Xbe,n){(K9?"production":void 0)!=="production"&&n&&!FO&&(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"),FO=!0);const r=Gbe(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Hbe(r),r}const zO=t=>{(K9?"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"?Mbe(t):t,n=(r,i)=>qbe(e,r,i);return Object.assign(n,e),n},Ybe=t=>t?zO(t):zO;var Kbe=Object.defineProperty,Zbe=(t,e,n)=>e in t?Kbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gp=(t,e,n)=>(Zbe(t,typeof e!="symbol"?e+"":e,n),n);const sP=A.createContext({}),Jbe=A.createContext(void 0),Qbe="_wrapper_9665499",e_e="_grid_5146261",t_e="_innerContainer_27a3adb",n_e="_colHeaders_a985f35",r_e="_rowHeaders_63b4056",i_e="_indexCell_080a16e",o_e="_stickyGrid_33fa7fa",s_e="_cell_2658e21",a_e="_topLeftCell_e826718 _indexCell_080a16e",Mc={wrapper:Qbe,grid:e_e,innerContainer:t_e,colHeaders:n_e,rowHeaders:r_e,indexCell:i_e,stickyGrid:o_e,cell:s_e,topLeftCell:a_e};function l_e(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:o,cellFormatter:s}=A.useContext(sP);return C.jsx("div",{className:Mc.cell,style:{...r,left:r.left+i,top:r.top+o.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:s(e,n)})}A.memo(l_e);function UO(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:o}=t,{cellSize:s}=A.useContext(sP);return Y6(e,n+1).map(a=>C.jsx("div",{className:Mc.indexCell,style:{width:r||s.width,height:s.height,transform:i},"data-bg":a%2===1?"":void 0,children:a>=0&&o?o[a]:a},a.toString()))}const c_e=A.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:o,cellSize:s,sticky:a,rowHeaderCellsWidth:l,columnHeaders:c}=A.useContext(sP),u=A.useContext(Jbe),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:h=0,overscanRowStartIndex:m=0,overscanRowStopIndex:v=0}=u||{};return C.jsxs("div",{ref:e,className:Mc.stickyGrid,style:{...r,width:r.width+l,height:r.height+s.height},role:"table","aria-rowcount":i,"aria-colcount":o,"data-sticky":a||void 0,children:[C.jsxs("div",{className:Mc.colHeaders,children:[C.jsx("div",{className:Mc.topLeftCell,style:{width:l,height:s.height},"data-bg":!0,"aria-hidden":"true"}),C.jsx(UO,{indexMin:f,indexMax:h,transform:`translateX(${s.width*f}px)`,headers:c})]}),C.jsxs("div",{className:Mc.innerContainer,children:[C.jsx("div",{className:Mc.rowHeaders,"aria-hidden":"true",children:C.jsx(UO,{indexMin:m,indexMax:v,transform:`translateY(${s.height*m}px)`,width:l})}),n]})]})});c_e.displayName="StickyGrid";var _c=(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))(_c||{}),Ht=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Ht||{}),Vy=(t=>(t.Phase="phase",t.Amplitude="amplitude",t.PhaseAmplitude="phase-amplitude",t))(Vy||{});Ht.Linear,Ht.Log,Ht.SymLog;Ht.Linear,Ht.Log,Ht.SymLog,Ht.Sqrt;const BO=Gs(".3~e"),EE=Gs(".5~e");Gs(".5~g");Gs(".3~g");h_e(".12~g");const aP=3,u_e=/0\.([0-9]+)$/u,f_e=Gs(`.${aP}~g`),d_e=Gs(`.${aP}~e`);function CE(t){const e=f_e(t),n=u_e.exec(e);return n&&n[1].length>aP?d_e(t):e}function h_e(t,e=!1){const n=Gs(t);return r=>{const[i,o]=r;if(o===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(o)} i`;const s=Math.sign(o)>=0?" + ":" − ";return`${n(i)}${s}${n(Math.abs(o))} i`}}function GC(t){return x_e(t)?t.data:t}function TE(t,e){const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=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,o):o}}function p_e(t,e,n){const r=GC(t),i=e&&GC(e);y_e(e,r.length,"error");const o=r.reduce((s,a,l)=>{if(!Number.isFinite(a)||n!=null&&n(a))return s;const c=TE(s,a),u=i==null?void 0:i[l];return u?TE(TE(c,a-u),a+u):c},{min:1/0,max:-1/0,positiveMin:1/0,strictPositiveMin:1/0});return Number.isFinite(o.min)?o:void 0}function m_e(t,e){if(t===void 0)return;const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=t;return e===Ht.Log&&n*r<=0?Number.isFinite(o)?[o,r]:void 0:e===Ht.Sqrt&&n*r<0?[i,r]:[n,r]}function g_e(t){const[e,n]=t.shape;return{rows:e,cols:n}}function XC(t){return Array.isArray(t)?t:[t]}_c.Unsigned,_c.Integer,_c.Float,_c.String,_c.Bool,_c.Complex;function Z9(t){return t!==void 0}function v_e(t){return t!==null}function $y(t,e="Expected some value"){if(!Z9(t))throw new TypeError(e)}function RE(t,e="Expected value to not be null"){if(!v_e(t))throw new TypeError(e)}function y_e(t,e,n){if(!t)return;const{length:r}=GC(t);if(r!==e)throw new Error(`Expected ${n} array to have length ${e} instead of ${r}`)}function x_e(t){return"data"in t}const b_e=new G(0,0,0);class qf extends Pr{get size(){const{x:e,y:n}=this.getSize(new G);return{width:e,height:n}}get center(){return this.getCenter(new G)}static empty(e=b_e){return new qf(e.clone(),e.clone())}static fromPoints(...e){return new qf().setFromPoints(e)}static fromSize({width:e,height:n}){return qf.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new G)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,o=n<0?Math.max(n,-r.height):n;return this.expandByVector(new G(i,o).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:o}=e.size,s=qf.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(o-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(s)}toRect(){return[this.min,this.max]}}const Dl=qf;function jO(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function J9(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,o=Pd,s;const a=function(T){const L=typeof T=="number"?T:T.valueOf();return Number.isNaN(L)?s:o(...n)(jO(...e)(l(L))**r)};function l(T){if(!i)return T;const[L,U]=e;return Math.max(L,Math.min(U,T))}function c(T){return T?(e=T,N):[...e]}function u(T){return T?(n=T,N):[...n]}function f(T){return T?(n=T,o=OA,N):[...n]}function h(T){return T?(i=T,N):i}function m(){return s}function v(T){return T?(o=T,N):o}function x(T){return T?(r=T,N):r}function y(T){return l(Pd(...e)(jO(...n)(T)**(1/r)))}function g(){return dme({domain:e,range:n,exponent:r,clamp:i})}function b(T){return e=g().nice(T).domain(),N}function _(T){return g().ticks(T)}function S(T,L){return g().tickFormat(T,L)}function P(){return J9().domain(e).range(n).exponent(r).clamp(i).interpolate(o)}const N=Object.assign(a,{domain:c,range:u,rangeRound:f,clamp:h,interpolate:v,invert:y,unknown:m,exponent:x,nice:b,ticks:_,tickFormat:S,copy:P});return N}const __e=0,lP=1e3,Q9=lP,w_e=Q9-lP,wi=w_e-1,S_e=[.1,1],M_e={left:80,right:24,top:16,bottom:34},E_e=28,VO=24;Ht.Linear+"",Ht.Log+"",Number.MIN_VALUE,Ht.SymLog+"",Ht.Sqrt+"",Ht.Gamma+"";const C_e=jA({domain:[300,900],range:[3,10],clamp:!0,round:!0}),T_e=jA({domain:[300,500],range:[.8,1.4]});function e7(t,e){if(Array.isArray(t)){const[,n]=t;return J9({...e,exponent:n})}switch(t){case Ht.Linear:return jA(e);case Ht.Log:return ume(e);case Ht.SymLog:return pme(e);case Ht.Sqrt:return gme(e)}throw new Error("Unknown scale type")}function R_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 $O(t,e=Ht.Linear,n,r){const i=p_e(t,n,r);return m_e(i,e)}function A_e(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return WU.clamp(t,n,r)}function WO(t,e){const{scaleType:n,visDomain:r,flip:i,nice:o=!1}=t;return e7(n??Ht.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:o})}function P_e(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),o=Math.floor(r),s=o-i+1,a=Math.min(s,e);if(a===0)return[];const l=Math.max(q6(i,o,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 N_e(t,e,n){if(n!==Ht.Log)return CE;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],o=T_e(e);return i/r<10**o?CE:s=>{const a=Math.log10(Math.abs(s.valueOf()));return a===Math.floor(a)?CE(s):""}}function HO(t){const e=t.filter(Z9);if(e.length!==0)return e.reduce((n,r)=>[Math.min(n[0],r[0]),Math.max(n[1],r[1])])}function t7(t,e,n){if(t==="auto")return;if(t==="equal")return t7(1,e,n);const[r,i]=e,[o,s]=n;return Math.abs(i-r)/Math.abs(s-o)/t}function I_e(t={}){const{left:e,right:n,top:r,bottom:i}=M_e;return{left:e+(t.left?VO:0),right:n,top:r+(t.top?E_e:0),bottom:i+(t.bottom?VO:0)}}const L_e=` varying vec2 coords; void main() { coords = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } -`;function W9(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}function H_(t,e=3,n=Float32Array){return new hn(new n(t*e),e)}function H9(t){return Object.keys(t).some(e=>/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/u.test(e))}const G9=A.createContext({});function Fn(){return A.useContext(G9)}function Ibe(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:o,children:s}=t,{width:a,height:l}=wr(D=>D.size),c={width:a,height:l},u=a/l,f=Cbe(c,e),h=A.useMemo(()=>Dl.empty().expandByPoint(new G(a,l)),[a,l]),m=zO(n,f.width),v=zO(r,f.height),x=A.useCallback(D=>new G(m(D.x),v(D.y)),[m,v]),y=A.useCallback(D=>new G(m.invert(D.x),v.invert(D.y)),[m,v]),g=A.useMemo(()=>new wt().makeScale(a/2,-l/2,1).setPosition(a/2,l/2,0),[a,l]),b=A.useMemo(()=>g.clone().invert(),[g]),_=A.useCallback((D,O)=>O.clone().project(D).applyMatrix4(g),[g]),S=A.useCallback((D,O)=>O.clone().applyMatrix4(b).unproject(D),[b]),P=A.useCallback((D,O)=>_(D,x(O)),[x,_]),N=A.useCallback((D,O)=>y(S(D,O)),[S,y]),T=A.useCallback((D,O=D.position)=>{const{scale:B}=D;return Dl.empty(O).expandBySize(a*B.x,l*B.y)},[a,l]),L=A.useCallback(D=>{const[O,B]=T(D).toRect().map(y);return{xVisibleDomain:[O.x,B.x],yVisibleDomain:[O.y,B.y]}},[T,y]),U=wr(D=>{var O;return(O=D.gl.domElement.parentElement)==null?void 0:O.parentElement});Vy(U),TE(U);const M=U.parentElement;TE(M);const R=M.parentElement;return TE(R),C.jsx(G9.Provider,{value:{canvasSize:c,canvasRatio:u,canvasBox:h,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:m,ordinateScale:v,dataToWorld:x,dataToHtml:P,worldToHtml:_,worldToData:y,htmlToWorld:S,htmlToData:N,getFovBox:T,getVisibleDomains:L,visCanvas:R,canvasArea:M,r3fRoot:U,svgOverlay:i,floatingToolbar:o},children:s})}var G_=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(G_||{});class Lbe{constructor(e,n){mp(this,"buttons"),mp(this,"modifierKeys"),mp(this,"isWheel"),mp(this,"isEnabled"),this.id=e;const{button:r=G_.Left,modifierKey:i=[],disabled:o=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=WC(r),this.isWheel=!1),this.modifierKeys=WC(i),this.isEnabled=!o}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const X9=A.createContext({});function kbe(){return A.useContext(X9)}function Obe(t){const{children:e}=t,[n]=A.useState(new Map),r=A.useCallback((s,a)=>{n.has(s)?console.warn(`An interaction with ID "${s}" is already registered.`):n.set(s,new Lbe(s,a))},[n]),i=A.useCallback(s=>{n.delete(s)},[n]),o=A.useCallback((s,a)=>{const l=[...n.values()];if(!n.has(s))throw new Error(`Interaction ${s} is not registered`);const c=l.filter(u=>u.matches(a));return c.length===0?!1:c.length===1?c[0].id===s:c.reduce((u,f)=>f.modifierKeys.length>u.modifierKeys.length?f:u).id===s},[n]);return C.jsx(X9.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:o},children:e})}const BO=.95,jO=new G(1,1,1),Dbe=["Alt","Control","Shift"];function Ng(){const{visSize:t,getFovBox:e}=Fn(),n=wr(i=>i.camera),r=wr(i=>i.invalidate);return A.useCallback(i=>{const{position:o}=n,s=Dl.fromSize(t),a=e(n,i).keepWithin(s);o.copy(a.center.setZ(o.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function q9(){const{canvasSize:t}=Fn(),e=wr(r=>r.camera),n=Ng();return A.useCallback(({world:r})=>{const{width:i,height:o}=t,s=Dl.fromPoints(...r),{width:a,height:l}=s.size;e.scale.set(Math.max(a,1)/i,Math.max(l,1)/o,1),n(s.center)},[e,t,n])}function lP(){const{canvasArea:t}=Fn();Bc(t,"wheel",e=>e.preventDefault(),{passive:!1})}function cP(t){const e=wr(r=>r.camera),n=Ng();return function(r){const{sourceEvent:i,worldPt:o}=r,{x:s,y:a}=t(i);if(!s&&!a)return;const l=new G(s?BO:1,a?BO:1,1);i.deltaY<0?e.scale.multiply(l).min(jO):e.scale.divide(l).min(jO);const c=e.position.clone().sub(o);i.deltaY<0?c.multiply(l):c.divide(l),n(o.clone().add(c))}}function Sa(t,e,n={}){const r=gr(e),i=wr(c=>c.camera),{htmlToWorld:o,worldToData:s,canvasArea:a}=Fn();function l(c){const{offsetX:u,offsetY:f}=c,h=new G(u,f),m=o(i,h),v=s(m);r.current({htmlPt:h,worldPt:m,dataPt:v,sourceEvent:c})}Bc(a,t,l,n)}function Ig(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=kbe();return A.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),A.useCallback(o=>n(t,o),[t,n])}function Y9(t=[]){const{canvasArea:e}=Fn(),n=WC(t),[r]=A.useState(new Map),[i,o]=Kb(!1);function s(){const a=n.every(l=>r.get(l));i!==a&&o(a)}return Bc(window,"keyup",a=>{const{key:l}=a;r.set(l,!1),s()}),Bc(window,"keydown",a=>{const{key:l}=a;r.set(l,!0),s()}),Bc(e,"pointerdown",a=>{Dbe.forEach(l=>{r.set(l,a.getModifierState(l))}),s()}),i}function Fbe(t){const{id:e="Pan",button:n=G_.Left,modifierKey:r,disabled:i}=t,o=Ig(e,{button:n,modifierKey:r,disabled:i}),s=wr(m=>m.camera),a=Ng(),l=A.useRef(),c=Y9(r);function u(m){const{worldPt:v,sourceEvent:x}=m,{target:y,pointerId:g}=x;o(x)&&(y.setPointerCapture(g),l.current=v.clone())}function f(m){if(!l.current||!c)return;const{worldPt:v}=m,x=l.current.clone().sub(v);a(s.position.clone().add(x))}function h(m){const{sourceEvent:v}=m,{target:x,pointerId:y}=v;x.releasePointerCapture(y),l.current=void 0}return Sa("pointerdown",u),Sa("pointermove",f),Sa("pointerup",h),null}function K9(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=ee=>ee,validate:o=()=>!0,onSelectionStart:s,onSelectionChange:a,onSelectionEnd:l,onValidSelection:c,children:u}=t,f=gr(i),h=gr(o),m=gr(s),v=gr(a),x=gr(l),y=gr(c),g=wr(ee=>ee.camera),b=Fn(),{canvasBox:_,htmlToWorld:S,worldToData:P}=b,[N,T]=Sne(),L=A.useRef(),U=A.useRef(!1),M=Y9(n),R=Ig(e,{button:G_.Left,modifierKey:n,disabled:r});function D(ee,me=ee){const le=[ee,_.clampPoint(me)],Q=le.map(ge=>S(g,ge)),ae=Q.map(P);return{html:le,world:Q,data:ae}}function O(ee){const{sourceEvent:me}=ee;if(!R(me))return;const{target:le,pointerId:Q}=me;le.setPointerCapture(Q),L.current=ee,T(D(ee.htmlPt))}function B(ee){const{current:me}=L;me&&T(D(me.htmlPt,ee.htmlPt))}function X(ee){if(!L.current)return;const{sourceEvent:me}=ee,{target:le,pointerId:Q}=me;le.releasePointerCapture(Q),L.current=void 0,U.current=R(me),T(void 0)}Sa("pointerdown",O),Sa("pointermove",B),Sa("pointerup",X);function H(){L.current=void 0,T(void 0)}k6("Escape",H,[],{event:"keydown"}),Bc(window,"contextmenu",ee=>{L.current&&(ee.preventDefault(),H())});const Z=A.useMemo(()=>N&&f.current(N,g,b),[N,f,g,b]),F=A.useMemo(()=>!!Z&&h.current(Z),[Z,h]),Y=R4(Z),K=R4(F);return A.useEffect(()=>{var ee,me,le,Q;if(Z){Vy(N),Y||(ee=m.current)==null||ee.call(m),(me=v.current)==null||me.call(v,M?Z:void 0,N,F);return}Y&&(Vy(K),(le=x.current)==null||le.call(x,U.current?Y:void 0,K),K&&U.current&&((Q=y.current)==null||Q.call(y,Y)),U.current=!1)},[Z,Y,N,F,K,M,m,v,x,y]),!Z||!M?null:(Vy(N),u(Z,N,F))}const zbe="_selection_0f4643e",HC={selection:zbe};function X_(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=Fn(),o=e?i:r,[s]=A.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[a]=A.useState(()=>XT(s));return A.useLayoutEffect(()=>{a.render(Bl.createPortal(n,o))},[n,o,a]),A.useLayoutEffect(()=>(r.append(s),()=>{a.unmount(),s.remove()}),[r,a,s]),null}function Z9(t){const{children:e}=t,{svgOverlay:n}=Fn();return n?C.jsx(X_,{children:Bl.createPortal(e,n)}):null}function GC(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:o=1}=r,s=i&&n?o*(n==="outside"?1:-1):0,{min:a,max:l}=Dl.fromPoints(...e).expandBySize(s,s);return C.jsx("path",{d:`M ${a.x},${a.y} H ${l.x} V ${l.y} H ${a.x} z`,...r})}const Ube=20;function Bbe(t){const{minZoom:e=Ube,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:o,visRatio:s,visSize:a,htmlToWorld:l,worldToData:c}=Fn(),u=q9(),f=wr(v=>v.camera),h=s!==void 0;function m(v){if(!h)return v;const{scale:x}=f,y=Dl.empty(new G(r.width/2,r.height/2)).expandBySize(a.width/x.x,a.height/x.y),g=Dl.fromPoints(...v.html).expandToRatio(i).keepWithin(o).keepWithin(y).toRect(),b=g.map(S=>l(f,S)),_=b.map(c);return{html:g,world:b,data:_}}return C.jsx(K9,{id:"SelectToZoom",transform:m,validate:({html:v})=>v[0].manhattanDistanceTo(v[1])>=e,onValidSelection:u,...n,children:({html:v},{html:x},y)=>C.jsxs(Z9,{children:[C.jsx(GC,{className:HC.selection,coords:x,fill:"white",fillOpacity:!h&&y?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:h||!y?4:void 0}),h&&C.jsx(GC,{className:HC.selection,coords:v,fill:"white",fillOpacity:y?.25:0,stroke:"black",strokePosition:"inside"})]})})}function jbe(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=Fn(),i=Ig("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:i(s),y:!1});return lP(),Sa("wheel",cP(o)),null}function Vbe(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=Fn(),i=Ig("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:!1,y:i(s)});return lP(),Sa("wheel",cP(o)),null}function $be(t){const{modifierKey:e,disabled:n}=t,r=Ig("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=o=>{const s=r(o);return{x:s,y:s}};return lP(),Sa("wheel",cP(i)),null}function Wbe(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:o,...s}=t;function a(l,c,u){const{canvasSize:f,htmlToWorld:h,worldToData:m}=u,{width:v,height:x}=f,[y,g]=l.html,b=e==="x"?[new G(y.x,0),new G(g.x,x)]:[new G(0,y.y),new G(v,g.y)],_=b.map(P=>h(c,P)),S=_.map(m);return{html:b,world:_,data:S}}return C.jsx(K9,{transform:a,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...s,children:o})}const Hbe=20;function VO(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=Hbe}=t,{visRatio:o}=Fn(),s=q9();return C.jsx(Wbe,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:o!==void 0||r,validate:({html:a})=>Dl.fromPoints(...a).hasMinSize(i),onValidSelection:s,children:({html:a},l,c)=>C.jsx(Z9,{children:C.jsx(GC,{className:HC.selection,coords:a,fill:"white",fillOpacity:c?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:c?void 0:4})})})}function Gbe(t){const{...e}=t;return C.jsxs(C.Fragment,{children:[e.pan!==!1&&C.jsx(Fbe,{...e.pan}),e.zoom!==!1&&C.jsx($be,{...e.zoom}),e.xAxisZoom!==!1&&C.jsx(jbe,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&C.jsx(Vbe,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&C.jsx(Bbe,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&C.jsx(VO,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&C.jsx(VO,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function Xbe(t){return(...e)=>A.useMemo(()=>t(...e),e)}function J9(t,e,n=(r,i)=>Object.is(r,i)){const r=wr(a=>a.camera),i=L6(),o=A.useRef(),s=gr(t);return A.useMemo(()=>{o.current=s.current(r)},e),TA(()=>{const a=s.current(r);n(o.current,a)||(o.current=a,i())}),o.current}function Lx(t,e,n,r=!1){const i=A.useMemo(()=>new t(e),[t,e]),o=wr(s=>s.invalidate);return A.useLayoutEffect(()=>{if(n){i.prepare(n);for(let s=0;s{s.needsUpdate=!0}),i.index&&(i.index.needsUpdate=!0),o()}},[i,...Object.values(n||{}),o]),i}function qbe(t){const{children:e}=t,{floatingToolbar:n}=Fn();return n?C.jsx(X_,{children:Bl.createPortal(e,n)}):null}const Ybe="_btnLike_0154b53",Kbe="_icon_bcb8f77",Zbe="_label_5a75092",Jbe="_popup_954b735",Qbe="_btn_f1cebe5 btnClean",uP={btnLike:Ybe,icon:Kbe,label:Zbe,popup:Jbe,btn:Qbe},{btn:e_e,btnLike:t_e}=uP,n_e=`_btn_579cee1 ${e_e}`,r_e=`_btnLike_5797793 ${t_e}`,$O={btn:n_e,btnLike:r_e};function i_e(){const t=wr(i=>i.camera),e=wr(i=>i.invalidate),n=J9(({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 C.jsx(qbe,{children:C.jsx("button",{className:$O.btn,type:"button",hidden:!n,onClick:()=>r(),children:C.jsx("span",{className:$O.btnLike,children:"Reset zoom"})})})}function Q9(t){const{children:e,style:n,className:r}=t,{canvasSize:i}=Fn();return C.jsx(X_,{overflowCanvas:!0,children:C.jsx("div",{className:r,style:{position:"absolute",top:0,left:0,...i,...n},children:e})})}const o_e="_overlay_df4a4fe",s_e="_tooltip_c303daa",a_e="_guides_073d0c4",RE={overlay:o_e,tooltip:s_e,guides:a_e};function l_e(t){const{tooltipOpen:e,tooltipLeft:n,tooltipTop:r,guides:i,children:o}=t,{canvasSize:s}=Fn(),{width:a,height:l}=s;return C.jsx(Q9,{className:RE.overlay,children:e&&o&&C.jsxs(C.Fragment,{children:[C.jsx(Tpe,{className:RE.tooltip,top:r,left:n,unstyled:!0,applyPositionStyle:!0,children:o},Math.random()),i&&C.jsxs("svg",{className:RE.guides,children:[i!=="horizontal"&&C.jsx(Sx,{from:{x:n,y:0},to:{x:n,y:l}}),i!=="vertical"&&C.jsx(Sx,{from:{x:0,y:r},to:{x:a,y:r}})]})]})})}function e7(t){const{children:e,size:n,...r}=t,{visSize:i}=Fn(),{width:o,height:s}=n??i;return C.jsxs("mesh",{...r,children:[C.jsx("planeGeometry",{args:[o,s]}),e]})}function c_e(t){const{guides:e,renderTooltip:n,size:r}=t,{canvasSize:i,worldToData:o}=Fn(),{width:s,height:a}=i,{tooltipOpen:l,tooltipTop:c,tooltipLeft:u,tooltipData:f,showTooltip:h,hideTooltip:m}=ype(),v=A.useCallback(_=>{const{unprojectedPoint:S,nativeEvent:P}=_;if(P.buttons!==0)return;const N=o(S);h({tooltipLeft:P.offsetX,tooltipTop:P.offsetY,tooltipData:[N.x,N.y]})},[o,h]),x=A.useCallback(()=>{l&&m()},[m,l]),y=A.useCallback(()=>m(),[m]),g=A.useCallback(_=>{const{nativeEvent:S}=_,{offsetX:P,offsetY:N}=S;P>=0&&P<=s&&N>=0&&N<=a&&v(_)},[a,v,s]),b=f&&n(...f);return C.jsxs(C.Fragment,{children:[C.jsx(e7,{onPointerMove:v,onPointerOut:x,onPointerDown:y,onPointerUp:g,size:r,children:C.jsx("meshBasicMaterial",{opacity:0,transparent:!0})}),C.jsx(l_e,{tooltipOpen:l,tooltipLeft:u,tooltipTop:c,guides:e,children:b})]})}const u_e="_axis_1002b06",f_e="_grid_a397f58",d_e="_tick_44c4d9c",h_e="_label_4a1d111",kx={axis:u_e,grid:f_e,tick:d_e,label:h_e};function p_e(t){const{formattedValue:e,...n}=t;return C.jsx("text",{...n,dy:"0.3125em",children:e})}const m_e={labelClassName:kx.label,labelProps:{fontSize:"inherit"},tickClassName:kx.tick,tickComponent:p_e},g_e={abscissa:[ove,c9],ordinate:[tve,l9]};function WO(t){const{type:e,config:n,domain:r,canvasSize:i,offset:o,flipAxis:s,showAxis:a}=t,{width:l,height:c}=i,u=e==="abscissa",f=u?l:c,{scaleType:h=Ht.Linear,isIndexAxis:m,showGrid:v,label:x,nice:y=!1}=n,g=V9(h,{domain:r,range:s?[f,0]:[0,f],nice:y}),[b,_]=g_e[e],S=Mbe(f),P=m?{tickValues:Rbe(r,S)}:{numTicks:S};return C.jsxs(C.Fragment,{children:[a&&C.jsx("svg",{className:kx.axis,"data-type":e,style:u?{width:l,height:o}:{width:o,height:c},children:C.jsx(b,{scale:g,tickFormat:Abe(r,f,h),label:x,labelOffset:o-(u?32:36),hideAxisLine:v,...P,...m_e})}),v&&C.jsx("svg",{className:kx.grid,...i,children:C.jsx(_,{scale:g,...i,...P})})]})}function v_e(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:o,ordinateConfig:s,getVisibleDomains:a}=Fn(),l=J9(a,[a]);return C.jsx(X_,{children:Bl.createPortal(C.jsxs(C.Fragment,{children:[C.jsx(WO,{type:"abscissa",config:o,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),C.jsx(WO,{type:"ordinate",config:s,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function y_e(t){const{className:e,orthographic:n,children:r}=t;return C.jsxs(Rde,{className:e,orthographic:n,flat:!0,frameloop:"demand",dpr:[1,3],resize:{debounce:{scroll:20,resize:200},scroll:!1},gl:{preserveDrawingBuffer:!0},camera:{near:xbe,far:aP,position:[0,0,j9]},children:[C.jsx("ambientLight",{}),r]})}function x_e(){const{visRatio:t}=Fn(),e=wr(r=>r.camera),n=Ng();return A.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 b_e(t){const{value:e}=t,n=wr(i=>i.raycaster),r=wr(i=>i.camera);return A.useEffect(()=>{const i=n.params.Points,o=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=o)}},[n,e]),TA(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function __e(){const{dataToWorld:t,worldToData:e}=Fn(),n=A.useRef(),r=wr(o=>o.camera),i=Ng();return TA(()=>{n.current=e(r.position)}),A.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const w_e="_visCanvas_2387375",S_e="_title_313417a",M_e="_canvasArea_6300bb7",E_e="_r3fRoot_f557f0c",C_e="_svgOverlay_3f84e2f",T_e="_floatingToolbar_de4854e",xf={visCanvas:w_e,title:S_e,canvasArea:M_e,r3fRoot:E_e,svgOverlay:C_e,floatingToolbar:T_e},R_e={left:0,right:0,top:0,bottom:0};function A_e(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:o,showAxes:s=!0,children:a}=t,l=$9(n,r.visDomain,i.visDomain),c=s?Pbe({left:!!i.label,bottom:!!r.label,top:!!e}):R_e,[u,f]=A.useState(null),[h,m]=A.useState(null);return C.jsxs("div",{className:xf.visCanvas,style:{gridTemplateColumns:`${c.left}px minmax(0, 1fr) ${c.right}px`,gridTemplateRows:`${c.top}px minmax(0, 1fr) ${c.bottom}px`},children:[s&&e&&C.jsx("p",{className:xf.title,children:e}),C.jsxs("div",{className:xf.canvasArea,children:[C.jsx(y_e,{className:xf.r3fRoot,orthographic:!0,children:C.jsxs(Ibe,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:u,floatingToolbar:h,children:[C.jsx(v_e,{axisOffsets:c,showAxes:s}),C.jsx(Obe,{children:a}),C.jsx(__e,{}),C.jsx(x_e,{}),o!==void 0&&C.jsx(b_e,{value:o})]})}),C.jsx("svg",{ref:f,className:xf.svgOverlay,overflow:"hidden"})]}),C.jsx("div",{ref:m,className:xf.floatingToolbar})]})}class P_e extends zt{constructor(){super(...arguments),mp(this,"params")}prepare(e){this.params=e}}const q_=P_e;class N_e extends q_{constructor(e){super(),this.setAttribute("position",H_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const m=i[e],v=s(l-m),x=s(l+m),y=Number.isFinite(v)?v:h,g=Number.isFinite(x)?x:h;this.attributes.position.setXYZ(u,f,y,0),this.attributes.position.setXYZ(u+1,f,g,0)}}const I_e=N_e;class L_e extends q_{constructor(e){super(),this.setAttribute("position",H_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const m=i[e],v=s(l-m),x=s(l+m);Number.isFinite(v)?this.attributes.position.setXYZ(u,f,v,0):this.attributes.position.setXYZ(u,0,0,wi),Number.isFinite(x)?this.attributes.position.setXYZ(u+1,f,x,0):this.attributes.position.setXYZ(u+1,0,0,wi)}}const k_e=L_e;var $p=(t=>(t.LineOnly="OnlyLine",t.GlyphsOnly="OnlyGlyphs",t.LineAndGlyphs="LineAndGlyphs",t))($p||{}),gl=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(gl||{});const O_e={[gl.Cross]:` +`;function n7(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}function q_(t,e=3,n=Float32Array){return new hn(new n(t*e),e)}function r7(t){return Object.keys(t).some(e=>/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/u.test(e))}const i7=A.createContext({});function Fn(){return A.useContext(i7)}function k_e(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:o,children:s}=t,{width:a,height:l}=wr(D=>D.size),c={width:a,height:l},u=a/l,f=R_e(c,e),h=A.useMemo(()=>Dl.empty().expandByPoint(new G(a,l)),[a,l]),m=WO(n,f.width),v=WO(r,f.height),x=A.useCallback(D=>new G(m(D.x),v(D.y)),[m,v]),y=A.useCallback(D=>new G(m.invert(D.x),v.invert(D.y)),[m,v]),g=A.useMemo(()=>new wt().makeScale(a/2,-l/2,1).setPosition(a/2,l/2,0),[a,l]),b=A.useMemo(()=>g.clone().invert(),[g]),_=A.useCallback((D,O)=>O.clone().project(D).applyMatrix4(g),[g]),S=A.useCallback((D,O)=>O.clone().applyMatrix4(b).unproject(D),[b]),P=A.useCallback((D,O)=>_(D,x(O)),[x,_]),N=A.useCallback((D,O)=>y(S(D,O)),[S,y]),T=A.useCallback((D,O=D.position)=>{const{scale:B}=D;return Dl.empty(O).expandBySize(a*B.x,l*B.y)},[a,l]),L=A.useCallback(D=>{const[O,B]=T(D).toRect().map(y);return{xVisibleDomain:[O.x,B.x],yVisibleDomain:[O.y,B.y]}},[T,y]),U=wr(D=>{var O;return(O=D.gl.domElement.parentElement)==null?void 0:O.parentElement});$y(U),RE(U);const M=U.parentElement;RE(M);const R=M.parentElement;return RE(R),C.jsx(i7.Provider,{value:{canvasSize:c,canvasRatio:u,canvasBox:h,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:m,ordinateScale:v,dataToWorld:x,dataToHtml:P,worldToHtml:_,worldToData:y,htmlToWorld:S,htmlToData:N,getFovBox:T,getVisibleDomains:L,visCanvas:R,canvasArea:M,r3fRoot:U,svgOverlay:i,floatingToolbar:o},children:s})}var Y_=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(Y_||{});class O_e{constructor(e,n){gp(this,"buttons"),gp(this,"modifierKeys"),gp(this,"isWheel"),gp(this,"isEnabled"),this.id=e;const{button:r=Y_.Left,modifierKey:i=[],disabled:o=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=XC(r),this.isWheel=!1),this.modifierKeys=XC(i),this.isEnabled=!o}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const o7=A.createContext({});function D_e(){return A.useContext(o7)}function F_e(t){const{children:e}=t,[n]=A.useState(new Map),r=A.useCallback((s,a)=>{n.has(s)?console.warn(`An interaction with ID "${s}" is already registered.`):n.set(s,new O_e(s,a))},[n]),i=A.useCallback(s=>{n.delete(s)},[n]),o=A.useCallback((s,a)=>{const l=[...n.values()];if(!n.has(s))throw new Error(`Interaction ${s} is not registered`);const c=l.filter(u=>u.matches(a));return c.length===0?!1:c.length===1?c[0].id===s:c.reduce((u,f)=>f.modifierKeys.length>u.modifierKeys.length?f:u).id===s},[n]);return C.jsx(o7.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:o},children:e})}const GO=.95,XO=new G(1,1,1),z_e=["Alt","Control","Shift"];function Ig(){const{visSize:t,getFovBox:e}=Fn(),n=wr(i=>i.camera),r=wr(i=>i.invalidate);return A.useCallback(i=>{const{position:o}=n,s=Dl.fromSize(t),a=e(n,i).keepWithin(s);o.copy(a.center.setZ(o.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function s7(){const{canvasSize:t}=Fn(),e=wr(r=>r.camera),n=Ig();return A.useCallback(({world:r})=>{const{width:i,height:o}=t,s=Dl.fromPoints(...r),{width:a,height:l}=s.size;e.scale.set(Math.max(a,1)/i,Math.max(l,1)/o,1),n(s.center)},[e,t,n])}function cP(){const{canvasArea:t}=Fn();Bc(t,"wheel",e=>e.preventDefault(),{passive:!1})}function uP(t){const e=wr(r=>r.camera),n=Ig();return function(r){const{sourceEvent:i,worldPt:o}=r,{x:s,y:a}=t(i);if(!s&&!a)return;const l=new G(s?GO:1,a?GO:1,1);i.deltaY<0?e.scale.multiply(l).min(XO):e.scale.divide(l).min(XO);const c=e.position.clone().sub(o);i.deltaY<0?c.multiply(l):c.divide(l),n(o.clone().add(c))}}function Sa(t,e,n={}){const r=gr(e),i=wr(c=>c.camera),{htmlToWorld:o,worldToData:s,canvasArea:a}=Fn();function l(c){const{offsetX:u,offsetY:f}=c,h=new G(u,f),m=o(i,h),v=s(m);r.current({htmlPt:h,worldPt:m,dataPt:v,sourceEvent:c})}Bc(a,t,l,n)}function Lg(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=D_e();return A.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),A.useCallback(o=>n(t,o),[t,n])}function a7(t=[]){const{canvasArea:e}=Fn(),n=XC(t),[r]=A.useState(new Map),[i,o]=Qb(!1);function s(){const a=n.every(l=>r.get(l));i!==a&&o(a)}return Bc(window,"keyup",a=>{const{key:l}=a;r.set(l,!1),s()}),Bc(window,"keydown",a=>{const{key:l}=a;r.set(l,!0),s()}),Bc(e,"pointerdown",a=>{z_e.forEach(l=>{r.set(l,a.getModifierState(l))}),s()}),i}function U_e(t){const{id:e="Pan",button:n=Y_.Left,modifierKey:r,disabled:i}=t,o=Lg(e,{button:n,modifierKey:r,disabled:i}),s=wr(m=>m.camera),a=Ig(),l=A.useRef(),c=a7(r);function u(m){const{worldPt:v,sourceEvent:x}=m,{target:y,pointerId:g}=x;o(x)&&(y.setPointerCapture(g),l.current=v.clone())}function f(m){if(!l.current||!c)return;const{worldPt:v}=m,x=l.current.clone().sub(v);a(s.position.clone().add(x))}function h(m){const{sourceEvent:v}=m,{target:x,pointerId:y}=v;x.releasePointerCapture(y),l.current=void 0}return Sa("pointerdown",u),Sa("pointermove",f),Sa("pointerup",h),null}function l7(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=ee=>ee,validate:o=()=>!0,onSelectionStart:s,onSelectionChange:a,onSelectionEnd:l,onValidSelection:c,children:u}=t,f=gr(i),h=gr(o),m=gr(s),v=gr(a),x=gr(l),y=gr(c),g=wr(ee=>ee.camera),b=Fn(),{canvasBox:_,htmlToWorld:S,worldToData:P}=b,[N,T]=Ere(),L=A.useRef(),U=A.useRef(!1),M=a7(n),R=Lg(e,{button:Y_.Left,modifierKey:n,disabled:r});function D(ee,me=ee){const le=[ee,_.clampPoint(me)],Q=le.map(ge=>S(g,ge)),ae=Q.map(P);return{html:le,world:Q,data:ae}}function O(ee){const{sourceEvent:me}=ee;if(!R(me))return;const{target:le,pointerId:Q}=me;le.setPointerCapture(Q),L.current=ee,T(D(ee.htmlPt))}function B(ee){const{current:me}=L;me&&T(D(me.htmlPt,ee.htmlPt))}function X(ee){if(!L.current)return;const{sourceEvent:me}=ee,{target:le,pointerId:Q}=me;le.releasePointerCapture(Q),L.current=void 0,U.current=R(me),T(void 0)}Sa("pointerdown",O),Sa("pointermove",B),Sa("pointerup",X);function H(){L.current=void 0,T(void 0)}G6("Escape",H,[],{event:"keydown"}),Bc(window,"contextmenu",ee=>{L.current&&(ee.preventDefault(),H())});const Z=A.useMemo(()=>N&&f.current(N,g,b),[N,f,g,b]),F=A.useMemo(()=>!!Z&&h.current(Z),[Z,h]),Y=k4(Z),K=k4(F);return A.useEffect(()=>{var ee,me,le,Q;if(Z){$y(N),Y||(ee=m.current)==null||ee.call(m),(me=v.current)==null||me.call(v,M?Z:void 0,N,F);return}Y&&($y(K),(le=x.current)==null||le.call(x,U.current?Y:void 0,K),K&&U.current&&((Q=y.current)==null||Q.call(y,Y)),U.current=!1)},[Z,Y,N,F,K,M,m,v,x,y]),!Z||!M?null:($y(N),u(Z,N,F))}const B_e="_selection_0f4643e",qC={selection:B_e};function K_(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=Fn(),o=e?i:r,[s]=A.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[a]=A.useState(()=>XT(s));return A.useLayoutEffect(()=>{a.render(Bl.createPortal(n,o))},[n,o,a]),A.useLayoutEffect(()=>(r.append(s),()=>{a.unmount(),s.remove()}),[r,a,s]),null}function c7(t){const{children:e}=t,{svgOverlay:n}=Fn();return n?C.jsx(K_,{children:Bl.createPortal(e,n)}):null}function YC(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:o=1}=r,s=i&&n?o*(n==="outside"?1:-1):0,{min:a,max:l}=Dl.fromPoints(...e).expandBySize(s,s);return C.jsx("path",{d:`M ${a.x},${a.y} H ${l.x} V ${l.y} H ${a.x} z`,...r})}const j_e=20;function V_e(t){const{minZoom:e=j_e,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:o,visRatio:s,visSize:a,htmlToWorld:l,worldToData:c}=Fn(),u=s7(),f=wr(v=>v.camera),h=s!==void 0;function m(v){if(!h)return v;const{scale:x}=f,y=Dl.empty(new G(r.width/2,r.height/2)).expandBySize(a.width/x.x,a.height/x.y),g=Dl.fromPoints(...v.html).expandToRatio(i).keepWithin(o).keepWithin(y).toRect(),b=g.map(S=>l(f,S)),_=b.map(c);return{html:g,world:b,data:_}}return C.jsx(l7,{id:"SelectToZoom",transform:m,validate:({html:v})=>v[0].manhattanDistanceTo(v[1])>=e,onValidSelection:u,...n,children:({html:v},{html:x},y)=>C.jsxs(c7,{children:[C.jsx(YC,{className:qC.selection,coords:x,fill:"white",fillOpacity:!h&&y?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:h||!y?4:void 0}),h&&C.jsx(YC,{className:qC.selection,coords:v,fill:"white",fillOpacity:y?.25:0,stroke:"black",strokePosition:"inside"})]})})}function $_e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=Fn(),i=Lg("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:i(s),y:!1});return cP(),Sa("wheel",uP(o)),null}function W_e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=Fn(),i=Lg("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:!1,y:i(s)});return cP(),Sa("wheel",uP(o)),null}function H_e(t){const{modifierKey:e,disabled:n}=t,r=Lg("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=o=>{const s=r(o);return{x:s,y:s}};return cP(),Sa("wheel",uP(i)),null}function G_e(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:o,...s}=t;function a(l,c,u){const{canvasSize:f,htmlToWorld:h,worldToData:m}=u,{width:v,height:x}=f,[y,g]=l.html,b=e==="x"?[new G(y.x,0),new G(g.x,x)]:[new G(0,y.y),new G(v,g.y)],_=b.map(P=>h(c,P)),S=_.map(m);return{html:b,world:_,data:S}}return C.jsx(l7,{transform:a,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...s,children:o})}const X_e=20;function qO(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=X_e}=t,{visRatio:o}=Fn(),s=s7();return C.jsx(G_e,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:o!==void 0||r,validate:({html:a})=>Dl.fromPoints(...a).hasMinSize(i),onValidSelection:s,children:({html:a},l,c)=>C.jsx(c7,{children:C.jsx(YC,{className:qC.selection,coords:a,fill:"white",fillOpacity:c?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:c?void 0:4})})})}function q_e(t){const{...e}=t;return C.jsxs(C.Fragment,{children:[e.pan!==!1&&C.jsx(U_e,{...e.pan}),e.zoom!==!1&&C.jsx(H_e,{...e.zoom}),e.xAxisZoom!==!1&&C.jsx($_e,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&C.jsx(W_e,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&C.jsx(V_e,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&C.jsx(qO,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&C.jsx(qO,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function Y_e(t){return(...e)=>A.useMemo(()=>t(...e),e)}function u7(t,e,n=(r,i)=>Object.is(r,i)){const r=wr(a=>a.camera),i=H6(),o=A.useRef(),s=gr(t);return A.useMemo(()=>{o.current=s.current(r)},e),RA(()=>{const a=s.current(r);n(o.current,a)||(o.current=a,i())}),o.current}function Fx(t,e,n,r=!1){const i=A.useMemo(()=>new t(e),[t,e]),o=wr(s=>s.invalidate);return A.useLayoutEffect(()=>{if(n){i.prepare(n);for(let s=0;s{s.needsUpdate=!0}),i.index&&(i.index.needsUpdate=!0),o()}},[i,...Object.values(n||{}),o]),i}function K_e(t){const{children:e}=t,{floatingToolbar:n}=Fn();return n?C.jsx(K_,{children:Bl.createPortal(e,n)}):null}const Z_e="_btnLike_0154b53",J_e="_icon_bcb8f77",Q_e="_label_5a75092",ewe="_popup_954b735",twe="_btn_f1cebe5 btnClean",fP={btnLike:Z_e,icon:J_e,label:Q_e,popup:ewe,btn:twe},{btn:nwe,btnLike:rwe}=fP,iwe=`_btn_579cee1 ${nwe}`,owe=`_btnLike_5797793 ${rwe}`,YO={btn:iwe,btnLike:owe};function swe(){const t=wr(i=>i.camera),e=wr(i=>i.invalidate),n=u7(({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 C.jsx(K_e,{children:C.jsx("button",{className:YO.btn,type:"button",hidden:!n,onClick:()=>r(),children:C.jsx("span",{className:YO.btnLike,children:"Reset zoom"})})})}function f7(t){const{children:e,style:n,className:r}=t,{canvasSize:i}=Fn();return C.jsx(K_,{overflowCanvas:!0,children:C.jsx("div",{className:r,style:{position:"absolute",top:0,left:0,...i,...n},children:e})})}const awe="_overlay_df4a4fe",lwe="_tooltip_c303daa",cwe="_guides_073d0c4",AE={overlay:awe,tooltip:lwe,guides:cwe};function uwe(t){const{tooltipOpen:e,tooltipLeft:n,tooltipTop:r,guides:i,children:o}=t,{canvasSize:s}=Fn(),{width:a,height:l}=s;return C.jsx(f7,{className:AE.overlay,children:e&&o&&C.jsxs(C.Fragment,{children:[C.jsx(Ame,{className:AE.tooltip,top:r,left:n,unstyled:!0,applyPositionStyle:!0,children:o},Math.random()),i&&C.jsxs("svg",{className:AE.guides,children:[i!=="horizontal"&&C.jsx(Tx,{from:{x:n,y:0},to:{x:n,y:l}}),i!=="vertical"&&C.jsx(Tx,{from:{x:0,y:r},to:{x:a,y:r}})]})]})})}function d7(t){const{children:e,size:n,...r}=t,{visSize:i}=Fn(),{width:o,height:s}=n??i;return C.jsxs("mesh",{...r,children:[C.jsx("planeGeometry",{args:[o,s]}),e]})}function fwe(t){const{guides:e,renderTooltip:n,size:r}=t,{canvasSize:i,worldToData:o}=Fn(),{width:s,height:a}=i,{tooltipOpen:l,tooltipTop:c,tooltipLeft:u,tooltipData:f,showTooltip:h,hideTooltip:m}=bme(),v=A.useCallback(_=>{const{unprojectedPoint:S,nativeEvent:P}=_;if(P.buttons!==0)return;const N=o(S);h({tooltipLeft:P.offsetX,tooltipTop:P.offsetY,tooltipData:[N.x,N.y]})},[o,h]),x=A.useCallback(()=>{l&&m()},[m,l]),y=A.useCallback(()=>m(),[m]),g=A.useCallback(_=>{const{nativeEvent:S}=_,{offsetX:P,offsetY:N}=S;P>=0&&P<=s&&N>=0&&N<=a&&v(_)},[a,v,s]),b=f&&n(...f);return C.jsxs(C.Fragment,{children:[C.jsx(d7,{onPointerMove:v,onPointerOut:x,onPointerDown:y,onPointerUp:g,size:r,children:C.jsx("meshBasicMaterial",{opacity:0,transparent:!0})}),C.jsx(uwe,{tooltipOpen:l,tooltipLeft:u,tooltipTop:c,guides:e,children:b})]})}const dwe="_axis_1002b06",hwe="_grid_a397f58",pwe="_tick_44c4d9c",mwe="_label_4a1d111",zx={axis:dwe,grid:hwe,tick:pwe,label:mwe};function gwe(t){const{formattedValue:e,...n}=t;return C.jsx("text",{...n,dy:"0.3125em",children:e})}const vwe={labelClassName:zx.label,labelProps:{fontSize:"inherit"},tickClassName:zx.tick,tickComponent:gwe},ywe={abscissa:[aye,_9],ordinate:[rye,b9]};function KO(t){const{type:e,config:n,domain:r,canvasSize:i,offset:o,flipAxis:s,showAxis:a}=t,{width:l,height:c}=i,u=e==="abscissa",f=u?l:c,{scaleType:h=Ht.Linear,isIndexAxis:m,showGrid:v,label:x,nice:y=!1}=n,g=e7(h,{domain:r,range:s?[f,0]:[0,f],nice:y}),[b,_]=ywe[e],S=C_e(f),P=m?{tickValues:P_e(r,S)}:{numTicks:S};return C.jsxs(C.Fragment,{children:[a&&C.jsx("svg",{className:zx.axis,"data-type":e,style:u?{width:l,height:o}:{width:o,height:c},children:C.jsx(b,{scale:g,tickFormat:N_e(r,f,h),label:x,labelOffset:o-(u?32:36),hideAxisLine:v,...P,...vwe})}),v&&C.jsx("svg",{className:zx.grid,...i,children:C.jsx(_,{scale:g,...i,...P})})]})}function xwe(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:o,ordinateConfig:s,getVisibleDomains:a}=Fn(),l=u7(a,[a]);return C.jsx(K_,{children:Bl.createPortal(C.jsxs(C.Fragment,{children:[C.jsx(KO,{type:"abscissa",config:o,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),C.jsx(KO,{type:"ordinate",config:s,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function bwe(t){const{className:e,orthographic:n,children:r}=t;return C.jsxs(Phe,{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:lP,position:[0,0,Q9]},children:[C.jsx("ambientLight",{}),r]})}function _we(){const{visRatio:t}=Fn(),e=wr(r=>r.camera),n=Ig();return A.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=wr(i=>i.raycaster),r=wr(i=>i.camera);return A.useEffect(()=>{const i=n.params.Points,o=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=o)}},[n,e]),RA(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function Swe(){const{dataToWorld:t,worldToData:e}=Fn(),n=A.useRef(),r=wr(o=>o.camera),i=Ig();return RA(()=>{n.current=e(r.position)}),A.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const Mwe="_visCanvas_2387375",Ewe="_title_313417a",Cwe="_canvasArea_6300bb7",Twe="_r3fRoot_f557f0c",Rwe="_svgOverlay_3f84e2f",Awe="_floatingToolbar_de4854e",xf={visCanvas:Mwe,title:Ewe,canvasArea:Cwe,r3fRoot:Twe,svgOverlay:Rwe,floatingToolbar:Awe},Pwe={left:0,right:0,top:0,bottom:0};function Nwe(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:o,showAxes:s=!0,children:a}=t,l=t7(n,r.visDomain,i.visDomain),c=s?I_e({left:!!i.label,bottom:!!r.label,top:!!e}):Pwe,[u,f]=A.useState(null),[h,m]=A.useState(null);return C.jsxs("div",{className:xf.visCanvas,style:{gridTemplateColumns:`${c.left}px minmax(0, 1fr) ${c.right}px`,gridTemplateRows:`${c.top}px minmax(0, 1fr) ${c.bottom}px`},children:[s&&e&&C.jsx("p",{className:xf.title,children:e}),C.jsxs("div",{className:xf.canvasArea,children:[C.jsx(bwe,{className:xf.r3fRoot,orthographic:!0,children:C.jsxs(k_e,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:u,floatingToolbar:h,children:[C.jsx(xwe,{axisOffsets:c,showAxes:s}),C.jsx(F_e,{children:a}),C.jsx(Swe,{}),C.jsx(_we,{}),o!==void 0&&C.jsx(wwe,{value:o})]})}),C.jsx("svg",{ref:f,className:xf.svgOverlay,overflow:"hidden"})]}),C.jsx("div",{ref:m,className:xf.floatingToolbar})]})}class Iwe extends zt{constructor(){super(...arguments),gp(this,"params")}prepare(e){this.params=e}}const Z_=Iwe;class Lwe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const m=i[e],v=s(l-m),x=s(l+m),y=Number.isFinite(v)?v:h,g=Number.isFinite(x)?x:h;this.attributes.position.setXYZ(u,f,y,0),this.attributes.position.setXYZ(u+1,f,g,0)}}const kwe=Lwe;class Owe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,wi),this.attributes.position.setXYZ(u+1,0,0,wi);return}const m=i[e],v=s(l-m),x=s(l+m);Number.isFinite(v)?this.attributes.position.setXYZ(u,f,v,0):this.attributes.position.setXYZ(u,0,0,wi),Number.isFinite(x)?this.attributes.position.setXYZ(u+1,f,x,0):this.attributes.position.setXYZ(u+1,0,0,wi)}}const Dwe=Owe;var $p=(t=>(t.LineOnly="OnlyLine",t.GlyphsOnly="OnlyGlyphs",t.LineAndGlyphs="LineAndGlyphs",t))($p||{}),vl=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(vl||{});const Fwe={[vl.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)); @@ -4062,7 +4089,7 @@ No matching component was found for: return 0.0; } } - `,[gl.Cap]:` + `,[vl.Cap]:` float alphaSymbol(vec2 coord, float size) { float dy = abs(size * (coord.y - 0.5)); if (dy < 0.5) { @@ -4071,7 +4098,7 @@ No matching component was found for: return 0.0; } } - `,[gl.Circle]:` + `,[vl.Circle]:` float alphaSymbol(vec2 coord, float size) { float r = distance(coord, vec2(0.5, 0.5)); if( r < 0.5) { @@ -4080,11 +4107,11 @@ No matching component was found for: return 0.0; } } - `,[gl.Square]:` + `,[vl.Square]:` float alphaSymbol(vec2 coord, float size) { return 1.0; } - `};function t7(t){const{color:e,size:n,glyphType:r}=t,i=!e,o={uniforms:W9({size:n,color:new ot(e)}),vertexShader:` + `};function h7(t){const{color:e,size:n,glyphType:r}=t,i=!e,o={uniforms:n7({size:n,color:new ot(e)}),vertexShader:` ${e?"uniform vec3 color;":""} uniform float size; varying vec3 vertexColor; @@ -4098,7 +4125,7 @@ No matching component was found for: uniform float size; varying vec3 vertexColor; - ${O_e[r]} + ${Fwe[r]} void main() { float alpha = alphaSymbol(gl_PointCoord, size); @@ -4108,7 +4135,7 @@ No matching component was found for: gl_FragColor = vec4(vertexColor.rgb, alpha); } } - `};return C.jsx("shaderMaterial",{args:[o],vertexColors:i})}function D_e(t){const{abscissas:e,ordinates:n,errors:r,color:i,visible:o,ignoreValue:s}=t,{abscissaScale:a,ordinateScale:l}=Fn(),c=o&&{abscissas:e,ordinates:n,errors:r,abscissaScale:a,ordinateScale:l,ignoreValue:s},u=Lx(I_e,n.length,c),f=Lx(k_e,n.length,c);return C.jsxs(C.Fragment,{children:[C.jsx("lineSegments",{geometry:u,visible:o,children:C.jsx("lineBasicMaterial",{color:i})}),C.jsx("points",{geometry:f,visible:o,children:C.jsx(t7,{glyphType:gl.Cap,color:i,size:9})})]})}class F_e extends q_{constructor(e){super(),this.setAttribute("position",H_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,wi);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,wi);return}this.attributes.position.setXYZ(e,l,c,0)}}const z_e=F_e;function U_e(t){const{abscissas:e,ordinates:n,glyphType:r=gl.Cross,color:i,size:o=6,visible:s=!0,ignoreValue:a,...l}=t,{abscissaScale:c,ordinateScale:u}=Fn(),f=Lx(z_e,n.length,s&&{abscissas:e,ordinates:n,abscissaScale:c,ordinateScale:u,ignoreValue:a},H9(l));return C.jsx("points",{geometry:f,visible:s,...l,children:C.jsx(t7,{glyphType:r,color:i,size:o})})}class B_e extends q_{constructor(e){super(),this.setAttribute("position",H_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,wi);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,wi);return}this.attributes.position.setXYZ(e,l,c,0)}}const j_e=B_e;class V_e extends La{}qB({Line_:V_e});function $_e(t){const{abscissas:e,ordinates:n,color:r,visible:i=!0,ignoreValue:o,...s}=t,{abscissaScale:a,ordinateScale:l}=Fn(),c=Lx(j_e,n.length,i&&{abscissas:e,ordinates:n,abscissaScale:a,ordinateScale:l,ignoreValue:o},H9(s));return C.jsx("line_",{geometry:c,visible:i,...s,children:C.jsx("lineBasicMaterial",{color:r})})}function W_e(t){const{abscissas:e,ordinates:n,errors:r,showErrors:i,color:o,curveType:s=$p.LineOnly,glyphType:a=gl.Cross,glyphSize:l=6,visible:c=!0,onDataPointClick:u,onDataPointEnter:f,onDataPointLeave:h,ignoreValue:m}=t,v=A.useCallback(g=>{const{index:b}=g;u&&b!==void 0&&u(b,g)},[u]),x=A.useCallback(g=>{const{index:b}=g;f&&b!==void 0&&f(b,g)},[f]),y=A.useCallback(g=>{const{index:b}=g;h&&b!==void 0&&h(b,g)},[h]);return C.jsxs(C.Fragment,{children:[C.jsx($_e,{abscissas:e,ordinates:n,color:o,ignoreValue:m,visible:s!==$p.GlyphsOnly&&c}),C.jsx(U_e,{abscissas:e,ordinates:n,glyphType:a,color:o,size:l,ignoreValue:m,visible:s!==$p.LineOnly&&c,onClick:u&&v,onPointerEnter:f&&x,onPointerLeave:h&&y}),r&&C.jsx(D_e,{abscissas:e,ordinates:n,errors:r,color:o,ignoreValue:m,visible:c&&i})]})}var Yf=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(Yf||{});function H_e(t){return yx(t*360,1,.5).formatRgb()}function bf(t){return e=>t(1-e)}const G_e={Blues:bf(iye),Greens:bf(sye),Greys:bf(lye),Oranges:bf(pye),Purples:bf(uye),Reds:bf(dye),Turbo:Sye,Viridis:Mye,Inferno:Cye,Magma:Eye,Plasma:Tye,Cividis:mye,Warm:vye,Cool:yye,Cubehelix:gye,BuGn:kve,BuPu:Dve,GnBu:zve,OrRd:Bve,PuBuGn:Vve,PuBu:Wve,PuRd:Gve,RdPu:qve,YlGnBu:Kve,YlGn:Jve,YlOrBr:eye,YlOrRd:nye,Rainbow:xye,Sinebow:wye,HSL:H_e,BrBG:gve,PRGn:yve,PiYG:bve,PuOr:wve,RdBu:Mve,RdGy:Cve,RdYlBu:Rve,RdYlGn:Pve,Spectral:Ive},HO=1/20;F6(0,1+HO,HO);const X_e={[Ht.Linear]:t=>t,[Ht.Log]:Math.log10,[Ht.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Ht.Sqrt]:Math.sqrt,[Ht.Gamma]:t=>t},q_e={float32:ai,uint16:xu,uint8:Fi,uint8_clamped:Fi};function Y_e(t,e){const n=G_e[t];return e?r=>n(1-r):n}function K_e(t,e=Ht.Linear){const n=X_e[e];return[n(t[0]),n(t[1])]}function Z_e(t,e=lr){if(!t)return;const{rows:n,cols:r}=pbe(t),i=new No(t.data,r,n,fg,q_e[t.dtype],ug,Ti,Ti,e);return i.needsUpdate=!0,i}const AE=Xbe(Z_e),J_e=Il(255,255,255,0),PE=256,Q_e={[Ht.Log]:"log(value) * oneOverLog10",[Ht.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Ht.Sqrt]:"sqrt(value)"},ewe={[Ht.Log]:"value > 0.",[Ht.Sqrt]:"value >= 0."};function twe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o=!1,magFilter:s,alphaValues:a,alphaDomain:l=_be,badColor:c=J_e,mask:u}=t,f=AE(e,s),h=AE(a),m=AE(u),v=A.useMemo(()=>{const S=Y_e(i,o),P=Array.from({length:PE}).flatMap((T,L)=>{const{r:U,g:M,b:R}=Il(S(L/(PE-1)));return[U,M,R,255]}),N=new No(Uint8Array.from(P),PE,1,Rr,Fi);return N.needsUpdate=!0,N},[i,o]),[x,y]=Array.isArray(r)?r:[r,1],g=K_e(n,x),b=typeof c=="string"?Il(c):c,_={uniforms:W9({data:f,mask:m,colorMap:v,min:g[0],oneOverRange:1/(g[1]-g[0]),gammaExponent:y,normRevertFactor:e.dtype==="uint8"?255:1,alpha:h,withAlpha:a?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new Zt(b.r/255,b.g/255,b.b/255,b.opacity)}),vertexShader:Nbe,fragmentShader:` + `};return C.jsx("shaderMaterial",{args:[o],vertexColors:i})}function zwe(t){const{abscissas:e,ordinates:n,errors:r,color:i,visible:o,ignoreValue:s}=t,{abscissaScale:a,ordinateScale:l}=Fn(),c=o&&{abscissas:e,ordinates:n,errors:r,abscissaScale:a,ordinateScale:l,ignoreValue:s},u=Fx(kwe,n.length,c),f=Fx(Dwe,n.length,c);return C.jsxs(C.Fragment,{children:[C.jsx("lineSegments",{geometry:u,visible:o,children:C.jsx("lineBasicMaterial",{color:i})}),C.jsx("points",{geometry:f,visible:o,children:C.jsx(h7,{glyphType:vl.Cap,color:i,size:9})})]})}class Uwe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,wi);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,wi);return}this.attributes.position.setXYZ(e,l,c,0)}}const Bwe=Uwe;function jwe(t){const{abscissas:e,ordinates:n,glyphType:r=vl.Cross,color:i,size:o=6,visible:s=!0,ignoreValue:a,...l}=t,{abscissaScale:c,ordinateScale:u}=Fn(),f=Fx(Bwe,n.length,s&&{abscissas:e,ordinates:n,abscissaScale:c,ordinateScale:u,ignoreValue:a},r7(l));return C.jsx("points",{geometry:f,visible:s,...l,children:C.jsx(h7,{glyphType:r,color:i,size:o})})}class Vwe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,wi);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,wi);return}this.attributes.position.setXYZ(e,l,c,0)}}const $we=Vwe;class Wwe extends La{}s8({Line_:Wwe});function Hwe(t){const{abscissas:e,ordinates:n,color:r,visible:i=!0,ignoreValue:o,...s}=t,{abscissaScale:a,ordinateScale:l}=Fn(),c=Fx($we,n.length,i&&{abscissas:e,ordinates:n,abscissaScale:a,ordinateScale:l,ignoreValue:o},r7(s));return C.jsx("line_",{geometry:c,visible:i,...s,children:C.jsx("lineBasicMaterial",{color:r})})}function Gwe(t){const{abscissas:e,ordinates:n,errors:r,showErrors:i,color:o,curveType:s=$p.LineOnly,glyphType:a=vl.Cross,glyphSize:l=6,visible:c=!0,onDataPointClick:u,onDataPointEnter:f,onDataPointLeave:h,ignoreValue:m}=t,v=A.useCallback(g=>{const{index:b}=g;u&&b!==void 0&&u(b,g)},[u]),x=A.useCallback(g=>{const{index:b}=g;f&&b!==void 0&&f(b,g)},[f]),y=A.useCallback(g=>{const{index:b}=g;h&&b!==void 0&&h(b,g)},[h]);return C.jsxs(C.Fragment,{children:[C.jsx(Hwe,{abscissas:e,ordinates:n,color:o,ignoreValue:m,visible:s!==$p.GlyphsOnly&&c}),C.jsx(jwe,{abscissas:e,ordinates:n,glyphType:a,color:o,size:l,ignoreValue:m,visible:s!==$p.LineOnly&&c,onClick:u&&v,onPointerEnter:f&&x,onPointerLeave:h&&y}),r&&C.jsx(zwe,{abscissas:e,ordinates:n,errors:r,color:o,ignoreValue:m,visible:c&&i})]})}var Yf=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(Yf||{});function Xwe(t){return wx(t*360,1,.5).formatRgb()}function bf(t){return e=>t(1-e)}const qwe={Blues:bf(s1e),Greens:bf(l1e),Greys:bf(u1e),Oranges:bf(g1e),Purples:bf(d1e),Reds:bf(p1e),Turbo:E1e,Viridis:C1e,Inferno:R1e,Magma:T1e,Plasma:A1e,Cividis:v1e,Warm:x1e,Cool:b1e,Cubehelix:y1e,BuGn:Dye,BuPu:zye,GnBu:Bye,OrRd:Vye,PuBuGn:Wye,PuBu:Gye,PuRd:qye,RdPu:Kye,YlGnBu:Jye,YlGn:e1e,YlOrBr:n1e,YlOrRd:i1e,Rainbow:_1e,Sinebow:M1e,HSL:Xwe,BrBG:yye,PRGn:bye,PiYG:wye,PuOr:Mye,RdBu:Cye,RdGy:Rye,RdYlBu:Pye,RdYlGn:Iye,Spectral:kye},ZO=1/20;Y6(0,1+ZO,ZO);const Ywe={[Ht.Linear]:t=>t,[Ht.Log]:Math.log10,[Ht.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Ht.Sqrt]:Math.sqrt,[Ht.Gamma]:t=>t},Kwe={float32:ai,uint16:_u,uint8:Fi,uint8_clamped:Fi};function Zwe(t,e){const n=qwe[t];return e?r=>n(1-r):n}function Jwe(t,e=Ht.Linear){const n=Ywe[e];return[n(t[0]),n(t[1])]}function Qwe(t,e=lr){if(!t)return;const{rows:n,cols:r}=g_e(t),i=new No(t.data,r,n,dg,Kwe[t.dtype],fg,Ti,Ti,e);return i.needsUpdate=!0,i}const PE=Y_e(Qwe),eSe=Il(255,255,255,0),NE=256,tSe={[Ht.Log]:"log(value) * oneOverLog10",[Ht.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Ht.Sqrt]:"sqrt(value)"},nSe={[Ht.Log]:"value > 0.",[Ht.Sqrt]:"value >= 0."};function rSe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o=!1,magFilter:s,alphaValues:a,alphaDomain:l=S_e,badColor:c=eSe,mask:u}=t,f=PE(e,s),h=PE(a),m=PE(u),v=A.useMemo(()=>{const S=Zwe(i,o),P=Array.from({length:NE}).flatMap((T,L)=>{const{r:U,g:M,b:R}=Il(S(L/(NE-1)));return[U,M,R,255]}),N=new No(Uint8Array.from(P),NE,1,Rr,Fi);return N.needsUpdate=!0,N},[i,o]),[x,y]=Array.isArray(r)?r:[r,1],g=Jwe(n,x),b=typeof c=="string"?Il(c):c,_={uniforms:n7({data:f,mask:m,colorMap:v,min:g[0],oneOverRange:1/(g[1]-g[0]),gammaExponent:y,normRevertFactor:e.dtype==="uint8"?255:1,alpha:h,withAlpha:a?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new Zt(b.r/255,b.g/255,b.b/255,b.opacity)}),vertexShader:L_e,fragmentShader:` uniform sampler2D data; uniform sampler2D colorMap; @@ -4130,11 +4157,11 @@ No matching component was found for: varying vec2 coords; bool isSupported(float value) { - return ${ewe[x]||"true"}; + return ${nSe[x]||"true"}; } float scale(float value) { - return ${Q_e[x]||"value"}; + return ${tSe[x]||"value"}; } void main() { @@ -4154,38 +4181,11 @@ No matching component was found for: } } } - `};return C.jsx("shaderMaterial",{args:[_],side:Qo})}const nwe=A.memo(twe);function rwe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o,magFilter:s,alphaValues:a,alphaDomain:l,badColor:c,mask:u,...f}=t;return C.jsx(e7,{...f,children:C.jsx(nwe,{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o,magFilter:s,alphaValues:a,alphaDomain:l,badColor:c,mask:u})})}const{btn:iwe,btnLike:owe,icon:swe,label:awe,popup:lwe}=uP,cwe="_toolbar_d77010c",uwe="_controls_6f2898a",fwe="_controlWrapper_c53184f",dwe="_control_72c50d3",hwe="_sep_9963159",pwe="_arrowIcon_52a7a56",mwe="_menu_9a962f8",gwe="_btnOption_14b8d45 btnClean",vwe=`_btn_ea88005 ${iwe}`,ywe=`_btnLike_059b9d6 ${owe}`,xwe=`_icon_b73dfea ${swe}`,bwe=`_label_917dfbf ${awe}`,_we=`_popup_486e2ed ${lwe}`,Ei={toolbar:cwe,controls:uwe,controlWrapper:fwe,control:dwe,sep:hwe,arrowIcon:pwe,menu:mwe,btnOption:gwe,btn:vwe,btnLike:ywe,icon:xwe,label:bwe,popup:_we},wwe=A.forwardRef((t,e)=>{const{label:n,icon:r,iconOnly:i,small:o,raised:s,withArrow:a,disabled:l,...c}=t;return C.jsx("button",{ref:e,className:Ei.btn,type:"button",title:i?n:void 0,"aria-label":i?n:void 0,disabled:l,"data-small":o||void 0,"data-raised":s||void 0,...c,children:C.jsxs("span",{className:Ei.btnLike,children:[r&&C.jsx(r,{className:Ei.icon}),!i&&C.jsx("span",{className:Ei.label,children:n}),a&&C.jsx(R9,{className:Ei.arrowIcon})]})})}),fP=wwe,qc=6,Swe=320;function Mwe(){const[t,e]=Kb();return nP({open:t,middleware:[JA(qc),p1e({padding:qc*2,apply({availableHeight:n,elements:r,rects:i}){Object.assign(r.floating.style,{maxHeight:`${Math.min(n,Swe)}px`,minWidth:`${i.reference.width}px`})}}),QA({padding:qc})],onOpenChange:e,whileElementsMounted:ZA})}function dP(t){const{refs:e,onOpenChange:n}=t,{domReference:r,floating:i}=e,o=A.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]),s=A.useMemo(()=>({onBlur:o}),[o]),a=A.useMemo(()=>({onBlur:o}),[o]);return k6("Escape",()=>n(!1)),Ine(e.floating,l=>{const c=e.domReference.current;l.target instanceof Element&&c!=null&&c.contains(l.target)||n(!1)}),A.useMemo(()=>({reference:s,floating:a}),[s,a])}const Ewe="_list_0eb2b49",Cwe="_entry_d2776e7",Twe="_shortcut_cf4534d",NE={list:Ewe,entry:Cwe,shortcut:Twe};function Rwe(t){const{interactions:e}=t,[n,r]=Kb(),i=A.useId(),{refs:o,floatingStyles:s,context:a}=nP({open:n,middleware:[JA(qc),QA({padding:qc})],onOpenChange:r,whileElementsMounted:ZA}),{getReferenceProps:l,getFloatingProps:c}=rP([tP(a),dP(a)]);return C.jsxs(C.Fragment,{children:[C.jsx(fP,{ref:o.setReference,id:i,label:"Show help",icon:X1e,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":n,"aria-controls":n&&a.floatingId||void 0,...l()}),n&&C.jsx("div",{ref:o.setFloating,id:a.floatingId,className:Ei.popup,style:s,role:"dialog","aria-labelledby":i,...c(),children:C.jsx("ul",{className:NE.list,children:e.map(({shortcut:u,description:f})=>C.jsxs("li",{className:NE.entry,children:[C.jsx("span",{children:f})," ",C.jsx("kbd",{className:NE.shortcut,children:u})]},u))})})]})}const Awe="_controlWrapper_8627c21",Pwe="_control_0b569a9",GO={controlWrapper:Awe,control:Pwe};function Nwe(t){const{children:e,knownWidth:n,onMeasure:r}=t;return C.jsx(iP,{onResize:({entry:i})=>{i&&i.width>(n||0)&&r(i.width)},children:({measureRef:i})=>C.jsx("div",{className:GO.controlWrapper,"data-measured":n!==void 0,children:C.jsx("div",{ref:i,className:GO.control,children:e})})})}const{popup:Iwe}=uP,Lwe="_control_ad90dfa",kwe=`_popup_c29165d ${Iwe}`,XO={control:Lwe,popup:kwe};function Yc(t){return C.jsx("span",{className:Ei.sep,...t})}function Owe(t){const{children:e}=t,n=GA(e).filter(A.isValidElement),[r,i]=Kb(),o=A.useId(),{refs:s,floatingStyles:a,context:l}=nP({open:r,placement:"bottom-end",middleware:[JA(qc),QA({padding:qc})],onOpenChange:i,whileElementsMounted:ZA}),{getReferenceProps:c,getFloatingProps:u}=rP([tP(l),dP(l)]);return n.length===0?null:C.jsxs(C.Fragment,{children:[C.jsx(Yc,{}),C.jsx(fP,{ref:s.setReference,id:o,label:"More controls",icon:q1e,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r&&l.floatingId||void 0,...c()}),r&&C.jsx("div",{ref:s.setFloating,id:l.floatingId,className:XO.popup,style:a,role:"dialog","aria-labelledby":o,...u(),children:n.map(f=>C.jsx("div",{className:XO.control,children:A.cloneElement(f)},f.key))})]})}function Dwe(t){var e;const{children:n,interactions:r,overflowChildren:i=[]}=t,o=GA(n).filter(A.isValidElement),[s,a]=Tne(),l=s?s.width:0,c=wne(),[u,f]=o.reduce(([m,v,x],y)=>{const g=c.get(y.key)??0,b=x+g>l;return[b?m:[...m,y],b?[...v,y]:v,x+g]},[[],[],0]),h=((e=u[u.length-1])==null?void 0:e.type)===Yc;return C.jsxs("div",{className:Ei.toolbar,children:[C.jsx("div",{ref:a,className:Ei.controls,children:(h?u.slice(0,-1):u).map(m=>C.jsx(Nwe,{knownWidth:c.get(m.key),onMeasure:v=>{c.set(m.key,v)},children:m},m.key))}),C.jsxs(Owe,{children:[i,f.filter(m=>m.type!==Yc)]}),r&&C.jsx(Yc,{}),r&&C.jsx(Rwe,{interactions:r})]})}function Ec(t){const{value:e,onToggle:n,...r}=t;return C.jsx(fP,{...r,"aria-pressed":e,onClick:()=>n()})}A.createContext(void 0);const Fwe="_boundEditor_ce4a770",zwe="_label_1e85446",Uwe="_value_c7f465d",IE={boundEditor:Fwe,label:zwe,value:Uwe},Bwe="_root_86b0b1e",jwe="_dataRange_03d542e",Vwe="_autoscale_8ea032e",$we="_error_841a0df",Wwe="_errorMessage_a16acf6",Hwe="_actionBtn_18350cd btnClean",Gwe="_swapBtn_2e22485 _actionBtn_18350cd btnClean",Tl={root:Bwe,dataRange:jwe,autoscale:Vwe,error:$we,errorMessage:Wwe,actionBtn:Hwe,swapBtn:Gwe},XC=A.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:o,onEditToggle:s,onChange:a}=t,l=`${n}-bound`,c=A.useRef(null),[u,f]=A.useState("");function h(){s(!1),f(ME(r))}return A.useImperativeHandle(e,()=>({cancel:h})),A.useEffect(()=>{f(ME(r))},[r,f]),A.useEffect(()=>{var m,v;i||(m=c.current)==null||m.blur(),i&&n==="min"&&((v=c.current)==null||v.focus())},[i,n]),C.jsxs("form",{className:IE.boundEditor,"data-error":o||void 0,"data-editing":i,onSubmit:m=>{m.preventDefault();const v=Number.parseFloat(u.replace("−","-")),x=Number.isNaN(v)?r:Tbe(v);f(ME(x)),a(x),s(!1)},children:[C.jsx("label",{id:`${l}-label`,className:IE.label,htmlFor:l,children:n}),C.jsx("input",{id:l,ref:c,className:IE.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||s(!0)}}),C.jsx("button",{className:Tl.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:C.jsx(H1e,{})}),C.jsx("button",{className:Tl.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>h(),children:C.jsx(Y1e,{})})]})});XC.displayName="BoundEditor";const Xwe={[Yf.MinGreater]:{message:"Min greater than max",fallback:"data range"},[Yf.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[Yf.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[Yf.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function LE(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:o}=Xwe[e];return C.jsxs("p",{className:Tl.error,children:[C.jsxs("span",{className:Tl.errorMessage,children:[i,C.jsx("br",{}),C.jsx(G1e,{})," falling back to ",C.jsx("strong",{children:o})]}),n&&r&&C.jsx("button",{className:Tl.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:C.jsx(K1e,{})})]})}const qwe=A.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:o,isAutoMax:s,isEditingMin:a,isEditingMax:l}=t,{onAutoMinToggle:c,onAutoMaxToggle:u,onEditMin:f,onEditMax:h,onChangeMin:m,onChangeMax:v,onSwap:x}=t,{minGreater:y,minError:g,maxError:b}=i,_=A.useRef(null),S=A.useRef(null);return A.useImperativeHandle(e,()=>({cancelEditing:()=>{var P,N;(P=_.current)==null||P.cancel(),(N=S.current)==null||N.cancel()}})),C.jsxs("div",{className:Tl.root,children:[y&&C.jsx(LE,{error:Yf.MinGreater,showSwapBtn:!o&&!s,onSwap:x}),C.jsx(XC,{ref:_,bound:"min",value:n[0],isEditing:a,hasError:y||!!g,onEditToggle:f,onChange:m}),g&&C.jsx(LE,{error:g}),C.jsx(XC,{ref:S,bound:"max",value:n[1],isEditing:l,hasError:y||!!b,onEditToggle:h,onChange:v}),b&&C.jsx(LE,{error:b}),C.jsxs("p",{className:Tl.dataRange,children:["Data range"," ",C.jsxs("span",{children:["["," ",C.jsx("abbr",{title:r[0].toString(),children:kO(r[0])})," ",","," ",C.jsx("abbr",{title:r[1].toString(),children:kO(r[1])})," ","]"]})]}),C.jsxs("p",{className:Tl.autoscale,children:["Autoscale"," ",C.jsx(Ec,{label:"Min",raised:!0,value:o,onToggle:c}),C.jsx(Ec,{label:"Max",raised:!0,value:s,onToggle:u})]})]})});qwe.displayName="DomainControls";const Ywe="_thumb_be15bc7",Kwe="_thumbBtnLike_3744319",Zwe="_icon_4b34f14",cy={thumb:Ywe,thumbBtnLike:Kwe,icon:Zwe},Jwe=A.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:o,AutoIcon:s,...a}=t;return C.jsx("div",{ref:e,...a,className:cy.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":o||void 0,tabIndex:o?-1:a.tabIndex,"data-auto":r,"data-error":i||void 0,children:C.jsxs("div",{className:cy.thumbBtnLike,children:[r&&C.jsx(s,{className:cy.icon}),!r&&i&&C.jsx(W1e,{className:cy.icon,strokeWidth:"3"})]})})});Jwe.displayName="Thumb";function Qwe(t){return Array.isArray(t)?t:Object.values(t).flat()}function qO(t){const{activeIndex:e,selectedIndex:n,children:r,getItemProps:i,onSelect:o}=t,{ref:s,index:a}=M1e();return C.jsx("button",{ref:s,className:Ei.btnOption,type:"button",role:"option","aria-selected":a===n||void 0,tabIndex:a===e?0:-1,"data-active":a===e||void 0,...i({onClick:()=>o(a)}),children:r})}const eSe="_label_568c73e",tSe="_groups_6cecc1b",nSe="_groupLabel_b6d0922",kE={label:eSe,groups:tSe,groupLabel:nSe};function rSe(t){const{label:e,value:n,disabled:r,onChange:i,options:o,renderOption:s}=t,{context:a,refs:l,floatingStyles:c}=Mwe(),{open:u,onOpenChange:f}=a,h=A.useId(),m=A.useId(),v=A.useId(),x=A.useRef([]),[y,g]=A.useState(null),[b,_]=A.useState(()=>Qwe(o).indexOf(n)),{getReferenceProps:S,getFloatingProps:P,getItemProps:N}=rP([tP(a),dP(a),D1e(a,{listRef:x,activeIndex:y,loop:!0,focusItemOnHover:!1,onNavigate:g})]);function T(L,U){_(L),f(!1),i(U)}return C.jsxs(C.Fragment,{children:[e&&C.jsx("span",{id:h,className:kE.label,children:e}),C.jsx("button",{ref:l.setReference,id:m,className:Ei.btn,type:"button",disabled:r,role:"combobox","aria-labelledby":`${e?h:""} ${v}`,"aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u&&a.floatingId||void 0,...S(),children:C.jsxs("span",{id:v,className:Ei.btnLike,children:[s(n),C.jsx(R9,{className:Ei.arrowIcon})]})}),u&&C.jsx("div",{ref:l.setFloating,id:a.floatingId,className:Ei.menu,style:c,role:"listbox","aria-labelledby":m,...P(),children:C.jsx(S1e,{elementsRef:x,children:Array.isArray(o)?o.map(L=>C.jsx(qO,{activeIndex:y,selectedIndex:b,getItemProps:N,onSelect:U=>T(U,L),children:s(L)},L)):C.jsx("ul",{className:kE.groups,children:Object.entries(o).map(([L,U])=>C.jsxs("li",{children:[C.jsx("span",{className:kE.groupLabel,children:L}),U.map(M=>C.jsx(qO,{activeIndex:y,selectedIndex:b,getItemProps:N,onSelect:R=>T(R,M),children:s(M)},M))]},L))})})})]})}function iSe(t){return C.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:C.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function oSe(t){return C.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:C.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Ht.Linear+"",Ht.Log+"",Ht.SymLog+"",Ht.Sqrt+"",Ht.Gamma+"";jy.Phase+"",jy.Amplitude+"",jy.PhaseAmplitude+"";Xxe(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function sSe(t){const{api:e,layer:n,x:r,y:i,magFilter:o,onPointerMove:s,...a}=t,l=e.get(n,new Ie(r,i)),[c,u]=l.shape,f=vne(h=>{s==null||s(h,l)},[s],50);return C.jsx("group",{position:[r+u/2,i+c/2,0],children:C.jsx(rwe,{values:l,...a,magFilter:o,size:{width:u,height:c},onPointerMove:s&&f})})}A.memo(sSe);new Pr(new G(-1,-1,-1),new G(1,1,1));var n7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},YO=Mt.createContext&&Mt.createContext(n7),aSe=["attr","size","title"];function lSe(t,e){if(t==null)return{};var n=cSe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function cSe(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 Ox(){return Ox=Object.assign?Object.assign.bind():function(t){for(var e=1;eMt.createElement(e.tag,Dx({key:n},e.attr),r7(e.child)))}function hP(t){return e=>Mt.createElement(hSe,Ox({attr:Dx({},t.attr)},e),r7(t.child))}function hSe(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=lSe(t,aSe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Mt.createElement("svg",Ox({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Dx(Dx({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&Mt.createElement("title",null,o),t.children)};return YO!==void 0?Mt.createElement(YO.Consumer,null,n=>e(n)):e(n7)}function pSe(t){return hP({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 mSe(t){return hP({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 gSe(t){return hP({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 Xt={};const vSe=Object.prototype.toString;function Vs(t){const e=vSe.call(t);return e.endsWith("Array]")&&!e.includes("Big")}const ySe=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Vs},Symbol.toStringTag,{value:"Module"})),xSe=Ws(ySe);function bSe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Vs(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,o=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(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;as&&(s=t[a]);return s}function _Se(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Vs(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,o=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(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;a1&&arguments[1]!==void 0?arguments[1]:{};if(Vs(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(!Vs(e.output))throw new TypeError("output option must be an array if specified");n=e.output}else n=new Array(t.length);var r=_Se(t),i=bSe(t);if(r===i)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var o=e.min,s=o===void 0?e.autoMinMax?r:0:o,a=e.max,l=a===void 0?e.autoMinMax?i:1:a;if(s>=l)throw new RangeError("min option must be smaller than max option");for(var c=(l-s)/(i-r),u=0;u{const{label:n,icon:r,iconOnly:i,small:o,raised:s,withArrow:a,disabled:l,...c}=t;return C.jsx("button",{ref:e,className:Ei.btn,type:"button",title:i?n:void 0,"aria-label":i?n:void 0,disabled:l,"data-small":o||void 0,"data-raised":s||void 0,...c,children:C.jsxs("span",{className:Ei.btnLike,children:[r&&C.jsx(r,{className:Ei.icon}),!i&&C.jsx("span",{className:Ei.label,children:n}),a&&C.jsx(B9,{className:Ei.arrowIcon})]})})}),dP=MSe,qc=6,ESe=320;function CSe(){const[t,e]=Qb();return rP({open:t,middleware:[QA(qc),gxe({padding:qc*2,apply({availableHeight:n,elements:r,rects:i}){Object.assign(r.floating.style,{maxHeight:`${Math.min(n,ESe)}px`,minWidth:`${i.reference.width}px`})}}),eP({padding:qc})],onOpenChange:e,whileElementsMounted:JA})}function hP(t){const{refs:e,onOpenChange:n}=t,{domReference:r,floating:i}=e,o=A.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]),s=A.useMemo(()=>({onBlur:o}),[o]),a=A.useMemo(()=>({onBlur:o}),[o]);return G6("Escape",()=>n(!1)),kre(e.floating,l=>{const c=e.domReference.current;l.target instanceof Element&&c!=null&&c.contains(l.target)||n(!1)}),A.useMemo(()=>({reference:s,floating:a}),[s,a])}const TSe="_list_0eb2b49",RSe="_entry_d2776e7",ASe="_shortcut_cf4534d",IE={list:TSe,entry:RSe,shortcut:ASe};function PSe(t){const{interactions:e}=t,[n,r]=Qb(),i=A.useId(),{refs:o,floatingStyles:s,context:a}=rP({open:n,middleware:[QA(qc),eP({padding:qc})],onOpenChange:r,whileElementsMounted:JA}),{getReferenceProps:l,getFloatingProps:c}=iP([nP(a),hP(a)]);return C.jsxs(C.Fragment,{children:[C.jsx(dP,{ref:o.setReference,id:i,label:"Show help",icon:Yxe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":n,"aria-controls":n&&a.floatingId||void 0,...l()}),n&&C.jsx("div",{ref:o.setFloating,id:a.floatingId,className:Ei.popup,style:s,role:"dialog","aria-labelledby":i,...c(),children:C.jsx("ul",{className:IE.list,children:e.map(({shortcut:u,description:f})=>C.jsxs("li",{className:IE.entry,children:[C.jsx("span",{children:f})," ",C.jsx("kbd",{className:IE.shortcut,children:u})]},u))})})]})}const NSe="_controlWrapper_8627c21",ISe="_control_0b569a9",JO={controlWrapper:NSe,control:ISe};function LSe(t){const{children:e,knownWidth:n,onMeasure:r}=t;return C.jsx(oP,{onResize:({entry:i})=>{i&&i.width>(n||0)&&r(i.width)},children:({measureRef:i})=>C.jsx("div",{className:JO.controlWrapper,"data-measured":n!==void 0,children:C.jsx("div",{ref:i,className:JO.control,children:e})})})}const{popup:kSe}=fP,OSe="_control_ad90dfa",DSe=`_popup_c29165d ${kSe}`,QO={control:OSe,popup:DSe};function Yc(t){return C.jsx("span",{className:Ei.sep,...t})}function FSe(t){const{children:e}=t,n=XA(e).filter(A.isValidElement),[r,i]=Qb(),o=A.useId(),{refs:s,floatingStyles:a,context:l}=rP({open:r,placement:"bottom-end",middleware:[QA(qc),eP({padding:qc})],onOpenChange:i,whileElementsMounted:JA}),{getReferenceProps:c,getFloatingProps:u}=iP([nP(l),hP(l)]);return n.length===0?null:C.jsxs(C.Fragment,{children:[C.jsx(Yc,{}),C.jsx(dP,{ref:s.setReference,id:o,label:"More controls",icon:Kxe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r&&l.floatingId||void 0,...c()}),r&&C.jsx("div",{ref:s.setFloating,id:l.floatingId,className:QO.popup,style:a,role:"dialog","aria-labelledby":o,...u(),children:n.map(f=>C.jsx("div",{className:QO.control,children:A.cloneElement(f)},f.key))})]})}function zSe(t){var e;const{children:n,interactions:r,overflowChildren:i=[]}=t,o=XA(n).filter(A.isValidElement),[s,a]=Are(),l=s?s.width:0,c=Mre(),[u,f]=o.reduce(([m,v,x],y)=>{const g=c.get(y.key)??0,b=x+g>l;return[b?m:[...m,y],b?[...v,y]:v,x+g]},[[],[],0]),h=((e=u[u.length-1])==null?void 0:e.type)===Yc;return C.jsxs("div",{className:Ei.toolbar,children:[C.jsx("div",{ref:a,className:Ei.controls,children:(h?u.slice(0,-1):u).map(m=>C.jsx(LSe,{knownWidth:c.get(m.key),onMeasure:v=>{c.set(m.key,v)},children:m},m.key))}),C.jsxs(FSe,{children:[i,f.filter(m=>m.type!==Yc)]}),r&&C.jsx(Yc,{}),r&&C.jsx(PSe,{interactions:r})]})}function Ec(t){const{value:e,onToggle:n,...r}=t;return C.jsx(dP,{...r,"aria-pressed":e,onClick:()=>n()})}A.createContext(void 0);const USe="_boundEditor_ce4a770",BSe="_label_1e85446",jSe="_value_c7f465d",LE={boundEditor:USe,label:BSe,value:jSe},VSe="_root_86b0b1e",$Se="_dataRange_03d542e",WSe="_autoscale_8ea032e",HSe="_error_841a0df",GSe="_errorMessage_a16acf6",XSe="_actionBtn_18350cd btnClean",qSe="_swapBtn_2e22485 _actionBtn_18350cd btnClean",Rl={root:VSe,dataRange:$Se,autoscale:WSe,error:HSe,errorMessage:GSe,actionBtn:XSe,swapBtn:qSe},KC=A.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:o,onEditToggle:s,onChange:a}=t,l=`${n}-bound`,c=A.useRef(null),[u,f]=A.useState("");function h(){s(!1),f(EE(r))}return A.useImperativeHandle(e,()=>({cancel:h})),A.useEffect(()=>{f(EE(r))},[r,f]),A.useEffect(()=>{var m,v;i||(m=c.current)==null||m.blur(),i&&n==="min"&&((v=c.current)==null||v.focus())},[i,n]),C.jsxs("form",{className:LE.boundEditor,"data-error":o||void 0,"data-editing":i,onSubmit:m=>{m.preventDefault();const v=Number.parseFloat(u.replace("−","-")),x=Number.isNaN(v)?r:A_e(v);f(EE(x)),a(x),s(!1)},children:[C.jsx("label",{id:`${l}-label`,className:LE.label,htmlFor:l,children:n}),C.jsx("input",{id:l,ref:c,className:LE.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||s(!0)}}),C.jsx("button",{className:Rl.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:C.jsx(Xxe,{})}),C.jsx("button",{className:Rl.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>h(),children:C.jsx(Zxe,{})})]})});KC.displayName="BoundEditor";const YSe={[Yf.MinGreater]:{message:"Min greater than max",fallback:"data range"},[Yf.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[Yf.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[Yf.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function kE(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:o}=YSe[e];return C.jsxs("p",{className:Rl.error,children:[C.jsxs("span",{className:Rl.errorMessage,children:[i,C.jsx("br",{}),C.jsx(qxe,{})," falling back to ",C.jsx("strong",{children:o})]}),n&&r&&C.jsx("button",{className:Rl.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:C.jsx(Jxe,{})})]})}const KSe=A.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:o,isAutoMax:s,isEditingMin:a,isEditingMax:l}=t,{onAutoMinToggle:c,onAutoMaxToggle:u,onEditMin:f,onEditMax:h,onChangeMin:m,onChangeMax:v,onSwap:x}=t,{minGreater:y,minError:g,maxError:b}=i,_=A.useRef(null),S=A.useRef(null);return A.useImperativeHandle(e,()=>({cancelEditing:()=>{var P,N;(P=_.current)==null||P.cancel(),(N=S.current)==null||N.cancel()}})),C.jsxs("div",{className:Rl.root,children:[y&&C.jsx(kE,{error:Yf.MinGreater,showSwapBtn:!o&&!s,onSwap:x}),C.jsx(KC,{ref:_,bound:"min",value:n[0],isEditing:a,hasError:y||!!g,onEditToggle:f,onChange:m}),g&&C.jsx(kE,{error:g}),C.jsx(KC,{ref:S,bound:"max",value:n[1],isEditing:l,hasError:y||!!b,onEditToggle:h,onChange:v}),b&&C.jsx(kE,{error:b}),C.jsxs("p",{className:Rl.dataRange,children:["Data range"," ",C.jsxs("span",{children:["["," ",C.jsx("abbr",{title:r[0].toString(),children:BO(r[0])})," ",","," ",C.jsx("abbr",{title:r[1].toString(),children:BO(r[1])})," ","]"]})]}),C.jsxs("p",{className:Rl.autoscale,children:["Autoscale"," ",C.jsx(Ec,{label:"Min",raised:!0,value:o,onToggle:c}),C.jsx(Ec,{label:"Max",raised:!0,value:s,onToggle:u})]})]})});KSe.displayName="DomainControls";const ZSe="_thumb_be15bc7",JSe="_thumbBtnLike_3744319",QSe="_icon_4b34f14",cy={thumb:ZSe,thumbBtnLike:JSe,icon:QSe},eMe=A.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:o,AutoIcon:s,...a}=t;return C.jsx("div",{ref:e,...a,className:cy.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":o||void 0,tabIndex:o?-1:a.tabIndex,"data-auto":r,"data-error":i||void 0,children:C.jsxs("div",{className:cy.thumbBtnLike,children:[r&&C.jsx(s,{className:cy.icon}),!r&&i&&C.jsx(Gxe,{className:cy.icon,strokeWidth:"3"})]})})});eMe.displayName="Thumb";function tMe(t){return Array.isArray(t)?t:Object.values(t).flat()}function e5(t){const{activeIndex:e,selectedIndex:n,children:r,getItemProps:i,onSelect:o}=t,{ref:s,index:a}=Cxe();return C.jsx("button",{ref:s,className:Ei.btnOption,type:"button",role:"option","aria-selected":a===n||void 0,tabIndex:a===e?0:-1,"data-active":a===e||void 0,...i({onClick:()=>o(a)}),children:r})}const nMe="_label_568c73e",rMe="_groups_6cecc1b",iMe="_groupLabel_b6d0922",OE={label:nMe,groups:rMe,groupLabel:iMe};function oMe(t){const{label:e,value:n,disabled:r,onChange:i,options:o,renderOption:s}=t,{context:a,refs:l,floatingStyles:c}=CSe(),{open:u,onOpenChange:f}=a,h=A.useId(),m=A.useId(),v=A.useId(),x=A.useRef([]),[y,g]=A.useState(null),[b,_]=A.useState(()=>tMe(o).indexOf(n)),{getReferenceProps:S,getFloatingProps:P,getItemProps:N}=iP([nP(a),hP(a),zxe(a,{listRef:x,activeIndex:y,loop:!0,focusItemOnHover:!1,onNavigate:g})]);function T(L,U){_(L),f(!1),i(U)}return C.jsxs(C.Fragment,{children:[e&&C.jsx("span",{id:h,className:OE.label,children:e}),C.jsx("button",{ref:l.setReference,id:m,className:Ei.btn,type:"button",disabled:r,role:"combobox","aria-labelledby":`${e?h:""} ${v}`,"aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u&&a.floatingId||void 0,...S(),children:C.jsxs("span",{id:v,className:Ei.btnLike,children:[s(n),C.jsx(B9,{className:Ei.arrowIcon})]})}),u&&C.jsx("div",{ref:l.setFloating,id:a.floatingId,className:Ei.menu,style:c,role:"listbox","aria-labelledby":m,...P(),children:C.jsx(Exe,{elementsRef:x,children:Array.isArray(o)?o.map(L=>C.jsx(e5,{activeIndex:y,selectedIndex:b,getItemProps:N,onSelect:U=>T(U,L),children:s(L)},L)):C.jsx("ul",{className:OE.groups,children:Object.entries(o).map(([L,U])=>C.jsxs("li",{children:[C.jsx("span",{className:OE.groupLabel,children:L}),U.map(M=>C.jsx(e5,{activeIndex:y,selectedIndex:b,getItemProps:N,onSelect:R=>T(R,M),children:s(M)},M))]},L))})})})]})}function sMe(t){return C.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:C.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function aMe(t){return C.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:C.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Ht.Linear+"",Ht.Log+"",Ht.SymLog+"",Ht.Sqrt+"",Ht.Gamma+"";Vy.Phase+"",Vy.Amplitude+"",Vy.PhaseAmplitude+"";Ybe(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function lMe(t){const{api:e,layer:n,x:r,y:i,magFilter:o,onPointerMove:s,...a}=t,l=e.get(n,new Ie(r,i)),[c,u]=l.shape,f=xre(h=>{s==null||s(h,l)},[s],50);return C.jsx("group",{position:[r+u/2,i+c/2,0],children:C.jsx(oSe,{values:l,...a,magFilter:o,size:{width:u,height:c},onPointerMove:s&&f})})}A.memo(lMe);new Pr(new G(-1,-1,-1),new G(1,1,1));var p7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},t5=Mt.createContext&&Mt.createContext(p7),cMe=["attr","size","title"];function uMe(t,e){if(t==null)return{};var n=fMe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function fMe(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 Ux(){return Ux=Object.assign?Object.assign.bind():function(t){for(var e=1;eMt.createElement(e.tag,Bx({key:n},e.attr),m7(e.child)))}function pP(t){return e=>Mt.createElement(mMe,Ux({attr:Bx({},t.attr)},e),m7(t.child))}function mMe(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=uMe(t,cMe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),Mt.createElement("svg",Ux({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Bx(Bx({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&Mt.createElement("title",null,o),t.children)};return t5!==void 0?Mt.createElement(t5.Consumer,null,n=>e(n)):e(p7)}function gMe(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 vMe(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 yMe(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 Xt={};const xMe=Object.prototype.toString;function Vs(t){const e=xMe.call(t);return e.endsWith("Array]")&&!e.includes("Big")}const bMe=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Vs},Symbol.toStringTag,{value:"Module"})),_Me=Ws(bMe);function wMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Vs(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,o=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(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;as&&(s=t[a]);return s}function SMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Vs(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,o=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(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;a1&&arguments[1]!==void 0?arguments[1]:{};if(Vs(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(!Vs(e.output))throw new TypeError("output option must be an array if specified");n=e.output}else n=new Array(t.length);var r=SMe(t),i=wMe(t);if(r===i)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var o=e.min,s=o===void 0?e.autoMinMax?r:0:o,a=e.max,l=a===void 0?e.autoMinMax?i:1:a;if(s>=l)throw new RangeError("min option must be smaller than max option");for(var c=(l-s)/(i-r),u=0;u=0&&n?` ${JO(t,e-1)}`:JO(t,e)).padEnd(e)}function JO(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 RSe(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,o));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,o));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 _o(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 Tf(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 Rf(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 pP(t,e){if(!Si.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 mP(t,e){if(!Si.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 qC(t,e,n,r,i){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(fy("startRow",e),fy("endRow",n),fy("startColumn",r),fy("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 Y_(t,e=0){let n=[];for(let r=0;r=o)throw new RangeError("min must be smaller than max");let a=o-i,l=new Ze(e,n);for(let c=0;cr?(o=!0,r=n):(i=!1,o=!0);e++}return i}isReducedEchelonForm(){let e=0,n=0,r=-1,i=!0,o=!1;for(;er?(o=!0,r=n):(i=!1,o=!0);for(let s=n+1;se.get(i,r)&&(i=o);if(e.get(i,r)===0)r++;else{e.swapRows(n,i);let o=e.get(n,r);for(let s=r;s=0;)if(e.maxRow(i)===0)i--;else{let o=0,s=!1;for(;on[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(){_f(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){bo(this,e),_f(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(bo(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){_o(this,e),_f(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(_o(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=Ze.checkMatrix(e);let n=new Ze(2,2);const r=this.get(0,0),i=e.get(0,0),o=this.get(0,1),s=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*(s-u),v=c*(l-i),x=(r+o)*u,y=(a-r)*(i+s),g=(o-c)*(l+u),b=f+v-x+g,_=m+x,S=h+v,P=f-h+m+y;return n.set(0,0,b),n.set(0,1,_),n.set(1,0,S),n.set(1,1,P),n}strassen3x3(e){e=Ze.checkMatrix(e);let n=new Ze(3,3);const r=this.get(0,0),i=this.get(0,1),o=this.get(0,2),s=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),v=e.get(0,2),x=e.get(1,0),y=e.get(1,1),g=e.get(1,2),b=e.get(2,0),_=e.get(2,1),S=e.get(2,2),P=(r+i+o-s-a-u-f)*y,N=(r-s)*(-m+y),T=a*(-h+m+x-y-g-b+S),L=(-r+s+a)*(h-m+y),U=(s+a)*(-h+m),M=r*h,R=(-r+c+u)*(h-v+g),D=(-r+c)*(v-g),O=(c+u)*(-h+v),B=(r+i+o-a-l-c-u)*g,X=u*(-h+v+x-y-g-b+_),H=(-o+u+f)*(y+b-_),Z=(o-f)*(y-_),F=o*b,Y=(u+f)*(-b+_),K=(-o+a+l)*(g+b-S),ee=(o-l)*(g-S),me=(a+l)*(-b+S),le=i*x,Q=l*_,ae=s*v,ge=c*m,Me=f*S,tt=M+F+le,He=P+L+U+M+H+F+Y,rt=M+R+O+B+F+K+me,Ve=N+T+L+M+F+K+ee,se=N+L+U+M+Q,j=F+K+ee+me+ae,ye=M+R+D+X+H+Z+F,xe=H+Z+F+Y+ge,Re=M+R+D+O+Me;return n.set(0,0,tt),n.set(0,1,He),n.set(0,2,rt),n.set(1,0,Ve),n.set(1,1,se),n.set(1,2,j),n.set(2,0,ye),n.set(2,1,xe),n.set(2,2,Re),n}mmulStrassen(e){e=Ze.checkMatrix(e);let n=this.clone(),r=n.rows,i=n.columns,o=e.rows,s=e.columns;i!==o&&console.warn(`Multiplying ${r} x ${i} and ${o} x ${s} matrix: dimensions do not match.`);function a(f,h,m){let v=f.rows,x=f.columns;if(v===h&&x===m)return f;{let y=kt.zeros(h,m);return y=y.setSubMatrix(f,0,0),y}}let l=Math.max(r,o),c=Math.max(i,s);n=a(n,l,c),e=a(e,l,c);function u(f,h,m,v){if(m<=512||v<=512)return f.mmul(h);m%2===1&&v%2===1?(f=a(f,m+1,v+1),h=a(h,m+1,v+1)):m%2===1?(f=a(f,m+1,v),h=a(h,m+1,v)):v%2===1&&(f=a(f,m,v+1),h=a(h,m,v+1));let x=parseInt(f.rows/2,10),y=parseInt(f.columns/2,10),g=f.subMatrix(0,x-1,0,y-1),b=h.subMatrix(0,x-1,0,y-1),_=f.subMatrix(0,x-1,y,f.columns-1),S=h.subMatrix(0,x-1,y,h.columns-1),P=f.subMatrix(x,f.rows-1,0,y-1),N=h.subMatrix(x,h.rows-1,0,y-1),T=f.subMatrix(x,f.rows-1,y,f.columns-1),L=h.subMatrix(x,h.rows-1,y,h.columns-1),U=u(kt.add(g,T),kt.add(b,L),x,y),M=u(kt.add(P,T),b,x,y),R=u(g,kt.sub(S,L),x,y),D=u(T,kt.sub(N,b),x,y),O=u(kt.add(g,_),L,x,y),B=u(kt.sub(P,g),kt.add(b,S),x,y),X=u(kt.sub(_,T),kt.add(N,L),x,y),H=kt.add(U,D);H.sub(O),H.add(X);let Z=kt.add(R,O),F=kt.add(M,D),Y=kt.sub(U,M);Y.add(R),Y.add(B);let K=kt.zeros(2*H.rows,2*H.columns);return K=K.setSubMatrix(H,0,0),K=K.setSubMatrix(Z,H.rows,0),K=K.setSubMatrix(F,0,H.columns),K=K.setSubMatrix(Y,H.rows,H.columns),K.subMatrix(0,m-1,0,v-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 Ze(this.rows,this.columns);for(let o=0;o0&&ZO(s,{min:n,max:r,output:s}),i.setRow(o,s)}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 Ze(this.rows,this.columns);for(let o=0;or||n<0||n>=this.columns||r<0||r>=this.columns)throw new RangeError("Argument out of range");let i=new Ze(e.length,r-n+1);for(let o=0;o=this.rows)throw new RangeError(`Row index out of range: ${e[o]}`);i.set(o,s-n,this.get(e[o],s))}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 Ze(r-n+1,e.length);for(let o=0;o=this.columns)throw new RangeError(`Column index out of range: ${e[o]}`);i.set(s-n,o,this.get(s,e[o]))}return i}setSubMatrix(e,n,r){if(e=Ze.checkMatrix(e),e.isEmpty())return this;let i=n+e.rows-1,o=r+e.columns-1;qC(this,n,i,r,o);for(let s=0;stypeof e=="number")}kt.random=kt.rand;kt.randomInt=kt.randInt;kt.diagonal=kt.diag;kt.prototype.diagonal=kt.prototype.diag;kt.identity=kt.eye;kt.prototype.negate=kt.prototype.neg;kt.prototype.tensorProduct=kt.prototype.kroneckerProduct;var qm,YC,Zc;let Ze=(Zc=class extends kt{constructor(n,r){super();uS(this,qm);Vt(this,"data");if(Zc.isMatrix(n))fS(this,qm,YC).call(this,n.rows,n.columns),Zc.copy(n,this);else if(Number.isInteger(n)&&n>=0)fS(this,qm,YC).call(this,n,r);else if(Si.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 o=0;o"u"&&(r=n,n=this.columns),_o(this,n,!0),r=Rf(this,r);for(let i=0;i=0)for(let i=0;i=0)L0(this,Hr,new Ze(n,n));else if(L0(this,Hr,new Ze(n)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return Vo(this,Hr).size}get rows(){return Vo(this,Hr).rows}get columns(){return Vo(this,Hr).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(n){return Ze.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 Vx(this.diagonalSize);for(const[r,i,o]of this.upperRightEntries())n.set(r,i,o);return n}toMatrix(){return new Ze(this)}get(n,r){return Vo(this,Hr).get(n,r)}set(n,r,i){return Vo(this,Hr).set(n,r,i),Vo(this,Hr).set(r,n,i),this}removeCross(n){return Vo(this,Hr).removeRow(n),Vo(this,Hr).removeColumn(n),this}addCross(n,r){r===void 0&&(r=n,n=this.diagonalSize);const i=r.slice();return i.splice(n,1),Vo(this,Hr).addRow(n,i),Vo(this,Hr).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,o]of n.entries())o||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,o=0,s=0;s=n&&(i=++o);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 o=new Vx(i);for(let s=0,a=0,l=0;l=i&&(s=++a);return o}*upperRightEntries(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}}*upperRightValues(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}};Hr=new WeakMap;let Kc=Vx;Kc.prototype.klassType="SymmetricMatrix";class K_ extends Kc{static isDistanceMatrix(e){return Kc.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 Kc(this)}clone(){const e=new K_(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,o=0,s=0;s=e&&(i=++o+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 o=1,s=0,a=0;a=r&&(o=++s+1);return i}}K_.prototype.klassSubType="DistanceMatrix";class za extends kt{constructor(e,n,r){super(),this.matrix=e,this.rows=n,this.columns=r}}class qSe extends za{constructor(e,n){_o(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 YSe extends za{constructor(e,n){mP(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 KSe extends za{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 ZSe extends za{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 JSe extends za{constructor(e,n){bo(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 QSe extends za{constructor(e,n){pP(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 $y extends za{constructor(e,n,r){pP(e,n),mP(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 eMe extends za{constructor(e,n,r,i,o){qC(e,n,r,i,o),super(e,r-n+1,o-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 tMe=class extends za{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 s7 extends kt{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 oo extends kt{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 nMe(t,e){if(Si.isAnyArray(t))return t[0]&&Si.isAnyArray(t[0])?new oo(t):new s7(t,e);throw new Error("the argument is not an array")}class Z_{constructor(e){e=oo.checkMatrix(e);let n=e.clone(),r=n.rows,i=n.columns,o=new Float64Array(r),s=1,a,l,c,u,f,h,m,v,x;for(a=0;aMath.abs(v[u])&&(u=a);if(u!==l){for(c=0;c=0;c--){for(l=0;ls?i.set(o,s,e.get(o,s)):o===s?i.set(o,s,1):i.set(o,s,0);return i}get upperTriangularMatrix(){let e=this.LU,n=e.rows,r=e.columns,i=new Ze(n,r);for(let o=0;oMath.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 gP{constructor(e){e=oo.checkMatrix(e);let n=e.clone(),r=e.rows,i=e.columns,o=new Float64Array(i),s,a,l,c;for(l=0;l=0;c--){for(l=0;l=0;a--){for(o=0;o=0;M--)if(v[M]!==0){for(let R=M+1;R=0;M--){if(M0;){let M,R;for(M=T-2;M>=-1&&M!==-1;M--){const D=Number.MIN_VALUE+U*Math.abs(v[M]+Math.abs(v[M+1]));if(Math.abs(g[M])<=D||Number.isNaN(g[M])){g[M]=0;break}}if(M===T-2)R=4;else{let D;for(D=T-1;D>=M&&D!==M;D--){let O=(D!==T?Math.abs(g[D]):0)+(D!==M+1?Math.abs(g[D-1]):0);if(Math.abs(v[D])<=U*O){v[D]=0;break}}D===M?R=3:D===T-1?R=1:(R=2,M=D)}switch(M++,R){case 1:{let D=g[T-2];g[T-2]=0;for(let O=T-2;O>=M;O--){let B=fa(v[O],D),X=v[O]/B,H=D/B;if(v[O]=B,O!==M&&(D=-H*g[O-1],g[O-1]=X*g[O-1]),c)for(let Z=0;Z=v[M+1]);){let D=v[M];if(v[M]=v[M+1],v[M+1]=D,c&&Mn&&o.set(u,f,e.get(u,f)/this.s[f]);let s=this.U,a=s.rows,l=s.columns,c=new Ze(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 Ze.diag(this.s)}}function rMe(t,e=!1){return t=oo.checkMatrix(t),e?new oh(t).inverse():a7(t,Ze.eye(t.rows))}function a7(t,e,n=!1){return t=oo.checkMatrix(t),e=oo.checkMatrix(e),n?new oh(t).solve(e):t.isSquare()?new Z_(t).solve(e):new gP(t).solve(e)}function Wy(t){if(t=Ze.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 o,s,a;return o=new $y(t,[1,2],[1,2]),s=new $y(t,[1,2],[0,2]),a=new $y(t,[1,2],[0,1]),e=t.get(0,0),n=t.get(0,1),r=t.get(0,2),e*Wy(o)-n*Wy(s)+r*Wy(a)}else return new Z_(t).determinant}else throw Error("determinant can only be calculated for a square matrix")}function iMe(t,e){let n=[];for(let r=0;ri)return new Array(e.rows+1).fill(0);{let o=e.addRow(n,[0]);for(let s=0;se?o[s]=1/o[s]:o[s]=0;return i.mmul(Ze.diag(o).mmul(r.transpose()))}function lMe(t,e=t,n={}){t=new Ze(t);let r=!1;if(typeof e=="object"&&!Ze.isMatrix(e)&&!Si.isAnyArray(e)?(n=e,e=t,r=!0):e=new Ze(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 o=t.transpose().mmul(e);for(let s=0;s0?i.set(o,o+1,n[o]):n[o]<0&&i.set(o,o-1,n[o])}return i}}function uMe(t,e,n,r){let i,o,s,a,l,c,u,f;for(l=0;l0;a--){for(f=0,s=0,c=0;c0&&(o=-o),e[a]=f*o,s=s-i*o,n[a-1]=i-o,l=0;lc)do{for(i=n[c],f=(n[c+1]-i)/(2*e[c]),h=fa(f,1),f<0&&(h=-h),n[c]=e[c]/(f+h),n[c+1]=e[c]*(f+h),m=n[c+1],o=i-n[c],s=c+2;s=c;s--)for(y=x,x=v,_=b,i=v*e[s],o=v*f,h=fa(f,e[s]),e[s+1]=b*h,b=e[s]/h,v=f/h,f=v*n[s]-b*i,n[s+1]=o+b*(v*i+b*n[s]),l=0;lN*P);n[c]=n[c]+S,e[c]=0}for(s=0;s=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--)s+=n[c]*e.get(c,u);for(s=s/l,c=f;c<=o;c++)e.set(c,u,e.get(c,u)-s*n[c])}for(c=0;c<=o;c++){for(s=0,u=o;u>=f;u--)s+=n[u]*e.get(c,u);for(s=s/l,u=f;u<=o;u++)e.set(c,u,e.get(c,u)-s*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<=o;c++)n[c]=e.get(c,f-1);for(u=f;u<=o;u++){for(a=0,c=f;c<=o;c++)a+=n[c]*r.get(c,u);for(a=a/n[f]/e.get(f,f-1),c=f;c<=o;c++)r.set(c,u,r.get(c,u)+a*n[c])}}}function hMe(t,e,n,r,i){let o=t-1,s=0,a=t-1,l=Number.EPSILON,c=0,u=0,f=0,h=0,m=0,v=0,x=0,y=0,g,b,_,S,P,N,T,L,U,M,R,D,O,B,X;for(g=0;ga)&&(n[g]=i.get(g,g),e[g]=0),b=Math.max(g-1,0);b=s;){for(S=o;S>s&&(v=Math.abs(i.get(S-1,S-1))+Math.abs(i.get(S,S)),v===0&&(v=u),!(Math.abs(i.get(S,S-1))=0){for(x=f>=0?f+x:f-x,n[o-1]=L+x,n[o]=n[o-1],x!==0&&(n[o]=L-T/x),e[o-1]=0,e[o]=0,L=i.get(o,o-1),v=Math.abs(L)+Math.abs(x),f=L/v,h=x/v,m=Math.sqrt(f*f+h*h),f=f/m,h=h/m,b=o-1;b0)){for(v=Math.sqrt(v),U=S&&(x=i.get(P,P),m=L-x,v=U-x,f=(m*v-T)/i.get(P+1,P)+i.get(P,P+1),h=i.get(P+1,P+1)-x-m-v,m=i.get(P+2,P+1),v=Math.abs(f)+Math.abs(h)+Math.abs(m),f=f/v,h=h/v,m=m/v,!(P===S||Math.abs(i.get(P,P-1))*(Math.abs(h)+Math.abs(m))P+2&&i.set(g,g-3,0);for(_=P;_<=o-1&&(B=_!==o-1,_!==P&&(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(v=Math.sqrt(f*f+h*h+m*m),f<0&&(v=-v),v!==0){for(_!==P?i.set(_,_-1,-v*L):S!==P&&i.set(_,_-1,-i.get(_,_-1)),f=f+v,L=f/v,U=h/v,x=m/v,h=h/f,m=m/f,b=_;b=0;o--)if(f=n[o],h=e[o],h===0)for(S=o,i.set(o,o,1),g=o-1;g>=0;g--){for(T=i.get(g,g)-f,m=0,b=S;b<=o;b++)m=m+i.get(g,b)*i.get(b,o);if(e[g]<0)x=T,v=m;else if(S=g,e[g]===0?i.set(g,o,T!==0?-m/T:-m/(l*u)):(L=i.get(g,g+1),U=i.get(g+1,g),h=(n[g]-f)*(n[g]-f)+e[g]*e[g],N=(L*v-x*m)/h,i.set(g,o,N),i.set(g+1,o,Math.abs(L)>Math.abs(x)?(-m-T*N)/L:(-v-U*N)/x)),N=Math.abs(i.get(g,o)),l*N*N>1)for(b=g;b<=o;b++)i.set(b,o,i.get(b,o)/N)}else if(h<0)for(S=o-1,Math.abs(i.get(o,o-1))>Math.abs(i.get(o-1,o))?(i.set(o-1,o-1,h/i.get(o,o-1)),i.set(o-1,o,-(i.get(o,o)-f)/i.get(o,o-1))):(X=dy(0,-i.get(o-1,o),i.get(o-1,o-1)-f,h),i.set(o-1,o-1,X[0]),i.set(o-1,o,X[1])),i.set(o,o-1,0),i.set(o,o,1),g=o-2;g>=0;g--){for(M=0,R=0,b=S;b<=o;b++)M=M+i.get(g,b)*i.get(b,o-1),R=R+i.get(g,b)*i.get(b,o);if(T=i.get(g,g)-f,e[g]<0)x=T,m=M,v=R;else if(S=g,e[g]===0?(X=dy(-M,-R,T,h),i.set(g,o-1,X[0]),i.set(g,o,X[1])):(L=i.get(g,g+1),U=i.get(g+1,g),D=(n[g]-f)*(n[g]-f)+e[g]*e[g]-h*h,O=(n[g]-f)*2*h,D===0&&O===0&&(D=l*u*(Math.abs(T)+Math.abs(h)+Math.abs(L)+Math.abs(U)+Math.abs(x))),X=dy(L*m-x*M+h*R,L*v-x*R-h*M,D,O),i.set(g,o-1,X[0]),i.set(g,o,X[1]),Math.abs(L)>Math.abs(x)+Math.abs(h)?(i.set(g+1,o-1,(-M-T*i.get(g,o-1)+h*i.get(g,o))/L),i.set(g+1,o,(-R-T*i.get(g,o)-h*i.get(g,o-1))/L)):(X=dy(-m-U*i.get(g,o-1),-v-U*i.get(g,o),x,h),i.set(g+1,o-1,X[0]),i.set(g+1,o,X[1]))),N=Math.max(Math.abs(i.get(g,o-1)),Math.abs(i.get(g,o))),l*N*N>1)for(b=g;b<=o;b++)i.set(b,o-1,i.get(b,o-1)/N),i.set(b,o,i.get(b,o)/N)}for(g=0;ga)for(b=g;b=s;b--)for(g=s;g<=a;g++){for(x=0,_=s;_<=Math.min(b,a);_++)x=x+r.get(g,_)*i.get(_,b);r.set(g,b,x)}}}function dy(t,e,n,r){let i,o;return Math.abs(n)>Math.abs(r)?(i=r/n,o=n+i*r,[(t+i*e)/o,(e-i*t)/o]):(i=n/r,o=r+i*n,[(i*t+e)/o,(i*e-t)/o])}class c7{constructor(e){if(e=oo.checkMatrix(e),!e.isSymmetric())throw new Error("Matrix is not symmetric");let n=e,r=n.rows,i=new Ze(r,r),o=!0,s,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;as;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 v=e.clone().sub(c.clone().mmul(m.transpose())),x=a.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),y=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=v,this.yResidual=y,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()))}}Xt.AbstractMatrix=kt;Xt.CHO=c7;Xt.CholeskyDecomposition=c7;Xt.DistanceMatrix=K_;Xt.EVD=l7;Xt.EigenvalueDecomposition=l7;Xt.LU=Z_;Xt.LuDecomposition=Z_;var f7=Xt.Matrix=Ze;Xt.MatrixColumnSelectionView=YSe;Xt.MatrixColumnView=qSe;Xt.MatrixFlipColumnView=KSe;Xt.MatrixFlipRowView=ZSe;Xt.MatrixRowSelectionView=QSe;Xt.MatrixRowView=JSe;Xt.MatrixSelectionView=$y;Xt.MatrixSubView=eMe;var pMe=Xt.MatrixTransposeView=tMe;Xt.NIPALS=u7;Xt.Nipals=u7;Xt.QR=gP;Xt.QrDecomposition=gP;Xt.SVD=oh;Xt.SingularValueDecomposition=oh;Xt.SymmetricMatrix=Kc;Xt.WrapperMatrix1D=s7;Xt.WrapperMatrix2D=oo;Xt.correlation=cMe;Xt.covariance=lMe;var e5=Xt.default=Ze;Xt.determinant=Wy;Xt.inverse=rMe;Xt.linearDependencies=sMe;Xt.pseudoInverse=aMe;var mMe=Xt.solve=a7;Xt.wrap=nMe;const t5=f7,n5=pMe;e5.Matrix&&e5.Matrix;const gMe=mMe;function d7(t,e){if(!Vs(t)||!Vs(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 vP{constructor(){if(new.target===vP)throw new Error("BaseRegression must be subclassed")}predict(e){if(typeof e=="number")return this._predict(e);if(Vs(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){d7(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}`)),s=a+s;return s.startsWith("+")&&(s=s.slice(1)),`f(x) = ${s}`}static load(e){if(e.name!=="polynomialRegression")throw new TypeError("not a polynomial regression model");return new Fx(!0,e)}}function vMe(t,e,n,r={}){const i=t.length;let{interceptAtZero:o=!1}=r,s=[];if(Array.isArray(n))s=n,o=!1;else if(typeof n=="number")if(o){s=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(o<1||!Number.isInteger(o))throw new RangeError("Polynomial should be a positive integer");o>=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 s=Math.floor(r/2),a=t.length,l=new Float64Array(a),c=bMe(r,o,i);let u=0,f=!0;Vs(e)?f=!1:u=e**i;for(let m=0;m=0&&s0?i=(4*n-2)/(n*(2*e-n+1))*(t*Wp(t,e,n-1,r)+r*Wp(t,e,n-1,r-1))-(n-1)*(2*e+n)/(n*(2*e-n+1))*Wp(t,e,n-2,r):n===0&&r===0?i=1:i=0,i}function r5(t,e){let n=1;if(t>=e)for(let r=t-e+1;r<=t;r++)n*=r;return n}function xMe(t,e,n,r,i){let o=0;for(let s=0;s<=r;s++)o+=(2*s+1)*(r5(2*n,s)/r5(2*n+s+1,s+1))*Wp(t,n,s,0)*Wp(e,n,s,i);return o}function bMe(t,e,n){const r=new Array(t),i=Math.floor(t/2);for(let o=-i;o<=i;o++){r[o+i]=new Float64Array(t);for(let s=-i;s<=i;s++)r[o+i][s+i]=xMe(s,o,i,e,n)}return r}function hy(t,e){let n=1/0,r=0;for(let i=0;ie&&(e=t[r],n=r);return n}function wMe(t,e){const n=yMe(e,t,{windowSize:9,derivative:1,polynomial:3}),r=_Me(n),i=t[r];let o=5;r<20&&(o=2);const s=o*Math.round((t[1]-i)/o),a=.5*s,l=hy(t,s+i),c=hy(t,a+i),u=e.slice(l,c),f=t.slice(l,c),h=new Fx(f,u,1),m=e.map((N,T)=>N-h.predict(t[T])),v=5*Math.round((t[t.length-1]-i)/5),x=5*Math.round(v/15),y=2,g=hy(t,x+i),b=hy(t,v+i),_=new Fx(t.slice(g,b),m.slice(g,b),y),S=_.predict(i);for(let N=r;NN/S),[m.length])}function FE(t,e,n,r,i){const o=t[e],s=t.energy,a=n?wMe(s,o):j6(o,[o.length]);return{x:s,y:a,label:r+":"+e,color:i}}function i5(t,e,n,r,i,o){const s=!e&&!n&&!r,a=[];return s||t==null||(r&&t.murefer&&a.push(FE(t,"murefer",i,t.id,o[2])),n&&t.mufluor&&a.push(FE(t,"mufluor",i,t.id,o[1])),e&&t.mutrans&&a.push(FE(t,"mutrans",i,t.id,o[0]))),a}function SMe(t,e){return C.jsx(W_e,{abscissas:t.x,ordinates:t.y.data,curveType:e,color:t.color},t.label)}function MMe(t){var M,R,D,O;const[e,n]=A.useState({showTrans:!1,showFluor:!1,showRefer:!1});A.useEffect(()=>{var B,X,H;n({showTrans:((B=t.xasData)==null?void 0:B.mutrans)!=null,showFluor:((X=t.xasData)==null?void 0:X.mufluor)!=null,showRefer:((H=t.xasData)==null?void 0:H.murefer)!=null})},[t.xasData]);const r=Object.values($p),[i,o]=A.useState(!0),[s,a]=A.useState(!0),[l,c]=A.useState(r[0]),u=mu(),{showTrans:f,showFluor:h,showRefer:m}=e,v=[((M=t.xasData)==null?void 0:M.mutrans)!=null,((R=t.xasData)==null?void 0:R.mufluor)!=null,((D=t.xasData)==null?void 0:D.murefer)!=null],x=(B,X)=>C.jsxs("p",{children:[B.toPrecision(8),", ",X.toPrecision(8)]}),y=i5(t.xasData,f,h,m,s,[WS(u.palette.primary.dark,.3),WS(u.palette.success.light,.3),WS(u.palette.secondary.dark,.3)]),b=t.comparisonFiles.filter(B=>{var X;return B.id!=((X=t.xasData)==null?void 0:X.id)}).map((B,X)=>i5(B,f,h,m,s,[HS(u.palette.primary.dark,X*.3),HS(u.palette.success.light,X*.3),HS(u.palette.secondary.dark,X*.3)])).flat();y.push(...b);const _=UO(y.map(B=>FO(B.y))),P={visDomain:UO(y.map(B=>FO(B.x)))??[0,1],showGrid:!0,isIndexAxis:!1,label:"Energy (eV)"},N={visDomain:_??[0,1],showGrid:!0,isIndexAxis:!1,label:s?"mu(E) (norm)":"mu(E)"},T=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},U={"--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 C.jsxs(gu,{sx:{height:"100%",display:"flex",flexDirection:"column",backgroundColor:B=>B.palette.background.default,fontFamily:B=>B.typography.fontFamily},children:[C.jsx(Bs,{style:L,children:C.jsxs(Dwe,{children:[C.jsx(Ec,{label:"Normalize",value:s,onToggle:()=>{a(!s)}}),C.jsx(Yc,{}),C.jsx(Ec,{label:"Transmission",value:f,onToggle:()=>{n({...e,showTrans:!f})},disabled:!v[0]}),C.jsx(Ec,{label:"Fluorescence",value:h,onToggle:()=>{n({...e,showFluor:!h})},disabled:!v[1]}),C.jsx(Ec,{label:"Reference",value:m,onToggle:()=>{n({...e,showRefer:!m})},disabled:!v[2]}),C.jsx(Yc,{}),C.jsx(rSe,{label:"Line Style",onChange:B=>{c(B)},options:r,value:l,renderOption:B=>C.jsx("div",{children:C.jsx("span",{children:String(B)})})}),C.jsx(Yc,{}),C.jsx(Ec,{label:"Grid",icon:gSe,value:i,onToggle:()=>o(!i)})]})}),C.jsx(Bs,{style:U,flex:1,display:"flex",children:C.jsxs(A_e,{title:((O=t.xasData)==null?void 0:O.id)??" ",abscissaConfig:P,ordinateConfig:N,children:[y.map(B=>SMe(B,l)),C.jsx(c_e,{renderTooltip:x}),C.jsx(Gbe,{}),C.jsx(i_e,{}),C.jsx(Q9,{children:C.jsx("div",{style:{color:u.palette.text.primary,position:"absolute",maxWidth:"35%",minWidth:"15em",padding:"0 1rem",bottom:"2.5rem",right:"0px",background:T},children:y.reverse().map(B=>C.jsxs("div",{children:[C.jsx("span",{style:{color:B.color},children:" ■"}),C.jsx("span",{children:" "+B.label})]},B.label))})})]})})]})}function yP(){const t=A.useContext(lg);let e=null,n=[];if(t.xdiFile!=null){const r=t.xdiFile,i=r.energy(),o=r.muTrans(),s=r.muFluor(),a=r.muRefer();e={id:r.id,energy:i,mutrans:o,mufluor:s,murefer:a},n=t.comparisonFiles.map(l=>({id:l.id,energy:l.energy(),mutrans:l.muTrans(),mufluor:l.muFluor(),murefer:l.muRefer()}))}return C.jsx(MMe,{xasData:e,comparisonFiles:n})}function EMe(){const[t,e]=A.useState(null),[n,r]=A.useState([]),i=A.useContext(OR);function o(){return a=>{Dn.get("/webxdiviewer/xdidata/"+a).then(l=>{const c=_d.parseFile(l.data,a);e(c)})}}const s=o();return C.jsx(LR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:n,setComparisonFiles:r},children:C.jsxs(_a,{height:"100%",container:!0,children:[C.jsx(_a,{item:!0,lg:5,md:12,padding:1,children:C.jsx(dne,{standards:i,updatePlot:s})}),C.jsx(_a,{item:!0,height:"100%",lg:7,md:12,padding:1,children:C.jsx(yP,{})})]})})}/** - * @remix-run/router v1.20.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Gm(){return Gm=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function xP(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function TMe(){return Math.random().toString(36).substr(2,8)}function s5(t,e){return{usr:t.state,key:t.key,idx:e}}function KC(t,e,n,r){return n===void 0&&(n=null),Gm({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Cu(e):e,{state:n,key:e&&e.key||r||TMe()})}function zx(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 RMe(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=vl.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(Gm({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function f(){a=vl.Pop;let y=u(),g=y==null?null:y-c;c=y,l&&l({action:a,location:x.location,delta:g})}function h(y,g){a=vl.Push;let b=KC(x.location,y,g);n&&n(b,y),c=u()+1;let _=s5(b,c),S=x.createHref(b);try{s.pushState(_,"",S)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(S)}o&&l&&l({action:a,location:x.location,delta:1})}function m(y,g){a=vl.Replace;let b=KC(x.location,y,g);n&&n(b,y),c=u();let _=s5(b,c),S=x.createHref(b);s.replaceState(_,"",S),o&&l&&l({action:a,location:x.location,delta:0})}function v(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:zx(y);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,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(o5,f),l=y,()=>{i.removeEventListener(o5,f),l=null}},createHref(y){return e(i,y)},createURL:v,encodeLocation(y){let g=v(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(y){return s.go(y)}};return x}var a5;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(a5||(a5={}));function AMe(t,e,n){return n===void 0&&(n="/"),PMe(t,e,n,!1)}function PMe(t,e,n,r){let i=typeof e=="string"?Cu(e):e,o=Od(i.pathname||"/",n);if(o==null)return null;let s=h7(t);NMe(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};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=Rl([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(Wn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),h7(o.children,e,u,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:zMe(c,o.index),routesMeta:u})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of p7(o.path))i(o,s,l)}),e}function p7(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=p7(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function NMe(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:UMe(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const IMe=/^:[\w-]+$/,LMe=3,kMe=2,OMe=1,DMe=10,FMe=-2,l5=t=>t==="*";function zMe(t,e){let n=t.split("/"),r=n.length;return n.some(l5)&&(r+=FMe),e&&(r+=kMe),n.filter(i=>!l5(i)).reduce((i,o)=>i+(IMe.test(o)?LMe:o===""?OMe:DMe),r)}function UMe(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 BMe(t,e,n){let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a{let{paramName:h,isOptional:m}=u;if(h==="*"){let x=a[f]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=a[f];return m&&!v?c[h]=void 0:c[h]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function jMe(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),xP(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,(s,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 VMe(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return xP(!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 Od(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 $Me(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:WMe(n,e):e,search:XMe(r),hash:qMe(i)}}function WMe(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 zE(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 HMe(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function m7(t,e){let n=HMe(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function g7(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Cu(t):(i=Gm({},t),Wn(!i.pathname||!i.pathname.includes("?"),zE("?","pathname","search",i)),Wn(!i.pathname||!i.pathname.includes("#"),zE("#","pathname","hash",i)),Wn(!i.search||!i.search.includes("#"),zE("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=$Me(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Rl=t=>t.join("/").replace(/\/\/+/g,"/"),GMe=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),XMe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,qMe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function YMe(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const v7=["post","put","patch","delete"];new Set(v7);const KMe=["get",...v7];new Set(KMe);/** - * React Router v6.27.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Xm(){return Xm=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),A.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=g7(c,JSON.parse(s),o,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Rl([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,s,o,t])}function ew(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=A.useContext(Gl),{matches:i}=A.useContext(Tu),{pathname:o}=sh(),s=JSON.stringify(m7(i,r.v7_relativeSplatPath));return A.useMemo(()=>g7(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function eEe(t,e){return tEe(t,e)}function tEe(t,e,n,r){Lg()||Wn(!1);let{navigator:i}=A.useContext(Gl),{matches:o}=A.useContext(Tu),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=sh(),u;if(e){var f;let y=typeof e=="string"?Cu(e):e;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||Wn(!1),u=y}else u=c;let h=u.pathname||"/",m=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=AMe(t,{pathname:m}),x=sEe(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Rl([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Rl([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return e&&x?A.createElement(Q_.Provider,{value:{location:Xm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:vl.Pop}},x):x}function nEe(){let t=uEe(),e=YMe(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 A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},e),n?A.createElement("pre",{style:i},n):null,null)}const rEe=A.createElement(nEe,null);class iEe extends A.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?A.createElement(Tu.Provider,{value:this.props.routeContext},A.createElement(x7.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function oEe(t){let{routeContext:e,match:n,children:r}=t,i=A.useContext(J_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),A.createElement(Tu.Provider,{value:e},r)}function sEe(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Wn(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,f,h)=>{let m,v=!1,x=null,y=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||rEe,l&&(c<0&&h===0?(v=!0,y=null):c===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let g=e.concat(s.slice(0,h+1)),b=()=>{let _;return m?_=x:v?_=y:f.route.Component?_=A.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=u,A.createElement(oEe,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?A.createElement(iEe,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var _7=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(_7||{}),Bx=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}(Bx||{});function aEe(t){let e=A.useContext(J_);return e||Wn(!1),e}function lEe(t){let e=A.useContext(y7);return e||Wn(!1),e}function cEe(t){let e=A.useContext(Tu);return e||Wn(!1),e}function w7(t){let e=cEe(),n=e.matches[e.matches.length-1];return n.route.id||Wn(!1),n.route.id}function uEe(){var t;let e=A.useContext(x7),n=lEe(Bx.UseRouteError),r=w7(Bx.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function fEe(){let{router:t}=aEe(_7.UseNavigateStable),e=w7(Bx.UseNavigateStable),n=A.useRef(!1);return b7(()=>{n.current=!0}),A.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Xm({fromRouteId:e},o)))},[t,e])}function gp(t){Wn(!1)}function dEe(t){let{basename:e="/",children:n=null,location:r,navigationType:i=vl.Pop,navigator:o,static:s=!1,future:a}=t;Lg()&&Wn(!1);let l=e.replace(/^\/*/,"/"),c=A.useMemo(()=>({basename:l,navigator:o,static:s,future:Xm({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Cu(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:v="default"}=r,x=A.useMemo(()=>{let y=Od(u,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:m,key:v},navigationType:i}},[l,u,f,h,m,v,i]);return x==null?null:A.createElement(Gl.Provider,{value:c},A.createElement(Q_.Provider,{children:n,value:x}))}function hEe(t){let{children:e,location:n}=t;return eEe(ZC(e),n)}new Promise(()=>{});function ZC(t,e){e===void 0&&(e=[]);let n=[];return A.Children.forEach(t,(r,i)=>{if(!A.isValidElement(r))return;let o=[...e,i];if(r.type===A.Fragment){n.push.apply(n,ZC(r.props.children,o));return}r.type!==gp&&Wn(!1),!r.props.index||!r.props.children||Wn(!1);let s={id:r.props.id||o.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&&(s.children=ZC(r.props.children,o)),n.push(s)}),n}/** - * React Router DOM v6.27.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function jx(){return jx=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function pEe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function mEe(t,e){return t.button===0&&(!e||e==="_self")&&!pEe(t)}const gEe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],vEe=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],yEe="6";try{window.__reactRouterVersion=yEe}catch{}const xEe=A.createContext({isTransitioning:!1}),bEe="startTransition",c5=Hp[bEe];function _Ee(t){let{basename:e,children:n,future:r,window:i}=t,o=A.useRef();o.current==null&&(o.current=CMe({window:i,v5Compat:!0}));let s=o.current,[a,l]=A.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=A.useCallback(f=>{c&&c5?c5(()=>l(f)):l(f)},[l,c]);return A.useLayoutEffect(()=>s.listen(u),[s,u]),A.createElement(dEe,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const wEe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",SEe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hy=A.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,h=S7(e,gEe),{basename:m}=A.useContext(Gl),v,x=!1;if(typeof c=="string"&&SEe.test(c)&&(v=c,wEe))try{let _=new URL(window.location.href),S=c.startsWith("//")?new URL(_.protocol+c):new URL(c),P=Od(S.pathname,m);S.origin===_.origin&&P!=null?c=P+S.search+S.hash:x=!0}catch{}let y=ZMe(c,{relative:i}),g=CEe(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f});function b(_){r&&r(_),_.defaultPrevented||g(_)}return A.createElement("a",jx({},h,{href:v||y,onClick:x||o?r:b,ref:n,target:l}))}),MEe=A.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,viewTransition:c,children:u}=e,f=S7(e,vEe),h=ew(l,{relative:f.relative}),m=sh(),v=A.useContext(y7),{navigator:x,basename:y}=A.useContext(Gl),g=v!=null&&TEe(h)&&c===!0,b=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(_=_.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&y&&(S=Od(S,y)||S);const P=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let N=_===b||!s&&_.startsWith(b)&&_.charAt(P)==="/",T=S!=null&&(S===b||!s&&S.startsWith(b)&&S.charAt(b.length)==="/"),L={isActive:N,isPending:T,isTransitioning:g},U=N?r:void 0,M;typeof o=="function"?M=o(L):M=[o,N?"active":null,T?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let R=typeof a=="function"?a(L):a;return A.createElement(Hy,jx({},f,{"aria-current":U,className:M,ref:n,style:R,to:l,viewTransition:c}),typeof u=="function"?u(L):u)});var JC;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(JC||(JC={}));var u5;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(u5||(u5={}));function EEe(t){let e=A.useContext(J_);return e||Wn(!1),e}function CEe(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:a}=e===void 0?{}:e,l=JMe(),c=sh(),u=ew(t,{relative:s});return A.useCallback(f=>{if(mEe(f,n)){f.preventDefault();let h=r!==void 0?r:zx(c)===zx(u);l(t,{replace:h,state:i,preventScrollReset:o,relative:s,viewTransition:a})}},[c,l,u,r,i,n,t,o,s,a])}function TEe(t,e){e===void 0&&(e={});let n=A.useContext(xEe);n==null&&Wn(!1);let{basename:r}=EEe(JC.useViewTransitionState),i=ew(t,{relative:e.relative});if(!n.isTransitioning)return!1;let o=Od(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Od(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ux(i.pathname,s)!=null||Ux(i.pathname,o)!=null}const REe="jacobfilik/XASDataLibrary";function AEe(){const t=REe;return C.jsxs(jZ,{maxWidth:"md",sx:{alignSelf:"center",p:"24px"},children:[C.jsx(sr,{variant:"h4",padding:"24px",children:"Welcome to the XAS Data Viewer!"}),C.jsxs(Bs,{children:[C.jsxs(sr,{paragraph:!0,children:["A prototype viewer for"," ",C.jsx(Hy,{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"," ",C.jsx(Hy,{to:"https://github.com/"+t,children:t}),"."]}),C.jsxs(sr,{paragraph:!0,children:["The database is open to ",C.jsx(Hy,{to:"view",children:" search and download "}),"."]})]})]})}function PEe(){return C.jsx(_1,{fontSize:"large",children:C.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:C.jsxs("g",{children:[C.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"}),C.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 NEe(t){const e={Home:"/",Explore:"/view",Viewer:"/xdiviewer"};return C.jsx(AK,{style:{position:"static"},children:C.jsxs(ute,{sx:{justifyContent:"space-between",alignItems:"center"},children:[C.jsxs(rs,{direction:"row",alignItems:"center",spacing:2,children:[C.jsx(Bs,{children:C.jsx(PEe,{})}),C.jsx(sr,{variant:"h4",component:"div",sx:{flexGrow:1},children:"XAS Data Viewer"}),C.jsx(m6,{component:rs,direction:"row",children:Object.entries(e).map(([n,r])=>C.jsx(PQ,{children:C.jsx(xQ,{component:MEe,to:r,sx:{"&.active":{color:i=>i.palette.text.secondary}},children:C.jsx(OQ,{primary:n})})},n))})]}),C.jsx(rs,{direction:"row",alignItems:"center",children:C.jsx(BZ,{icon:C.jsx(mSe,{}),checkedIcon:C.jsx(pSe,{}),checked:t.colorMode==="dark",onChange:t.toggleColorMode})})]})})}const IEe=qe("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 LEe(t){const[e,n]=A.useState(""),[r,i]=A.useState("No file"),o=A.useContext(lg),s=l=>{l.preventDefault(),Dn.get(e).then(c=>{const u=_d.parseFile(c.data,e);o.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=_d.parseFile(u.target.result,"localfile"),o.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 C.jsx(gu,{elevation:3,variant:"outlined",square:!1,sx:{p:2},children:C.jsxs(rs,{spacing:2,sx:{justifyContent:"flex-start",alignItems:"flex-start"},children:[C.jsx(sr,{variant:"h5",children:"Upload XDI File"}),C.jsxs(rs,{direction:"row",component:"form",onSubmit:s,spacing:1,children:[C.jsx(Vte,{margin:"dense",sx:{width:"75%"},id:"xdi-url",label:"XDI file URL",variant:"outlined",value:e,onChange:l=>{n(l.target.value)}}),C.jsx(ou,{variant:"contained",type:"submit",children:"Fetch"})]}),C.jsxs(ou,{variant:"contained",role:void 0,tabIndex:-1,component:"label",children:["Upload Local File",C.jsx(IEe,{type:"file",name:"file1",onChange:a})]}),C.jsx(sr,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:r})]})})}function kEe(){const[t,e]=A.useState(null);return C.jsxs(rs,{spacing:2,children:[C.jsx(LEe,{setXASMetadata:e}),t&&C.jsx(kR,{standard:t,showDownload:!1,showCompare:!1})]})}function OEe(){const[t,e]=A.useState(null);return C.jsx(LR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:[],setComparisonFiles:()=>{}},children:C.jsxs(_a,{height:"100%",container:!0,children:[C.jsx(_a,{item:!0,lg:5,md:12,padding:1,children:C.jsx(kEe,{})}),C.jsx(_a,{item:!0,height:"100%",lg:7,md:12,padding:1,children:C.jsx(yP,{})})]})})}function DEe(){const e=sh().pathname.slice(5),[n,r]=A.useState(null),o=A.useContext(OR).find(s=>s.location===e);return A.useEffect(()=>{Dn.get("/webxdiviewer/xdidata/"+e).then(s=>{let a=null;try{a=_d.parseFile(s.data,e)}catch{console.log("Could not read {}",focus)}r(a)})},[e]),C.jsx(LR,{value:{xdiFile:n,setXDIFile:r,comparisonFiles:[],setComparisonFiles:()=>{}},children:C.jsxs(_a,{height:"100%",container:!0,children:[C.jsx(_a,{item:!0,lg:5,md:12,padding:1,children:o?C.jsx(kR,{standard:o,showDownload:!0,showCompare:!1}):C.jsxs(sr,{children:[" Could not find ",e," "]})}),C.jsx(_a,{item:!0,height:"100%",lg:7,md:12,padding:1,children:C.jsx(yP,{})})]})})}function FEe(){const t=Oz("(prefers-color-scheme: dark)"),[e,n]=A.useState(t?"dark":"light"),r=A.useMemo(()=>({toggleColorMode:()=>{n(o=>o==="light"?"dark":"light")}}),[]),i=A.useMemo(()=>bR({palette:{mode:e}}),[e]);return C.jsxs($Y,{theme:i,children:[C.jsx(HZ,{}),C.jsxs(rs,{height:"100vh",width:"100vw",spacing:1,children:[C.jsx(NEe,{colorMode:e,toggleColorMode:r.toggleColorMode}),C.jsx(gne,{children:C.jsxs(hEe,{children:[C.jsx(gp,{path:"/",element:C.jsx(AEe,{})}),C.jsx(gp,{path:"/view",element:C.jsx(EMe,{})}),C.jsx(gp,{path:"/xdiviewer",element:C.jsx(OEe,{})}),C.jsx(gp,{path:"/xdi/:id/*",element:C.jsx(DEe,{})})]})})]})]})}XT(document.getElementById("root")).render(C.jsx(A.StrictMode,{children:C.jsx(_Ee,{children:C.jsx(FEe,{})})})); +}`}function RMe(t,e,n,r,i){const{rows:o,columns:s}=t,a=Math.min(o,e),l=Math.min(s,n),c=[];if(i==="auto"){i=!1;e:for(let u=0;u=0&&n?` ${i5(t,e-1)}`:i5(t,e)).padEnd(e)}function i5(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 PMe(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,o));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,o));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 _o(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 Tf(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 Rf(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 mP(t,e){if(!Si.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 gP(t,e){if(!Si.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 ZC(t,e,n,r,i){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(fy("startRow",e),fy("endRow",n),fy("startColumn",r),fy("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 J_(t,e=0){let n=[];for(let r=0;r=o)throw new RangeError("min must be smaller than max");let a=o-i,l=new Ze(e,n);for(let c=0;cr?(o=!0,r=n):(i=!1,o=!0);e++}return i}isReducedEchelonForm(){let e=0,n=0,r=-1,i=!0,o=!1;for(;er?(o=!0,r=n):(i=!1,o=!0);for(let s=n+1;se.get(i,r)&&(i=o);if(e.get(i,r)===0)r++;else{e.swapRows(n,i);let o=e.get(n,r);for(let s=r;s=0;)if(e.maxRow(i)===0)i--;else{let o=0,s=!1;for(;on[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(){_f(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){bo(this,e),_f(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(bo(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){_o(this,e),_f(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(_o(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=Ze.checkMatrix(e);let n=new Ze(2,2);const r=this.get(0,0),i=e.get(0,0),o=this.get(0,1),s=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*(s-u),v=c*(l-i),x=(r+o)*u,y=(a-r)*(i+s),g=(o-c)*(l+u),b=f+v-x+g,_=m+x,S=h+v,P=f-h+m+y;return n.set(0,0,b),n.set(0,1,_),n.set(1,0,S),n.set(1,1,P),n}strassen3x3(e){e=Ze.checkMatrix(e);let n=new Ze(3,3);const r=this.get(0,0),i=this.get(0,1),o=this.get(0,2),s=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),v=e.get(0,2),x=e.get(1,0),y=e.get(1,1),g=e.get(1,2),b=e.get(2,0),_=e.get(2,1),S=e.get(2,2),P=(r+i+o-s-a-u-f)*y,N=(r-s)*(-m+y),T=a*(-h+m+x-y-g-b+S),L=(-r+s+a)*(h-m+y),U=(s+a)*(-h+m),M=r*h,R=(-r+c+u)*(h-v+g),D=(-r+c)*(v-g),O=(c+u)*(-h+v),B=(r+i+o-a-l-c-u)*g,X=u*(-h+v+x-y-g-b+_),H=(-o+u+f)*(y+b-_),Z=(o-f)*(y-_),F=o*b,Y=(u+f)*(-b+_),K=(-o+a+l)*(g+b-S),ee=(o-l)*(g-S),me=(a+l)*(-b+S),le=i*x,Q=l*_,ae=s*v,ge=c*m,Me=f*S,tt=M+F+le,He=P+L+U+M+H+F+Y,rt=M+R+O+B+F+K+me,Ve=N+T+L+M+F+K+ee,se=N+L+U+M+Q,j=F+K+ee+me+ae,ye=M+R+D+X+H+Z+F,xe=H+Z+F+Y+ge,Re=M+R+D+O+Me;return n.set(0,0,tt),n.set(0,1,He),n.set(0,2,rt),n.set(1,0,Ve),n.set(1,1,se),n.set(1,2,j),n.set(2,0,ye),n.set(2,1,xe),n.set(2,2,Re),n}mmulStrassen(e){e=Ze.checkMatrix(e);let n=this.clone(),r=n.rows,i=n.columns,o=e.rows,s=e.columns;i!==o&&console.warn(`Multiplying ${r} x ${i} and ${o} x ${s} matrix: dimensions do not match.`);function a(f,h,m){let v=f.rows,x=f.columns;if(v===h&&x===m)return f;{let y=kt.zeros(h,m);return y=y.setSubMatrix(f,0,0),y}}let l=Math.max(r,o),c=Math.max(i,s);n=a(n,l,c),e=a(e,l,c);function u(f,h,m,v){if(m<=512||v<=512)return f.mmul(h);m%2===1&&v%2===1?(f=a(f,m+1,v+1),h=a(h,m+1,v+1)):m%2===1?(f=a(f,m+1,v),h=a(h,m+1,v)):v%2===1&&(f=a(f,m,v+1),h=a(h,m,v+1));let x=parseInt(f.rows/2,10),y=parseInt(f.columns/2,10),g=f.subMatrix(0,x-1,0,y-1),b=h.subMatrix(0,x-1,0,y-1),_=f.subMatrix(0,x-1,y,f.columns-1),S=h.subMatrix(0,x-1,y,h.columns-1),P=f.subMatrix(x,f.rows-1,0,y-1),N=h.subMatrix(x,h.rows-1,0,y-1),T=f.subMatrix(x,f.rows-1,y,f.columns-1),L=h.subMatrix(x,h.rows-1,y,h.columns-1),U=u(kt.add(g,T),kt.add(b,L),x,y),M=u(kt.add(P,T),b,x,y),R=u(g,kt.sub(S,L),x,y),D=u(T,kt.sub(N,b),x,y),O=u(kt.add(g,_),L,x,y),B=u(kt.sub(P,g),kt.add(b,S),x,y),X=u(kt.sub(_,T),kt.add(N,L),x,y),H=kt.add(U,D);H.sub(O),H.add(X);let Z=kt.add(R,O),F=kt.add(M,D),Y=kt.sub(U,M);Y.add(R),Y.add(B);let K=kt.zeros(2*H.rows,2*H.columns);return K=K.setSubMatrix(H,0,0),K=K.setSubMatrix(Z,H.rows,0),K=K.setSubMatrix(F,0,H.columns),K=K.setSubMatrix(Y,H.rows,H.columns),K.subMatrix(0,m-1,0,v-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 Ze(this.rows,this.columns);for(let o=0;o0&&r5(s,{min:n,max:r,output:s}),i.setRow(o,s)}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 Ze(this.rows,this.columns);for(let o=0;or||n<0||n>=this.columns||r<0||r>=this.columns)throw new RangeError("Argument out of range");let i=new Ze(e.length,r-n+1);for(let o=0;o=this.rows)throw new RangeError(`Row index out of range: ${e[o]}`);i.set(o,s-n,this.get(e[o],s))}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 Ze(r-n+1,e.length);for(let o=0;o=this.columns)throw new RangeError(`Column index out of range: ${e[o]}`);i.set(s-n,o,this.get(s,e[o]))}return i}setSubMatrix(e,n,r){if(e=Ze.checkMatrix(e),e.isEmpty())return this;let i=n+e.rows-1,o=r+e.columns-1;ZC(this,n,i,r,o);for(let s=0;stypeof e=="number")}kt.random=kt.rand;kt.randomInt=kt.randInt;kt.diagonal=kt.diag;kt.prototype.diagonal=kt.prototype.diag;kt.identity=kt.eye;kt.prototype.negate=kt.prototype.neg;kt.prototype.tensorProduct=kt.prototype.kroneckerProduct;var qm,JC,Zc;let Ze=(Zc=class extends kt{constructor(n,r){super();uS(this,qm);Vt(this,"data");if(Zc.isMatrix(n))fS(this,qm,JC).call(this,n.rows,n.columns),Zc.copy(n,this);else if(Number.isInteger(n)&&n>=0)fS(this,qm,JC).call(this,n,r);else if(Si.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 o=0;o"u"&&(r=n,n=this.columns),_o(this,n,!0),r=Rf(this,r);for(let i=0;i=0)for(let i=0;i=0)L0(this,Hr,new Ze(n,n));else if(L0(this,Hr,new Ze(n)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return Vo(this,Hr).size}get rows(){return Vo(this,Hr).rows}get columns(){return Vo(this,Hr).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(n){return Ze.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 Vx(this.diagonalSize);for(const[r,i,o]of this.upperRightEntries())n.set(r,i,o);return n}toMatrix(){return new Ze(this)}get(n,r){return Vo(this,Hr).get(n,r)}set(n,r,i){return Vo(this,Hr).set(n,r,i),Vo(this,Hr).set(r,n,i),this}removeCross(n){return Vo(this,Hr).removeRow(n),Vo(this,Hr).removeColumn(n),this}addCross(n,r){r===void 0&&(r=n,n=this.diagonalSize);const i=r.slice();return i.splice(n,1),Vo(this,Hr).addRow(n,i),Vo(this,Hr).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,o]of n.entries())o||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,o=0,s=0;s=n&&(i=++o);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 o=new Vx(i);for(let s=0,a=0,l=0;l=i&&(s=++a);return o}*upperRightEntries(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}}*upperRightValues(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}};Hr=new WeakMap;let Kc=Vx;Kc.prototype.klassType="SymmetricMatrix";class Q_ extends Kc{static isDistanceMatrix(e){return Kc.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 Kc(this)}clone(){const e=new Q_(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,o=0,s=0;s=e&&(i=++o+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 o=1,s=0,a=0;a=r&&(o=++s+1);return i}}Q_.prototype.klassSubType="DistanceMatrix";class za extends kt{constructor(e,n,r){super(),this.matrix=e,this.rows=n,this.columns=r}}class KMe extends za{constructor(e,n){_o(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 ZMe extends za{constructor(e,n){gP(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 JMe extends za{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 QMe extends za{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 eEe extends za{constructor(e,n){bo(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 tEe extends za{constructor(e,n){mP(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 Wy extends za{constructor(e,n,r){mP(e,n),gP(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 nEe extends za{constructor(e,n,r,i,o){ZC(e,n,r,i,o),super(e,r-n+1,o-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 rEe=class extends za{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 y7 extends kt{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 oo extends kt{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 iEe(t,e){if(Si.isAnyArray(t))return t[0]&&Si.isAnyArray(t[0])?new oo(t):new y7(t,e);throw new Error("the argument is not an array")}class ew{constructor(e){e=oo.checkMatrix(e);let n=e.clone(),r=n.rows,i=n.columns,o=new Float64Array(r),s=1,a,l,c,u,f,h,m,v,x;for(a=0;aMath.abs(v[u])&&(u=a);if(u!==l){for(c=0;c=0;c--){for(l=0;ls?i.set(o,s,e.get(o,s)):o===s?i.set(o,s,1):i.set(o,s,0);return i}get upperTriangularMatrix(){let e=this.LU,n=e.rows,r=e.columns,i=new Ze(n,r);for(let o=0;oMath.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 vP{constructor(e){e=oo.checkMatrix(e);let n=e.clone(),r=e.rows,i=e.columns,o=new Float64Array(i),s,a,l,c;for(l=0;l=0;c--){for(l=0;l=0;a--){for(o=0;o=0;M--)if(v[M]!==0){for(let R=M+1;R=0;M--){if(M0;){let M,R;for(M=T-2;M>=-1&&M!==-1;M--){const D=Number.MIN_VALUE+U*Math.abs(v[M]+Math.abs(v[M+1]));if(Math.abs(g[M])<=D||Number.isNaN(g[M])){g[M]=0;break}}if(M===T-2)R=4;else{let D;for(D=T-1;D>=M&&D!==M;D--){let O=(D!==T?Math.abs(g[D]):0)+(D!==M+1?Math.abs(g[D-1]):0);if(Math.abs(v[D])<=U*O){v[D]=0;break}}D===M?R=3:D===T-1?R=1:(R=2,M=D)}switch(M++,R){case 1:{let D=g[T-2];g[T-2]=0;for(let O=T-2;O>=M;O--){let B=fa(v[O],D),X=v[O]/B,H=D/B;if(v[O]=B,O!==M&&(D=-H*g[O-1],g[O-1]=X*g[O-1]),c)for(let Z=0;Z=v[M+1]);){let D=v[M];if(v[M]=v[M+1],v[M+1]=D,c&&Mn&&o.set(u,f,e.get(u,f)/this.s[f]);let s=this.U,a=s.rows,l=s.columns,c=new Ze(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 Ze.diag(this.s)}}function oEe(t,e=!1){return t=oo.checkMatrix(t),e?new sh(t).inverse():x7(t,Ze.eye(t.rows))}function x7(t,e,n=!1){return t=oo.checkMatrix(t),e=oo.checkMatrix(e),n?new sh(t).solve(e):t.isSquare()?new ew(t).solve(e):new vP(t).solve(e)}function Hy(t){if(t=Ze.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 o,s,a;return o=new Wy(t,[1,2],[1,2]),s=new Wy(t,[1,2],[0,2]),a=new Wy(t,[1,2],[0,1]),e=t.get(0,0),n=t.get(0,1),r=t.get(0,2),e*Hy(o)-n*Hy(s)+r*Hy(a)}else return new ew(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 o=e.addRow(n,[0]);for(let s=0;se?o[s]=1/o[s]:o[s]=0;return i.mmul(Ze.diag(o).mmul(r.transpose()))}function uEe(t,e=t,n={}){t=new Ze(t);let r=!1;if(typeof e=="object"&&!Ze.isMatrix(e)&&!Si.isAnyArray(e)?(n=e,e=t,r=!0):e=new Ze(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 o=t.transpose().mmul(e);for(let s=0;s0?i.set(o,o+1,n[o]):n[o]<0&&i.set(o,o-1,n[o])}return i}}function dEe(t,e,n,r){let i,o,s,a,l,c,u,f;for(l=0;l0;a--){for(f=0,s=0,c=0;c0&&(o=-o),e[a]=f*o,s=s-i*o,n[a-1]=i-o,l=0;lc)do{for(i=n[c],f=(n[c+1]-i)/(2*e[c]),h=fa(f,1),f<0&&(h=-h),n[c]=e[c]/(f+h),n[c+1]=e[c]*(f+h),m=n[c+1],o=i-n[c],s=c+2;s=c;s--)for(y=x,x=v,_=b,i=v*e[s],o=v*f,h=fa(f,e[s]),e[s+1]=b*h,b=e[s]/h,v=f/h,f=v*n[s]-b*i,n[s+1]=o+b*(v*i+b*n[s]),l=0;lN*P);n[c]=n[c]+S,e[c]=0}for(s=0;s=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--)s+=n[c]*e.get(c,u);for(s=s/l,c=f;c<=o;c++)e.set(c,u,e.get(c,u)-s*n[c])}for(c=0;c<=o;c++){for(s=0,u=o;u>=f;u--)s+=n[u]*e.get(c,u);for(s=s/l,u=f;u<=o;u++)e.set(c,u,e.get(c,u)-s*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<=o;c++)n[c]=e.get(c,f-1);for(u=f;u<=o;u++){for(a=0,c=f;c<=o;c++)a+=n[c]*r.get(c,u);for(a=a/n[f]/e.get(f,f-1),c=f;c<=o;c++)r.set(c,u,r.get(c,u)+a*n[c])}}}function mEe(t,e,n,r,i){let o=t-1,s=0,a=t-1,l=Number.EPSILON,c=0,u=0,f=0,h=0,m=0,v=0,x=0,y=0,g,b,_,S,P,N,T,L,U,M,R,D,O,B,X;for(g=0;ga)&&(n[g]=i.get(g,g),e[g]=0),b=Math.max(g-1,0);b=s;){for(S=o;S>s&&(v=Math.abs(i.get(S-1,S-1))+Math.abs(i.get(S,S)),v===0&&(v=u),!(Math.abs(i.get(S,S-1))=0){for(x=f>=0?f+x:f-x,n[o-1]=L+x,n[o]=n[o-1],x!==0&&(n[o]=L-T/x),e[o-1]=0,e[o]=0,L=i.get(o,o-1),v=Math.abs(L)+Math.abs(x),f=L/v,h=x/v,m=Math.sqrt(f*f+h*h),f=f/m,h=h/m,b=o-1;b0)){for(v=Math.sqrt(v),U=S&&(x=i.get(P,P),m=L-x,v=U-x,f=(m*v-T)/i.get(P+1,P)+i.get(P,P+1),h=i.get(P+1,P+1)-x-m-v,m=i.get(P+2,P+1),v=Math.abs(f)+Math.abs(h)+Math.abs(m),f=f/v,h=h/v,m=m/v,!(P===S||Math.abs(i.get(P,P-1))*(Math.abs(h)+Math.abs(m))P+2&&i.set(g,g-3,0);for(_=P;_<=o-1&&(B=_!==o-1,_!==P&&(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(v=Math.sqrt(f*f+h*h+m*m),f<0&&(v=-v),v!==0){for(_!==P?i.set(_,_-1,-v*L):S!==P&&i.set(_,_-1,-i.get(_,_-1)),f=f+v,L=f/v,U=h/v,x=m/v,h=h/f,m=m/f,b=_;b=0;o--)if(f=n[o],h=e[o],h===0)for(S=o,i.set(o,o,1),g=o-1;g>=0;g--){for(T=i.get(g,g)-f,m=0,b=S;b<=o;b++)m=m+i.get(g,b)*i.get(b,o);if(e[g]<0)x=T,v=m;else if(S=g,e[g]===0?i.set(g,o,T!==0?-m/T:-m/(l*u)):(L=i.get(g,g+1),U=i.get(g+1,g),h=(n[g]-f)*(n[g]-f)+e[g]*e[g],N=(L*v-x*m)/h,i.set(g,o,N),i.set(g+1,o,Math.abs(L)>Math.abs(x)?(-m-T*N)/L:(-v-U*N)/x)),N=Math.abs(i.get(g,o)),l*N*N>1)for(b=g;b<=o;b++)i.set(b,o,i.get(b,o)/N)}else if(h<0)for(S=o-1,Math.abs(i.get(o,o-1))>Math.abs(i.get(o-1,o))?(i.set(o-1,o-1,h/i.get(o,o-1)),i.set(o-1,o,-(i.get(o,o)-f)/i.get(o,o-1))):(X=dy(0,-i.get(o-1,o),i.get(o-1,o-1)-f,h),i.set(o-1,o-1,X[0]),i.set(o-1,o,X[1])),i.set(o,o-1,0),i.set(o,o,1),g=o-2;g>=0;g--){for(M=0,R=0,b=S;b<=o;b++)M=M+i.get(g,b)*i.get(b,o-1),R=R+i.get(g,b)*i.get(b,o);if(T=i.get(g,g)-f,e[g]<0)x=T,m=M,v=R;else if(S=g,e[g]===0?(X=dy(-M,-R,T,h),i.set(g,o-1,X[0]),i.set(g,o,X[1])):(L=i.get(g,g+1),U=i.get(g+1,g),D=(n[g]-f)*(n[g]-f)+e[g]*e[g]-h*h,O=(n[g]-f)*2*h,D===0&&O===0&&(D=l*u*(Math.abs(T)+Math.abs(h)+Math.abs(L)+Math.abs(U)+Math.abs(x))),X=dy(L*m-x*M+h*R,L*v-x*R-h*M,D,O),i.set(g,o-1,X[0]),i.set(g,o,X[1]),Math.abs(L)>Math.abs(x)+Math.abs(h)?(i.set(g+1,o-1,(-M-T*i.get(g,o-1)+h*i.get(g,o))/L),i.set(g+1,o,(-R-T*i.get(g,o)-h*i.get(g,o-1))/L)):(X=dy(-m-U*i.get(g,o-1),-v-U*i.get(g,o),x,h),i.set(g+1,o-1,X[0]),i.set(g+1,o,X[1]))),N=Math.max(Math.abs(i.get(g,o-1)),Math.abs(i.get(g,o))),l*N*N>1)for(b=g;b<=o;b++)i.set(b,o-1,i.get(b,o-1)/N),i.set(b,o,i.get(b,o)/N)}for(g=0;ga)for(b=g;b=s;b--)for(g=s;g<=a;g++){for(x=0,_=s;_<=Math.min(b,a);_++)x=x+r.get(g,_)*i.get(_,b);r.set(g,b,x)}}}function dy(t,e,n,r){let i,o;return Math.abs(n)>Math.abs(r)?(i=r/n,o=n+i*r,[(t+i*e)/o,(e-i*t)/o]):(i=n/r,o=r+i*n,[(i*t+e)/o,(i*e-t)/o])}class _7{constructor(e){if(e=oo.checkMatrix(e),!e.isSymmetric())throw new Error("Matrix is not symmetric");let n=e,r=n.rows,i=new Ze(r,r),o=!0,s,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;as;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 v=e.clone().sub(c.clone().mmul(m.transpose())),x=a.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),y=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=v,this.yResidual=y,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()))}}Xt.AbstractMatrix=kt;Xt.CHO=_7;Xt.CholeskyDecomposition=_7;Xt.DistanceMatrix=Q_;Xt.EVD=b7;Xt.EigenvalueDecomposition=b7;Xt.LU=ew;Xt.LuDecomposition=ew;var S7=Xt.Matrix=Ze;Xt.MatrixColumnSelectionView=ZMe;Xt.MatrixColumnView=KMe;Xt.MatrixFlipColumnView=JMe;Xt.MatrixFlipRowView=QMe;Xt.MatrixRowSelectionView=tEe;Xt.MatrixRowView=eEe;Xt.MatrixSelectionView=Wy;Xt.MatrixSubView=nEe;var gEe=Xt.MatrixTransposeView=rEe;Xt.NIPALS=w7;Xt.Nipals=w7;Xt.QR=vP;Xt.QrDecomposition=vP;Xt.SVD=sh;Xt.SingularValueDecomposition=sh;Xt.SymmetricMatrix=Kc;Xt.WrapperMatrix1D=y7;Xt.WrapperMatrix2D=oo;Xt.correlation=fEe;Xt.covariance=uEe;var s5=Xt.default=Ze;Xt.determinant=Hy;Xt.inverse=oEe;Xt.linearDependencies=lEe;Xt.pseudoInverse=cEe;var vEe=Xt.solve=x7;Xt.wrap=iEe;const a5=S7,l5=gEe;s5.Matrix&&s5.Matrix;const yEe=vEe;function M7(t,e){if(!Vs(t)||!Vs(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 yP{constructor(){if(new.target===yP)throw new Error("BaseRegression must be subclassed")}predict(e){if(typeof e=="number")return this._predict(e);if(Vs(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){M7(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}`)),s=a+s;return s.startsWith("+")&&(s=s.slice(1)),`f(x) = ${s}`}static load(e){if(e.name!=="polynomialRegression")throw new TypeError("not a polynomial regression model");return new jx(!0,e)}}function xEe(t,e,n,r={}){const i=t.length;let{interceptAtZero:o=!1}=r,s=[];if(Array.isArray(n))s=n,o=!1;else if(typeof n=="number")if(o){s=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(o<1||!Number.isInteger(o))throw new RangeError("Polynomial should be a positive integer");o>=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 s=Math.floor(r/2),a=t.length,l=new Float64Array(a),c=wEe(r,o,i);let u=0,f=!0;Vs(e)?f=!1:u=e**i;for(let m=0;m=0&&s0?i=(4*n-2)/(n*(2*e-n+1))*(t*Wp(t,e,n-1,r)+r*Wp(t,e,n-1,r-1))-(n-1)*(2*e+n)/(n*(2*e-n+1))*Wp(t,e,n-2,r):n===0&&r===0?i=1:i=0,i}function c5(t,e){let n=1;if(t>=e)for(let r=t-e+1;r<=t;r++)n*=r;return n}function _Ee(t,e,n,r,i){let o=0;for(let s=0;s<=r;s++)o+=(2*s+1)*(c5(2*n,s)/c5(2*n+s+1,s+1))*Wp(t,n,s,0)*Wp(e,n,s,i);return o}function wEe(t,e,n){const r=new Array(t),i=Math.floor(t/2);for(let o=-i;o<=i;o++){r[o+i]=new Float64Array(t);for(let s=-i;s<=i;s++)r[o+i][s+i]=_Ee(s,o,i,e,n)}return r}function hy(t,e){let n=1/0,r=0;for(let i=0;ie&&(e=t[r],n=r);return n}function MEe(t,e){const n=bEe(e,t,{windowSize:9,derivative:1,polynomial:3}),r=SEe(n),i=t[r];let o=5;r<20&&(o=2);const s=o*Math.round((t[1]-i)/o),a=.5*s,l=hy(t,s+i),c=hy(t,a+i),u=e.slice(l,c),f=t.slice(l,c),h=new jx(f,u,1),m=e.map((N,T)=>N-h.predict(t[T])),v=5*Math.round((t[t.length-1]-i)/5),x=5*Math.round(v/15),y=2,g=hy(t,x+i),b=hy(t,v+i),_=new jx(t.slice(g,b),m.slice(g,b),y),S=_.predict(i);for(let N=r;NN/S),[m.length])}function zE(t,e,n,r,i){const o=t[e],s=t.energy,a=n?MEe(s,o):Q6(o,[o.length]);return{x:s,y:a,label:r+":"+e,color:i}}function u5(t,e,n,r,i,o){const s=!e&&!n&&!r,a=[];return s||t==null||(r&&t.murefer&&a.push(zE(t,"murefer",i,t.id,o[2])),n&&t.mufluor&&a.push(zE(t,"mufluor",i,t.id,o[1])),e&&t.mutrans&&a.push(zE(t,"mutrans",i,t.id,o[0]))),a}function EEe(t,e){return C.jsx(Gwe,{abscissas:t.x,ordinates:t.y.data,curveType:e,color:t.color},t.label)}function CEe(t){var M,R,D,O;const[e,n]=A.useState({showTrans:!1,showFluor:!1,showRefer:!1});A.useEffect(()=>{var B,X,H;n({showTrans:((B=t.xasData)==null?void 0:B.mutrans)!=null,showFluor:((X=t.xasData)==null?void 0:X.mufluor)!=null,showRefer:((H=t.xasData)==null?void 0:H.murefer)!=null})},[t.xasData]);const r=Object.values($p),[i,o]=A.useState(!0),[s,a]=A.useState(!0),[l,c]=A.useState(r[0]),u=mu(),{showTrans:f,showFluor:h,showRefer:m}=e,v=[((M=t.xasData)==null?void 0:M.mutrans)!=null,((R=t.xasData)==null?void 0:R.mufluor)!=null,((D=t.xasData)==null?void 0:D.murefer)!=null],x=(B,X)=>C.jsxs("p",{children:[B.toPrecision(8),", ",X.toPrecision(8)]}),y=u5(t.xasData,f,h,m,s,[WS(u.palette.primary.dark,.3),WS(u.palette.success.light,.3),WS(u.palette.secondary.dark,.3)]),b=t.comparisonFiles.filter(B=>{var X;return B.id!=((X=t.xasData)==null?void 0:X.id)}).map((B,X)=>u5(B,f,h,m,s,[HS(u.palette.primary.dark,X*.3),HS(u.palette.success.light,X*.3),HS(u.palette.secondary.dark,X*.3)])).flat();y.push(...b);const _=HO(y.map(B=>$O(B.y))),P={visDomain:HO(y.map(B=>$O(B.x)))??[0,1],showGrid:!0,isIndexAxis:!1,label:"Energy (eV)"},N={visDomain:_??[0,1],showGrid:!0,isIndexAxis:!1,label:s?"mu(E) (norm)":"mu(E)"},T=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},U={"--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 C.jsxs(gu,{sx:{height:"100%",display:"flex",flexDirection:"column",backgroundColor:B=>B.palette.background.default,fontFamily:B=>B.typography.fontFamily},children:[C.jsx(Bs,{style:L,children:C.jsxs(zSe,{children:[C.jsx(Ec,{label:"Normalize",value:s,onToggle:()=>{a(!s)}}),C.jsx(Yc,{}),C.jsx(Ec,{label:"Transmission",value:f,onToggle:()=>{n({...e,showTrans:!f})},disabled:!v[0]}),C.jsx(Ec,{label:"Fluorescence",value:h,onToggle:()=>{n({...e,showFluor:!h})},disabled:!v[1]}),C.jsx(Ec,{label:"Reference",value:m,onToggle:()=>{n({...e,showRefer:!m})},disabled:!v[2]}),C.jsx(Yc,{}),C.jsx(oMe,{label:"Line Style",onChange:B=>{c(B)},options:r,value:l,renderOption:B=>C.jsx("div",{children:C.jsx("span",{children:String(B)})})}),C.jsx(Yc,{}),C.jsx(Ec,{label:"Grid",icon:yMe,value:i,onToggle:()=>o(!i)})]})}),C.jsx(Bs,{style:U,flex:1,display:"flex",children:C.jsxs(Nwe,{title:((O=t.xasData)==null?void 0:O.id)??" ",abscissaConfig:P,ordinateConfig:N,children:[y.map(B=>EEe(B,l)),C.jsx(fwe,{renderTooltip:x}),C.jsx(q_e,{}),C.jsx(swe,{}),C.jsx(f7,{children:C.jsx("div",{style:{color:u.palette.text.primary,position:"absolute",maxWidth:"35%",minWidth:"15em",padding:"0 1rem",bottom:"2.5rem",right:"0px",background:T},children:y.reverse().map(B=>C.jsxs("div",{children:[C.jsx("span",{style:{color:B.color},children:" ■"}),C.jsx("span",{children:" "+B.label})]},B.label))})})]})})]})}function xP(){const t=A.useContext(cg);let e=null,n=[];if(t.xdiFile!=null){const r=t.xdiFile,i=r.energy(),o=r.muTrans(),s=r.muFluor(),a=r.muRefer();e={id:r.id,energy:i,mutrans:o,mufluor:s,murefer:a},n=t.comparisonFiles.map(l=>({id:l.id,energy:l.energy(),mutrans:l.muTrans(),mufluor:l.muFluor(),murefer:l.muRefer()}))}return C.jsx(CEe,{xasData:e,comparisonFiles:n})}function TEe(){const[t,e]=A.useState(null),[n,r]=A.useState([]),i=A.useContext(DR);function o(){return a=>{Dn.get("/webxdiviewer/xdidata/"+a).then(l=>{const c=wd.parseFile(l.data,a);e(c)})}}const s=o();return C.jsx(kR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:n,setComparisonFiles:r},children:C.jsxs(_a,{height:"100%",container:!0,children:[C.jsx(_a,{item:!0,lg:5,md:12,padding:1,children:C.jsx(pre,{standards:i,updatePlot:s})}),C.jsx(_a,{item:!0,height:"100%",lg:7,md:12,padding:1,children:C.jsx(xP,{})})]})})}const REe="jacobfilik/XASDataLibrary";function AEe(){const t=REe;return C.jsxs(VZ,{maxWidth:"md",sx:{alignSelf:"center",p:"24px"},children:[C.jsx(sr,{variant:"h4",padding:"24px",children:"Welcome to the XAS Data Viewer!"}),C.jsxs(Bs,{children:[C.jsxs(sr,{paragraph:!0,children:["A prototype viewer for"," ",C.jsx(Oy,{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"," ",C.jsx(Oy,{to:"https://github.com/"+t,children:t}),"."]}),C.jsxs(sr,{paragraph:!0,children:["The database is open to ",C.jsx(Oy,{to:"view",children:" search and download "}),"."]})]})]})}function PEe(){return C.jsx(_1,{fontSize:"large",children:C.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:C.jsxs("g",{children:[C.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"}),C.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 NEe(t){const e={Home:"/",Explore:"/view",Viewer:"/xdiviewer"};return C.jsx(PK,{style:{position:"static"},children:C.jsxs(fte,{sx:{justifyContent:"space-between",alignItems:"center"},children:[C.jsxs(rs,{direction:"row",alignItems:"center",spacing:2,children:[C.jsx(Bs,{children:C.jsx(PEe,{})}),C.jsx(sr,{variant:"h4",component:"div",sx:{flexGrow:1},children:"XAS Data Viewer"}),C.jsx(m6,{component:rs,direction:"row",children:Object.entries(e).map(([n,r])=>C.jsx(NQ,{children:C.jsx(bQ,{component:z6,to:r,sx:{"&.active":{color:i=>i.palette.text.secondary}},children:C.jsx(DQ,{primary:n})})},n))})]}),C.jsx(rs,{direction:"row",alignItems:"center",children:C.jsx(jZ,{icon:C.jsx(vMe,{}),checkedIcon:C.jsx(gMe,{}),checked:t.colorMode==="dark",onChange:t.toggleColorMode})})]})})}const IEe=qe("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 LEe(t){const[e,n]=A.useState(""),[r,i]=A.useState("No file"),o=A.useContext(cg),s=l=>{l.preventDefault(),Dn.get(e).then(c=>{const u=wd.parseFile(c.data,e);o.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=wd.parseFile(u.target.result,"localfile"),o.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 C.jsx(gu,{elevation:3,variant:"outlined",square:!1,sx:{p:2},children:C.jsxs(rs,{spacing:2,sx:{justifyContent:"flex-start",alignItems:"flex-start"},children:[C.jsx(sr,{variant:"h5",children:"Upload XDI File"}),C.jsxs(rs,{direction:"row",component:"form",onSubmit:s,spacing:1,children:[C.jsx($te,{margin:"dense",sx:{width:"75%"},id:"xdi-url",label:"XDI file URL",variant:"outlined",value:e,onChange:l=>{n(l.target.value)}}),C.jsx(ou,{variant:"contained",type:"submit",children:"Fetch"})]}),C.jsxs(ou,{variant:"contained",role:void 0,tabIndex:-1,component:"label",children:["Upload Local File",C.jsx(IEe,{type:"file",name:"file1",onChange:a})]}),C.jsx(sr,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:r})]})})}function kEe(){const[t,e]=A.useState(null);return C.jsxs(rs,{spacing:2,children:[C.jsx(LEe,{setXASMetadata:e}),t&&C.jsx(OR,{standard:t,showDownload:!1,showCompare:!1})]})}function OEe(){const[t,e]=A.useState(null);return C.jsx(kR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:[],setComparisonFiles:()=>{}},children:C.jsxs(_a,{height:"100%",container:!0,children:[C.jsx(_a,{item:!0,lg:5,md:12,padding:1,children:C.jsx(kEe,{})}),C.jsx(_a,{item:!0,height:"100%",lg:7,md:12,padding:1,children:C.jsx(xP,{})})]})})}function DEe(){const e=qd().pathname.slice(5),[n,r]=A.useState(null),o=A.useContext(DR).find(s=>s.location===e);return A.useEffect(()=>{Dn.get("/webxdiviewer/xdidata/"+e).then(s=>{let a=null;try{a=wd.parseFile(s.data,e)}catch{console.log("Could not read {}",focus)}r(a)})},[e]),C.jsx(kR,{value:{xdiFile:n,setXDIFile:r,comparisonFiles:[],setComparisonFiles:()=>{}},children:C.jsxs(_a,{height:"100%",container:!0,children:[C.jsx(_a,{item:!0,lg:5,md:12,padding:1,children:o?C.jsx(OR,{standard:o,showDownload:!0,showCompare:!1}):C.jsxs(sr,{children:[" Could not find ",e," "]})}),C.jsx(_a,{item:!0,height:"100%",lg:7,md:12,padding:1,children:C.jsx(xP,{})})]})})}function FEe(){const t=Oz("(prefers-color-scheme: dark)"),[e,n]=A.useState(t?"dark":"light"),r=A.useMemo(()=>({toggleColorMode:()=>{n(o=>o==="light"?"dark":"light")}}),[]),i=A.useMemo(()=>bR({palette:{mode:e}}),[e]);return C.jsxs(WY,{theme:i,children:[C.jsx(GZ,{}),C.jsxs(rs,{height:"100vh",width:"100vw",spacing:1,children:[C.jsx(NEe,{colorMode:e,toggleColorMode:r.toggleColorMode}),C.jsx(yre,{children:C.jsxs(Nne,{children:[C.jsx(hp,{path:"/",element:C.jsx(AEe,{})}),C.jsx(hp,{path:"/view",element:C.jsx(TEe,{})}),C.jsx(hp,{path:"/xdiviewer",element:C.jsx(OEe,{})}),C.jsx(hp,{path:"/xdi/:id/*",element:C.jsx(DEe,{})})]})})]})]})}XT(document.getElementById("root")).render(C.jsx(A.StrictMode,{children:C.jsx(Une,{children:C.jsx(FEe,{})})})); diff --git a/index.html b/index.html index 6623d26..5d7a44d 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Web XDI Viewer - +