ezpm2gui 1.2.2 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -41
- package/dist/server/config/cron-jobs.json +18 -0
- package/dist/server/config/cron-scripts/6d8d5e1d-2bc8-463f-82a6-6c294f2b9dbe.sh +2 -0
- package/dist/server/config/remote-connections.json +22 -0
- package/dist/server/index.js +2 -0
- package/dist/server/routes/cronJobs.d.ts +7 -0
- package/dist/server/routes/cronJobs.js +189 -0
- package/dist/server/routes/remoteConnections.js +105 -0
- package/dist/server/services/CronJobService.d.ts +74 -0
- package/dist/server/services/CronJobService.js +407 -0
- package/dist/server/utils/remote-connection.d.ts +17 -0
- package/dist/server/utils/remote-connection.js +183 -14
- package/package.json +5 -1
- package/src/client/build/asset-manifest.json +6 -6
- package/src/client/build/index.html +1 -1
- package/src/client/build/static/css/main.d46bc75c.css +5 -0
- package/src/client/build/static/css/main.d46bc75c.css.map +1 -0
- package/src/client/build/static/js/main.b0e1c9b1.js +3 -0
- package/src/client/build/static/js/{main.31323a04.js.LICENSE.txt → main.b0e1c9b1.js.LICENSE.txt} +11 -0
- package/src/client/build/static/js/main.b0e1c9b1.js.map +1 -0
- package/src/client/build/static/css/main.672b8f26.css +0 -2
- package/src/client/build/static/css/main.672b8f26.css.map +0 -1
- package/src/client/build/static/js/main.31323a04.js +0 -156
- package/src/client/build/static/js/main.31323a04.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see main.b0e1c9b1.js.LICENSE.txt */
|
|
2
|
+
(()=>{var e={191:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler");Symbol.for("react.provider");var s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case u:case d:case f:return e;default:switch(e=e&&e.$$typeof){case l:case c:case p:case h:case s:return e;default:return t}}case r:return t}}}t.vM=c,t.lD=h},219:(e,t,n)=>{"use strict";var r=n(3763),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var o=p(n);o&&o!==f&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var v=a[g];if(!i[v]&&(!r||!r[v])&&(!m||!m[v])&&(!s||!s[v])){var b=h(n,v);try{c(t,v,b)}catch(x){}}}}return t}},457:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(7868)},579:(e,t,n)=>{"use strict";e.exports=n(1153)},869:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(5043);var r=n(3290),o=n(579);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.mL,{styles:i})}},918:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},1153:(e,t,n)=>{"use strict";var r=n(5043),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},1722:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>o,sk:()=>i});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},2374:(e,t,n)=>{"use strict";t.A=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(5043)),o=n(3174);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}t.A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(o.ThemeContext);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},2730:(e,t,n)=>{"use strict";var r=n(5043),o=n(8853);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},f={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,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(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function x(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),A=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var N=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=N&&e[N]||e["@@iterator"])?e:null}var I,z=Object.assign;function D(e){if(void 0===I)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var F=!1;function B(e,t){if(!e||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function W(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case k:return"Fragment";case S:return"Portal";case C:return"Profiler";case j:return"StrictMode";case M:return"Suspense";case R:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case _:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return H(e(t))}catch(n){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===j?"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("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function U(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function G(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=U(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function J(e,t){Q(e,t);var n=U(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,U(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+U(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:U(n)}}function ie(e,t){var n=U(t.value),r=U(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={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},fe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=z({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 be(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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 ye=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,ke=null,je=null;function Ce(e){if(e=yo(e)){if("function"!==typeof Se)throw Error(i(280));var t=e.stateNode;t&&(t=So(t),Se(e.stateNode,e.type,t))}}function _e(e){ke?je?je.push(e):je=[e]:ke=e}function Ae(){if(ke){var e=ke,t=je;if(je=ke=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Ee(e,t){return e(t)}function Me(){}var Re=!1;function Pe(e,t,n){if(Re)return e(t,n);Re=!0;try{return Ee(e,t,n)}finally{Re=!1,(null!==ke||null!==je)&&(Me(),Ae())}}function Oe(e,t){var n=e.stateNode;if(null===n)return null;var r=So(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var Te=!1;if(u)try{var Ne={};Object.defineProperty(Ne,"passive",{get:function(){Te=!0}}),window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch(ue){Te=!1}function Le(e,t,n,r,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ie=!1,ze=null,De=!1,Fe=null,Be={onError:function(e){Ie=!0,ze=e}};function We(e,t,n,r,o,i,a,s,l){Ie=!1,ze=null,Le.apply(Be,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ue(e){if(He(e)!==e)throw Error(i(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Ue(o),e;if(a===r)return Ue(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?$e(e):null}function $e(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=$e(e);if(null!==t)return t;e=e.sibling}return null}var Ke=o.unstable_scheduleCallback,Xe=o.unstable_cancelCallback,Ye=o.unstable_shouldYield,Ge=o.unstable_requestPaint,Qe=o.unstable_now,Je=o.unstable_getCurrentPriorityLevel,Ze=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=dt(s):0!==(i&=a)&&(r=dt(i))}else 0!==(a=n&~o)?r=dt(a):0!==i&&(r=dt(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-at(t)),r|=e[n],t&=~o;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var xt=0;function yt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,St,kt,jt,Ct,_t=!1,At=[],Et=null,Mt=null,Rt=null,Pt=new Map,Ot=new Map,Tt=[],Nt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function It(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=yo(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function zt(e){var t=xo(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void Ct(e.priority,(function(){kt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Dt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=yo(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ye=r,n.target.dispatchEvent(r),ye=null,t.shift()}return!0}function Ft(e,t,n){Dt(e)&&n.delete(t)}function Bt(){_t=!1,null!==Et&&Dt(Et)&&(Et=null),null!==Mt&&Dt(Mt)&&(Mt=null),null!==Rt&&Dt(Rt)&&(Rt=null),Pt.forEach(Ft),Ot.forEach(Ft)}function Wt(e,t){e.blockedOn===t&&(e.blockedOn=null,_t||(_t=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Bt)))}function Ht(e){function t(t){return Wt(t,e)}if(0<At.length){Wt(At[0],e);for(var n=1;n<At.length;n++){var r=At[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Et&&Wt(Et,e),null!==Mt&&Wt(Mt,e),null!==Rt&&Wt(Rt,e),Pt.forEach(t),Ot.forEach(t),n=0;n<Tt.length;n++)(r=Tt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&null===(n=Tt[0]).blockedOn;)zt(n),null===n.blockedOn&&Tt.shift()}var Vt=y.ReactCurrentBatchConfig,Ut=!0;function qt(e,t,n,r){var o=xt,i=Vt.transition;Vt.transition=null;try{xt=1,Kt(e,t,n,r)}finally{xt=o,Vt.transition=i}}function $t(e,t,n,r){var o=xt,i=Vt.transition;Vt.transition=null;try{xt=4,Kt(e,t,n,r)}finally{xt=o,Vt.transition=i}}function Kt(e,t,n,r){if(Ut){var o=Yt(e,t,n,r);if(null===o)Ur(e,t,r,Xt,n),Lt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Et=It(Et,e,t,n,r,o),!0;case"dragenter":return Mt=It(Mt,e,t,n,r,o),!0;case"mouseover":return Rt=It(Rt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Pt.set(i,It(Pt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ot.set(i,It(Ot.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Nt.indexOf(e)){for(;null!==o;){var i=yo(o);if(null!==i&&wt(i),null===(i=Yt(e,t,n,r))&&Ur(e,t,r,Xt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Ur(e,t,r,null,n)}}var Xt=null;function Yt(e,t,n,r){if(Xt=null,null!==(e=xo(e=we(r))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xt=e,null}function Gt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Jt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Jt,r=n.length,o="value"in Qt?Qt.value:Qt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Zt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=z({},cn,{view:0,detail:0}),hn=on(dn),pn=z({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),fn=on(pn),mn=on(z({},pn,{dataTransfer:0})),gn=on(z({},dn,{relatedTarget:0})),vn=on(z({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=z({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=on(bn),yn=on(z({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function Cn(){return jn}var _n=z({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=on(_n),En=on(z({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Mn=on(z({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Rn=on(z({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=z({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),On=on(Pn),Tn=[9,13,27,32],Nn=u&&"CompositionEvent"in window,Ln=null;u&&"documentMode"in document&&(Ln=document.documentMode);var In=u&&"TextEvent"in window&&!Ln,zn=u&&(!Nn||Ln&&8<Ln&&11>=Ln),Dn=String.fromCharCode(32),Fn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Tn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Un(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function qn(e,t,n,r){_e(r),0<(t=$r(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Kn=null;function Xn(e){Dr(e,0)}function Yn(e){if(K(wo(e)))return e}function Gn(e,t){if("change"===e)return t}var Qn=!1;if(u){var Jn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Qn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){$n&&($n.detachEvent("onpropertychange",nr),Kn=$n=null)}function nr(e){if("value"===e.propertyName&&Yn(Kn)){var t=[];qn(t,Kn,e,we(e)),Pe(Xn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,($n=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(Kn)}function ir(e,t){if("click"===e)return Yn(t)}function ar(e,t){if("input"===e||"change"===e)return Yn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ur(n,i);var a=ur(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,br=null,xr=!1;function yr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==gr||gr!==X(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&lr(br,r)||(br=r,0<(r=$r(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},kr={},jr={};function Cr(e){if(kr[e])return kr[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in jr)return kr[e]=n[t];return e}u&&(jr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var _r=Cr("animationend"),Ar=Cr("animationiteration"),Er=Cr("animationstart"),Mr=Cr("transitionend"),Rr=new Map,Pr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){Rr.set(e,t),l(t,[e])}for(var Tr=0;Tr<Pr.length;Tr++){var Nr=Pr[Tr];Or(Nr.toLowerCase(),"on"+(Nr[0].toUpperCase()+Nr.slice(1)))}Or(_r,"onAnimationEnd"),Or(Ar,"onAnimationIteration"),Or(Er,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Mr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function zr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,s,l,c){if(We.apply(this,arguments),Ie){if(!Ie)throw Error(i(198));var u=ze;Ie=!1,ze=null,De||(De=!0,Fe=u)}}(r,t,void 0,e),e.currentTarget=null}function Dr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;zr(o,s,c),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;zr(o,s,c),i=l}}}if(De)throw e=Fe,De=!1,Fe=null,e}function Fr(e,t){var n=t[go];void 0===n&&(n=t[go]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var Wr="_reactListening"+Math.random().toString(36).slice(2);function Hr(e){if(!e[Wr]){e[Wr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||Br(t,!1,e),Br(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wr]||(t[Wr]=!0,Br("selectionchange",!1,t))}}function Vr(e,t,n,r){switch(Gt(t)){case 1:var o=qt;break;case 4:o=$t;break;default:o=Kt}n=o.bind(null,t,n,e),o=void 0,!Te||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ur(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=xo(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}Pe((function(){var r=i,o=we(n),a=[];e:{var s=Rr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=An;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Mn;break;case _r:case Ar:case Er:l=vn;break;case Mr:l=Rn;break;case"scroll":l=hn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=En}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==h&&(null!=(m=Oe(f,h))&&u.push(qr(f,m,p)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,o),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ye||!(c=n.relatedTarget||n.fromElement)||!xo(c)&&!c[mo])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?xo(c):null)&&(c!==(d=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,m="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=En,m="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:wo(l),p=null==c?s:wo(c),(s=new u(m,f+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,xo(o)===r&&((u=new u(h,f+"enter",c,n,o)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,f=0,p=u=l;p;p=Kr(p))f++;for(p=0,m=h;m;m=Kr(m))p++;for(;0<f-p;)u=Kr(u),f--;for(;0<p-f;)h=Kr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Kr(u),h=Kr(h)}u=null}else u=null;null!==l&&Xr(a,s,l,u,!1),null!==c&&null!==d&&Xr(a,d,c,u,!0)}if("select"===(l=(s=r?wo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Gn;else if(Un(s))if(Qn)g=ar;else{g=or;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ir);switch(g&&(g=g(e,r))?qn(a,g,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wo(r):window,e){case"focusin":(Un(v)||"true"===v.contentEditable)&&(gr=v,vr=r,br=null);break;case"focusout":br=vr=gr=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,yr(a,n,o);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":yr(a,n,o)}var b;if(Nn)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Hn?Bn(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(zn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Hn&&(b=en()):(Jt="value"in(Qt=o)?Qt.value:Qt.textContent,Hn=!0)),0<(v=$r(r,x)).length&&(x=new yn(x,e,null,n,o),a.push({event:x,listeners:v}),b?x.data=b:null!==(b=Wn(n))&&(x.data=b))),(b=In?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Dn);case"textInput":return(e=t.data)===Dn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Nn&&Bn(e,t)?(e=en(),Zt=Jt=Qt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=$r(r,"onBeforeInput")).length&&(o=new yn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=b))}Dr(a,t)}))}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $r(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Oe(e,n))&&r.unshift(qr(e,i,o)),null!=(i=Oe(e,t))&&r.push(qr(e,i,o))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Xr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=Oe(n,i))&&a.unshift(qr(n,l,s)):o||null!=(l=Oe(n,i))&&a.push(qr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Yr=/\r\n?/g,Gr=/\u0000|\uFFFD/g;function Qr(e){return("string"===typeof e?e:""+e).replace(Yr,"\n").replace(Gr,"")}function Jr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(i(425))}function Zr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,io="function"===typeof Promise?Promise:void 0,ao="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof io?function(e){return io.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function lo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Ht(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Ht(t)}function co(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ho=Math.random().toString(36).slice(2),po="__reactFiber$"+ho,fo="__reactProps$"+ho,mo="__reactContainer$"+ho,go="__reactEvents$"+ho,vo="__reactListeners$"+ho,bo="__reactHandles$"+ho;function xo(e){var t=e[po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mo]||n[po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[po])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function yo(e){return!(e=e[po]||e[mo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function So(e){return e[fo]||null}var ko=[],jo=-1;function Co(e){return{current:e}}function _o(e){0>jo||(e.current=ko[jo],ko[jo]=null,jo--)}function Ao(e,t){jo++,ko[jo]=e.current,e.current=t}var Eo={},Mo=Co(Eo),Ro=Co(!1),Po=Eo;function Oo(e,t){var n=e.type.contextTypes;if(!n)return Eo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function To(e){return null!==(e=e.childContextTypes)&&void 0!==e}function No(){_o(Ro),_o(Mo)}function Lo(e,t,n){if(Mo.current!==Eo)throw Error(i(168));Ao(Mo,t),Ao(Ro,n)}function Io(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,V(e)||"Unknown",o));return z({},n,r)}function zo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,Po=Mo.current,Ao(Mo,e),Ao(Ro,Ro.current),!0}function Do(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Io(e,t,Po),r.__reactInternalMemoizedMergedChildContext=e,_o(Ro),_o(Mo),Ao(Mo,e)):_o(Ro),Ao(Ro,n)}var Fo=null,Bo=!1,Wo=!1;function Ho(e){null===Fo?Fo=[e]:Fo.push(e)}function Vo(){if(!Wo&&null!==Fo){Wo=!0;var e=0,t=xt;try{var n=Fo;for(xt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Fo=null,Bo=!1}catch(o){throw null!==Fo&&(Fo=Fo.slice(e+1)),Ke(Ze,Vo),o}finally{xt=t,Wo=!1}}return null}var Uo=[],qo=0,$o=null,Ko=0,Xo=[],Yo=0,Go=null,Qo=1,Jo="";function Zo(e,t){Uo[qo++]=Ko,Uo[qo++]=$o,$o=e,Ko=t}function ei(e,t,n){Xo[Yo++]=Qo,Xo[Yo++]=Jo,Xo[Yo++]=Go,Go=e;var r=Qo;e=Jo;var o=32-at(r)-1;r&=~(1<<o),n+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Qo=1<<32-at(t)+o|n<<o|r,Jo=i+e}else Qo=1<<i|n<<o|r,Jo=e}function ti(e){null!==e.return&&(Zo(e,1),ei(e,1,0))}function ni(e){for(;e===$o;)$o=Uo[--qo],Uo[qo]=null,Ko=Uo[--qo],Uo[qo]=null;for(;e===Go;)Go=Xo[--Yo],Xo[Yo]=null,Jo=Xo[--Yo],Xo[Yo]=null,Qo=Xo[--Yo],Xo[Yo]=null}var ri=null,oi=null,ii=!1,ai=null;function si(e,t){var n=Pc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function li(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ri=e,oi=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ri=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Go?{id:Qo,overflow:Jo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Pc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ri=e,oi=null,!0);default:return!1}}function ci(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ui(e){if(ii){var t=oi;if(t){var n=t;if(!li(e,t)){if(ci(e))throw Error(i(418));t=co(n.nextSibling);var r=ri;t&&li(e,t)?si(r,n):(e.flags=-4097&e.flags|2,ii=!1,ri=e)}}else{if(ci(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ri=e}}}function di(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ri=e}function hi(e){if(e!==ri)return!1;if(!ii)return di(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oi)){if(ci(e))throw pi(),Error(i(418));for(;t;)si(e,t),t=co(t.nextSibling)}if(di(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oi=co(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oi=null}}else oi=ri?co(e.stateNode.nextSibling):null;return!0}function pi(){for(var e=oi;e;)e=co(e.nextSibling)}function fi(){oi=ri=null,ii=!1}function mi(e){null===ai?ai=[e]:ai.push(e)}var gi=y.ReactCurrentBatchConfig;function vi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function bi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xi(e){return(0,e._init)(e._payload)}function yi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Tc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=zc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===k?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===O&&xi(i)===t.type)?((r=o(t,n.props)).ref=vi(e,t,n),r.return=e,r):((r=Nc(n.type,n.key,n.props,null,e.mode,r)).ref=vi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Dc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Lc(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=zc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Nc(t.type,t.key,t.props,null,e.mode,n)).ref=vi(e,null,t),n.return=e,n;case S:return(t=Dc(t,e.mode,n)).return=e,t;case O:return h(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=Lc(t,e.mode,n,null)).return=e,t;bi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?c(e,t,n,r):null;case S:return n.key===o?u(e,t,n,r):null;case O:return p(e,t,(o=n._init)(n._payload),r)}if(te(n)||L(n))return null!==o?null:d(e,t,n,r,null);bi(e,n)}return null}function f(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case O:return f(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||L(r))return d(t,e=e.get(n)||null,r,o,null);bi(t,r)}return null}function m(o,i,s,l){for(var c=null,u=null,d=i,m=i=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=p(o,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(o,d),i=a(v,i,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(o,d),ii&&Zo(o,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(o,s[m],l))&&(i=a(d,i,m),null===u?c=d:u.sibling=d,u=d);return ii&&Zo(o,m),c}for(d=r(o,d);m<s.length;m++)null!==(g=f(d,o,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),i=a(g,i,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(o,e)})),ii&&Zo(o,m),c}function g(o,s,l,c){var u=L(l);if("function"!==typeof u)throw Error(i(150));if(null==(l=u.call(l)))throw Error(i(151));for(var d=u=null,m=s,g=s=0,v=null,b=l.next();null!==m&&!b.done;g++,b=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var x=p(o,m,b.value,c);if(null===x){null===m&&(m=v);break}e&&m&&null===x.alternate&&t(o,m),s=a(x,s,g),null===d?u=x:d.sibling=x,d=x,m=v}if(b.done)return n(o,m),ii&&Zo(o,g),u;if(null===m){for(;!b.done;g++,b=l.next())null!==(b=h(o,b.value,c))&&(s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return ii&&Zo(o,g),u}for(m=r(o,m);!b.done;g++,b=l.next())null!==(b=f(m,o,g,b.value,c))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return e&&m.forEach((function(e){return t(o,e)})),ii&&Zo(o,g),u}return function e(r,i,a,l){if("object"===typeof a&&null!==a&&a.type===k&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var c=a.key,u=i;null!==u;){if(u.key===c){if((c=a.type)===k){if(7===u.tag){n(r,u.sibling),(i=o(u,a.props.children)).return=r,r=i;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===O&&xi(c)===u.type){n(r,u.sibling),(i=o(u,a.props)).ref=vi(r,u,a),i.return=r,r=i;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===k?((i=Lc(a.props.children,r.mode,l,a.key)).return=r,r=i):((l=Nc(a.type,a.key,a.props,null,r.mode,l)).ref=vi(r,i,a),l.return=r,r=l)}return s(r);case S:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Dc(a,r.mode,l)).return=r,r=i}return s(r);case O:return e(r,i,(u=a._init)(a._payload),l)}if(te(a))return m(r,i,a,l);if(L(a))return g(r,i,a,l);bi(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=zc(a,r.mode,l)).return=r,r=i),s(r)):n(r,i)}}var wi=yi(!0),Si=yi(!1),ki=Co(null),ji=null,Ci=null,_i=null;function Ai(){_i=Ci=ji=null}function Ei(e){var t=ki.current;_o(ki),e._currentValue=t}function Mi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ri(e,t){ji=e,_i=Ci=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(xs=!0),e.firstContext=null)}function Pi(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},null===Ci){if(null===ji)throw Error(i(308));Ci=e,ji.dependencies={lanes:0,firstContext:e}}else Ci=Ci.next=e;return t}var Oi=null;function Ti(e){null===Oi?Oi=[e]:Oi.push(e)}function Ni(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ti(t)):(n.next=o.next,o.next=n),t.interleaved=n,Li(e,r)}function Li(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ii=!1;function zi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Di(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&El)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Li(e,n)}return null===(o=r.interleaved)?(t.next=t,Ti(r)):(t.next=o.next,o.next=t),r.interleaved=t,Li(e,n)}function Wi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Hi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Vi(e,t,n,r){var o=e.updateQueue;Ii=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,u=c=l=null,s=i;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,m=s;switch(h=t,p=n,m.tag){case 1:if("function"===typeof(f=m.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=m.payload)?f.call(p,d,h):f)||void 0===h)break e;d=z({},d,h);break e;case 2:Ii=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=o.effects)?o.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=h;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Il|=a,e.lanes=a,e.memoizedState=d}}function Ui(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var qi={},$i=Co(qi),Ki=Co(qi),Xi=Co(qi);function Yi(e){if(e===qi)throw Error(i(174));return e}function Gi(e,t){switch(Ao(Xi,t),Ao(Ki,e),Ao($i,qi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_o($i),Ao($i,t)}function Qi(){_o($i),_o(Ki),_o(Xi)}function Ji(e){Yi(Xi.current);var t=Yi($i.current),n=le(t,e.type);t!==n&&(Ao(Ki,e),Ao($i,n))}function Zi(e){Ki.current===e&&(_o($i),_o(Ki))}var ea=Co(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var oa=y.ReactCurrentDispatcher,ia=y.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,ua=!1,da=!1,ha=0,pa=0;function fa(){throw Error(i(321))}function ma(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,o,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?Za:es,e=n(r,o),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(i(301));a+=1,ca=la=null,t.updateQueue=null,oa.current=ts,e=n(r,o)}while(da)}if(oa.current=Ja,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,ua=!1,t)throw Error(i(300));return e}function va(){var e=0!==ha;return ha=0,e}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function xa(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(i(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function ya(e,t){return"function"===typeof t?t(e):t}function wa(e){var t=xa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=la,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((aa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,sa.lanes|=d,Il|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(xs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,sa.lanes|=a,Il|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sa(e){var t=xa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sr(a,t.memoizedState)||(xs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ka(){}function ja(e,t){var n=sa,r=xa(),o=t(),a=!sr(r.memoizedState,o);if(a&&(r.memoizedState=o,xs=!0),r=r.queue,Ia(Aa.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Pa(9,_a.bind(null,n,r,o,t),void 0,null),null===Ml)throw Error(i(349));0!==(30&aa)||Ca(n,t,o)}return o}function Ca(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function _a(e,t,n,r){t.value=n,t.getSnapshot=r,Ea(t)&&Ma(e)}function Aa(e,t,n){return n((function(){Ea(t)&&Ma(e)}))}function Ea(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Ma(e){var t=Li(e,1);null!==t&&nc(t,e,1,-1)}function Ra(e){var t=ba();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ya,lastRenderedState:e},t.queue=e,e=e.dispatch=Xa.bind(null,sa,e),[t.memoizedState,e]}function Pa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Oa(){return xa().memoizedState}function Ta(e,t,n,r){var o=ba();sa.flags|=e,o.memoizedState=Pa(1|t,n,void 0,void 0===r?null:r)}function Na(e,t,n,r){var o=xa();r=void 0===r?null:r;var i=void 0;if(null!==la){var a=la.memoizedState;if(i=a.destroy,null!==r&&ma(r,a.deps))return void(o.memoizedState=Pa(t,n,i,r))}sa.flags|=e,o.memoizedState=Pa(1|t,n,i,r)}function La(e,t){return Ta(8390656,8,e,t)}function Ia(e,t){return Na(2048,8,e,t)}function za(e,t){return Na(4,2,e,t)}function Da(e,t){return Na(4,4,e,t)}function Fa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Na(4,4,Fa.bind(null,t,e),n)}function Wa(){}function Ha(e,t){var n=xa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Va(e,t){var n=xa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ua(e,t,n){return 0===(21&aa)?(e.baseState&&(e.baseState=!1,xs=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),sa.lanes|=n,Il|=n,e.baseState=!0),t)}function qa(e,t){var n=xt;xt=0!==n&&4>n?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{xt=n,ia.transition=r}}function $a(){return xa().memoizedState}function Ka(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e))Ga(t,n);else if(null!==(n=Ni(e,t,n,r))){nc(n,e,r,ec()),Qa(n,t,r)}}function Xa(e,t,n){var r=tc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))Ga(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(o.next=o,Ti(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Ni(e,t,o,r))&&(nc(n,e,r,o=ec()),Qa(n,t,r))}}function Ya(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ga(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qa(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Ja={readContext:Pi,useCallback:fa,useContext:fa,useEffect:fa,useImperativeHandle:fa,useInsertionEffect:fa,useLayoutEffect:fa,useMemo:fa,useReducer:fa,useRef:fa,useState:fa,useDebugValue:fa,useDeferredValue:fa,useTransition:fa,useMutableSource:fa,useSyncExternalStore:fa,useId:fa,unstable_isNewReconciler:!1},Za={readContext:Pi,useCallback:function(e,t){return ba().memoizedState=[e,void 0===t?null:t],e},useContext:Pi,useEffect:La,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ta(4194308,4,Fa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ta(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ta(4,2,e,t)},useMemo:function(e,t){var n=ba();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ba();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ka.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ba().memoizedState=e},useState:Ra,useDebugValue:Wa,useDeferredValue:function(e){return ba().memoizedState=e},useTransition:function(){var e=Ra(!1),t=e[0];return e=qa.bind(null,e[1]),ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,o=ba();if(ii){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Ml)throw Error(i(349));0!==(30&aa)||Ca(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,La(Aa.bind(null,r,a,e),[e]),r.flags|=2048,Pa(9,_a.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ba(),t=Ml.identifierPrefix;if(ii){var n=Jo;t=":"+t+"R"+(n=(Qo&~(1<<32-at(Qo)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Pi,useCallback:Ha,useContext:Pi,useEffect:Ia,useImperativeHandle:Ba,useInsertionEffect:za,useLayoutEffect:Da,useMemo:Va,useReducer:wa,useRef:Oa,useState:function(){return wa(ya)},useDebugValue:Wa,useDeferredValue:function(e){return Ua(xa(),la.memoizedState,e)},useTransition:function(){return[wa(ya)[0],xa().memoizedState]},useMutableSource:ka,useSyncExternalStore:ja,useId:$a,unstable_isNewReconciler:!1},ts={readContext:Pi,useCallback:Ha,useContext:Pi,useEffect:Ia,useImperativeHandle:Ba,useInsertionEffect:za,useLayoutEffect:Da,useMemo:Va,useReducer:Sa,useRef:Oa,useState:function(){return Sa(ya)},useDebugValue:Wa,useDeferredValue:function(e){var t=xa();return null===la?t.memoizedState=e:Ua(t,la.memoizedState,e)},useTransition:function(){return[Sa(ya)[0],xa().memoizedState]},useMutableSource:ka,useSyncExternalStore:ja,useId:$a,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=z({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:z({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var os={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),i=Fi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Bi(e,i,o))&&(nc(t,e,o,r),Wi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),i=Fi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Bi(e,i,o))&&(nc(t,e,o,r),Wi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),o=Fi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Bi(e,o,r))&&(nc(t,e,r,n),Wi(t,e,r))}};function is(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(o,i))}function as(e,t,n){var r=!1,o=Eo,i=t.contextType;return"object"===typeof i&&null!==i?i=Pi(i):(o=To(t)?Po:Mo.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?Oo(e,o):Eo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=os,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&os.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},zi(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=Pi(i):(i=To(t)?Po:Mo.current,o.context=Oo(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(rs(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&os.enqueueReplaceState(o,o.state,null),Vi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var hs="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Fi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ul||(Ul=!0,ql=r),ds(0,t)},n}function fs(e,t,n){(n=Fi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ds(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!==typeof r&&(null===$l?$l=new Set([this]):$l.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Cc.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Fi(-1,1)).tag=2,Bi(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var bs=y.ReactCurrentOwner,xs=!1;function ys(e,t,n,r){t.child=null===e?Si(t,null,n,r):wi(t,e.child,n,r)}function ws(e,t,n,r,o){n=n.render;var i=t.ref;return Ri(t,o),r=ga(e,t,n,r,i,o),n=va(),null===e||xs?(ii&&n&&ti(t),t.flags|=1,ys(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Us(e,t,o))}function Ss(e,t,n,r,o){if(null===e){var i=n.type;return"function"!==typeof i||Oc(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,ks(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Us(e,t,o)}return t.flags|=1,(e=Tc(i,r)).ref=t.ref,e.return=t,t.child=e}function ks(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(lr(i,r)&&e.ref===t.ref){if(xs=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Us(e,t,o);0!==(131072&e.flags)&&(xs=!0)}}return _s(e,t,n,r,o)}function js(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ao(Tl,Ol),Ol|=n;else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ao(Tl,Ol),Ol|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Ao(Tl,Ol),Ol|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ao(Tl,Ol),Ol|=r;return ys(e,t,o,n),t.child}function Cs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _s(e,t,n,r,o){var i=To(n)?Po:Mo.current;return i=Oo(t,i),Ri(t,o),n=ga(e,t,n,r,i,o),r=va(),null===e||xs?(ii&&r&&ti(t),t.flags|=1,ys(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Us(e,t,o))}function As(e,t,n,r,o){if(To(n)){var i=!0;zo(t)}else i=!1;if(Ri(t,o),null===t.stateNode)Vs(e,t),as(t,n,r),ls(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=Pi(c):c=Oo(t,c=To(n)?Po:Mo.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),Ii=!1;var h=t.memoizedState;a.state=h,Vi(t,r,a,o),l=t.memoizedState,s!==r||h!==l||Ro.current||Ii?("function"===typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=Ii||is(t,n,s,r,h,l,c))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Di(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Pi(l):l=Oo(t,l=To(n)?Po:Mo.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,r,l),Ii=!1,h=t.memoizedState,a.state=h,Vi(t,r,a,o);var f=t.memoizedState;s!==d||h!==f||Ro.current||Ii?("function"===typeof p&&(rs(t,n,p,r),f=t.memoizedState),(c=Ii||is(t,n,c,r,h,f,l)||!1)?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Es(e,t,n,r,i,o)}function Es(e,t,n,r,o,i){Cs(e,t);var a=0!==(128&t.flags);if(!r&&!a)return o&&Do(t,n,!1),Us(e,t,i);r=t.stateNode,bs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=wi(t,e.child,null,i),t.child=wi(t,null,s,i)):ys(e,t,s,i),t.memoizedState=r.state,o&&Do(t,n,!0),t.child}function Ms(e){var t=e.stateNode;t.pendingContext?Lo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Lo(0,t.context,!1),Gi(e,t.containerInfo)}function Rs(e,t,n,r,o){return fi(),mi(o),t.flags|=256,ys(e,t,n,r),t.child}var Ps,Os,Ts,Ns,Ls={dehydrated:null,treeContext:null,retryLane:0};function Is(e){return{baseLanes:e,cachePool:null,transitions:null}}function zs(e,t,n){var r,o=t.pendingProps,a=ea.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ao(ea,1&a),null===e)return ui(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Ic(l,o,0,null),e=Lc(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Is(n),t.memoizedState=Ls,e):Ds(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,s){if(n)return 256&t.flags?(t.flags&=-257,Fs(e,t,s,r=us(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Ic({mode:"visible",children:r.children},o,0,null),(a=Lc(a,o,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&wi(t,e.child,null,s),t.child.memoizedState=Is(s),t.memoizedState=Ls,a);if(0===(1&t.mode))return Fs(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Fs(e,t,s,r=us(a=Error(i(419)),r,void 0))}if(l=0!==(s&e.childLanes),xs||l){if(null!==(r=Ml)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Li(e,o),nc(r,e,o,-1))}return mc(),Fs(e,t,s,r=us(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=co(o.nextSibling),ri=t,ii=!0,ai=null,null!==e&&(Xo[Yo++]=Qo,Xo[Yo++]=Jo,Xo[Yo++]=Go,Qo=e.id,Jo=e.overflow,Go=t),t=Ds(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,a,n);if(s){s=o.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:o.children};return 0===(1&l)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null):(o=Tc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Tc(r,s):(s=Lc(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Is(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ls,o}return e=(s=e.child).sibling,o=Tc(s,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Ds(e,t){return(t=Ic({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fs(e,t,n,r){return null!==r&&mi(r),wi(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Mi(e.return,t,n)}function Ws(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Hs(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ys(e,t,r.children,n),0!==(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ao(ea,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ws(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ta(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ws(t,!0,n,null,i);break;case"together":Ws(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Us(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Tc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Tc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function qs(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function $s(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ks(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $s(t),null;case 1:case 17:return To(t.type)&&No(),$s(t),null;case 3:return r=t.stateNode,Qi(),_o(Ro),_o(Mo),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(hi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ai&&(ac(ai),ai=null))),Os(e,t),$s(t),null;case 5:Zi(t);var o=Yi(Xi.current);if(n=t.type,null!==e&&null!=t.stateNode)Ts(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return $s(t),null}if(e=Yi($i.current),hi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[po]=t,r[fo]=a,e=0!==(1&t.mode),n){case"dialog":Fr("cancel",r),Fr("close",r);break;case"iframe":case"object":case"embed":Fr("load",r);break;case"video":case"audio":for(o=0;o<Lr.length;o++)Fr(Lr[o],r);break;case"source":Fr("error",r);break;case"img":case"image":case"link":Fr("error",r),Fr("load",r);break;case"details":Fr("toggle",r);break;case"input":G(r,a),Fr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Fr("invalid",r);break;case"textarea":oe(r,a),Fr("invalid",r)}for(var l in be(n,a),o=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Jr(r.textContent,c,e),o=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Jr(r.textContent,c,e),o=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Fr("scroll",r)}switch(n){case"input":$(r),Z(r,a,!0);break;case"textarea":$(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Zr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[po]=t,e[fo]=r,Ps(e,t,!1,!1),t.stateNode=e;e:{switch(l=xe(n,r),n){case"dialog":Fr("cancel",e),Fr("close",e),o=r;break;case"iframe":case"object":case"embed":Fr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Lr.length;o++)Fr(Lr[o],e);o=r;break;case"source":Fr("error",e),o=r;break;case"img":case"image":case"link":Fr("error",e),Fr("load",e),o=r;break;case"details":Fr("toggle",e),o=r;break;case"input":G(e,r),o=Y(e,r),Fr("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=z({},r,{value:void 0}),Fr("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Fr("invalid",e)}for(a in be(n,o),c=o)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?ge(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Fr("scroll",e):null!=u&&x(e,a,u,l))}switch(n){case"input":$(e),Z(e,r,!1);break;case"textarea":$(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+U(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return $s(t),null;case 6:if(e&&null!=t.stateNode)Ns(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=Yi(Xi.current),Yi($i.current),hi(t)){if(r=t.stateNode,n=t.memoizedProps,r[po]=t,(a=r.nodeValue!==n)&&null!==(e=ri))switch(e.tag){case 3:Jr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[po]=t,t.stateNode=r}return $s(t),null;case 13:if(_o(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&0!==(1&t.mode)&&0===(128&t.flags))pi(),fi(),t.flags|=98560,a=!1;else if(a=hi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[po]=t}else fi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;$s(t),a=!1}else null!==ai&&(ac(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ea.current)?0===Nl&&(Nl=3):mc())),null!==t.updateQueue&&(t.flags|=4),$s(t),null);case 4:return Qi(),Os(e,t),null===e&&Hr(t.stateNode.containerInfo),$s(t),null;case 10:return Ei(t.type._context),$s(t),null;case 19:if(_o(ea),null===(a=t.memoizedState))return $s(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)qs(a,!1);else{if(0!==Nl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,qs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ao(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Qe()>Hl&&(t.flags|=128,r=!0,qs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),qs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!ii)return $s(t),null}else 2*Qe()-a.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,r=!0,qs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Qe(),t.sibling=null,n=ea.current,Ao(ea,r?1&n|2:1&n),t):($s(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ol)&&($s(t),6&t.subtreeFlags&&(t.flags|=8192)):$s(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Xs(e,t){switch(ni(t),t.tag){case 1:return To(t.type)&&No(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Qi(),_o(Ro),_o(Mo),ra(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zi(t),null;case 13:if(_o(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));fi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _o(ea),null;case 4:return Qi(),null;case 10:return Ei(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ps=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Os=function(){},Ts=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Yi($i.current);var i,a=null;switch(n){case"input":o=Y(e,o),r=Y(e,r),a=[];break;case"select":o=z({},o,{value:void 0}),r=z({},r,{value:void 0}),a=[];break;case"textarea":o=re(e,o),r=re(e,r),a=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(u in be(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Fr("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Ns=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Gs=!1,Qs="function"===typeof WeakSet?WeakSet:Set,Js=null;function Zs(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){jc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){jc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&el(t,n,i)}o=o.next}while(o!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[po],delete t[fo],delete t[go],delete t[vo],delete t[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(s){}switch(n.tag){case 5:Gs||Zs(n,t);case 6:var r=ul,o=dl;ul=null,hl(e,t,n),dl=o,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?lo(e.parentNode,n):1===e.nodeType&&lo(e,n),Ht(e)):lo(ul,n.stateNode));break;case 4:r=ul,o=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=o;break;case 0:case 11:case 14:case 15:if(!Gs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!==(2&i)||0!==(4&i))&&el(n,t,a),o=o.next}while(o!==r)}hl(e,t,n);break;case 1:if(!Gs&&(Zs(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){jc(n,t,s)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Gs=(r=Gs)||null!==n.memoizedState,hl(e,t,n),Gs=r):hl(e,t,n);break;default:hl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qs),t.forEach((function(t){var r=Ec.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(i(160));pl(a,s,o),ul=null,dl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(u){jc(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(g){jc(e,e.return,g)}try{nl(5,e,e.return)}catch(g){jc(e,e.return,g)}}break;case 1:ml(t,e),vl(e),512&r&&null!==n&&Zs(n,n.return);break;case 5:if(ml(t,e),vl(e),512&r&&null!==n&&Zs(n,n.return),32&e.flags){var o=e.stateNode;try{he(o,"")}catch(g){jc(e,e.return,g)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&Q(o,a),xe(l,s);var u=xe(l,a);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?ge(o,h):"dangerouslySetInnerHTML"===d?de(o,h):"children"===d?he(o,h):x(o,d,h,u)}switch(l){case"input":J(o,a);break;case"textarea":ie(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?ne(o,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(o,!!a.multiple,a.defaultValue,!0):ne(o,!!a.multiple,a.multiple?[]:"",!1))}o[fo]=a}catch(g){jc(e,e.return,g)}}break;case 6:if(ml(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(g){jc(e,e.return,g)}}break;case 3:if(ml(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(g){jc(e,e.return,g)}break;case 4:default:ml(t,e),vl(e);break;case 13:ml(t,e),vl(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Wl=Qe())),4&r&&fl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Gs=(u=Gs)||d,ml(t,e),Gs=u):ml(t,e),vl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(f=(p=Js).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Zs(p,p.return);var m=p.stateNode;if("function"===typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){jc(r,n,g)}}break;case 5:Zs(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Js=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{o=h.stateNode,u?"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",s))}catch(g){jc(e,e.return,g)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){jc(e,e.return,g)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),vl(e),4&r&&fl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(he(o,""),r.flags&=-33),cl(e,sl(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(i(161))}}catch(s){jc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Js=e,xl(e,t,n)}function xl(e,t,n){for(var r=0!==(1&e.mode);null!==Js;){var o=Js,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Ys;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Gs;s=Ys;var c=Gs;if(Ys=a,(Gs=l)&&!c)for(Js=o;null!==Js;)l=(a=Js).child,22===a.tag&&null!==a.memoizedState?Sl(o):null!==l?(l.return=a,Js=l):Sl(o);for(;null!==i;)Js=i,xl(i,t,n),i=i.sibling;Js=o,Ys=s,Gs=c}yl(e)}else 0!==(8772&o.subtreeFlags)&&null!==i?(i.return=o,Js=i):yl(e)}}function yl(e){for(;null!==Js;){var t=Js;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Gs||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Gs)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ui(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ui(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ht(h)}}}break;default:throw Error(i(163))}Gs||512&t.flags&&ol(t)}catch(p){jc(t,t.return,p)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function wl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function Sl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){jc(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){jc(t,o,l)}}var i=t.return;try{ol(t)}catch(l){jc(t,i,l)}break;case 5:var a=t.return;try{ol(t)}catch(l){jc(t,a,l)}}}catch(l){jc(t,t.return,l)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var kl,jl=Math.ceil,Cl=y.ReactCurrentDispatcher,_l=y.ReactCurrentOwner,Al=y.ReactCurrentBatchConfig,El=0,Ml=null,Rl=null,Pl=0,Ol=0,Tl=Co(0),Nl=0,Ll=null,Il=0,zl=0,Dl=0,Fl=null,Bl=null,Wl=0,Hl=1/0,Vl=null,Ul=!1,ql=null,$l=null,Kl=!1,Xl=null,Yl=0,Gl=0,Ql=null,Jl=-1,Zl=0;function ec(){return 0!==(6&El)?Qe():-1!==Jl?Jl:Jl=Qe()}function tc(e){return 0===(1&e.mode)?1:0!==(2&El)&&0!==Pl?Pl&-Pl:null!==gi.transition?(0===Zl&&(Zl=mt()),Zl):0!==(e=xt)?e:e=void 0===(e=window.event)?16:Gt(e.type)}function nc(e,t,n,r){if(50<Gl)throw Gl=0,Ql=null,Error(i(185));vt(e,n,r),0!==(2&El)&&e===Ml||(e===Ml&&(0===(2&El)&&(zl|=n),4===Nl&&sc(e,Pl)),rc(e,r),1===n&&0===El&&0===(1&t.mode)&&(Hl=Qe()+500,Bo&&Vo()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=ht(e,e===Ml?Pl:0);if(0===r)null!==n&&Xe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Xe(n),1===t)0===e.tag?function(e){Bo=!0,Ho(e)}(lc.bind(null,e)):Ho(lc.bind(null,e)),ao((function(){0===(6&El)&&Vo()})),n=null;else{switch(yt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Mc(n,oc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function oc(e,t){if(Jl=-1,Zl=0,0!==(6&El))throw Error(i(327));var n=e.callbackNode;if(Sc()&&e.callbackNode!==n)return null;var r=ht(e,e===Ml?Pl:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var o=El;El|=2;var a=fc();for(Ml===e&&Pl===t||(Vl=null,Hl=Qe()+500,hc(e,t));;)try{bc();break}catch(l){pc(e,l)}Ai(),Cl.current=a,El=o,null!==Rl?t=0:(Ml=null,Pl=0,t=Nl)}if(0!==t){if(2===t&&(0!==(o=ft(e))&&(r=o,t=ic(e,o))),1===t)throw n=Ll,hc(e,0),sc(e,r),rc(e,Qe()),n;if(6===t)sc(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sr(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=gc(e,r))&&(0!==(a=ft(e))&&(r=a,t=ic(e,a))),1===t))throw n=Ll,hc(e,0),sc(e,r),rc(e,Qe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:wc(e,Bl,Vl);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=Wl+500-Qe())){if(0!==ht(e,0))break;if(((o=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(wc.bind(null,e,Bl,Vl),t);break}wc(e,Bl,Vl);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jl(r/1960))-r)){e.timeoutHandle=ro(wc.bind(null,e,Bl,Vl),r);break}wc(e,Bl,Vl);break;default:throw Error(i(329))}}}return rc(e,Qe()),e.callbackNode===n?oc.bind(null,e):null}function ic(e,t){var n=Fl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Bl,Bl=n,null!==t&&ac(t)),e}function ac(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function sc(e,t){for(t&=~Dl,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!==(6&El))throw Error(i(327));Sc();var t=ht(e,0);if(0===(1&t))return rc(e,Qe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=ic(e,r))}if(1===n)throw n=Ll,hc(e,0),sc(e,t),rc(e,Qe()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Bl,Vl),rc(e,Qe()),null}function cc(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&(Hl=Qe()+500,Bo&&Vo())}}function uc(e){null!==Xl&&0===Xl.tag&&0===(6&El)&&Sc();var t=El;El|=1;var n=Al.transition,r=xt;try{if(Al.transition=null,xt=1,e)return e()}finally{xt=r,Al.transition=n,0===(6&(El=t))&&Vo()}}function dc(){Ol=Tl.current,_o(Tl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Rl)for(n=Rl.return;null!==n;){var r=n;switch(ni(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&No();break;case 3:Qi(),_o(Ro),_o(Mo),ra();break;case 5:Zi(r);break;case 4:Qi();break;case 13:case 19:_o(ea);break;case 10:Ei(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Ml=e,Rl=e=Tc(e.current,null),Pl=Ol=t,Nl=0,Ll=null,Dl=zl=Il=0,Bl=Fl=null,null!==Oi){for(t=0;t<Oi.length;t++)if(null!==(r=(n=Oi[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Oi=null}return e}function pc(e,t){for(;;){var n=Rl;try{if(Ai(),oa.current=Ja,ua){for(var r=sa.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ua=!1}if(aa=0,ca=la=sa=null,da=!1,ha=0,_l.current=null,null===n||null===n.return){Nl=1,Ll=t,Rl=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Pl,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=gs(s);if(null!==f){f.flags&=-257,vs(f,s,l,0,t),1&f.mode&&ms(a,u,t),c=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0===(1&t)){ms(a,u,t),mc();break e}c=Error(i(426))}else if(ii&&1&l.mode){var v=gs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),mi(cs(c,l));break e}}a=c=cs(c,l),4!==Nl&&(Nl=2),null===Fl?Fl=[a]:Fl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Hi(a,ps(0,c,t));break e;case 1:l=c;var b=a.type,x=a.stateNode;if(0===(128&a.flags)&&("function"===typeof b.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===$l||!$l.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t,Hi(a,fs(a,l,t));break e}}a=a.return}while(null!==a)}yc(n)}catch(y){t=y,Rl===n&&null!==n&&(Rl=n=n.return);continue}break}}function fc(){var e=Cl.current;return Cl.current=Ja,null===e?Ja:e}function mc(){0!==Nl&&3!==Nl&&2!==Nl||(Nl=4),null===Ml||0===(268435455&Il)&&0===(268435455&zl)||sc(Ml,Pl)}function gc(e,t){var n=El;El|=2;var r=fc();for(Ml===e&&Pl===t||(Vl=null,hc(e,t));;)try{vc();break}catch(o){pc(e,o)}if(Ai(),El=n,Cl.current=r,null!==Rl)throw Error(i(261));return Ml=null,Pl=0,Nl}function vc(){for(;null!==Rl;)xc(Rl)}function bc(){for(;null!==Rl&&!Ye();)xc(Rl)}function xc(e){var t=kl(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,null===t?yc(e):Rl=t,_l.current=null}function yc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ks(n,t,Ol)))return void(Rl=n)}else{if(null!==(n=Xs(n,t)))return n.flags&=32767,void(Rl=n);if(null===e)return Nl=6,void(Rl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Rl=t);Rl=t=e}while(null!==t);0===Nl&&(Nl=5)}function wc(e,t,n){var r=xt,o=Al.transition;try{Al.transition=null,xt=1,function(e,t,n,r){do{Sc()}while(null!==Xl);if(0!==(6&El))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-at(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Ml&&(Rl=Ml=null,Pl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Kl||(Kl=!0,Mc(tt,(function(){return Sc(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Al.transition,Al.transition=null;var s=xt;xt=1;var l=El;El|=4,_l.current=null,function(e,t){if(eo=Ut,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==o&&3!==h.nodeType||(l=s+o),h!==a||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===o&&(l=s),p===a&&++d===r&&(c=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Ut=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;1===y.nodeType?y.textContent="":9===y.nodeType&&y.documentElement&&y.removeChild(y.documentElement);break;default:throw Error(i(163))}}catch(w){jc(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}m=tl,tl=!1}(e,n),gl(n,e),fr(to),Ut=!!eo,to=eo=null,e.current=n,bl(n,e,o),Ge(),El=l,xt=s,Al.transition=a}else e.current=n;if(Kl&&(Kl=!1,Xl=e,Yl=o),a=e.pendingLanes,0===a&&($l=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ul)throw Ul=!1,e=ql,ql=null,e;0!==(1&Yl)&&0!==e.tag&&Sc(),a=e.pendingLanes,0!==(1&a)?e===Ql?Gl++:(Gl=0,Ql=e):Gl=0,Vo()}(e,t,n,r)}finally{Al.transition=o,xt=r}return null}function Sc(){if(null!==Xl){var e=yt(Yl),t=Al.transition,n=xt;try{if(Al.transition=null,xt=16>e?16:e,null===Xl)var r=!1;else{if(e=Xl,Xl=null,Yl=0,0!==(6&El))throw Error(i(331));var o=El;for(El|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(0!==(16&Js.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var p=(d=Js).sibling,f=d.return;if(il(d),d===u){Js=null;break}if(null!==p){p.return=f,Js=p;break}Js=f}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Js=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(0!==(2048&(a=Js).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,Js=b;break e}Js=a.return}}var x=e.current;for(Js=x;null!==Js;){var y=(s=Js).child;if(0!==(2064&s.subtreeFlags)&&null!==y)y.return=s,Js=y;else e:for(s=x;null!==Js;){if(0!==(2048&(l=Js).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(S){jc(l,l.return,S)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(El=o,Vo(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(S){}r=!0}return r}finally{xt=n,Al.transition=t}}return!1}function kc(e,t,n){e=Bi(e,t=ps(0,t=cs(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function jc(e,t,n){if(3===e.tag)kc(e,e,n);else for(;null!==t;){if(3===t.tag){kc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===$l||!$l.has(r))){t=Bi(t,e=fs(t,e=cs(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function Cc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Ml===e&&(Pl&n)===n&&(4===Nl||3===Nl&&(130023424&Pl)===Pl&&500>Qe()-Wl?hc(e,0):Dl|=n),rc(e,t)}function _c(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Li(e,t))&&(vt(e,t,n),rc(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_c(e,n)}function Ec(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),_c(e,n)}function Mc(e,t){return Ke(e,t)}function Rc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Pc(e,t,n,r){return new Rc(e,t,n,r)}function Oc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Tc(e,t){var n=e.alternate;return null===n?((n=Pc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nc(e,t,n,r,o,a){var s=2;if(r=e,"function"===typeof e)Oc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case k:return Lc(n.children,o,a,t);case j:s=8,o|=8;break;case C:return(e=Pc(12,n,t,2|o)).elementType=C,e.lanes=a,e;case M:return(e=Pc(13,n,t,o)).elementType=M,e.lanes=a,e;case R:return(e=Pc(19,n,t,o)).elementType=R,e.lanes=a,e;case T:return Ic(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case _:s=10;break e;case A:s=9;break e;case E:s=11;break e;case P:s=14;break e;case O:s=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Pc(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Lc(e,t,n,r){return(e=Pc(7,e,r,t)).lanes=n,e}function Ic(e,t,n,r){return(e=Pc(22,e,r,t)).elementType=T,e.lanes=n,e.stateNode={isHidden:!1},e}function zc(e,t,n){return(e=Pc(6,e,null,t)).lanes=n,e}function Dc(e,t,n){return(t=Pc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,o,i,a,s,l){return e=new Fc(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Pc(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zi(i),e}function Wc(e){if(!e)return Eo;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(To(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(To(n))return Io(e,n,t)}return t}function Hc(e,t,n,r,o,i,a,s,l){return(e=Bc(n,r,!0,e,0,i,0,s,l)).context=Wc(null),n=e.current,(i=Fi(r=ec(),o=tc(n))).callback=void 0!==t&&null!==t?t:null,Bi(n,i,o),e.current.lanes=o,vt(e,o,r),rc(e,r),e}function Vc(e,t,n,r){var o=t.current,i=ec(),a=tc(o);return n=Wc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Fi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bi(o,t,a))&&(nc(e,o,a,i),Wi(e,o,a)),a}function Uc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function $c(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}kl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ro.current)xs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return xs=!1,function(e,t,n){switch(t.tag){case 3:Ms(t),fi();break;case 5:Ji(t);break;case 1:To(t.type)&&zo(t);break;case 4:Gi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ao(ki,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ao(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?zs(e,t,n):(Ao(ea,1&ea.current),null!==(e=Us(e,t,n))?e.sibling:null);Ao(ea,1&ea.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Hs(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ao(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,js(e,t,n)}return Us(e,t,n)}(e,t,n);xs=0!==(131072&e.flags)}else xs=!1,ii&&0!==(1048576&t.flags)&&ei(t,Ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Oo(t,Mo.current);Ri(t,n),o=ga(null,t,r,e,o,n);var a=va();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(r)?(a=!0,zo(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,zi(t),o.updater=os,t.stateNode=o,o._reactInternals=t,ls(t,r,e,n),t=Es(null,t,r,!0,a,n)):(t.tag=0,ii&&a&&ti(t),ys(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Oc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===E)return 11;if(e===P)return 14}return 2}(r),e=ns(r,e),o){case 0:t=_s(null,t,r,e,n);break e;case 1:t=As(null,t,r,e,n);break e;case 11:t=ws(null,t,r,e,n);break e;case 14:t=Ss(null,t,r,ns(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,_s(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 1:return r=t.type,o=t.pendingProps,As(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 3:e:{if(Ms(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,Di(e,t),Vi(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Rs(e,t,r,n,o=cs(Error(i(423)),t));break e}if(r!==o){t=Rs(e,t,r,n,o=cs(Error(i(424)),t));break e}for(oi=co(t.stateNode.containerInfo.firstChild),ri=t,ii=!0,ai=null,n=Si(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fi(),r===o){t=Us(e,t,n);break e}ys(e,t,r,n)}t=t.child}return t;case 5:return Ji(t),null===e&&ui(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==a&&no(r,a)&&(t.flags|=32),Cs(e,t),ys(e,t,s,n),t.child;case 6:return null===e&&ui(t),null;case 13:return zs(e,t,n);case 4:return Gi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=wi(t,null,r,n):ys(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,ws(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 7:return ys(e,t,t.pendingProps,n),t.child;case 8:case 12:return ys(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Ao(ki,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===o.children&&!Ro.current){t=Us(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Fi(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Mi(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Mi(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ys(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ri(t,n),r=r(o=Pi(o)),t.flags|=1,ys(e,t,r,n),t.child;case 14:return o=ns(r=t.type,t.pendingProps),Ss(e,t,r,o=ns(r.type,o),n);case 15:return ks(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ns(r,o),Vs(e,t),t.tag=1,To(r)?(e=!0,zo(t)):e=!1,Ri(t,n),as(t,r,o),ls(t,r,o,n),Es(null,t,r,!0,e,n);case 19:return Hs(e,t,n);case 22:return js(e,t,n)}throw Error(i(156,t.tag))};var Kc="function"===typeof reportError?reportError:function(e){console.error(e)};function Xc(e){this._internalRoot=e}function Yc(e){this._internalRoot=e}function Gc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function Zc(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"===typeof o){var s=o;o=function(){var e=Uc(a);s.call(e)}}Vc(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=Uc(a);i.call(e)}}var a=Hc(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=a,e[mo]=a.current,Hr(8===e.nodeType?e.parentNode:e),uc(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var s=r;r=function(){var e=Uc(l);s.call(e)}}var l=Bc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[mo]=l.current,Hr(8===e.nodeType?e.parentNode:e),uc((function(){Vc(t,l,n,r)})),l}(n,t,e,o,r);return Uc(a)}Yc.prototype.render=Xc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Vc(e,t,null,null)},Yc.prototype.unmount=Xc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){Vc(null,e,null,null)})),t[mo]=null}},Yc.prototype.unstable_scheduleHydration=function(e){if(e){var t=jt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tt.length&&0!==t&&t<Tt[n].priority;n++);Tt.splice(n,0,e),0===n&&zt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),rc(t,Qe()),0===(6&El)&&(Hl=Qe()+500,Vo()))}break;case 13:uc((function(){var t=Li(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),$c(e,1)}},St=function(e){if(13===e.tag){var t=Li(e,134217728);if(null!==t)nc(t,e,134217728,ec());$c(e,134217728)}},kt=function(e){if(13===e.tag){var t=tc(e),n=Li(e,t);if(null!==n)nc(n,e,t,ec());$c(e,t)}},jt=function(){return xt},Ct=function(e,t){var n=xt;try{return xt=e,t()}finally{xt=n}},Se=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=So(r);if(!o)throw Error(i(90));K(r),J(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ee=cc,Me=uc;var eu={usingClientEntryPoint:!1,Events:[yo,wo,So,_e,Ae,cc]},tu={findFiberByHostInstance:xo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{ot=ru.inject(nu),it=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Gc(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Gc(e))throw Error(i(299));var n=!1,r="",o=Kc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Bc(e,1,!1,null,0,n,0,r,o),e[mo]=t.current,Hr(8===e.nodeType?e.parentNode:e),new Xc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=qe(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Qc(t))throw Error(i(200));return Zc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Gc(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",s=Kc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,o,0,a,s),e[mo]=t.current,Hr(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Yc(t)},t.render=function(e,t,n){if(!Qc(t))throw Error(i(200));return Zc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qc(e))throw Error(i(40));return!!e._reactRootContainer&&(uc((function(){Zc(null,null,e,!1,(function(){e._reactRootContainer=null,e[mo]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qc(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return Zc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},3174:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>S.A,StyledEngineProvider:()=>w,ThemeContext:()=>o.T,css:()=>v.AH,default:()=>k,internal_processStyles:()=>j,keyframes:()=>v.i7});var r=n(8168),o=n(9369),i=n(6598),a=n(9436),s=n(1722),l=n(5043),c=n(918),u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,c.A)((function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),h=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?d:h},f=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.SF)(t,n,r),(0,a.s)((function(){return(0,s.sk)(t,n,r)})),null},g=function e(t,n){var a,c,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(a=n.label,c=n.target);var h=f(t,n,u),g=h||p(d),v=!g("as");return function(){var b=arguments,x=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&x.push("label:"+a+";"),null==b[0]||void 0===b[0].raw)x.push.apply(x,b);else{var y=b[0];x.push(y[0]);for(var w=b.length,S=1;S<w;S++)x.push(b[S],y[S])}var k=(0,o.w)((function(e,t,n){var r=v&&e.as||d,a="",u=[],f=e;if(null==e.theme){for(var b in f={},e)f[b]=e[b];f.theme=l.useContext(o.T)}"string"===typeof e.className?a=(0,s.Rk)(t.registered,u,e.className):null!=e.className&&(a=e.className+" ");var y=(0,i.J)(x.concat(u),t.registered,f);a+=t.key+"-"+y.name,void 0!==c&&(a+=" "+c);var w=v&&void 0===h?p(r):g,S={};for(var k in e)v&&"as"===k||w(k)&&(S[k]=e[k]);return S.className=a,n&&(S.ref=n),l.createElement(l.Fragment,null,l.createElement(m,{cache:t,serialized:y,isStringTag:"string"===typeof r}),l.createElement(r,S))}));return k.displayName=void 0!==a?a:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",k.defaultProps=t.defaultProps,k.__emotion_real=k,k.__emotion_base=d,k.__emotion_styles=x,k.__emotion_forwardProp=h,Object.defineProperty(k,"toString",{value:function(){return"."+c}}),k.withComponent=function(t,o){return e(t,(0,r.A)({},n,o,{shouldForwardProp:f(k,o,!0)})).apply(void 0,x)},k}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){g[e]=g(e)}));var v=n(3290),b=n(3803),x=n(579);let y;function w(e){const{injectFirst:t,children:n}=e;return t&&y?(0,x.jsx)(o.C,{value:y,children:n}):n}"object"===typeof document&&(y=(0,b.A)({key:"css",prepend:!0}));var S=n(869);function k(e,t){return g(e,t)}const j=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},3234:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>i.A});var r=n(8812),o=n(8698),i=n(7758)},3290:(e,t,n)=>{"use strict";n.d(t,{AH:()=>u,i7:()=>d,mL:()=>c});var r=n(9369),o=n(5043),i=n(1722),a=n(9436),s=n(6598),l=(n(3803),n(219),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return o.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;s<i;s++)a[s]=n[s];return o.createElement.apply(null,a)});!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(l||(l={}));var c=(0,r.w)((function(e,t){var n=e.styles,l=(0,s.J)([n],void 0,o.useContext(r.T)),c=o.useRef();return(0,a.i)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,o=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(r=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),c.current=[n,r],function(){n.flush()}}),[t]),(0,a.i)((function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,i.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}}),[t,l.name]),null}));function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.J)(t)}function d(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},3382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>i});var r=n(191);const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t="".concat(e).match(o);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||i(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return a(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.vM:return s(e,e.render,"ForwardRef");case r.lD:return s(e,e.type,"memo");default:return}}}},3763:(e,t,n)=>{"use strict";e.exports=n(4983)},3803:(e,t,n)=>{"use strict";n.d(t,{A:()=>oe});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),o=Math.abs,i=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function h(e){return e.length}function p(e){return e.length}function f(e,t){return t.push(e),e}var m=1,g=1,v=0,b=0,x=0,y="";function w(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:m,column:g,length:a,return:""}}function S(e,t){return a(w("",null,null,"",null,null,0),e,{length:-e.length},t)}function k(){return x=b>0?u(y,--b):0,g--,10===x&&(g=1,m--),x}function j(){return x=b<v?u(y,b++):0,g++,10===x&&(g=1,m++),x}function C(){return u(y,b)}function _(){return b}function A(e,t){return d(y,e,t)}function E(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function M(e){return m=g=1,v=h(y=e),b=0,[]}function R(e){return y="",e}function P(e){return s(A(b-1,N(91===e?e+2:40===e?e+1:e)))}function O(e){for(;(x=C())&&x<33;)j();return E(e)>2||E(x)>3?"":" "}function T(e,t){for(;--t&&j()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return A(e,_()+(t<6&&32==C()&&32==j()))}function N(e){for(;j();)switch(x){case e:return b;case 34:case 39:34!==e&&39!==e&&N(x);break;case 40:41===e&&N(e);break;case 92:j()}return b}function L(e,t){for(;j()&&e+x!==57&&(e+x!==84||47!==C()););return"/*"+A(t,b-1)+"*"+i(47===e?e:j())}function I(e){for(;!E(C());)j();return A(e,b)}var z="-ms-",D="-moz-",F="-webkit-",B="comm",W="rule",H="decl",V="@keyframes";function U(e,t){for(var n="",r=p(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function q(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case H:return e.return=e.return||e.value;case B:return"";case V:return e.return=e.value+"{"+U(e.children,r)+"}";case W:e.value=e.props.join(",")}return h(n=U(e.children,r))?e.return=e.value+"{"+n+"}":""}function $(e){return R(K("",null,null,null,[""],e=M(e),0,[0],e))}function K(e,t,n,r,o,a,s,d,p){for(var m=0,g=0,v=s,b=0,x=0,y=0,w=1,S=1,A=1,E=0,M="",R=o,N=a,z=r,D=M;S;)switch(y=E,E=j()){case 40:if(108!=y&&58==u(D,v-1)){-1!=c(D+=l(P(E),"&","&\f"),"&\f")&&(A=-1);break}case 34:case 39:case 91:D+=P(E);break;case 9:case 10:case 13:case 32:D+=O(y);break;case 92:D+=T(_()-1,7);continue;case 47:switch(C()){case 42:case 47:f(Y(L(j(),_()),t,n),p);break;default:D+="/"}break;case 123*w:d[m++]=h(D)*A;case 125*w:case 59:case 0:switch(E){case 0:case 125:S=0;case 59+g:-1==A&&(D=l(D,/\f/g,"")),x>0&&h(D)-v&&f(x>32?G(D+";",r,n,v-1):G(l(D," ","")+";",r,n,v-2),p);break;case 59:D+=";";default:if(f(z=X(D,t,n,m,g,o,d,M,R=[],N=[],v),a),123===E)if(0===g)K(D,t,z,z,R,a,v,d,N);else switch(99===b&&110===u(D,3)?100:b){case 100:case 108:case 109:case 115:K(e,z,z,r&&f(X(e,z,z,0,0,o,d,M,o,R=[],v),N),o,N,v,d,r?R:N);break;default:K(D,z,z,z,[""],N,0,d,N)}}m=g=x=0,w=A=1,M=D="",v=s;break;case 58:v=1+h(D),x=y;default:if(w<1)if(123==E)--w;else if(125==E&&0==w++&&125==k())continue;switch(D+=i(E),E*w){case 38:A=g>0?1:(D+="\f",-1);break;case 44:d[m++]=(h(D)-1)*A,A=1;break;case 64:45===C()&&(D+=P(j())),b=C(),g=v=h(M=D+=I(_())),E++;break;case 45:45===y&&2==h(D)&&(w=0)}}return a}function X(e,t,n,r,i,a,c,u,h,f,m){for(var g=i-1,v=0===i?a:[""],b=p(v),x=0,y=0,S=0;x<r;++x)for(var k=0,j=d(e,g+1,g=o(y=c[x])),C=e;k<b;++k)(C=s(y>0?v[k]+" "+j:l(j,/&\f/g,v[k])))&&(h[S++]=C);return w(e,t,n,0===i?W:u,h,f,m)}function Y(e,t,n){return w(e,t,n,B,i(x),d(e,2,-2),0)}function G(e,t,n,r){return w(e,t,n,H,d(e,0,r),d(e,r+1,-1),r)}var Q=function(e,t,n){for(var r=0,o=0;r=o,o=C(),38===r&&12===o&&(t[n]=1),!E(o);)j();return A(e,b)},J=function(e,t){return R(function(e,t){var n=-1,r=44;do{switch(E(r)){case 0:38===r&&12===C()&&(t[n]=1),e[n]+=Q(b-1,t,n);break;case 2:e[n]+=P(r);break;case 4:if(44===r){e[++n]=58===C()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=j());return e}(M(e),t))},Z=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Z.get(n))&&!r){Z.set(e,!0);for(var o=[],i=J(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return F+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return F+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return F+e+D+e+z+e+e;case 6828:case 4268:return F+e+z+e+e;case 6165:return F+e+z+"flex-"+e+e;case 5187:return F+e+l(e,/(\w+).+(:[^]+)/,F+"box-$1$2"+z+"flex-$1$2")+e;case 5443:return F+e+z+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return F+e+z+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return F+e+z+l(e,"shrink","negative")+e;case 5292:return F+e+z+l(e,"basis","preferred-size")+e;case 6060:return F+"box-"+l(e,"-grow","")+F+e+z+l(e,"grow","positive")+e;case 4554:return F+l(e,/([^-])(transform)/g,"$1"+F+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,F+"$1"),/(image-set)/,F+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,F+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,F+"box-pack:$3"+z+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+F+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,F+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+F+"$2-$3$1"+D+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+F)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(45===u(e,14)?"inline-":"")+"box$3$1"+F+"$2$3$1"+z+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+z+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case H:e.return=ne(e.value,e.length);break;case V:return U([S(e,{value:l(e.value,"@","@"+F)})],r);case W:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return U([S(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return U([S(e,{props:[l(t,/:(plac\w+)/,":"+F+"input-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,z+"input-$1")]})],r)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||re,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)}));var c,u,d=[q,(u=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],h=function(e){var t=p(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([ee,te].concat(a,d));i=function(e,t,n,r){c=n,U($(e?e+"{"+t.styles+"}":t.styles),h),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new r({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(l),f}},3815:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9172);const o=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},4202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function b(){}function x(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)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,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var y=x.prototype=new b;y.constructor=x,m(y,v.prototype),y.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,k={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,o)&&!j.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:n,type:e,key:a,ref:s,props:i,_owner:k.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var A=/\/+/g;function E(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function M(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===i?"."+E(l,0):i,w(a)?(o="",null!=e&&(o=e.replace(A,"$&/")+"/"),M(a,t,o,"",(function(e){return e}))):null!=a&&(_(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(A,"$&/")+"/")+e)),t.push(a)),1;if(l=0,i=""===i?".":i+":",w(e))for(var c=0;c<e.length;c++){var u=i+E(s=e[c],c);l+=M(s,t,o,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=M(s=s.value,t,o,u=i+E(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function R(e,t,n){if(null==e)return e;var r=[],o=0;return M(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},T={transition:null},N={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:T,ReactCurrentOwner:k};function L(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:R,forEach:function(e,t,n){R(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return R(e,(function(){t++})),t},toArray:function(e){return R(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=a,t.PureComponent=x,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,t.act=L,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=k.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)S.call(t,c)&&!j.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=T.transition;T.transition={};try{e()}finally{T.transition=t}},t.unstable_act=L,t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.3.1"},4358:(e,t)=>{"use strict";const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,r=/^[\u0021-\u003A\u003C-\u007E]*$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,s=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function l(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function c(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function u(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},4391:(e,t,n)=>{"use strict";var r=n(7950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4853:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(8587),o=n(8168);const i=["values","unit","step"],a=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,o.A)({},e,{[t.key]:t.val})),{})};function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=e,l=(0,r.A)(e,i),c=a(t),u=Object.keys(c);function d(e){const r="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function h(e){const r="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-s/100).concat(n,")")}function p(e,r){const o=u.indexOf(r);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==o&&"number"===typeof t[u[o]]?t[u[o]]:r)-s/100).concat(n,")")}return(0,o.A)({keys:u,values:c,up:d,down:h,between:p,only:function(e){return u.indexOf(e)+1<u.length?p(e,u[u.indexOf(e)+1]):d(e)},not:function(e){const t=u.indexOf(e);return 0===t?d(u[1]):t===u.length-1?h(u[t]):p(e,u[u.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}},4893:e=>{e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},4983:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,y=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case o:return t}}}function S(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||w(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===s||e===a||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===b||e.$$typeof===x||e.$$typeof===y||e.$$typeof===v)},t.typeOf=w},4989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>o.A,unstable_applyStyles:()=>i.A});var r=n(8280),o=n(4853),i=n(9703)},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5043:(e,t,n)=>{"use strict";e.exports=n(4202)},6598:(e,t,n)=>{"use strict";n.d(t,{J:()=>g});var r={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},o=n(918),i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=(0,o.A)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return f={name:o.name,styles:o.styles,next:f},o.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)f={name:s.name,styles:s.styles,next:f},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=p(e,t,n[o])+";";else for(var a in n){var s=n[a];if("object"!==typeof s){var l=s;null!=t&&void 0!==t[l]?r+=a+"{"+t[l]+"}":c(l)&&(r+=u(a)+":"+d(a,l)+";")}else{if("NO_COMPONENT_SELECTOR"===a&&i)throw new Error(h);if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var f=p(e,t,s);switch(a){case"animation":case"animationName":r+=u(a)+":"+f+";";break;default:r+=a+"{"+f+"}"}}else for(var m=0;m<s.length;m++)c(s[m])&&(r+=u(a)+":"+d(a,s[m])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=f,m=n(e);return f=l,p(e,t,m)}}var g=n;if(null==t)return g;var v=t[g];return void 0!==v?v:g}var f,m=/label:\s*([^\s;{]+)\s*(;|$)/g;function g(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";f=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=p(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=p(n,t,e[a]),r)o+=i[a]}m.lastIndex=0;for(var s,l="";null!==(s=m.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:f}}},7162:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>i});var r=n(7598),o=n(9751);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,s)||{};return(0,o.NI)(e,c,(e=>{let o=a(u,l,e);return e===o&&"string"===typeof e&&(o=a(u,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[t],c}},7234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,x="undefined"!==typeof setImmediate?setImmediate:null;function y(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,y(e),!m)if(null!==r(c))m=!0,T(S);else{var t=r(u);null!==t&&N(w,t.startTime-e)}}function S(e,n){m=!1,g&&(g=!1,b(_),_=-1),f=!0;var i=p;try{for(y(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!M());){var a=h.callback;if("function"===typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(c)&&o(c),y(n)}else o(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&N(w,d.startTime-n),l=!1}return l}finally{h=null,p=i,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,j=!1,C=null,_=-1,A=5,E=-1;function M(){return!(t.unstable_now()-E<A)}function R(){if(null!==C){var e=t.unstable_now();E=e;var n=!0;try{n=C(!0,e)}finally{n?k():(j=!1,C=null)}}else j=!1}if("function"===typeof x)k=function(){x(R)};else if("undefined"!==typeof MessageChannel){var P=new MessageChannel,O=P.port2;P.port1.onmessage=R,k=function(){O.postMessage(null)}}else k=function(){v(R,0)};function T(e){C=e,j||(j=!0,k())}function N(e,n){_=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,T(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?a+i:a:i=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(b(_),_=-1):g=!0,N(w,i-a))):(e.sortIndex=s,n(c,e),m||f||(m=!0,T(S))),e},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},7266:(e,t,n)=>{"use strict";var r=n(4994);t.X4=p,t.e$=f,t.tL=g,t.eM=function(e,t){const n=h(e),r=h(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=m;var o=r(n(457)),i=r(n(9214));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,i.default)(e,t,n)}function s(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,o.default)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,o.default)(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e)).join(" ")};function u(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function d(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),u({type:s,values:c})}function h(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function p(e,t){return e=l(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,u(e)}function f(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function m(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return u(e)}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return h(e)>.5?f(e,t):m(e,t)}},7598:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7868);function o(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},7758:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var r=n(8604),o=n(7162),i=n(3815);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),o=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,i.A)(t,r[n](e)):t),{});return o.propTypes={},o.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),o};var s=n(9751);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,o.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),b=c("borderBottomColor"),x=c("borderLeftColor"),y=c("outline",l),w=c("outlineColor"),S=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"];a(u,d,h,p,f,m,g,v,b,x,S,y,w);const k=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};k.propTypes={},k.filterProps=["gap"];const j=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};j.propTypes={},j.filterProps=["columnGap"];const C=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};C.propTypes={},C.filterProps=["rowGap"];a(k,j,C,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"}));function _(e,t){return"grey"===t?t:e}a((0,o.Ay)({prop:"color",themeKey:"palette",transform:_}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:_}));function A(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const E=(0,o.Ay)({prop:"width",transform:A}),M=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.zu[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(o).concat(e.theme.breakpoints.unit)}:{maxWidth:o}:{maxWidth:A(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};M.filterProps=["maxWidth"];const R=(0,o.Ay)({prop:"minWidth",transform:A}),P=(0,o.Ay)({prop:"height",transform:A}),O=(0,o.Ay)({prop:"maxHeight",transform:A}),T=(0,o.Ay)({prop:"minHeight",transform:A}),N=((0,o.Ay)({prop:"size",cssProperty:"width",transform:A}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:A}),a(E,M,R,P,O,T,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:_},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_},backgroundColor:{themeKey:"palette",transform:_},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:k},rowGap:{style:C},columnGap:{style:j},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:A},maxWidth:{style:M},minWidth:{transform:A},height:{transform:A},maxHeight:{transform:A},minHeight:{transform:A},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},7868:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},7918:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(7598)},7950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2730)},8052:(e,t,n)=>{"use strict";var r=n(4994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=f,slotShouldForwardProp:l=f}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:v((0,o.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:m,skipSx:y,overridesResolver:w=b(g(p))}=c,S=(0,i.default)(c,h),k=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,j=y||!1;let C=f;"Root"===p||"root"===p?C=r:p?C=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const _=(0,a.default)(e,(0,o.default)({shouldForwardProp:C,label:undefined},S)),A=e=>"function"===typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>x(e,(0,o.default)({},r,{theme:v({theme:r.theme,defaultTheme:n,themeId:t})})):e,E=function(r){let i=A(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];const c=s?s.map(A):[];d&&w&&c.push((e=>{const r=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const i=r.components[d].styleOverrides,a={};return Object.entries(i).forEach((t=>{let[n,i]=t;a[n]=x(i,(0,o.default)({},e,{theme:r}))})),w(e,a)})),d&&!k&&c.push((e=>{var r;const i=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));return x({variants:null==i||null==(r=i.components)||null==(r=r[d])?void 0:r.variants},(0,o.default)({},e,{theme:i}))})),j||c.push(u);const h=c.length-s.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=_(i,...c);return e.muiName&&(p.muiName=e.muiName),p};return _.withConfig&&(E.withConfig=_.withConfig),E}};var o=r(n(4634)),i=r(n(4893)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(3174)),s=n(9482),l=(r(n(7918)),r(n(3382)),r(n(4989))),c=r(n(3234));const u=["ownerState"],d=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const m=(0,l.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function b(e){return e?(t,n)=>n[e]:null}function x(e,t){let{ownerState:n}=t,r=(0,i.default)(t,u);const a="function"===typeof e?e((0,o.default)({ownerState:n},r)):e;if(Array.isArray(a))return a.flatMap((e=>x(e,(0,o.default)({ownerState:n},r))));if(a&&"object"===typeof a&&Array.isArray(a.variants)){const{variants:e=[]}=a;let t=(0,i.default)(a,d);return e.forEach((e=>{let i=!0;"function"===typeof e.props?i=e.props((0,o.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,o.default)({ownerState:n},r,n)):e.style))})),t}return a}},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},8280:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(8168),o=n(8587),i=n(9172),a=n(4853);const s={borderRadius:4};var l=n(8604);var c=n(8812),u=n(7758),d=n(9703);const h=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:p,shape:f={}}=e,m=(0,o.A)(e,h),g=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map((e=>{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}(p);let b=(0,i.A)({breakpoints:g,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,f)},m);b.applyStyles=d.A;for(var x=arguments.length,y=new Array(x>1?x-1:0),w=1;w<x;w++)y[w-1]=arguments[w];return b=y.reduce(((e,t)=>(0,i.A)(e,t)),b),b.unstable_sxConfig=(0,r.A)({},u.A,null==m?void 0:m.unstable_sxConfig),b.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},b}},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},8604:(e,t,n)=>{"use strict";n.d(t,{LX:()=>f,MA:()=>p,_W:()=>m,Lc:()=>b,Ms:()=>x});var r=n(9751),o=n(7162),i=n(3815);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],o=s[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(e,t,n,r){var i;const a=null!=(i=(0,o.Yn)(e,t,!1))?i:n;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function f(e){return p(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,o){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(c(n),o),a=e[n];return(0,r.NI)(e,a,i)}function v(e,t){const n=f(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(i.A,{})}function b(e){return v(e,u)}function x(e){return v(e,d)}function y(e){return v(e,h)}b.propTypes={},b.filterProps=u,x.propTypes={},x.filterProps=d,y.propTypes={},y.filterProps=h},8698:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),o=n(8587),i=n(9172),a=n(7758);const s=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r};function c(e){const{sx:t}=e,n=(0,o.A)(e,s),{systemProps:a,otherProps:c}=l(n);let u;return u=Array.isArray(t)?[a,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,i.Q)(e)?(0,r.A)({},a,e):a}:(0,r.A)({},a,t),(0,r.A)({},c,{sx:u})}},8812:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,k:()=>l});var r=n(7598),o=n(3815),i=n(7162),a=n(9751),s=n(7758);function l(){function e(e,t,n,o){const s={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,i.Yn)(n,u)||{};if(h)return h(s);return(0,a.NI)(s,t,(t=>{let n=(0,i.BO)(p,d,t);return t===n&&"string"===typeof t&&(n=(0,i.BO)(p,d,"".concat(e).concat("default"===t?"":(0,r.A)(t)),t)),!1===c?n:{[c]:n}}))}return function t(n){var r;const{sx:i,theme:l={}}=n||{};if(!i)return null;const c=null!=(r=l.unstable_sxConfig)?r:s.A;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const i=(0,a.EU)(l.breakpoints),s=Object.keys(i);let u=i;return Object.keys(r).forEach((n=>{const i=(s=r[n],d=l,"function"===typeof s?s(d):s);var s,d;if(null!==i&&void 0!==i)if("object"===typeof i)if(c[n])u=(0,o.A)(u,e(n,i,l,c));else{const e=(0,a.NI)({theme:l},i,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>e.concat(Object.keys(t))),[]),o=new Set(r);return t.every((e=>o.size===Object.keys(e).length))}(e,i)?u=(0,o.A)(u,e):u[n]=t({sx:i,theme:l})}else u=(0,o.A)(u,e(n,i,l,c))})),(0,a.vf)(s,u)}return Array.isArray(i)?i.map(u):u(i)}}const c=l();c.filterProps=["sx"];const u=c},8853:(e,t,n)=>{"use strict";e.exports=n(7234)},9172:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Q:()=>i});var r=n(8168),o=n(5043);function i(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){if(o.isValidElement(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,r.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{o.isValidElement(t[r])?l[r]=t[r]:i(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&i(e[r])?l[r]=s(e[r],t[r],n):n.clone?l[r]=i(t[r])?a(t[r]):t[r]:l[r]=t[r]})),l}},9214:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},9369:(e,t,n)=>{"use strict";n.d(t,{C:()=>c,E:()=>g,T:()=>d,c:()=>f,h:()=>h,w:()=>u});var r=n(5043),o=n(3803),i=n(1722),a=n(6598),s=n(9436),l=r.createContext("undefined"!==typeof HTMLElement?(0,o.A)({key:"css"}):null),c=l.Provider,u=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(l);return e(t,o,n)}))},d=r.createContext({});var h={}.hasOwnProperty,p="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",f=function(e,t){var n={};for(var r in t)h.call(t,r)&&(n[r]=t[r]);return n[p]=e,n},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,i.SF)(t,n,r),(0,s.s)((function(){return(0,i.sk)(t,n,r)})),null},g=u((function(e,t,n){var o=e.css;"string"===typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var s=e[p],l=[o],c="";"string"===typeof e.className?c=(0,i.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var u=(0,a.J)(l,void 0,r.useContext(d));c+=t.key+"-"+u.name;var f={};for(var g in e)h.call(e,g)&&"css"!==g&&g!==p&&(f[g]=e[g]);return f.className=c,n&&(f.ref=n),r.createElement(r.Fragment,null,r.createElement(m,{cache:t,serialized:u,isStringTag:"string"===typeof s}),r.createElement(s,f))}))},9436:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>s,s:()=>a});var o=n(5043),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},9482:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(9172)},9703:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},9751:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>o});var r=n(9172);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(o[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||i;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"===typeof t){const e=r.breakpoints||i;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];const a=[t,...o].reduce(((e,t)=>(0,r.A)(e,t)),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:n,base:r}=e;const o=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r<e.length&&(n[t]=!0)})):r.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(t,n),i=Object.keys(o);if(0===i.length)return t;let a;return i.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e)),{})}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{Decoder:()=>je,Encoder:()=>Se,PacketType:()=>we,protocol:()=>ye});var t={};n.r(t),n.d(t,{hasBrowserEnv:()=>It,hasStandardBrowserEnv:()=>Dt,hasStandardBrowserWebWorkerEnv:()=>Ft,navigator:()=>zt,origin:()=>Bt});var r=n(5043),o=n.t(r,2),i=n(4391);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}function l(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d=Object.create(null);d.open="0",d.close="1",d.ping="2",d.pong="3",d.message="4",d.upgrade="5",d.noop="6";const h=Object.create(null);Object.keys(d).forEach((e=>{h[d[e]]=e}));const p={type:"error",data:"parser error"},f="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),m="function"===typeof ArrayBuffer,g=e=>"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,v=(e,t,n)=>{let{type:r,data:o}=e;return f&&o instanceof Blob?t?n(o):b(o,n):m&&(o instanceof ArrayBuffer||g(o))?t?n(o):b(new Blob([o]),n):n(d[r]+(o||""))},b=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function x(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let y;const w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S="undefined"===typeof Uint8Array?[]:new Uint8Array(256);for(let n=0;n<64;n++)S[w.charCodeAt(n)]=n;const k="function"===typeof ArrayBuffer,j=(e,t)=>{if("string"!==typeof e)return{type:"message",data:_(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:C(e.substring(1),t)};return h[n]?e.length>1?{type:h[n],data:e.substring(1)}:{type:h[n]}:p},C=(e,t)=>{if(k){const n=(e=>{let t,n,r,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)n=S[e.charCodeAt(t)],r=S[e.charCodeAt(t+1)],o=S[e.charCodeAt(t+2)],i=S[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c})(e);return _(n,t)}return{base64:!0,data:e}},_=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,A=String.fromCharCode(30);function E(){return new TransformStream({transform(e,t){!function(e,t){f&&e.data instanceof Blob?e.data.arrayBuffer().then(x).then(t):m&&(e.data instanceof ArrayBuffer||g(e.data))?t(x(e.data)):v(e,!1,(e=>{y||(y=new TextEncoder),t(y.encode(e))}))}(e,(n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const e=new DataView(o.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{o=new Uint8Array(9);const e=new DataView(o.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!==typeof e.data&&(o[0]|=128),t.enqueue(o),t.enqueue(n)}))}})}let M;function R(e){return e.reduce(((e,t)=>e+t.length),0)}function P(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function O(e){if(e)return function(e){for(var t in O.prototype)e[t]=O.prototype[t];return e}(e)}O.prototype.on=O.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},O.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},O.prototype.off=O.prototype.removeListener=O.prototype.removeAllListeners=O.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},O.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},O.prototype.emitReserved=O.prototype.emit,O.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},O.prototype.hasListeners=function(e){return!!this.listeners(e).length};const T="function"===typeof Promise&&"function"===typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),N="undefined"!==typeof self?self:"undefined"!==typeof window?window:Function("return this")();function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const I=N.setTimeout,z=N.clearTimeout;function D(e,t){t.useNativeTimers?(e.setTimeoutFn=I.bind(N),e.clearTimeoutFn=z.bind(N)):(e.setTimeoutFn=N.setTimeout.bind(N),e.clearTimeoutFn=N.clearTimeout.bind(N))}function F(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class B extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class W extends O{constructor(e){super(),this.writable=!1,D(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new B(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=j(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class H extends W{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(A),r=[];for(let o=0;o<n.length;o++){const e=j(n[o],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach(((e,i)=>{v(e,!1,(e=>{r[i]=e,++o===n&&t(r.join(A))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=F()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let V=!1;try{V="undefined"!==typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(AR){}const U=V;function q(){}class $ extends H{constructor(e){if(super(e),"undefined"!==typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!==typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}class K extends O{constructor(e,t,n){super(),this.createRequest=e,D(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var e;const t=L(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(r){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{n.setRequestHeader("Accept","*/*")}catch(r){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn((()=>{this._onError("number"===typeof n.status?n.status:0)}),0))},n.send(this._data)}catch(r){return void this.setTimeoutFn((()=>{this._onError(r)}),0)}"undefined"!==typeof document&&(this._index=K.requestsCount++,K.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if("undefined"!==typeof this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=q,e)try{this._xhr.abort()}catch(t){}"undefined"!==typeof document&&delete K.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(K.requestsCount=0,K.requests={},"undefined"!==typeof document)if("function"===typeof attachEvent)attachEvent("onunload",X);else if("function"===typeof addEventListener){addEventListener("onpagehide"in N?"pagehide":"unload",X,!1)}function X(){for(let e in K.requests)K.requests.hasOwnProperty(e)&&K.requests[e].abort()}const Y=function(){const e=G({xdomain:!1});return e&&null!==e.responseType}();function G(e){const t=e.xdomain;try{if("undefined"!==typeof XMLHttpRequest&&(!t||U))return new XMLHttpRequest}catch(n){}if(!t)try{return new(N[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(n){}}const Q="undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class J extends W{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=Q?{}:L(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(AR){return this.emitReserved("error",AR)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;v(n,this.supportsBinary,(e=>{try{this.doWrite(n,e)}catch(t){}r&&T((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){"undefined"!==typeof this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=F()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Z=N.WebSocket||N.MozWebSocket;const ee={websocket:class extends J{createSocket(e,t,n){return Q?new Z(e,t,n):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends W{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(AR){return this.emitReserved("error",AR)}this._transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this._transport.ready.then((()=>{this._transport.createBidirectionalStream().then((e=>{const t=function(e,t){M||(M=new TextDecoder);const n=[];let r=0,o=-1,i=!1;return new TransformStream({transform(a,s){for(n.push(a);;){if(0===r){if(R(n)<1)break;const e=P(n,1);i=128===(128&e[0]),o=127&e[0],r=o<126?3:126===o?1:2}else if(1===r){if(R(n)<2)break;const e=P(n,2);o=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(R(n)<8)break;const e=P(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>Math.pow(2,21)-1){s.enqueue(p);break}o=i*Math.pow(2,32)+t.getUint32(4),r=3}else{if(R(n)<o)break;const e=P(n,o);s.enqueue(j(i?e:M.decode(e),t)),r=0}if(0===o||o>e){s.enqueue(p);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=E();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const o=()=>{n.read().then((e=>{let{done:t,value:n}=e;t||(this.onPacket(n),o())})).catch((e=>{}))};o();const i={type:"open"};this.query.sid&&(i.data='{"sid":"'.concat(this.query.sid,'"}')),this._writer.write(i).then((()=>this.onOpen()))}))}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this._writer.write(n).then((()=>{r&&T((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends ${constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Y&&!t}request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(e,{xd:this.xd},this.opts),new K(G,this.uri(),e)}}},te=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ne=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function re(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=te.exec(e||""),i={},a=14;for(;a--;)i[ne[a]]=o[a]||"";return-1!=n&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,i.query),i}const oe="function"===typeof addEventListener&&"function"===typeof removeEventListener,ie=[];oe&&addEventListener("offline",(()=>{ie.forEach((e=>e()))}),!1);class ae extends O{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"===typeof e&&(t=e,e=null),e){const n=re(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=re(t.host).host);D(this,t),this.secure=null!=t.secure?t.secure:"undefined"!==typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!==typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!==typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach((e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"===typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let e=n[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),oe&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ie.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const e=this.opts.rememberUpgrade&&ae.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(e=>this._onClose("transport close",e)))}onOpen(){this.readyState="open",ae.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn((()=>{this._onClose("ping timeout")}),e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const r=this.writeBuffer[n].data;if(r&&(e+="string"===typeof(t=r)?function(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this._maxPayload)return this.writeBuffer.slice(0,n);e+=2}var t;return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,T((()=>{this._onClose("ping timeout")}),this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"===typeof t&&(r=t,t=void 0),"function"===typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}_onError(e){if(ae.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),oe&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=ie.indexOf(this._offlineEventListener);-1!==e&&ie.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}ae.protocol=4;class se extends ae{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;ae.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;ae.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function o(){n||(n=!0,c(),t.close(),t=null)}const i=e=>{const n=new Error("probe error: "+e);n.transport=t.name,o(),this.emitReserved("upgradeError",n)};function a(){i("transport closed")}function s(){i("socket closed")}function l(e){t&&e.name!==t.name&&o()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",a),this.off("close",s),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",a),this.once("close",s),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{n||t.open()}),200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}class le extends se{constructor(e){const t="object"===typeof e?e:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(!t.transports||t.transports&&"string"===typeof t.transports[0])&&(t.transports=(t.transports||["polling","websocket","webtransport"]).map((e=>ee[e])).filter((e=>!!e))),super(e,t)}}const ce="function"===typeof ArrayBuffer,ue=Object.prototype.toString,de="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===ue.call(Blob),he="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===ue.call(File);function pe(e){return ce&&(e instanceof ArrayBuffer||(e=>"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||de&&e instanceof Blob||he&&e instanceof File}function fe(e,t){if(!e||"object"!==typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(fe(e[t]))return!0;return!1}if(pe(e))return!0;if(e.toJSON&&"function"===typeof e.toJSON&&1===arguments.length)return fe(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&fe(e[n]))return!0;return!1}function me(e){const t=[],n=e.data,r=e;return r.data=ge(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ge(e,t){if(!e)return e;if(pe(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=ge(e[r],t);return n}if("object"===typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ge(e[r],t));return n}return e}function ve(e,t){return e.data=be(e.data,t),delete e.attachments,e}function be(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"===typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=be(e[n],t);else if("object"===typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=be(e[n],t));return e}const xe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ye=5;var we;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(we||(we={}));class Se{constructor(e){this.replacer=e}encode(e){return e.type!==we.EVENT&&e.type!==we.ACK||!fe(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===we.EVENT?we.BINARY_EVENT:we.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==we.BINARY_EVENT&&e.type!==we.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=me(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}}function ke(e){return"[object Object]"===Object.prototype.toString.call(e)}class je extends O{constructor(e){super(),this.reviver=e}add(e){let t;if("string"===typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===we.BINARY_EVENT;n||t.type===we.BINARY_ACK?(t.type=n?we.EVENT:we.ACK,this.reconstructor=new Ce(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!pe(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===we[n.type])throw new Error("unknown packet type "+n.type);if(n.type===we.BINARY_EVENT||n.type===we.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!je.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case we.CONNECT:return ke(t);case we.DISCONNECT:return void 0===t;case we.CONNECT_ERROR:return"string"===typeof t||ke(t);case we.EVENT:case we.BINARY_EVENT:return Array.isArray(t)&&("number"===typeof t[0]||"string"===typeof t[0]&&-1===xe.indexOf(t[0]));case we.ACK:case we.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ce{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ve(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function _e(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Ae=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ee extends O{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[_e(e,"open",this.onopen.bind(this)),_e(e,"packet",this.onpacket.bind(this)),_e(e,"error",this.onerror.bind(this)),_e(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift("message"),this.emit.apply(this,t),this}emit(e){var t,n,r;if(Ae.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(i.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const s={type:we.EVENT,data:i,options:{}};if(s.options.compress=!1!==this.flags.compress,"function"===typeof i[i.length-1]){const e=this.ids++,t=i.pop();this._registerAckCallback(e,t),s.id=e}const l=null===(n=null===(t=this.io.engine)||void 0===t?void 0:t.transport)||void 0===n?void 0:n.writable,c=this.connected&&!(null===(r=this.io.engine)||void 0===r?void 0:r._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,t){var n,r=this;const o=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===o)return void(this.acks[e]=t);const i=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),o),a=function(){r.io.clearTimeoutFn(i);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];t.apply(r,n)};a.withError=!0,this.acks[e]=a}emitWithAck(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new Promise(((t,r)=>{const o=(e,n)=>e?r(e):t(n);o.withError=!0,n.push(o),this.emit(e,...n)}))}_addToQueue(e){var t=this;let n;"function"===typeof e[e.length-1]&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((function(e){if(r!==t._queue[0])return;if(null!==e)r.tryCount>t._opts.retries&&(t._queue.shift(),n&&n(e));else if(t._queue.shift(),n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];n(null,...i)}return r.pending=!1,t._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:we.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case we.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case we.EVENT:case we.BINARY_EVENT:this.onevent(e);break;case we.ACK:case we.BINARY_ACK:this.onack(e);break;case we.DISCONNECT:this.ondisconnect();break;case we.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"===typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t.packet({type:we.ACK,id:e,data:o})}}}onack(e){const t=this.acks[e.id];"function"===typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:we.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function Me(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Me.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},Me.prototype.reset=function(){this.attempts=0},Me.prototype.setMin=function(e){this.ms=e},Me.prototype.setMax=function(e){this.max=e},Me.prototype.setJitter=function(e){this.jitter=e};class Re extends O{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&"object"===typeof t&&(n=t,t=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,D(this,n),this.reconnection(!1!==n.reconnection),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=n.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new Me({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==n.timeout?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||e;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=!1!==n.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new le(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=_e(t,"open",(function(){n.onopen(),e&&e()})),o=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=_e(t,"error",o);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn((()=>{r(),o(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(_e(e,"ping",this.onping.bind(this)),_e(e,"data",this.ondata.bind(this)),_e(e,"error",this.onerror.bind(this)),_e(e,"close",this.onclose.bind(this)),_e(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){T((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Ee(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t){if(this.nsps[n].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Pe={};function Oe(e,t){"object"===typeof e&&(t=e,e=void 0);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=e;n=n||"undefined"!==typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"===typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e="undefined"!==typeof n?n.protocol+"//"+e:"https://"+e),r=re(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,o=n.id,i=n.path,a=Pe[o]&&i in Pe[o].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new Re(r,t):(Pe[o]||(Pe[o]=new Re(r,t)),s=Pe[o]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}function Te(e,t){return function(){return e.apply(t,arguments)}}Object.assign(Oe,{Manager:Re,Socket:Ee,io:Oe,connect:Oe});const{toString:Ne}=Object.prototype,{getPrototypeOf:Le}=Object,{iterator:Ie,toStringTag:ze}=Symbol,De=(e=>t=>{const n=Ne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Fe=e=>(e=e.toLowerCase(),t=>De(t)===e),Be=e=>t=>typeof t===e,{isArray:We}=Array,He=Be("undefined");const Ve=Fe("ArrayBuffer");const Ue=Be("string"),qe=Be("function"),$e=Be("number"),Ke=e=>null!==e&&"object"===typeof e,Xe=e=>{if("object"!==De(e))return!1;const t=Le(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(ze in e)&&!(Ie in e)},Ye=Fe("Date"),Ge=Fe("File"),Qe=Fe("Blob"),Je=Fe("FileList"),Ze=Fe("URLSearchParams"),[et,tt,nt,rt]=["ReadableStream","Request","Response","Headers"].map(Fe);function ot(e,t){let n,r,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),We(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{const r=o?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let a;for(n=0;n<i;n++)a=r[n],t.call(null,e[a],a,e)}}function it(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const at="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,st=e=>!He(e)&&e!==at;const lt=(ct="undefined"!==typeof Uint8Array&&Le(Uint8Array),e=>ct&&e instanceof ct);var ct;const ut=Fe("HTMLFormElement"),dt=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),ht=Fe("RegExp"),pt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ot(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)};const ft=Fe("AsyncFunction"),mt=((e,t)=>{return e?setImmediate:t?(n="axios@".concat(Math.random()),r=[],at.addEventListener("message",(e=>{let{source:t,data:o}=e;t===at&&o===n&&r.length&&r.shift()()}),!1),e=>{r.push(e),at.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,qe(at.postMessage)),gt="undefined"!==typeof queueMicrotask?queueMicrotask.bind(at):"undefined"!==typeof process&&process.nextTick||mt,vt={isArray:We,isArrayBuffer:Ve,isBuffer:function(e){return null!==e&&!He(e)&&null!==e.constructor&&!He(e.constructor)&&qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||qe(e.append)&&("formdata"===(t=De(e))||"object"===t&&qe(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Ve(e.buffer),t},isString:Ue,isNumber:$e,isBoolean:e=>!0===e||!1===e,isObject:Ke,isPlainObject:Xe,isReadableStream:et,isRequest:tt,isResponse:nt,isHeaders:rt,isUndefined:He,isDate:Ye,isFile:Ge,isBlob:Qe,isRegExp:ht,isFunction:qe,isStream:e=>Ke(e)&&qe(e.pipe),isURLSearchParams:Ze,isTypedArray:lt,isFileList:Je,forEach:ot,merge:function e(){const{caseless:t}=st(this)&&this||{},n={},r=(r,o)=>{const i=t&&it(n,o)||o;Xe(n[i])&&Xe(r)?n[i]=e(n[i],r):Xe(r)?n[i]=e({},r):We(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&ot(arguments[o],r);return n},extend:function(e,t,n){let{allOwnKeys:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ot(t,((t,r)=>{n&&qe(t)?e[r]=Te(t,n):e[r]=t}),{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Le(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:De,kindOfTest:Fe,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(We(e))return e;let t=e.length;if(!$e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Ie]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:ut,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:pt,freezeMethods:e=>{pt(e,((t,n)=>{if(qe(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];qe(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return We(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:it,global:at,isContextDefined:st,isSpecCompliantForm:function(e){return!!(e&&qe(e.append)&&"FormData"===e[ze]&&e[Ie])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ke(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=We(e)?[]:{};return ot(e,((e,t)=>{const i=n(e,r+1);!He(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:ft,isThenable:e=>e&&(Ke(e)||qe(e))&&qe(e.then)&&qe(e.catch),setImmediate:mt,asap:gt,isIterable:e=>null!=e&&qe(e[Ie])};function bt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}vt.inherits(bt,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:vt.toJSONObject(this.config),code:this.code,status:this.status}}});const xt=bt.prototype,yt={};["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((e=>{yt[e]={value:e}})),Object.defineProperties(bt,yt),Object.defineProperty(xt,"isAxiosError",{value:!0}),bt.from=(e,t,n,r,o,i)=>{const a=Object.create(xt);return vt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),bt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const wt=bt;function St(e){return vt.isPlainObject(e)||vt.isArray(e)}function kt(e){return vt.endsWith(e,"[]")?e.slice(0,-2):e}function jt(e,t,n){return e?e.concat(t).map((function(e,t){return e=kt(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Ct=vt.toFlatObject(vt,{},null,(function(e){return/^is[A-Z]/.test(e)}));const _t=function(e,t,n){if(!vt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=vt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!vt.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&vt.isSpecCompliantForm(t);if(!vt.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(vt.isDate(e))return e.toISOString();if(!s&&vt.isBlob(e))throw new wt("Blob is not supported. Use a Buffer instead.");return vt.isArrayBuffer(e)||vt.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"===typeof e)if(vt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(vt.isArray(e)&&function(e){return vt.isArray(e)&&!e.some(St)}(e)||(vt.isFileList(e)||vt.endsWith(n,"[]"))&&(s=vt.toArray(e)))return n=kt(n),s.forEach((function(e,r){!vt.isUndefined(e)&&null!==e&&t.append(!0===a?jt([n],r,i):null===a?n:n+"[]",l(e))})),!1;return!!St(e)||(t.append(jt(o,n,i),l(e)),!1)}const u=[],d=Object.assign(Ct,{defaultVisitor:c,convertValue:l,isVisitable:St});if(!vt.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!vt.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),vt.forEach(n,(function(n,i){!0===(!(vt.isUndefined(n)||null===n)&&o.call(t,n,vt.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function At(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Et(e,t){this._pairs=[],e&&_t(e,this,t)}const Mt=Et.prototype;Mt.append=function(e,t){this._pairs.push([e,t])},Mt.toString=function(e){const t=e?function(t){return e.call(this,t,At)}:At;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Rt=Et;function Pt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ot(e,t,n){if(!t)return e;const r=n&&n.encode||Pt;vt.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):vt.isURLSearchParams(t)?t.toString():new Rt(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Tt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){vt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lt={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:Rt,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},It="undefined"!==typeof window&&"undefined"!==typeof document,zt="object"===typeof navigator&&navigator||void 0,Dt=It&&(!zt||["ReactNative","NativeScript","NS"].indexOf(zt.product)<0),Ft="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,Bt=It&&window.location.href||"http://localhost",Wt=u(u({},t),Lt);const Ht=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&vt.isArray(r)?r.length:i,s)return vt.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&vt.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&vt.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(vt.isFormData(e)&&vt.isFunction(e.entries)){const n={};return vt.forEachEntry(e,((e,r)=>{t(function(e){return vt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Vt={transitional:Nt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=vt.isObject(e);o&&vt.isHTMLForm(e)&&(e=new FormData(e));if(vt.isFormData(e))return r?JSON.stringify(Ht(e)):e;if(vt.isArrayBuffer(e)||vt.isBuffer(e)||vt.isStream(e)||vt.isFile(e)||vt.isBlob(e)||vt.isReadableStream(e))return e;if(vt.isArrayBufferView(e))return e.buffer;if(vt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return _t(e,new Wt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Wt.isNode&&vt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=vt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return _t(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(vt.isString(e))try{return(t||JSON.parse)(e),vt.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Vt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(vt.isResponse(e)||vt.isReadableStream(e))return e;if(e&&vt.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw wt.from(o,wt.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};vt.forEach(["delete","get","head","post","put","patch"],(e=>{Vt.headers[e]={}}));const Ut=Vt,qt=vt.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"]),$t=Symbol("internals");function Kt(e){return e&&String(e).trim().toLowerCase()}function Xt(e){return!1===e||null==e?e:vt.isArray(e)?e.map(Xt):String(e)}function Yt(e,t,n,r,o){return vt.isFunction(r)?r.call(this,t,n):(o&&(t=n),vt.isString(t)?vt.isString(r)?-1!==t.indexOf(r):vt.isRegExp(r)?r.test(t):void 0:void 0)}class Gt{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Kt(t);if(!o)throw new Error("header name must be a non-empty string");const i=vt.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Xt(e))}const i=(e,t)=>vt.forEach(e,((e,n)=>o(e,n,t)));if(vt.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(vt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&qt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(vt.isObject(e)&&vt.isIterable(e)){let n,r,o={};for(const t of e){if(!vt.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?vt.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Kt(e)){const n=vt.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(vt.isFunction(t))return t.call(this,e,n);if(vt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Kt(e)){const n=vt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Yt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Kt(e)){const o=vt.findKey(n,e);!o||t&&!Yt(0,n[o],o,t)||(delete n[o],r=!0)}}return vt.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Yt(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return vt.forEach(this,((r,o)=>{const i=vt.findKey(n,o);if(i)return t[i]=Xt(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Xt(r),n[a]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return vt.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&vt.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,n]=e;return t+": "+n})).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((e=>t.set(e))),t}static accessor(e){const t=(this[$t]=this[$t]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Kt(e);t[r]||(!function(e,t){const n=vt.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return vt.isArray(e)?e.forEach(r):r(e),this}}Gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),vt.reduceDescriptors(Gt.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),vt.freezeMethods(Gt);const Qt=Gt;function Jt(e,t){const n=this||Ut,r=t||n,o=Qt.from(r.headers);let i=r.data;return vt.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Zt(e){return!(!e||!e.__CANCEL__)}function en(e,t,n){wt.call(this,null==e?"canceled":e,wt.ERR_CANCELED,t,n),this.name="CanceledError"}vt.inherits(en,wt,{__CANCEL__:!0});const tn=en;function nn(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const rn=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}};const on=function(e,t){let n,r,o=0,i=1e3/t;const a=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){const e=Date.now(),t=e-o;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];t>=i?a(l,e):(n=l,r||(r=setTimeout((()=>{r=null,a(n)}),i-t)))},()=>n&&a(n)]},an=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const o=rn(50,250);return on((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},sn=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ln=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vt.asap((()=>e(...n)))},cn=Wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,un=Wt.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];vt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),vt.isString(r)&&a.push("path="+r),vt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function dn(e,t,n){let r=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const hn=e=>e instanceof Qt?u({},e):e;function pn(e,t){t=t||{};const n={};function r(e,t,n,r){return vt.isPlainObject(e)&&vt.isPlainObject(t)?vt.merge.call({caseless:r},e,t):vt.isPlainObject(t)?vt.merge({},t):vt.isArray(t)?t.slice():t}function o(e,t,n,o){return vt.isUndefined(t)?vt.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!vt.isUndefined(t))return r(void 0,t)}function a(e,t){return vt.isUndefined(t)?vt.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(hn(e),hn(t),0,!0)};return vt.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=l[r]||o,a=i(e[r],t[r],r);vt.isUndefined(a)&&i!==s||(n[r]=a)})),n}const fn=e=>{const t=pn({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Qt.from(s),t.url=Ot(dn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),vt.isFormData(r))if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(Wt.hasStandardBrowserEnv&&(o&&vt.isFunction(o)&&(o=o(t)),o||!1!==o&&cn(t.url))){const e=i&&a&&un.read(a);e&&s.set(i,e)}return t},mn="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=fn(e);let o=r.data;const i=Qt.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=r;function f(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Qt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());nn((function(e){t(e),f()}),(function(e){n(e),f()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new wt("Request aborted",wt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new wt("Network Error",wt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Nt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new wt(t,o.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&vt.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),vt.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=an(p,!0),m.addEventListener("progress",l)),h&&m.upload&&([s,c]=an(h),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new tn(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===Wt.protocols.indexOf(v)?n(new wt("Unsupported protocol "+v+":",wt.ERR_BAD_REQUEST,e)):m.send(o||null)}))},gn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof wt?t:new tn(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new wt("timeout ".concat(t," of ms exceeded"),wt.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>vt.asap(a),s}};function vn(e,t){this.v=e,this.k=t}function bn(e){return function(){return new xn(e.apply(this,arguments))}}function xn(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,s=a instanceof vn;Promise.resolve(s?a.v:a).then((function(n){if(s){var l="return"===t?"return":"next";if(!a.k||n.done)return r(l,n);n=e[l](n).value}o(i.done?"return":"normal",n)}),(function(e){r("throw",e)}))}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise((function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function yn(e){return new vn(e,0)}function wn(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise((function(n){n(e[t](r))})),{done:!1,value:new vn(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function Sn(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new kn(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function kn(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return kn=function(e){this.s=e,this.n=e.next},kn.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new kn(e)}xn.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},xn.prototype.next=function(e){return this._invoke("next",e)},xn.prototype.throw=function(e){return this._invoke("throw",e)},xn.prototype.return=function(e){return this._invoke("return",e)};const jn=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Cn=function(){var e=bn((function*(e,t){var n,r=!1,o=!1;try{for(var i,a=Sn(_n(e));r=!(i=yield yn(a.next())).done;r=!1){const e=i.value;yield*wn(Sn(jn(e,t)))}}catch(AR){o=!0,n=AR}finally{try{r&&null!=a.return&&(yield yn(a.return()))}finally{if(o)throw n}}}));return function(t,n){return e.apply(this,arguments)}}(),_n=function(){var e=bn((function*(e){if(e[Symbol.asyncIterator])return void(yield*wn(Sn(e)));const t=e.getReader();try{for(;;){const{done:e,value:n}=yield yn(t.read());if(e)break;yield n}}finally{yield yn(t.cancel())}}));return function(t){return e.apply(this,arguments)}}(),An=(e,t,n,r)=>{const o=Cn(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(AR){throw s(AR),AR}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},En="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,Mn=En&&"function"===typeof ReadableStream,Rn=En&&("function"===typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pn=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return!!e(...n)}catch(o){return!1}},On=Mn&&Pn((()=>{let e=!1;const t=new Request(Wt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Tn=Mn&&Pn((()=>vt.isReadableStream(new Response("").body))),Nn={stream:Tn&&(e=>e.body)};var Ln;En&&(Ln=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Nn[e]&&(Nn[e]=vt.isFunction(Ln[e])?t=>t[e]():(t,n)=>{throw new wt("Response type '".concat(e,"' is not supported"),wt.ERR_NOT_SUPPORT,n)})})));const In=async(e,t)=>{const n=vt.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(vt.isBlob(e))return e.size;if(vt.isSpecCompliantForm(e)){const t=new Request(Wt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return vt.isArrayBufferView(e)||vt.isArrayBuffer(e)?e.byteLength:(vt.isURLSearchParams(e)&&(e+=""),vt.isString(e)?(await Rn(e)).byteLength:void 0)})(t):n},zn=En&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:d,withCredentials:h="same-origin",fetchOptions:p}=fn(e);c=c?(c+"").toLowerCase():"text";let f,m=gn([o,i&&i.toAbortSignal()],a);const g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let v;try{if(l&&On&&"get"!==n&&"head"!==n&&0!==(v=await In(d,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(vt.isFormData(r)&&(e=n.headers.get("content-type"))&&d.setContentType(e),n.body){const[e,t]=sn(v,an(ln(l)));r=An(n.body,65536,e,t)}}vt.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,u(u({},p),{},{signal:m,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:o?h:void 0}));let i=await fetch(f);const a=Tn&&("stream"===c||"response"===c);if(Tn&&(s||a&&g)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=vt.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&sn(t,an(ln(s),!0))||[];i=new Response(An(i.body,65536,n,(()=>{r&&r(),g&&g()})),e)}c=c||"text";let b=await Nn[vt.findKey(Nn,c)||"text"](i,e);return!a&&g&&g(),await new Promise(((t,n)=>{nn(t,n,{data:b,headers:Qt.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(AR){if(g&&g(),AR&&"TypeError"===AR.name&&/Load failed|fetch/i.test(AR.message))throw Object.assign(new wt("Network Error",wt.ERR_NETWORK,e,f),{cause:AR.cause||AR});throw wt.from(AR,AR&&AR.code,e,f)}}),Dn={http:null,xhr:mn,fetch:zn};vt.forEach(Dn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const Fn=e=>"- ".concat(e),Bn=e=>vt.isFunction(e)||null===e||!1===e,Wn=e=>{e=vt.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Bn(n)&&(r=Dn[(t=String(n)).toLowerCase()],void 0===r))throw new wt("Unknown adapter '".concat(t,"'"));if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((e=>{let[t,n]=e;return"adapter ".concat(t," ")+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=t?e.length>1?"since :\n"+e.map(Fn).join("\n"):" "+Fn(e[0]):"as no adapter specified";throw new wt("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Hn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tn(null,e)}function Vn(e){Hn(e),e.headers=Qt.from(e.headers),e.data=Jt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Wn(e.adapter||Ut.adapter)(e).then((function(t){return Hn(e),t.data=Jt.call(e,e.transformResponse,t),t.headers=Qt.from(t.headers),t}),(function(t){return Zt(t)||(Hn(e),t&&t.response&&(t.response.data=Jt.call(e,e.transformResponse,t.response),t.response.headers=Qt.from(t.response.headers))),Promise.reject(t)}))}const Un="1.9.0",qn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{qn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const $n={};qn.transitional=function(e,t,n){function r(e,t){return"[Axios v1.9.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new wt(r(o," has been removed"+(t?" in "+t:"")),wt.ERR_DEPRECATED);return t&&!$n[o]&&($n[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},qn.spelling=function(e){return(t,n)=>(console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0)};const Kn={assertOptions:function(e,t,n){if("object"!==typeof e)throw new wt("options must be an object",wt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new wt("option "+i+" must be "+n,wt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new wt("Unknown option "+i,wt.ERR_BAD_OPTION)}},validators:qn},Xn=Kn.validators;class Yn{constructor(e){this.defaults=e||{},this.interceptors={request:new Tt,response:new Tt}}async request(e,t){try{return await this._request(e,t)}catch(AR){if(AR instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{AR.stack?r&&!String(AR.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(AR.stack+="\n"+r):AR.stack=r}catch(n){}}throw AR}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=pn(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Kn.assertOptions(n,{silentJSONParsing:Xn.transitional(Xn.boolean),forcedJSONParsing:Xn.transitional(Xn.boolean),clarifyTimeoutError:Xn.transitional(Xn.boolean)},!1),null!=r&&(vt.isFunction(r)?t.paramsSerializer={serialize:r}:Kn.assertOptions(r,{encode:Xn.function,serialize:Xn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Kn.assertOptions(t,{baseUrl:Xn.spelling("baseURL"),withXsrfToken:Xn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&vt.merge(o.common,o[t.method]);o&&vt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Qt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[Vn.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let h=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{h=e(h)}catch(p){t.call(this,p);break}}try{c=Vn.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Ot(dn((e=pn(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}vt.forEach(["delete","get","head","options"],(function(e){Yn.prototype[e]=function(t,n){return this.request(pn(n||{},{method:e,url:t,data:(n||{}).data}))}})),vt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(pn(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Yn.prototype[e]=t(),Yn.prototype[e+"Form"]=t(!0)}));const Gn=Yn;class Qn{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new tn(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Qn((function(t){e=t})),cancel:e}}}const Jn=Qn;const Zn={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(Zn).forEach((e=>{let[t,n]=e;Zn[n]=t}));const er=Zn;const tr=function e(t){const n=new Gn(t),r=Te(Gn.prototype.request,n);return vt.extend(r,Gn.prototype,n,{allOwnKeys:!0}),vt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(pn(t,n))},r}(Ut);tr.Axios=Gn,tr.CanceledError=tn,tr.CancelToken=Jn,tr.isCancel=Zt,tr.VERSION=Un,tr.toFormData=_t,tr.AxiosError=wt,tr.Cancel=tr.CanceledError,tr.all=function(e){return Promise.all(e)},tr.spread=function(e){return function(t){return e.apply(null,t)}},tr.isAxiosError=function(e){return vt.isObject(e)&&!0===e.isAxiosError},tr.mergeConfig=pn,tr.AxiosHeaders=Qt,tr.formToJSON=e=>Ht(vt.isHTMLForm(e)?new FormData(e):e),tr.getAdapter=Wn,tr.HttpStatusCode=er,tr.default=tr;const nr=tr;var rr=n(8587);function or(e,t){if(null==e)return{};var n,r,o=(0,rr.A)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n(4358);const ir=["sri"],ar=["page"],sr=["page","matches"],lr=["onClick","discover","prefetch","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],cr=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ur=["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];var dr="popstate";function hr(){return xr((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return gr("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:vr(t)}),null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function pr(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function fr(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function mr(e,t){return{usr:e.state,key:e.key,idx:t}}function gr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return u(u({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?br(t):t),{},{state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)})}function vr(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function br(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function xr(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",l=null,c=d();function d(){return(a.state||{idx:null}).idx}function h(){s="POP";let e=d(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function p(e){return yr(e)}null==c&&(c=0,a.replaceState(u(u({},a.state),{},{idx:c}),""));let f={get action(){return s},get location(){return e(o,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(dr,h),l=e,()=>{o.removeEventListener(dr,h),l=null}},createHref:e=>t(o,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=gr(f.location,e,t);n&&n(r,e),c=d()+1;let u=mr(r,c),h=f.createHref(r);try{a.pushState(u,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;o.location.assign(h)}i&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let r=gr(f.location,e,t);n&&n(r,e),c=d();let o=mr(r,c),u=f.createHref(r);a.replaceState(o,"",u),i&&l&&l({action:s,location:f.location,delta:0})},go:e=>a.go(e)};return f}function yr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!==typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),pr(n,"No window.location.(origin|href) available to create URL");let r="string"===typeof e?e:vr(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}new WeakMap;function wr(e,t){return Sr(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function Sr(e,t,n,r){let o=zr(("string"===typeof t?br(t):t).pathname||"/",n);if(null==o)return null;let i=kr(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let s=0;null==a&&s<i.length;++s){let e=Ir(o);a=Tr(i[s],e,r)}return a}function kr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(pr(a.relativePath.startsWith(r),'Absolute route path "'.concat(a.relativePath,'" nested under path "').concat(r,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),a.relativePath=a.relativePath.slice(r.length));let s=Hr([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(pr(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(s,'".')),kr(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Or(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let r of jr(e.path))o(e,t,r);else o(e,t)})),t}function jr(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=jr(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var Cr=/^:[\w-]+$/,_r=3,Ar=2,Er=1,Mr=10,Rr=-2,Pr=e=>"*"===e;function Or(e,t){let n=e.split("/"),r=n.length;return n.some(Pr)&&(r+=Rr),t&&(r+=Ar),n.filter((e=>!Pr(e))).reduce(((e,t)=>e+(Cr.test(t)?_r:""===t?Er:Mr)),r)}function Tr(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=Nr({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=Nr({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:Hr([i,u.pathname]),pathnameBase:Vr(Hr([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=Hr([i,u.pathnameBase]))}return a}function Nr(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Lr(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:i,pathnameBase:a,pattern:e}}function Lr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];fr("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ir(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return fr(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function zr(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Dr(e,t,n,r){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(r),"]. Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function Fr(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function Br(e){let t=Fr(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function Wr(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=br(e):(r=u({},e),pr(!r.pathname||!r.pathname.includes("?"),Dr("?","pathname","search",r)),pr(!r.pathname||!r.pathname.includes("#"),Dr("#","pathname","hash",r)),pr(!r.search||!r.search.includes("#"),Dr("#","search","hash",r)));let i,a=""===e||""===r.pathname,s=a?"/":r.pathname;if(null==s)i=n;else{let e=t.length-1;if(!o&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",{pathname:n,search:r="",hash:o=""}="string"===typeof e?br(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:Ur(r),hash:qr(o)}}(r,i),c=s&&"/"!==s&&s.endsWith("/"),d=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}var Hr=e=>e.join("/").replace(/\/\/+/g,"/"),Vr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ur=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",qr=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function $r(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var Kr=["POST","PUT","PATCH","DELETE"],Xr=(new Set(Kr),["GET",...Kr]);new Set(Xr),Symbol("ResetLoaderData");var Yr=r.createContext(null);Yr.displayName="DataRouter";var Gr=r.createContext(null);Gr.displayName="DataRouterState";var Qr=r.createContext({isTransitioning:!1});Qr.displayName="ViewTransition";var Jr=r.createContext(new Map);Jr.displayName="Fetchers";var Zr=r.createContext(null);Zr.displayName="Await";var eo=r.createContext(null);eo.displayName="Navigation";var to=r.createContext(null);to.displayName="Location";var no=r.createContext({outlet:null,matches:[],isDataRoute:!1});no.displayName="Route";var ro=r.createContext(null);ro.displayName="RouteError";function oo(){return null!=r.useContext(to)}function io(){return pr(oo(),"useLocation() may be used only in the context of a <Router> component."),r.useContext(to).location}var ao="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function so(e){r.useContext(eo).static||r.useLayoutEffect(e)}function lo(){let{isDataRoute:e}=r.useContext(no);return e?function(){let{router:e}=xo("useNavigate"),t=wo("useNavigate"),n=r.useRef(!1);so((()=>{n.current=!0}));let o=r.useCallback((async function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};fr(n.current,ao),n.current&&("number"===typeof r?e.navigate(r):await e.navigate(r,u({fromRouteId:t},o)))}),[e,t]);return o}():function(){pr(oo(),"useNavigate() may be used only in the context of a <Router> component.");let e=r.useContext(Yr),{basename:t,navigator:n}=r.useContext(eo),{matches:o}=r.useContext(no),{pathname:i}=io(),a=JSON.stringify(Br(o)),s=r.useRef(!1);so((()=>{s.current=!0}));let l=r.useCallback((function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(fr(s.current,ao),!s.current)return;if("number"===typeof r)return void n.go(r);let l=Wr(r,JSON.parse(a),i,"path"===o.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Hr([t,l.pathname])),(o.replace?n.replace:n.push)(l,o.state,o)}),[t,n,a,i,e]);return l}()}r.createContext(null);function co(){let{matches:e}=r.useContext(no),t=e[e.length-1];return t?t.params:{}}function uo(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{matches:n}=r.useContext(no),{pathname:o}=io(),i=JSON.stringify(Br(n));return r.useMemo((()=>Wr(e,JSON.parse(i),o,"path"===t)),[e,i,o,t])}function ho(e,t,n,o){pr(oo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i,static:a}=r.useContext(eo),{matches:s}=r.useContext(no),l=s[s.length-1],c=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",p=l&&l.route;{let e=p&&p.path||"";jo(d,!p||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(d,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let f,m=io();if(t){var g;let e="string"===typeof t?br(t):t;pr("/"===h||(null===(g=e.pathname)||void 0===g?void 0:g.startsWith(h)),'When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(h,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),f=e}else f=m;let v=f.pathname||"/",b=v;if("/"!==h){let e=h.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=!a&&n&&n.matches&&n.matches.length>0?n.matches:wr(e,{pathname:b});fr(p||null!=x,'No routes matched location "'.concat(f.pathname).concat(f.search).concat(f.hash,'" ')),fr(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,'Matched leaf route at location "'.concat(f.pathname).concat(f.search).concat(f.hash,'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let y=vo(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Hr([h,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:Hr([h,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,o);return t&&y?r.createElement(to.Provider,{value:{location:u({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:"POP"}},y):y}function po(){let e=So(),t=$r(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=r.createElement(r.Fragment,null,r.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:a},"ErrorBoundary")," or"," ",r.createElement("code",{style:a},"errorElement")," prop on your route.")),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,s)}var fo=r.createElement(po,null),mo=class extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(no.Provider,{value:this.props.routeContext},r.createElement(ro.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function go(e){let{routeContext:t,match:n,children:o}=e,i=r.useContext(Yr);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(no.Provider,{value:t},o)}function vo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let o=e,i=null===n||void 0===n?void 0:n.errors;if(null!=i){let e=o.findIndex((e=>e.route.id&&void 0!==(null===i||void 0===i?void 0:i[e.route.id])));pr(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(i).join(","))),o=o.slice(0,Math.min(o.length,e+1))}let a=!1,s=-1;if(n)for(let r=0;r<o.length;r++){let e=o[r];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=r),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){a=!0,o=s>=0?o.slice(0,s+1):[o[0]];break}}}return o.reduceRight(((e,l,c)=>{let u,d=!1,h=null,p=null;n&&(u=i&&l.route.id?i[l.route.id]:void 0,h=l.route.errorElement||fo,a&&(s<0&&0===c?(jo("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=l.route.hydrateFallbackElement||null)));let f=t.concat(o.slice(0,c+1)),m=()=>{let t;return t=u?h:d?p:l.route.Component?r.createElement(l.route.Component,null):l.route.element?l.route.element:e,r.createElement(go,{match:l,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(l.route.ErrorBoundary||l.route.errorElement||0===c)?r.createElement(mo,{location:n.location,revalidation:n.revalidation,component:h,error:u,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):m()}),null)}function bo(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function xo(e){let t=r.useContext(Yr);return pr(t,bo(e)),t}function yo(e){let t=r.useContext(Gr);return pr(t,bo(e)),t}function wo(e){let t=function(e){let t=r.useContext(no);return pr(t,bo(e)),t}(e),n=t.matches[t.matches.length-1];return pr(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}function So(){var e;let t=r.useContext(ro),n=yo("useRouteError"),o=wo("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[o]}var ko={};function jo(e,t,n){t||ko[e]||(ko[e]=!0,fr(!1,n))}r.memo((function(e){let{routes:t,future:n,state:r}=e;return ho(t,void 0,r,n)}));function Co(e){pr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _o(e){let{basename:t="/",children:n=null,location:o,navigationType:i="POP",navigator:a,static:s=!1}=e;pr(!oo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=r.useMemo((()=>({basename:l,navigator:a,static:s,future:{}})),[l,a,s]);"string"===typeof o&&(o=br(o));let{pathname:u="/",search:d="",hash:h="",state:p=null,key:f="default"}=o,m=r.useMemo((()=>{let e=zr(u,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:i}}),[l,u,d,h,p,f,i]);return fr(null!=m,'<Router basename="'.concat(l,'"> is not able to match the URL "').concat(u).concat(d).concat(h,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==m?null:r.createElement(eo.Provider,{value:c},r.createElement(to.Provider,{children:n,value:m}))}function Ao(e){let{children:t,location:n}=e;return ho(Eo(t),n)}r.Component;function Eo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return r.Children.forEach(e,((e,o)=>{if(!r.isValidElement(e))return;let i=[...t,o];if(e.type===r.Fragment)return void n.push.apply(n,Eo(e.props.children,i));pr(e.type===Co,"[".concat("string"===typeof e.type?e.type:e.type.name,"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>")),pr(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Eo(e.props.children,i)),n.push(a)})),n}var Mo="get",Ro="application/x-www-form-urlencoded";function Po(e){return null!=e&&"string"===typeof e.tagName}var Oo=null;var To=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function No(e){return null==e||To.has(e)?e:(fr(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(Ro,'"')),null)}function Lo(e,t){let n,r,o,i,a;if(Po(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?zr(a,t):null,n=e.getAttribute("method")||Mo,o=No(e.getAttribute("enctype"))||Ro,i=new FormData(e)}else if(function(e){return Po(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Po(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?zr(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Mo,o=No(e.getAttribute("formenctype"))||No(a.getAttribute("enctype"))||Ro,i=new FormData(a,e),!function(){if(null===Oo)try{new FormData(document.createElement("form"),0),Oo=!1}catch(e){Oo=!0}return Oo}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?"".concat(t,"."):"";i.append("".concat(e,"x"),"0"),i.append("".concat(e,"y"),"0")}else t&&i.append(t,r)}}else{if(Po(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Mo,r=null,o=Ro,a=e}var s;return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}function Io(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}async function zo(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error("Error loading route module `".concat(e.module,"`, reloading page...")),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}function Do(e){return null!=e&&"string"===typeof e.page}function Fo(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"===typeof e.imageSrcSet&&"string"===typeof e.imageSizes:"string"===typeof e.rel&&"string"===typeof e.href)}function Bo(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null===(r=n[t].route.path)||void 0===r?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){var c;let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:(null===(c=n[0])||void 0===c?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"===typeof r)return r}return!0})):[]}function Wo(e,t){let{includeHydrateFallback:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function Ho(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Do(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e}),[])}function Vo(e){return{__html:e}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!==typeof window?window:"undefined"!==typeof globalThis&&globalThis;Symbol("SingleFetchRedirect");var Uo=new Set([100,101,204,205]);function qo(e,t){let n="string"===typeof e?new URL(e,"undefined"===typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname="_root.data":t&&"/"===zr(n.pathname,t)?n.pathname="".concat(t.replace(/\/$/,""),"/_root.data"):n.pathname="".concat(n.pathname.replace(/\/$/,""),".data"),n}r.Component;function $o(e){let{error:t,isOutsideRemixApp:n}=e;console.error(t);let o,i=r.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "\ud83d\udcbf Hey developer \ud83d\udc4b. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if($r(t))return r.createElement(Ko,{title:"Unhandled Thrown Response!"},r.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),i);if(t instanceof Error)0;else{let e=null==t?"Unknown Error":"object"===typeof t&&"toString"in t?t.toString():JSON.stringify(t);new Error(e)}return r.createElement(Ko,{title:"Application Error!",isOutsideRemixApp:n},r.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),r.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},o.stack),i)}function Ko(e){var t;let{title:n,renderScripts:o,isOutsideRemixApp:i,children:a}=e,{routeModules:s}=Jo();return null!==s.root&&void 0!==t&&t.Layout&&!i?a:r.createElement("html",{lang:"en"},r.createElement("head",null,r.createElement("meta",{charSet:"utf-8"}),r.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),r.createElement("title",null,n)),r.createElement("body",null,r.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,o?r.createElement(ii,null):null)))}function Xo(e,t){return"lazy"===e.mode&&!0===t}function Yo(){let e=r.useContext(Yr);return Io(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Go(){let e=r.useContext(Gr);return Io(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qo=r.createContext(void 0);function Jo(){let e=r.useContext(Qo);return Io(e,"You must render this element inside a <HydratedRouter> element"),e}function Zo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ei(e,t,n){if(n&&!oi)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}function ti(e){let{page:t}=e,n=or(e,ar),{router:o}=Yo(),i=r.useMemo((()=>wr(o.routes,t,o.basename)),[o.routes,t,o.basename]);return i?r.createElement(ri,u({page:t,matches:i},n)):null}function ni(e){let{manifest:t,routeModules:n}=Jo(),[o,i]=r.useState([]);return r.useEffect((()=>{let r=!1;return async function(e,t,n){return Ho((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await zo(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Fo).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?u(u({},e),{},{rel:"prefetch",as:"style"}):u(u({},e),{},{rel:"prefetch"}))))}(e,t,n).then((e=>{r||i(e)})),()=>{r=!0}}),[e,t,n]),o}function ri(e){let{page:t,matches:n}=e,o=or(e,sr),i=io(),{manifest:a,routeModules:s}=Jo(),{basename:l}=Yo(),{loaderData:c,matches:d}=Go(),h=r.useMemo((()=>Bo(t,n,d,a,i,"data")),[t,n,d,a,i]),p=r.useMemo((()=>Bo(t,n,d,a,i,"assets")),[t,n,d,a,i]),f=r.useMemo((()=>{if(t===i.pathname+i.search+i.hash)return[];let e=new Set,r=!1;if(n.forEach((t=>{var n;let o=a.routes[t.route.id];o&&o.hasLoader&&(!h.some((e=>e.route.id===t.route.id))&&t.route.id in c&&null!==(n=s[t.route.id])&&void 0!==n&&n.shouldRevalidate||o.hasClientLoader?r=!0:e.add(t.route.id))})),0===e.size)return[];let o=qo(t,l);return r&&e.size>0&&o.searchParams.set("_routes",n.filter((t=>e.has(t.route.id))).map((e=>e.route.id)).join(",")),[o.pathname+o.search]}),[l,c,i,a,h,n,t,s]),m=r.useMemo((()=>Wo(p,a)),[p,a]),g=ni(p);return r.createElement(r.Fragment,null,f.map((e=>r.createElement("link",u({key:e,rel:"prefetch",as:"fetch",href:e},o)))),m.map((e=>r.createElement("link",u({key:e,rel:"modulepreload",href:e},o)))),g.map((e=>{let{key:t,link:n}=e;return r.createElement("link",u({key:t},n))})))}Qo.displayName="FrameworkContext";var oi=!1;function ii(e){let{manifest:t,serverHandoffString:n,isSpaMode:o,renderMeta:i,routeDiscovery:a,ssr:s}=Jo(),{router:l,static:c,staticContext:d}=Yo(),{matches:h}=Go(),p=Xo(a,s);i&&(i.didRenderScripts=!0);let f=ei(h,null,o);r.useEffect((()=>{0}),[]);let m=r.useMemo((()=>{var o;let i=d?"window.__reactRouterContext = ".concat(n,";").concat("window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());"):" ",a=c?"".concat(null!==t.hmr&&void 0!==o&&o.runtime?"import ".concat(JSON.stringify(t.hmr.runtime),";"):"").concat(p?"":"import ".concat(JSON.stringify(t.url)),";\n").concat(f.map(((e,n)=>{let r="route".concat(n),o=t.routes[e.route.id];Io(o,"Route ".concat(e.route.id," not found in manifest"));let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:s,hydrateFallbackModule:l,module:c}=o,u=[...i?[{module:i,varName:"".concat(r,"_clientAction")}]:[],...a?[{module:a,varName:"".concat(r,"_clientLoader")}]:[],...s?[{module:s,varName:"".concat(r,"_clientMiddleware")}]:[],...l?[{module:l,varName:"".concat(r,"_HydrateFallback")}]:[],{module:c,varName:"".concat(r,"_main")}];return 1===u.length?"import * as ".concat(r," from ").concat(JSON.stringify(c),";"):[u.map((e=>"import * as ".concat(e.varName,' from "').concat(e.module,'";'))).join("\n"),"const ".concat(r," = {").concat(u.map((e=>"...".concat(e.varName))).join(","),"};")].join("\n")})).join("\n"),"\n ").concat(p?"window.__reactRouterManifest = ".concat(JSON.stringify(function(e,t){let{sri:n}=e,r=or(e,ir),o=new Set(t.state.matches.map((e=>e.route.id))),i=t.state.location.pathname.split("/").filter(Boolean),a=["/"];for(i.pop();i.length>0;)a.push("/".concat(i.join("/"))),i.pop();a.forEach((e=>{let n=wr(t.routes,e,t.basename);n&&n.forEach((e=>o.add(e.route.id)))}));let s=[...o].reduce(((e,t)=>Object.assign(e,{[t]:r.routes[t]})),{});return u(u({},r),{},{routes:s,sri:!!n||void 0})}(t,l),null,2),";"):"","\n window.__reactRouterRouteModules = {").concat(f.map(((e,t)=>"".concat(JSON.stringify(e.route.id),":route").concat(t))).join(","),"};\n\nimport(").concat(JSON.stringify(t.entry.module),");"):" ";return r.createElement(r.Fragment,null,r.createElement("script",u(u({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:Vo(i),type:void 0})),r.createElement("script",u(u({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:Vo(a),type:"module",async:!0})))}),[]),g=oi?[]:(t.entry.imports.concat(Wo(f,t,{includeHydrateFallback:!0})),[...new Set(v)]);var v;let b="object"===typeof t.sri?t.sri:{};return oi?null:r.createElement(r.Fragment,null,"object"===typeof t.sri?r.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:b})}}):null,p?null:r.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:b[t.url],suppressHydrationWarning:!0}),r.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:b[t.entry.module],suppressHydrationWarning:!0}),g.map((t=>r.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:b[t],suppressHydrationWarning:!0}))),m)}function ai(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"===typeof t?t(e):null!=t&&(t.current=e)}))}}var si="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;try{si&&(window.__reactRouterVersion="7.6.0")}catch(ER){}function li(e){let{basename:t,children:n,window:o}=e,i=r.useRef();null==i.current&&(i.current=hr({window:o,v5Compat:!0}));let a=i.current,[s,l]=r.useState({action:a.action,location:a.location}),c=r.useCallback((e=>{r.startTransition((()=>l(e)))}),[l]);return r.useLayoutEffect((()=>a.listen(c)),[a,c]),r.createElement(_o,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}var ci=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ui=r.forwardRef((function(e,t){let n,{onClick:o,discover:i="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,state:d,target:h,to:p,preventScrollReset:f,viewTransition:m}=e,g=or(e,lr),{basename:v}=r.useContext(eo),b="string"===typeof p&&ci.test(p),x=!1;if("string"===typeof p&&b&&(n=p,si))try{let e=new URL(window.location.href),t=p.startsWith("//")?new URL(e.protocol+p):new URL(p),n=zr(t.pathname,v);t.origin===e.origin&&null!=n?p=n+t.search+t.hash:x=!0}catch(ER){fr(!1,'<Link to="'.concat(p,'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}let y=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};pr(oo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=r.useContext(eo),{hash:i,pathname:a,search:s}=uo(e,{relative:t}),l=a;return"/"!==n&&(l="/"===a?n:Hr([n,a])),o.createHref({pathname:l,search:s,hash:i})}(p,{relative:s}),[w,S,k]=function(e,t){let n=r.useContext(Qo),[o,i]=r.useState(!1),[a,s]=r.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:h}=t,p=r.useRef(null);r.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}}),[e]),r.useEffect((()=>{if(o){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[o]);let f=()=>{i(!0)},m=()=>{i(!1),s(!1)};return n?"intent"!==e?[a,p,{}]:[a,p,{onFocus:Zo(l,f),onBlur:Zo(c,m),onMouseEnter:Zo(u,f),onMouseLeave:Zo(d,m),onTouchStart:Zo(h,f)}]:[!1,p,{}]}(a,g),j=function(e){let{target:t,replace:n,state:o,preventScrollReset:i,relative:a,viewTransition:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=lo(),c=io(),u=uo(e,{relative:a});return r.useCallback((r=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(r,t)){r.preventDefault();let t=void 0!==n?n:vr(c)===vr(u);l(e,{replace:t,state:o,preventScrollReset:i,relative:a,viewTransition:s})}}),[c,l,u,n,o,t,e,i,a,s])}(p,{replace:c,state:d,target:h,preventScrollReset:f,relative:s,viewTransition:m});let C=r.createElement("a",u(u(u({},g),k),{},{href:n||y,onClick:x||l?o:function(e){o&&o(e),e.defaultPrevented||j(e)},ref:ai(t,S),target:h,"data-discover":b||"render"!==i?void 0:"true"}));return w&&!b?r.createElement(r.Fragment,null,C,r.createElement(ti,{page:y})):C}));ui.displayName="Link";var di=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:o=!1,className:i="",end:a=!1,style:s,to:l,viewTransition:c,children:d}=e,h=or(e,cr),p=uo(l,{relative:h.relative}),f=io(),m=r.useContext(Gr),{navigator:g,basename:v}=r.useContext(eo),b=null!=m&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.useContext(Qr);pr(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=fi("useViewTransitionState"),i=uo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=zr(n.currentLocation.pathname,o)||n.currentLocation.pathname,s=zr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return null!=Nr(i.pathname,s)||null!=Nr(i.pathname,a)}(p)&&!0===c,x=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,y=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(y=y.toLowerCase(),w=w?w.toLowerCase():null,x=x.toLowerCase()),w&&v&&(w=zr(w,v)||w);const S="/"!==x&&x.endsWith("/")?x.length-1:x.length;let k,j=y===x||!a&&y.startsWith(x)&&"/"===y.charAt(S),C=null!=w&&(w===x||!a&&w.startsWith(x)&&"/"===w.charAt(x.length)),_={isActive:j,isPending:C,isTransitioning:b},A=j?n:void 0;k="function"===typeof i?i(_):[i,j?"active":null,C?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let E="function"===typeof s?s(_):s;return r.createElement(ui,u(u({},h),{},{"aria-current":A,className:k,ref:t,style:E,to:l,viewTransition:c}),"function"===typeof d?d(_):d)}));di.displayName="NavLink";var hi=r.forwardRef(((e,t)=>{let{discover:n="render",fetcherKey:o,navigate:i,reloadDocument:a,replace:s,state:l,method:c=Mo,action:d,onSubmit:h,relative:p,preventScrollReset:f,viewTransition:m}=e,g=or(e,ur),v=vi(),b=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{basename:n}=r.useContext(eo),o=r.useContext(no);pr(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),a=u({},uo(e||".",{relative:t})),s=io();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?"?".concat(n):""}}e&&"."!==e||!i.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:Hr([n,a.pathname]));return vr(a)}(d,{relative:p}),x="get"===c.toLowerCase()?"get":"post",y="string"===typeof d&&ci.test(d);return r.createElement("form",u(u({ref:t,method:x,action:b,onSubmit:a?h:e=>{if(h&&h(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null===t||void 0===t?void 0:t.getAttribute("formmethod"))||c;v(t||e.currentTarget,{fetcherKey:o,method:n,navigate:i,replace:s,state:l,relative:p,preventScrollReset:f,viewTransition:m})}},g),{},{"data-discover":y||"render"!==n?void 0:"true"}))}));function pi(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function fi(e){let t=r.useContext(Yr);return pr(t,pi(e)),t}hi.displayName="Form";var mi=0,gi=()=>"__".concat(String(++mi),"__");function vi(){let{router:e}=fi("useSubmit"),{basename:t}=r.useContext(eo),n=wo("useRouteId");return r.useCallback((async function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{action:i,method:a,encType:s,formData:l,body:c}=Lo(r,t);if(!1===o.navigate){let t=o.fetcherKey||gi();await e.fetch(t,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[e,t,n])}var bi=n(8168);function xi(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=xi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const yi=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=xi(e))&&(r&&(r+=" "),r+=t);return r};var wi=n(3174),Si=n(8812),ki=n(8698),ji=n(8280),Ci=n(9369);const _i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(Ci.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Ai=(0,ji.A)();const Ei=function(){return _i(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ai)};var Mi=n(579);const Ri=["className","component"];const Pi=e=>e,Oi=(()=>{let e=Pi;return{configure(t){e=t},generate:t=>e(t),reset(){e=Pi}}})();var Ti=n(7868),Ni=n(9172),Li=n(7758);function Ii(e,t){return(0,bi.A)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var zi=n(7266);const Di={black:"#000",white:"#fff"},Fi={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"},Bi={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"},Wi={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"},Hi={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"},Vi={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"},Ui={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"},qi={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"},$i=["mode","contrastThreshold","tonalOffset"],Ki={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:Di.white,default:Di.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}},Xi={text:{primary:Di.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:Di.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 Yi(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,zi.a)(e.main,o):"dark"===t&&(e.dark=(0,zi.e$)(e.main,i)))}function Gi(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=(0,rr.A)(e,$i),i=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Vi[200],light:Vi[50],dark:Vi[400]}:{main:Vi[700],light:Vi[400],dark:Vi[800]}}(t),a=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Bi[200],light:Bi[50],dark:Bi[400]}:{main:Bi[500],light:Bi[300],dark:Bi[700]}}(t),s=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Wi[500],light:Wi[300],dark:Wi[700]}:{main:Wi[700],light:Wi[400],dark:Wi[800]}}(t),l=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Ui[400],light:Ui[300],dark:Ui[700]}:{main:Ui[700],light:Ui[500],dark:Ui[900]}}(t),c=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:qi[400],light:qi[300],dark:qi[700]}:{main:qi[800],light:qi[500],dark:qi[900]}}(t),u=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Hi[400],light:Hi[300],dark:Hi[700]}:{main:"#ed6c02",light:Hi[500],dark:Hi[900]}}(t);function d(e){return(0,zi.eM)(e,Xi.text.primary)>=n?Xi.text.primary:Ki.text.primary}const h=e=>{let{color:t,name:n,mainShade:o=500,lightShade:i=300,darkShade:a=700}=e;if(t=(0,bi.A)({},t),!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,Ti.A)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,Ti.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return Yi(t,"light",i,r),Yi(t,"dark",a,r),t.contrastText||(t.contrastText=d(t.main)),t},p={dark:Xi,light:Ki};return(0,Ni.A)((0,bi.A)({common:(0,bi.A)({},Di),mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:Fi,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},p[t]),o)}const Qi=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Ji(e){return Math.round(1e5*e)/1e5}const Zi={textTransform:"uppercase"},ea='"Roboto", "Helvetica", "Arial", sans-serif';function ta(e,t){const n="function"===typeof t?t(e):t,{fontFamily:r=ea,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,h=(0,rr.A)(n,Qi);const p=o/14,f=d||(e=>"".concat(e/c*p,"rem")),m=(e,t,n,o,i)=>(0,bi.A)({fontFamily:r,fontWeight:e,fontSize:f(t),lineHeight:n},r===ea?{letterSpacing:"".concat(Ji(o/t),"em")}:{},i,u),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,Zi),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Zi),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,Ni.A)((0,bi.A)({htmlFontSize:c,pxToRem:f,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),h,{clone:!1})}function na(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const ra=["none",na(0,2,1,-1,0,1,1,0,0,1,3,0),na(0,3,1,-2,0,2,2,0,0,1,5,0),na(0,3,3,-2,0,3,4,0,0,1,8,0),na(0,2,4,-1,0,4,5,0,0,1,10,0),na(0,3,5,-1,0,5,8,0,0,1,14,0),na(0,3,5,-1,0,6,10,0,0,1,18,0),na(0,4,5,-2,0,7,10,1,0,2,16,1),na(0,5,5,-3,0,8,10,1,0,3,14,2),na(0,5,6,-3,0,9,12,1,0,3,16,2),na(0,6,6,-3,0,10,14,1,0,4,18,3),na(0,6,7,-4,0,11,15,1,0,4,20,3),na(0,7,8,-4,0,12,17,2,0,5,22,4),na(0,7,8,-4,0,13,19,2,0,5,24,4),na(0,7,9,-4,0,14,21,2,0,5,26,4),na(0,8,9,-5,0,15,22,2,0,6,28,5),na(0,8,10,-5,0,16,24,2,0,6,30,5),na(0,8,11,-5,0,17,26,2,0,6,32,5),na(0,9,11,-5,0,18,28,2,0,7,34,6),na(0,9,12,-6,0,19,29,2,0,7,36,6),na(0,10,13,-6,0,20,31,3,0,8,38,7),na(0,10,13,-6,0,21,33,3,0,8,40,7),na(0,10,14,-6,0,22,35,3,0,8,42,7),na(0,11,14,-7,0,23,36,3,0,9,44,8),na(0,11,15,-7,0,24,38,3,0,9,46,8)],oa=["duration","easing","delay"],ia={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)"},aa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function sa(e){return"".concat(Math.round(e),"ms")}function la(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function ca(e){const t=(0,bi.A)({},ia,e.easing),n=(0,bi.A)({},aa,e.duration);return(0,bi.A)({getAutoHeightDuration:la,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;(0,rr.A)(r,oa);return(Array.isArray(e)?e:[e]).map((e=>"".concat(e," ").concat("string"===typeof o?o:sa(o)," ").concat(i," ").concat("string"===typeof a?a:sa(a)))).join(",")}},e,{easing:t,duration:n})}const ua={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},da=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function ha(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:r={},typography:o={}}=e,i=(0,rr.A)(e,da);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,Ti.A)(18));const a=Gi(n),s=(0,ji.A)(e);let l=(0,Ni.A)(s,{mixins:Ii(s.breakpoints,t),palette:a,shadows:ra.slice(),typography:ta(a,o),transitions:ca(r),zIndex:(0,bi.A)({},ua)});l=(0,Ni.A)(l,i);for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];return l=u.reduce(((e,t)=>(0,Ni.A)(e,t)),l),l.unstable_sxConfig=(0,bi.A)({},Li.A,null==i?void 0:i.unstable_sxConfig),l.unstable_sx=function(e){return(0,Si.A)({sx:e,theme:this})},l}const pa=ha,fa="$$material",ma={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 ga(e,t){const n=ma[t];return n?"".concat(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui","-").concat(n):"".concat(Oi.generate(e),"-").concat(t)}function va(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const r={};return t.forEach((t=>{r[t]=ga(e,t,n)})),r}const ba=va("MuiBox",["root"]),xa=pa(),ya=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:o="MuiBox-root",generateClassName:i}=e,a=(0,wi.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Si.A);return r.forwardRef((function(e,r){const s=Ei(n),l=(0,ki.A)(e),{className:c,component:u="div"}=l,d=(0,rr.A)(l,Ri);return(0,Mi.jsx)(a,(0,bi.A)({as:u,ref:r,className:yi(c,i?i(o):o),theme:t&&s[t]||s},d))}))}({themeId:fa,defaultTheme:xa,defaultClassName:ba.root,generateClassName:Oi.generate}),wa=ya;function Sa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}var ka=n(8052);const ja=pa();const Ca=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e},_a=e=>Ca(e)&&"classes"!==e,Aa=(0,ka.Ay)({themeId:fa,defaultTheme:ja,rootShouldForwardProp:_a}),Ea=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Ma(e,t){const n=(0,bi.A)({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=(0,bi.A)({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},i&&Object.keys(i)?o&&Object.keys(o)?(n[r]=(0,bi.A)({},i),Object.keys(o).forEach((e=>{n[r][e]=Ma(o[e],i[e])}))):n[r]=i:n[r]=o}else void 0===n[r]&&(n[r]=e[r])})),n}const Ra=r.createContext(void 0);function Pa(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Ma(o.defaultProps,r):o.styleOverrides||o.variants?r:Ma(o,r)}({props:t,name:n,theme:{components:r.useContext(Ra)}})}function Oa(e){return Pa(e)}function Ta(e){return ga("MuiPaper",e)}va("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 Na=["className","component","elevation","square","variant"],La=Aa("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,bi.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,bi.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,zi.X4)("#fff",Ea(n.elevation)),", ").concat((0,zi.X4)("#fff",Ea(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),Ia=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:s="elevation"}=n,l=(0,rr.A)(n,Na),c=(0,bi.A)({},n,{component:o,elevation:i,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Sa({root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]},Ta,o)})(c);return(0,Mi.jsx)(La,(0,bi.A)({as:o,ownerState:c,className:yi(u.root,r),ref:t},l))}));var za=n(7598);const Da=za.A;function Fa(e){return ga("MuiButtonGroup",e)}const Ba=va("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);const Wa=r.createContext({});const Ha=r.createContext(void 0),Va=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],Ua=Aa("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Ba.grouped)]:t.grouped},{["& .".concat(Ba.grouped)]:t["grouped".concat(Da(n.orientation))]},{["& .".concat(Ba.grouped)]:t["grouped".concat(Da(n.variant))]},{["& .".concat(Ba.grouped)]:t["grouped".concat(Da(n.variant)).concat(Da(n.orientation))]},{["& .".concat(Ba.grouped)]:t["grouped".concat(Da(n.variant)).concat(Da(n.color))]},{["& .".concat(Ba.firstButton)]:t.firstButton},{["& .".concat(Ba.lastButton)]:t.lastButton},{["& .".concat(Ba.middleButton)]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[2]},n.disableElevation&&{boxShadow:"none"},n.fullWidth&&{width:"100%"},"vertical"===n.orientation&&{flexDirection:"column"},{["& .".concat(Ba.grouped)]:(0,bi.A)({minWidth:40,"&:hover":(0,bi.A)({},"contained"===n.variant&&{boxShadow:"none"})},"contained"===n.variant&&{boxShadow:"none"}),["& .".concat(Ba.firstButton,",& .").concat(Ba.middleButton)]:(0,bi.A)({},"horizontal"===n.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===n.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===n.variant&&"horizontal"===n.orientation&&{borderRight:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(Ba.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===n.variant&&"vertical"===n.orientation&&{borderBottom:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(Ba.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===n.variant&&"inherit"!==n.color&&{borderColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):(0,zi.X4)(t.palette[n.color].main,.5)},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"transparent"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"transparent"},"contained"===n.variant&&"horizontal"===n.orientation&&{borderRight:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(Ba.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===n.variant&&"vertical"===n.orientation&&{borderBottom:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(Ba.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===n.variant&&"inherit"!==n.color&&{borderColor:(t.vars||t).palette[n.color].dark},{"&:hover":(0,bi.A)({},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"currentColor"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"currentColor"})}),["& .".concat(Ba.lastButton,",& .").concat(Ba.middleButton)]:(0,bi.A)({},"horizontal"===n.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===n.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===n.variant&&"horizontal"===n.orientation&&{marginLeft:-1},"outlined"===n.variant&&"vertical"===n.orientation&&{marginTop:-1})})})),qa=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:h=!1,orientation:p="horizontal",size:f="medium",variant:m="outlined"}=n,g=(0,rr.A)(n,Va),v=(0,bi.A)({},n,{color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:h,orientation:p,size:f,variant:m}),b=(e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e;return Sa({root:["root",s,"vertical"===a&&"vertical",i&&"fullWidth",o&&"disableElevation"],grouped:["grouped","grouped".concat(Da(a)),"grouped".concat(Da(s)),"grouped".concat(Da(s)).concat(Da(a)),"grouped".concat(Da(s)).concat(Da(n)),r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]},Fa,t)})(v),x=r.useMemo((()=>({className:b.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:h,size:f,variant:m})),[a,l,c,u,d,h,f,m,b.grouped]),y=function(e){return r.Children.toArray(e).filter((e=>r.isValidElement(e)))}(o),w=y.length,S=e=>{const t=0===e,n=e===w-1;return t&&n?"":t?b.firstButton:n?b.lastButton:b.middleButton};return(0,Mi.jsx)(Ua,(0,bi.A)({as:s,role:"group",className:yi(b.root,i),ref:t,ownerState:v},g,{children:(0,Mi.jsx)(Wa.Provider,{value:x,children:y.map(((e,t)=>(0,Mi.jsx)(Ha.Provider,{value:S(t),children:e},t)))})}))})),$a=qa;function Ka(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function Xa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{Ka(t,e)}))}),t)}const Ya=Xa,Ga="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;const Qa=function(e){const t=r.useRef(e);return Ga((()=>{t.current=e})),r.useRef((function(){return(0,t.current)(...arguments)})).current},Ja=Qa,Za={};const es=[];class ts{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new ts}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function ns(){const e=function(e,t){const n=r.useRef(Za);return n.current===Za&&(n.current=e(t)),n}(ts.create).current;var t;return t=e.disposeEffect,r.useEffect(t,es),e}let rs=!0,os=!1;const is=new ts,as={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 ss(e){e.metaKey||e.altKey||e.ctrlKey||(rs=!0)}function ls(){rs=!1}function cs(){"hidden"===this.visibilityState&&os&&(rs=!0)}function us(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return rs||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!as[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}const ds=function(){const e=r.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",ss,!0),t.addEventListener("mousedown",ls,!0),t.addEventListener("pointerdown",ls,!0),t.addEventListener("touchstart",ls,!0),t.addEventListener("visibilitychange",cs,!0))}),[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!us(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(os=!0,is.start(100,(()=>{os=!1})),t.current=!1,!0)},ref:e}};function hs(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ps(e,t){return ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ps(e,t)}function fs(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ps(e,t)}const ms=r.createContext(null);function gs(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function vs(e,t,n){return null!=n[t]?n[t]:e.props[t]}function bs(e,t,n){var o=gs(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,o);return Object.keys(i).forEach((function(a){var s=i[a];if((0,r.isValidElement)(s)){var l=a in t,c=a in o,u=t[a],d=(0,r.isValidElement)(u)&&!u.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,r.isValidElement)(u)&&(i[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:u.props.in,exit:vs(s,"exit",e),enter:vs(s,"enter",e)})):i[a]=(0,r.cloneElement)(s,{in:!1}):i[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:vs(s,"exit",e),enter:vs(s,"enter",e)})}})),i}var xs=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},ys=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}fs(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,o,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,o=a,gs(n.children,(function(e){return(0,r.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:vs(e,"appear",n),enter:vs(e,"enter",n),exit:vs(e,"exit",n)})}))):bs(e,i,a),firstRender:!1}},n.handleExited=function(e,t){var n=gs(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,bi.A)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=(0,rr.A)(e,["component","childFactory"]),i=this.state.contextValue,a=xs(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r.createElement(ms.Provider,{value:i},a):r.createElement(ms.Provider,{value:i},r.createElement(t,o,a))},t}(r.Component);ys.propTypes={},ys.defaultProps={component:"div",childFactory:function(e){return e}};const ws=ys;var Ss=n(3290);const ks=function(e){const{className:t,classes:n,pulsate:o=!1,rippleX:i,rippleY:a,rippleSize:s,in:l,onExited:c,timeout:u}=e,[d,h]=r.useState(!1),p=yi(t,n.ripple,n.rippleVisible,o&&n.ripplePulsate),f={width:s,height:s,top:-s/2+a,left:-s/2+i},m=yi(n.child,d&&n.childLeaving,o&&n.childPulsate);return l||d||h(!0),r.useEffect((()=>{if(!l&&null!=c){const e=setTimeout(c,u);return()=>{clearTimeout(e)}}}),[c,l,u]),(0,Mi.jsx)("span",{className:p,style:f,children:(0,Mi.jsx)("span",{className:m})})};const js=va("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var Cs,_s,As,Es;const Ms=["center","classes","className"];let Rs,Ps,Os,Ts;const Ns=(0,Ss.i7)(Rs||(Rs=Cs||(Cs=hs(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),Ls=(0,Ss.i7)(Ps||(Ps=_s||(_s=hs(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),Is=(0,Ss.i7)(Os||(Os=As||(As=hs(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),zs=Aa("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Ds=Aa(ks,{name:"MuiTouchRipple",slot:"Ripple"})(Ts||(Ts=Es||(Es=hs(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),js.rippleVisible,Ns,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),js.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),js.child,js.childLeaving,Ls,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),js.childPulsate,Is,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),Fs=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=n,s=(0,rr.A)(n,Ms),[l,c]=r.useState([]),u=r.useRef(0),d=r.useRef(null);r.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const h=r.useRef(!1),p=ns(),f=r.useRef(null),m=r.useRef(null),g=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,(0,Mi.jsx)(Ds,{classes:{ripple:yi(i.ripple,js.ripple),rippleVisible:yi(i.rippleVisible,js.rippleVisible),ripplePulsate:yi(i.ripplePulsate,js.ripplePulsate),child:yi(i.child,js.child),childLeaving:yi(i.childLeaving,js.childLeaving),childPulsate:yi(i.childPulsate,js.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,d.current=a}),[i]),v=r.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[o,g,p]),b=r.useCallback((()=>{v({},{pulsate:!0})}),[v]),x=r.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void p.start(0,(()=>{x(e,t)}));f.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return r.useImperativeHandle(t,(()=>({pulsate:b,start:v,stop:x})),[b,v,x]),(0,Mi.jsx)(zs,(0,bi.A)({className:yi(js.root,i.root,a),ref:m},s,{children:(0,Mi.jsx)(ws,{component:null,exit:!0,children:l})}))})),Bs=Fs;function Ws(e){return ga("MuiButtonBase",e)}const Hs=va("MuiButtonBase",["root","disabled","focusVisible"]),Vs=["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"],Us=Aa("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.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"},["&.".concat(Hs.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),qs=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:f,onClick:m,onContextMenu:g,onDragLeave:v,onFocus:b,onFocusVisible:x,onKeyDown:y,onKeyUp:w,onMouseDown:S,onMouseLeave:k,onMouseUp:j,onTouchEnd:C,onTouchMove:_,onTouchStart:A,tabIndex:E=0,TouchRippleProps:M,touchRippleRef:R,type:P}=n,O=(0,rr.A)(n,Vs),T=r.useRef(null),N=r.useRef(null),L=Ya(N,R),{isFocusVisibleRef:I,onFocus:z,onBlur:D,ref:F}=ds(),[B,W]=r.useState(!1);c&&B&&W(!1),r.useImperativeHandle(o,(()=>({focusVisible:()=>{W(!0),T.current.focus()}})),[]);const[H,V]=r.useState(!1);r.useEffect((()=>{V(!0)}),[]);const U=H&&!u&&!c;function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;return Ja((r=>{t&&t(r);return!n&&N.current&&N.current[e](r),!0}))}r.useEffect((()=>{B&&h&&!u&&H&&N.current.pulsate()}),[u,h,B,H]);const $=q("start",S),K=q("stop",g),X=q("stop",v),Y=q("stop",j),G=q("stop",(e=>{B&&e.preventDefault(),k&&k(e)})),Q=q("start",A),J=q("stop",C),Z=q("stop",_),ee=q("stop",(e=>{D(e),!1===I.current&&W(!1),f&&f(e)}),!1),te=Ja((e=>{T.current||(T.current=e.currentTarget),z(e),!0===I.current&&(W(!0),x&&x(e)),b&&b(e)})),ne=()=>{const e=T.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=r.useRef(!1),oe=Ja((e=>{h&&!re.current&&B&&N.current&&" "===e.key&&(re.current=!0,N.current.stop(e,(()=>{N.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))})),ie=Ja((e=>{h&&" "===e.key&&N.current&&B&&!e.defaultPrevented&&(re.current=!1,N.current.stop(e,(()=>{N.current.pulsate(e)}))),w&&w(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let ae=l;"button"===ae&&(O.href||O.to)&&(ae=p);const se={};"button"===ae?(se.type=void 0===P?"button":P,se.disabled=c):(O.href||O.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=Ya(t,F,T);const ce=(0,bi.A)({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:h,tabIndex:E,focusVisible:B}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Sa({root:["root",t&&"disabled",n&&"focusVisible"]},Ws,o);return n&&r&&(i.root+=" ".concat(r)),i})(ce);return(0,Mi.jsxs)(Us,(0,bi.A)({as:ae,className:yi(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:K,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:$,onMouseLeave:G,onMouseUp:Y,onDragLeave:X,onTouchEnd:J,onTouchMove:Z,onTouchStart:Q,ref:le,tabIndex:c?-1:E,type:P},se,O,{children:[a,U?(0,Mi.jsx)(Bs,(0,bi.A)({ref:L,center:i},M)):null]}))})),$s=qs;function Ks(e){return ga("MuiButton",e)}const Xs=va("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"]),Ys=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Gs=e=>(0,bi.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),Qs=Aa($s,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat(Da(n.color))],t["size".concat(Da(n.size))],t["".concat(n.variant,"Size").concat(Da(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,o;const i="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,bi.A)({},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":(0,bi.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,bi.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(Xs.focusVisible)]:(0,bi.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(Xs.disabled)]:(0,bi.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,zi.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(o=t.palette).getContrastText)?void 0:r.call(o,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(Xs.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(Xs.disabled)]:{boxShadow:"none"}}})),Js=Aa("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat(Da(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},Gs(t))})),Zs=Aa("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat(Da(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},Gs(t))})),el=r.forwardRef((function(e,t){const n=r.useContext(Wa),o=r.useContext(Ha),i=Oa({props:Ma(n,e),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:m=!1,size:g="medium",startIcon:v,type:b,variant:x="text"}=i,y=(0,rr.A)(i,Ys),w=(0,bi.A)({},i,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:h,fullWidth:m,size:g,type:b,variant:x}),S=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s=Sa({root:["root",i,"".concat(i).concat(Da(t)),"size".concat(Da(o)),"".concat(i,"Size").concat(Da(o)),"color".concat(Da(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat(Da(o))],endIcon:["icon","endIcon","iconSize".concat(Da(o))]},Ks,a);return(0,bi.A)({},a,s)})(w),k=v&&(0,Mi.jsx)(Js,{className:S.startIcon,ownerState:w,children:v}),j=p&&(0,Mi.jsx)(Zs,{className:S.endIcon,ownerState:w,children:p}),C=o||"";return(0,Mi.jsxs)(Qs,(0,bi.A)({ownerState:w,className:yi(n.className,S.root,c,C),component:l,disabled:u,focusRipple:!h,focusVisibleClassName:yi(S.focusVisible,f),ref:t,type:b},y,{classes:S,children:[k,a,j]}))})),tl=el,nl=["ownerState"],rl=["variants"],ol=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function il(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const al=(0,ji.A)(),sl=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function ll(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function cl(e){return e?(t,n)=>n[e]:null}function ul(e,t){let{ownerState:n}=t,r=(0,rr.A)(t,nl);const o="function"===typeof e?e((0,bi.A)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap((e=>ul(e,(0,bi.A)({ownerState:n},r))));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,rr.A)(o,rl);return e.forEach((e=>{let o=!0;"function"===typeof e.props?o=e.props((0,bi.A)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,bi.A)({ownerState:n},r,n)):e.style))})),t}return o}const dl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=al,rootShouldForwardProp:r=il,slotShouldForwardProp:o=il}=e,i=e=>(0,Si.A)((0,bi.A)({},e,{theme:ll((0,bi.A)({},e,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,wi.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=cl(sl(l))}=a,h=(0,rr.A)(a,ol),p=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,f=u||!1;let m=il;"Root"===l||"root"===l?m=r:l?m=o:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const g=(0,wi.default)(e,(0,bi.A)({shouldForwardProp:m,label:undefined},h)),v=e=>"function"===typeof e&&e.__emotion_real!==e||(0,Ni.Q)(e)?r=>ul(e,(0,bi.A)({},r,{theme:ll({theme:r.theme,defaultTheme:n,themeId:t})})):e,b=function(r){let o=v(r);for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];const u=l?l.map(v):[];s&&d&&u.push((e=>{const r=ll((0,bi.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const o=r.components[s].styleOverrides,i={};return Object.entries(o).forEach((t=>{let[n,o]=t;i[n]=ul(o,(0,bi.A)({},e,{theme:r}))})),d(e,i)})),s&&!p&&u.push((e=>{var r;const o=ll((0,bi.A)({},e,{defaultTheme:n,themeId:t}));return ul({variants:null==o||null==(r=o.components)||null==(r=r[s])?void 0:r.variants},(0,bi.A)({},e,{theme:o}))})),f||u.push(i);const h=u.length-l.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const m=g(o,...u);return e.muiName&&(m.muiName=e.muiName),m};return g.withConfig&&(b.withConfig=g.withConfig),b}}(),hl=dl;function pl(e){let{props:t,name:n,defaultTheme:r,themeId:o}=e,i=Ei(r);o&&(i=i[o]||i);const a=function(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?Ma(t.components[n].defaultProps,r):r}({theme:i,name:n,props:t});return a}var fl=n(9751),ml=n(8604);const gl=["component","direction","spacing","divider","children","className","useFlexGap"],vl=(0,ji.A)(),bl=hl("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function xl(e){return pl({props:e,name:"MuiStack",defaultTheme:vl})}function yl(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i<n.length-1&&e.push(r.cloneElement(t,{key:"separator-".concat(i)})),e)),[])}const wl=e=>{let{ownerState:t,theme:n}=e,r=(0,bi.A)({display:"flex",flexDirection:"column"},(0,fl.NI)({theme:n},(0,fl.kW)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,ml.LX)(n),o=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),i=(0,fl.kW)({values:t.direction,base:o}),a=(0,fl.kW)({values:t.spacing,base:o});"object"===typeof i&&Object.keys(i).forEach(((e,t,n)=>{if(!i[e]){const r=t>0?i[n[t-1]]:"column";i[e]=r}}));const s=(n,r)=>{return t.useFlexGap?{gap:(0,ml._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((o=r?i[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]))]:(0,ml._W)(e,n)}};var o};r=(0,Ni.A)(r,(0,fl.NI)({theme:n},a,s))}return r=(0,fl.iZ)(n.breakpoints,r),r};const Sl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=bl,useThemeProps:n=xl,componentName:o="MuiStack"}=e,i=t(wl),a=r.forwardRef((function(e,t){const r=n(e),a=(0,ki.A)(r),{component:s="div",direction:l="column",spacing:c=0,divider:u,children:d,className:h,useFlexGap:p=!1}=a,f=(0,rr.A)(a,gl),m={direction:l,spacing:c,useFlexGap:p},g=Sa({root:["root"]},(e=>ga(o,e)),{});return(0,Mi.jsx)(i,(0,bi.A)({as:s,ownerState:m,ref:t,className:yi(g.root,h)},f,{children:u?yl(d,u):d}))}));return a}({createStyledComponent:Aa("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Oa({props:e,name:"MuiStack"})}),kl=Sl;const jl=r.createContext(void 0);function Cl(){return r.useContext(jl)}function _l(e){return ga("MuiTypography",e)}va("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Al=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],El=Aa("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat(Da(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),Ml={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Rl={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Pl=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTypography"}),r=(e=>Rl[e]||e)(n.color),o=(0,ki.A)((0,bi.A)({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=Ml}=o,p=(0,rr.A)(o,Al),f=(0,bi.A)({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h}),m=s||(u?"p":h[d]||Ml[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Sa({root:["root",i,"inherit"!==e.align&&"align".concat(Da(t)),n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},_l,a)})(f);return(0,Mi.jsx)(El,(0,bi.A)({as:m,ref:t,ownerState:f,className:yi(g.root,a)},p))})),Ol=Pl;function Tl(e){return ga("MuiFormControlLabel",e)}const Nl=va("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);function Ll(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}const Il=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],zl=Aa("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Nl.label)]:t.label},t.root,t["labelPlacement".concat(Da(n.labelPlacement))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(Nl.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(Nl.label)]:{["&.".concat(Nl.disabled)]:{color:(t.vars||t).palette.text.disabled}}})})),Dl=Aa("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(Nl.error)]:{color:(t.vars||t).palette.error.main}}})),Fl=r.forwardRef((function(e,t){var n,o;const i=Oa({props:e,name:"MuiFormControlLabel"}),{className:a,componentsProps:s={},control:l,disabled:c,disableTypography:u,label:d,labelPlacement:h="end",required:p,slotProps:f={}}=i,m=(0,rr.A)(i,Il),g=Cl(),v=null!=(n=null!=c?c:l.props.disabled)?n:null==g?void 0:g.disabled,b=null!=p?p:l.props.required,x={disabled:v,required:b};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof l.props[e]&&"undefined"!==typeof i[e]&&(x[e]=i[e])}));const y=Ll({props:i,muiFormControl:g,states:["error"]}),w=(0,bi.A)({},i,{disabled:v,labelPlacement:h,required:b,error:y.error}),S=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e;return Sa({root:["root",n&&"disabled","labelPlacement".concat(Da(r)),o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]},Tl,t)})(w),k=null!=(o=f.typography)?o:s.typography;let j=d;return null==j||j.type===Ol||u||(j=(0,Mi.jsx)(Ol,(0,bi.A)({component:"span"},k,{className:yi(S.label,null==k?void 0:k.className),children:j}))),(0,Mi.jsxs)(zl,(0,bi.A)({className:yi(S.root,a),ownerState:w,ref:t},m,{children:[r.cloneElement(l,x),b?(0,Mi.jsxs)(kl,{display:"block",children:[j,(0,Mi.jsxs)(Dl,{ownerState:w,"aria-hidden":!0,className:S.asterisk,children:["\u2009","*"]})]}):j]}))}));const Bl=function(e){let{controlled:t,default:n,name:o,state:i="value"}=e;const{current:a}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[a?t:s,r.useCallback((e=>{a||l(e)}),[])]};function Wl(e){return ga("PrivateSwitchBase",e)}va("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Hl=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Vl=Aa($s)((e=>{let{ownerState:t}=e;return(0,bi.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),Ul=Aa("input",{shouldForwardProp:_a})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ql=r.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:h,inputRef:p,name:f,onBlur:m,onChange:g,onFocus:v,readOnly:b,required:x=!1,tabIndex:y,type:w,value:S}=e,k=(0,rr.A)(e,Hl),[j,C]=Bl({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),_=Cl();let A=s;_&&"undefined"===typeof A&&(A=_.disabled);const E="checkbox"===w||"radio"===w,M=(0,bi.A)({},e,{checked:j,disabled:A,disableFocusRipple:l,edge:c}),R=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Sa({root:["root",n&&"checked",r&&"disabled",o&&"edge".concat(Da(o))],input:["input"]},Wl,t)})(M);return(0,Mi.jsxs)(Vl,(0,bi.A)({component:"span",className:yi(R.root,i),centerRipple:!0,focusRipple:!l,disabled:A,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),_&&_.onFocus&&_.onFocus(e)},onBlur:e=>{m&&m(e),_&&_.onBlur&&_.onBlur(e)},ownerState:M,ref:t},k,{children:[(0,Mi.jsx)(Ul,(0,bi.A)({autoFocus:n,checked:r,defaultChecked:a,className:R.input,disabled:A,id:E?d:void 0,name:f,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;C(t),g&&g(e,t)},readOnly:b,ref:p,required:x,ownerState:M,tabIndex:y,type:w},"checkbox"===w&&void 0===S?{}:{value:S},h)),j?o:u]}))})),$l=ql;function Kl(e){return ga("MuiSvgIcon",e)}va("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Xl=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Yl=Aa("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat(Da(n.color))],t["fontSize".concat(Da(n.fontSize))]]}})((e=>{let{theme:t,ownerState:n}=e;var r,o,i,a,s,l,c,u,d,h,p,f,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(o=r.create)?void 0:o.call(r,"fill",{duration:null==(i=t.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(h=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?h:{action:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[n.color]}})),Gl=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24"}=n,p=(0,rr.A)(n,Xl),f=r.isValidElement(o)&&"svg"===o.type,m=(0,bi.A)({},n,{color:a,component:s,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f}),g={};u||(g.viewBox=h);const v=(e=>{const{color:t,fontSize:n,classes:r}=e;return Sa({root:["root","inherit"!==t&&"color".concat(Da(t)),"fontSize".concat(Da(n))]},Kl,r)})(m);return(0,Mi.jsxs)(Yl,(0,bi.A)({as:s,className:yi(v.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:t},g,p,f&&o.props,{ownerState:m,children:[f?o.props.children:o,d?(0,Mi.jsx)("title",{children:d}):null]}))}));Gl.muiName="SvgIcon";const Ql=Gl;function Jl(e,t){function n(n,r){return(0,Mi.jsx)(Ql,(0,bi.A)({"data-testid":"".concat(t,"Icon"),ref:r},n,{children:e}))}return n.muiName=Ql.muiName,r.memo(r.forwardRef(n))}const Zl=Jl((0,Mi.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"),ec=Jl((0,Mi.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"),tc=Jl((0,Mi.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 nc(e){return ga("MuiCheckbox",e)}const rc=va("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),oc=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],ic=Aa($l,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t["size".concat(Da(n.size))],"default"!==n.color&&t["color".concat(Da(n.color))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(rc.checked,", &.").concat(rc.indeterminate)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(rc.disabled)]:{color:(t.vars||t).palette.action.disabled}})})),ac=(0,Mi.jsx)(ec,{}),sc=(0,Mi.jsx)(Zl,{}),lc=(0,Mi.jsx)(tc,{}),cc=r.forwardRef((function(e,t){var n,o;const i=Oa({props:e,name:"MuiCheckbox"}),{checkedIcon:a=ac,color:s="primary",icon:l=sc,indeterminate:c=!1,indeterminateIcon:u=lc,inputProps:d,size:h="medium",className:p}=i,f=(0,rr.A)(i,oc),m=c?u:l,g=c?u:a,v=(0,bi.A)({},i,{color:s,indeterminate:c,size:h}),b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i=Sa({root:["root",n&&"indeterminate","color".concat(Da(r)),"size".concat(Da(o))]},nc,t);return(0,bi.A)({},t,i)})(v);return(0,Mi.jsx)(ic,(0,bi.A)({type:"checkbox",inputProps:(0,bi.A)({"data-indeterminate":c},d),icon:r.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:h}),checkedIcon:r.cloneElement(g,{fontSize:null!=(o=g.props.fontSize)?o:h}),ownerState:v,ref:t,className:yi(b.root,p)},f,{classes:b}))})),uc=cc;const dc=function(e){return"string"===typeof e};const hc=function(e,t,n){return void 0===e||dc(e)?t:(0,bi.A)({},t,{ownerState:(0,bi.A)({},t.ownerState,n)})};const pc=function(e,t,n){return"function"===typeof e?e(t,n):e};const fc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n};const mc=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t};const gc=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=yi(null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),t=(0,bi.A)({},null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),a=(0,bi.A)({},n,o,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=fc((0,bi.A)({},o,r)),s=mc(r),l=mc(o),c=t(a),u=yi(null==c?void 0:c.className,null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),d=(0,bi.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),h=(0,bi.A)({},c,n,l,s);return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}},vc=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],bc=["component","slots","slotProps"],xc=["component"];function yc(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,rr.A)(t,vc),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=i,h=(0,rr.A)(i,bc),p=u[e]||r,f=pc(d[e],o),m=gc((0,bi.A)({className:n},l,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:f})),{props:{component:g},internalRef:v}=m,b=(0,rr.A)(m.props,xc),x=Xa(v,null==f?void 0:f.ref,t.ref),y=a?a(b):{},w=(0,bi.A)({},o,y),S="root"===e?g||c:g,k=hc(p,(0,bi.A)({},"root"===e&&!c&&!u[e]&&s,"root"!==e&&!u[e]&&s,b,S&&{as:S},{ref:x}),w);return Object.keys(y).forEach((e=>{delete k[e]})),[p,k]}function wc(e){return ga("MuiAlert",e)}const Sc=va("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function kc(e){return ga("MuiIconButton",e)}const jc=va("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Cc=["edge","children","className","color","disabled","disableFocusRipple","size"],_c=Aa($s,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat(Da(n.color))],n.edge&&t["edge".concat(Da(n.edge))],t["size".concat(Da(n.size))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const o=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,bi.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,bi.A)({color:null==o?void 0:o.main},!n.disableRipple&&{"&:hover":(0,bi.A)({},o&&{backgroundColor:t.vars?"rgba(".concat(o.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(o.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(jc.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),Ac=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=(0,rr.A)(n,Cc),d=(0,bi.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),h=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return Sa({root:["root",n&&"disabled","default"!==r&&"color".concat(Da(r)),o&&"edge".concat(Da(o)),"size".concat(Da(i))]},kc,t)})(d);return(0,Mi.jsx)(_c,(0,bi.A)({className:yi(h.root,i),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},u,{ownerState:d,children:o}))})),Ec=Ac,Mc=Jl((0,Mi.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Rc=Jl((0,Mi.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Pc=Jl((0,Mi.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Oc=Jl((0,Mi.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Tc=Jl((0,Mi.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Nc=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Lc=Aa(Ia,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat(Da(n.color||n.severity))]]}})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?zi.e$:zi.a,r="light"===t.palette.mode?zi.a:zi.e$;return(0,bi.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[o]=e;return{props:{colorSeverity:o,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(o,"Color")]:n(t.palette[o].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(o,"StandardBg")]:r(t.palette[o].light,.9),["& .".concat(Sc.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(o,"IconColor")]}:{color:t.palette[o].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(r,"Color")]:n(t.palette[r].light,.6),border:"1px solid ".concat((t.vars||t).palette[r].light),["& .".concat(Sc.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(r,"IconColor")]}:{color:t.palette[r].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.dark})).map((e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:(0,bi.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(n,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(n,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)})}}))]})})),Ic=Aa("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),zc=Aa("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Dc=Aa("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Fc={success:(0,Mi.jsx)(Mc,{fontSize:"inherit"}),warning:(0,Mi.jsx)(Rc,{fontSize:"inherit"}),error:(0,Mi.jsx)(Pc,{fontSize:"inherit"}),info:(0,Mi.jsx)(Oc,{fontSize:"inherit"})},Bc=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiAlert"}),{action:r,children:o,className:i,closeText:a="Close",color:s,components:l={},componentsProps:c={},icon:u,iconMapping:d=Fc,onClose:h,role:p="alert",severity:f="success",slotProps:m={},slots:g={},variant:v="standard"}=n,b=(0,rr.A)(n,Nc),x=(0,bi.A)({},n,{color:s,severity:f,variant:v,colorSeverity:s||f}),y=(e=>{const{variant:t,color:n,severity:r,classes:o}=e;return Sa({root:["root","color".concat(Da(n||r)),"".concat(t).concat(Da(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]},wc,o)})(x),w={slots:(0,bi.A)({closeButton:l.CloseButton,closeIcon:l.CloseIcon},g),slotProps:(0,bi.A)({},c,m)},[S,k]=yc("closeButton",{elementType:Ec,externalForwardedProps:w,ownerState:x}),[j,C]=yc("closeIcon",{elementType:Tc,externalForwardedProps:w,ownerState:x});return(0,Mi.jsxs)(Lc,(0,bi.A)({role:p,elevation:0,ownerState:x,className:yi(y.root,i),ref:t},b,{children:[!1!==u?(0,Mi.jsx)(Ic,{ownerState:x,className:y.icon,children:u||d[f]||Fc[f]}):null,(0,Mi.jsx)(zc,{ownerState:x,className:y.message,children:o}),null!=r?(0,Mi.jsx)(Dc,{ownerState:x,className:y.action,children:r}):null,null==r&&h?(0,Mi.jsx)(Dc,{ownerState:x,className:y.action,children:(0,Mi.jsx)(S,(0,bi.A)({size:"small","aria-label":a,title:a,color:"inherit",onClick:h},k,{children:(0,Mi.jsx)(j,(0,bi.A)({fontSize:"small"},C))}))}):null]}))})),Wc=Bc;function Hc(e){return ga("MuiCircularProgress",e)}va("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Vc,Uc,qc,$c;const Kc=["className","color","disableShrink","size","style","thickness","value","variant"];let Xc,Yc,Gc,Qc;const Jc=44,Zc=(0,Ss.i7)(Xc||(Xc=Vc||(Vc=hs(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),eu=(0,Ss.i7)(Yc||(Yc=Uc||(Uc=hs(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),tu=Aa("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat(Da(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,Ss.AH)(Gc||(Gc=qc||(qc=hs(["\n animation: "," 1.4s linear infinite;\n "]))),Zc)})),nu=Aa("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),ru=Aa("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat(Da(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,Ss.AH)(Qc||(Qc=$c||($c=hs(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),eu)})),ou=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate"}=n,d=(0,rr.A)(n,Kc),h=(0,bi.A)({},n,{color:o,disableShrink:i,size:a,thickness:l,value:c,variant:u}),p=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Sa({root:["root",n,"color".concat(Da(r))],svg:["svg"],circle:["circle","circle".concat(Da(n)),o&&"circleDisableShrink"]},Hc,t)})(h),f={},m={},g={};if("determinate"===u){const e=2*Math.PI*((Jc-l)/2);f.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),f.strokeDashoffset="".concat(((100-c)/100*e).toFixed(3),"px"),m.transform="rotate(-90deg)"}return(0,Mi.jsx)(tu,(0,bi.A)({className:yi(p.root,r),style:(0,bi.A)({width:a,height:a},m,s),ownerState:h,ref:t,role:"progressbar"},g,d,{children:(0,Mi.jsx)(nu,{className:p.svg,ownerState:h,viewBox:"".concat(22," ").concat(22," ").concat(Jc," ").concat(Jc),children:(0,Mi.jsx)(ru,{className:p.circle,style:f,ownerState:h,cx:Jc,cy:Jc,r:(Jc-l)/2,fill:"none",strokeWidth:l})})}))})),iu=ou,au=e=>{let{processId:t,processName:n}=e;const[o,i]=(0,r.useState)([]),[a,s]=(0,r.useState)(!0),[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(!0),[h,p]=(0,r.useState)("all"),[f,m]=(0,r.useState)(!0),g=(0,r.useRef)(null);(0,r.useEffect)((()=>{let e;const n=async()=>{try{s(!0);const e=await nr.get("/api/logs/".concat(t,"/out")),n=await nr.get("/api/logs/".concat(t,"/err")),r=e.data.logs.map((e=>({type:"out",content:e,timestamp:(new Date).toISOString()}))),o=n.data.logs.map((e=>({type:"err",content:e,timestamp:(new Date).toISOString()}))),a=[...r,...o].sort(((e,t)=>e.timestamp.localeCompare(t.timestamp)));i(a),c("")}catch(AR){console.error("Error fetching logs:",AR),c("Failed to fetch logs: ".concat(AR instanceof Error?AR.message:"Unknown error"))}finally{s(!1)}};return n(),u&&(e=setInterval(n,5e3)),()=>{e&&clearInterval(e)}}),[t,u]),(0,r.useEffect)((()=>{f&&g.current&&(g.current.scrollTop=g.current.scrollHeight)}),[o,f]);const v=e=>{p(e)},b=o.filter((e=>"all"===h||e.type===h));return(0,Mi.jsxs)(wa,{sx:{width:"100%"},children:[(0,Mi.jsxs)(Ia,{elevation:0,sx:{p:2,mb:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Mi.jsxs)($a,{size:"small",variant:"outlined",children:[(0,Mi.jsx)(tl,{variant:"all"===h?"contained":"outlined",onClick:()=>v("all"),color:"primary",children:"All Logs"}),(0,Mi.jsx)(tl,{variant:"out"===h?"contained":"outlined",onClick:()=>v("out"),color:"primary",children:"Standard Out"}),(0,Mi.jsx)(tl,{variant:"err"===h?"contained":"outlined",onClick:()=>v("err"),color:"error",children:"Error"})]}),(0,Mi.jsxs)(kl,{direction:"row",spacing:2,alignItems:"center",children:[(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(uc,{checked:f,onChange:()=>{m(!f)},size:"small"}),label:"Auto-scroll"}),(0,Mi.jsx)(tl,{variant:u?"contained":"outlined",onClick:()=>{d(!u)},color:"primary",size:"small",children:u?"Auto-refresh On":"Auto-refresh Off"})]})]}),l&&(0,Mi.jsx)(Wc,{severity:"error",sx:{mb:2},children:l}),a&&0===o.length?(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"center",alignItems:"center",py:8},children:[(0,Mi.jsx)(iu,{size:30,sx:{mr:2}}),(0,Mi.jsx)(Ol,{variant:"body1",children:"Loading logs..."})]}):0===b.length?(0,Mi.jsx)(wa,{sx:{textAlign:"center",py:8,bgcolor:"background.paper",borderRadius:1},children:(0,Mi.jsx)(Ol,{variant:"body1",color:"text.secondary",children:"No logs available for this process."})}):(0,Mi.jsx)(Ia,{variant:"outlined",sx:{height:350,overflow:"auto",p:2,bgcolor:e=>"dark"===e.palette.mode?"grey.900":"grey.50",fontFamily:"monospace",fontSize:"0.9rem"},ref:g,children:b.map(((e,t)=>(0,Mi.jsx)(wa,{sx:{mb:.5,color:"err"===e.type?"error.main":"text.primary",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.content},t)))})]})};function su(e){return e+.5|0}const lu=(e,t,n)=>Math.max(Math.min(e,n),t);function cu(e){return lu(su(2.55*e),0,255)}function uu(e){return lu(su(255*e),0,255)}function du(e){return lu(su(e/2.55)/100,0,1)}function hu(e){return lu(su(100*e),0,100)}const pu={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},fu=[..."0123456789ABCDEF"],mu=e=>fu[15&e],gu=e=>fu[(240&e)>>4]+fu[15&e],vu=e=>(240&e)>>4===(15&e);function bu(e){var t=(e=>vu(e.r)&&vu(e.g)&&vu(e.b)&&vu(e.a))(e)?mu:gu;return e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0}const xu=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function yu(e,t,n){const r=t*Math.min(n,1-n),o=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(o-3,9-o,1),-1)};return[o(0),o(8),o(4)]}function wu(e,t,n){const r=function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(o,4-o,1),0)};return[r(5),r(3),r(1)]}function Su(e,t,n){const r=yu(e,1,.5);let o;for(t+n>1&&(o=1/(t+n),t*=o,n*=o),o=0;o<3;o++)r[o]*=1-t-n,r[o]+=t;return r}function ku(e){const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),i=Math.min(t,n,r),a=(o+i)/2;let s,l,c;return o!==i&&(c=o-i,l=a>.5?c/(2-o-i):c/(o+i),s=function(e,t,n,r,o){return e===o?(t-n)/r+(t<n?6:0):t===o?(n-e)/r+2:(e-t)/r+4}(t,n,r,c,o),s=60*s+.5),[0|s,l||0,a]}function ju(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(uu)}function Cu(e,t,n){return ju(yu,e,t,n)}function _u(e){return(e%360+360)%360}function Au(e){const t=xu.exec(e);let n,r=255;if(!t)return;t[5]!==n&&(r=t[6]?cu(+t[5]):uu(+t[5]));const o=_u(+t[2]),i=+t[3]/100,a=+t[4]/100;return n="hwb"===t[1]?function(e,t,n){return ju(Su,e,t,n)}(o,i,a):"hsv"===t[1]?function(e,t,n){return ju(wu,e,t,n)}(o,i,a):Cu(o,i,a),{r:n[0],g:n[1],b:n[2],a:r}}const Eu={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Mu={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ru;function Pu(e){Ru||(Ru=function(){const e={},t=Object.keys(Mu),n=Object.keys(Eu);let r,o,i,a,s;for(r=0;r<t.length;r++){for(a=s=t[r],o=0;o<n.length;o++)i=n[o],s=s.replace(i,Eu[i]);i=parseInt(Mu[a],16),e[s]=[i>>16&255,i>>8&255,255&i]}return e}(),Ru.transparent=[0,0,0,0]);const t=Ru[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const Ou=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Tu=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,Nu=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Lu(e,t,n){if(e){let r=ku(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=Cu(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Iu(e,t){return e?Object.assign(t||{},e):e}function zu(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=uu(e[3]))):(t=Iu(e,{r:0,g:0,b:0,a:1})).a=uu(t.a),t}function Du(e){return"r"===e.charAt(0)?function(e){const t=Ou.exec(e);let n,r,o,i=255;if(t){if(t[7]!==n){const e=+t[7];i=t[8]?cu(e):lu(255*e,0,255)}return n=+t[1],r=+t[3],o=+t[5],n=255&(t[2]?cu(n):lu(n,0,255)),r=255&(t[4]?cu(r):lu(r,0,255)),o=255&(t[6]?cu(o):lu(o,0,255)),{r:n,g:r,b:o,a:i}}}(e):Au(e)}class Fu{constructor(e){if(e instanceof Fu)return e;const t=typeof e;let n;"object"===t?n=zu(e):"string"===t&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*pu[e[1]],g:255&17*pu[e[2]],b:255&17*pu[e[3]],a:5===n?17*pu[e[4]]:255}:7!==n&&9!==n||(t={r:pu[e[1]]<<4|pu[e[2]],g:pu[e[3]]<<4|pu[e[4]],b:pu[e[5]]<<4|pu[e[6]],a:9===n?pu[e[7]]<<4|pu[e[8]]:255})),t}(e)||Pu(e)||Du(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=Iu(this._rgb);return e&&(e.a=du(e.a)),e}set rgb(e){this._rgb=zu(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(du(e.a),")"):"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")")):void 0;var e}hexString(){return this._valid?bu(this._rgb):void 0}hslString(){return this._valid?function(e){if(!e)return;const t=ku(e),n=t[0],r=hu(t[1]),o=hu(t[2]);return e.a<255?"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(du(e.a),")"):"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)")}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,r=e.rgb;let o;const i=t===o?.5:t,a=2*i-1,s=n.a-r.a,l=((a*s===-1?a:(a+s)/(1+a*s))+1)/2;o=1-l,n.r=255&l*n.r+o*r.r+.5,n.g=255&l*n.g+o*r.g+.5,n.b=255&l*n.b+o*r.b+.5,n.a=i*n.a+(1-i)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,n){const r=Nu(du(e.r)),o=Nu(du(e.g)),i=Nu(du(e.b));return{r:uu(Tu(r+n*(Nu(du(t.r))-r))),g:uu(Tu(o+n*(Nu(du(t.g))-o))),b:uu(Tu(i+n*(Nu(du(t.b))-i))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new Fu(this.rgb)}alpha(e){return this._rgb.a=uu(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=su(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Lu(this._rgb,2,e),this}darken(e){return Lu(this._rgb,2,-e),this}saturate(e){return Lu(this._rgb,1,e),this}desaturate(e){return Lu(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=ku(e);n[0]=_u(n[0]+t),n=Cu(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function Bu(){}const Wu=(()=>{let e=0;return()=>e++})();function Hu(e){return null===e||void 0===e}function Vu(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function Uu(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function qu(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function $u(e,t){return qu(e)?e:t}function Ku(e,t){return"undefined"===typeof e?t:e}const Xu=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Yu(e,t,n){if(e&&"function"===typeof e.call)return e.apply(n,t)}function Gu(e,t,n,r){let o,i,a;if(Vu(e))if(i=e.length,r)for(o=i-1;o>=0;o--)t.call(n,e[o],o);else for(o=0;o<i;o++)t.call(n,e[o],o);else if(Uu(e))for(a=Object.keys(e),i=a.length,o=0;o<i;o++)t.call(n,e[a[o]],a[o])}function Qu(e,t){let n,r,o,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(o=e[n],i=t[n],o.datasetIndex!==i.datasetIndex||o.index!==i.index)return!1;return!0}function Ju(e){if(Vu(e))return e.map(Ju);if(Uu(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let o=0;for(;o<r;++o)t[n[o]]=Ju(e[n[o]]);return t}return e}function Zu(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function ed(e,t,n,r){if(!Zu(e))return;const o=t[e],i=n[e];Uu(o)&&Uu(i)?td(o,i,r):t[e]=Ju(i)}function td(e,t,n){const r=Vu(t)?t:[t],o=r.length;if(!Uu(e))return e;const i=(n=n||{}).merger||ed;let a;for(let s=0;s<o;++s){if(a=r[s],!Uu(a))continue;const t=Object.keys(a);for(let r=0,o=t.length;r<o;++r)i(t[r],e,a,n)}return e}function nd(e,t){return td(e,t,{merger:rd})}function rd(e,t,n){if(!Zu(e))return;const r=t[e],o=n[e];Uu(r)&&Uu(o)?nd(r,o):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Ju(o))}const od={"":e=>e,x:e=>e.x,y:e=>e.y};function id(e,t){const n=od[t]||(od[t]=function(e){const t=function(e){const t=e.split("."),n=[];let r="";for(const o of t)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(e);return e=>{for(const n of t){if(""===n)break;e=e&&e[n]}return e}}(t));return n(e)}function ad(e){return e.charAt(0).toUpperCase()+e.slice(1)}const sd=e=>"undefined"!==typeof e,ld=e=>"function"===typeof e,cd=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};const ud=Math.PI,dd=2*ud,hd=dd+ud,pd=Number.POSITIVE_INFINITY,fd=ud/180,md=ud/2,gd=ud/4,vd=2*ud/3,bd=Math.log10,xd=Math.sign;function yd(e,t,n){return Math.abs(e-t)<n}function wd(e){const t=Math.round(e);e=yd(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(bd(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Sd(e){return!function(e){return"symbol"===typeof e||"object"===typeof e&&null!==e&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function kd(e,t,n){let r,o,i;for(r=0,o=e.length;r<o;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function jd(e){return e*(ud/180)}function Cd(e){return e*(180/ud)}function _d(e){if(!qu(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Ad(e,t){const n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r);let i=Math.atan2(r,n);return i<-.5*ud&&(i+=dd),{angle:i,distance:o}}function Ed(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Md(e,t){return(e-t+hd)%dd-ud}function Rd(e){return(e%dd+dd)%dd}function Pd(e,t,n,r){const o=Rd(e),i=Rd(t),a=Rd(n),s=Rd(i-o),l=Rd(a-o),c=Rd(o-i),u=Rd(o-a);return o===i||o===a||r&&i===a||s>l&&c<u}function Od(e,t,n){return Math.max(t,Math.min(n,e))}function Td(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Nd(e,t,n){n=n||(n=>e[n]<t);let r,o=e.length-1,i=0;for(;o-i>1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const Ld=(e,t,n,r)=>Nd(e,n,r?r=>{const o=e[r][t];return o<n||o===n&&e[r+1][t]===n}:r=>e[r][t]<n),Id=(e,t,n)=>Nd(e,n,(r=>e[r][t]>=n));const zd=["push","pop","shift","splice","unshift"];function Dd(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,o=r.indexOf(t);-1!==o&&r.splice(o,1),r.length>0||(zd.forEach((t=>{delete e[t]})),delete e._chartjs)}function Fd(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Bd="undefined"===typeof window?function(e){return e()}:window.requestAnimationFrame;function Wd(e,t){let n=[],r=!1;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];n=i,r||(r=!0,Bd.call(window,(()=>{r=!1,e.apply(t,n)})))}}const Hd=e=>"start"===e?"left":"end"===e?"right":"center",Vd=(e,t,n)=>"start"===e?t:"end"===e?n:(t+n)/2;function Ud(e,t,n){const r=t.length;let o=0,i=r;if(e._sorted){const{iScale:a,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:d,max:h,minDefined:p,maxDefined:f}=a.getUserBounds();if(p){if(o=Math.min(Ld(l,u,d).lo,n?r:Ld(t,u,a.getPixelForValue(d)).lo),c){const e=l.slice(0,o+1).reverse().findIndex((e=>!Hu(e[s.axis])));o-=Math.max(0,e)}o=Od(o,0,r-1)}if(f){let e=Math.max(Ld(l,a.axis,h,!0).hi+1,n?0:Ld(t,u,a.getPixelForValue(h),!0).hi+1);if(c){const t=l.slice(e-1).findIndex((e=>!Hu(e[s.axis])));e+=Math.max(0,t)}i=Od(e,o,r)-o}else i=r-o}return{start:o,count:i}}function qd(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,o={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=o,!0;const i=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,o),i}const $d=e=>0===e||1===e,Kd=(e,t,n)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*dd/n),Xd=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*dd/n)+1,Yd={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*md),easeOutSine:e=>Math.sin(e*md),easeInOutSine:e=>-.5*(Math.cos(ud*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>$d(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>$d(e)?e:Kd(e,.075,.3),easeOutElastic:e=>$d(e)?e:Xd(e,.075,.3),easeInOutElastic(e){const t=.1125;return $d(e)?e:e<.5?.5*Kd(2*e,t,.45):.5+.5*Xd(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-Yd.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?.5*Yd.easeInBounce(2*e):.5*Yd.easeOutBounce(2*e-1)+.5};function Gd(e){if(e&&"object"===typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function Qd(e){return Gd(e)?e:new Fu(e)}function Jd(e){return Gd(e)?e:new Fu(e).saturate(.5).darken(.1).hexString()}const Zd=["x","y","borderWidth","radius","tension"],eh=["color","borderColor","backgroundColor"];const th=new Map;function nh(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=th.get(n);return r||(r=new Intl.NumberFormat(e,t),th.set(n,r)),r}(t,n).format(e)}const rh={values:e=>Vu(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let o,i=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(o="scientific"),i=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}const a=bd(Math.abs(i)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),nh(e,r,l)},logarithmic(e,t,n){if(0===e)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(bd(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?rh.numeric.call(this,e,t,n):""}};var oh={formatters:rh};const ih=Object.create(null),ah=Object.create(null);function sh(e,t){if(!t)return e;const n=t.split(".");for(let r=0,o=n.length;r<o;++r){const t=n[r];e=e[t]||(e[t]=Object.create(null))}return e}function lh(e,t,n){return"string"===typeof t?td(sh(e,t),n):td(sh(e,""),t)}class ch{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>Jd(t.backgroundColor),this.hoverBorderColor=(e,t)=>Jd(t.borderColor),this.hoverColor=(e,t)=>Jd(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return lh(this,e,t)}get(e){return sh(this,e)}describe(e,t){return lh(ah,e,t)}override(e,t){return lh(ih,e,t)}route(e,t,n,r){const o=sh(this,e),i=sh(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[a],t=i[r];return Uu(e)?Object.assign({},t,e):Ku(e,t)},set(e){this[a]=e}}})}apply(e){e.forEach((e=>e(this)))}}var uh=new ch({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:eh},numbers:{type:"number",properties:Zd}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:oh.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function dh(e,t,n,r,o){let i=t[o];return i||(i=t[o]=e.measureText(o).width,n.push(o)),i>r&&(r=i),r}function hh(e,t,n,r){let o=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(o=r.data={},i=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let a=0;const s=n.length;let l,c,u,d,h;for(l=0;l<s;l++)if(d=n[l],void 0===d||null===d||Vu(d)){if(Vu(d))for(c=0,u=d.length;c<u;c++)h=d[c],void 0===h||null===h||Vu(h)||(a=dh(e,o,i,a,h))}else a=dh(e,o,i,a,d);e.restore();const p=i.length/2;if(p>n.length){for(l=0;l<p;l++)delete o[i[l]];i.splice(0,p)}return a}function ph(e,t,n){const r=e.currentDevicePixelRatio,o=0!==n?Math.max(n/2,.5):0;return Math.round((t-o)*r)/r+o}function fh(e,t){(t||e)&&((t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function mh(e,t,n,r){gh(e,t,n,r,null)}function gh(e,t,n,r,o){let i,a,s,l,c,u,d,h;const p=t.pointStyle,f=t.rotation,m=t.radius;let g=(f||0)*fd;if(p&&"object"===typeof p&&(i=p.toString(),"[object HTMLImageElement]"===i||"[object HTMLCanvasElement]"===i))return e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void e.restore();if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:o?e.ellipse(n,r,o/2,m,0,0,dd):e.arc(n,r,m,0,dd),e.closePath();break;case"triangle":u=o?o/2:m,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=vd,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=vd,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),e.closePath();break;case"rectRounded":c=.516*m,l=m-c,a=Math.cos(g+gd)*l,d=Math.cos(g+gd)*(o?o/2-c:l),s=Math.sin(g+gd)*l,h=Math.sin(g+gd)*(o?o/2-c:l),e.arc(n-d,r-s,c,g-ud,g-md),e.arc(n+h,r-a,c,g-md,g),e.arc(n+d,r+s,c,g,g+md),e.arc(n-h,r+a,c,g+md,g+ud),e.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*m,u=o?o/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=gd;case"rectRot":d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,s=Math.sin(g)*m,h=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-s),e.lineTo(n+h,r-a),e.lineTo(n+d,r+s),e.lineTo(n-h,r+a),e.closePath();break;case"crossRot":g+=gd;case"cross":d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,s=Math.sin(g)*m,h=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+h,r-a),e.lineTo(n-h,r+a);break;case"star":d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,s=Math.sin(g)*m,h=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+h,r-a),e.lineTo(n-h,r+a),g+=gd,d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,s=Math.sin(g)*m,h=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+h,r-a),e.lineTo(n-h,r+a);break;case"line":a=o?o/2:Math.cos(g)*m,s=Math.sin(g)*m,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(o?o/2:m),r+Math.sin(g)*m);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}function vh(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function bh(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function xh(e){e.restore()}function yh(e,t,n,r,o){if(!t)return e.lineTo(n.x,n.y);if("middle"===o){const r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else"after"===o!==!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function wh(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Sh(e,t,n,r,o){if(o.strikethrough||o.underline){const i=e.measureText(r),a=t-i.actualBoundingBoxLeft,s=t+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,c=n+i.actualBoundingBoxDescent,u=o.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=o.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function kh(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function jh(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=Vu(t)?t:[t],s=i.strokeWidth>0&&""!==i.strokeColor;let l,c;for(e.save(),e.font=o.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Hu(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,i),l=0;l<a.length;++l)c=a[l],i.backdrop&&kh(e,i.backdrop),s&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),Hu(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(c,n,r,i.maxWidth)),e.fillText(c,n,r,i.maxWidth),Sh(e,n,r,c,i),r+=Number(o.lineHeight);e.restore()}function Ch(e,t){const{x:n,y:r,w:o,h:i,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*ud,ud,!0),e.lineTo(n,r+i-a.bottomLeft),e.arc(n+a.bottomLeft,r+i-a.bottomLeft,a.bottomLeft,ud,md,!0),e.lineTo(n+o-a.bottomRight,r+i),e.arc(n+o-a.bottomRight,r+i-a.bottomRight,a.bottomRight,md,0,!0),e.lineTo(n+o,r+a.topRight),e.arc(n+o-a.topRight,r+a.topRight,a.topRight,0,-md,!0),e.lineTo(n+a.topLeft,r)}const _h=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ah=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Eh(e,t){const n=(""+e).match(_h);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e}function Mh(e,t){const n={},r=Uu(t),o=r?Object.keys(t):t,i=Uu(e)?r?n=>Ku(e[n],e[t[n]]):t=>e[t]:()=>e;for(const a of o)n[a]=+i(a)||0;return n}function Rh(e){return Mh(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ph(e){return Mh(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Oh(e){const t=Rh(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Th(e,t){e=e||{},t=t||uh.font;let n=Ku(e.size,t.size);"string"===typeof n&&(n=parseInt(n,10));let r=Ku(e.style,t.style);r&&!(""+r).match(Ah)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const o={family:Ku(e.family,t.family),lineHeight:Eh(Ku(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ku(e.weight,t.weight),string:""};return o.string=function(e){return!e||Hu(e.size)||Hu(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(o),o}function Nh(e,t,n,r){let o,i,a,s=!0;for(o=0,i=e.length;o<i;++o)if(a=e[o],void 0!==a&&(void 0!==t&&"function"===typeof a&&(a=a(t),s=!1),void 0!==n&&Vu(a)&&(a=a[n%a.length],s=!1),void 0!==a))return r&&!s&&(r.cacheable=!1),a}function Lh(e,t){return Object.assign(Object.create(e),t)}function Ih(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>e[0];const o=(arguments.length>2?arguments[2]:void 0)||e;"undefined"===typeof n&&(n=Kh("_fallback",e));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:r,override:r=>Ih([r,...e],t,o,n)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete t._keys,delete e[0][n],!0),get:(n,r)=>Wh(n,r,(()=>function(e,t,n,r){let o;for(const i of t)if(o=Kh(Fh(i,e),n),"undefined"!==typeof o)return Bh(e,o)?qh(n,r,e,o):o}(r,t,e,n))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>Xh(e).includes(t),ownKeys:e=>Xh(e),set(e,t,n){const o=e._storage||(e._storage=r());return e[t]=o[t]=n,delete e._keys,!0}})}function zh(e,t,n,r){const o={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Dh(e,r),setContext:t=>zh(e,t,n,r),override:o=>zh(e.override(o),t,n,r)};return new Proxy(o,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,t,n)=>Wh(e,t,(()=>function(e,t,n){const{_proxy:r,_context:o,_subProxy:i,_descriptors:a}=e;let s=r[t];ld(s)&&a.isScriptable(t)&&(s=function(e,t,n,r){const{_proxy:o,_context:i,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(i,a||r);s.delete(e),Bh(e,l)&&(l=qh(o._scopes,o,e,l));return l}(t,s,e,n));Vu(s)&&s.length&&(s=function(e,t,n,r){const{_proxy:o,_context:i,_subProxy:a,_descriptors:s}=n;if("undefined"!==typeof i.index&&r(e))return t[i.index%t.length];if(Uu(t[0])){const n=t,r=o._scopes.filter((e=>e!==n));t=[];for(const l of n){const n=qh(r,o,e,l);t.push(zh(n,i,a&&a[e],s))}}return t}(t,s,e,a.isIndexable));Bh(t,s)&&(s=zh(s,o,i&&i[t],a));return s}(e,t,n))),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}function Dh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:o=t.allKeys}=e;return{allKeys:o,scriptable:n,indexable:r,isScriptable:ld(n)?n:()=>n,isIndexable:ld(r)?r:()=>r}}const Fh=(e,t)=>e?e+ad(t):t,Bh=(e,t)=>Uu(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function Wh(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||"constructor"===t)return e[t];const r=n();return e[t]=r,r}function Hh(e,t,n){return ld(e)?e(t,n):e}const Vh=(e,t)=>!0===e?t:"string"===typeof e?id(t,e):void 0;function Uh(e,t,n,r,o){for(const i of t){const t=Vh(n,i);if(t){e.add(t);const i=Hh(t._fallback,n,o);if("undefined"!==typeof i&&i!==n&&i!==r)return i}else if(!1===t&&"undefined"!==typeof r&&n!==r)return null}return!1}function qh(e,t,n,r){const o=t._rootScopes,i=Hh(t._fallback,n,r),a=[...e,...o],s=new Set;s.add(r);let l=$h(s,a,n,i||n,r);return null!==l&&(("undefined"===typeof i||i===n||(l=$h(s,a,i,l,r),null!==l))&&Ih(Array.from(s),[""],o,i,(()=>function(e,t,n){const r=e._getTarget();t in r||(r[t]={});const o=r[t];if(Vu(o)&&Uu(n))return n;return o||{}}(t,n,r))))}function $h(e,t,n,r,o){for(;n;)n=Uh(e,t,n,r,o);return n}function Kh(e,t){for(const n of t){if(!n)continue;const t=n[e];if("undefined"!==typeof t)return t}}function Xh(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const n of e)for(const e of Object.keys(n).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}function Yh(e,t,n,r){const{iScale:o}=e,{key:i="r"}=this._parsing,a=new Array(r);let s,l,c,u;for(s=0,l=r;s<l;++s)c=s+n,u=t[c],a[s]={r:o.parse(id(u,i),c)};return a}const Gh=Number.EPSILON||1e-14,Qh=(e,t)=>t<e.length&&!e[t].skip&&e[t],Jh=e=>"x"===e?"y":"x";function Zh(e,t,n,r){const o=e.skip?t:e,i=t,a=n.skip?t:n,s=Ed(i,o),l=Ed(a,i);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,h=r*u;return{previous:{x:i.x-d*(a.x-o.x),y:i.y-d*(a.y-o.y)},next:{x:i.x+h*(a.x-o.x),y:i.y+h*(a.y-o.y)}}}function ep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const n=Jh(t),r=e.length,o=Array(r).fill(0),i=Array(r);let a,s,l,c=Qh(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=Qh(e,a+1),l){if(c){const e=c[t]-l[t];o[a]=0!==e?(c[n]-l[n])/e:0}i[a]=s?c?xd(o[a-1])!==xd(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(e,t,n){const r=e.length;let o,i,a,s,l,c=Qh(e,0);for(let u=0;u<r-1;++u)l=c,c=Qh(e,u+1),l&&c&&(yd(t[u],0,Gh)?n[u]=n[u+1]=0:(o=n[u]/t[u],i=n[u+1]/t[u],s=Math.pow(o,2)+Math.pow(i,2),s<=9||(a=3/Math.sqrt(s),n[u]=o*a*t[u],n[u+1]=i*a*t[u])))}(e,o,i),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";const r=Jh(n),o=e.length;let i,a,s,l=Qh(e,0);for(let c=0;c<o;++c){if(a=s,s=l,l=Qh(e,c+1),!s)continue;const o=s[n],u=s[r];a&&(i=(o-a[n])/3,s["cp1".concat(n)]=o-i,s["cp1".concat(r)]=u-i*t[c]),l&&(i=(l[n]-o)/3,s["cp2".concat(n)]=o+i,s["cp2".concat(r)]=u+i*t[c])}}(e,i,t)}function tp(e,t,n){return Math.max(Math.min(e,n),t)}function np(e,t,n,r,o){let i,a,s,l;if(t.spanGaps&&(e=e.filter((e=>!e.skip))),"monotone"===t.cubicInterpolationMode)ep(e,o);else{let n=r?e[e.length-1]:e[0];for(i=0,a=e.length;i<a;++i)s=e[i],l=Zh(n,s,e[Math.min(i+1,a-(r?0:1))%a],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,n=s}t.capBezierPoints&&function(e,t){let n,r,o,i,a,s=vh(e[0],t);for(n=0,r=e.length;n<r;++n)a=i,i=s,s=n<r-1&&vh(e[n+1],t),i&&(o=e[n],a&&(o.cp1x=tp(o.cp1x,t.left,t.right),o.cp1y=tp(o.cp1y,t.top,t.bottom)),s&&(o.cp2x=tp(o.cp2x,t.left,t.right),o.cp2y=tp(o.cp2y,t.top,t.bottom)))}(e,n)}function rp(){return"undefined"!==typeof window&&"undefined"!==typeof document}function op(e){let t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function ip(e,t,n){let r;return"string"===typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}const ap=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);const sp=["top","right","bottom","left"];function lp(e,t,n){const r={};n=n?"-"+n:"";for(let o=0;o<4;o++){const i=sp[o];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function cp(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,o=ap(n),i="border-box"===o.boxSizing,a=lp(o,"padding"),s=lp(o,"border","width"),{x:l,y:c,box:u}=function(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:o,offsetY:i}=r;let a,s,l=!1;if(((e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot))(o,i,e.target))a=o,s=i;else{const e=t.getBoundingClientRect();a=r.clientX-e.left,s=r.clientY-e.top,l=!0}return{x:a,y:s,box:l}}(e,n),d=a.left+(u&&s.left),h=a.top+(u&&s.top);let{width:p,height:f}=t;return i&&(p-=a.width+s.width,f-=a.height+s.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((c-h)/f*n.height/r)}}const up=e=>Math.round(10*e)/10;function dp(e,t,n,r){const o=ap(e),i=lp(o,"margin"),a=ip(o.maxWidth,e,"clientWidth")||pd,s=ip(o.maxHeight,e,"clientHeight")||pd,l=function(e,t,n){let r,o;if(void 0===t||void 0===n){const i=e&&op(e);if(i){const e=i.getBoundingClientRect(),a=ap(i),s=lp(a,"border","width"),l=lp(a,"padding");t=e.width-l.width-s.width,n=e.height-l.height-s.height,r=ip(a.maxWidth,i,"clientWidth"),o=ip(a.maxHeight,i,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||pd,maxHeight:o||pd}}(e,t,n);let{width:c,height:u}=l;if("content-box"===o.boxSizing){const e=lp(o,"border","width"),t=lp(o,"padding");c-=t.width+e.width,u-=t.height+e.height}c=Math.max(0,c-i.width),u=Math.max(0,r?c/r:u-i.height),c=up(Math.min(c,a,l.maxWidth)),u=up(Math.min(u,s,l.maxHeight)),c&&!u&&(u=up(c/2));return(void 0!==t||void 0!==n)&&r&&l.height&&u>l.height&&(u=l.height,c=up(Math.floor(u*r))),{width:c,height:u}}function hp(e,t,n){const r=t||1,o=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height="".concat(e.height,"px"),a.style.width="".concat(e.width,"px")),(e.currentDevicePixelRatio!==r||a.height!==o||a.width!==i)&&(e.currentDevicePixelRatio=r,a.height=o,a.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0)}const pp=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};rp()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(ER){}return e}();function fp(e,t){const n=function(e,t){return ap(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function mp(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gp(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function vp(e,t,n,r){const o={x:e.cp2x,y:e.cp2y},i={x:t.cp1x,y:t.cp1y},a=mp(e,o,n),s=mp(o,i,n),l=mp(i,t,n),c=mp(a,s,n),u=mp(s,l,n);return mp(c,u,n)}function bp(e,t,n){return e?function(e,t){return{x:n=>e+e+t-n,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,n):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function xp(e,t){let n,r;"ltr"!==t&&"rtl"!==t||(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function yp(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function wp(e){return"angle"===e?{between:Pd,compare:Md,normalize:Rd}:{between:Td,compare:(e,t)=>e-t,normalize:e=>e}}function Sp(e){let{start:t,end:n,count:r,loop:o,style:i}=e;return{start:t%r,end:n%r,loop:o&&(n-t+1)%r===0,style:i}}function kp(e,t,n){if(!n)return[e];const{property:r,start:o,end:i}=n,a=t.length,{compare:s,between:l,normalize:c}=wp(r),{start:u,end:d,loop:h,style:p}=function(e,t,n){const{property:r,start:o,end:i}=n,{between:a,normalize:s}=wp(r),l=t.length;let c,u,{start:d,end:h,loop:p}=e;if(p){for(d+=l,h+=l,c=0,u=l;c<u&&a(s(t[d%l][r]),o,i);++c)d--,h--;d%=l,h%=l}return h<d&&(h+=l),{start:d,end:h,loop:p,style:e.style}}(e,t,n),f=[];let m,g,v,b=!1,x=null;const y=()=>b||l(o,v,m)&&0!==s(o,v),w=()=>!b||0===s(i,m)||l(i,v,m);for(let S=u,k=u;S<=d;++S)g=t[S%a],g.skip||(m=c(g[r]),m!==v&&(b=l(m,o,i),null===x&&y()&&(x=0===s(m,o)?S:k),null!==x&&w()&&(f.push(Sp({start:x,end:S,loop:h,count:a,style:p})),x=null),k=S,v=m));return null!==x&&f.push(Sp({start:x,end:d,loop:h,count:a,style:p})),f}function jp(e,t){const n=[],r=e.segments;for(let o=0;o<r.length;o++){const i=kp(r[o],e.points,t);i.length&&n.push(...i)}return n}function Cp(e,t,n,r){return r&&r.setContext&&n?function(e,t,n,r){const o=e._chart.getContext(),i=_p(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=n.length,c=[];let u=i,d=t[0].start,h=d;function p(e,t,r,o){const i=s?-1:1;if(e!==t){for(e+=l;n[e%l].skip;)e-=i;for(;n[t%l].skip;)t+=i;e%l!==t%l&&(c.push({start:e%l,end:t%l,loop:r,style:o}),u=o,d=t%l)}}for(const f of t){d=s?d:f.start;let e,t=n[d%l];for(h=d+1;h<=f.end;h++){const i=n[h%l];e=_p(r.setContext(Lh(o,{type:"segment",p0:t,p1:i,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:a}))),Ap(e,u)&&p(d,h-1,f.loop,u),t=i,u=e}d<h-1&&p(d,h-1,f.loop,u)}return c}(e,t,n,r):t}function _p(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Ap(e,t){if(!t)return!1;const n=[],r=function(e,t){return Gd(t)?(n.includes(t)||n.push(t),n.indexOf(t)):t};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function Ep(e,t,n){return e.options.clip?e[n]:t[n]}function Mp(e,t){const n=t._clip;if(n.disabled)return!1;const r=function(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Ep(n,t,"left"),right:Ep(n,t,"right"),top:Ep(r,t,"top"),bottom:Ep(r,t,"bottom")}:t}(t,e.chartArea);return{left:!1===n.left?0:r.left-(!0===n.left?0:n.left),right:!1===n.right?e.width:r.right+(!0===n.right?0:n.right),top:!1===n.top?0:r.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?e.height:r.bottom+(!0===n.bottom?0:n.bottom)}}class Rp{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){const o=t.listeners[r],i=t.duration;o.forEach((r=>r({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(n-t.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=Bd.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,a=o.length-1,s=!1;for(;a>=0;--a)i=o[a],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(e),s=!0):(o[a]=o[o.length-1],o.pop());s&&(r.draw(),this._notify(r,n,e,"progress")),o.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=o.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Pp=new Rp;const Op="transparent",Tp={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=Qd(e||Op),o=r.valid&&Qd(t||Op);return o&&o.valid?o.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class Np{constructor(e,t,n,r){const o=t[n];r=Nh([e.to,r,o,e.from]);const i=Nh([e.from,o,r]);this._active=!0,this._fn=e.fn||Tp[e.type||typeof i],this._easing=Yd[e.easing]||Yd.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=i,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=Nh([e.to,t,r,e.from]),this._from=Nh([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,o=this._from,i=this._loop,a=this._to;let s;if(this._active=o!==a&&(i||t<n),!this._active)return this._target[r]=a,void this._notify(!0);t<0?this._target[r]=o:(s=t/n%2,s=i&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(o,a,s))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][t]()}}class Lp{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Uu(e))return;const t=Object.keys(uh.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach((r=>{const o=e[r];if(!Uu(o))return;const i={};for(const e of t)i[e]=o[e];(Vu(o.properties)&&o.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,i)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const o=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let o=0;o<r.length;o++){const t=e[r[o]];t&&t.active()&&n.push(t.wait())}return Promise.all(n)}(e.options.$animations,n).then((()=>{e.options=n}),(()=>{})),o}_createAnimations(e,t){const n=this._properties,r=[],o=e.$animations||(e.$animations={}),i=Object.keys(t),a=Date.now();let s;for(s=i.length-1;s>=0;--s){const l=i[s];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let u=o[l];const d=n.get(l);if(u){if(d&&u.active()){u.update(d,c,a);continue}u.cancel()}d&&d.duration?(o[l]=u=new Np(d,e,l,c),r.push(u)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(Pp.add(this._chart,n),!0):void 0}}function Ip(e,t){const n=e&&e.options||{},r=n.reverse,o=void 0===n.min?t:0,i=void 0===n.max?t:0;return{start:r?i:o,end:r?o:i}}function zp(e,t){const n=[],r=e._getSortedDatasetMetas(t);let o,i;for(o=0,i=r.length;o<i;++o)n.push(r[o].index);return n}function Dp(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=e.keys,i="single"===r.mode;let a,s,l,c;if(null===t)return;let u=!1;for(a=0,s=o.length;a<s;++a){if(l=+o[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],qu(c)&&(i||0===t||xd(t)===xd(c))&&(t+=c)}return u||r.all?t:0}function Fp(e,t){const n=e&&e.options.stacked;return n||void 0===n&&void 0!==t.stack}function Bp(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Wp(e,t,n,r){for(const o of t.getMatchingVisibleMetas(r).reverse()){const t=e[o.index];if(n&&t>0||!n&&t<0)return o.index}return null}function Hp(e,t){const{chart:n,_cachedMeta:r}=e,o=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:s}=r,l=i.axis,c=a.axis,u=function(e,t,n){return"".concat(e.id,".").concat(t.id,".").concat(n.stack||n.type)}(i,a,r),d=t.length;let h;for(let p=0;p<d;++p){const e=t[p],{[l]:n,[c]:i}=e;h=(e._stacks||(e._stacks={}))[c]=Bp(o,u,n),h[s]=i,h._top=Wp(h,a,!0,r.type),h._bottom=Wp(h,a,!1,r.type);(h._visualValues||(h._visualValues={}))[s]=i}}function Vp(e,t){const n=e.scales;return Object.keys(n).filter((e=>n[e].axis===t)).shift()}function Up(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const qp=e=>"reset"===e||"none"===e,$p=(e,t)=>t?e:Object.assign({},e);class Kp{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Fp(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Up(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,o=t.xAxisID=Ku(n.xAxisID,Vp(e,"x")),i=t.yAxisID=Ku(n.yAxisID,Vp(e,"y")),a=t.rAxisID=Ku(n.rAxisID,Vp(e,"r")),s=t.indexAxis,l=t.iAxisID=r(s,o,i,a),c=t.vAxisID=r(s,i,o,a);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(a),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Dd(this._data,this),e._stacked&&Up(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(Uu(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:n,vScale:r}=t,o="x"===n.axis?"x":"y",i="x"===r.axis?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[o]:u,[i]:e[u]};return s}(t,e)}else if(n!==t){if(n){Dd(n,this);const e=this._cachedMeta;Up(e),e._parsed=[]}t&&Object.isExtensible(t)&&(o=this,(r=t)._chartjs?r._chartjs.listeners.push(o):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),zd.forEach((e=>{const t="_onData"+ad(e),n=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];const a=n.apply(this,o);return r._chartjs.listeners.forEach((e=>{"function"===typeof e[t]&&e[t](...o)})),a}})})))),this._syncList=[],this._data=t}var r,o}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const o=t._stacked;t._stacked=Fp(t.vScale,t),t.stack!==n.stack&&(r=!0,Up(t),t.stack=n.stack),this._resyncElements(e),(r||o!==t._stacked)&&(Hp(this,t._parsed),t._stacked=Fp(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:i}=n,a=o.axis;let s,l,c,u=0===e&&t===r.length||n._sorted,d=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,c=r;else{c=Vu(r[e])?this.parseArrayData(n,r,e,t):Uu(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const o=()=>null===l[a]||d&&l[a]<d[a];for(s=0;s<t;++s)n._parsed[s+e]=l=c[s],u&&(o()&&(u=!1),d=l);n._sorted=u}i&&Hp(this,c)}parsePrimitiveData(e,t,n,r){const{iScale:o,vScale:i}=e,a=o.axis,s=i.axis,l=o.getLabels(),c=o===i,u=new Array(r);let d,h,p;for(d=0,h=r;d<h;++d)p=d+n,u[d]={[a]:c||o.parse(l[p],p),[s]:i.parse(t[p],p)};return u}parseArrayData(e,t,n,r){const{xScale:o,yScale:i}=e,a=new Array(r);let s,l,c,u;for(s=0,l=r;s<l;++s)c=s+n,u=t[c],a[s]={x:o.parse(u[0],c),y:i.parse(u[1],c)};return a}parseObjectData(e,t,n,r){const{xScale:o,yScale:i}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l=new Array(r);let c,u,d,h;for(c=0,u=r;c<u;++c)d=c+n,h=t[d],l[c]={x:o.parse(id(h,a),d),y:i.parse(id(h,s),d)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){const r=this.chart,o=this._cachedMeta,i=t[e.axis];return Dp({keys:zp(r,!0),values:t._stacks[e.axis]._visualValues},i,o.index,{mode:n})}updateRangeFromParsed(e,t,n,r){const o=n[t.axis];let i=null===o?NaN:o;const a=r&&n._stacks[t.axis];r&&a&&(r.values=a,i=Dp(r,o,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}getMinMax(e,t){const n=this._cachedMeta,r=n._parsed,o=n._sorted&&e===n.iScale,i=r.length,a=this._getOtherScale(e),s=((e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:zp(n,!0),values:null})(t,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(e){const{min:t,max:n,minDefined:r,maxDefined:o}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}(a);let d,h;function p(){h=r[d];const t=h[a.axis];return!qu(h[e.axis])||c>t||u<t}for(d=0;d<i&&(p()||(this.updateRangeFromParsed(l,e,h,s),!o));++d);if(o)for(d=i-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(l,e,h,s);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,o,i;for(r=0,o=t.length;r<o;++r)i=t[r][e.axis],qu(i)&&n.push(i);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,n=t.iScale,r=t.vScale,o=this.getParsed(e);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=function(e){let t,n,r,o;return Uu(e)?(t=e.top,n=e.right,r=e.bottom,o=e.left):t=n=r=o=e,{top:t,right:n,bottom:r,left:o,disabled:!1===e}}(Ku(this.options.clip,function(e,t,n){if(!1===n)return!1;const r=Ip(e,n),o=Ip(t,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],o=t.chartArea,i=[],a=this._drawStart||0,s=this._drawCount||r.length-a,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(e,o,a,s),c=a;c<a+s;++c){const t=r[c];t.hidden||(t.active&&l?i.push(t):t.draw(e,o))}for(c=0;c<i.length;++c)i[c].draw(e,o)}getStyle(e,t){const n=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){const r=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];o=t.$context||(t.$context=function(e,t,n){return Lh(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}(this.getContext(),e,t)),o.parsed=this.getParsed(e),o.raw=r.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=function(e,t){return Lh(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=n,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;const r="active"===t,o=this._cachedDataOpts,i=e+"-"+t,a=o[i],s=this.enableOptionSharing&&sd(n);if(a)return $p(a,s);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),u=r?["".concat(e,"Hover"),"hover",e,""]:[e,""],d=l.getOptionScopes(this.getDataset(),c),h=Object.keys(uh.elements[e]),p=l.resolveNamedOptions(d,h,(()=>this.getContext(n,r,t)),u);return p.$shared&&(p.$shared=s,o[i]=Object.freeze($p(p,s))),p}_resolveAnimations(e,t,n){const r=this.chart,o=this._cachedDataOpts,i="animation-".concat(t),a=o[i];if(a)return a;let s;if(!1!==r.options.animation){const r=this.chart.config,o=r.datasetAnimationScopeKeys(this._type,t),i=r.getOptionScopes(this.getDataset(),o);s=r.createResolver(i,this.getContext(e,n,t))}const l=new Lp(r,s&&s.animations);return s&&s._cacheable&&(o[i]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||qp(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,o=this.getSharedOptions(n),i=this.includeOptions(t,o)||o!==r;return this.updateSharedOptions(o,t,n),{sharedOptions:o,includeOptions:i}}updateElement(e,t,n,r){qp(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!qp(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const o=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[a,s,l]of this._syncList)this[a](s,l);this._syncList=[];const r=n.length,o=t.length,i=Math.min(o,r);i&&this.parse(0,i),o>r?this._insertElements(r,o-r,e):o<r&&this._removeElements(o,r-o)}_insertElements(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this._cachedMeta,o=r.data,i=e+t;let a;const s=e=>{for(e.length+=t,a=e.length-1;a>=i;a--)e[a]=e[a-t]};for(s(o),a=e;a<i;++a)o[a]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(e,t),n&&this.updateElements(o,e,t,"reset")}updateElements(e,t,n,r){}_removeElements(e,t){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(e,t);n._stacked&&Up(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Xp(e){const t=e.iScale,n=function(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let t=0,o=n.length;t<o;t++)r=r.concat(n[t].controller.getAllParsedValues(e));e._cache.$bar=Fd(r.sort(((e,t)=>e-t)))}return e._cache.$bar}(t,e.type);let r,o,i,a,s=t._length;const l=()=>{32767!==i&&-32768!==i&&(sd(a)&&(s=Math.min(s,Math.abs(i-a)||s)),a=i)};for(r=0,o=n.length;r<o;++r)i=t.getPixelForValue(n[r]),l();for(a=void 0,r=0,o=t.ticks.length;r<o;++r)i=t.getPixelForTick(r),l();return s}function Yp(e,t,n,r){return Vu(e)?function(e,t,n,r){const o=n.parse(e[0],r),i=n.parse(e[1],r),a=Math.min(o,i),s=Math.max(o,i);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:o,end:i,min:a,max:s}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Gp(e,t,n,r){const o=e.iScale,i=e.vScale,a=o.getLabels(),s=o===i,l=[];let c,u,d,h;for(c=n,u=n+r;c<u;++c)h=t[c],d={},d[o.axis]=s||o.parse(a[c],c),l.push(Yp(h,d,i,c));return l}function Qp(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function Jp(e,t,n,r){let o=t.borderSkipped;const i={};if(!o)return void(e.borderSkipped=i);if(!0===o)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:s,reverse:l,top:c,bottom:u}=function(e){let t,n,r,o,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(o="end",i="start"):(o="start",i="end"),{start:n,end:r,reverse:t,top:o,bottom:i}}(e);"middle"===o&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?o=c:(n._bottom||0)===r?o=u:(i[Zp(u,a,s,l)]=!0,o=c)),i[Zp(o,a,s,l)]=!0,e.borderSkipped=i}function Zp(e,t,n,r){var o,i,a;return r?(a=n,e=ef(e=(o=e)===(i=t)?a:o===a?i:o,n,t)):e=ef(e,t,n),e}function ef(e,t,n){return"start"===e?t:"end"===e?n:e}function tf(e,t,n){let{inflateAmount:r}=t;e.inflateAmount="auto"===r?1===n?.33:0:r}l(Kp,"defaults",{}),l(Kp,"datasetElementType",null),l(Kp,"dataElementType",null);class nf extends Kp{parsePrimitiveData(e,t,n,r){return Gp(e,t,n,r)}parseArrayData(e,t,n,r){return Gp(e,t,n,r)}parseObjectData(e,t,n,r){const{iScale:o,vScale:i}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l="x"===o.axis?a:s,c="x"===i.axis?a:s,u=[];let d,h,p,f;for(d=n,h=n+r;d<h;++d)f=t[d],p={},p[o.axis]=o.parse(id(f,l),d),u.push(Yp(id(f,c),p,i,d));return u}updateRangeFromParsed(e,t,n,r){super.updateRangeFromParsed(e,t,n,r);const o=n._custom;o&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:n,vScale:r}=t,o=this.getParsed(e),i=o._custom,a=Qp(i)?"["+i.start+", "+i.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,n,r){const o="reset"===r,{index:i,_cachedMeta:{vScale:a}}=this,s=a.getBasePixel(),l=a.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(t,r);for(let h=t;h<t+n;h++){const t=this.getParsed(h),n=o||Hu(t[a.axis])?{base:s,head:s}:this._calculateBarValuePixels(h),p=this._calculateBarIndexPixels(h,c),f=(t._stacks||{})[a.axis],m={horizontal:l,base:n.base,enableBorderRadius:!f||Qp(t._custom)||i===f._top||i===f._bottom,x:l?n.head:p.center,y:l?p.center:n.head,height:l?p.size:Math.abs(n.size),width:l?Math.abs(n.size):p.size};d&&(m.options=u||this.resolveDataElementOptions(h,e[h].active?"active":r));const g=m.options||e[h].options;Jp(m,g,f,i),tf(m,g,c.ratio),this.updateElement(e[h],h,m,r)}}_getStacks(e,t){const{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter((e=>e.controller.options.grouped)),o=n.options.stacked,i=[],a=this._cachedMeta.controller.getParsed(t),s=a&&a[n.axis],l=e=>{const t=e._parsed.find((e=>e[n.axis]===s)),r=t&&t[e.vScale.axis];if(Hu(r)||isNaN(r))return!0};for(const c of r)if((void 0===t||!l(c))&&((!1===o||-1===i.indexOf(c.stack)||void 0===o&&void 0===c.stack)&&i.push(c.stack),c.index===e))break;return i.length||i.push(void 0),i}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){const r=this._getStacks(e,n),o=void 0!==t?r.indexOf(t):-1;return-1===o?r.length-1:o}_getRuler(){const e=this.options,t=this._cachedMeta,n=t.iScale,r=[];let o,i;for(o=0,i=t.data.length;o<i;++o)r.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const a=e.barThickness;return{min:a||Xp(t),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:n,index:r},options:{base:o,minBarLength:i}}=this,a=o||0,s=this.getParsed(e),l=s._custom,c=Qp(l);let u,d,h=s[t.axis],p=0,f=n?this.applyStack(t,s,n):h;f!==h&&(p=f-h,f=h),c&&(h=l.barStart,f=l.barEnd-l.barStart,0!==h&&xd(h)!==xd(l.barEnd)&&(p=0),p+=h);const m=Hu(o)||c?p:o;let g=t.getPixelForValue(m);if(u=this.chart.getDataVisibility(e)?t.getPixelForValue(p+f):g,d=u-g,Math.abs(d)<i){d=function(e,t,n){return 0!==e?xd(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}(d,t,a)*i,h===a&&(g-=d/2);const e=t.getPixelForDecimal(0),o=t.getPixelForDecimal(1),l=Math.min(e,o),p=Math.max(e,o);g=Math.max(Math.min(g,p),l),u=g+d,n&&!c&&(s._stacks[t.axis]._visualValues[r]=t.getValueForPixel(u)-t.getValueForPixel(g))}if(g===t.getPixelForValue(a)){const e=xd(d)*t.getLineWidthForValue(a)/2;g+=e,d-=e}return{size:d,base:g,head:u,center:u+d/2}}_calculateBarIndexPixels(e,t){const n=t.scale,r=this.options,o=r.skipNull,i=Ku(r.maxBarThickness,1/0);let a,s;if(t.grouped){const n=o?this._getStackCount(e):t.stackCount,l="flex"===r.barThickness?function(e,t,n,r){const o=t.pixels,i=o[e];let a=e>0?o[e-1]:null,s=e<o.length-1?o[e+1]:null;const l=n.categoryPercentage;null===a&&(a=i-(null===s?t.end-t.start:s-i)),null===s&&(s=i+i-a);const c=i-(i-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}(e,t,r,n):function(e,t,n,r){const o=n.barThickness;let i,a;return Hu(o)?(i=t.min*n.categoryPercentage,a=n.barPercentage):(i=o*r,a=1),{chunk:i/r,ratio:a,start:t.pixels[e]-i/2}}(e,t,r,n),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);a=l.start+l.chunk*c+l.chunk/2,s=Math.min(i,l.chunk*l.ratio)}else a=n.getPixelForValue(this.getParsed(e)[n.axis],e),s=Math.min(i,t.min*t.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}}draw(){const e=this._cachedMeta,t=e.vScale,n=e.data,r=n.length;let o=0;for(;o<r;++o)null===this.getParsed(o)[t.axis]||n[o].hidden||n[o].draw(this._ctx)}}l(nf,"id","bar"),l(nf,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),l(nf,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class rf extends Kp{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,n,r){const o=super.parsePrimitiveData(e,t,n,r);for(let i=0;i<o.length;i++)o[i]._custom=this.resolveDataElementOptions(i+n).radius;return o}parseArrayData(e,t,n,r){const o=super.parseArrayData(e,t,n,r);for(let i=0;i<o.length;i++){const e=t[n+i];o[i]._custom=Ku(e[2],this.resolveDataElementOptions(i+n).radius)}return o}parseObjectData(e,t,n,r){const o=super.parseObjectData(e,t,n,r);for(let i=0;i<o.length;i++){const e=t[n+i];o[i]._custom=Ku(e&&e.r&&+e.r,this.resolveDataElementOptions(i+n).radius)}return o}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=t,i=this.getParsed(e),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y),l=i._custom;return{label:n[e]||"",value:"("+a+", "+s+(l?", "+l:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(t,r),c=i.axis,u=a.axis;for(let d=t;d<t+n;d++){const t=e[d],n=!o&&this.getParsed(d),h={},p=h[c]=o?i.getPixelForDecimal(.5):i.getPixelForValue(n[c]),f=h[u]=o?a.getBasePixel():a.getPixelForValue(n[u]);h.skip=isNaN(p)||isNaN(f),l&&(h.options=s||this.resolveDataElementOptions(d,t.active?"active":r),o&&(h.options.radius=0)),this.updateElement(t,d,h,r)}}resolveDataElementOptions(e,t){const n=this.getParsed(e);let r=super.resolveDataElementOptions(e,t);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return"active"!==t&&(r.radius=0),r.radius+=Ku(n&&n._custom,o),r}}l(rf,"id","bubble"),l(rf,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),l(rf,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class of extends Kp{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let o,i,a=e=>+n[e];if(Uu(n[e])){const{key:e="value"}=this._parsing;a=t=>+id(n[t],e)}for(o=e,i=e+t;o<i;++o)r._parsed[o]=a(o)}}_getRotation(){return jd(this.options.rotation-90)}_getCircumference(){return jd(this.options.circumference)}_getRotationExtents(){let e=dd,t=-dd;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const r=this.chart.getDatasetMeta(n).controller,o=r._getRotation(),i=r._getCircumference();e=Math.min(e,o),t=Math.max(t,o+i)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:n}=t,r=this._cachedMeta,o=r.data,i=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-i)/2,0),s=Math.min(((e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/t)(this.options.cutout,a),1),l=this._getRingWeight(this.index),{circumference:c,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:p,offsetY:f}=function(e,t,n){let r=1,o=1,i=0,a=0;if(t<dd){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),h=Math.sin(l),p=(e,t,r)=>Pd(e,s,l,!0)?1:Math.max(t,t*n,r,r*n),f=(e,t,r)=>Pd(e,s,l,!0)?-1:Math.min(t,t*n,r,r*n),m=p(0,c,d),g=p(md,u,h),v=f(ud,c,d),b=f(ud+md,u,h);r=(m-v)/2,o=(g-b)/2,i=-(m+v)/2,a=-(g+b)/2}return{ratioX:r,ratioY:o,offsetX:i,offsetY:a}}(u,c,s),m=(n.width-i)/d,g=(n.height-i)/h,v=Math.max(Math.min(m,g)/2,0),b=Xu(this.options.radius,v),x=(b-Math.max(b*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*b,this.offsetY=f*b,r.total=this.calculateTotal(),this.outerRadius=b-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*l,0),this.updateElements(o,0,o.length,e)}_circumference(e,t){const n=this.options,r=this._cachedMeta,o=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*o/dd)}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.chartArea,s=i.options.animation,l=(a.left+a.right)/2,c=(a.top+a.bottom)/2,u=o&&s.animateScale,d=u?0:this.innerRadius,h=u?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,o);for(m=t;m<t+n;++m){const t=this._circumference(m,o),n=e[m],i={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:h,innerRadius:d};f&&(i.options=p||this.resolveDataElementOptions(m,n.active?"active":r)),g+=t,this.updateElement(n,m,i,r)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let n,r=0;for(n=0;n<t.length;n++){const o=e._parsed[n];null===o||isNaN(o)||!this.chart.getDataVisibility(n)||t[n].hidden||(r+=Math.abs(o))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?dd*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=nh(t._parsed[e],n.options.locale);return{label:r[e]||"",value:o}}getMaxBorderWidth(e){let t=0;const n=this.chart;let r,o,i,a,s;if(!e)for(r=0,o=n.data.datasets.length;r<o;++r)if(n.isDatasetVisible(r)){i=n.getDatasetMeta(r),e=i.data,a=i.controller;break}if(!e)return 0;for(r=0,o=e.length;r<o;++r)s=a.resolveDataElementOptions(r),"inner"!==s.borderAlign&&(t=Math.max(t,s.borderWidth||0,s.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){const e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(Ku(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}l(of,"id","doughnut"),l(of,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),l(of,"descriptors",{_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),l(of,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}});class af extends Kp{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:n,data:r=[],_dataset:o}=t,i=this.chart._animationsDisabled;let{start:a,count:s}=Ud(t,r,i);this._drawStart=a,this._drawCount=s,qd(t)&&(a=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=r;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!i,options:l},e),this.updateElements(r,a,s,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(t,r),d=i.axis,h=a.axis,{spanGaps:p,segment:f}=this.options,m=Sd(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||o||"none"===r,v=t+n,b=e.length;let x=t>0&&this.getParsed(t-1);for(let y=0;y<b;++y){const n=e[y],p=g?n:{};if(y<t||y>=v){p.skip=!0;continue}const b=this.getParsed(y),w=Hu(b[h]),S=p[d]=i.getPixelForValue(b[d],y),k=p[h]=o||w?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,b,s):b[h],y);p.skip=isNaN(S)||isNaN(k)||w,p.stop=y>0&&Math.abs(b[d]-x[d])>m,f&&(p.parsed=b,p.raw=l.data[y]),u&&(p.options=c||this.resolveDataElementOptions(y,n.active?"active":r)),g||this.updateElement(n,y,p,r),x=b}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const o=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,o,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}l(af,"id","line"),l(af,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),l(af,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class sf extends Kp{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=nh(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:o}}parseObjectData(e,t,n,r){return Yh.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach(((e,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(r<t.min&&(t.min=r),r>t.max&&(t.max=r))})),t}_updateRadius(){const e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(r/2,0),i=(o-Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=o-i*this.index,this.innerRadius=this.outerRadius-i}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.options.animation,s=this._cachedMeta.rScale,l=s.xCenter,c=s.yCenter,u=s.getIndexAngle(0)-.5*ud;let d,h=u;const p=360/this.countVisibleElements();for(d=0;d<t;++d)h+=this._computeAngle(d,r,p);for(d=t;d<t+n;d++){const t=e[d];let n=h,f=h+this._computeAngle(d,r,p),m=i.getDataVisibility(d)?s.getDistanceFromCenterForValue(this.getParsed(d).r):0;h=f,o&&(a.animateScale&&(m=0),a.animateRotate&&(n=f=u));const g={x:l,y:c,innerRadius:0,outerRadius:m,startAngle:n,endAngle:f,options:this.resolveDataElementOptions(d,t.active?"active":r)};this.updateElement(t,d,g,r)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach(((e,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++})),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?jd(this.resolveDataElementOptions(e,t).angle||n):0}}l(sf,"id","polarArea"),l(sf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),l(sf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class lf extends of{}l(lf,"id","pie"),l(lf,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class cf extends Kp{getLabelAndValue(e){const t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return Yh.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta,n=t.dataset,r=t.data||[],o=t.iScale.getLabels();if(n.points=r,"resize"!==e){const t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);const i={_loop:!0,_fullLoop:o.length===r.length,options:t};this.updateElement(n,void 0,i,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){const o=this._cachedMeta.rScale,i="reset"===r;for(let a=t;a<t+n;a++){const t=e[a],n=this.resolveDataElementOptions(a,t.active?"active":r),s=o.getPointPositionForValue(a,this.getParsed(a).r),l=i?o.xCenter:s.x,c=i?o.yCenter:s.y,u={x:l,y:c,angle:s.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(t,a,u,r)}}}l(cf,"id","radar"),l(cf,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),l(cf,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class uf extends Kp{getLabelAndValue(e){const t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=t,i=this.getParsed(e),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y);return{label:n[e]||"",value:"("+a+", "+s+")"}}update(e){const t=this._cachedMeta,{data:n=[]}=t,r=this.chart._animationsDisabled;let{start:o,count:i}=Ud(t,n,r);if(this._drawStart=o,this._drawCount=i,qd(t)&&(o=0,i=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:i}=t;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=n;const a=this.resolveDatasetElementOptions(e);a.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:a},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(n,o,i,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(t,r),u=this.getSharedOptions(c),d=this.includeOptions(r,u),h=i.axis,p=a.axis,{spanGaps:f,segment:m}=this.options,g=Sd(f)?f:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||"none"===r;let b=t>0&&this.getParsed(t-1);for(let x=t;x<t+n;++x){const t=e[x],n=this.getParsed(x),c=v?t:{},f=Hu(n[p]),y=c[h]=i.getPixelForValue(n[h],x),w=c[p]=o||f?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,n,s):n[p],x);c.skip=isNaN(y)||isNaN(w)||f,c.stop=x>0&&Math.abs(n[h]-b[h])>g,m&&(c.parsed=n,c.raw=l.data[x]),d&&(c.options=u||this.resolveDataElementOptions(x,t.active?"active":r)),v||this.updateElement(t,x,c,r),b=n}this.updateSharedOptions(u,r,c)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}const n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;const o=t[0].size(this.resolveDataElementOptions(0)),i=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,o,i)/2}}l(uf,"id","scatter"),l(uf,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),l(uf,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function df(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hf{static override(e){Object.assign(hf.prototype,e)}constructor(e){l(this,"options",void 0),this.options=e||{}}init(){}formats(){return df()}parse(){return df()}format(){return df()}add(){return df()}diff(){return df()}startOf(){return df()}endOf(){return df()}}var pf=hf;function ff(e,t,n,r){const{controller:o,data:i,_sorted:a}=e,s=o._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&"r"!==t&&a&&i.length){const a=s._reversePixels?Id:Ld;if(!r){const r=a(i,t,n);if(l){const{vScale:t}=o._cachedMeta,{_parsed:n}=e,i=n.slice(0,r.lo+1).reverse().findIndex((e=>!Hu(e[t.axis])));r.lo-=Math.max(0,i);const a=n.slice(r.hi).findIndex((e=>!Hu(e[t.axis])));r.hi+=Math.max(0,a)}return r}if(o._sharedOptions){const e=i[0],r="function"===typeof e.getRange&&e.getRange(t);if(r){const e=a(i,t,n-r),o=a(i,t,n+r);return{lo:e.lo,hi:o.hi}}}}return{lo:0,hi:i.length-1}}function mf(e,t,n,r,o){const i=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=i.length;s<l;++s){const{index:e,data:n}=i[s],{lo:l,hi:c}=ff(i[s],t,a,o);for(let t=l;t<=c;++t){const o=n[t];o.skip||r(o,e,t)}}}function gf(e,t,n,r,o){const i=[];if(!o&&!e.isPointInArea(t))return i;return mf(e,n,t,(function(n,a,s){(o||vh(n,e.chartArea,0))&&n.inRange(t.x,t.y,r)&&i.push({element:n,datasetIndex:a,index:s})}),!0),i}function vf(e,t,n,r,o,i){let a=[];const s=function(e){const t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){const o=t?Math.abs(e.x-r.x):0,i=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(i,2))}}(n);let l=Number.POSITIVE_INFINITY;return mf(e,n,t,(function(n,c,u){const d=n.inRange(t.x,t.y,o);if(r&&!d)return;const h=n.getCenterPoint(o);if(!(!!i||e.isPointInArea(h))&&!d)return;const p=s(t,h);p<l?(a=[{element:n,datasetIndex:c,index:u}],l=p):p===l&&a.push({element:n,datasetIndex:c,index:u})})),a}function bf(e,t,n,r,o,i){return i||e.isPointInArea(t)?"r"!==n||r?vf(e,t,n,r,o,i):function(e,t,n,r){let o=[];return mf(e,n,t,(function(e,n,i){const{startAngle:a,endAngle:s}=e.getProps(["startAngle","endAngle"],r),{angle:l}=Ad(e,{x:t.x,y:t.y});Pd(l,a,s)&&o.push({element:e,datasetIndex:n,index:i})})),o}(e,t,n,o):[]}function xf(e,t,n,r,o){const i=[],a="x"===n?"inXRange":"inYRange";let s=!1;return mf(e,n,t,((e,r,l)=>{e[a]&&e[a](t[n],o)&&(i.push({element:e,datasetIndex:r,index:l}),s=s||e.inRange(t.x,t.y,o))})),r&&!s?[]:i}var yf={evaluateInteractionItems:mf,modes:{index(e,t,n,r){const o=cp(t,e),i=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?gf(e,o,i,r,a):bf(e,o,i,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=s[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})})),l):[]},dataset(e,t,n,r){const o=cp(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?gf(e,o,i,r,a):bf(e,o,i,!1,r,a);if(s.length>0){const t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;e<n.length;++e)s.push({element:n[e],datasetIndex:t,index:e})}return s},point:(e,t,n,r)=>gf(e,cp(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const o=cp(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;return bf(e,o,i,n.intersect,r,a)},x:(e,t,n,r)=>xf(e,cp(t,e),"x",n.intersect,r),y:(e,t,n,r)=>xf(e,cp(t,e),"y",n.intersect,r)}};const wf=["left","top","right","bottom"];function Sf(e,t){return e.filter((e=>e.pos===t))}function kf(e,t){return e.filter((e=>-1===wf.indexOf(e.pos)&&e.box.axis===t))}function jf(e,t){return e.sort(((e,n)=>{const r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function Cf(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:o}=n;if(!e||!wf.includes(r))continue;const i=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=o}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:o}=t;let i,a,s;for(i=0,a=e.length;i<a;++i){s=e[i];const{fullSize:a}=s.box,l=n[s.stack],c=l&&s.stackWeight/l.weight;s.horizontal?(s.width=c?c*r:a&&t.availableWidth,s.height=o):(s.width=r,s.height=c?c*o:a&&t.availableHeight)}return n}function _f(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Af(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Ef(e,t,n,r){const{pos:o,box:i}=n,a=e.maxPadding;if(!Uu(o)){n.size&&(e[o]-=n.size);const t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?i.height:i.width),n.size=t.size/t.count,e[o]+=n.size}i.getPadding&&Af(a,i.getPadding());const s=Math.max(0,t.outerWidth-_f(a,e,"left","right")),l=Math.max(0,t.outerHeight-_f(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Mf(e,t){const n=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function Rf(e,t,n,r){const o=[];let i,a,s,l,c,u;for(i=0,a=e.length,c=0;i<a;++i){s=e[i],l=s.box,l.update(s.width||t.w,s.height||t.h,Mf(s.horizontal,t));const{same:a,other:d}=Ef(t,n,s,r);c|=a&&o.length,u=u||d,l.fullSize||o.push(s)}return c&&Rf(o,t,n,r)||u}function Pf(e,t,n,r,o){e.top=n,e.left=t,e.right=t+r,e.bottom=n+o,e.width=r,e.height=o}function Of(e,t,n,r){const o=n.padding;let{x:i,y:a}=t;for(const s of e){const e=s.box,l=r[s.stack]||{count:1,placed:0,weight:1},c=s.stackWeight/l.weight||1;if(s.horizontal){const r=t.w*c,i=l.size||e.height;sd(l.start)&&(a=l.start),e.fullSize?Pf(e,o.left,a,n.outerWidth-o.right-o.left,i):Pf(e,t.left+l.placed,a,r,i),l.start=a,l.placed+=r,a=e.bottom}else{const r=t.h*c,a=l.size||e.width;sd(l.start)&&(i=l.start),e.fullSize?Pf(e,i,o.top,a,n.outerHeight-o.bottom-o.top):Pf(e,i,t.top+l.placed,a,r),l.start=i,l.placed+=r,i=e.right}}t.x=i,t.y=a}var Tf={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const o=Oh(e.options.layout.padding),i=Math.max(t-o.width,0),a=Math.max(n-o.height,0),s=function(e){const t=function(e){const t=[];let n,r,o,i,a,s;for(n=0,r=(e||[]).length;n<r;++n)o=e[n],({position:i,options:{stack:a,stackWeight:s=1}}=o),t.push({index:n,box:o,pos:i,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&i+a,stackWeight:s});return t}(e),n=jf(t.filter((e=>e.box.fullSize)),!0),r=jf(Sf(t,"left"),!0),o=jf(Sf(t,"right")),i=jf(Sf(t,"top"),!0),a=jf(Sf(t,"bottom")),s=kf(t,"x"),l=kf(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:o.concat(l).concat(a).concat(s),chartArea:Sf(t,"chartArea"),vertical:r.concat(o).concat(l),horizontal:i.concat(a).concat(s)}}(e.boxes),l=s.vertical,c=s.horizontal;Gu(e.boxes,(e=>{"function"===typeof e.beforeLayout&&e.beforeLayout()}));const u=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/u,hBoxMaxHeight:a/2}),h=Object.assign({},o);Af(h,Oh(r));const p=Object.assign({maxPadding:h,w:i,h:a,x:o.left,y:o.top},o),f=Cf(l.concat(c),d);Rf(s.fullSize,p,d,f),Rf(l,p,d,f),Rf(c,p,d,f)&&Rf(l,p,d,f),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(p),Of(s.leftAndTop,p,d,f),p.x+=p.w,p.y+=p.h,Of(s.rightAndBottom,p,d,f),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Gu(s.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class Nf{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class Lf extends Nf{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const If="$chartjs",zf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Df=e=>null===e||""===e;const Ff=!!pp&&{passive:!0};function Bf(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Ff)}function Wf(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Hf(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Wf(n.addedNodes,r),t=t&&!Wf(n.removedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Vf(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Wf(n.removedNodes,r),t=t&&!Wf(n.addedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}const Uf=new Map;let qf=0;function $f(){const e=window.devicePixelRatio;e!==qf&&(qf=e,Uf.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function Kf(e,t,n){const r=e.canvas,o=r&&op(r);if(!o)return;const i=Wd(((e,t)=>{const r=o.clientWidth;n(e,t),r<o.clientWidth&&n()}),window),a=new ResizeObserver((e=>{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||i(n,r)}));return a.observe(o),function(e,t){Uf.size||window.addEventListener("resize",$f),Uf.set(e,t)}(e,i),a}function Xf(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){Uf.delete(e),Uf.size||window.removeEventListener("resize",$f)}(e)}function Yf(e,t,n){const r=e.canvas,o=Wd((t=>{null!==e.ctx&&n(function(e,t){const n=zf[e.type]||e.type,{x:r,y:o}=cp(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==o?o:null}}(t,e))}),e);return function(e,t,n){e&&e.addEventListener(t,n,Ff)}(r,t,o),o}class Gf extends Nf{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e[If]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Df(o)){const t=fp(e,"width");void 0!==t&&(e.width=t)}if(Df(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=fp(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[If])return!1;const n=t[If].initial;["height","width"].forEach((e=>{const r=n[e];Hu(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t[If],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),o={attach:Hf,detach:Vf,resize:Kf}[t]||Yf;r[t]=o(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:Xf,detach:Xf,resize:Xf}[t]||Bf)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return dp(e,t,n,r)}isAttached(e){const t=e&&op(e);return!(!t||!t.isConnected)}}class Qf{constructor(){l(this,"x",void 0),l(this,"y",void 0),l(this,"active",!1),l(this,"options",void 0),l(this,"$animations",void 0)}tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Sd(this.x)&&Sd(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function Jf(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),o=e._maxLength/n;return Math.floor(Math.min(r,o))}(e),o=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}(t):[],a=i.length,s=i[0],l=i[a-1],c=[];if(a>o)return function(e,t,n,r){let o,i=0,a=n[0];for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}(t,c,i,a/o),c;const u=function(e,t,n){const r=function(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}(e),o=t.length/n;if(!r)return Math.max(o,1);const i=function(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(0|n)&&t.push(n),t.sort(((e,t)=>e-t)).pop(),t}(r);for(let a=0,s=i.length-1;a<s;a++){const e=i[a];if(e>o)return e}return Math.max(o,1)}(i,t,o);if(a>0){let e,n;const r=a>1?Math.round((l-s)/(a-1)):null;for(Zf(t,c,u,Hu(r)?0:s-r,s),e=0,n=a-1;e<n;e++)Zf(t,c,u,i[e],i[e+1]);return Zf(t,c,u,l,Hu(r)?t.length:l+r),c}return Zf(t,c,u),c}function Zf(e,t,n,r,o){const i=Ku(r,0),a=Math.min(Ku(o,e.length),e.length);let s,l,c,u=0;for(n=Math.ceil(n),o&&(s=o-r,n=s/Math.floor(s/n)),c=i;c<0;)u++,c=Math.round(i+u*n);for(l=Math.max(i,0);l<a;l++)l===c&&(t.push(e[l]),u++,c=Math.round(i+u*n))}l(Qf,"defaults",{}),l(Qf,"defaultRoutes",void 0);const em=(e,t,n)=>"top"===t||"left"===t?e[t]+n:e[t]-n,tm=(e,t)=>Math.min(t||e,e);function nm(e,t){const n=[],r=e.length/t,o=e.length;let i=0;for(;i<o;i+=r)n.push(e[Math.floor(i)]);return n}function rm(e,t,n){const r=e.ticks.length,o=Math.min(t,r-1),i=e._startPixel,a=e._endPixel,s=1e-6;let l,c=e.getPixelForTick(o);if(!(n&&(l=1===r?Math.max(c-i,a-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(o-1))/2,c+=o<t?l:-l,c<i-s||c>a+s)))return c}function om(e){return e.drawTicks?e.tickLength:0}function im(e,t){if(!e.display)return 0;const n=Th(e.font,t),r=Oh(e.padding);return(Vu(e.text)?e.text.length:1)*n.lineHeight+r.height}function am(e,t,n){let r=Hd(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class sm extends Qf{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=$u(e,Number.POSITIVE_INFINITY),t=$u(t,Number.NEGATIVE_INFINITY),n=$u(n,Number.POSITIVE_INFINITY),r=$u(r,Number.NEGATIVE_INFINITY),{min:$u(e,n),max:$u(t,r),minDefined:qu(e),maxDefined:qu(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds();if(o&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let s=0,l=a.length;s<l;++s)t=a[s].controller.getMinMax(this,e),o||(n=Math.min(n,t.min)),i||(r=Math.max(r,t.max));return n=i&&n>r?r:n,r=o&&n>r?n:r,{min:$u(n,$u(r,n)),max:$u(r,$u(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Yu(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:o,ticks:i}=this.options,a=i.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:o}=e,i=Xu(t,(o-r)/2),a=(e,t)=>n&&0===e?0:e+t;return{min:a(r,-Math.abs(i)),max:a(o,i)}}(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=a<this.ticks.length;this._convertTicksToLabels(s?nm(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||"auto"===i.source)&&(this.ticks=Jf(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,n=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,n=!n),this._startPixel=e,this._endPixel=t,this._reversePixels=n,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Yu(this.options.afterUpdate,[this])}beforeSetDimensions(){Yu(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Yu(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Yu(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Yu(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let n,r,o;for(n=0,r=e.length;n<r;n++)o=e[n],o.label=Yu(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){Yu(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Yu(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,n=tm(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,o=t.maxRotation;let i,a,s,l=r;if(!this._isVisible()||!t.display||r>=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),u=c.widest.width,d=c.highest.height,h=Od(this.chart.width-u,0,this.maxWidth);i=e.offset?this.maxWidth/n:h/(n-1),u+6>i&&(i=h/(n-(e.offset?.5:1)),a=this.maxHeight-om(e.grid)-t.padding-im(e.title,this.chart.options.font),s=Math.sqrt(u*u+d*d),l=Cd(Math.min(Math.asin(Od((c.highest.height+6)/i,-1,1)),Math.asin(Od(a/s,-1,1))-Math.asin(Od(d/s,-1,1)))),l=Math.max(r,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){Yu(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Yu(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:o}}=this,i=this._isVisible(),a=this.isHorizontal();if(i){const i=im(r,t.options.font);if(a?(e.width=this.maxWidth,e.height=om(o)+i):(e.height=this.maxHeight,e.width=om(o)+i),n.display&&this.ticks.length){const{first:t,last:r,widest:o,highest:i}=this._getLabelSizes(),s=2*n.padding,l=jd(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(a){const t=n.mirror?0:u*o.width+c*i.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{const t=n.mirror?0:c*o.width+u*i.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,c)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:o,padding:i},position:a}=this.options,s=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,d=0;s?l?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):"start"===o?d=t.width:"end"===o?u=e.width:"inner"!==o&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-a+i)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-c+i)*this.width/(this.width-c),0)}else{let n=t.height/2,r=e.height/2;"start"===o?(n=0,r=e.height):"end"===o&&(n=t.height,r=0),this.paddingTop=n+i,this.paddingBottom=r+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Yu(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t<n;t++)Hu(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let n=this.ticks;t<n.length&&(n=nm(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){const{ctx:r,_longestTextCache:o}=this,i=[],a=[],s=Math.floor(t/tm(t,n));let l,c,u,d,h,p,f,m,g,v,b,x=0,y=0;for(l=0;l<t;l+=s){if(d=e[l].label,h=this._resolveTickFontOptions(l),r.font=p=h.string,f=o[p]=o[p]||{data:{},gc:[]},m=h.lineHeight,g=v=0,Hu(d)||Vu(d)){if(Vu(d))for(c=0,u=d.length;c<u;++c)b=d[c],Hu(b)||Vu(b)||(g=dh(r,f.data,f.gc,g,b),v+=m)}else g=dh(r,f.data,f.gc,g,d),v=m;i.push(g),a.push(v),x=Math.max(g,x),y=Math.max(v,y)}!function(e,t){Gu(e,(e=>{const n=e.gc,r=n.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[n[o]];n.splice(0,r)}}))}(o,t);const w=i.indexOf(x),S=a.indexOf(y),k=e=>({width:i[e]||0,height:a[e]||0});return{first:k(0),last:k(t-1),widest:k(w),highest:k(S),widths:i,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return function(e){return Od(e,-32768,32767)}(this._alignToPixels?ph(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const n=t[e];return n.$context||(n.$context=function(e,t,n){return Lh(e,{tick:n,index:t,type:"tick"})}(this.getContext(),e,n))}return this.$context||(this.$context=Lh(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const e=this.options.ticks,t=jd(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),i=e.autoSkipPadding||0,a=o?o.widest.width+i:0,s=o?o.highest.height+i:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r<a*n?s/n:a/r}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:o,position:i,border:a}=r,s=o.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),u=om(o),d=[],h=a.setContext(this.getContext()),p=h.display?h.width:0,f=p/2,m=function(e){return ph(n,e,p)};let g,v,b,x,y,w,S,k,j,C,_,A;if("top"===i)g=m(this.bottom),w=this.bottom-u,k=g-f,C=m(e.top)+f,A=e.bottom;else if("bottom"===i)g=m(this.top),C=e.top,A=m(e.bottom)-f,w=g+f,k=this.top+u;else if("left"===i)g=m(this.right),y=this.right-u,S=g-f,j=m(e.left)+f,_=e.right;else if("right"===i)g=m(this.left),j=e.left,_=m(e.right)-f,y=g+f,S=this.left+u;else if("x"===t){if("center"===i)g=m((e.top+e.bottom)/2+.5);else if(Uu(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}C=e.top,A=e.bottom,w=g+f,k=w+u}else if("y"===t){if("center"===i)g=m((e.left+e.right)/2);else if(Uu(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}y=g-f,S=y-u,j=e.left,_=e.right}const E=Ku(r.ticks.maxTicksLimit,c),M=Math.max(1,Math.ceil(c/E));for(v=0;v<c;v+=M){const e=this.getContext(v),t=o.setContext(e),r=a.setContext(e),i=t.lineWidth,c=t.color,u=r.dash||[],h=r.dashOffset,p=t.tickWidth,f=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=rm(this,v,s),void 0!==b&&(x=ph(n,b,i),l?y=S=j=_=x:w=k=C=A=x,d.push({tx1:y,ty1:w,tx2:S,ty2:k,x1:j,y1:C,x2:_,y2:A,width:i,color:c,borderDash:u,borderDashOffset:h,tickWidth:p,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,d}_computeLabelItems(e){const t=this.axis,n=this.options,{position:r,ticks:o}=n,i=this.isHorizontal(),a=this.ticks,{align:s,crossAlign:l,padding:c,mirror:u}=o,d=om(n.grid),h=d+c,p=u?-c:h,f=-jd(this.labelRotation),m=[];let g,v,b,x,y,w,S,k,j,C,_,A,E="middle";if("top"===r)w=this.bottom-p,S=this._getXAxisLabelAlignment();else if("bottom"===r)w=this.top+p,S=this._getXAxisLabelAlignment();else if("left"===r){const e=this._getYAxisLabelAlignment(d);S=e.textAlign,y=e.x}else if("right"===r){const e=this._getYAxisLabelAlignment(d);S=e.textAlign,y=e.x}else if("x"===t){if("center"===r)w=(e.top+e.bottom)/2+h;else if(Uu(r)){const e=Object.keys(r)[0],t=r[e];w=this.chart.scales[e].getPixelForValue(t)+h}S=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===r)y=(e.left+e.right)/2-h;else if(Uu(r)){const e=Object.keys(r)[0],t=r[e];y=this.chart.scales[e].getPixelForValue(t)}S=this._getYAxisLabelAlignment(d).textAlign}"y"===t&&("start"===s?E="top":"end"===s&&(E="bottom"));const M=this._getLabelSizes();for(g=0,v=a.length;g<v;++g){b=a[g],x=b.label;const e=o.setContext(this.getContext(g));k=this.getPixelForTick(g)+o.labelOffset,j=this._resolveTickFontOptions(g),C=j.lineHeight,_=Vu(x)?x.length:1;const t=_/2,n=e.color,s=e.textStrokeColor,c=e.textStrokeWidth;let d,h=S;if(i?(y=k,"inner"===S&&(h=g===v-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),A="top"===r?"near"===l||0!==f?-_*C+C/2:"center"===l?-M.highest.height/2-t*C+C:-M.highest.height+C/2:"near"===l||0!==f?C/2:"center"===l?M.highest.height/2-t*C:M.highest.height-_*C,u&&(A*=-1),0===f||e.showLabelBackdrop||(y+=C/2*Math.sin(f))):(w=k,A=(1-_)*C/2),e.showLabelBackdrop){const t=Oh(e.backdropPadding),n=M.heights[g],r=M.widths[g];let o=A-t.top,i=0-t.left;switch(E){case"middle":o-=n/2;break;case"bottom":o-=n}switch(S){case"center":i-=r/2;break;case"right":i-=r;break;case"inner":g===v-1?i-=r:g>0&&(i-=r/2)}d={left:i,top:o,width:r+t.width,height:n+t.height,color:e.backdropColor}}m.push({label:x,font:j,textOffset:A,options:{rotation:f,color:n,strokeColor:s,strokeWidth:c,textAlign:h,textBaseline:E,translation:[y,w],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-jd(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,i=e+o,a=this._getLabelSizes().widest.width;let s,l;return"left"===t?r?(l=this.right+o,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l+=a)):(l=this.right-i,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l=this.left)):"right"===t?r?(l=this.left+o,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l-=a)):(l=this.left+i,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l=this.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:o,height:i}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,o,i),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,i;const a=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(o=0,i=r.length;o<i;++o){const e=r[o];t.drawOnChartArea&&a({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&a({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:n,grid:r}}=this,o=n.setContext(this.getContext()),i=n.display?o.width:0;if(!i)return;const a=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,c,u,d;this.isHorizontal()?(l=ph(e,this.left,i)-i/2,c=ph(e,this.right,a)+a/2,u=d=s):(u=ph(e,this.top,i)-i/2,d=ph(e,this.bottom,a)+a/2,l=c=s),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(l,u),t.lineTo(c,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,n=this._computeLabelArea();n&&bh(t,n);const r=this.getLabelItems(e);for(const o of r){const e=o.options,n=o.font;jh(t,o.label,0,o.textOffset,n,e)}n&&xh(t)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;const o=Th(n.font),i=Oh(n.padding),a=n.align;let s=o.lineHeight/2;"bottom"===t||"center"===t||Uu(t)?(s+=i.bottom,Vu(n.text)&&(s+=o.lineHeight*(n.text.length-1))):s+=i.top;const{titleX:l,titleY:c,maxWidth:u,rotation:d}=function(e,t,n,r){const{top:o,left:i,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d,h,p,f=0;const m=a-o,g=s-i;if(e.isHorizontal()){if(h=Vd(r,i,s),Uu(n)){const e=Object.keys(n)[0],r=n[e];p=u[e].getPixelForValue(r)+m-t}else p="center"===n?(c.bottom+c.top)/2+m-t:em(e,n,t);d=s-i}else{if(Uu(n)){const e=Object.keys(n)[0],r=n[e];h=u[e].getPixelForValue(r)-g+t}else h="center"===n?(c.left+c.right)/2-g+t:em(e,n,t);p=Vd(r,a,o),f="left"===n?-md:md}return{titleX:h,titleY:p,maxWidth:d,rotation:f}}(this,s,t,a);jh(e,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:d,textAlign:am(a,t,r),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,n=Ku(e.grid&&e.grid.z,-1),r=Ku(e.border&&e.border.z,0);return this._isVisible()&&this.draw===sm.prototype.draw?[{z:n,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let o,i;for(o=0,i=t.length;o<i;++o){const i=t[o];i[n]!==this.id||e&&i.type!==e||r.push(i)}return r}_resolveTickFontOptions(e){return Th(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class lm{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let n;(function(e){return"id"in e&&"defaults"in e})(t)&&(n=this.register(t));const r=this.items,o=e.id,i=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in r||(r[o]=e,function(e,t,n){const r=td(Object.create(null),[n?uh.get(n):{},uh.get(t),e.defaults]);uh.set(t,r),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((n=>{const r=n.split("."),o=r.pop(),i=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");uh.route(i,o,l,s)}))}(t,e.defaultRoutes);e.descriptors&&uh.describe(t,e.descriptors)}(e,i,n),this.override&&uh.override(e.id,e.overrides)),i}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in uh[r]&&(delete uh[r][n],this.override&&delete ih[n])}}class cm{constructor(){this.controllers=new lm(Kp,"datasets",!0),this.elements=new lm(Qf,"elements"),this.plugins=new lm(Object,"plugins"),this.scales=new lm(sm,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t)}remove(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t)}addControllers(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.controllers)}addElements(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.elements)}addPlugins(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.plugins)}addScales(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.controllers)}removeElements(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.elements)}removePlugins(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.plugins)}removeScales(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.scales)}_each(e,t,n){[...t].forEach((t=>{const r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):Gu(t,(t=>{const r=n||this._getRegistryForType(t);this._exec(e,r,t)}))}))}_exec(e,t,n){const r=ad(e);Yu(n["before"+r],[],n),t[e](n),Yu(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+n+".");return r}}var um=new cm;class dm{constructor(){this._init=[]}notify(e,t,n,r){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=r?this._descriptors(e).filter(r):this._descriptors(e),i=this._notify(o,e,t,n);return"afterDestroy"===t&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),i}_notify(e,t,n,r){r=r||{};for(const o of e){const e=o.plugin;if(!1===Yu(e[n],[t,r,o.options],e)&&r.cancelable)return!1}return!0}invalidate(){Hu(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,r=Ku(n.options&&n.options.plugins,{}),o=function(e){const t={},n=[],r=Object.keys(um.plugins.items);for(let i=0;i<r.length;i++)n.push(um.getPlugin(r[i]));const o=e.plugins||[];for(let i=0;i<o.length;i++){const e=o[i];-1===n.indexOf(e)&&(n.push(e),t[e.id]=!0)}return{plugins:n,localIds:t}}(n);return!1!==r||t?function(e,t,n,r){let{plugins:o,localIds:i}=t;const a=[],s=e.getContext();for(const l of o){const t=l.id,o=hm(n[t],r);null!==o&&a.push({plugin:l,options:pm(e.config,{plugin:l,local:i[t]},o,s)})}return a}(e,o,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function hm(e,t){return t||!1!==e?!0===e?{}:e:null}function pm(e,t,n,r){let{plugin:o,local:i}=t;const a=e.pluginScopeKeys(o),s=e.getOptionScopes(n,a);return i&&o.defaults&&s.push(o.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function fm(e,t){const n=uh.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function mm(e){if("x"===e||"y"===e||"r"===e)return e}function gm(e){if(mm(e))return e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(const i of n){const t=i.axis||("top"===(o=i.position)||"bottom"===o?"x":"left"===o||"right"===o?"y":void 0)||e.length>1&&mm(e[0].toLowerCase());if(t)return t}var o;throw new Error("Cannot determine type of '".concat(e,"' axis. Please provide 'axis' or 'position' option."))}function vm(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function bm(e,t){const n=ih[e.type]||{scales:{}},r=t.scales||{},o=fm(e.type,t),i=Object.create(null);return Object.keys(r).forEach((t=>{const a=r[t];if(!Uu(a))return console.error("Invalid scale configuration for scale: ".concat(t));if(a._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(t));const s=gm(t,a,function(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter((t=>t.xAxisID===e||t.yAxisID===e));if(n.length)return vm(e,"x",n[0])||vm(e,"y",n[0])}return{}}(t,e),uh.scales[a.type]),l=function(e,t){return e===t?"_index_":"_value_"}(s,o),c=n.scales||{};i[t]=nd(Object.create(null),[{axis:s},a,c[s],c[l]])})),e.data.datasets.forEach((n=>{const o=n.type||e.type,a=n.indexAxis||fm(o,t),s=(ih[o]||{}).scales||{};Object.keys(s).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,a),o=n[t+"AxisID"]||t;i[o]=i[o]||Object.create(null),nd(i[o],[{axis:t},r[o],s[e]])}))})),Object.keys(i).forEach((e=>{const t=i[e];nd(t,[uh.scales[t.type],uh.scale])})),i}function xm(e){const t=e.options||(e.options={});t.plugins=Ku(t.plugins,{}),t.scales=bm(e,t)}function ym(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const wm=new Map,Sm=new Set;function km(e,t){let n=wm.get(e);return n||(n=t(),wm.set(e,n),Sm.add(n)),n}const jm=(e,t,n)=>{const r=id(t,n);void 0!==r&&e.add(r)};class Cm{constructor(e){this._config=function(e){return(e=e||{}).data=ym(e.data),xm(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ym(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),xm(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return km(e,(()=>[["datasets.".concat(e),""]]))}datasetAnimationScopeKeys(e,t){return km("".concat(e,".transition.").concat(t),(()=>[["datasets.".concat(e,".transitions.").concat(t),"transitions.".concat(t)],["datasets.".concat(e),""]]))}datasetElementScopeKeys(e,t){return km("".concat(e,"-").concat(t),(()=>[["datasets.".concat(e,".elements.").concat(t),"datasets.".concat(e),"elements.".concat(t),""]]))}pluginScopeKeys(e){const t=e.id,n=this.type;return km("".concat(n,"-plugin-").concat(t),(()=>[["plugins.".concat(t),...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:o}=this,i=this._cachedScopes(e,n),a=i.get(t);if(a)return a;const s=new Set;t.forEach((t=>{e&&(s.add(e),t.forEach((t=>jm(s,e,t)))),t.forEach((e=>jm(s,r,e))),t.forEach((e=>jm(s,ih[o]||{},e))),t.forEach((e=>jm(s,uh,e))),t.forEach((e=>jm(s,ah,e)))}));const l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),Sm.has(t)&&i.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,ih[t]||{},uh.datasets[t]||{},{type:t},uh,ah]}resolveNamedOptions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const o={$shared:!0},{resolver:i,subPrefixes:a}=_m(this._resolverCache,e,r);let s=i;if(function(e,t){const{isScriptable:n,isIndexable:r}=Dh(e);for(const o of t){const t=n(o),i=r(o),a=(i||t)&&e[o];if(t&&(ld(a)||Am(a))||i&&Vu(a))return!0}return!1}(i,t)){o.$shared=!1;s=zh(i,n=ld(n)?n():n,this.createResolver(e,n,a))}for(const l of t)o[l]=s[l];return o}createResolver(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0;const{resolver:o}=_m(this._resolverCache,e,n);return Uu(t)?zh(o,t,void 0,r):o}}function _m(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const o=n.join();let i=r.get(o);if(!i){i={resolver:Ih(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(o,i)}return i}const Am=e=>Uu(e)&&Object.getOwnPropertyNames(e).some((t=>ld(e[t])));const Em=["top","bottom","left","right","chartArea"];function Mm(e,t){return"top"===e||"bottom"===e||-1===Em.indexOf(e)&&"x"===t}function Rm(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Pm(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Yu(n&&n.onComplete,[e],t)}function Om(e){const t=e.chart,n=t.options.animation;Yu(n&&n.onProgress,[e],t)}function Tm(e){return rp()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Nm={},Lm=e=>{const t=Tm(e);return Object.values(Nm).filter((e=>e.canvas===t)).pop()};function Im(e,t,n){const r=Object.keys(e);for(const o of r){const r=+o;if(r>=t){const i=e[o];delete e[o],(n>0||r>t)&&(e[r+n]=i)}}}class zm{static register(){um.add(...arguments),Dm()}static unregister(){um.remove(...arguments),Dm()}constructor(e,t){const n=this.config=new Cm(t),r=Tm(e),o=Lm(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const i=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(e){return!rp()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?Lf:Gf}(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,i.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;this.id=Wu(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new dm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t?(clearTimeout(n),n=setTimeout(e,t,o)):e.apply(this,o),t}}((e=>this.update(e)),i.resizeDelay||0),this._dataChanges=[],Nm[this.id]=this,a&&s?(Pp.listen(this,"complete",Pm),Pp.listen(this,"progress",Om),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:o}=this;return Hu(e)?t&&o?o:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return um}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hp(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fh(this.canvas,this.ctx),this}stop(){return Pp.stop(this),this}resize(e,t){Pp.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,e,t,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,hp(this,a,!0)&&(this.notifyPlugins("resize",{size:i}),Yu(n.onResize,[this,i],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){Gu(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce(((e,t)=>(e[t]=!1,e)),{});let o=[];t&&(o=o.concat(Object.keys(t).map((e=>{const n=t[e],r=gm(e,n),o="r"===r,i="x"===r;return{options:n,dposition:o?"chartArea":i?"bottom":"left",dtype:o?"radialLinear":i?"category":"linear"}})))),Gu(o,(t=>{const o=t.options,i=o.id,a=gm(i,o),s=Ku(o.type,t.dtype);void 0!==o.position&&Mm(o.position,a)===Mm(t.dposition)||(o.position=t.dposition),r[i]=!0;let l=null;if(i in n&&n[i].type===s)l=n[i];else{l=new(um.getScale(s))({id:i,type:s,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(o,e)})),Gu(r,((e,t)=>{e||delete n[t]})),Gu(n,(e=>{Tf.configure(this,e,e.options),Tf.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort(((e,t)=>e.index-t.index)),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(Rm("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach(((e,n)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){const r=t[n];let o=this.getDatasetMeta(n);const i=r.type||this.config.type;if(o.type&&o.type!==i&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=i,o.indexAxis=r.indexAxis||fm(i,this.options),o.order=r.order||0,o.index=n,o.label=""+r.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const t=um.getController(i),{datasetElementType:r,dataElementType:a}=uh.datasets[i];Object.assign(t,{dataElementType:um.getElement(a),datasetElementType:r&&um.getElement(r)}),o.controller=new t(this,n),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Gu(this.data.datasets,((e,t)=>{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let l=0,c=this.data.datasets.length;l<c;l++){const{controller:e}=this.getDatasetMeta(l),t=!r&&-1===o.indexOf(e);e.buildOrUpdateElements(t),i=Math.max(+e.getMaxOverflow(),i)}i=this._minPadding=n.layout.autoPadding?i:0,this._updateLayout(i),r||Gu(o,(e=>{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Rm("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Gu(this.scales,(e=>{Tf.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);cd(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:o}of t){Im(e,r,"_removeElements"===n?-o:o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),r=n(0);for(let o=1;o<t;o++)if(!cd(r,n(o)))return;return Array.from(r).map((e=>e.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Tf.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],Gu(this.boxes,(e=>{n&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,ld(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Pp.has(this)?this.attached&&!Pp.running(this)&&Pp.start(this):(this.draw(),Pm({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let r,o;for(r=0,o=t.length;r<o;++r){const o=t[r];e&&!o.visible||n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=Mp(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&bh(t,r),e.controller.draw(),r&&xh(t),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(e){return vh(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const o=yf.modes[t];return"function"===typeof o?o(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Lh(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"===typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",o=this.getDatasetMeta(e),i=o.controller._resolveAnimations(void 0,r);sd(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),i.update(o,{visible:n}),this.update((t=>t.datasetIndex===e?r:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Pp.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),fh(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Nm[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){return this.canvas.toDataURL(...arguments)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};Gu(this.options.events,(e=>n(e,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},o=(e,t)=>{this.canvas&&this.resize(e,t)};let i;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",i)};i=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():i()}unbindEvents(){Gu(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},Gu(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let o,i,a,s;for("dataset"===t&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=e.length;a<s;++a){i=e[a];const t=i&&this.getDatasetMeta(i.datasetIndex).controller;t&&t[r+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],n=e.map((e=>{let{datasetIndex:t,index:n}=e;const r=this.getDatasetMeta(t);if(!r)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:r.data[n],index:n}}));!Qu(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return 1===this._plugins._cache.filter((t=>t.plugin.id===e)).length}_updateHoverStyles(e,t,n){const r=this.options.hover,o=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),i=o(t,e),a=n?e:o(e,t);i.length&&this.updateHoverStyle(i,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:o}=this,i=t,a=this._getActiveElements(e,r,n,i),s=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),l=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,s);n&&(this._lastEvent=null,Yu(o.onHover,[e,a,this],this),s&&Yu(o.onClick,[e,a,this],this));const c=!Qu(a,r);return(c||t)&&(this._active=a,this._updateHoverStyles(a,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,r)}}function Dm(){return Gu(zm.instances,(e=>e._plugins.invalidate()))}function Fm(e,t,n,r){const o=function(e){return Mh(e,["outerStart","outerEnd","innerStart","innerEnd"])}(e.options.borderRadius),i=(n-t)/2,a=Math.min(i,r*t/2),s=e=>{const t=(n-Math.min(i,e))*r/2;return Od(e,0,Math.min(i,t))};return{outerStart:s(o.outerStart),outerEnd:s(o.outerEnd),innerStart:Od(o.innerStart,0,a),innerEnd:Od(o.innerEnd,0,a)}}function Bm(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Wm(e,t,n,r,o,i){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),h=u>0?u+r+n+c:0;let p=0;const f=o-l;if(r){const e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(f-(0!==e?f*e/(e+r):f))/2}const m=(f-Math.max(.001,f*d-n/ud)/d)/2,g=l+m+p,v=o-m-p,{outerStart:b,outerEnd:x,innerStart:y,innerEnd:w}=Fm(t,h,d,v-g),S=d-b,k=d-x,j=g+b/S,C=v-x/k,_=h+y,A=h+w,E=g+y/_,M=v-w/A;if(e.beginPath(),i){const t=(j+C)/2;if(e.arc(a,s,d,j,t),e.arc(a,s,d,t,C),x>0){const t=Bm(k,C,a,s);e.arc(t.x,t.y,x,C,v+md)}const n=Bm(A,v,a,s);if(e.lineTo(n.x,n.y),w>0){const t=Bm(A,M,a,s);e.arc(t.x,t.y,w,v+md,M+Math.PI)}const r=(v-w/h+(g+y/h))/2;if(e.arc(a,s,h,v-w/h,r,!0),e.arc(a,s,h,r,g+y/h,!0),y>0){const t=Bm(_,E,a,s);e.arc(t.x,t.y,y,E+Math.PI,g-md)}const o=Bm(S,g,a,s);if(e.lineTo(o.x,o.y),b>0){const t=Bm(S,j,a,s);e.arc(t.x,t.y,b,g-md,j)}}else{e.moveTo(a,s);const t=Math.cos(j)*d+a,n=Math.sin(j)*d+s;e.lineTo(t,n);const r=Math.cos(C)*d+a,o=Math.sin(C)*d+s;e.lineTo(r,o)}e.closePath()}function Hm(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,p="inner"===l.borderAlign;if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=h,p?(e.lineWidth=2*c,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let f=t.endAngle;if(i){Wm(e,t,n,r,f,o);for(let t=0;t<i;++t)e.stroke();isNaN(s)||(f=a+(s%dd||dd))}p&&function(e,t,n){const{startAngle:r,pixelMargin:o,x:i,y:a,outerRadius:s,innerRadius:l}=t;let c=o/s;e.beginPath(),e.arc(i,a,s,r-c,n+c),l>o?(c=o/l,e.arc(i,a,l,n+c,r-c,!0)):e.arc(i,a,o,n+md,r-md),e.closePath(),e.clip()}(e,t,f),i||(Wm(e,t,n,r,f,o),e.stroke())}l(zm,"defaults",uh),l(zm,"instances",Nm),l(zm,"overrides",ih),l(zm,"registry",um),l(zm,"version","4.4.9"),l(zm,"getChart",Lm);class Vm extends Qf{constructor(e){super(),l(this,"circumference",void 0),l(this,"endAngle",void 0),l(this,"fullCircles",void 0),l(this,"innerRadius",void 0),l(this,"outerRadius",void 0),l(this,"pixelMargin",void 0),l(this,"startAngle",void 0),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:o,distance:i}=Ad(r,{x:e,y:t}),{startAngle:a,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,h=Ku(u,s-a),p=Pd(o,a,s)&&a!==s,f=h>=dd||p,m=Td(i,l+d,c+d);return f&&m}getCenterPoint(e){const{x:t,y:n,startAngle:r,endAngle:o,innerRadius:i,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:s,spacing:l}=this.options,c=(r+o)/2,u=(i+a+l+s)/2;return{x:t+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:n}=this,r=(t.offset||0)/4,o=(t.spacing||0)/2,i=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>dd?Math.floor(n/dd):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r);const s=r*(1-Math.sin(Math.min(ud,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:s}=t;let l=t.endAngle;if(i){Wm(e,t,n,r,l,o);for(let t=0;t<i;++t)e.fill();isNaN(s)||(l=a+(s%dd||dd))}Wm(e,t,n,r,l,o),e.fill()}(e,this,s,o,i),Hm(e,this,s,o,i),e.restore()}}function Um(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;e.lineCap=Ku(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ku(n.borderDash,t.borderDash)),e.lineDashOffset=Ku(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ku(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ku(n.borderWidth,t.borderWidth),e.strokeStyle=Ku(n.borderColor,t.borderColor)}function qm(e,t,n){e.lineTo(n.x,n.y)}function $m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e.length,{start:o=0,end:i=r-1}=n,{start:a,end:s}=t,l=Math.max(o,a),c=Math.min(i,s),u=o<a&&i<a||o>s&&i>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function Km(e,t,n,r){const{points:o,options:i}=t,{count:a,start:s,loop:l,ilen:c}=$m(o,n,r),u=function(e){return e.stepped?yh:e.tension||"monotone"===e.cubicInterpolationMode?wh:qm}(i);let d,h,p,{move:f=!0,reverse:m}=r||{};for(d=0;d<=c;++d)h=o[(s+(m?c-d:d))%a],h.skip||(f?(e.moveTo(h.x,h.y),f=!1):u(e,p,h,m,i.stepped),p=h);return l&&(h=o[(s+(m?c:0))%a],u(e,p,h,m,i.stepped)),!!l}function Xm(e,t,n,r){const o=t.points,{count:i,start:a,ilen:s}=$m(o,n,r),{move:l=!0,reverse:c}=r||{};let u,d,h,p,f,m,g=0,v=0;const b=e=>(a+(c?s-e:e))%i,x=()=>{p!==f&&(e.lineTo(g,f),e.lineTo(g,p),e.lineTo(g,m))};for(l&&(d=o[b(0)],e.moveTo(d.x,d.y)),u=0;u<=s;++u){if(d=o[b(u)],d.skip)continue;const t=d.x,n=d.y,r=0|t;r===h?(n<p?p=n:n>f&&(f=n),g=(v*g+t)/++v):(x(),e.lineTo(t,n),h=r,v=0,p=f=n),m=n}x()}function Ym(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&"monotone"!==t.cubicInterpolationMode&&!t.stepped&&!n?Xm:Km}l(Vm,"id","arc"),l(Vm,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),l(Vm,"defaultRoutes",{backgroundColor:"backgroundColor"}),l(Vm,"descriptors",{_scriptable:!0,_indexable:e=>"borderDash"!==e});const Gm="function"===typeof Path2D;function Qm(e,t,n,r){Gm&&!t.options.segment?function(e,t,n,r){let o=t._path;o||(o=t._path=new Path2D,t.path(o,n,r)&&o.closePath()),Um(e,t.options),e.stroke(o)}(e,t,n,r):function(e,t,n,r){const{segments:o,options:i}=t,a=Ym(t);for(const s of o)Um(e,i,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class Jm extends Qf{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;np(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,o=n.length;if(!o)return[];const i=!!e._loop,{start:a,end:s}=function(e,t,n,r){let o=0,i=t-1;if(n&&!r)for(;o<t&&!e[o].skip;)o++;for(;o<t&&e[o].skip;)o++;for(o%=t,n&&(i+=o);i>o&&e[i%t].skip;)i--;return i%=t,{start:o,end:i}}(n,o,i,r);return Cp(e,!0===r?[{start:a,end:s,loop:i}]:function(e,t,n,r){const o=e.length,i=[];let a,s=t,l=e[t];for(a=t+1;a<=n;++a){const n=e[a%o];n.skip||n.stop?l.skip||(r=!1,i.push({start:t%o,end:(a-1)%o,loop:r}),t=s=n.stop?a:null):(s=a,l.skip&&(t=a)),l=n}return null!==s&&i.push({start:t%o,end:s%o,loop:r}),i}(n,a,s<a?s+o:s,!!e._fullLoop&&0===a&&s===o-1),n,t)}(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){const n=this.options,r=e[t],o=this.points,i=jp(this,{property:t,start:r,end:r});if(!i.length)return;const a=[],s=function(e){return e.stepped?gp:e.tension||"monotone"===e.cubicInterpolationMode?vp:mp}(n);let l,c;for(l=0,c=i.length;l<c;++l){const{start:c,end:u}=i[l],d=o[c],h=o[u];if(d===h){a.push(d);continue}const p=s(d,h,Math.abs((r-d[t])/(h[t]-d[t])),n.stepped);p[t]=e[t],a.push(p)}return 1===a.length?a[0]:a}pathSegment(e,t,n){return Ym(this)(e,this,t,n)}path(e,t,n){const r=this.segments,o=Ym(this);let i=this._loop;t=t||0,n=n||this.points.length-t;for(const a of r)i&=o(e,this,a,{start:t,end:t+n-1});return!!i}draw(e,t,n,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),Qm(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Zm(e,t,n,r){const o=e.options,{[n]:i}=e.getProps([n],r);return Math.abs(t-i)<o.radius+o.hitRadius}l(Jm,"id","line"),l(Jm,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),l(Jm,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),l(Jm,"descriptors",{_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e});class eg extends Qf{constructor(e){super(),l(this,"parsed",void 0),l(this,"skip",void 0),l(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.options,{x:o,y:i}=this.getProps(["x","y"],n);return Math.pow(e-o,2)+Math.pow(t-i,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,t){return Zm(this,e,"x",t)}inYRange(e,t){return Zm(this,e,"y",t)}getCenterPoint(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}size(e){let t=(e=e||this.options||{}).radius||0;t=Math.max(t,t&&e.hoverRadius||0);return 2*(t+(t&&e.borderWidth||0))}draw(e,t){const n=this.options;this.skip||n.radius<.1||!vh(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,mh(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function tg(e,t){const{x:n,y:r,base:o,width:i,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,o),l=Math.max(n,o),c=r-d,u=r+d):(d=i/2,s=n-d,l=n+d,c=Math.min(r,o),u=Math.max(r,o)),{left:s,top:c,right:l,bottom:u}}function ng(e,t,n,r){return e?0:Od(t,n,r)}function rg(e){const t=tg(e),n=t.right-t.left,r=t.bottom-t.top,o=function(e,t,n){const r=e.options.borderWidth,o=e.borderSkipped,i=Rh(r);return{t:ng(o.top,i.top,0,n),r:ng(o.right,i.right,0,t),b:ng(o.bottom,i.bottom,0,n),l:ng(o.left,i.left,0,t)}}(e,n/2,r/2),i=function(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),o=e.options.borderRadius,i=Ph(o),a=Math.min(t,n),s=e.borderSkipped,l=r||Uu(o);return{topLeft:ng(!l||s.top||s.left,i.topLeft,0,a),topRight:ng(!l||s.top||s.right,i.topRight,0,a),bottomLeft:ng(!l||s.bottom||s.left,i.bottomLeft,0,a),bottomRight:ng(!l||s.bottom||s.right,i.bottomRight,0,a)}}(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,i.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(o.b,o.r))}}}}function og(e,t,n,r){const o=null===t,i=null===n,a=e&&!(o&&i)&&tg(e,r);return a&&(o||Td(t,a.left,a.right))&&(i||Td(n,a.top,a.bottom))}function ig(e,t){e.rect(t.x,t.y,t.w,t.h)}function ag(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e.x!==n.x?-t:0,o=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-o;return{x:e.x+r,y:e.y+o,w:e.w+i,h:e.h+a,radius:e.radius}}l(eg,"id","point"),l(eg,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),l(eg,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class sg extends Qf{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:o,outer:i}=rg(this),a=(s=i.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?Ch:ig;var s;e.save(),i.w===o.w&&i.h===o.h||(e.beginPath(),a(e,ag(i,t,o)),e.clip(),a(e,ag(o,-t,i)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),a(e,ag(o,t)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,t,n){return og(this,e,t,n)}inXRange(e,t){return og(this,e,null,t)}inYRange(e,t){return og(this,null,e,t)}getCenterPoint(e){const{x:t,y:n,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+r)/2:t,y:o?n:(n+r)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}l(sg,"id","bar"),l(sg,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),l(sg,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function lg(e,t,n,r){if(r)return;let o=t[e],i=n[e];return"angle"===e&&(o=Rd(o),i=Rd(i)),{property:e,start:o,end:i}}function cg(e,t,n){for(;t>e;t--){const e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function ug(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function dg(e,t){let n=[],r=!1;return Vu(e)?(r=!0,n=e):n=function(e,t){const{x:n=null,y:r=null}=e||{},o=t.points,i=[];return t.segments.forEach((e=>{let{start:t,end:a}=e;a=cg(t,a,o);const s=o[t],l=o[a];null!==r?(i.push({x:s.x,y:r}),i.push({x:l.x,y:r})):null!==n&&(i.push({x:n,y:s.y}),i.push({x:n,y:l.y}))})),i}(e,t),n.length?new Jm({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function hg(e){return e&&!1!==e.fill}function pg(e,t,n){let r=e[t].fill;const o=[t];let i;if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!qu(r))return r;if(i=e[r],!i)return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function fg(e,t,n){const r=function(e){const t=e.options,n=t.fill;let r=Ku(n&&n.target,n);void 0===r&&(r=!!t.backgroundColor);if(!1===r||null===r)return!1;if(!0===r)return"origin";return r}(e);if(Uu(r))return!isNaN(r.value)&&r;let o=parseFloat(r);return qu(o)&&Math.floor(o)===o?function(e,t,n,r){"-"!==e&&"+"!==e||(n=t+n);if(n===t||n<0||n>=r)return!1;return n}(r[0],t,o,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function mg(e,t,n){const r=[];for(let o=0;o<n.length;o++){const i=n[o],{first:a,last:s,point:l}=gg(i,t,"x");if(!(!l||a&&s))if(a)r.unshift(l);else if(e.push(l),!s)break}e.push(...r)}function gg(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const o=r[n],i=e.segments,a=e.points;let s=!1,l=!1;for(let c=0;c<i.length;c++){const e=i[c],t=a[e.start][n],r=a[e.end][n];if(Td(o,t,r)){s=o===t,l=o===r;break}}return{first:s,last:l,point:r}}class vg{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){const{x:r,y:o,radius:i}=this;return t=t||{start:0,end:dd},e.arc(r,o,i,t.end,t.start,!0),!n.bounds}interpolate(e){const{x:t,y:n,radius:r}=this,o=e.angle;return{x:t+Math.cos(o)*r,y:n+Math.sin(o)*r,angle:o}}}function bg(e){const{chart:t,fill:n,line:r}=e;if(qu(n))return function(e,t){const n=e.getDatasetMeta(t),r=n&&e.isDatasetVisible(t);return r?n.dataset:null}(t,n);if("stack"===n)return function(e){const{scale:t,index:n,line:r}=e,o=[],i=r.segments,a=r.points,s=function(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let o=0;o<r.length;o++){const e=r[o];if(e.index===t)break;e.hidden||n.unshift(e.dataset)}return n}(t,n);s.push(dg({x:null,y:t.bottom},r));for(let l=0;l<i.length;l++){const e=i[l];for(let t=e.start;t<=e.end;t++)mg(o,a[t],s)}return new Jm({points:o,options:{}})}(e);if("shape"===n)return!0;const o=function(e){const t=e.scale||{};if(t.getPointPositionForValue)return function(e){const{scale:t,fill:n}=e,r=t.options,o=t.getLabels().length,i=r.reverse?t.max:t.min,a=function(e,t,n){let r;return r="start"===e?n:"end"===e?t.options.reverse?t.min:t.max:Uu(e)?e.value:t.getBaseValue(),r}(n,t,i),s=[];if(r.grid.circular){const e=t.getPointPositionForValue(0,i);return new vg({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<o;++l)s.push(t.getPointPositionForValue(l,a));return s}(e);return function(e){const{scale:t={},fill:n}=e,r=function(e,t){let n=null;return"start"===e?n=t.bottom:"end"===e?n=t.top:Uu(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}(n,t);if(qu(r)){const e=t.isHorizontal();return{x:e?r:null,y:e?null:r}}return null}(e)}(e);return o instanceof vg?o:dg(o,r)}function xg(e,t,n){const r=bg(t),{chart:o,index:i,line:a,scale:s,axis:l}=t,c=a.options,u=c.fill,d=c.backgroundColor,{above:h=d,below:p=d}=u||{},f=o.getDatasetMeta(i),m=Mp(o,f);r&&a.points.length&&(bh(e,n),function(e,t){const{line:n,target:r,above:o,below:i,area:a,scale:s,clip:l}=t,c=n._loop?"angle":t.axis;e.save(),"x"===c&&i!==o&&(yg(e,r,a.top),wg(e,{line:n,target:r,color:o,scale:s,property:c,clip:l}),e.restore(),e.save(),yg(e,r,a.bottom));wg(e,{line:n,target:r,color:i,scale:s,property:c,clip:l}),e.restore()}(e,{line:a,target:r,above:h,below:p,area:n,scale:s,axis:l,clip:m}),xh(e))}function yg(e,t,n){const{segments:r,points:o}=t;let i=!0,a=!1;e.beginPath();for(const s of r){const{start:r,end:l}=s,c=o[r],u=o[cg(r,l,o)];i?(e.moveTo(c.x,c.y),i=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.y)),a=!!t.pathSegment(e,s,{move:a}),a?e.closePath():e.lineTo(u.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function wg(e,t){const{line:n,target:r,property:o,color:i,scale:a,clip:s}=t,l=function(e,t,n){const r=e.segments,o=e.points,i=t.points,a=[];for(const s of r){let{start:e,end:r}=s;r=cg(e,r,o);const l=lg(n,o[e],o[r],s.loop);if(!t.segments){a.push({source:s,target:l,start:o[e],end:o[r]});continue}const c=jp(t,l);for(const t of c){const e=lg(n,i[t.start],i[t.end],t.loop),r=kp(s,o,e);for(const o of r)a.push({source:o,target:t,start:{[n]:ug(l,e,"start",Math.max)},end:{[n]:ug(l,e,"end",Math.min)}})}}return a}(n,r,o);for(const{source:c,target:u,start:d,end:h}of l){const{style:{backgroundColor:t=i}={}}=c,l=!0!==r;e.save(),e.fillStyle=t,Sg(e,a,s,l&&lg(o,d,h)),e.beginPath();const p=!!n.pathSegment(e,c);let f;if(l){p?e.closePath():kg(e,r,h,o);const t=!!r.pathSegment(e,u,{move:p,reverse:!0});f=p&&t,f||kg(e,r,d,o)}e.closePath(),e.fill(f?"evenodd":"nonzero"),e.restore()}}function Sg(e,t,n,r){const o=t.chart.chartArea,{property:i,start:a,end:s}=r||{};if("x"===i||"y"===i){let t,r,l,c;"x"===i?(t=a,r=o.top,l=s,c=o.bottom):(t=o.left,r=a,l=o.right,c=s),e.beginPath(),n&&(t=Math.max(t,n.left),l=Math.min(l,n.right),r=Math.max(r,n.top),c=Math.min(c,n.bottom)),e.rect(t,r,l-t,c-r),e.clip()}}function kg(e,t,n,r){const o=t.interpolate(n,r);o&&e.lineTo(o.x,o.y)}var jg={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,o=[];let i,a,s,l;for(a=0;a<r;++a)i=e.getDatasetMeta(a),s=i.dataset,l=null,s&&s.options&&s instanceof Jm&&(l={visible:e.isDatasetVisible(a),index:a,fill:fg(s,a,r),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:s}),i.$filler=l,o.push(l);for(a=0;a<r;++a)l=o[a],l&&!1!==l.fill&&(l.fill=pg(o,a,n.propagate))},beforeDraw(e,t,n){const r="beforeDraw"===n.drawTime,o=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let a=o.length-1;a>=0;--a){const t=o[a].$filler;t&&(t.line.updateControlPoints(i,t.axis),r&&t.fill&&xg(e.ctx,t,i))}},beforeDatasetsDraw(e,t,n){if("beforeDatasetsDraw"!==n.drawTime)return;const r=e.getSortedVisibleDatasetMetas();for(let o=r.length-1;o>=0;--o){const t=r[o].$filler;hg(t)&&xg(e.ctx,t,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;hg(r)&&"beforeDatasetDraw"===n.drawTime&&xg(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Cg=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class _g extends Qf{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=Yu(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,n)=>e.sort(t,n,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const n=e.labels,r=Th(n.font),o=r.size,i=this._computeTitleHeight(),{boxWidth:a,itemHeight:s}=Cg(n,o);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(i,o,a,s)+10):(c=this.maxHeight,l=this._fitCols(i,r,a,s)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){const{ctx:o,maxWidth:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+a;let u=e;o.textAlign="left",o.textBaseline="middle";let d=-1,h=-c;return this.legendItems.forEach(((e,p)=>{const f=n+t/2+o.measureText(e.text).width;(0===p||l[l.length-1]+f+2*a>i)&&(u+=c,l[l.length-(p>0?0:1)]=0,h+=c,d++),s[p]={left:0,top:h,row:d,width:f,height:r},l[l.length-1]+=f+a})),u}_fitCols(e,t,n,r){const{ctx:o,maxHeight:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],c=i-e;let u=a,d=0,h=0,p=0,f=0;return this.legendItems.forEach(((e,i)=>{const{itemWidth:m,itemHeight:g}=function(e,t,n,r,o){const i=function(e,t,n,r){let o=e.text;o&&"string"!==typeof o&&(o=o.reduce(((e,t)=>e.length>t.length?e:t)));return t+n.size/2+r.measureText(o).width}(r,e,t,n),a=function(e,t,n){let r=e;"string"!==typeof t.text&&(r=Ag(t,n));return r}(o,r,t.lineHeight);return{itemWidth:i,itemHeight:a}}(n,t,o,e,r);i>0&&h+g+2*a>c&&(u+=d+a,l.push({width:d,height:h}),p+=d+a,f++,d=h=0),s[i]={left:p,top:h,col:f,width:m,height:g},d=Math.max(d,m),h+=g+a})),u+=d,l.push({width:d,height:h}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:o}}=this,i=bp(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=Vd(n,this.left+r,this.right-this.lineWidths[o]);for(const s of t)o!==s.row&&(o=s.row,a=Vd(n,this.left+r,this.right-this.lineWidths[o])),s.top+=this.top+e+r,s.left=i.leftForLtr(i.x(a),s.width),a+=s.width+r}else{let o=0,a=Vd(n,this.top+e+r,this.bottom-this.columnSizes[o].height);for(const s of t)s.col!==o&&(o=s.col,a=Vd(n,this.top+e+r,this.bottom-this.columnSizes[o].height)),s.top=a,s.left+=this.left+r,s.left=i.leftForLtr(i.x(s.left),s.width),a+=s.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;bh(e,this),this._draw(),xh(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:o,labels:i}=e,a=uh.color,s=bp(e.rtl,this.left,this.width),l=Th(i.font),{padding:c}=i,u=l.size,d=u/2;let h;this.drawTitle(),r.textAlign=s.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:p,boxHeight:f,itemHeight:m}=Cg(i,u),g=this.isHorizontal(),v=this._computeTitleHeight();h=g?{x:Vd(o,this.left+c,this.right-n[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:Vd(o,this.top+v+c,this.bottom-t[0].height),line:0},xp(this.ctx,e.textDirection);const b=m+c;this.legendItems.forEach(((x,y)=>{r.strokeStyle=x.fontColor,r.fillStyle=x.fontColor;const w=r.measureText(x.text).width,S=s.textAlign(x.textAlign||(x.textAlign=i.textAlign)),k=p+d+w;let j=h.x,C=h.y;s.setWidth(this.width),g?y>0&&j+k+c>this.right&&(C=h.y+=b,h.line++,j=h.x=Vd(o,this.left+c,this.right-n[h.line])):y>0&&C+b>this.bottom&&(j=h.x=j+t[h.line].width+c,h.line++,C=h.y=Vd(o,this.top+v+c,this.bottom-t[h.line].height));if(function(e,t,n){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;r.save();const o=Ku(n.lineWidth,1);if(r.fillStyle=Ku(n.fillStyle,a),r.lineCap=Ku(n.lineCap,"butt"),r.lineDashOffset=Ku(n.lineDashOffset,0),r.lineJoin=Ku(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=Ku(n.strokeStyle,a),r.setLineDash(Ku(n.lineDash,[])),i.usePointStyle){const a={radius:f*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},l=s.xPlus(e,p/2);gh(r,a,l,t+d,i.pointStyleWidth&&p)}else{const i=t+Math.max((u-f)/2,0),a=s.leftForLtr(e,p),l=Ph(n.borderRadius);r.beginPath(),Object.values(l).some((e=>0!==e))?Ch(r,{x:a,y:i,w:p,h:f,radius:l}):r.rect(a,i,p,f),r.fill(),0!==o&&r.stroke()}r.restore()}(s.x(j),C,x),j=((e,t,n,r)=>e===(r?"left":"right")?n:"center"===e?(t+n)/2:t)(S,j+p+d,g?j+k:this.right,e.rtl),function(e,t,n){jh(r,n.text,e,t+m/2,l,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})}(s.x(j),C,x),g)h.x+=k+c;else if("string"!==typeof x.text){const e=l.lineHeight;h.y+=Ag(x,e)+c}else h.y+=b})),yp(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=Th(t.font),r=Oh(t.padding);if(!t.display)return;const o=bp(e.rtl,this.left,this.width),i=this.ctx,a=t.position,s=n.size/2,l=r.top+s;let c,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+l,u=Vd(e.align,u,this.right-d);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);c=l+Vd(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const h=Vd(a,u,u+d);i.textAlign=o.textAlign(Hd(a)),i.textBaseline="middle",i.strokeStyle=t.color,i.fillStyle=t.color,i.font=n.string,jh(i,t.text,h,c,n)}_computeTitleHeight(){const e=this.options.title,t=Th(e.font),n=Oh(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,o;if(Td(e,this.left,this.right)&&Td(t,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(r=o[n],Td(e,r.left,r.left+r.width)&&Td(t,r.top,r.top+r.height))return this.legendItems[n];return null}handleEvent(e){const t=this.options;if(!function(e,t){if(("mousemove"===e||"mouseout"===e)&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,t))return;const n=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const i=this._hoveredItem,a=(o=n,null!==(r=i)&&null!==o&&r.datasetIndex===o.datasetIndex&&r.index===o.index);i&&!a&&Yu(t.onLeave,[e,i,this],this),this._hoveredItem=n,n&&!a&&Yu(t.onHover,[e,n,this],this)}else n&&Yu(t.onClick,[e,n,this],this);var r,o}}function Ag(e,t){return t*(e.text?e.text.length:0)}var Eg={id:"legend",_element:_g,start(e,t,n){const r=e.legend=new _g({ctx:e.ctx,options:n,chart:e});Tf.configure(e,r,n),Tf.addBox(e,r)},stop(e){Tf.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Tf.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),t.hidden=!0):(o.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:i,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const l=e.controller.getStyle(n?0:void 0),c=Oh(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:i,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:o||l.textAlign,borderRadius:a&&(s||l.borderRadius),datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Mg extends Qf{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const r=Vu(n.text)?n.text.length:1;this._padding=Oh(n.padding);const o=r*Th(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:n,bottom:r,right:o,options:i}=this,a=i.align;let s,l,c,u=0;return this.isHorizontal()?(l=Vd(a,n,o),c=t+e,s=o-n):("left"===i.position?(l=n+e,c=Vd(a,r,t),u=-.5*ud):(l=o-e,c=Vd(a,t,r),u=.5*ud),s=r-t),{titleX:l,titleY:c,maxWidth:s,rotation:u}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const n=Th(t.font),r=n.lineHeight/2+this._padding.top,{titleX:o,titleY:i,maxWidth:a,rotation:s}=this._drawArgs(r);jh(e,t.text,0,0,n,{color:t.color,maxWidth:a,rotation:s,textAlign:Hd(t.align),textBaseline:"middle",translation:[o,i]})}}var Rg={id:"title",_element:Mg,start(e,t,n){!function(e,t){const n=new Mg({ctx:e.ctx,options:t,chart:e});Tf.configure(e,n,t),Tf.addBox(e,n),e.titleBlock=n}(e,n)},stop(e){const t=e.titleBlock;Tf.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Tf.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const Pg={average(e){if(!e.length)return!1;let t,n,r=new Set,o=0,i=0;for(t=0,n=e.length;t<n;++t){const n=e[t].element;if(n&&n.hasValue()){const e=n.tooltipPosition();r.add(e.x),o+=e.y,++i}}if(0===i||0===r.size)return!1;return{x:[...r].reduce(((e,t)=>e+t))/r.size,y:o/i}},nearest(e,t){if(!e.length)return!1;let n,r,o,i=t.x,a=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){const r=e[n].element;if(r&&r.hasValue()){const e=Ed(t,r.getCenterPoint());e<s&&(s=e,o=r)}}if(o){const e=o.tooltipPosition();i=e.x,a=e.y}return{x:i,y:a}}};function Og(e,t){return t&&(Vu(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Tg(e){return("string"===typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Ng(e,t){const{element:n,datasetIndex:r,index:o}=t,i=e.getDatasetMeta(r).controller,{label:a,value:s}=i.getLabelAndValue(o);return{chart:e,label:a,parsed:i.getParsed(o),raw:e.data.datasets[r].data[o],formattedValue:s,dataset:i.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function Lg(e,t){const n=e.chart.ctx,{body:r,footer:o,title:i}=e,{boxWidth:a,boxHeight:s}=t,l=Th(t.bodyFont),c=Th(t.titleFont),u=Th(t.footerFont),d=i.length,h=o.length,p=r.length,f=Oh(t.padding);let m=f.height,g=0,v=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){m+=p*(t.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-p)*l.lineHeight+(v-1)*t.bodySpacing}h&&(m+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let b=0;const x=function(e){g=Math.max(g,n.measureText(e).width+b)};return n.save(),n.font=c.string,Gu(e.title,x),n.font=l.string,Gu(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?a+2+t.boxPadding:0,Gu(r,(e=>{Gu(e.before,x),Gu(e.lines,x),Gu(e.after,x)})),b=0,n.font=u.string,Gu(e.footer,x),n.restore(),g+=f.width,{width:g,height:m}}function Ig(e,t,n,r){const{x:o,width:i}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return"center"===r?c=o<=(s+l)/2?"left":"right":o<=i/2?c="left":o>=a-i/2&&(c="right"),function(e,t,n,r){const{x:o,width:i}=r,a=n.caretSize+n.caretPadding;return"left"===e&&o+i+a>t.width||"right"===e&&o-i-a<0||void 0}(c,e,t,n)&&(c="center"),c}function zg(e,t,n){const r=n.yAlign||t.yAlign||function(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||Ig(e,t,n,r),yAlign:r}}function Dg(e,t,n,r){const{caretSize:o,caretPadding:i,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=o+i,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=Ph(a);let f=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,s);const m=function(e,t,n){let{y:r,height:o}=e;return"top"===t?r+=n:r-="bottom"===t?o+n:o/2,r}(t,l,c);return"center"===l?"left"===s?f+=c:"right"===s&&(f-=c):"left"===s?f-=Math.max(u,h)+o:"right"===s&&(f+=Math.max(d,p)+o),{x:Od(f,0,r.width-t.width),y:Od(m,0,r.height-t.height)}}function Fg(e,t,n){const r=Oh(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function Bg(e){return Og([],Tg(e))}function Wg(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Hg={beforeTitle:Bu,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Bu,beforeBody:Bu,beforeLabel:Bu,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Hu(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Bu,afterBody:Bu,beforeFooter:Bu,footer:Bu,afterFooter:Bu};function Vg(e,t,n,r){const o=e[t].call(n,r);return"undefined"===typeof o?Hg[t].call(n,r):o}class Ug extends Qf{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,o=new Lp(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,n=this._tooltipItems,Lh(e,{tooltip:t,tooltipItems:n,type:"tooltip"})));var e,t,n}getTitle(e,t){const{callbacks:n}=t,r=Vg(n,"beforeTitle",this,e),o=Vg(n,"title",this,e),i=Vg(n,"afterTitle",this,e);let a=[];return a=Og(a,Tg(r)),a=Og(a,Tg(o)),a=Og(a,Tg(i)),a}getBeforeBody(e,t){return Bg(Vg(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,r=[];return Gu(e,(e=>{const t={before:[],lines:[],after:[]},o=Wg(n,e);Og(t.before,Tg(Vg(o,"beforeLabel",this,e))),Og(t.lines,Vg(o,"label",this,e)),Og(t.after,Tg(Vg(o,"afterLabel",this,e))),r.push(t)})),r}getAfterBody(e,t){return Bg(Vg(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,r=Vg(n,"beforeFooter",this,e),o=Vg(n,"footer",this,e),i=Vg(n,"afterFooter",this,e);let a=[];return a=Og(a,Tg(r)),a=Og(a,Tg(o)),a=Og(a,Tg(i)),a}_createItems(e){const t=this._active,n=this.chart.data,r=[],o=[],i=[];let a,s,l=[];for(a=0,s=t.length;a<s;++a)l.push(Ng(this.chart,t[a]));return e.filter&&(l=l.filter(((t,r,o)=>e.filter(t,r,o,n)))),e.itemSort&&(l=l.sort(((t,r)=>e.itemSort(t,r,n)))),Gu(l,(t=>{const n=Wg(e.callbacks,t);r.push(Vg(n,"labelColor",this,t)),o.push(Vg(n,"labelPointStyle",this,t)),i.push(Vg(n,"labelTextColor",this,t))})),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=i,this.dataPoints=l,l}update(e,t){const n=this.options.setContext(this.getContext()),r=this._active;let o,i=[];if(r.length){const e=Pg[n.position].call(this,r,this._eventPosition);i=this._createItems(n),this.title=this.getTitle(i,n),this.beforeBody=this.getBeforeBody(i,n),this.body=this.getBody(i,n),this.afterBody=this.getAfterBody(i,n),this.footer=this.getFooter(i,n);const t=this._size=Lg(this,n),a=Object.assign({},e,t),s=zg(this.chart,n,a),l=Dg(n,a,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,o={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=i,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){const o=this.getCaretPosition(e,n,r);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:o}=this,{caretSize:i,cornerRadius:a}=n,{topLeft:s,topRight:l,bottomLeft:c,bottomRight:u}=Ph(a),{x:d,y:h}=e,{width:p,height:f}=t;let m,g,v,b,x,y;return"center"===o?(x=h+f/2,"left"===r?(m=d,g=m-i,b=x+i,y=x-i):(m=d+p,g=m+i,b=x-i,y=x+i),v=m):(g="left"===r?d+Math.max(s,c)+i:"right"===r?d+p-Math.max(l,u)-i:this.caretX,"top"===o?(b=h,x=b-i,m=g-i,v=g+i):(b=h+f,x=b+i,m=g+i,v=g-i),y=b),{x1:m,x2:g,x3:v,y1:b,y2:x,y3:y}}drawTitle(e,t,n){const r=this.title,o=r.length;let i,a,s;if(o){const l=bp(n.rtl,this.x,this.width);for(e.x=Fg(this,n.titleAlign,n),t.textAlign=l.textAlign(n.titleAlign),t.textBaseline="middle",i=Th(n.titleFont),a=n.titleSpacing,t.fillStyle=n.titleColor,t.font=i.string,s=0;s<o;++s)t.fillText(r[s],l.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+a,s+1===o&&(e.y+=n.titleMarginBottom-a)}}_drawColorBox(e,t,n,r,o){const i=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:s,boxWidth:l}=o,c=Th(o.bodyFont),u=Fg(this,"left",o),d=r.x(u),h=s<c.lineHeight?(c.lineHeight-s)/2:0,p=t.y+h;if(o.usePointStyle){const t={radius:Math.min(l,s)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(d,l)+l/2,c=p+s/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,mh(e,t,n,c),e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,mh(e,t,n,c)}else{e.lineWidth=Uu(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,e.strokeStyle=i.borderColor,e.setLineDash(i.borderDash||[]),e.lineDashOffset=i.borderDashOffset||0;const t=r.leftForLtr(d,l),n=r.leftForLtr(r.xPlus(d,1),l-2),a=Ph(i.borderRadius);Object.values(a).some((e=>0!==e))?(e.beginPath(),e.fillStyle=o.multiKeyBackground,Ch(e,{x:t,y:p,w:l,h:s,radius:a}),e.fill(),e.stroke(),e.fillStyle=i.backgroundColor,e.beginPath(),Ch(e,{x:n,y:p+1,w:l-2,h:s-2,radius:a}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(t,p,l,s),e.strokeRect(t,p,l,s),e.fillStyle=i.backgroundColor,e.fillRect(n,p+1,l-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:r}=this,{bodySpacing:o,bodyAlign:i,displayColors:a,boxHeight:s,boxWidth:l,boxPadding:c}=n,u=Th(n.bodyFont);let d=u.lineHeight,h=0;const p=bp(n.rtl,this.x,this.width),f=function(n){t.fillText(n,p.x(e.x+h),e.y+d/2),e.y+=d+o},m=p.textAlign(i);let g,v,b,x,y,w,S;for(t.textAlign=i,t.textBaseline="middle",t.font=u.string,e.x=Fg(this,m,n),t.fillStyle=n.bodyColor,Gu(this.beforeBody,f),h=a&&"right"!==m?"center"===i?l/2+c:l+2+c:0,x=0,w=r.length;x<w;++x){for(g=r[x],v=this.labelTextColors[x],t.fillStyle=v,Gu(g.before,f),b=g.lines,a&&b.length&&(this._drawColorBox(t,e,x,p,n),d=Math.max(u.lineHeight,s)),y=0,S=b.length;y<S;++y)f(b[y]),d=u.lineHeight;Gu(g.after,f)}h=0,d=u.lineHeight,Gu(this.afterBody,f),e.y-=o}drawFooter(e,t,n){const r=this.footer,o=r.length;let i,a;if(o){const s=bp(n.rtl,this.x,this.width);for(e.x=Fg(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=s.textAlign(n.footerAlign),t.textBaseline="middle",i=Th(n.footerFont),t.fillStyle=n.footerColor,t.font=i.string,a=0;a<o;++a)t.fillText(r[a],s.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){const{xAlign:o,yAlign:i}=this,{x:a,y:s}=e,{width:l,height:c}=n,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=Ph(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(a+u,s),"top"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+l-d,s),t.quadraticCurveTo(a+l,s,a+l,s+d),"center"===i&&"right"===o&&this.drawCaret(e,t,n,r),t.lineTo(a+l,s+c-p),t.quadraticCurveTo(a+l,s+c,a+l-p,s+c),"bottom"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+h,s+c),t.quadraticCurveTo(a,s+c,a,s+c-h),"center"===i&&"left"===o&&this.drawCaret(e,t,n,r),t.lineTo(a,s+u),t.quadraticCurveTo(a,s,a+u,s),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,r=n&&n.x,o=n&&n.y;if(r||o){const n=Pg[e.position].call(this,this._active,this._eventPosition);if(!n)return;const i=this._size=Lg(this,e),a=Object.assign({},n,this._size),s=zg(t,e,a),l=Dg(e,a,s,t);r._to===l.x&&o._to===l.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=i.width,this.height=i.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const i=Oh(t.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&a&&(e.save(),e.globalAlpha=n,this.drawBackground(o,e,r,t),xp(e,t.textDirection),o.y+=i.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),yp(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,r=e.map((e=>{let{datasetIndex:t,index:n}=e;const r=this.chart.getDatasetMeta(t);if(!r)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:r.data[n],index:n}})),o=!Qu(n,r),i=this._positionChanged(r,t);(o||i)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],i=this._getActiveElements(e,o,t,n),a=this._positionChanged(i,e),s=t||!Qu(i,o)||a;return s&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){const o=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter((e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)));const i=this.chart.getElementsAtEventForMode(e,o.mode,o,n);return o.reverse&&i.reverse(),i}_positionChanged(e,t){const{caretX:n,caretY:r,options:o}=this,i=Pg[o.position].call(this,e,t);return!1!==i&&(n!==i.x||r!==i.y)}}l(Ug,"positioners",Pg);var qg={id:"tooltip",_element:Ug,positioners:Pg,afterInit(e,t,n){n&&(e.tooltip=new Ug({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",u(u({},n),{},{cancelable:!0})))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Hg},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function $g(e,t,n,r){const o=e.indexOf(t);if(-1===o)return((e,t,n,r)=>("string"===typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n))(e,t,n,r);return o!==e.lastIndexOf(t)?n:o}function Kg(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Xg extends sm{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(Hu(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:Od(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:$g(n,e,Ku(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,r=[];let o=this.getLabels();o=0===e&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let i=e;i<=t;i++)r.push({value:i});return r}getLabelForValue(e){return Kg.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!==typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function Yg(e,t){const n=[],{bounds:r,step:o,min:i,max:a,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=e,h=o||1,p=c-1,{min:f,max:m}=t,g=!Hu(i),v=!Hu(a),b=!Hu(l),x=(m-f)/(u+1);let y,w,S,k,j=wd((m-f)/p/h)*h;if(j<1e-14&&!g&&!v)return[{value:f},{value:m}];k=Math.ceil(m/j)-Math.floor(f/j),k>p&&(j=wd(k*j/p/h)*h),Hu(s)||(y=Math.pow(10,s),j=Math.ceil(j*y)/y),"ticks"===r?(w=Math.floor(f/j)*j,S=Math.ceil(m/j)*j):(w=f,S=m),g&&v&&o&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((a-i)/o,j/1e3)?(k=Math.round(Math.min((a-i)/j,c)),j=(a-i)/k,w=i,S=a):b?(w=g?i:w,S=v?a:S,k=l-1,j=(S-w)/k):(k=(S-w)/j,k=yd(k,Math.round(k),j/1e3)?Math.round(k):Math.ceil(k));const C=Math.max(_d(j),_d(w));y=Math.pow(10,Hu(s)?C:s),w=Math.round(w*y)/y,S=Math.round(S*y)/y;let _=0;for(g&&(d&&w!==i?(n.push({value:i}),w<i&&_++,yd(Math.round((w+_*j)*y)/y,i,Gg(i,x,e))&&_++):w<i&&_++);_<k;++_){const e=Math.round((w+_*j)*y)/y;if(v&&e>a)break;n.push({value:e})}return v&&d&&S!==a?n.length&&yd(n[n.length-1].value,a,Gg(a,x,e))?n[n.length-1].value=a:n.push({value:a}):v&&S!==a||n.push({value:S}),n}function Gg(e,t,n){let{horizontal:r,minRotation:o}=n;const i=jd(o),a=(r?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}l(Xg,"id","category"),l(Xg,"defaults",{ticks:{callback:Kg}});class Qg extends sm{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return Hu(e)||("number"===typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const i=e=>r=t?r:e,a=e=>o=n?o:e;if(e){const e=xd(r),t=xd(o);e<0&&t<0?a(0):e>0&&t>0&&i(0)}if(r===o){let t=0===o?1:Math.abs(.05*o);a(o+t),e||i(r-t)}this.min=r,this.max=o}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:n,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(r," would result generating up to ").concat(t," ticks. Limiting to 1000.")),t=1e3)):(t=this.computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=Yg({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&kd(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return nh(e,this.chart.options.locale,this.options.ticks.format)}}class Jg extends Qg{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=qu(e)?e:0,this.max=qu(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=jd(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}l(Jg,"id","linear"),l(Jg,"defaults",{ticks:{callback:oh.formatters.numeric}});const Zg=e=>Math.floor(bd(e)),ev=(e,t)=>Math.pow(10,Zg(e)+t);function tv(e){return 1===e/Math.pow(10,Zg(e))}function nv(e,t,n){const r=Math.pow(10,n),o=Math.floor(e/r);return Math.ceil(t/r)-o}function rv(e,t){let{min:n,max:r}=t;n=$u(e.min,n);const o=[],i=Zg(n);let a=function(e,t){let n=Zg(t-e);for(;nv(e,t,n)>10;)n++;for(;nv(e,t,n)<10;)n--;return Math.min(n,Zg(e))}(n,r),s=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=i>a?Math.pow(10,i):0,u=Math.round((n-c)*s)/s,d=Math.floor((n-c)/l/10)*l*10;let h=Math.floor((u-d)/Math.pow(10,a)),p=$u(e.min,Math.round((c+d+h*Math.pow(10,a))*s)/s);for(;p<r;)o.push({value:p,major:tv(p),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,s=a>=0?1:s),p=Math.round((c+d+h*Math.pow(10,a))*s)/s;const f=$u(e.max,p);return o.push({value:f,major:tv(f),significand:h}),o}class ov extends sm{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const n=Qg.prototype.parse.apply(this,[e,t]);if(0!==n)return qu(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=qu(e)?Math.max(0,e):null,this.max=qu(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!qu(this._userMin)&&(this.min=e===ev(this.min,0)?ev(this.min,-1):ev(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let n=this.min,r=this.max;const o=t=>n=e?n:t,i=e=>r=t?r:e;n===r&&(n<=0?(o(1),i(10)):(o(ev(n,-1)),i(ev(r,1)))),n<=0&&o(ev(r,-1)),r<=0&&i(ev(n,1)),this.min=n,this.max=r}buildTicks(){const e=this.options,t=rv({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&kd(t,this,"value"),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return void 0===e?"0":nh(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=bd(e),this._valueRange=bd(this.max)-bd(e)}getPixelForValue(e){return void 0!==e&&0!==e||(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(bd(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function iv(e){const t=e.ticks;if(t.display&&e.display){const e=Oh(t.backdropPadding);return Ku(t.font&&t.font.size,uh.font.size)+e.height}return 0}function av(e,t,n,r,o){return e===r||e===o?{start:t-n/2,end:t+n/2}:e<r||e>o?{start:t-n,end:t}:{start:t,end:t+n}}function sv(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],o=[],i=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?ud/i:0;for(let d=0;d<i;d++){const i=a.setContext(e.getPointLabelContext(d));o[d]=i.padding;const h=e.getPointPosition(d,e.drawingArea+o[d],s),p=Th(i.font),f=(l=e.ctx,c=p,u=Vu(u=e._pointLabels[d])?u:[u],{w:hh(l,c.string,u),h:u.length*c.lineHeight});r[d]=f;const m=Rd(e.getIndexAngle(d)+s),g=Math.round(Cd(m));lv(n,t,m,av(g,h.x,f.w,0,180),av(g,h.y,f.h,90,270))}var l,c,u;e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=function(e,t,n){const r=[],o=e._pointLabels.length,i=e.options,{centerPointLabels:a,display:s}=i.pointLabels,l={extra:iv(i)/2,additionalAngle:a?ud/o:0};let c;for(let u=0;u<o;u++){l.padding=n[u],l.size=t[u];const o=cv(e,u,l);r.push(o),"auto"===s&&(o.visible=uv(o,c),o.visible&&(c=o))}return r}(e,r,o)}function lv(e,t,n,r,o){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/i,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/i,e.r=Math.max(e.r,t.r+s)),o.start<t.t?(l=(t.t-o.start)/a,e.t=Math.min(e.t,t.t-l)):o.end>t.b&&(l=(o.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function cv(e,t,n){const r=e.drawingArea,{extra:o,additionalAngle:i,padding:a,size:s}=n,l=e.getPointPosition(t,r+o+a,i),c=Math.round(Cd(Rd(l.angle+md))),u=function(e,t,n){90===n||270===n?e-=t/2:(n>270||n<90)&&(e-=t);return e}(l.y,s.h,c),d=function(e){if(0===e||180===e)return"center";if(e<180)return"left";return"right"}(c),h=function(e,t,n){"right"===n?e-=t:"center"===n&&(e-=t/2);return e}(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function uv(e,t){if(!t)return!0;const{left:n,top:r,right:o,bottom:i}=e;return!(vh({x:n,y:r},t)||vh({x:n,y:i},t)||vh({x:o,y:r},t)||vh({x:o,y:i},t))}function dv(e,t,n){const{left:r,top:o,right:i,bottom:a}=n,{backdropColor:s}=t;if(!Hu(s)){const n=Ph(t.borderRadius),l=Oh(t.backdropPadding);e.fillStyle=s;const c=r-l.left,u=o-l.top,d=i-r+l.width,h=a-o+l.height;Object.values(n).some((e=>0!==e))?(e.beginPath(),Ch(e,{x:c,y:u,w:d,h:h,radius:n}),e.fill()):e.fillRect(c,u,d,h)}}function hv(e,t,n,r){const{ctx:o}=e;if(n)o.arc(e.xCenter,e.yCenter,t,0,dd);else{let n=e.getPointPosition(0,t);o.moveTo(n.x,n.y);for(let i=1;i<r;i++)n=e.getPointPosition(i,t),o.lineTo(n.x,n.y)}}l(ov,"id","logarithmic"),l(ov,"defaults",{ticks:{callback:oh.formatters.logarithmic,major:{enabled:!0}}});class pv extends Qg{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Oh(iv(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=qu(e)&&!isNaN(e)?e:0,this.max=qu(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/iv(this.options))}generateTickLabels(e){Qg.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map(((e,t)=>{const n=Yu(this.options.pointLabels.callback,[e,t],this);return n||0===n?n:""})).filter(((e,t)=>this.chart.getDataVisibility(t)))}fit(){const e=this.options;e.display&&e.pointLabels.display?sv(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){return Rd(e*(dd/(this._pointLabels.length||1))+jd(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(Hu(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(Hu(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const n=t[e];return function(e,t,n){return Lh(e,{label:n,index:t,type:"pointLabel"})}(this.getContext(),e,n)}}getPointPosition(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.getIndexAngle(e)-md+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:n,right:r,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),hv(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:n,grid:r,border:o}=t,i=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&function(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let o=t-1;o>=0;o--){const t=e._pointLabelItems[o];if(!t.visible)continue;const i=r.setContext(e.getPointLabelContext(o));dv(n,i,t);const a=Th(i.font),{x:s,y:l,textAlign:c}=t;jh(n,e._pointLabels[o],s,l+a.lineHeight/2,a,{color:i.color,textAlign:c,textBaseline:"middle"})}}(this,i),r.display&&this.ticks.forEach(((e,t)=>{if(0!==t||0===t&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);const n=this.getContext(t),a=r.setContext(n),l=o.setContext(n);!function(e,t,n,r,o){const i=e.ctx,a=t.circular,{color:s,lineWidth:l}=t;!a&&!r||!s||!l||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=l,i.setLineDash(o.dash||[]),i.lineDashOffset=o.dashOffset,i.beginPath(),hv(e,n,a,r),i.closePath(),i.stroke(),i.restore())}(this,a,s,i,l)}})),n.display){for(e.save(),a=i-1;a>=0;a--){const r=n.setContext(this.getPointLabelContext(a)),{color:o,lineWidth:i}=r;i&&o&&(e.lineWidth=i,e.strokeStyle=o,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),l=this.getPointPosition(a,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let o,i;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach(((r,a)=>{if(0===a&&this.min>=0&&!t.reverse)return;const s=n.setContext(this.getContext(a)),l=Th(s.font);if(o=this.getDistanceFromCenterForValue(this.ticks[a].value),s.showLabelBackdrop){e.font=l.string,i=e.measureText(r.label).width,e.fillStyle=s.backdropColor;const t=Oh(s.backdropPadding);e.fillRect(-i/2-t.left,-o-l.size/2-t.top,i+t.width,l.size+t.height)}jh(e,r.label,0,-o,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})})),e.restore()}drawTitle(){}}l(pv,"id","radialLinear"),l(pv,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:oh.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5,centerPointLabels:!1}}),l(pv,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),l(pv,"descriptors",{angleLines:{_fallback:"grid"}});const fv={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},mv=Object.keys(fv);function gv(e,t){return e-t}function vv(e,t){if(Hu(t))return null;const n=e._adapter,{parser:r,round:o,isoWeekday:i}=e._parseOpts;let a=t;return"function"===typeof r&&(a=r(a)),qu(a)||(a="string"===typeof r?n.parse(a,r):n.parse(a)),null===a?null:(o&&(a="week"!==o||!Sd(i)&&!0!==i?n.startOf(a,o):n.startOf(a,"isoWeek",i)),+a)}function bv(e,t,n,r){const o=mv.length;for(let i=mv.indexOf(e);i<o-1;++i){const e=fv[mv[i]],o=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((n-t)/(o*e.size))<=r)return mv[i]}return mv[o-1]}function xv(e,t,n){if(n){if(n.length){const{lo:r,hi:o}=Nd(n,t);e[n[r]>=t?n[r]:n[o]]=!0}}else e[t]=!0}function yv(e,t,n){const r=[],o={},i=t.length;let a,s;for(a=0;a<i;++a)s=t[a],o[s]=a,r.push({value:s,major:!1});return 0!==i&&n?function(e,t,n,r){const o=e._adapter,i=+o.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=i;s<=a;s=+o.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}(e,r,o,n):r}class wv extends sm{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.time||(e.time={}),r=this._adapter=new pf(e.adapters.date);r.init(t),nd(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:vv(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,n=e.time.unit||"day";let{min:r,max:o,minDefined:i,maxDefined:a}=this.getUserBounds();function s(e){i||isNaN(e.min)||(r=Math.min(r,e.min)),a||isNaN(e.max)||(o=Math.max(o,e.max))}i&&a||(s(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||s(this.getMinMax(!1))),r=qu(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),o=qu(o)&&!isNaN(o)?o:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this.options,t=e.time,n=e.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,i=function(e,t,n){let r=0,o=e.length;for(;r<o&&e[r]<t;)r++;for(;o>r&&e[o-1]>n;)o--;return r>0||o<e.length?e.slice(r,o):e}(r,o,this.max);return this._unit=t.unit||(n.autoSkip?bv(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(e,t,n,r,o){for(let i=mv.length-1;i>=mv.indexOf(n);i--){const n=mv[i];if(fv[n].common&&e._adapter.diff(o,r,n)>=t-1)return n}return mv[n?mv.indexOf(n):0]}(this,i.length,t.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(e){for(let t=mv.indexOf(e)+1,n=mv.length;t<n;++t)if(fv[mv[t]].common)return mv[t]}(this._unit):void 0,this.initOffsets(r),e.reverse&&i.reverse(),yv(this,i,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((e=>+e.value)))}initOffsets(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=0,o=0;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),r=1===n.length?1-e:(this.getDecimalForValue(n[1])-e)/2,t=this.getDecimalForValue(n[n.length-1]),o=1===n.length?t:(t-this.getDecimalForValue(n[n.length-2]))/2);const i=n.length<3?.5:.25;r=Od(r,0,i),o=Od(o,0,i),this._offsets={start:r,end:o,factor:1/(r+1+o)}}_generate(){const e=this._adapter,t=this.min,n=this.max,r=this.options,o=r.time,i=o.unit||bv(o.minUnit,t,n,this._getLabelCapacity(t)),a=Ku(r.ticks.stepSize,1),s="week"===i&&o.isoWeekday,l=Sd(s)||!0===s,c={};let u,d,h=t;if(l&&(h=+e.startOf(h,"isoWeek",s)),h=+e.startOf(h,l?"day":i),e.diff(n,t,i)>1e5*a)throw new Error(t+" and "+n+" are too far apart with stepSize of "+a+" "+i);const p="data"===r.ticks.source&&this.getDataTimestamps();for(u=h,d=0;u<n;u=+e.add(u,a,i),d++)xv(c,u,p);return u!==n&&"ticks"!==r.bounds&&1!==d||xv(c,u,p),Object.keys(c).sort(gv).map((e=>+e))}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){const n=this.options.time.displayFormats,r=this._unit,o=t||n[r];return this._adapter.format(e,o)}_tickFormatFunction(e,t,n,r){const o=this.options,i=o.ticks.callback;if(i)return Yu(i,[e,t,n],this);const a=o.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&a[s],u=l&&a[l],d=n[t],h=l&&u&&d&&d.major;return this._adapter.format(e,r||(h?u:c))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t<n;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,n=this.ctx.measureText(e).width,r=jd(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(r),i=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*i,h:n*i+a*o}}_getLabelCapacity(e){const t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,o=this._tickFormatFunction(e,0,yv(this,[e],this._majorUnit),r),i=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return a>0?a:1}getDataTimestamps(){let e,t,n=this._cache.data||[];if(n.length)return n;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,t=r.length;e<t;++e)n=n.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const e=this._cache.labels||[];let t,n;if(e.length)return e;const r=this.getLabels();for(t=0,n=r.length;t<n;++t)e.push(vv(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Fd(e.sort(gv))}}function Sv(e,t,n){let r,o,i,a,s=0,l=e.length-1;n?(t>=e[s].pos&&t<=e[l].pos&&({lo:s,hi:l}=Ld(e,"pos",t)),({pos:r,time:i}=e[s]),({pos:o,time:a}=e[l])):(t>=e[s].time&&t<=e[l].time&&({lo:s,hi:l}=Ld(e,"time",t)),({time:r,pos:i}=e[s]),({time:o,pos:a}=e[l]));const c=o-r;return c?i+(a-i)*(t-r)/c:i}l(wv,"id","time"),l(wv,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});class kv extends wv{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Sv(t,this.min),this._tableRange=Sv(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:n}=this,r=[],o=[];let i,a,s,l,c;for(i=0,a=e.length;i<a;++i)l=e[i],l>=t&&l<=n&&r.push(l);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(i=0,a=r.length;i<a;++i)c=r[i+1],s=r[i-1],l=r[i],Math.round((c+s)/2)!==l&&o.push({time:l,pos:i/(a-1)});return o}_generate(){const e=this.min,t=this.max;let n=super.getDataTimestamps();return n.includes(e)&&n.length||n.splice(0,0,e),n.includes(t)&&1!==n.length||n.push(t),n.sort(((e,t)=>e-t))}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(Sv(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return Sv(this._table,n*this._tableRange+this._minPos,!0)}}l(kv,"id","timeseries"),l(kv,"defaults",wv.defaults);const jv=["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"],Cv="label";function _v(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function Av(e,t){e.labels=t}function Ev(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cv;const r=[];e.datasets=t.map((t=>{const o=e.datasets.find((e=>e[n]===t[n]));return o&&t.data&&!r.includes(o)?(r.push(o),Object.assign(o,t),o):u({},t)}))}function Mv(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cv;const n={labels:[],datasets:[]};return Av(n,e.labels),Ev(n,e.datasets,t),n}function Rv(e,t){const{height:n=150,width:o=300,redraw:i=!1,datasetIdKey:a,type:s,data:l,options:c,plugins:d=[],fallbackContent:h,updateMode:p}=e,f=or(e,jv),m=(0,r.useRef)(null),g=(0,r.useRef)(null),v=()=>{m.current&&(g.current=new zm(m.current,{type:s,data:Mv(l,a),options:c&&u({},c),plugins:d}),_v(t,g.current))},b=()=>{_v(t,null),g.current&&(g.current.destroy(),g.current=null)};return(0,r.useEffect)((()=>{!i&&g.current&&c&&function(e,t){const n=e.options;n&&t&&Object.assign(n,t)}(g.current,c)}),[i,c]),(0,r.useEffect)((()=>{!i&&g.current&&Av(g.current.config.data,l.labels)}),[i,l.labels]),(0,r.useEffect)((()=>{!i&&g.current&&l.datasets&&Ev(g.current.config.data,l.datasets,a)}),[i,l.datasets]),(0,r.useEffect)((()=>{g.current&&(i?(b(),setTimeout(v)):g.current.update(p))}),[i,c,l.labels,l.datasets,p]),(0,r.useEffect)((()=>{g.current&&(b(),setTimeout(v))}),[s]),(0,r.useEffect)((()=>(v(),()=>b())),[]),r.createElement("canvas",u({ref:m,role:"img",height:n,width:o},f),h)}const Pv=(0,r.forwardRef)(Rv);function Ov(e,t){return zm.register(t),(0,r.forwardRef)(((t,n)=>r.createElement(Pv,u(u({},t),{},{ref:n,type:e}))))}const Tv=Ov("line",af);function Nv(){const e=Ei(ja);return e[fa]||e}const Lv=r.createContext();function Iv(e){return ga("MuiGrid",e)}const zv=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Dv=va("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>"spacing-xs-".concat(e))),...["column-reverse","column","row-reverse","row"].map((e=>"direction-xs-".concat(e))),...["nowrap","wrap-reverse","wrap"].map((e=>"wrap-xs-".concat(e))),...zv.map((e=>"grid-xs-".concat(e))),...zv.map((e=>"grid-sm-".concat(e))),...zv.map((e=>"grid-md-".concat(e))),...zv.map((e=>"grid-lg-".concat(e))),...zv.map((e=>"grid-xl-".concat(e)))]),Fv=Dv,Bv=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Wv(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function Hv(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach((e=>{""===r&&0!==n[e]&&(r=e)}));const o=Object.keys(t).sort(((e,n)=>t[e]-t[n]));return o.slice(0,o.indexOf(r))}const Vv=Aa("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n["spacing-xs-".concat(String(e))]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n["spacing-".concat(t,"-").concat(String(o))])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t["grid-".concat(e,"-").concat(String(r))])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t["direction-xs-".concat(String(o))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...d]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})}),(function(e){let{theme:t,ownerState:n}=e;const r=(0,fl.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,fl.NI)({theme:t},r,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(Fv.item)]={maxWidth:"none"}),t}))}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:o}=n;let i={};if(r&&0!==o){const e=(0,fl.kW)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=Hv({breakpoints:t.breakpoints.values,values:e})),i=(0,fl.NI)({theme:t},e,((e,r)=>{var o;const i=t.spacing(e);return"0px"!==i?{marginTop:"-".concat(Wv(i)),["& > .".concat(Fv.item)]:{paddingTop:Wv(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,["& > .".concat(Fv.item)]:{paddingTop:0}}}))}return i}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:o}=n;let i={};if(r&&0!==o){const e=(0,fl.kW)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=Hv({breakpoints:t.breakpoints.values,values:e})),i=(0,fl.NI)({theme:t},e,((e,r)=>{var o;const i=t.spacing(e);return"0px"!==i?{width:"calc(100% + ".concat(Wv(i),")"),marginLeft:"-".concat(Wv(i)),["& > .".concat(Fv.item)]:{paddingLeft:Wv(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(Fv.item)]:{paddingLeft:0}}}))}return i}),(function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce(((e,o)=>{let i={};if(r[o]&&(t=r[o]),!t)return e;if(!0===t)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,fl.kW)({values:r.columns,breakpoints:n.breakpoints.values}),s="object"===typeof a?a[o]:a;if(void 0===s||null===s)return e;const l="".concat(Math.round(t/s*1e8)/1e6,"%");let c={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(l," + ").concat(Wv(e),")");c={flexBasis:t,maxWidth:t}}}i=(0,bi.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===n.breakpoints.values[o]?Object.assign(e,i):e[n.breakpoints.up(o)]=i,e}),{})}));const Uv=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return["spacing-xs-".concat(String(e))];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e="spacing-".concat(t,"-").concat(String(r));n.push(e)}})),n}(i,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push("grid-".concat(t,"-").concat(String(n)))}));return Sa({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==a&&"wrap-xs-".concat(String(a)),...u]},Iv,t)},qv=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiGrid"}),{breakpoints:o}=Nv(),i=(0,ki.A)(n),{className:a,columns:s,columnSpacing:l,component:c="div",container:u=!1,direction:d="row",item:h=!1,rowSpacing:p,spacing:f=0,wrap:m="wrap",zeroMinWidth:g=!1}=i,v=(0,rr.A)(i,Bv),b=p||f,x=l||f,y=r.useContext(Lv),w=u?s||12:y,S={},k=(0,bi.A)({},v);o.keys.forEach((e=>{null!=v[e]&&(S[e]=v[e],delete k[e])}));const j=(0,bi.A)({},i,{columns:w,container:u,direction:d,item:h,rowSpacing:b,columnSpacing:x,wrap:m,zeroMinWidth:g,spacing:f},S,{breakpoints:o.keys}),C=Uv(j);return(0,Mi.jsx)(Lv.Provider,{value:w,children:(0,Mi.jsx)(Vv,(0,bi.A)({ownerState:j,className:yi(C.root,a),as:c,ref:t},k))})}));const $v=qv;function Kv(e){return ga("MuiCard",e)}va("MuiCard",["root"]);const Xv=["className","raised"],Yv=Aa(Ia,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),Gv=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiCard"}),{className:r,raised:o=!1}=n,i=(0,rr.A)(n,Xv),a=(0,bi.A)({},n,{raised:o}),s=(e=>{const{classes:t}=e;return Sa({root:["root"]},Kv,t)})(a);return(0,Mi.jsx)(Yv,(0,bi.A)({className:yi(s.root,r),elevation:o?8:void 0,ref:t,ownerState:a},i))}));function Qv(e){return ga("MuiCardContent",e)}va("MuiCardContent",["root"]);const Jv=["className","component"],Zv=Aa("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),eb=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiCardContent"}),{className:r,component:o="div"}=n,i=(0,rr.A)(n,Jv),a=(0,bi.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return Sa({root:["root"]},Qv,t)})(a);return(0,Mi.jsx)(Zv,(0,bi.A)({as:o,className:yi(s.root,r),ownerState:a,ref:t},i))}));zm.register(Xg,Jg,eg,Jm,Rg,qg,Eg,wv);const tb=e=>{let{processId:t,initialData:n}=e;const[o,i]=(0,r.useState)([]),[a,s]=(0,r.useState)(!0),[l,c]=(0,r.useState)("");(0,r.useEffect)((()=>{n&&n.monit&&i([{timestamp:Date.now(),cpu:n.monit.cpu,memory:n.monit.memory}]);const e=setInterval((async()=>{try{const e=await nr.get("/api/process/".concat(t,"/stats"));e.data&&e.data.monit&&i((t=>{const n=[...t,{timestamp:Date.now(),cpu:e.data.monit.cpu,memory:e.data.monit.memory}];return n.length>20?n.slice(n.length-20):n})),s(!1)}catch(AR){console.error("Error fetching metrics:",AR),c("Failed to fetch metrics: ".concat(AR instanceof Error?AR.message:"Unknown error")),s(!1)}}),2e3);return()=>{clearInterval(e)}}),[t,n]);const u=o.length>0?o[o.length-1].cpu:n.monit?n.monit.cpu:0,d=o.length>0?o[o.length-1].memory:n.monit?n.monit.memory:0,h={labels:o.map((e=>new Date(e.timestamp).toLocaleTimeString())),datasets:[{label:"CPU Usage (%)",data:o.map((e=>e.cpu)),fill:!1,borderColor:"rgb(75, 192, 192)",tension:.1}]},p={labels:o.map((e=>new Date(e.timestamp).toLocaleTimeString())),datasets:[{label:"Memory Usage (MB)",data:o.map((e=>e.memory/1048576)),fill:!1,borderColor:"rgb(255, 99, 132)",tension:.1}]};return(0,Mi.jsxs)(wa,{children:[(0,Mi.jsxs)($v,{container:!0,spacing:2,sx:{mb:3},children:[(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,children:(0,Mi.jsx)(Gv,{variant:"outlined",children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",color:"text.secondary",children:"Current CPU Usage"}),(0,Mi.jsxs)(Ol,{variant:"h4",color:"primary",children:[u.toFixed(1),"%"]})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,children:(0,Mi.jsx)(Gv,{variant:"outlined",children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",color:"text.secondary",children:"Current Memory Usage"}),(0,Mi.jsx)(Ol,{variant:"h4",color:"primary",children:(e=>{if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])})(d)})]})})})]}),(0,Mi.jsxs)($v,{container:!0,spacing:3,children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsxs)(Ia,{variant:"outlined",sx:{p:2},children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",gutterBottom:!0,color:"text.secondary",children:"CPU Usage Over Time"}),(0,Mi.jsx)(wa,{sx:{height:250},children:(0,Mi.jsx)(Tv,{data:h,options:{responsive:!0,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0,suggestedMax:100}}}})})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsxs)(Ia,{variant:"outlined",sx:{p:2},children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",gutterBottom:!0,color:"text.secondary",children:"Memory Usage Over Time"}),(0,Mi.jsx)(wa,{sx:{height:250},children:(0,Mi.jsx)(Tv,{data:p,options:{responsive:!0,maintainAspectRatio:!1}})})]})})]})]})},nb=["className","component","disableGutters","fixed","maxWidth","classes"],rb=(0,ji.A)(),ob=hl("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat((0,za.A)(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),ib=e=>pl({props:e,name:"MuiContainer",defaultTheme:rb});const ab=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=ob,useThemeProps:n=ib,componentName:o="MuiContainer"}=e,i=t((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}})}),(e=>{let{theme:t,ownerState:n}=e;return n.fixed&&Object.keys(t.breakpoints.values).reduce(((e,n)=>{const r=n,o=t.breakpoints.values[r];return 0!==o&&(e[t.breakpoints.up(r)]={maxWidth:"".concat(o).concat(t.breakpoints.unit)}),e}),{})}),(e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},"xs"===n.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},n.maxWidth&&"xs"!==n.maxWidth&&{[t.breakpoints.up(n.maxWidth)]:{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit)}})})),a=r.forwardRef((function(e,t){const r=n(e),{className:a,component:s="div",disableGutters:l=!1,fixed:c=!1,maxWidth:u="lg"}=r,d=(0,rr.A)(r,nb),h=(0,bi.A)({},r,{component:s,disableGutters:l,fixed:c,maxWidth:u}),p=((e,t)=>{const{classes:n,fixed:r,disableGutters:o,maxWidth:i}=e;return Sa({root:["root",i&&"maxWidth".concat((0,za.A)(String(i))),r&&"fixed",o&&"disableGutters"]},(e=>ga(t,e)),n)})(h,o);return(0,Mi.jsx)(i,(0,bi.A)({as:s,ownerState:h,className:yi(p.root,a),ref:t},d))}));return a}({createStyledComponent:Aa("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat(Da(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Oa({props:e,name:"MuiContainer"})}),sb=ab,lb=Jl((0,Mi.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function cb(e){return ga("MuiChip",e)}const ub=va("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),db=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],hb=Aa("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{["& .".concat(ub.avatar)]:t.avatar},{["& .".concat(ub.avatar)]:t["avatar".concat(Da(s))]},{["& .".concat(ub.avatar)]:t["avatarColor".concat(Da(r))]},{["& .".concat(ub.icon)]:t.icon},{["& .".concat(ub.icon)]:t["icon".concat(Da(s))]},{["& .".concat(ub.icon)]:t["iconColor".concat(Da(o))]},{["& .".concat(ub.deleteIcon)]:t.deleteIcon},{["& .".concat(ub.deleteIcon)]:t["deleteIcon".concat(Da(s))]},{["& .".concat(ub.deleteIcon)]:t["deleteIconColor".concat(Da(r))]},{["& .".concat(ub.deleteIcon)]:t["deleteIcon".concat(Da(l),"Color").concat(Da(r))]},t.root,t["size".concat(Da(s))],t["color".concat(Da(r))],i&&t.clickable,i&&"default"!==r&&t["clickableColor".concat(Da(r),")")],a&&t.deletable,a&&"default"!==r&&t["deletableColor".concat(Da(r))],t[l],t["".concat(l).concat(Da(r))]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,bi.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(ub.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(ub.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},["& .".concat(ub.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(ub.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(ub.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(ub.icon)]:(0,bi.A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,bi.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),["& .".concat(ub.deleteIcon)]:(0,bi.A)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,zi.X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,zi.X4)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?"rgba(".concat(t.vars.palette[n.color].contrastTextChannel," / 0.7)"):(0,zi.X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{["&.".concat(ub.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{["&.".concat(ub.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(ub.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{["&:hover, &.".concat(ub.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(ub.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(ub.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(ub.avatar)]:{marginLeft:4},["& .".concat(ub.avatarSmall)]:{marginLeft:2},["& .".concat(ub.icon)]:{marginLeft:4},["& .".concat(ub.iconSmall)]:{marginLeft:2},["& .".concat(ub.deleteIcon)]:{marginRight:5},["& .".concat(ub.deleteIconSmall)]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,zi.X4)(t.palette[n.color].main,.7)),["&.".concat(ub.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},["&.".concat(ub.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},["& .".concat(ub.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,zi.X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})})),pb=Aa("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t["label".concat(Da(r))]]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})}));function fb(e){return"Backspace"===e.key||"Delete"===e.key}const mb=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:h,onClick:p,onDelete:f,onKeyDown:m,onKeyUp:g,size:v="medium",variant:b="filled",tabIndex:x,skipFocusWhenDisabled:y=!1}=n,w=(0,rr.A)(n,db),S=r.useRef(null),k=Ya(S,t),j=e=>{e.stopPropagation(),f&&f(e)},C=!(!1===a||!p)||a,_=C||f?$s:l||"div",A=(0,bi.A)({},n,{component:_,disabled:u,size:v,color:s,iconColor:r.isValidElement(d)&&d.props.color||s,onDelete:!!f,clickable:C,variant:b}),E=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return Sa({root:["root",l,n&&"disabled","size".concat(Da(r)),"color".concat(Da(o)),s&&"clickable",s&&"clickableColor".concat(Da(o)),a&&"deletable",a&&"deletableColor".concat(Da(o)),"".concat(l).concat(Da(o))],label:["label","label".concat(Da(r))],avatar:["avatar","avatar".concat(Da(r)),"avatarColor".concat(Da(o))],icon:["icon","icon".concat(Da(r)),"iconColor".concat(Da(i))],deleteIcon:["deleteIcon","deleteIcon".concat(Da(r)),"deleteIconColor".concat(Da(o)),"deleteIcon".concat(Da(l),"Color").concat(Da(o))]},cb,t)})(A),M=_===$s?(0,bi.A)({component:l||"div",focusVisibleClassName:E.focusVisible},f&&{disableRipple:!0}):{};let R=null;f&&(R=c&&r.isValidElement(c)?r.cloneElement(c,{className:yi(c.props.className,E.deleteIcon),onClick:j}):(0,Mi.jsx)(lb,{className:yi(E.deleteIcon),onClick:j}));let P=null;o&&r.isValidElement(o)&&(P=r.cloneElement(o,{className:yi(E.avatar,o.props.className)}));let O=null;return d&&r.isValidElement(d)&&(O=r.cloneElement(d,{className:yi(E.icon,d.props.className)})),(0,Mi.jsxs)(hb,(0,bi.A)({as:_,className:yi(E.root,i),disabled:!(!C||!u)||void 0,onClick:p,onKeyDown:e=>{e.currentTarget===e.target&&fb(e)&&e.preventDefault(),m&&m(e)},onKeyUp:e=>{e.currentTarget===e.target&&(f&&fb(e)?f(e):"Escape"===e.key&&S.current&&S.current.blur()),g&&g(e)},ref:k,tabIndex:y&&u?-1:x,ownerState:A},M,w,{children:[P||O,(0,Mi.jsx)(pb,{className:yi(E.label),ownerState:A,children:h}),R]}))})),gb=mb;function vb(e){return ga("MuiDivider",e)}const bb=va("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),xb=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],yb=Aa("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,zi.X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})}),(e=>{let{ownerState:t}=e;return(0,bi.A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})}),(e=>{let{ownerState:t}=e;return(0,bi.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})})),wb=Aa("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})})),Sb=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:h="fullWidth"}=n,p=(0,rr.A)(n,xb),f=(0,bi.A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:h}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Sa({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},vb,r)})(f);return(0,Mi.jsx)(yb,(0,bi.A)({as:a,className:yi(m.root,i),role:u,ref:t,ownerState:f},p,{children:o?(0,Mi.jsx)(wb,{className:m.wrapper,ownerState:f,children:o}):null}))}));Sb.muiSkipListHighlight=!0;const kb=Sb,jb=r.createContext();const Cb=()=>{const e=r.useContext(jb);return null!=e&&e},_b=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const Ab=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=e,a=(0,rr.A)(e,_b),s=i?{}:pc(r,o),{props:l,internalRef:c}=gc((0,bi.A)({},a,{externalSlotProps:s})),u=Xa(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return hc(n,(0,bi.A)({},l,{ref:u}),o)};function Eb(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];clearTimeout(t),t=setTimeout((()=>{e.apply(this,o)}),n)}return r.clear=()=>{clearTimeout(t)},r}const Mb=Eb;let Rb;function Pb(){if(Rb)return Rb;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Rb="reverse",e.scrollLeft>0?Rb="default":(e.scrollLeft=1,0===e.scrollLeft&&(Rb="negative")),document.body.removeChild(e),Rb}function Ob(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(Pb()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Tb(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Nb=Ga;function Lb(e){return e&&e.ownerDocument||document}function Ib(e){return Lb(e).defaultView||window}const zb=Ib,Db=["onChange"],Fb={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const Bb=Jl((0,Mi.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Wb=Jl((0,Mi.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Hb(e){return ga("MuiTabScrollButton",e)}const Vb=va("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Ub=["className","slots","slotProps","direction","orientation","disabled"],qb=Aa($s,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({width:40,flexShrink:0,opacity:.8,["&.".concat(Vb.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})})),$b=r.forwardRef((function(e,t){var n,r;const o=Oa({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:s={},direction:l}=o,c=(0,rr.A)(o,Ub),u=Cb(),d=(0,bi.A)({isRtl:u},o),h=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Sa({root:["root",n,r&&"disabled"]},Hb,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:Bb,f=null!=(r=a.EndScrollButtonIcon)?r:Wb,m=Ab({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),g=Ab({elementType:f,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,Mi.jsx)(qb,(0,bi.A)({component:"div",className:yi(h.root,i),ref:t,role:null,ownerState:d,tabIndex:null},c,{children:"left"===l?(0,Mi.jsx)(p,(0,bi.A)({},m)):(0,Mi.jsx)(f,(0,bi.A)({},g))}))}));function Kb(e){return ga("MuiTabs",e)}const Xb=va("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Yb=Lb,Gb=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Qb=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Jb=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Zb=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},ex=Aa("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Xb.scrollButtons)]:t.scrollButtons},{["& .".concat(Xb.scrollButtons)]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(Xb.scrollButtons)]:{[n.breakpoints.down("sm")]:{display:"none"}}})})),tx=Aa("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({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"})})),nx=Aa("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})})),rx=Aa("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})})),ox=Aa((function(e){const{onChange:t}=e,n=(0,rr.A)(e,Db),o=r.useRef(),i=r.useRef(null),a=()=>{o.current=i.current.offsetHeight-i.current.clientHeight};return Nb((()=>{const e=Mb((()=>{const e=o.current;a(),e!==o.current&&t(o.current)})),n=zb(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),r.useEffect((()=>{a(),t(o.current)}),[t]),(0,Mi.jsx)("div",(0,bi.A)({style:Fb},n,{ref:i}))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ix={};const ax=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTabs"}),o=Nv(),i=Cb(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:h="div",allowScrollButtonsMobile:p=!1,indicatorColor:f="primary",onChange:m,orientation:g="horizontal",ScrollButtonComponent:v=$b,scrollButtons:b="auto",selectionFollowsFocus:x,slots:y={},slotProps:w={},TabIndicatorProps:S={},TabScrollButtonProps:k={},textColor:j="primary",value:C,variant:_="standard",visibleScrollbar:A=!1}=n,E=(0,rr.A)(n,Gb),M="scrollable"===_,R="vertical"===g,P=R?"scrollTop":"scrollLeft",O=R?"top":"left",T=R?"bottom":"right",N=R?"clientHeight":"clientWidth",L=R?"height":"width",I=(0,bi.A)({},n,{component:h,allowScrollButtonsMobile:p,indicatorColor:f,orientation:g,vertical:R,scrollButtons:b,textColor:j,variant:_,visibleScrollbar:A,fixed:!M,hideScrollbar:M&&!A,scrollableX:M&&!R,scrollableY:M&&R,centered:c&&!M,scrollButtonsHideMobile:!p}),z=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Sa({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Kb,l)})(I),D=Ab({elementType:y.StartScrollButtonIcon,externalSlotProps:w.startScrollButtonIcon,ownerState:I}),F=Ab({elementType:y.EndScrollButtonIcon,externalSlotProps:w.endScrollButtonIcon,ownerState:I});const[B,W]=r.useState(!1),[H,V]=r.useState(ix),[U,q]=r.useState(!1),[$,K]=r.useState(!1),[X,Y]=r.useState(!1),[G,Q]=r.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,Z=r.useRef(null),ee=r.useRef(null),te=()=>{const e=Z.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Ob(e,i?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==C){const e=ee.current.children;if(e.length>0){const t=e[J.get(C)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ne=Ja((()=>{const{tabsMeta:e,tabMeta:t}=te();let n,r=0;if(R)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=i?"right":"left",t&&e){const o=i?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(i?-1:1)*(t[n]-e[n]+o)}const o={[n]:r,[L]:t?t[L]:0};if(isNaN(H[n])||isNaN(H[L]))V(o);else{const e=Math.abs(H[n]-o[n]),t=Math.abs(H[L]-o[L]);(e>=1||t>=1)&&V(o)}})),re=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:i=Tb,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=i(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(P,Z.current,e,{duration:o.transitions.duration.standard}):Z.current[P]=e},oe=e=>{let t=Z.current[P];R?t+=e:(t+=e*(i?-1:1),t*=i&&"reverse"===Pb()?-1:1),re(t)},ie=()=>{const e=Z.current[N];let t=0;const n=Array.from(ee.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[N]>e){0===r&&(t=e);break}t+=o[N]}return t},ae=()=>{oe(-1*ie())},se=()=>{oe(ie())},le=r.useCallback((e=>{Q({overflow:null,scrollbarWidth:e})}),[]),ce=Ja((e=>{const{tabsMeta:t,tabMeta:n}=te();if(n&&t)if(n[O]<t[O]){const r=t[P]+(n[O]-t[O]);re(r,{animation:e})}else if(n[T]>t[T]){const r=t[P]+(n[T]-t[T]);re(r,{animation:e})}})),ue=Ja((()=>{M&&!1!==b&&Y(!X)}));r.useEffect((()=>{const e=Mb((()=>{Z.current&&ne()}));let t;const n=n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{var n;null==(n=t)||n.unobserve(e)})),e.addedNodes.forEach((e=>{var n;null==(n=t)||n.observe(e)}))})),e(),ue()},r=zb(Z.current);let o;return r.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ee.current.children).forEach((e=>{t.observe(e)}))),"undefined"!==typeof MutationObserver&&(o=new MutationObserver(n),o.observe(ee.current,{childList:!0})),()=>{var n,i;e.clear(),r.removeEventListener("resize",e),null==(n=o)||n.disconnect(),null==(i=t)||i.disconnect()}}),[ne,ue]),r.useEffect((()=>{const e=Array.from(ee.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&M&&!1!==b){const n=e[0],r=e[t-1],o={root:Z.current,threshold:.99},i=new IntersectionObserver((e=>{q(!e[0].isIntersecting)}),o);i.observe(n);const a=new IntersectionObserver((e=>{K(!e[0].isIntersecting)}),o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}}),[M,b,X,null==u?void 0:u.length]),r.useEffect((()=>{W(!0)}),[]),r.useEffect((()=>{ne()})),r.useEffect((()=>{ce(ix!==H)}),[ce,H]),r.useImperativeHandle(l,(()=>({updateIndicator:ne,updateScrollButtons:ue})),[ne,ue]);const de=(0,Mi.jsx)(rx,(0,bi.A)({},S,{className:yi(z.indicator,S.className),ownerState:I,style:(0,bi.A)({},H,S.style)}));let he=0;const pe=r.Children.map(u,(e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?he:e.props.value;J.set(t,he);const n=t===C;return he+=1,r.cloneElement(e,(0,bi.A)({fullWidth:"fullWidth"===_,indicator:n&&!B&&de,selected:n,selectionFollowsFocus:x,onChange:m,textColor:j,value:t},1!==he||!1!==C||e.props.tabIndex?{}:{tabIndex:0}))})),fe=(()=>{const e={};e.scrollbarSizeListener=M?(0,Mi.jsx)(ox,{onChange:le,className:yi(z.scrollableX,z.hideScrollbar)}):null;const t=M&&("auto"===b&&(U||$)||!0===b);return e.scrollButtonStart=t?(0,Mi.jsx)(v,(0,bi.A)({slots:{StartScrollButtonIcon:y.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:D},orientation:g,direction:i?"right":"left",onClick:ae,disabled:!U},k,{className:yi(z.scrollButtons,k.className)})):null,e.scrollButtonEnd=t?(0,Mi.jsx)(v,(0,bi.A)({slots:{EndScrollButtonIcon:y.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:F},orientation:g,direction:i?"left":"right",onClick:se,disabled:!$},k,{className:yi(z.scrollButtons,k.className)})):null,e})();return(0,Mi.jsxs)(ex,(0,bi.A)({className:yi(z.root,d),ownerState:I,ref:t,as:h},E,{children:[fe.scrollButtonStart,fe.scrollbarSizeListener,(0,Mi.jsxs)(tx,{className:z.scroller,ownerState:I,style:{overflow:G.overflow,[R?"margin".concat(i?"Left":"Right"):"marginBottom"]:A?void 0:-G.scrollbarWidth},ref:Z,children:[(0,Mi.jsx)(nx,{"aria-label":a,"aria-labelledby":s,"aria-orientation":"vertical"===g?"vertical":null,className:z.flexContainer,ownerState:I,onKeyDown:e=>{const t=ee.current,n=Yb(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===g?"ArrowLeft":"ArrowUp",o="horizontal"===g?"ArrowRight":"ArrowDown";switch("horizontal"===g&&i&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),Zb(t,n,Jb);break;case o:e.preventDefault(),Zb(t,n,Qb);break;case"Home":e.preventDefault(),Zb(t,null,Qb);break;case"End":e.preventDefault(),Zb(t,null,Jb)}},ref:ee,role:"tablist",children:pe}),B&&de]}),fe.scrollButtonEnd]}))})),sx=ax;function lx(e){return ga("MuiTab",e)}const cx=va("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),ux=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],dx=Aa($s,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat(Da(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{["& .".concat(cx.iconWrapper)]:t.iconWrapper}]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(cx.iconWrapper)]:(0,bi.A)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,["&.".concat(cx.selected)]:{opacity:1},["&.".concat(cx.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(cx.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(cx.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(cx.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(cx.disabled)]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})})),hx=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:h,onClick:p,onFocus:f,selected:m,selectionFollowsFocus:g,textColor:v="inherit",value:b,wrapped:x=!1}=n,y=(0,rr.A)(n,ux),w=(0,bi.A)({},n,{disabled:i,disableFocusRipple:a,selected:m,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:v,wrapped:x}),S=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e;return Sa({root:["root",i&&a&&"labelIcon","textColor".concat(Da(n)),r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]},lx,t)})(w),k=l&&d&&r.isValidElement(l)?r.cloneElement(l,{className:yi(S.iconWrapper,l.props.className)}):l;return(0,Mi.jsxs)(dx,(0,bi.A)({focusRipple:!a,className:yi(S.root,o),ref:t,role:"tab","aria-selected":m,disabled:i,onClick:e=>{!m&&h&&h(e,b),p&&p(e)},onFocus:e=>{g&&!m&&h&&h(e,b),f&&f(e)},ownerState:w,tabIndex:m?0:-1},y,{children:["top"===c||"start"===c?(0,Mi.jsxs)(r.Fragment,{children:[k,d]}):(0,Mi.jsxs)(r.Fragment,{children:[d,k]}),u]}))})),px=hx,fx=Jl((0,Mi.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),mx=Jl((0,Mi.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),gx=Jl((0,Mi.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop"),vx=Jl((0,Mi.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),bx=Jl((0,Mi.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),xx=["children","value","index"],yx=e=>{let{children:t,value:n,index:r}=e,o=or(e,xx);return(0,Mi.jsx)("div",u(u({role:"tabpanel",hidden:n!==r,id:"process-tabpanel-".concat(r),"aria-labelledby":"process-tab-".concat(r)},o),{},{children:n===r&&(0,Mi.jsx)(wa,{sx:{p:3},children:t})}))},wx=e=>{let{onAction:t}=e;const{id:n}=co(),[o,i]=(0,r.useState)(null),[a,s]=(0,r.useState)(!0),[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(0),h=Nv(),p=lo();(0,r.useEffect)((()=>{const e=async()=>{try{const e=(await nr.get("/api/processes")).data.find((e=>e.pm_id===Number(n)));e?i(e):c("Process with ID ".concat(n," not found"))}catch(AR){console.error("Error fetching process:",AR),c("Failed to fetch process details")}finally{s(!1)}};n&&e();const t=setInterval((()=>{n&&e()}),3e3);return()=>clearInterval(t)}),[n]);const f=e=>{if(!e)return"N/A";return new Date(e).toLocaleString()},m=async e=>{if(o)try{if(t){if(t(o.pm_id,e),"delete"===e)return void p("/")}else await nr.post("/api/process/".concat(o.pm_id,"/").concat(e));const r=(await nr.get("/api/processes")).data.find((e=>e.pm_id===Number(n)));r&&i(r)}catch(AR){console.error("Error performing ".concat(e,":"),AR),c("Failed to ".concat(e," process. ").concat(AR instanceof Error?AR.message:"Unknown error"))}};return a?(0,Mi.jsx)(sb,{maxWidth:"lg",sx:{mt:4},children:(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"50vh"},children:[(0,Mi.jsx)(iu,{}),(0,Mi.jsx)(Ol,{variant:"h6",sx:{ml:2},children:"Loading process details..."})]})}):l?(0,Mi.jsxs)(sb,{maxWidth:"lg",sx:{mt:4},children:[(0,Mi.jsx)(Wc,{severity:"error",sx:{mb:2},children:l}),(0,Mi.jsx)(tl,{variant:"outlined",startIcon:(0,Mi.jsx)(fx,{}),onClick:()=>p("/"),children:"Back to Process List"})]}):o?(0,Mi.jsxs)(sb,{maxWidth:"lg",sx:{mt:4,mb:4},children:[(0,Mi.jsx)(wa,{sx:{mb:2},children:(0,Mi.jsx)(tl,{variant:"outlined",startIcon:(0,Mi.jsx)(fx,{}),onClick:()=>p("/"),sx:{mb:2},children:"Back to Process List"})}),(0,Mi.jsx)(Ia,{variant:"outlined",sx:{mb:3},children:(0,Mi.jsxs)(wa,{sx:{p:3},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center"},children:[(0,Mi.jsx)(Ol,{variant:"h4",children:o.name}),(0,Mi.jsx)(gb,{label:o.pm2_env.status,size:"medium",color:(g=o.pm2_env.status,"online"===g?"success":"stopped"===g?"error":"warning"),sx:{ml:2}})]}),(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(tl,{variant:"contained",color:"primary",startIcon:(0,Mi.jsx)(mx,{}),onClick:()=>m("start"),disabled:"online"===o.pm2_env.status,sx:{mr:1},children:"Start"}),(0,Mi.jsx)(tl,{variant:"contained",color:"error",startIcon:(0,Mi.jsx)(gx,{}),onClick:()=>m("stop"),disabled:"stopped"===o.pm2_env.status,sx:{mr:1},children:"Stop"}),(0,Mi.jsx)(tl,{variant:"contained",color:"warning",startIcon:(0,Mi.jsx)(vx,{}),onClick:()=>m("restart"),sx:{mr:1},children:"Restart"}),(0,Mi.jsx)(tl,{variant:"outlined",color:"error",startIcon:(0,Mi.jsx)(bx,{}),onClick:()=>m("delete"),children:"Delete"})]})]}),(0,Mi.jsx)(kb,{sx:{my:2}}),(0,Mi.jsxs)($v,{container:!0,spacing:3,children:[(0,Mi.jsxs)($v,{item:!0,xs:12,sm:6,md:3,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Process ID"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",children:o.pm_id})]}),(0,Mi.jsxs)($v,{item:!0,xs:12,sm:6,md:3,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"CPU Usage"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",children:o.monit?"".concat(o.monit.cpu,"%"):"N/A"})]}),(0,Mi.jsxs)($v,{item:!0,xs:12,sm:6,md:3,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Memory Usage"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",children:o.monit?(e=>{if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])})(o.monit.memory):"N/A"})]}),(0,Mi.jsxs)($v,{item:!0,xs:12,sm:6,md:3,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Uptime"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",children:o.pm2_env.pm_uptime?f(o.pm2_env.pm_uptime):"N/A"})]})]})]})}),(0,Mi.jsxs)(Ia,{variant:"outlined",children:[(0,Mi.jsx)(wa,{sx:{borderBottom:1,borderColor:"divider"},children:(0,Mi.jsxs)(sx,{value:u,onChange:(e,t)=>{d(t)},"aria-label":"process details tabs",children:[(0,Mi.jsx)(px,{label:"Details",id:"process-tab-0","aria-controls":"process-tabpanel-0"}),(0,Mi.jsx)(px,{label:"Logs",id:"process-tab-1","aria-controls":"process-tabpanel-1"}),(0,Mi.jsx)(px,{label:"Metrics",id:"process-tab-2","aria-controls":"process-tabpanel-2"})]})}),(0,Mi.jsx)(yx,{value:u,index:0,children:(0,Mi.jsxs)($v,{container:!0,spacing:3,children:[(0,Mi.jsxs)($v,{item:!0,xs:12,md:6,children:[(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"Process Information"}),(0,Mi.jsxs)($v,{container:!0,spacing:2,children:[(0,Mi.jsxs)($v,{item:!0,xs:6,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Exec Mode"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",paragraph:!0,children:o.pm2_env.exec_mode||"N/A"})]}),(0,Mi.jsxs)($v,{item:!0,xs:6,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Instances"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",paragraph:!0,children:o.pm2_env.instances||1})]}),(0,Mi.jsxs)($v,{item:!0,xs:6,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Created At"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",paragraph:!0,children:f(o.pm2_env.created_at)})]}),(0,Mi.jsxs)($v,{item:!0,xs:6,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Restarts"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",paragraph:!0,children:o.pm2_env.restart_time})]}),(0,Mi.jsxs)($v,{item:!0,xs:12,children:[(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Script Path"}),(0,Mi.jsx)(Ol,{variant:"body1",fontWeight:"medium",paragraph:!0,sx:{wordBreak:"break-all"},children:o.pm2_env.pm_exec_path})]})]})]}),(0,Mi.jsxs)($v,{item:!0,xs:12,md:6,children:[(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"Environment Variables"}),(0,Mi.jsx)(Ia,{variant:"outlined",sx:{p:2,maxHeight:300,overflow:"auto",bgcolor:"dark"===h.palette.mode?"grey.900":"grey.50"},children:o.pm2_env.env&&Object.keys(o.pm2_env.env).length>0?(0,Mi.jsx)(wa,{component:"pre",sx:{margin:0,fontSize:"0.875rem"},children:JSON.stringify(o.pm2_env.env,null,2)}):(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"No environment variables found."})})]})]})}),(0,Mi.jsx)(yx,{value:u,index:1,children:(0,Mi.jsx)(au,{processId:o.pm_id,processName:o.name})}),(0,Mi.jsx)(yx,{value:u,index:2,children:(0,Mi.jsx)(tb,{processId:o.pm_id,initialData:o})})]})]}):(0,Mi.jsxs)(sb,{maxWidth:"lg",sx:{mt:4},children:[(0,Mi.jsx)(Wc,{severity:"warning",sx:{mb:2},children:"Process not found"}),(0,Mi.jsx)(tl,{variant:"outlined",startIcon:(0,Mi.jsx)(fx,{}),onClick:()=>p("/"),children:"Back to Process List"})]});var g},Sx=e=>{let{metrics:t}=e;const n=e=>{if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])},r=Math.round(t.memory.used/t.memory.total*100);return(0,Mi.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200",children:[(0,Mi.jsx)("div",{className:"px-3 py-2 border-b border-gray-200",children:(0,Mi.jsx)("h2",{className:"text-sm font-semibold text-gray-900",children:"System Metrics"})}),(0,Mi.jsxs)("div",{className:"p-3 space-y-2",children:[(0,Mi.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded-md",children:(0,Mi.jsxs)("div",{className:"flex-1",children:[(0,Mi.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Uptime"}),(0,Mi.jsx)("p",{className:"text-sm font-bold text-gray-900",children:(e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60);let o="";return t>0&&(o+="".concat(t,"d ")),n>0&&(o+="".concat(n,"h ")),o+="".concat(r,"m"),o})(t.uptime)})]})}),(0,Mi.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded-md",children:(0,Mi.jsxs)("div",{className:"flex-1",children:[(0,Mi.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Load Avg"}),(0,Mi.jsx)("p",{className:"text-sm font-bold text-gray-900",children:t.loadAvg[0].toFixed(2)}),(0,Mi.jsxs)("p",{className:"text-xs text-gray-500",children:[t.loadAvg[1].toFixed(2)," \u2022 ",t.loadAvg[2].toFixed(2)]})]})}),(0,Mi.jsxs)("div",{className:"p-2 bg-gray-50 rounded-md",children:[(0,Mi.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Mi.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Memory"}),(0,Mi.jsxs)("p",{className:"text-xs text-gray-500",children:[r,"%"]})]}),(0,Mi.jsx)("p",{className:"text-sm font-bold text-gray-900 mb-1",children:n(t.memory.used)}),(0,Mi.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,Mi.jsx)("div",{className:"h-1.5 rounded-full transition-all duration-300 ".concat(r>80?"bg-red-500":r>60?"bg-yellow-500":"bg-green-500"),style:{width:"".concat(r,"%")}})}),(0,Mi.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["of ",n(t.memory.total)]})]}),(0,Mi.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded-md",children:(0,Mi.jsxs)("div",{className:"flex-1",children:[(0,Mi.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"CPU Cores"}),(0,Mi.jsx)("p",{className:"text-sm font-bold text-gray-900",children:t.cpus})]})})]})]})},kx=["title","titleId"];function jx(e,t){let{title:n,titleId:o}=e,i=or(e,kx);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const Cx=r.forwardRef(jx),_x=["title","titleId"];function Ax(e,t){let{title:n,titleId:o}=e,i=or(e,_x);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Ex=r.forwardRef(Ax),Mx=["title","titleId"];function Rx(e,t){let{title:n,titleId:o}=e,i=or(e,Mx);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))}const Px=r.forwardRef(Rx),Ox=["title","titleId"];function Tx(e,t){let{title:n,titleId:o}=e,i=or(e,Ox);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const Nx=r.forwardRef(Tx),Lx=["title","titleId"];function Ix(e,t){let{title:n,titleId:o}=e,i=or(e,Lx);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const zx=r.forwardRef(Ix),Dx=["title","titleId"];function Fx(e,t){let{title:n,titleId:o}=e,i=or(e,Dx);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const Bx=r.forwardRef(Fx),Wx=e=>{let{processes:t,onAction:n}=e;const r=e=>{if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])};return 0===t.length?(0,Mi.jsxs)("div",{className:"card-premium p-16 text-center animate-fade-in",children:[(0,Mi.jsx)("div",{className:"mx-auto flex items-center justify-center h-20 w-20 rounded-2xl bg-gradient-to-br from-neutral-100 to-neutral-200 dark:from-neutral-800 dark:to-neutral-700 mb-8 shadow-lg",children:(0,Mi.jsx)(Cx,{className:"h-10 w-10 text-neutral-600 dark:text-neutral-400"})}),(0,Mi.jsx)("h3",{className:"text-2xl font-bold text-neutral-900 dark:text-white mb-4 tracking-tight",children:"No PM2 Processes Found"}),(0,Mi.jsx)("p",{className:"text-lg text-neutral-500 dark:text-neutral-400 max-w-md mx-auto leading-relaxed",children:"Make sure PM2 is running and has active processes to display them here."})]}):(0,Mi.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200",children:[(0,Mi.jsx)("div",{className:"px-3 py-2 border-b border-gray-200",children:(0,Mi.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mi.jsx)("h2",{className:"text-sm font-semibold text-gray-900",children:"PM2 Processes"}),(0,Mi.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:t.length})]})}),(0,Mi.jsx)("div",{className:"overflow-x-auto",children:(0,Mi.jsxs)("table",{className:"min-w-full",children:[(0,Mi.jsx)("thead",{className:"bg-gray-50",children:(0,Mi.jsxs)("tr",{children:[(0,Mi.jsx)("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Process"}),(0,Mi.jsx)("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,Mi.jsx)("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Performance"}),(0,Mi.jsx)("th",{className:"px-3 py-2 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),(0,Mi.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:t.map((e=>(0,Mi.jsxs)("tr",{className:"hover:bg-gray-50 group",children:[(0,Mi.jsx)("td",{className:"px-3 py-2",children:(0,Mi.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mi.jsx)("div",{className:"w-6 h-6 bg-blue-100 rounded-md flex items-center justify-center",children:(0,Mi.jsx)("span",{className:"text-blue-600 font-semibold text-xs",children:e.pm_id})}),(0,Mi.jsx)("div",{children:(0,Mi.jsx)("div",{className:"text-xs font-medium text-gray-900",children:e.name})})]})}),(0,Mi.jsx)("td",{className:"px-3 py-2",children:(0,Mi.jsxs)("span",{className:"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-full ".concat("online"===e.pm2_env.status?"bg-green-100 text-green-800":"stopped"===e.pm2_env.status?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"),children:[(0,Mi.jsx)("div",{className:"w-1 h-1 rounded-full mr-1 ".concat("online"===e.pm2_env.status?"bg-green-500":"stopped"===e.pm2_env.status?"bg-red-500":"bg-yellow-500")}),e.pm2_env.status]})}),(0,Mi.jsx)("td",{className:"px-3 py-2",children:(0,Mi.jsxs)("div",{className:"space-y-1",children:[(0,Mi.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mi.jsx)("span",{className:"text-xs text-gray-500",children:"CPU:"}),(0,Mi.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Mi.jsx)("div",{className:"w-12 h-1.5 bg-gray-200 rounded-full overflow-hidden",children:(0,Mi.jsx)("div",{className:"h-full bg-blue-500 rounded-full transition-all duration-300",style:{width:"".concat(e.monit?Math.min(e.monit.cpu,100):0,"%")}})}),(0,Mi.jsx)("span",{className:"text-xs font-medium text-gray-900 min-w-[2rem]",children:e.monit?"".concat(e.monit.cpu,"%"):"N/A"})]})]}),(0,Mi.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Mi.jsx)("span",{className:"text-xs text-gray-500",children:"RAM:"}),(0,Mi.jsx)("span",{className:"text-xs font-medium text-gray-900",children:e.monit?r(e.monit.memory):"N/A"})]})]})}),(0,Mi.jsx)("td",{className:"px-3 py-2",children:(0,Mi.jsxs)("div",{className:"flex items-center justify-end space-x-1 opacity-0 group-hover:opacity-100 transition-all duration-200",children:[(0,Mi.jsx)(ui,{to:"/process/".concat(e.pm_id),className:"inline-flex items-center justify-center w-6 h-6 rounded-md bg-blue-100 hover:bg-blue-200 text-blue-600 hover:text-blue-700 transition-all duration-150",title:"Details",children:(0,Mi.jsx)(Cx,{className:"h-3 w-3"})}),"online"===e.pm2_env.status?(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsx)("button",{onClick:()=>n(e.pm_id,"restart"),className:"inline-flex items-center justify-center w-6 h-6 rounded-md bg-yellow-100 hover:bg-yellow-200 text-yellow-600 hover:text-yellow-700 transition-all duration-150",title:"Restart",children:(0,Mi.jsx)(Ex,{className:"h-3 w-3"})}),(0,Mi.jsx)("button",{onClick:()=>n(e.pm_id,"stop"),className:"inline-flex items-center justify-center w-6 h-6 rounded-md bg-red-100 hover:bg-red-200 text-red-600 hover:text-red-700 transition-all duration-150",title:"Stop",children:(0,Mi.jsx)(Px,{className:"h-3 w-3"})})]}):(0,Mi.jsx)("button",{onClick:()=>n(e.pm_id,"start"),className:"inline-flex items-center justify-center w-6 h-6 rounded-md bg-green-100 hover:bg-green-200 text-green-600 hover:text-green-700 transition-all duration-150",title:"Start",children:(0,Mi.jsx)(Nx,{className:"h-3 w-3"})}),(0,Mi.jsx)("button",{onClick:()=>n(e.pm_id,"delete"),className:"inline-flex items-center justify-center w-6 h-6 rounded-md bg-red-100 hover:bg-red-200 text-red-600 hover:text-red-700 transition-all duration-150",title:"Delete",children:(0,Mi.jsx)(zx,{className:"h-3 w-3"})}),(0,Mi.jsx)(ui,{to:"/logs/".concat(e.pm_id),className:"inline-flex items-center justify-center w-6 h-6 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-700 transition-all duration-150",title:"Logs",children:(0,Mi.jsx)(Bx,{className:"h-3 w-3"})})]})})]},e.pm_id)))})]})})]})},Hx=["title","titleId"];function Vx(e,t){let{title:n,titleId:o}=e,i=or(e,Hx);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Ux=r.forwardRef(Vx),qx=["title","titleId"];function $x(e,t){let{title:n,titleId:o}=e,i=or(e,qx);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Kx=r.forwardRef($x),Xx=e=>{let{processes:t,metrics:n,searchTerm:r,statusFilter:o,onSearchChange:i,onStatusFilterChange:a,onProcessAction:s}=e;return(0,Mi.jsxs)("div",{className:"space-y-4",children:[(0,Mi.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:(0,Mi.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between",children:[(0,Mi.jsxs)("div",{children:[(0,Mi.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Process Dashboard"}),(0,Mi.jsx)("p",{className:"text-gray-600 mt-0.5 text-xs",children:"Monitor and manage your PM2 processes in real-time"})]}),(0,Mi.jsx)("div",{className:"mt-2 sm:mt-0",children:(0,Mi.jsxs)("div",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:[t.filter((e=>{var t;return"online"===(null===(t=e.pm2_env)||void 0===t?void 0:t.status)})).length," active / ",t.length," total"]})})]})}),(0,Mi.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-3",children:(0,Mi.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,Mi.jsx)("div",{className:"flex-1",children:(0,Mi.jsxs)("div",{className:"relative",children:[(0,Mi.jsx)(Ux,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),(0,Mi.jsx)("input",{type:"text",placeholder:"Search processes by name or ID...",value:r,onChange:i,className:"w-full pl-8 pr-3 py-1.5 border border-gray-300 rounded-md text-xs text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"})]})}),(0,Mi.jsx)("div",{className:"sm:w-40",children:(0,Mi.jsxs)("div",{className:"relative",children:[(0,Mi.jsx)(Kx,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),(0,Mi.jsxs)("select",{value:o,onChange:a,className:"w-full pl-8 pr-6 py-1.5 border border-gray-300 rounded-md text-xs text-gray-900 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent cursor-pointer",children:[(0,Mi.jsx)("option",{value:"all",children:"All Processes"}),(0,Mi.jsx)("option",{value:"online",children:"Online Only"}),(0,Mi.jsx)("option",{value:"stopped",children:"Stopped Only"}),(0,Mi.jsx)("option",{value:"errored",children:"Errored Only"})]})]})})]})}),(0,Mi.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Mi.jsx)("div",{className:"lg:col-span-1",children:(0,Mi.jsx)(Sx,{metrics:n})}),(0,Mi.jsx)("div",{className:"lg:col-span-2",children:(0,Mi.jsx)(Wx,{processes:t,onAction:s})})]})]})};let Yx=0;const Gx=o["useId".toString()];function Qx(e){if(void 0!==Gx){const t=Gx();return null!=e?e:t}return function(e){const[t,n]=r.useState(e),o=e||t;return r.useEffect((()=>{null==t&&(Yx+=1,n("mui-".concat(Yx)))}),[t]),o}(e)}function Jx(e){var t;return parseInt(r.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}const Zx=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ey(e){const t=[],n=[];return Array.from(e.querySelectorAll(Zx)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function ty(){return!0}const ny=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:a=ey,isEnabled:s=ty,open:l}=e,c=r.useRef(!1),u=r.useRef(null),d=r.useRef(null),h=r.useRef(null),p=r.useRef(null),f=r.useRef(!1),m=r.useRef(null),g=Xa(Jx(t),m),v=r.useRef(null);r.useEffect((()=>{l&&m.current&&(f.current=!n)}),[n,l]),r.useEffect((()=>{if(!l||!m.current)return;const e=Lb(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),f.current&&m.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}}),[l]),r.useEffect((()=>{if(!l||!m.current)return;const e=Lb(m.current),t=t=>{v.current=t,!o&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(o&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var r,i;const e=Boolean((null==(r=v.current)?void 0:r.shiftKey)&&"Tab"===(null==(i=v.current)?void 0:i.key)),t=n[0],o=n[n.length-1];"string"!==typeof t&&"string"!==typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,o,i,s,l,a]);const b=e=>{null===h.current&&(h.current=e.relatedTarget),f.current=!0};return(0,Mi.jsxs)(r.Fragment,{children:[(0,Mi.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:g,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,Mi.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})};var ry=n(7950);const oy=r.forwardRef((function(e,t){const{children:n,container:o,disablePortal:i=!1}=e,[a,s]=r.useState(null),l=Xa(r.isValidElement(n)?Jx(n):null,t);if(Ga((()=>{i||s(function(e){return"function"===typeof e?e():e}(o)||document.body)}),[o,i]),Ga((()=>{if(a&&!i)return Ka(t,a),()=>{Ka(t,null)}}),[t,a,i]),i){if(r.isValidElement(n)){const e={ref:l};return r.cloneElement(n,e)}return(0,Mi.jsx)(r.Fragment,{children:n})}return(0,Mi.jsx)(r.Fragment,{children:a?ry.createPortal(n,a):a})})),iy=!1;var ay="unmounted",sy="exited",ly="entering",cy="entered",uy="exiting",dy=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=sy,r.appearStatus=ly):o=cy:o=t.unmountOnExit||t.mountOnEnter?ay:sy,r.state={status:o},r.nextCallback=null,r}fs(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ay?{status:sy}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==ly&&n!==cy&&(t=ly):n!==ly&&n!==cy||(t=uy)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===ly){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ry.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===sy&&this.setState({status:ay})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ry.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||iy?this.safeSetState({status:cy},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:ly},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:cy},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ry.findDOMNode(this);t&&!iy?(this.props.onExit(r),this.safeSetState({status:uy},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:sy},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:sy},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ry.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ay)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,rr.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r.createElement(ms.Provider,{value:null},"function"===typeof n?n(e,o):r.cloneElement(r.Children.only(n),o))},t}(r.Component);function hy(){}dy.contextType=ms,dy.propTypes={},dy.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hy,onEntering:hy,onEntered:hy,onExit:hy,onExiting:hy,onExited:hy},dy.UNMOUNTED=ay,dy.EXITED=sy,dy.ENTERING=ly,dy.ENTERED=cy,dy.EXITING=uy;const py=dy,fy=e=>e.scrollTop;function my(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"===typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"===typeof i?i[t.mode]:i,delay:a.transitionDelay}}const gy=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],vy={entering:{opacity:1},entered:{opacity:1}},by=r.forwardRef((function(e,t){const n=Nv(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:h,onExit:p,onExited:f,onExiting:m,style:g,timeout:v=o,TransitionComponent:b=py}=e,x=(0,rr.A)(e,gy),y=r.useRef(null),w=Ya(y,Jx(s),t),S=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},k=S(h),j=S(((e,t)=>{fy(e);const r=my({style:g,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)})),C=S(d),_=S(m),A=S((e=>{const t=my({style:g,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),E=S(f);return(0,Mi.jsx)(b,(0,bi.A)({appear:a,in:c,nodeRef:y,onEnter:j,onEntered:C,onEntering:k,onExit:A,onExited:E,onExiting:_,addEndListener:e=>{i&&i(y.current,e)},timeout:v},x,{children:(e,t)=>r.cloneElement(s,(0,bi.A)({style:(0,bi.A)({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},vy[e],g,s.props.style),ref:w},t))}))})),xy=by;function yy(e){return ga("MuiBackdrop",e)}va("MuiBackdrop",["root","invisible"]);const wy=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Sy=Aa("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({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"})})),ky=r.forwardRef((function(e,t){var n,r,o;const i=Oa({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:h,slotProps:p={},slots:f={},TransitionComponent:m=xy,transitionDuration:g}=i,v=(0,rr.A)(i,wy),b=(0,bi.A)({},i,{component:l,invisible:d}),x=(e=>{const{classes:t,invisible:n}=e;return Sa({root:["root",n&&"invisible"]},yy,t)})(b),y=null!=(n=p.root)?n:u.root;return(0,Mi.jsx)(m,(0,bi.A)({in:h,timeout:g},v,{children:(0,Mi.jsx)(Sy,(0,bi.A)({"aria-hidden":!0},y,{as:null!=(r=null!=(o=f.root)?o:c.Root)?r:l,className:yi(x.root,s,null==y?void 0:y.className),ownerState:(0,bi.A)({},b,null==y?void 0:y.ownerState),classes:x,ref:t,children:a}))}))}));function jy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}),(()=>{}))}function Cy(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function _y(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ay(e){return parseInt(Ib(e).getComputedStyle(e).paddingRight,10)||0}function Ey(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&_y(e,o)}))}function My(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function Ry(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Lb(e);return t.body===e?Ib(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Cy(Lb(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(Ay(r)+e,"px");const t=Lb(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(Ay(t)+e,"px")}))}let e;if(r.parentNode instanceof DocumentFragment)e=Lb(r).body;else{const t=r.parentElement,n=Ib(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const Py=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&_y(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Ey(t,e.mount,e.modalRef,r,!0);const o=My(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=My(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=Ry(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=My(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&_y(e.modalRef,t),Ey(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&_y(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const Oy=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,manager:i=Py,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:h}=e,p=r.useRef({}),f=r.useRef(null),m=r.useRef(null),g=Xa(m,h),[v,b]=r.useState(!d),x=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let y=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(y=!1);const w=()=>(p.current.modalRef=m.current,p.current.mount=f.current,p.current),S=()=>{i.mount(w(),{disableScrollLock:o}),m.current&&(m.current.scrollTop=0)},k=Qa((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||Lb(f.current).body;i.add(w(),e),m.current&&S()})),j=r.useCallback((()=>i.isTopModal(w())),[i]),C=Qa((e=>{f.current=e,e&&(d&&j()?S():m.current&&_y(m.current,y))})),_=r.useCallback((()=>{i.remove(w(),y)}),[y,i]);r.useEffect((()=>()=>{_()}),[_]),r.useEffect((()=>{d?k():x&&a||_()}),[d,_,x,a,k]);const A=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&j()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},E=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=fc(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,bi.A)({},n,t);return(0,bi.A)({role:"presentation"},r,{onKeyDown:A(r),ref:g})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,bi.A)({"aria-hidden":!0},e,{onClick:E(e),open:d})},getTransitionProps:()=>({onEnter:jy((()=>{b(!1),s&&s()}),null==c?void 0:c.props.onEnter),onExited:jy((()=>{b(!0),l&&l(),a&&_()}),null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:C,isTopModal:j,exited:v,hasTransition:x}};function Ty(e){return ga("MuiModal",e)}va("MuiModal",["root","hidden","backdrop"]);const Ny=["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"],Ly=Aa("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),Iy=Aa(ky,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),zy=r.forwardRef((function(e,t){var n,o,i,a,s,l;const c=Oa({name:"MuiModal",props:e}),{BackdropComponent:u=Iy,BackdropProps:d,className:h,closeAfterTransition:p=!1,children:f,container:m,component:g,components:v={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:k=!1,disableScrollLock:j=!1,hideBackdrop:C=!1,keepMounted:_=!1,onBackdropClick:A,open:E,slotProps:M,slots:R}=c,P=(0,rr.A)(c,Ny),O=(0,bi.A)({},c,{closeAfterTransition:p,disableAutoFocus:x,disableEnforceFocus:y,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:k,disableScrollLock:j,hideBackdrop:C,keepMounted:_}),{getRootProps:T,getBackdropProps:N,getTransitionProps:L,portalRef:I,isTopModal:z,exited:D,hasTransition:F}=Oy((0,bi.A)({},O,{rootRef:t})),B=(0,bi.A)({},O,{exited:D}),W=(e=>{const{open:t,exited:n,classes:r}=e;return Sa({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Ty,r)})(B),H={};if(void 0===f.props.tabIndex&&(H.tabIndex="-1"),F){const{onEnter:e,onExited:t}=L();H.onEnter=e,H.onExited=t}const V=null!=(n=null!=(o=null==R?void 0:R.root)?o:v.Root)?n:Ly,U=null!=(i=null!=(a=null==R?void 0:R.backdrop)?a:v.Backdrop)?i:u,q=null!=(s=null==M?void 0:M.root)?s:b.root,$=null!=(l=null==M?void 0:M.backdrop)?l:b.backdrop,K=Ab({elementType:V,externalSlotProps:q,externalForwardedProps:P,getSlotProps:T,additionalProps:{ref:t,as:g},ownerState:B,className:yi(h,null==q?void 0:q.className,null==W?void 0:W.root,!B.open&&B.exited&&(null==W?void 0:W.hidden))}),X=Ab({elementType:U,externalSlotProps:$,additionalProps:d,getSlotProps:e=>N((0,bi.A)({},e,{onClick:t=>{A&&A(t),null!=e&&e.onClick&&e.onClick(t)}})),className:yi(null==$?void 0:$.className,null==d?void 0:d.className,null==W?void 0:W.backdrop),ownerState:B});return _||E||F&&!D?(0,Mi.jsx)(oy,{ref:I,container:m,disablePortal:S,children:(0,Mi.jsxs)(V,(0,bi.A)({},K,{children:[!C&&u?(0,Mi.jsx)(U,(0,bi.A)({},X)):null,(0,Mi.jsx)(ny,{disableEnforceFocus:y,disableAutoFocus:x,disableRestoreFocus:k,isEnabled:z,open:E,children:r.cloneElement(f,H)})]}))}):null})),Dy=zy;function Fy(e){return ga("MuiDialog",e)}const By=va("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const Wy=r.createContext({}),Hy=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Vy=Aa(ky,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Uy=Aa(Dy,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),qy=Aa("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t["scroll".concat(Da(n.scroll))]]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),$y=Aa(Ia,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["scrollPaper".concat(Da(n.scroll))],t["paperWidth".concat(Da(String(n.maxWidth)))],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"max(".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit,", 444px)"),["&.".concat(By.paperScrollBody)]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit),["&.".concat(By.paperScrollBody)]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,["&.".concat(By.paperScrollBody)]:{margin:0,maxWidth:"100%"}})})),Ky=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiDialog"}),o=Nv(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:h=!1,fullScreen:p=!1,fullWidth:f=!1,maxWidth:m="sm",onBackdropClick:g,onClick:v,onClose:b,open:x,PaperComponent:y=Ia,PaperProps:w={},scroll:S="paper",TransitionComponent:k=xy,transitionDuration:j=i,TransitionProps:C}=n,_=(0,rr.A)(n,Hy),A=(0,bi.A)({},n,{disableEscapeKeyDown:h,fullScreen:p,fullWidth:f,maxWidth:m,scroll:S}),E=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e;return Sa({root:["root"],container:["container","scroll".concat(Da(n))],paper:["paper","paperScroll".concat(Da(n)),"paperWidth".concat(Da(String(r))),o&&"paperFullWidth",i&&"paperFullScreen"]},Fy,t)})(A),M=r.useRef(),R=Qx(s),P=r.useMemo((()=>({titleId:R})),[R]);return(0,Mi.jsx)(Uy,(0,bi.A)({className:yi(E.root,d),closeAfterTransition:!0,components:{Backdrop:Vy},componentsProps:{backdrop:(0,bi.A)({transitionDuration:j,as:l},c)},disableEscapeKeyDown:h,onClose:b,open:x,ref:t,onClick:e=>{v&&v(e),M.current&&(M.current=null,g&&g(e),b&&b(e,"backdropClick"))},ownerState:A},_,{children:(0,Mi.jsx)(k,(0,bi.A)({appear:!0,in:x,timeout:j,role:"presentation"},C,{children:(0,Mi.jsx)(qy,{className:yi(E.container),onMouseDown:e=>{M.current=e.target===e.currentTarget},ownerState:A,children:(0,Mi.jsx)($y,(0,bi.A)({as:y,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":R},w,{className:yi(E.paper,w.className),ownerState:A,children:(0,Mi.jsx)(Wy.Provider,{value:P,children:u})}))})}))}))}));function Xy(e){return ga("MuiDialogTitle",e)}const Yy=va("MuiDialogTitle",["root"]),Gy=["className","id"],Qy=Aa(Ol,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),Jy=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiDialogTitle"}),{className:o,id:i}=n,a=(0,rr.A)(n,Gy),s=n,l=(e=>{const{classes:t}=e;return Sa({root:["root"]},Xy,t)})(s),{titleId:c=i}=r.useContext(Wy);return(0,Mi.jsx)(Qy,(0,bi.A)({component:"h2",className:yi(l.root,o),ownerState:s,ref:t,variant:"h6",id:null!=i?i:c},a))}));function Zy(e){return ga("MuiDialogContent",e)}va("MuiDialogContent",["root","dividers"]);const ew=["className","dividers"],tw=Aa("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:{[".".concat(Yy.root," + &")]:{paddingTop:0}})})),nw=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,i=(0,rr.A)(n,ew),a=(0,bi.A)({},n,{dividers:o}),s=(e=>{const{classes:t,dividers:n}=e;return Sa({root:["root",n&&"dividers"]},Zy,t)})(a);return(0,Mi.jsx)(tw,(0,bi.A)({className:yi(s.root,r),ownerState:a,ref:t},i))}));function rw(e){return ga("MuiDialogContentText",e)}va("MuiDialogContentText",["root"]);const ow=["children","className"],iw=Aa(Ol,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),aw=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiDialogContentText"}),{className:r}=n,o=(0,rr.A)(n,ow),i=(e=>{const{classes:t}=e,n=Sa({root:["root"]},rw,t);return(0,bi.A)({},t,n)})(o);return(0,Mi.jsx)(iw,(0,bi.A)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:o,className:yi(i.root,r)},n,{classes:i}))}));function sw(e){return ga("MuiDialogActions",e)}va("MuiDialogActions",["root","spacing"]);const lw=["className","disableSpacing"],cw=Aa("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),uw=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1}=n,i=(0,rr.A)(n,lw),a=(0,bi.A)({},n,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:n}=e;return Sa({root:["root",!n&&"spacing"]},sw,t)})(a);return(0,Mi.jsx)(cw,(0,bi.A)({className:yi(s.root,r),ownerState:a,ref:t},i))})),dw=e=>{let{isOpen:t,title:n,message:r,confirmLabel:o="Confirm",cancelLabel:i="Cancel",onConfirm:a,onCancel:s,type:l="danger"}=e;return(0,Mi.jsxs)(Ky,{open:t,onClose:s,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,Mi.jsx)(Jy,{id:"alert-dialog-title",children:n}),(0,Mi.jsx)(nw,{children:(0,Mi.jsx)(aw,{id:"alert-dialog-description",children:r})}),(0,Mi.jsxs)(uw,{children:[(0,Mi.jsx)(tl,{onClick:s,color:"inherit",children:i}),(0,Mi.jsx)(tl,{onClick:a,color:(()=>{switch(l){case"danger":return"error";case"warning":return"warning";default:return"primary"}})(),variant:"contained",autoFocus:!0,children:o})]})]})},hw=e=>{let{processes:t,onRefresh:n}=e;const o=Nv(),i=lo(),[a,s]=(0,r.useState)("cpu"),[l,c]=(0,r.useState)("desc"),u="dark"===o.palette.mode,d=e=>{if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])},h=e=>{const t=Math.floor((Date.now()-e)/1e3),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),o=Math.floor(t%3600/60);return n>0?"".concat(n,"d ").concat(r,"h ").concat(o,"m"):r>0?"".concat(r,"h ").concat(o,"m"):"".concat(o,"m ").concat(t%60,"s")},p=[...t].sort(((e,t)=>{let n,r;return"cpu"===a?(n=e.monit.cpu,r=t.monit.cpu):(n=e.monit.memory,r=t.monit.memory),"asc"===l?n-r:r-n})),f=e=>{e===a?c("asc"===l?"desc":"asc"):(s(e),c("desc"))},m=e=>e<60?u?"bg-emerald-500":"bg-emerald-600":e<80?u?"bg-amber-500":"bg-amber-600":u?"bg-rose-500":"bg-rose-600";return(0,Mi.jsxs)("div",{className:"space-y-4",children:[(0,Mi.jsx)("div",{className:"rounded-lg ".concat(u?"bg-gray-800":"bg-white"," shadow-sm border ").concat(u?"border-gray-700":"border-gray-200"),children:(0,Mi.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,Mi.jsx)("h2",{className:"text-lg font-semibold ".concat(u?"text-gray-100":"text-gray-900"),children:"Process Monitor"}),(0,Mi.jsx)("button",{onClick:n,className:"p-2 rounded-lg transition-colors ".concat(u?"hover:bg-gray-700 text-gray-300 hover:text-gray-100":"hover:bg-gray-100 text-gray-600 hover:text-gray-900"),title:"Refresh Data",children:(0,Mi.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Mi.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})}),(0,Mi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,Mi.jsxs)("div",{className:"rounded-lg ".concat(u?"bg-gradient-to-br from-blue-900 to-blue-800":"bg-gradient-to-br from-blue-500 to-blue-600"," shadow-sm p-4"),children:[(0,Mi.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Mi.jsx)("span",{className:"text-xs font-medium text-blue-100 uppercase tracking-wide",children:"Processes"}),(0,Mi.jsx)("svg",{className:"w-5 h-5 text-blue-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Mi.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})]}),(0,Mi.jsx)("div",{className:"text-3xl font-bold text-white mb-1",children:t.length}),(0,Mi.jsxs)("div",{className:"flex items-center gap-3 text-xs text-blue-100",children:[(0,Mi.jsxs)("span",{children:[t.filter((e=>"online"===e.pm2_env.status)).length," online"]}),(0,Mi.jsx)("span",{children:"\u2022"}),(0,Mi.jsxs)("span",{children:[t.filter((e=>"online"!==e.pm2_env.status)).length," stopped"]})]})]}),(0,Mi.jsxs)("div",{className:"rounded-lg ".concat(u?"bg-gradient-to-br from-purple-900 to-purple-800":"bg-gradient-to-br from-purple-500 to-purple-600"," shadow-sm p-4"),children:[(0,Mi.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Mi.jsx)("span",{className:"text-xs font-medium text-purple-100 uppercase tracking-wide",children:"CPU Peak"}),(0,Mi.jsx)("svg",{className:"w-5 h-5 text-purple-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Mi.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})]}),(0,Mi.jsx)("div",{className:"text-3xl font-bold text-white mb-1",children:p.length>0?"".concat(Math.max(...p.map((e=>e.monit.cpu))).toFixed(1),"%"):"0%"}),(0,Mi.jsx)("div",{className:"text-xs text-purple-100",children:"Highest process usage"})]}),(0,Mi.jsxs)("div",{className:"rounded-lg ".concat(u?"bg-gradient-to-br from-cyan-900 to-cyan-800":"bg-gradient-to-br from-cyan-500 to-cyan-600"," shadow-sm p-4"),children:[(0,Mi.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Mi.jsx)("span",{className:"text-xs font-medium text-cyan-100 uppercase tracking-wide",children:"Memory Peak"}),(0,Mi.jsx)("svg",{className:"w-5 h-5 text-cyan-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Mi.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"})})]}),(0,Mi.jsx)("div",{className:"text-3xl font-bold text-white mb-1",children:p.length>0?d(Math.max(...p.map((e=>e.monit.memory)))):"0 MB"}),(0,Mi.jsx)("div",{className:"text-xs text-cyan-100",children:"Highest process usage"})]})]}),(0,Mi.jsx)("div",{className:"rounded-lg ".concat(u?"bg-gray-800":"bg-white"," shadow-sm border ").concat(u?"border-gray-700":"border-gray-200"," overflow-hidden"),children:(0,Mi.jsx)("div",{className:"overflow-x-auto",children:(0,Mi.jsxs)("table",{className:"w-full",children:[(0,Mi.jsx)("thead",{className:"".concat(u?"bg-gray-900":"bg-gray-50"," border-b ").concat(u?"border-gray-700":"border-gray-200"),children:(0,Mi.jsxs)("tr",{children:[(0,Mi.jsx)("th",{className:"px-4 py-2 text-left text-xs font-semibold ".concat(u?"text-gray-300":"text-gray-700"," uppercase tracking-wider"),children:"App Name"}),(0,Mi.jsx)("th",{className:"px-3 py-2 text-left text-xs font-semibold ".concat(u?"text-gray-300":"text-gray-700"," uppercase tracking-wider"),children:"ID"}),(0,Mi.jsx)("th",{className:"px-3 py-2 text-left text-xs font-semibold ".concat(u?"text-gray-300":"text-gray-700"," uppercase tracking-wider"),children:"Status"}),(0,Mi.jsxs)("th",{className:"px-3 py-2 text-left text-xs font-semibold ".concat(u?"text-gray-300":"text-gray-700"," uppercase tracking-wider cursor-pointer hover:").concat(u?"text-gray-100":"text-gray-900"," transition-colors"),onClick:()=>f("cpu"),children:["CPU ","cpu"===a&&("asc"===l?"\u2191":"\u2193")]}),(0,Mi.jsxs)("th",{className:"px-3 py-2 text-left text-xs font-semibold ".concat(u?"text-gray-300":"text-gray-700"," uppercase tracking-wider cursor-pointer hover:").concat(u?"text-gray-100":"text-gray-900"," transition-colors"),onClick:()=>f("memory"),children:["Memory ","memory"===a&&("asc"===l?"\u2191":"\u2193")]}),(0,Mi.jsx)("th",{className:"px-3 py-2 text-left text-xs font-semibold ".concat(u?"text-gray-300":"text-gray-700"," uppercase tracking-wider"),children:"Uptime"}),(0,Mi.jsx)("th",{className:"px-3 py-2 text-left text-xs font-semibold ".concat(u?"text-gray-300":"text-gray-700"," uppercase tracking-wider"),children:"Restarts"})]})}),(0,Mi.jsx)("tbody",{className:"divide-y ".concat(u?"divide-gray-700":"divide-gray-200"),children:p.map((e=>(0,Mi.jsxs)("tr",{onClick:()=>{return t=e.pm_id,void i("/process/".concat(t));var t},className:"cursor-pointer transition-colors ".concat(u?"hover:bg-gray-750 hover:bg-opacity-50":"hover:bg-gray-50"),children:[(0,Mi.jsx)("td",{className:"px-4 py-2.5 text-sm font-medium ".concat(u?"text-gray-200":"text-gray-900"),children:e.name}),(0,Mi.jsx)("td",{className:"px-3 py-2.5 text-sm ".concat(u?"text-gray-400":"text-gray-600"),children:e.pm_id}),(0,Mi.jsx)("td",{className:"px-3 py-2.5",children:(0,Mi.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ".concat("online"===e.pm2_env.status?u?"bg-emerald-900 text-emerald-200":"bg-emerald-100 text-emerald-800":"stopped"===e.pm2_env.status?u?"bg-rose-900 text-rose-200":"bg-rose-100 text-rose-800":u?"bg-amber-900 text-amber-200":"bg-amber-100 text-amber-800"),children:e.pm2_env.status})}),(0,Mi.jsx)("td",{className:"px-3 py-2.5",children:(0,Mi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mi.jsx)("div",{className:"flex-1 max-w-[100px]",children:(0,Mi.jsx)("div",{className:"h-1.5 rounded-full ".concat(u?"bg-gray-700":"bg-gray-200"," overflow-hidden"),children:(0,Mi.jsx)("div",{className:"h-full ".concat(m(e.monit.cpu)," transition-all duration-300"),style:{width:"".concat(Math.min(e.monit.cpu,100),"%")}})})}),(0,Mi.jsxs)("span",{className:"text-xs font-medium ".concat(u?"text-gray-300":"text-gray-700"," min-w-[40px]"),children:[e.monit.cpu.toFixed(1),"%"]})]})}),(0,Mi.jsx)("td",{className:"px-3 py-2.5",children:(0,Mi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mi.jsx)("div",{className:"flex-1 max-w-[100px]",children:(0,Mi.jsx)("div",{className:"h-1.5 rounded-full ".concat(u?"bg-gray-700":"bg-gray-200"," overflow-hidden"),children:(0,Mi.jsx)("div",{className:"h-full ".concat(u?"bg-cyan-500":"bg-cyan-600"," transition-all duration-300"),style:{width:"".concat(p.length>0?e.monit.memory/Math.max(...p.map((e=>e.monit.memory)))*100:0,"%")}})})}),(0,Mi.jsx)("span",{className:"text-xs font-medium ".concat(u?"text-gray-300":"text-gray-700"," min-w-[60px]"),children:d(e.monit.memory)})]})}),(0,Mi.jsx)("td",{className:"px-3 py-2.5 text-sm ".concat(u?"text-gray-400":"text-gray-600"),children:"online"===e.pm2_env.status?h(e.pm2_env.pm_uptime):"-"}),(0,Mi.jsx)("td",{className:"px-3 py-2.5 text-sm ".concat(u?"text-gray-400":"text-gray-600"),children:e.pm2_env.restart_time})]},e.pm_id)))})]})})})]})};function pw(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function fw(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(pw(e.value)&&""!==e.value||t&&pw(e.defaultValue)&&""!==e.defaultValue)}const mw=function(e,t){var n,o;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)};function gw(e){return ga("MuiFormControl",e)}va("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const vw=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],bw=Aa("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,bi.A)({},t.root,t["margin".concat(Da(n.margin))],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,bi.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),xw=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:h=!1,margin:p="none",required:f=!1,size:m="medium",variant:g="outlined"}=n,v=(0,rr.A)(n,vw),b=(0,bi.A)({},n,{color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:h,margin:p,required:f,size:m,variant:g}),x=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return Sa({root:["root","none"!==n&&"margin".concat(Da(n)),r&&"fullWidth"]},gw,t)})(b),[y,w]=r.useState((()=>{let e=!1;return o&&r.Children.forEach(o,(t=>{if(!mw(t,["Input","Select"]))return;const n=mw(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)})),e})),[S,k]=r.useState((()=>{let e=!1;return o&&r.Children.forEach(o,(t=>{mw(t,["Input","Select"])&&(fw(t.props,!0)||fw(t.props.inputProps,!0))&&(e=!0)})),e})),[j,C]=r.useState(!1);l&&j&&C(!1);const _=void 0===u||l?j:u;let A;const E=r.useMemo((()=>({adornedStart:y,setAdornedStart:w,color:a,disabled:l,error:c,filled:S,focused:_,fullWidth:d,hiddenLabel:h,size:m,onBlur:()=>{C(!1)},onEmpty:()=>{k(!1)},onFilled:()=>{k(!0)},onFocus:()=>{C(!0)},registerEffect:A,required:f,variant:g})),[y,a,l,c,S,_,d,h,A,f,m,g]);return(0,Mi.jsx)(jl.Provider,{value:E,children:(0,Mi.jsx)(bw,(0,bi.A)({as:s,ownerState:b,className:yi(x.root,i),ref:t},v,{children:o}))})})),yw=xw;function ww(e){return ga("MuiFormLabel",e)}const Sw=va("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),kw=["children","className","color","component","disabled","error","filled","focused","required"],jw=Aa("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,bi.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(Sw.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(Sw.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Sw.error)]:{color:(t.vars||t).palette.error.main}})})),Cw=Aa("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(Sw.error)]:{color:(t.vars||t).palette.error.main}}})),_w=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiFormLabel"}),{children:r,className:o,component:i="label"}=n,a=(0,rr.A)(n,kw),s=Ll({props:n,muiFormControl:Cl(),states:["color","required","focused","disabled","error","filled"]}),l=(0,bi.A)({},n,{color:s.color||"primary",component:i,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return Sa({root:["root","color".concat(Da(n)),o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},ww,t)})(l);return(0,Mi.jsxs)(jw,(0,bi.A)({as:i,ownerState:l,className:yi(c.root,o),ref:t},a,{children:[r,s.required&&(0,Mi.jsxs)(Cw,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:["\u2009","*"]})]}))})),Aw=_w;function Ew(e){return ga("MuiInputLabel",e)}va("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Mw=["disableAnimation","margin","shrink","variant","className"],Rw=Aa(Aw,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Sw.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,bi.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,bi.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,bi.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),Pw=r.forwardRef((function(e,t){const n=Oa({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:o,className:i}=n,a=(0,rr.A)(n,Mw),s=Cl();let l=o;"undefined"===typeof l&&s&&(l=s.filled||s.focused||s.adornedStart);const c=Ll({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),u=(0,bi.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l=Sa({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"normal"!==r&&"size".concat(Da(r)),a],asterisk:[s&&"asterisk"]},Ew,t);return(0,bi.A)({},t,l)})(u);return(0,Mi.jsx)(Rw,(0,bi.A)({"data-shrink":l,ownerState:u,ref:t,className:yi(d.root,i)},a,{classes:d}))}));const Ow=r.createContext({});function Tw(e){return ga("MuiList",e)}va("MuiList",["root","padding","dense","subheader"]);const Nw=["children","className","component","dense","disablePadding","subheader"],Lw=Aa("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),Iw=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=n,u=(0,rr.A)(n,Nw),d=r.useMemo((()=>({dense:s})),[s]),h=(0,bi.A)({},n,{component:a,dense:s,disablePadding:l}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Sa({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Tw,t)})(h);return(0,Mi.jsx)(Ow.Provider,{value:d,children:(0,Mi.jsxs)(Lw,(0,bi.A)({as:a,className:yi(p.root,i),ref:t,ownerState:h},u,{children:[c,o]}))})})),zw=Cy,Dw=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Fw(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Bw(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Ww(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Hw(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Ww(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Vw=r.forwardRef((function(e,t){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,h=(0,rr.A)(e,Dw),p=r.useRef(null),f=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Nb((()=>{o&&p.current.focus()}),[o]),r.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&r){const t="".concat(zw(Yb(e)),"px");p.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,p.current.style.width="calc(100% + ".concat(t,")")}return p.current}})),[]);const m=Ya(p,t);let g=-1;r.Children.forEach(a,((e,t)=>{r.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===t&&(g+=1,g>=a.length&&(g=-1))}));const v=r.Children.map(a,((e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),r.cloneElement(e,t)}return e}));return(0,Mi.jsx)(Iw,(0,bi.A)({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=p.current,n=e.key,r=Yb(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Hw(t,r,c,l,Fw);else if("ArrowUp"===n)e.preventDefault(),Hw(t,r,c,l,Bw);else if("Home"===n)e.preventDefault(),Hw(t,null,c,l,Fw);else if("End"===n)e.preventDefault(),Hw(t,null,c,l,Bw);else if(1===n.length){const o=f.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&Ww(r,o);o.previousKeyMatched&&(s||Hw(t,r,!1,l,Fw,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:o?0:-1},h,{children:v}))})),Uw=Vw,qw=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function $w(e){return"scale(".concat(e,", ").concat(e**2,")")}const Kw={entering:{opacity:1,transform:$w(1)},entered:{opacity:1,transform:"none"}},Xw="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Yw=r.forwardRef((function(e,t){const{addEndListener:n,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:h,onExiting:p,style:f,timeout:m="auto",TransitionComponent:g=py}=e,v=(0,rr.A)(e,qw),b=ns(),x=r.useRef(),y=Nv(),w=r.useRef(null),S=Ya(w,Jx(i),t),k=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},j=k(u),C=k(((e,t)=>{fy(e);const{duration:n,delay:r,easing:o}=my({style:f,timeout:m,easing:a},{mode:"enter"});let i;"auto"===m?(i=y.transitions.getAutoHeightDuration(e.clientHeight),x.current=i):i=n,e.style.transition=[y.transitions.create("opacity",{duration:i,delay:r}),y.transitions.create("transform",{duration:Xw?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)})),_=k(c),A=k(p),E=k((e=>{const{duration:t,delay:n,easing:r}=my({style:f,timeout:m,easing:a},{mode:"exit"});let o;"auto"===m?(o=y.transitions.getAutoHeightDuration(e.clientHeight),x.current=o):o=t,e.style.transition=[y.transitions.create("opacity",{duration:o,delay:n}),y.transitions.create("transform",{duration:Xw?o:.666*o,delay:Xw?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=$w(.75),d&&d(e)})),M=k(h);return(0,Mi.jsx)(g,(0,bi.A)({appear:o,in:s,nodeRef:w,onEnter:C,onEntered:_,onEntering:j,onExit:E,onExited:M,onExiting:A,addEndListener:e=>{"auto"===m&&b.start(x.current||0,e),n&&n(w.current,e)},timeout:"auto"===m?null:m},v,{children:(e,t)=>r.cloneElement(i,(0,bi.A)({style:(0,bi.A)({opacity:0,transform:$w(.75),visibility:"exited"!==e||s?void 0:"hidden"},Kw[e],f,i.props.style),ref:S},t))}))}));Yw.muiSupportAuto=!0;const Gw=Yw;function Qw(e){return ga("MuiPopover",e)}va("MuiPopover",["root","paper"]);const Jw=["onEntering"],Zw=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],eS=["slotProps"];function tS(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function nS(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function rS(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?"".concat(e,"px"):e)).join(" ")}function oS(e){return"function"===typeof e?e():e}const iS=Aa(Dy,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),aS=Aa(Ia,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),sS=r.forwardRef((function(e,t){var n,o,i;const a=Oa({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:h,className:p,container:f,elevation:m=8,marginThreshold:g=16,open:v,PaperProps:b={},slots:x,slotProps:y,transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:S=Gw,transitionDuration:k="auto",TransitionProps:{onEntering:j}={},disableScrollLock:C=!1}=a,_=(0,rr.A)(a.TransitionProps,Jw),A=(0,rr.A)(a,Zw),E=null!=(n=null==y?void 0:y.paper)?n:b,M=r.useRef(),R=Ya(M,E.ref),P=(0,bi.A)({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:E,transformOrigin:w,TransitionComponent:S,transitionDuration:k,TransitionProps:_}),O=(e=>{const{classes:t}=e;return Sa({root:["root"],paper:["paper"]},Qw,t)})(P),T=r.useCallback((()=>{if("anchorPosition"===d)return u;const e=oS(l),t=(e&&1===e.nodeType?e:Yb(M.current).body).getBoundingClientRect();return{top:t.top+tS(t,c.vertical),left:t.left+nS(t,c.horizontal)}}),[l,c.horizontal,c.vertical,u,d]),N=r.useCallback((e=>({vertical:tS(e,w.vertical),horizontal:nS(e,w.horizontal)})),[w.horizontal,w.vertical]),L=r.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=N(t);if("none"===d)return{top:null,left:null,transformOrigin:rS(n)};const r=T();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=zb(oS(l)),u=c.innerHeight-g,h=c.innerWidth-g;if(null!==g&&o<g){const e=o-g;o-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==g&&i<g){const e=i-g;i-=e,n.horizontal+=e}else if(s>h){const e=s-h;i-=e,n.horizontal+=e}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(i),"px"),transformOrigin:rS(n)}}),[l,d,T,N,g]),[I,z]=r.useState(v),D=r.useCallback((()=>{const e=M.current;if(!e)return;const t=L(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,z(!0)}),[L]);r.useEffect((()=>(C&&window.addEventListener("scroll",D),()=>window.removeEventListener("scroll",D))),[l,C,D]);r.useEffect((()=>{v&&D()})),r.useImperativeHandle(s,(()=>v?{updatePosition:()=>{D()}}:null),[v,D]),r.useEffect((()=>{if(!v)return;const e=Mb((()=>{D()})),t=zb(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,v,D]);let F=k;"auto"!==k||S.muiSupportAuto||(F=void 0);const B=f||(l?Yb(oS(l)).body:void 0),W=null!=(o=null==x?void 0:x.root)?o:iS,H=null!=(i=null==x?void 0:x.paper)?i:aS,V=Ab({elementType:H,externalSlotProps:(0,bi.A)({},E,{style:I?E.style:(0,bi.A)({},E.style,{opacity:0})}),additionalProps:{elevation:m,ref:R},ownerState:P,className:yi(O.paper,null==E?void 0:E.className)}),U=Ab({elementType:W,externalSlotProps:(null==y?void 0:y.root)||{},externalForwardedProps:A,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:B,open:v},ownerState:P,className:yi(O.root,p)}),{slotProps:q}=U,$=(0,rr.A)(U,eS);return(0,Mi.jsx)(W,(0,bi.A)({},$,!dc(W)&&{slotProps:q,disableScrollLock:C},{children:(0,Mi.jsx)(S,(0,bi.A)({appear:!0,in:v,onEntering:(e,t)=>{j&&j(e,t),D()},onExited:()=>{z(!1)},timeout:F},_,{children:(0,Mi.jsx)(H,(0,bi.A)({},V,{children:h}))}))}))})),lS=sS;function cS(e){return ga("MuiMenu",e)}va("MuiMenu",["root","paper","list"]);const uS=["onEntering"],dS=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],hS={vertical:"top",horizontal:"right"},pS={vertical:"top",horizontal:"left"},fS=Aa(lS,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),mS=Aa(aS,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),gS=Aa(Uw,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),vS=r.forwardRef((function(e,t){var n,o;const i=Oa({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:h,PaperProps:p={},PopoverClasses:f,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:v="selectedMenu",slots:b={},slotProps:x={}}=i,y=(0,rr.A)(i.TransitionProps,uS),w=(0,rr.A)(i,dS),S=Cb(),k=(0,bi.A)({},i,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:p,transitionDuration:m,TransitionProps:y,variant:v}),j=(e=>{const{classes:t}=e;return Sa({root:["root"],paper:["paper"],list:["list"]},cS,t)})(k),C=a&&!c&&h,_=r.useRef(null);let A=-1;r.Children.map(s,((e,t)=>{r.isValidElement(e)&&(e.props.disabled||("selectedMenu"===v&&e.props.selected||-1===A)&&(A=t))}));const E=null!=(n=b.paper)?n:mS,M=null!=(o=x.paper)?o:p,R=Ab({elementType:b.root,externalSlotProps:x.root,ownerState:k,className:[j.root,l]}),P=Ab({elementType:E,externalSlotProps:M,ownerState:k,className:j.paper});return(0,Mi.jsx)(fS,(0,bi.A)({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?hS:pS,slots:{paper:E,root:b.root},slotProps:{root:R,paper:P},open:h,ref:t,transitionDuration:m,TransitionProps:(0,bi.A)({onEntering:(e,t)=>{_.current&&_.current.adjustStyleForScrollbar(e,{direction:S?"rtl":"ltr"}),g&&g(e,t)}},y),ownerState:k},w,{classes:f,children:(0,Mi.jsx)(gS,(0,bi.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:_,autoFocus:a&&(-1===A||c),autoFocusItem:C,variant:v},u,{className:yi(j.list,u.className),children:s}))}))})),bS=vS;function xS(e){return ga("MuiNativeSelect",e)}const yS=va("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),wS=["className","disabled","error","IconComponent","inputRef","variant"],SS=e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,bi.A)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(yS.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},kS=Aa("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:_a,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(yS.multiple)]:t.multiple}]}})(SS),jS=e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(yS.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},CS=Aa("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat(Da(n.variant))],n.open&&t.iconOpen]}})(jS),_S=r.forwardRef((function(e,t){const{className:n,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard"}=e,c=(0,rr.A)(e,wS),u=(0,bi.A)({},e,{disabled:o,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Sa({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon","icon".concat(Da(n)),i&&"iconOpen",r&&"disabled"]},xS,t)})(u);return(0,Mi.jsxs)(r.Fragment,{children:[(0,Mi.jsx)(kS,(0,bi.A)({ownerState:u,className:yi(d.select,n),disabled:o,ref:s||t},c)),e.multiple?null:(0,Mi.jsx)(CS,{as:a,ownerState:u,className:d.icon})]})}));function AS(e){return ga("MuiSelect",e)}const ES=va("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var MS;const RS=["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"],PS=Aa("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(ES.select)]:t.select},{["&.".concat(ES.select)]:t[n.variant]},{["&.".concat(ES.error)]:t.error},{["&.".concat(ES.multiple)]:t.multiple}]}})(SS,{["&.".concat(ES.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),OS=Aa("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat(Da(n.variant))],n.open&&t.iconOpen]}})(jS),TS=Aa("input",{shouldForwardProp:e=>Ca(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function NS(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function LS(e){return null==e||"string"===typeof e&&!e.trim()}const IS=r.forwardRef((function(e,t){var n;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:h,displayEmpty:p,error:f=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:b={},multiple:x,name:y,onBlur:w,onChange:S,onClose:k,onFocus:j,onOpen:C,open:_,readOnly:A,renderValue:E,SelectDisplayProps:M={},tabIndex:R,value:P,variant:O="standard"}=e,T=(0,rr.A)(e,RS),[N,L]=Bl({controlled:P,default:d,name:"Select"}),[I,z]=Bl({controlled:_,default:u,name:"Select"}),D=r.useRef(null),F=r.useRef(null),[B,W]=r.useState(null),{current:H}=r.useRef(null!=_),[V,U]=r.useState(),q=Ya(t,g),$=r.useCallback((e=>{F.current=e,e&&W(e)}),[]),K=null==B?void 0:B.parentNode;r.useImperativeHandle(q,(()=>({focus:()=>{F.current.focus()},node:D.current,value:N})),[N]),r.useEffect((()=>{u&&I&&B&&!H&&(U(s?null:K.clientWidth),F.current.focus())}),[B,s]),r.useEffect((()=>{a&&F.current.focus()}),[a]),r.useEffect((()=>{if(!v)return;const e=Yb(F.current).getElementById(v);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[v]);const X=(e,t)=>{e?C&&C(t):k&&k(t),H||(U(s?null:K.clientWidth),z(e))},Y=r.Children.toArray(l),G=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(x){n=Array.isArray(N)?N.slice():[];const t=N.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),N!==n&&(L(n),S)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:y}}),S(o,e)}x||X(!1,t)}},Q=null!==B&&I;let J,Z;delete T["aria-invalid"];const ee=[];let te=!1,ne=!1;(fw({value:N})||p)&&(E?J=E(N):te=!0);const re=Y.map((e=>{if(!r.isValidElement(e))return null;let t;if(x){if(!Array.isArray(N))throw new Error((0,Ti.A)(2));t=N.some((t=>NS(t,e.props.value))),t&&te&&ee.push(e.props.children)}else t=NS(N,e.props.value),t&&te&&(Z=e.props.children);return t&&(ne=!0),r.cloneElement(e,{"aria-selected":t?"true":"false",onClick:G(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));te&&(J=x?0===ee.length?null:ee.reduce(((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e)),[]):Z);let oe,ie=V;!s&&H&&B&&(ie=K.clientWidth),oe="undefined"!==typeof R?R:h?null:0;const ae=M.id||(y?"mui-component-select-".concat(y):void 0),se=(0,bi.A)({},e,{variant:O,value:N,open:Q,error:f}),le=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Sa({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon","icon".concat(Da(n)),i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},AS,t)})(se),ce=(0,bi.A)({},b.PaperProps,null==(n=b.slotProps)?void 0:n.paper),ue=Qx();return(0,Mi.jsxs)(r.Fragment,{children:[(0,Mi.jsx)(PS,(0,bi.A)({ref:$,tabIndex:oe,role:"combobox","aria-controls":ue,"aria-disabled":h?"true":void 0,"aria-expanded":Q?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,ae].filter(Boolean).join(" ")||void 0,"aria-describedby":o,onKeyDown:e=>{if(!A){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),X(!0,e))}},onMouseDown:h||A?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),X(!0,e))},onBlur:e=>{!Q&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:N,name:y}}),w(e))},onFocus:j},M,{ownerState:se,className:yi(M.className,le.select,c),id:ae,children:LS(J)?MS||(MS=(0,Mi.jsx)("span",{className:"notranslate",children:"\u200b"})):J})),(0,Mi.jsx)(TS,(0,bi.A)({"aria-invalid":f,value:Array.isArray(N)?N.join(","):N,name:y,ref:D,"aria-hidden":!0,onChange:e=>{const t=Y.find((t=>t.props.value===e.target.value));void 0!==t&&(L(t.props.value),S&&S(e,t))},tabIndex:-1,disabled:h,className:le.nativeInput,autoFocus:a,ownerState:se},T)),(0,Mi.jsx)(OS,{as:m,className:le.icon,ownerState:se}),(0,Mi.jsx)(bS,(0,bi.A)({id:"menu-".concat(y||""),anchorEl:K,open:Q,onClose:e=>{X(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:(0,bi.A)({"aria-labelledby":v,role:"listbox","aria-multiselectable":x?"true":void 0,disableListWrap:!0,id:ue},b.MenuListProps),slotProps:(0,bi.A)({},b.slotProps,{paper:(0,bi.A)({},ce,{style:(0,bi.A)({minWidth:ie},null!=ce?ce.style:null)})}),children:re}))]})})),zS=IS,DS=Jl((0,Mi.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),FS=["onChange","maxRows","minRows","style","value"];function BS(e){return parseInt(e,10)||0}const WS={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function HS(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const VS=r.forwardRef((function(e,t){const{onChange:n,maxRows:o,minRows:i=1,style:a,value:s}=e,l=(0,rr.A)(e,FS),{current:c}=r.useRef(null!=s),u=r.useRef(null),d=Xa(t,u),h=r.useRef(null),p=r.useRef(null),f=r.useCallback((()=>{const t=u.current,n=p.current;if(!t||!n)return;const r=Ib(t).getComputedStyle(t);if("0px"===r.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=r.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=r.boxSizing,s=BS(r.paddingBottom)+BS(r.paddingTop),l=BS(r.borderBottomWidth)+BS(r.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let h=c;i&&(h=Math.max(Number(i)*d,h)),o&&(h=Math.min(Number(o)*d,h)),h=Math.max(h,d);return{outerHeightStyle:h+("border-box"===a?s+l:0),overflowing:Math.abs(h-c)<=1}}),[o,i,e.placeholder]),m=Qa((()=>{const e=u.current,t=f();if(!e||!t||HS(t))return!1;const n=t.outerHeightStyle;return null!=h.current&&h.current!==n})),g=r.useCallback((()=>{const e=u.current,t=f();if(!e||!t||HS(t))return;const n=t.outerHeightStyle;h.current!==n&&(h.current=n,e.style.height="".concat(n,"px")),e.style.overflow=t.overflowing?"hidden":""}),[f]),v=r.useRef(-1);Ga((()=>{const e=Eb(g),t=null==u?void 0:u.current;if(!t)return;const n=Ib(t);let r;return n.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(r=new ResizeObserver((()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame((()=>{r.observe(t)})))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[f,g,m]),Ga((()=>{g()}));return(0,Mi.jsxs)(r.Fragment,{children:[(0,Mi.jsx)("textarea",(0,bi.A)({value:s,onChange:e=>{c||g(),n&&n(e)},ref:d,rows:i,style:a},l)),(0,Mi.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:(0,bi.A)({},WS,a,{paddingTop:0,paddingBottom:0})})]})})),US=VS;var qS=n(869);const $S=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const o=Ei(r),i="function"===typeof t?t(n&&o[n]||o):t;return(0,Mi.jsx)(qS.A,{styles:i})};const KS=function(e){return(0,Mi.jsx)($S,(0,bi.A)({},e,{defaultTheme:ja,themeId:fa}))};function XS(e){return ga("MuiInputBase",e)}const YS=va("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),GS=["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"],QS=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat(Da(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},JS=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},ZS=Aa("div",{name:"MuiInputBase",slot:"Root",overridesResolver:QS})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},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",["&.".concat(YS.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,bi.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),ek=Aa("input",{name:"MuiInputBase",slot:"Input",overridesResolver:JS})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,o=(0,bi.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,bi.A)({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":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(YS.formControl," &")]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},["&.".concat(YS.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})})),tk=(0,Mi.jsx)(KS,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),nk=r.forwardRef((function(e,t){var n;const o=Oa({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:h,disableInjectingGlobalStyles:p,endAdornment:f,fullWidth:m=!1,id:g,inputComponent:v="input",inputProps:b={},inputRef:x,maxRows:y,minRows:w,multiline:S=!1,name:k,onBlur:j,onChange:C,onClick:_,onFocus:A,onKeyDown:E,onKeyUp:M,placeholder:R,readOnly:P,renderSuffix:O,rows:T,slotProps:N={},slots:L={},startAdornment:I,type:z="text",value:D}=o,F=(0,rr.A)(o,GS),B=null!=b.value?b.value:D,{current:W}=r.useRef(null!=B),H=r.useRef(),V=r.useCallback((e=>{0}),[]),U=Ya(H,x,b.ref,V),[q,$]=r.useState(!1),K=Cl();const X=Ll({props:o,muiFormControl:K,states:["color","disabled","error","hiddenLabel","size","required","filled"]});X.focused=K?K.focused:q,r.useEffect((()=>{!K&&h&&q&&($(!1),j&&j())}),[K,h,q,j]);const Y=K&&K.onFilled,G=K&&K.onEmpty,Q=r.useCallback((e=>{fw(e)?Y&&Y():G&&G()}),[Y,G]);Nb((()=>{W&&Q({value:B})}),[B,Q,W]);r.useEffect((()=>{Q(H.current)}),[]);let J=v,Z=b;S&&"input"===J&&(Z=T?(0,bi.A)({type:void 0,minRows:T,maxRows:T},Z):(0,bi.A)({type:void 0,maxRows:y,minRows:w},Z),J=US);r.useEffect((()=>{K&&K.setAdornedStart(Boolean(I))}),[K,I]);const ee=(0,bi.A)({},o,{color:X.color||"primary",disabled:X.disabled,endAdornment:f,error:X.error,focused:X.focused,formControl:K,fullWidth:m,hiddenLabel:X.hiddenLabel,multiline:S,size:X.size,startAdornment:I,type:z}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:h,startAdornment:p,type:f}=e;return Sa({root:["root","color".concat(Da(n)),r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&"medium"!==h&&"size".concat(Da(h)),u&&"multiline",p&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",u&&"inputMultiline","small"===h&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},XS,t)})(ee),ne=L.root||c.Root||ZS,re=N.root||u.root||{},oe=L.input||c.Input||ek;return Z=(0,bi.A)({},Z,null!=(n=N.input)?n:u.input),(0,Mi.jsxs)(r.Fragment,{children:[!p&&tk,(0,Mi.jsxs)(ne,(0,bi.A)({},re,!dc(ne)&&{ownerState:(0,bi.A)({},ee,re.ownerState)},{ref:t,onClick:e=>{H.current&&e.currentTarget===e.target&&H.current.focus(),_&&_(e)}},F,{className:yi(te.root,re.className,l,P&&"MuiInputBase-readOnly"),children:[I,(0,Mi.jsx)(jl.Provider,{value:null,children:(0,Mi.jsx)(oe,(0,bi.A)({ownerState:ee,"aria-invalid":X.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:d,disabled:X.disabled,id:g,onAnimationStart:e=>{Q("mui-auto-fill-cancel"===e.animationName?H.current:{value:"x"})},name:k,placeholder:R,readOnly:P,required:X.required,rows:T,value:B,onKeyDown:E,onKeyUp:M,type:z},Z,!dc(oe)&&{as:J,ownerState:(0,bi.A)({},ee,Z.ownerState)},{ref:U,className:yi(te.input,Z.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{j&&j(e),b.onBlur&&b.onBlur(e),K&&K.onBlur?K.onBlur(e):$(!1)},onChange:function(e){if(!W){const t=e.target||H.current;if(null==t)throw new Error((0,Ti.A)(1));Q({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];b.onChange&&b.onChange(e,...n),C&&C(e,...n)},onFocus:e=>{X.disabled?e.stopPropagation():(A&&A(e),b.onFocus&&b.onFocus(e),K&&K.onFocus?K.onFocus(e):$(!0))}}))}),f,O?O((0,bi.A)({},X,{startAdornment:I})):null]}))]})})),rk=nk;function ok(e){return ga("MuiInput",e)}const ik=(0,bi.A)({},YS,va("MuiInput",["root","underline","input"])),ak=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],sk=Aa(ZS,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...QS(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,bi.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.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"},["&.".concat(ik.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(ik.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(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(.".concat(ik.disabled,", .").concat(ik.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat(ik.disabled,":before")]:{borderBottomStyle:"dotted"}})})),lk=Aa(ek,{name:"MuiInput",slot:"Input",overridesResolver:JS})({}),ck=r.forwardRef((function(e,t){var n,r,o,i;const a=Oa({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:h=!1,slotProps:p,slots:f={},type:m="text"}=a,g=(0,rr.A)(a,ak),v=(e=>{const{classes:t,disableUnderline:n}=e,r=Sa({root:["root",!n&&"underline"],input:["input"]},ok,t);return(0,bi.A)({},t,r)})(a),b={root:{ownerState:{disableUnderline:s}}},x=(null!=p?p:c)?(0,Ni.A)(null!=p?p:c,b):b,y=null!=(n=null!=(r=f.root)?r:l.Root)?n:sk,w=null!=(o=null!=(i=f.input)?i:l.Input)?o:lk;return(0,Mi.jsx)(rk,(0,bi.A)({slots:{root:y,input:w},slotProps:x,fullWidth:u,inputComponent:d,multiline:h,ref:t,type:m},g,{classes:v}))}));ck.muiName="Input";const uk=ck;function dk(e){return ga("MuiFilledInput",e)}const hk=(0,bi.A)({},YS,va("MuiFilledInput",["root","underline","input"])),pk=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],fk=Aa(ZS,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...QS(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;var r;const o="light"===t.palette.mode,i=o?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=o?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=o?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=o?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,bi.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,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:a}},["&.".concat(hk.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(hk.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.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"},["&.".concat(hk.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(hk.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(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(.".concat(hk.disabled,", .").concat(hk.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(hk.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,bi.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))})),mk=Aa(ek,{name:"MuiFilledInput",slot:"Input",overridesResolver:JS})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?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"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})})),gk=r.forwardRef((function(e,t){var n,r,o,i;const a=Oa({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:h,slots:p={},type:f="text"}=a,m=(0,rr.A)(a,pk),g=(0,bi.A)({},a,{fullWidth:c,inputComponent:u,multiline:d,type:f}),v=(e=>{const{classes:t,disableUnderline:n}=e,r=Sa({root:["root",!n&&"underline"],input:["input"]},dk,t);return(0,bi.A)({},t,r)})(a),b={root:{ownerState:g},input:{ownerState:g}},x=(null!=h?h:l)?(0,Ni.A)(b,null!=h?h:l):b,y=null!=(n=null!=(r=p.root)?r:s.Root)?n:fk,w=null!=(o=null!=(i=p.input)?i:s.Input)?o:mk;return(0,Mi.jsx)(rk,(0,bi.A)({slots:{root:y,input:w},componentsProps:x,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:f},m,{classes:v}))}));gk.muiName="Input";const vk=gk;var bk;const xk=["children","classes","className","label","notched"],yk=Aa("fieldset",{shouldForwardProp:_a})({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%"}),wk=Aa("legend",{shouldForwardProp:_a})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,bi.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));function Sk(e){return ga("MuiOutlinedInput",e)}const kk=(0,bi.A)({},YS,va("MuiOutlinedInput",["root","notchedOutline","input"])),jk=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Ck=Aa(ZS,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:QS})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,bi.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(kk.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(kk.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat(kk.focused," .").concat(kk.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(kk.error," .").concat(kk.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(kk.disabled," .").concat(kk.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,bi.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))})),_k=Aa((function(e){const{className:t,label:n,notched:r}=e,o=(0,rr.A)(e,xk),i=null!=n&&""!==n,a=(0,bi.A)({},e,{notched:r,withLabel:i});return(0,Mi.jsx)(yk,(0,bi.A)({"aria-hidden":!0,className:t,ownerState:a},o,{children:(0,Mi.jsx)(wk,{ownerState:a,children:i?(0,Mi.jsx)("span",{children:n}):bk||(bk=(0,Mi.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}})),Ak=Aa(ek,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:JS})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?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"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),Ek=r.forwardRef((function(e,t){var n,o,i,a,s;const l=Oa({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:h,multiline:p=!1,notched:f,slots:m={},type:g="text"}=l,v=(0,rr.A)(l,jk),b=(e=>{const{classes:t}=e,n=Sa({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Sk,t);return(0,bi.A)({},t,n)})(l),x=Cl(),y=Ll({props:l,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=(0,bi.A)({},l,{color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:x,fullWidth:u,hiddenLabel:y.hiddenLabel,multiline:p,size:y.size,type:g}),S=null!=(n=null!=(o=m.root)?o:c.Root)?n:Ck,k=null!=(i=null!=(a=m.input)?a:c.Input)?i:Ak;return(0,Mi.jsx)(rk,(0,bi.A)({slots:{root:S,input:k},renderSuffix:e=>(0,Mi.jsx)(_k,{ownerState:w,className:b.notchedOutline,label:null!=h&&""!==h&&y.required?s||(s=(0,Mi.jsxs)(r.Fragment,{children:[h,"\u2009","*"]})):h,notched:"undefined"!==typeof f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:d,multiline:p,ref:t,type:g},v,{classes:(0,bi.A)({},b,{notchedOutline:null})}))}));Ek.muiName="Input";const Mk=Ek,Rk=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Pk=["root"],Ok={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>_a(e)&&"variant"!==e,slot:"Root"},Tk=Aa(uk,Ok)(""),Nk=Aa(Mk,Ok)(""),Lk=Aa(vk,Ok)(""),Ik=r.forwardRef((function(e,t){const n=Oa({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=DS,id:d,input:h,inputProps:p,label:f,labelId:m,MenuProps:g,multiple:v=!1,native:b=!1,onClose:x,onOpen:y,open:w,renderValue:S,SelectDisplayProps:k,variant:j="outlined"}=n,C=(0,rr.A)(n,Rk),_=b?_S:zS,A=Ll({props:n,muiFormControl:Cl(),states:["variant","error"]}),E=A.variant||j,M=(0,bi.A)({},n,{variant:E,classes:a}),R=(e=>{const{classes:t}=e;return t})(M),P=(0,rr.A)(R,Pk),O=h||{standard:(0,Mi.jsx)(Tk,{ownerState:M}),outlined:(0,Mi.jsx)(Nk,{label:f,ownerState:M}),filled:(0,Mi.jsx)(Lk,{ownerState:M})}[E],T=Ya(t,Jx(O));return(0,Mi.jsx)(r.Fragment,{children:r.cloneElement(O,(0,bi.A)({inputComponent:_,inputProps:(0,bi.A)({children:i,error:A.error,IconComponent:u,variant:E,type:void 0,multiple:v},b?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:g,onClose:x,onOpen:y,open:w,renderValue:S,SelectDisplayProps:(0,bi.A)({id:d},k)},p,{classes:p?(0,Ni.A)(P,p.classes):P},h?h.props.inputProps:{})},(v&&b||c)&&"outlined"===E?{notched:!0}:{},{ref:T,className:yi(O.props.className,s,R.root)},!h&&{variant:E},C))})}));Ik.muiName="Select";const zk=Ik;function Dk(e){return ga("MuiListItemIcon",e)}const Fk=va("MuiListItemIcon",["root","alignItemsFlexStart"]);function Bk(e){return ga("MuiListItemText",e)}const Wk=va("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Hk(e){return ga("MuiMenuItem",e)}const Vk=va("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Uk=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],qk=Aa($s,{shouldForwardProp:e=>_a(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},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"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(Vk.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(Vk.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(Vk.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(Vk.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(Vk.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(bb.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(bb.inset)]:{marginLeft:52},["& .".concat(Wk.root)]:{marginTop:0,marginBottom:0},["& .".concat(Wk.inset)]:{paddingLeft:36},["& .".concat(Fk.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,bi.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(Fk.root," svg")]:{fontSize:"1.25rem"}}))})),$k=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:h}=n,p=(0,rr.A)(n,Uk),f=r.useContext(Ow),m=r.useMemo((()=>({dense:a||f.dense||!1,disableGutters:l})),[f.dense,a,l]),g=r.useRef(null);Nb((()=>{o&&g.current&&g.current.focus()}),[o]);const v=(0,bi.A)({},n,{dense:m.dense,divider:s,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Sa({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Hk,a);return(0,bi.A)({},a,s)})(n),x=Ya(g,t);let y;return n.disabled||(y=void 0!==d?d:-1),(0,Mi.jsx)(Ow.Provider,{value:m,children:(0,Mi.jsx)(qk,(0,bi.A)({ref:x,role:u,tabIndex:y,component:i,focusVisibleClassName:yi(b.focusVisible,c),className:yi(b.root,h)},p,{ownerState:v,classes:b}))})}));function Kk(e){return ga("MuiFormHelperText",e)}const Xk=va("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Yk;const Gk=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Qk=Aa("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat(Da(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(Xk.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Xk.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})})),Jk=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p"}=n,a=(0,rr.A)(n,Gk),s=Ll({props:n,muiFormControl:Cl(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,bi.A)({},n,{component:i,contained:"filled"===s.variant||"outlined"===s.variant,variant:s.variant,size:s.size,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return Sa({root:["root",o&&"disabled",i&&"error",r&&"size".concat(Da(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]},Kk,t)})(l);return(0,Mi.jsx)(Qk,(0,bi.A)({as:i,ownerState:l,className:yi(c.root,o),ref:t},a,{children:" "===r?Yk||(Yk=(0,Mi.jsx)("span",{className:"notranslate",children:"\u200b"})):r}))}));function Zk(e){return ga("MuiTextField",e)}va("MuiTextField",["root"]);const ej=["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"],tj={standard:uk,filled:vk,outlined:Mk},nj=Aa(yw,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),rj=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:p,id:f,InputLabelProps:m,inputProps:g,InputProps:v,inputRef:b,label:x,maxRows:y,minRows:w,multiline:S=!1,name:k,onBlur:j,onChange:C,onFocus:_,placeholder:A,required:E=!1,rows:M,select:R=!1,SelectProps:P,type:O,value:T,variant:N="outlined"}=n,L=(0,rr.A)(n,ej),I=(0,bi.A)({},n,{autoFocus:o,color:s,disabled:c,error:u,fullWidth:h,multiline:S,required:E,select:R,variant:N}),z=(e=>{const{classes:t}=e;return Sa({root:["root"]},Zk,t)})(I);const D={};"outlined"===N&&(m&&"undefined"!==typeof m.shrink&&(D.notched=m.shrink),D.label=x),R&&(P&&P.native||(D.id=void 0),D["aria-describedby"]=void 0);const F=Qx(f),B=p&&F?"".concat(F,"-helper-text"):void 0,W=x&&F?"".concat(F,"-label"):void 0,H=tj[N],V=(0,Mi.jsx)(H,(0,bi.A)({"aria-describedby":B,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:h,multiline:S,name:k,rows:M,maxRows:y,minRows:w,type:O,value:T,id:F,inputRef:b,onBlur:j,onChange:C,onFocus:_,placeholder:A,inputProps:g},D,v));return(0,Mi.jsxs)(nj,(0,bi.A)({className:yi(z.root,a),disabled:c,error:u,fullWidth:h,ref:t,required:E,color:s,variant:N,ownerState:I},L,{children:[null!=x&&""!==x&&(0,Mi.jsx)(Pw,(0,bi.A)({htmlFor:F,id:W},m,{children:x})),R?(0,Mi.jsx)(zk,(0,bi.A)({"aria-describedby":B,id:F,labelId:W,value:T,input:V},P,{children:i})):V,p&&(0,Mi.jsx)(Jk,(0,bi.A)({id:B},d,{children:p}))]}))})),oj=rj;function ij(e){return ga("MuiSwitch",e)}const aj=va("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),sj=["className","color","edge","size","sx"],lj=Aa("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat(Da(n.edge))],t["size".concat(Da(n.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(aj.thumb)]:{width:16,height:16},["& .".concat(aj.switchBase)]:{padding:4,["&.".concat(aj.checked)]:{transform:"translateX(16px)"}}}}]}),cj=Aa($l,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(aj.input)]:t.input},"default"!==n.color&&t["color".concat(Da(n.color))]]}})((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(aj.checked)]:{transform:"translateX(20px)"},["&.".concat(aj.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(aj.checked," + .").concat(aj.track)]:{opacity:.5},["&.".concat(aj.disabled," + .").concat(aj.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(aj.input)]:{left:"-100%",width:"300%"}}}),(e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[n]=e;return{props:{color:n},style:{["&.".concat(aj.checked)]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(aj.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,zi.a)(t.palette[n].main,.62):(0,zi.e$)(t.palette[n].main,.55))}},["&.".concat(aj.checked," + .").concat(aj.track)]:{backgroundColor:(t.vars||t).palette[n].main}}}}))]}})),uj=Aa("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}})),dj=Aa("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),hj=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiSwitch"}),{className:r,color:o="primary",edge:i=!1,size:a="medium",sx:s}=n,l=(0,rr.A)(n,sj),c=(0,bi.A)({},n,{color:o,edge:i,size:a}),u=(e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s=Sa({root:["root",n&&"edge".concat(Da(n)),"size".concat(Da(r))],switchBase:["switchBase","color".concat(Da(o)),i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},ij,t);return(0,bi.A)({},t,s)})(c),d=(0,Mi.jsx)(dj,{className:u.thumb,ownerState:c});return(0,Mi.jsxs)(lj,{className:yi(u.root,r),sx:s,ownerState:c,children:[(0,Mi.jsx)(cj,(0,bi.A)({type:"checkbox",icon:d,checkedIcon:d,ref:t,ownerState:c},l,{classes:(0,bi.A)({},u,{root:u.switchBase})})),(0,Mi.jsx)(uj,{className:u.track,ownerState:c})]})})),pj=hj;const fj=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:o,open:i,resumeHideDuration:a}=e,s=ns();r.useEffect((()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==o||o(e,"escapeKeyDown")}}),[i,o]);const l=Qa(((e,t)=>{null==o||o(e,t)})),c=Qa((e=>{o&&null!=e&&s.start(e,(()=>{l(null,"timeout")}))}));r.useEffect((()=>(i&&c(t),s.clear)),[i,t,c,s]);const u=s.clear,d=r.useCallback((()=>{null!=t&&c(null!=a?a:.5*t)}),[t,a,c]),h=e=>t=>{const n=e.onFocus;null==n||n(t),u()},p=e=>t=>{const n=e.onMouseEnter;null==n||n(t),u()},f=e=>t=>{const n=e.onMouseLeave;null==n||n(t),d()};return r.useEffect((()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}}),[n,i,d,u]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,bi.A)({},fc(e),fc(t));return(0,bi.A)({role:"presentation"},t,n,{onBlur:(r=n,e=>{const t=r.onBlur;null==t||t(e),d()}),onFocus:h(n),onMouseEnter:p(n),onMouseLeave:f(n)});var r},onClickAway:e=>{null==o||o(e,"clickaway")}}};function mj(e){return e.substring(2).toLowerCase()}function gj(e){const{children:t,disableReactTree:n=!1,mouseEvent:o="onClick",onClickAway:i,touchEvent:a="onTouchEnd"}=e,s=r.useRef(!1),l=r.useRef(null),c=r.useRef(!1),u=r.useRef(!1);r.useEffect((()=>(setTimeout((()=>{c.current=!0}),0),()=>{c.current=!1})),[]);const d=Xa(Jx(t),l),h=Qa((e=>{const t=u.current;u.current=!1;const r=Lb(l.current);if(!c.current||!l.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(s.current)return void(s.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(l.current)>-1:!r.documentElement.contains(e.target)||l.current.contains(e.target),o||!n&&t||i(e)})),p=e=>n=>{u.current=!0;const r=t.props[e];r&&r(n)},f={ref:d};return!1!==a&&(f[a]=p(a)),r.useEffect((()=>{if(!1!==a){const e=mj(a),t=Lb(l.current),n=()=>{s.current=!0};return t.addEventListener(e,h),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,h),t.removeEventListener("touchmove",n)}}}),[h,a]),!1!==o&&(f[o]=p(o)),r.useEffect((()=>{if(!1!==o){const e=mj(o),t=Lb(l.current);return t.addEventListener(e,h),()=>{t.removeEventListener(e,h)}}}),[h,o]),(0,Mi.jsx)(r.Fragment,{children:r.cloneElement(t,f)})}function vj(e){return ga("MuiSnackbarContent",e)}va("MuiSnackbarContent",["root","message","action"]);const bj=["action","className","message","role"],xj=Aa(Ia,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?.8:.98,r=(0,zi.tL)(t.palette.background.default,n);return(0,bi.A)({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),yj=Aa("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),wj=Aa("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Sj=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiSnackbarContent"}),{action:r,className:o,message:i,role:a="alert"}=n,s=(0,rr.A)(n,bj),l=n,c=(e=>{const{classes:t}=e;return Sa({root:["root"],action:["action"],message:["message"]},vj,t)})(l);return(0,Mi.jsxs)(xj,(0,bi.A)({role:a,square:!0,elevation:6,className:yi(c.root,o),ownerState:l,ref:t},s,{children:[(0,Mi.jsx)(yj,{className:c.message,ownerState:l,children:i}),r?(0,Mi.jsx)(wj,{className:c.action,ownerState:l,children:r}):null]}))}));function kj(e){return ga("MuiSnackbar",e)}va("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const jj=["onEnter","onExited"],Cj=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],_j=Aa("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["anchorOrigin".concat(Da(n.anchorOrigin.vertical)).concat(Da(n.anchorOrigin.horizontal))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:(0,bi.A)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===n.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===n.anchorOrigin.horizontal&&{right:24,left:"auto"})})})),Aj=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiSnackbar"}),o=Nv(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:h,ContentProps:p,disableWindowBlurListener:f=!1,message:m,open:g,TransitionComponent:v=Gw,transitionDuration:b=i,TransitionProps:{onEnter:x,onExited:y}={}}=n,w=(0,rr.A)(n.TransitionProps,jj),S=(0,rr.A)(n,Cj),k=(0,bi.A)({},n,{anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:f,TransitionComponent:v,transitionDuration:b}),j=(e=>{const{classes:t,anchorOrigin:n}=e;return Sa({root:["root","anchorOrigin".concat(Da(n.vertical)).concat(Da(n.horizontal))]},kj,t)})(k),{getRootProps:C,onClickAway:_}=fj((0,bi.A)({},k)),[A,E]=r.useState(!0),M=Ab({elementType:_j,getSlotProps:C,externalForwardedProps:S,ownerState:k,additionalProps:{ref:t},className:[j.root,d]});return!g&&A?null:(0,Mi.jsx)(gj,(0,bi.A)({onClickAway:_},h,{children:(0,Mi.jsx)(_j,(0,bi.A)({},M,{children:(0,Mi.jsx)(v,(0,bi.A)({appear:!0,in:g,timeout:b,direction:"top"===s?"down":"up",onEnter:(e,t)=>{E(!1),x&&x(e,t)},onExited:e=>{E(!0),y&&y(e)}},w,{children:u||(0,Mi.jsx)(Sj,(0,bi.A)({message:m,action:a},p))}))}))}))})),Ej={node:{label:"Node.js Application",scriptLabel:"Script Path",scriptHelp:"Full path to the JavaScript/TypeScript file",defaultExecMode:"fork",supportsCluster:!0},python:{label:"Python Application",scriptLabel:"Python File",scriptHelp:"Full path to the Python file (e.g., app.py)",interpreterEnvVar:"PYTHON_INTERPRETER",defaultExecMode:"fork",supportsCluster:!1,requiresInterpreter:!0,interpreterHelp:"Path to Python interpreter (e.g., /path/to/venv/bin/python)"},dotnet:{label:".NET Application",scriptLabel:"DLL Path",scriptHelp:"Full path to your compiled .dll file",interpreterEnvVar:"DOTNET_COMMAND",defaultExecMode:"fork",supportsCluster:!1},other:{label:"Other Application",scriptLabel:"Script/Binary Path",scriptHelp:"Full path to your executable or script",defaultExecMode:"fork",supportsCluster:!1}},Mj=()=>{var e;const t=lo(),[n,o]=(0,r.useState)(!1),[i,a]=(0,r.useState)(!1),[s,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(""),[h,p]=(0,r.useState)("node"),[f,m]=(0,r.useState)(!0),[g,v]=(0,r.useState)(null),[b,x]=(0,r.useState)(null),[y,w]=(0,r.useState)({name:"",script:"",cwd:"",instances:1,exec_mode:"fork",autorestart:!0,watch:!1,max_memory_restart:"150M",port:""}),[S,k]=(0,r.useState)(""),[j,C]=(0,r.useState)([]),[_,A]=(0,r.useState)({key:"",value:""}),E=e=>{const{name:t,value:n,type:r,checked:o}=e.target;"port"===t&&(k(""),n&&(!/^\d+$/.test(n)||parseInt(n)<1||parseInt(n)>65535)&&k("Port must be a number between 1 and 65535")),w(u(u({},y),{},{[t]:"checkbox"===r?o:n}))},M=e=>{const{name:t,value:n}=e.target;"appType"===t?(p(n),w((e=>u(u({},e),{},{exec_mode:Ej[n].defaultExecMode})))):w(u(u({},y),{},{[t]:n}))},R=(e,t,n)=>{const r=[...j];r[e][t]=n,C(r)},P=(e,t)=>{A(u(u({},_),{},{[e]:t}))};return(0,Mi.jsxs)(wa,{component:"form",onSubmit:async e=>{if(e.preventDefault(),y.port&&(!/^\d+$/.test(y.port)||parseInt(y.port)<1||parseInt(y.port)>65535))return void k("Port must be a number between 1 and 65535");o(!0);const n={};j.forEach((e=>{let{key:t,value:r}=e;t.trim()&&(n[t]=r)}));try{await nr.post("/api/deploy",u(u({},y),{},{env:n,appType:h,autoSetup:f})),l("Application deployed successfully"),o(!1),setTimeout((()=>{t("/processes")}),2e3)}catch(AR){var r,i,a,s,c,p,m,g;if(null!==(r=AR.response)&&void 0!==r&&null!==(i=r.data)&&void 0!==i&&null!==(a=i.error)&&void 0!==a&&a.includes("port")&&null!==(s=AR.response)&&void 0!==s&&null!==(c=s.data)&&void 0!==c&&null!==(p=c.error)&&void 0!==p&&p.includes("use"))d("Port ".concat(y.port," is already in use. Please choose a different port."));else d((null===(m=AR.response)||void 0===m||null===(g=m.data)||void 0===g?void 0:g.error)||"Failed to deploy application");o(!1)}},children:[(0,Mi.jsxs)(Ia,{sx:{p:3,mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h5",gutterBottom:!0,children:"Deploy New Application"}),(0,Mi.jsx)(kb,{sx:{mb:3}})," ",(0,Mi.jsxs)($v,{container:!0,spacing:3,children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsxs)(yw,{fullWidth:!0,margin:"normal",children:[(0,Mi.jsx)(Pw,{children:"Application Type"}),(0,Mi.jsxs)(zk,{name:"appType",value:h,onChange:M,label:"Application Type",children:[(0,Mi.jsx)($k,{value:"node",children:"Node.js Application"}),(0,Mi.jsx)($k,{value:"python",children:"Python Application"}),(0,Mi.jsx)($k,{value:"dotnet",children:".NET Application"}),(0,Mi.jsx)($k,{value:"other",children:"Other"})]})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{required:!0,fullWidth:!0,label:"Application Name",name:"name",value:y.name,onChange:E,margin:"normal"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{required:!0,fullWidth:!0,label:Ej[h].scriptLabel,name:"script",value:y.script,onChange:E,margin:"normal",helperText:Ej[h].scriptHelp})}),(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Working Directory",name:"cwd",value:y.cwd,onChange:E,margin:"normal",helperText:"Leave empty to use the script's directory"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Instances",name:"instances",type:"number",value:y.instances,onChange:E,margin:"normal",helperText:"For load balancing: use >1 for multiple instances, 0 or -1 for max (based on CPU cores)"})}),(0,Mi.jsxs)($v,{item:!0,xs:12,md:6,children:[(0,Mi.jsxs)(yw,{fullWidth:!0,margin:"normal",children:[(0,Mi.jsx)(Pw,{children:"Execution Mode"}),(0,Mi.jsxs)(zk,{name:"exec_mode",value:y.exec_mode,onChange:M,label:"Execution Mode",disabled:!Ej[h].supportsCluster,children:[(0,Mi.jsx)($k,{value:"fork",children:"Fork"}),Ej[h].supportsCluster&&(0,Mi.jsx)($k,{value:"cluster",children:"Cluster (recommended for load balancing)"})]})]}),!Ej[h].supportsCluster&&"fork"===y.exec_mode&&(0,Mi.jsx)(Ol,{variant:"caption",color:"textSecondary",children:"Cluster mode is only available for Node.js applications"})]}),y.instances>1&&(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsxs)(Wc,{severity:"info",children:[(0,Mi.jsx)("strong",{children:"Load Balancing Configuration"}),(0,Mi.jsxs)(Ol,{variant:"body2",children:["You've set up ",y.instances," instances which will enable load balancing for this application.","cluster"===y.exec_mode?" Cluster mode is ideal for load balancing as it shares the server port among instances.":" Consider switching to Cluster mode for better load balancing."]})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:y.autorestart,onChange:E,name:"autorestart"}),label:"Auto Restart"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:y.watch,onChange:E,name:"watch"}),label:"Watch for Changes"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Max Memory Restart",name:"max_memory_restart",value:y.max_memory_restart,onChange:E,margin:"normal",helperText:"e.g. 150M, 1G"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Port",name:"port",value:y.port,onChange:E,margin:"normal",helperText:S||"Application port (e.g., 3000, 8080)",error:!!S})})]}),Ej[h].requiresInterpreter&&(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsx)(Ol,{variant:"h6",sx:{mt:4,mb:2},children:"Interpreter Settings"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),(0,Mi.jsx)($v,{container:!0,spacing:3,children:(0,Mi.jsxs)($v,{item:!0,xs:12,children:[(0,Mi.jsx)(oj,{fullWidth:!0,label:"".concat("python"===h?"Python":""," Interpreter Path"),value:_.key===Ej[h].interpreterEnvVar?_.value:"",onChange:e=>{const t=j.findIndex((e=>e.key===Ej[h].interpreterEnvVar));t>=0?R(t,"value",e.target.value):A({key:Ej[h].interpreterEnvVar||"",value:e.target.value})},margin:"normal",helperText:Ej[h].interpreterHelp||"Path to the interpreter"}),"python"===h&&(0,Mi.jsx)(Wc,{severity:"info",sx:{mt:2},children:(0,Mi.jsx)(Ol,{variant:"body2",children:"For Python applications, it's recommended to use a virtual environment. Enter the path to the Python executable in your virtual environment (e.g., /path/to/venv/bin/python)."})})]})})]}),(0,Mi.jsx)(Ol,{variant:"h6",sx:{mt:4,mb:2},children:"Environment Variables"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),j.map(((e,t)=>(0,Mi.jsxs)(wa,{sx:{display:"flex",mb:2},children:[(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:1},label:"Key",value:e.key,onChange:e=>R(t,"key",e.target.value)}),(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:2},label:"Value",value:e.value,onChange:e=>R(t,"value",e.target.value)}),(0,Mi.jsx)(tl,{variant:"outlined",color:"error",onClick:()=>(e=>{const t=[...j];t.splice(e,1),C(t)})(t),children:"Remove"})]},t))),(0,Mi.jsxs)(wa,{sx:{display:"flex",mt:2},children:[(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:1},label:"New Key",value:_.key,onChange:e=>P("key",e.target.value)}),(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:2},label:"New Value",value:_.value,onChange:e=>P("value",e.target.value)}),(0,Mi.jsx)(tl,{variant:"contained",onClick:()=>{_.key.trim()&&(C([...j,u({},_)]),A({key:"",value:""}))},children:"Add"})]}),(0,Mi.jsxs)($v,{item:!0,xs:12,children:[(0,Mi.jsx)(Ol,{variant:"h6",sx:{mt:2,mb:2},children:"Project Setup"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),(0,Mi.jsxs)($v,{container:!0,spacing:2,alignItems:"center",children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:4,children:(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:f,onChange:e=>m(e.target.checked),name:"autoSetup"}),label:"Auto Setup Project"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:4,children:(0,Mi.jsx)(tl,{variant:"outlined",onClick:async()=>{if(!y.cwd&&!y.script)return void d("Please specify either working directory or script path for project detection");let e=y.cwd;if(!e&&y.script){const t=Math.max(y.script.lastIndexOf("/"),y.script.lastIndexOf("\\"));e=t>0?y.script.substring(0,t):"."}try{a(!0);const n=await nr.post("/api/deploy/detect-project",{projectPath:e});var t;if(n.data.success&&n.data.projectType)v(n.data.projectType),p(n.data.projectType),l("Detected ".concat((null===(t=n.data.config)||void 0===t?void 0:t.name)||n.data.projectType," project"));else v(null),d("Could not auto-detect project type")}catch(AR){var n,r;d((null===(n=AR.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.error)||"Failed to detect project type")}finally{a(!1)}},disabled:i,fullWidth:!0,children:i?(0,Mi.jsx)(iu,{size:20}):"Detect Project Type"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:4,children:(0,Mi.jsx)(tl,{variant:"outlined",onClick:async()=>{if(!y.cwd&&!y.script)return void d("Please specify either working directory or script path");let e=y.cwd;if(!e&&y.script){const t=Math.max(y.script.lastIndexOf("/"),y.script.lastIndexOf("\\"));e=t>0?y.script.substring(0,t):"."}try{a(!0);const n=await nr.post("/api/deploy/setup-project",{projectPath:e,projectType:h});var t;if(n.data.success)x(n.data),l("Project setup completed successfully"),n.data.environment&&Object.entries(n.data.environment).forEach((e=>{let[t,n]=e;j.find((e=>e.key===t))||C((e=>[...e,{key:t,value:n}]))}));else d("Project setup failed: "+(null===(t=n.data.errors)||void 0===t?void 0:t.join(", ")))}catch(AR){var n,r;d((null===(n=AR.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.error)||"Failed to setup project")}finally{a(!1)}},disabled:i||!h,fullWidth:!0,children:i?(0,Mi.jsx)(iu,{size:20}):"Setup Project"})})]}),g&&(0,Mi.jsx)(Wc,{severity:"info",sx:{mt:2},children:(0,Mi.jsxs)(Ol,{variant:"body2",children:[(0,Mi.jsx)("strong",{children:"Detected Project Type:"})," ",g,f&&" (Auto-setup will run during deployment)"]})}),b&&(0,Mi.jsx)(wa,{sx:{mt:2},children:(0,Mi.jsxs)(Wc,{severity:b.success?"success":"warning",children:[(0,Mi.jsxs)(Ol,{variant:"body2",children:[(0,Mi.jsx)("strong",{children:"Setup Status:"})," ",b.success?"Completed":"Completed with warnings"]}),(null===(e=b.warnings)||void 0===e?void 0:e.length)>0&&(0,Mi.jsxs)(Ol,{variant:"caption",display:"block",sx:{mt:1},children:["Warnings: ",b.warnings.join(", ")]})]})})]}),(0,Mi.jsxs)(wa,{sx:{mt:4,display:"flex",justifyContent:"flex-end"},children:[(0,Mi.jsx)(tl,{variant:"outlined",onClick:()=>t("/processes"),sx:{mr:2},children:"Cancel"}),(0,Mi.jsx)(tl,{type:"submit",variant:"contained",color:"primary",disabled:n,children:n?(0,Mi.jsx)(iu,{size:24}):"Deploy Application"})]})]}),(0,Mi.jsx)(Aj,{open:!!c,autoHideDuration:6e3,onClose:()=>d(""),children:(0,Mi.jsx)(Wc,{severity:"error",children:c})}),(0,Mi.jsx)(Aj,{open:!!s,autoHideDuration:6e3,onClose:()=>l(""),children:(0,Mi.jsx)(Wc,{severity:"success",children:s})})]})};function Rj(e){return ga("MuiListItem",e)}const Pj=va("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);const Oj=va("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Tj(e){return ga("MuiListItemSecondaryAction",e)}va("MuiListItemSecondaryAction",["root","disableGutters"]);const Nj=["className"],Lj=Aa("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})})),Ij=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiListItemSecondaryAction"}),{className:o}=n,i=(0,rr.A)(n,Nj),a=r.useContext(Ow),s=(0,bi.A)({},n,{disableGutters:a.disableGutters}),l=(e=>{const{disableGutters:t,classes:n}=e;return Sa({root:["root",t&&"disableGutters"]},Tj,n)})(s);return(0,Mi.jsx)(Lj,(0,bi.A)({className:yi(l.root,o),ownerState:s,ref:t},i))}));Ij.muiName="ListItemSecondaryAction";const zj=Ij,Dj=["className"],Fj=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Bj=Aa("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!n.disablePadding&&(0,bi.A)({paddingTop:8,paddingBottom:8},n.dense&&{paddingTop:4,paddingBottom:4},!n.disableGutters&&{paddingLeft:16,paddingRight:16},!!n.secondaryAction&&{paddingRight:48}),!!n.secondaryAction&&{["& > .".concat(Oj.root)]:{paddingRight:48}},{["&.".concat(Pj.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(Pj.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(Pj.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(Pj.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===n.alignItems&&{alignItems:"flex-start"},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},n.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"}},["&.".concat(Pj.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},n.hasSecondaryAction&&{paddingRight:48})})),Wj=Aa("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Hj=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiListItem"}),{alignItems:o="center",autoFocus:i=!1,button:a=!1,children:s,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:h="li",ContainerProps:{className:p}={},dense:f=!1,disabled:m=!1,disableGutters:g=!1,disablePadding:v=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:y,selected:w=!1,slotProps:S={},slots:k={}}=n,j=(0,rr.A)(n.ContainerProps,Dj),C=(0,rr.A)(n,Fj),_=r.useContext(Ow),A=r.useMemo((()=>({dense:f||_.dense||!1,alignItems:o,disableGutters:g})),[o,_.dense,f,g]),E=r.useRef(null);Nb((()=>{i&&E.current&&E.current.focus()}),[i]);const M=r.Children.toArray(s),R=M.length&&mw(M[M.length-1],["ListItemSecondaryAction"]),P=(0,bi.A)({},n,{alignItems:o,autoFocus:i,button:a,dense:A.dense,disabled:m,disableGutters:g,disablePadding:v,divider:b,hasSecondaryAction:R,selected:w}),O=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e;return Sa({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Rj,r)})(P),T=Ya(E,t),N=k.root||u.Root||Bj,L=S.root||d.root||{},I=(0,bi.A)({className:yi(O.root,L.className,l),disabled:m},C);let z=c||"li";return a&&(I.component=c||"div",I.focusVisibleClassName=yi(Pj.focusVisible,x),z=$s),R?(z=I.component||c?z:"div","li"===h&&("li"===z?z="div":"li"===I.component&&(I.component="div")),(0,Mi.jsx)(Ow.Provider,{value:A,children:(0,Mi.jsxs)(Wj,(0,bi.A)({as:h,className:yi(O.container,p),ref:T,ownerState:P},j,{children:[(0,Mi.jsx)(N,(0,bi.A)({},L,!dc(N)&&{as:z,ownerState:(0,bi.A)({},P,L.ownerState)},I,{children:M})),M.pop()]}))})):(0,Mi.jsx)(Ow.Provider,{value:A,children:(0,Mi.jsxs)(N,(0,bi.A)({},L,{as:z,ref:T},!dc(N)&&{ownerState:(0,bi.A)({},P,L.ownerState)},I,{children:[M,y&&(0,Mi.jsx)(zj,{children:y})]}))})})),Vj=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Uj=Aa("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Wk.primary)]:t.primary},{["& .".concat(Wk.secondary)]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})})),qj=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=n,h=(0,rr.A)(n,Vj),{dense:p}=r.useContext(Ow);let f=null!=l?l:o,m=u;const g=(0,bi.A)({},n,{disableTypography:a,inset:s,primary:!!f,secondary:!!m,dense:p}),v=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Sa({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Bk,t)})(g);return null==f||f.type===Ol||a||(f=(0,Mi.jsx)(Ol,(0,bi.A)({variant:p?"body2":"body1",className:v.primary,component:null!=c&&c.variant?void 0:"span",display:"block"},c,{children:f}))),null==m||m.type===Ol||a||(m=(0,Mi.jsx)(Ol,(0,bi.A)({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:m}))),(0,Mi.jsxs)(Uj,(0,bi.A)({className:yi(v.root,i),ownerState:g,ref:t},h,{children:[f,m]}))})),$j=Jl((0,Mi.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Kj=()=>{const[e,t]=(0,r.useState)([]),[n,o]=(0,r.useState)(!0),[i,a]=(0,r.useState)(!1),[s,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(!1),[d,h]=(0,r.useState)(""),[p,f]=(0,r.useState)("");(0,r.useEffect)((()=>{m()}),[]);const m=async()=>{try{o(!0);const e=await nr.get("/api/modules");t(e.data),o(!1)}catch(AR){var e,n;h((null===(e=AR.response)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.error)||"Failed to fetch modules"),o(!1)}};return(0,Mi.jsxs)(wa,{children:[(0,Mi.jsxs)(Ia,{sx:{p:3,mb:3},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h5",children:"PM2 Modules"}),(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(tl,{variant:"outlined",startIcon:(0,Mi.jsx)(vx,{}),onClick:m,sx:{mr:2},disabled:n,children:"Refresh"}),(0,Mi.jsx)(tl,{variant:"contained",startIcon:(0,Mi.jsx)($j,{}),onClick:()=>a(!0),children:"Install Module"})]})]}),n?(0,Mi.jsx)(wa,{sx:{display:"flex",justifyContent:"center",p:3},children:(0,Mi.jsx)(iu,{})}):0===e.length?(0,Mi.jsx)(Wc,{severity:"info",children:"No PM2 modules installed"}):(0,Mi.jsx)(Iw,{children:e.map((e=>{return(0,Mi.jsxs)(Hj,{divider:!0,children:[(0,Mi.jsx)(qj,{primary:e.name,secondary:"Version: ".concat(e.version)}),(0,Mi.jsx)(gb,{label:e.status,color:(t=e.status,t.toLowerCase().includes("online")||t.toLowerCase().includes("enabled")?"success":t.toLowerCase().includes("error")||t.toLowerCase().includes("disabled")?"error":"warning"),size:"small",sx:{mr:2}}),(0,Mi.jsx)(zj,{children:(0,Mi.jsx)(Ec,{edge:"end",color:"error",onClick:()=>(async e=>{try{await nr.delete("/api/modules/".concat(e)),f("Successfully uninstalled module: ".concat(e)),m()}catch(AR){var t,n;h((null===(t=AR.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error)||"Failed to uninstall module")}})(e.name),children:(0,Mi.jsx)(bx,{})})})]},e.name);var t}))})]}),(0,Mi.jsxs)(Ky,{open:i,onClose:()=>a(!1),children:[(0,Mi.jsx)(Jy,{children:"Install PM2 Module"}),(0,Mi.jsx)(nw,{children:(0,Mi.jsx)(oj,{autoFocus:!0,margin:"dense",label:"Module Name",fullWidth:!0,variant:"outlined",value:s,onChange:e=>l(e.target.value),helperText:"e.g. pm2-logrotate, pm2-server-monit"})}),(0,Mi.jsxs)(uw,{children:[(0,Mi.jsx)(tl,{onClick:()=>a(!1),children:"Cancel"}),(0,Mi.jsx)(tl,{onClick:async()=>{if(s.trim())try{u(!0),await nr.post("/api/modules/install",{moduleName:s}),f("Successfully installed module: ".concat(s)),l(""),a(!1),m()}catch(AR){var e,t;h((null===(e=AR.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error)||"Failed to install module")}finally{u(!1)}else h("Module name is required")},variant:"contained",color:"primary",disabled:c,children:c?(0,Mi.jsx)(iu,{size:24}):"Install"})]})]}),(0,Mi.jsx)(Aj,{open:!!d,autoHideDuration:6e3,onClose:()=>h(""),children:(0,Mi.jsx)(Wc,{severity:"error",children:d})}),(0,Mi.jsx)(Aj,{open:!!p,autoHideDuration:6e3,onClose:()=>f(""),children:(0,Mi.jsx)(Wc,{severity:"success",children:p})})]})},Xj=()=>{const[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(""),[i,a]=(0,r.useState)(""),[s,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!0),m=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{if(t(!0),e){const e=await nr.get("/api/deploy/generate-ecosystem-preview");u(e.data.content),h(!0)}else{const e=await nr.post("/api/deploy/generate-ecosystem",{path:n.trim()||void 0,includeAllProcesses:p});a("Ecosystem file generated successfully at: ".concat(e.data.path))}}catch(AR){var r,o;l((null===(r=AR.response)||void 0===r||null===(o=r.data)||void 0===o?void 0:o.error)||"Failed to generate ecosystem file")}finally{t(!1)}};return(0,Mi.jsxs)(wa,{children:[(0,Mi.jsxs)(Ia,{sx:{p:3,mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h5",gutterBottom:!0,children:"Ecosystem File Generator"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),(0,Mi.jsx)(Wc,{severity:"info",sx:{mb:3},children:"Generate an ecosystem.config.js file from your current PM2 processes. This file can be used to easily deploy and manage your processes across different environments."}),(0,Mi.jsxs)(wa,{component:"form",onSubmit:e=>{e.preventDefault(),m(!1)},children:[(0,Mi.jsx)(oj,{fullWidth:!0,label:"File Path (Optional)",placeholder:"e.g. /path/to/ecosystem.config.js",value:n,onChange:e=>{o(e.target.value)},margin:"normal",helperText:"Leave empty to generate in current directory"}),(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(uc,{checked:p,onChange:e=>f(e.target.checked)}),label:"Include all processes (even stopped ones)",sx:{mb:2,display:"block"}}),(0,Mi.jsxs)(wa,{sx:{mt:3,display:"flex",justifyContent:"space-between"},children:[(0,Mi.jsx)(tl,{variant:"outlined",onClick:()=>{m(!0)},disabled:e,children:"Preview"}),(0,Mi.jsx)(tl,{type:"submit",variant:"contained",color:"primary",disabled:e,children:e?(0,Mi.jsx)(iu,{size:24}):"Generate Ecosystem File"})]})]})]}),(0,Mi.jsxs)(Ky,{open:d,onClose:()=>h(!1),maxWidth:"md",fullWidth:!0,children:[(0,Mi.jsx)(Jy,{children:"Ecosystem File Preview"}),(0,Mi.jsx)(nw,{children:(0,Mi.jsx)(wa,{component:"pre",sx:{p:2,borderRadius:1,bgcolor:"#f5f5f5",overflowX:"auto",fontSize:"0.875rem"},children:c})}),(0,Mi.jsxs)(uw,{children:[(0,Mi.jsx)(tl,{onClick:()=>h(!1),children:"Close"}),(0,Mi.jsx)(tl,{variant:"contained",color:"primary",onClick:()=>{h(!1),m(!1)},children:"Generate File"})]})]}),(0,Mi.jsx)(Aj,{open:!!s,autoHideDuration:6e3,onClose:()=>l(""),children:(0,Mi.jsx)(Wc,{severity:"error",children:s})}),(0,Mi.jsx)(Aj,{open:!!i,autoHideDuration:6e3,onClose:()=>a(""),children:(0,Mi.jsx)(Wc,{severity:"success",children:i})})]})},Yj=e=>{let{procId:t}=e;const n=co(),o=t||Number(n.id),[i,a]=(0,r.useState)(null),[s,l]=(0,r.useState)(!0),[c,d]=(0,r.useState)(""),[h,p]=(0,r.useState)(""),[f,m]=(0,r.useState)([]),[g,v]=(0,r.useState)(""),[b,x]=(0,r.useState)(""),y=lo();(0,r.useEffect)((()=>{(async()=>{try{l(!0);const e=await nr.get("/api/config/".concat(o));a(e.data),m(Object.keys(e.data.env||{})),l(!1)}catch(AR){d("Failed to fetch configuration for process ".concat(o)),l(!1)}})()}),[o]);const w=e=>{const{name:t,value:n,type:r,checked:o}=e.target;a((e=>e?u(u({},e),{},{[t]:"checkbox"===r?o:n}):e))};return s?(0,Mi.jsx)(Ol,{children:"Loading configuration..."}):i?(0,Mi.jsxs)(wa,{children:[(0,Mi.jsxs)(Ia,{sx:{p:3,mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h5",gutterBottom:!0,children:"Process Configuration"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),(0,Mi.jsxs)($v,{container:!0,spacing:3,children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Name",name:"name",value:i.name,onChange:w,margin:"normal"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Script Path",name:"script",value:i.script,onChange:w,margin:"normal"})}),(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Current Working Directory",name:"cwd",value:i.cwd,onChange:w,margin:"normal"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Instances",name:"instances",type:"number",value:i.instances,onChange:w,margin:"normal"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsxs)(yw,{fullWidth:!0,margin:"normal",children:[(0,Mi.jsx)(Pw,{children:"Execution Mode"}),(0,Mi.jsxs)(zk,{name:"exec_mode",value:i.exec_mode,onChange:e=>{const{name:t,value:n}=e.target;a((e=>e?u(u({},e),{},{[t]:n}):e))},label:"Execution Mode",children:[(0,Mi.jsx)($k,{value:"fork",children:"Fork"}),(0,Mi.jsx)($k,{value:"cluster",children:"Cluster"})]})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:i.autorestart,onChange:w,name:"autorestart"}),label:"Auto Restart"})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:i.watch,onChange:w,name:"watch"}),label:"Watch for Changes"})}),(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Max Memory Restart",name:"max_memory_restart",value:i.max_memory_restart,onChange:w,margin:"normal",helperText:"e.g. 150M, 1G"})})]}),(0,Mi.jsx)(Ol,{variant:"h6",sx:{mt:4,mb:2},children:"Environment Variables"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),f.map((e=>(0,Mi.jsxs)(wa,{sx:{display:"flex",mb:2},children:[(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:1},label:"Key",value:e,disabled:!0}),(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:2},label:"Value",value:i.env[e],onChange:t=>((e,t)=>{a((n=>n?u(u({},n),{},{env:u(u({},n.env),{},{[e]:t})}):n))})(e,t.target.value)}),(0,Mi.jsx)(tl,{variant:"outlined",color:"error",onClick:()=>(e=>{a((t=>{if(!t)return t;const n=u({},t.env);return delete n[e],u(u({},t),{},{env:n})})),m(f.filter((t=>t!==e)))})(e),children:"Remove"})]},e))),(0,Mi.jsxs)(wa,{sx:{display:"flex",mt:2},children:[(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:1},label:"New Key",value:g,onChange:e=>v(e.target.value)}),(0,Mi.jsx)(oj,{sx:{mr:1,flexGrow:2},label:"New Value",value:b,onChange:e=>x(e.target.value)}),(0,Mi.jsx)(tl,{variant:"contained",onClick:()=>{g.trim()&&(a((e=>e?u(u({},e),{},{env:u(u({},e.env),{},{[g]:b})}):e)),m((e=>[...e,g])),v(""),x(""))},children:"Add"})]}),(0,Mi.jsxs)(wa,{sx:{mt:4,display:"flex",justifyContent:"flex-end"},children:[(0,Mi.jsx)(tl,{variant:"contained",color:"primary",onClick:async()=>{try{await nr.post("/api/config/".concat(o),i),p("Configuration saved successfully")}catch(AR){d("Failed to save configuration")}},sx:{mr:2},children:"Save Configuration"}),(0,Mi.jsx)(tl,{variant:"outlined",onClick:()=>y("/processes"),children:"Cancel"})]})]}),(0,Mi.jsx)(Aj,{open:!!c,autoHideDuration:6e3,onClose:()=>d(""),children:(0,Mi.jsx)(Wc,{severity:"error",children:c})}),(0,Mi.jsx)(Aj,{open:!!h,autoHideDuration:6e3,onClose:()=>p(""),children:(0,Mi.jsx)(Wc,{severity:"success",children:h})})]}):(0,Mi.jsx)(Ol,{color:"error",children:"Configuration not found"})};function Gj(e){return ga("MuiTableContainer",e)}va("MuiTableContainer",["root"]);const Qj=["className","component"],Jj=Aa("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Zj=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTableContainer"}),{className:r,component:o="div"}=n,i=(0,rr.A)(n,Qj),a=(0,bi.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return Sa({root:["root"]},Gj,t)})(a);return(0,Mi.jsx)(Jj,(0,bi.A)({ref:t,as:o,className:yi(s.root,r),ownerState:a},i))}));const eC=r.createContext();function tC(e){return ga("MuiTable",e)}va("MuiTable",["root","stickyHeader"]);const nC=["className","component","padding","size","stickyHeader"],rC=Aa("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,bi.A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})})),oC="table",iC=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTable"}),{className:o,component:i=oC,padding:a="normal",size:s="medium",stickyHeader:l=!1}=n,c=(0,rr.A)(n,nC),u=(0,bi.A)({},n,{component:i,padding:a,size:s,stickyHeader:l}),d=(e=>{const{classes:t,stickyHeader:n}=e;return Sa({root:["root",n&&"stickyHeader"]},tC,t)})(u),h=r.useMemo((()=>({padding:a,size:s,stickyHeader:l})),[a,s,l]);return(0,Mi.jsx)(eC.Provider,{value:h,children:(0,Mi.jsx)(rC,(0,bi.A)({as:i,role:i===oC?null:"table",ref:t,className:yi(d.root,o),ownerState:u},c))})}));const aC=r.createContext();function sC(e){return ga("MuiTableHead",e)}va("MuiTableHead",["root"]);const lC=["className","component"],cC=Aa("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),uC={variant:"head"},dC="thead",hC=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTableHead"}),{className:r,component:o=dC}=n,i=(0,rr.A)(n,lC),a=(0,bi.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return Sa({root:["root"]},sC,t)})(a);return(0,Mi.jsx)(aC.Provider,{value:uC,children:(0,Mi.jsx)(cC,(0,bi.A)({as:o,className:yi(s.root,r),ref:t,role:o===dC?null:"rowgroup",ownerState:a},i))})}));function pC(e){return ga("MuiTableRow",e)}const fC=va("MuiTableRow",["root","selected","hover","head","footer"]),mC=["className","component","hover","selected"],gC=Aa("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,["&.".concat(fC.hover,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(fC.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}})),vC="tr",bC=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTableRow"}),{className:o,component:i=vC,hover:a=!1,selected:s=!1}=n,l=(0,rr.A)(n,mC),c=r.useContext(aC),u=(0,bi.A)({},n,{component:i,hover:a,selected:s,head:c&&"head"===c.variant,footer:c&&"footer"===c.variant}),d=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return Sa({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},pC,t)})(u);return(0,Mi.jsx)(gC,(0,bi.A)({as:i,ref:t,className:yi(d.root,o),role:i===vC?null:"row",ownerState:u},l))})),xC=bC;function yC(e){return ga("MuiTableCell",e)}const wC=va("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),SC=["align","className","component","padding","scope","size","sortDirection","variant"],kC=Aa("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat(Da(n.size))],"normal"!==n.padding&&t["padding".concat(Da(n.padding))],"inherit"!==n.align&&t["align".concat(Da(n.align))],n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n ".concat("light"===t.palette.mode?(0,zi.a)((0,zi.X4)(t.palette.divider,1),.88):(0,zi.e$)((0,zi.X4)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",["&.".concat(wC.paddingCheckbox)]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),jC=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d}=n,h=(0,rr.A)(n,SC),p=r.useContext(eC),f=r.useContext(aC),m=f&&"head"===f.variant;let g;g=a||(m?"th":"td");let v=l;"td"===g?v=void 0:!v&&m&&(v="col");const b=d||f&&f.variant,x=(0,bi.A)({},n,{align:o,component:g,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:"head"===b&&p&&p.stickyHeader,variant:b}),y=(e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e;return Sa({root:["root",n,a&&"stickyHeader","inherit"!==r&&"align".concat(Da(r)),"normal"!==o&&"padding".concat(Da(o)),"size".concat(Da(i))]},yC,t)})(x);let w=null;return u&&(w="asc"===u?"ascending":"descending"),(0,Mi.jsx)(kC,(0,bi.A)({as:g,ref:t,className:yi(y.root,i),"aria-sort":w,scope:v,ownerState:x},h))})),CC=jC;function _C(e){return ga("MuiTableBody",e)}va("MuiTableBody",["root"]);const AC=["className","component"],EC=Aa("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),MC={variant:"body"},RC="tbody",PC=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiTableBody"}),{className:r,component:o=RC}=n,i=(0,rr.A)(n,AC),a=(0,bi.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return Sa({root:["root"]},_C,t)})(a);return(0,Mi.jsx)(aC.Provider,{value:MC,children:(0,Mi.jsx)(EC,(0,bi.A)({className:yi(s.root,r),as:o,ref:t,role:o===RC?null:"rowgroup",ownerState:a},i))})})),OC=e=>{var t,n;let{processes:o,onRefresh:i}=e;const[a,s]=(0,r.useState)(""),[l,c]=(0,r.useState)([]),[u,d]=(0,r.useState)(1),[h,p]=(0,r.useState)(!1),[f,m]=(0,r.useState)(""),[g,v]=(0,r.useState)("");(0,r.useEffect)((()=>{a&&b(a)}),[a]);const b=async e=>{try{p(!0);const t=await nr.get("/api/cluster/".concat(e));c([t.data]),d(t.data.instances||1),p(!1)}catch(AR){v("Failed to fetch cluster information"),p(!1)}},x=async e=>{if(a)try{p(!0),await nr.post("/api/cluster/".concat(a,"/exec-mode"),{mode:e}),await b(a),m("Execution mode changed to ".concat(e)),i(),p(!1)}catch(AR){v("Failed to change execution mode"),p(!1)}};return(0,Mi.jsxs)(wa,{children:[" ",(0,Mi.jsxs)(Ia,{sx:{p:3,mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h5",gutterBottom:!0,children:"Cluster Management"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),(0,Mi.jsx)(Wc,{severity:"info",sx:{mb:3},children:(0,Mi.jsxs)(Ol,{variant:"body1",children:[(0,Mi.jsx)("strong",{children:"Load Balancing with PM2"}),": To enable load balancing for your application, set multiple instances and use cluster mode. This will distribute incoming requests across all instances of your application automatically."]})}),(0,Mi.jsx)($v,{container:!0,spacing:2,sx:{mb:4},children:(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsxs)(yw,{fullWidth:!0,children:[(0,Mi.jsx)(Pw,{children:"Select Process"}),(0,Mi.jsx)(zk,{value:a,onChange:e=>{s(e.target.value)},label:"Select Process",children:o.map((e=>(0,Mi.jsxs)($k,{value:e.pm_id,children:[e.name," (ID: ",e.pm_id,")"]},e.pm_id)))})]})})}),h?(0,Mi.jsx)(wa,{sx:{display:"flex",justifyContent:"center",my:4},children:(0,Mi.jsx)(iu,{})}):a?(0,Mi.jsx)(Mi.Fragment,{children:l.length>0&&(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsx)(Zj,{component:Ia,sx:{mb:4},children:(0,Mi.jsxs)(iC,{children:[(0,Mi.jsx)(hC,{children:(0,Mi.jsxs)(xC,{children:[(0,Mi.jsx)(CC,{children:"ID"}),(0,Mi.jsx)(CC,{children:"Name"}),(0,Mi.jsx)(CC,{children:"Instances"}),(0,Mi.jsx)(CC,{children:"Exec Mode"}),(0,Mi.jsx)(CC,{children:"Status"})]})}),(0,Mi.jsx)(PC,{children:l.map((e=>(0,Mi.jsxs)(xC,{children:[(0,Mi.jsx)(CC,{children:e.pm_id}),(0,Mi.jsx)(CC,{children:e.name}),(0,Mi.jsx)(CC,{children:e.instances}),(0,Mi.jsx)(CC,{children:e.exec_mode}),(0,Mi.jsx)(CC,{children:e.isCluster?"Cluster Mode":"Fork Mode"})]},e.pm_id)))})]})}),(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"Scale Process"}),(0,Mi.jsxs)($v,{container:!0,spacing:2,alignItems:"center",sx:{mb:4},children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:4,children:(0,Mi.jsx)(oj,{fullWidth:!0,type:"number",label:"Number of Instances",value:u,onChange:e=>d(Number(e.target.value)),InputProps:{inputProps:{min:0},startAdornment:(0,Mi.jsx)(Pw,{sx:{mr:1},children:"Instances:"})}})}),(0,Mi.jsx)($v,{item:!0,children:(0,Mi.jsx)(tl,{variant:"contained",color:"primary",onClick:async()=>{if(a&&!(u<0))try{p(!0),await nr.post("/api/cluster/".concat(a,"/scale"),{instances:u}),await b(a),m("Successfully scaled process to ".concat(u," instances")),i(),p(!1)}catch(AR){v("Failed to scale process"),p(!1)}},startIcon:(0,Mi.jsx)(vx,{}),children:"Scale"})})," "]}),(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"Change Execution Mode"}),(0,Mi.jsxs)($v,{container:!0,spacing:2,children:[(0,Mi.jsx)($v,{item:!0,children:(0,Mi.jsx)(tl,{variant:"outlined",onClick:()=>x("fork"),disabled:!(null!==(t=l[0])&&void 0!==t&&t.isCluster),children:"Switch to Fork Mode"})}),(0,Mi.jsx)($v,{item:!0,children:(0,Mi.jsx)(tl,{variant:"outlined",onClick:()=>x("cluster"),disabled:null===(n=l[0])||void 0===n?void 0:n.isCluster,children:"Switch to Cluster Mode"})})]}),(0,Mi.jsx)(Ol,{variant:"h6",sx:{mt:4},gutterBottom:!0,children:"Zero-Downtime Reload"}),(0,Mi.jsx)($v,{container:!0,spacing:2,children:(0,Mi.jsxs)($v,{item:!0,xs:12,children:[(0,Mi.jsx)(Ol,{variant:"body2",sx:{mb:2},children:"Reload all instances one by one for zero-downtime updates. This is especially useful when you've updated your application code and want to apply changes without service interruption."}),(0,Mi.jsx)(tl,{variant:"contained",color:"secondary",onClick:async()=>{if(a)try{p(!0),await nr.post("/api/cluster/".concat(a,"/reload")),m("Process reloaded with zero downtime"),i(),p(!1)}catch(AR){v("Failed to reload process"),p(!1)}},children:"Graceful Reload All Instances"})]})})]})}):(0,Mi.jsx)(Ol,{variant:"body1",sx:{textAlign:"center",py:4},children:"Select a process to view cluster information"})]}),(0,Mi.jsx)(Aj,{open:!!g,autoHideDuration:6e3,onClose:()=>v(""),children:(0,Mi.jsx)(Wc,{severity:"error",children:g})}),(0,Mi.jsx)(Aj,{open:!!f,autoHideDuration:6e3,onClose:()=>m(""),children:(0,Mi.jsx)(Wc,{severity:"success",children:f})})]})},TC=Jl((0,Mi.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),NC=Jl((0,Mi.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),LC=Jl((0,Mi.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),IC=e=>{let{processId:t,logType:n="out"}=e;const o=co(),i=lo(),a=o.id?Number(o.id):t?Number(t):null,s=Nv(),l=(0,r.useRef)(null),[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!0),[p,f]=(0,r.useState)(""),[m,g]=(0,r.useState)(!0),[v,b]=(0,r.useState)(""),[x,y]=(0,r.useState)(!1),[w,S]=(0,r.useState)([]),[k,j]=(0,r.useState)(a),[C,_]=(0,r.useState)(n),A=(0,r.useRef)(null);(0,r.useEffect)((()=>{(async()=>{try{const e=(await nr.get("/api/processes")).data.map((e=>({id:e.pm_id,name:e.name})));S(e),!a&&e.length>0&&j(e[0].id)}catch(AR){f("Failed to fetch available processes")}})()}),[a]),(0,r.useEffect)((()=>{if(!k)return;(async()=>{try{h(!0);const e=await nr.get("/api/logs/".concat(k,"/").concat(C));u(e.data.logs||[]),h(!1)}catch(AR){var e,t;f((null===(e=AR.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error)||"Failed to fetch logs"),h(!1)}})();const e=Oe();return A.current=e,e.on("connect",(()=>{console.log("Socket connected"),e.emit("subscribe-logs",{processId:k,logType:C}),y(!0)})),e.on("log-line",(e=>{e.processId===k&&e.logType===C&&u((t=>[...t,e.line]))})),()=>{e&&(e.emit("unsubscribe-logs",{processId:k,logType:C}),e.disconnect())}}),[k,C]),(0,r.useEffect)((()=>{m&&l.current&&(l.current.scrollTop=l.current.scrollHeight)}),[c,m]);const E=v?c.filter((e=>e.toLowerCase().includes(v.toLowerCase()))):c;return(0,Mi.jsx)(wa,{children:(0,Mi.jsxs)(Ia,{sx:{p:2,mb:3},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},mb:2},children:[(0,Mi.jsx)(Ol,{variant:"h6",sx:{mb:{xs:2,md:0}},children:"Log Streaming"}),(0,Mi.jsxs)(wa,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:[(0,Mi.jsxs)(yw,{sx:{minWidth:150},size:"small",children:[(0,Mi.jsx)(Pw,{children:"Process"}),(0,Mi.jsx)(zk,{value:(null===k||void 0===k?void 0:k.toString())||"",onChange:e=>{const t=Number(e.target.value);j(t),i("/logs/".concat(t))},label:"Process",disabled:0===w.length,children:w.map((e=>(0,Mi.jsxs)($k,{value:e.id,children:[e.name," (ID: ",e.id,")"]},e.id)))})]}),(0,Mi.jsxs)(yw,{sx:{minWidth:120},size:"small",children:[(0,Mi.jsx)(Pw,{children:"Log Type"}),(0,Mi.jsxs)(zk,{value:C,onChange:e=>{_(e.target.value)},label:"Log Type",children:[(0,Mi.jsx)($k,{value:"out",children:"Standard"}),(0,Mi.jsx)($k,{value:"err",children:"Error"})]})]}),(0,Mi.jsxs)(tl,{variant:"outlined",size:"small",color:x?"error":"primary",onClick:()=>{k&&(x?A.current&&A.current.emit("unsubscribe-logs",{processId:k,logType:C}):A.current&&A.current.emit("subscribe-logs",{processId:k,logType:C}),y(!x))},disabled:!k,children:[x?"Stop":"Start"," Stream"]})]})]}),(0,Mi.jsxs)(wa,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",mb:2,gap:1},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[(0,Mi.jsx)(TC,{sx:{color:"action.active",mr:1}}),(0,Mi.jsx)(oj,{fullWidth:!0,size:"small",placeholder:"Filter logs...",value:v,onChange:e=>b(e.target.value)})]}),(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center"},children:[(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:m,onChange:e=>g(e.target.checked),color:"primary"}),label:"Auto-scroll"}),(0,Mi.jsx)(Ec,{onClick:async()=>{if(k)try{h(!0);const e=await nr.get("/api/logs/".concat(k,"/").concat(C));u(e.data.logs||[]),h(!1)}catch(AR){var e,t;f((null===(e=AR.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error)||"Failed to fetch logs"),h(!1)}},size:"small",children:(0,Mi.jsx)(vx,{})}),(0,Mi.jsx)(Ec,{onClick:()=>{u([])},size:"small",children:(0,Mi.jsx)(NC,{})}),(0,Mi.jsx)(Ec,{onClick:()=>{var e;if(!k)return;const t=c.join("\n"),n=new Blob([t],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(n),o=(null===(e=w.find((e=>e.id===k)))||void 0===e?void 0:e.name)||k,i="".concat(o,"-").concat(C,".log"),a=document.createElement("a");a.href=r,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)},size:"small",disabled:!k||0===c.length,children:(0,Mi.jsx)(LC,{})})]})]}),(0,Mi.jsx)(kb,{}),d?(0,Mi.jsx)(wa,{sx:{display:"flex",justifyContent:"center",p:3},children:(0,Mi.jsx)(iu,{})}):p?(0,Mi.jsx)(Wc,{severity:"error",sx:{mt:2},children:p}):k?(0,Mi.jsxs)(wa,{ref:l,sx:{mt:2,height:"400px",overflowY:"auto",backgroundColor:"dark"===s.palette.mode?"#1e1e1e":"#f5f5f5",p:2,borderRadius:1,fontFamily:"monospace",fontSize:"0.875rem",whiteSpace:"pre-wrap",wordBreak:"break-all"},children:[0===E.length?(0,Mi.jsx)(Ol,{variant:"body2",sx:{color:"text.secondary",fontStyle:"italic"},children:"No logs available"}):E.map(((e,t)=>(0,Mi.jsx)(wa,{component:"div",sx:{mb:.5,color:"err"===C||e.toLowerCase().includes("error")?"error.main":e.toLowerCase().includes("warn")?"warning.main":"text.primary"},children:e},t))),x&&(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"center",mt:2},children:[(0,Mi.jsx)(iu,{size:16,sx:{mr:1}}),(0,Mi.jsx)(Ol,{variant:"body2",sx:{color:"text.secondary"},children:"Streaming logs..."})]})]}):(0,Mi.jsx)(wa,{sx:{display:"flex",justifyContent:"center",p:5},children:(0,Mi.jsx)(Ol,{variant:"body1",color:"text.secondary",children:"Please select a process to view logs"})})]})})};var zC=n(2374);function DC(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function FC(e){return e instanceof DC(e).Element||e instanceof Element}function BC(e){return e instanceof DC(e).HTMLElement||e instanceof HTMLElement}function WC(e){return"undefined"!==typeof ShadowRoot&&(e instanceof DC(e).ShadowRoot||e instanceof ShadowRoot)}var HC=Math.max,VC=Math.min,UC=Math.round;function qC(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function $C(){return!/^((?!chrome|android).)*safari/i.test(qC())}function KC(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&BC(e)&&(o=e.offsetWidth>0&&UC(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&UC(r.height)/e.offsetHeight||1);var a=(FC(e)?DC(e):window).visualViewport,s=!$C()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function XC(e){var t=DC(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function YC(e){return e?(e.nodeName||"").toLowerCase():null}function GC(e){return((FC(e)?e.ownerDocument:e.document)||window.document).documentElement}function QC(e){return KC(GC(e)).left+XC(e).scrollLeft}function JC(e){return DC(e).getComputedStyle(e)}function ZC(e){var t=JC(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function e_(e,t,n){void 0===n&&(n=!1);var r=BC(t),o=BC(t)&&function(e){var t=e.getBoundingClientRect(),n=UC(t.width)/e.offsetWidth||1,r=UC(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=GC(t),a=KC(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==YC(t)||ZC(i))&&(s=function(e){return e!==DC(e)&&BC(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:XC(e);var t}(t)),BC(t)?((l=KC(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=QC(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function t_(e){var t=KC(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function n_(e){return"html"===YC(e)?e:e.assignedSlot||e.parentNode||(WC(e)?e.host:null)||GC(e)}function r_(e){return["html","body","#document"].indexOf(YC(e))>=0?e.ownerDocument.body:BC(e)&&ZC(e)?e:r_(n_(e))}function o_(e,t){var n;void 0===t&&(t=[]);var r=r_(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=DC(r),a=o?[i].concat(i.visualViewport||[],ZC(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(o_(n_(a)))}function i_(e){return["table","td","th"].indexOf(YC(e))>=0}function a_(e){return BC(e)&&"fixed"!==JC(e).position?e.offsetParent:null}function s_(e){for(var t=DC(e),n=a_(e);n&&i_(n)&&"static"===JC(n).position;)n=a_(n);return n&&("html"===YC(n)||"body"===YC(n)&&"static"===JC(n).position)?t:n||function(e){var t=/firefox/i.test(qC());if(/Trident/i.test(qC())&&BC(e)&&"fixed"===JC(e).position)return null;var n=n_(e);for(WC(n)&&(n=n.host);BC(n)&&["html","body"].indexOf(YC(n))<0;){var r=JC(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var l_="top",c_="bottom",u_="right",d_="left",h_="auto",p_=[l_,c_,u_,d_],f_="start",m_="end",g_="viewport",v_="popper",b_=p_.reduce((function(e,t){return e.concat([t+"-"+f_,t+"-"+m_])}),[]),x_=[].concat(p_,[h_]).reduce((function(e,t){return e.concat([t,t+"-"+f_,t+"-"+m_])}),[]),y_=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function w_(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function S_(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var k_={placement:"bottom",modifiers:[],strategy:"absolute"};function j_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function C_(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?k_:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},k_,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"===typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:FC(e)?o_(e):e.contextElement?o_(e.contextElement):[],popper:o_(t)};var u=function(e){var t=w_(e);return y_.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=u.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(j_(t,n)){o.rects={reference:e_(t,s_(n),"fixed"===o.options.strategy),popper:t_(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"===typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:S_((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!j_(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var __={passive:!0};function A_(e){return e.split("-")[0]}function E_(e){return e.split("-")[1]}function M_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function R_(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?A_(o):null,a=o?E_(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case l_:t={x:s,y:n.y-r.height};break;case c_:t={x:s,y:n.y+n.height};break;case u_:t={x:n.x+n.width,y:l};break;case d_:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?M_(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case f_:t[c]=t[c]-(n[u]/2-r[u]/2);break;case m_:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var P_={top:"auto",right:"auto",bottom:"auto",left:"auto"};function O_(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=a.x,p=void 0===h?0:h,f=a.y,m=void 0===f?0:f,g="function"===typeof u?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),x=d_,y=l_,w=window;if(c){var S=s_(n),k="clientHeight",j="clientWidth";if(S===DC(n)&&"static"!==JC(S=GC(n)).position&&"absolute"===s&&(k="scrollHeight",j="scrollWidth"),o===l_||(o===d_||o===u_)&&i===m_)y=c_,m-=(d&&S===w&&w.visualViewport?w.visualViewport.height:S[k])-r.height,m*=l?1:-1;if(o===d_||(o===l_||o===c_)&&i===m_)x=u_,p-=(d&&S===w&&w.visualViewport?w.visualViewport.width:S[j])-r.width,p*=l?1:-1}var C,_=Object.assign({position:s},c&&P_),A=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:UC(n*o)/o||0,y:UC(r*o)/o||0}}({x:p,y:m},DC(n)):{x:p,y:m};return p=A.x,m=A.y,l?Object.assign({},_,((C={})[y]=b?"0":"",C[x]=v?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",C)):Object.assign({},_,((t={})[y]=b?m+"px":"",t[x]=v?p+"px":"",t.transform="",t))}const T_={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];BC(o)&&YC(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});BC(r)&&YC(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};const N_={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=x_.reduce((function(e,n){return e[n]=function(e,t,n){var r=A_(e),o=[d_,l_].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[d_,u_].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var L_={left:"right",right:"left",bottom:"top",top:"bottom"};function I_(e){return e.replace(/left|right|bottom|top/g,(function(e){return L_[e]}))}var z_={start:"end",end:"start"};function D_(e){return e.replace(/start|end/g,(function(e){return z_[e]}))}function F_(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&WC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function B_(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function W_(e,t,n){return t===g_?B_(function(e,t){var n=DC(e),r=GC(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=$C();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+QC(e),y:l}}(e,n)):FC(t)?function(e,t){var n=KC(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):B_(function(e){var t,n=GC(e),r=XC(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=HC(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=HC(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+QC(e),l=-r.scrollTop;return"rtl"===JC(o||n).direction&&(s+=HC(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(GC(e)))}function H_(e,t,n,r){var o="clippingParents"===t?function(e){var t=o_(n_(e)),n=["absolute","fixed"].indexOf(JC(e).position)>=0&&BC(e)?s_(e):e;return FC(n)?t.filter((function(e){return FC(e)&&F_(e,n)&&"body"!==YC(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=W_(e,n,r);return t.top=HC(o.top,t.top),t.right=VC(o.right,t.right),t.bottom=VC(o.bottom,t.bottom),t.left=HC(o.left,t.left),t}),W_(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function V_(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function U_(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function q_(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?g_:c,d=n.elementContext,h=void 0===d?v_:d,p=n.altBoundary,f=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,v=V_("number"!==typeof g?g:U_(g,p_)),b=h===v_?"reference":v_,x=e.rects.popper,y=e.elements[f?b:h],w=H_(FC(y)?y:y.contextElement||GC(e.elements.popper),l,u,a),S=KC(e.elements.reference),k=R_({reference:S,element:x,strategy:"absolute",placement:o}),j=B_(Object.assign({},x,k)),C=h===v_?j:S,_={top:w.top-C.top+v.top,bottom:C.bottom-w.bottom+v.bottom,left:w.left-C.left+v.left,right:C.right-w.right+v.right},A=e.modifiersData.offset;if(h===v_&&A){var E=A[o];Object.keys(_).forEach((function(e){var t=[u_,c_].indexOf(e)>=0?1:-1,n=[l_,c_].indexOf(e)>=0?"y":"x";_[e]+=E[n]*t}))}return _}function $_(e,t,n){return HC(e,VC(t,n))}const K_={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,p=void 0===h||h,f=n.tetherOffset,m=void 0===f?0:f,g=q_(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=A_(t.placement),b=E_(t.placement),x=!b,y=M_(v),w="x"===y?"y":"x",S=t.modifiersData.popperOffsets,k=t.rects.reference,j=t.rects.popper,C="function"===typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,_="number"===typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(S){if(i){var M,R="y"===y?l_:d_,P="y"===y?c_:u_,O="y"===y?"height":"width",T=S[y],N=T+g[R],L=T-g[P],I=p?-j[O]/2:0,z=b===f_?k[O]:j[O],D=b===f_?-j[O]:-k[O],F=t.elements.arrow,B=p&&F?t_(F):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=W[R],V=W[P],U=$_(0,k[O],B[O]),q=x?k[O]/2-I-U-H-_.mainAxis:z-U-H-_.mainAxis,$=x?-k[O]/2+I+U+V+_.mainAxis:D+U+V+_.mainAxis,K=t.elements.arrow&&s_(t.elements.arrow),X=K?"y"===y?K.clientTop||0:K.clientLeft||0:0,Y=null!=(M=null==A?void 0:A[y])?M:0,G=T+$-Y,Q=$_(p?VC(N,T+q-Y-X):N,T,p?HC(L,G):L);S[y]=Q,E[y]=Q-T}if(s){var J,Z="x"===y?l_:d_,ee="x"===y?c_:u_,te=S[w],ne="y"===w?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[l_,d_].indexOf(v),ae=null!=(J=null==A?void 0:A[w])?J:0,se=ie?re:te-k[ne]-j[ne]-ae+_.altAxis,le=ie?te+k[ne]+j[ne]-ae-_.altAxis:oe,ce=p&&ie?function(e,t,n){var r=$_(e,t,n);return r>n?n:r}(se,te,le):$_(p?se:re,te,p?le:oe);S[w]=ce,E[w]=ce-te}t.modifiersData[r]=E}},requiresIfExists:["offset"]};const X_={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=A_(n.placement),l=M_(s),c=[d_,u_].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return V_("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:U_(e,p_))}(o.padding,n),d=t_(i),h="y"===l?l_:d_,p="y"===l?c_:u_,f=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=s_(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=f/2-m/2,x=u[h],y=v-d[c]-u[p],w=v/2-d[c]/2+b,S=$_(x,w,y),k=l;n.modifiersData[r]=((t={})[k]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&F_(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Y_(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function G_(e){return[l_,u_,c_,d_].some((function(t){return e[t]>=0}))}var Q_=C_({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=DC(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,__)})),s&&l.addEventListener("resize",n.update,__),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,__)})),s&&l.removeEventListener("resize",n.update,__)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=R_({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:A_(t.placement),variation:E_(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,O_(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,O_(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},T_,N_,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=A_(g),b=l||(v===g||!f?[I_(g)]:function(e){if(A_(e)===h_)return[];var t=I_(e);return[D_(e),t,D_(t)]}(g)),x=[g].concat(b).reduce((function(e,n){return e.concat(A_(n)===h_?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?x_:l,u=E_(r),d=u?s?b_:b_.filter((function(e){return E_(e)===u})):p_,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=q_(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[A_(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),y=t.rects.reference,w=t.rects.popper,S=new Map,k=!0,j=x[0],C=0;C<x.length;C++){var _=x[C],A=A_(_),E=E_(_)===f_,M=[l_,c_].indexOf(A)>=0,R=M?"width":"height",P=q_(t,{placement:_,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),O=M?E?u_:d_:E?c_:l_;y[R]>w[R]&&(O=I_(O));var T=I_(O),N=[];if(i&&N.push(P[A]<=0),s&&N.push(P[O]<=0,P[T]<=0),N.every((function(e){return e}))){j=_,k=!1;break}S.set(_,N)}if(k)for(var L=function(e){var t=x.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},I=f?3:1;I>0;I--){if("break"===L(I))break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},K_,X_,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=q_(t,{elementContext:"reference"}),s=q_(t,{altBoundary:!0}),l=Y_(a,r),c=Y_(s,o,i),u=G_(l),d=G_(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function J_(e){return ga("MuiPopper",e)}va("MuiPopper",["root"]);const Z_=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],eA=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function tA(e){return"function"===typeof e?e():e}function nA(e){return void 0!==e.nodeType}const rA={},oA=r.forwardRef((function(e,t){var n;const{anchorEl:o,children:i,direction:a,disablePortal:s,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:h,slotProps:p={},slots:f={},TransitionProps:m}=e,g=(0,rr.A)(e,Z_),v=r.useRef(null),b=Xa(v,t),x=r.useRef(null),y=Xa(x,h),w=r.useRef(y);Ga((()=>{w.current=y}),[y]),r.useImperativeHandle(h,(()=>x.current),[]);const S=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(u,a),[k,j]=r.useState(S),[C,_]=r.useState(tA(o));r.useEffect((()=>{x.current&&x.current.forceUpdate()})),r.useEffect((()=>{o&&_(tA(o))}),[o]),Ga((()=>{if(!C||!c)return;let e=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;(e=>{j(e.placement)})(t)}}];null!=l&&(e=e.concat(l)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=Q_(C,v.current,(0,bi.A)({placement:S},d,{modifiers:e}));return w.current(t),()=>{t.destroy(),w.current(null)}}),[C,s,l,c,d,S]);const A={placement:k};null!==m&&(A.TransitionProps=m);const E=(e=>{const{classes:t}=e;return Sa({root:["root"]},J_,t)})(e),M=null!=(n=f.root)?n:"div",R=Ab({elementType:M,externalSlotProps:p.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:E.root});return(0,Mi.jsx)(M,(0,bi.A)({},R,{children:"function"===typeof i?i(A):i}))})),iA=r.forwardRef((function(e,t){const{anchorEl:n,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:h=rA,popperRef:p,style:f,transition:m=!1,slotProps:g={},slots:v={}}=e,b=(0,rr.A)(e,eA),[x,y]=r.useState(!0);if(!l&&!u&&(!m||x))return null;let w;if(i)w=i;else if(n){const e=tA(n);w=e&&nA(e)?Lb(e).body:Lb(null).body}const S=u||!l||m&&!x?void 0:"none",k=m?{in:u,onEnter:()=>{y(!1)},onExited:()=>{y(!0)}}:void 0;return(0,Mi.jsx)(oy,{disablePortal:s,container:w,children:(0,Mi.jsx)(oA,(0,bi.A)({anchorEl:n,direction:a,disablePortal:s,modifiers:c,ref:t,open:m?!x:u,placement:d,popperOptions:h,popperRef:p,slotProps:g,slots:v},b,{style:(0,bi.A)({position:"fixed",top:0,left:0,display:S},f),TransitionProps:k,children:o}))})})),aA=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],sA=Aa(iA,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),lA=r.forwardRef((function(e,t){var n;const r=(0,zC.A)(),o=Oa({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v,slots:b,slotProps:x}=o,y=(0,rr.A)(o,aA),w=null!=(n=null==b?void 0:b.root)?n:null==s?void 0:s.Root,S=(0,bi.A)({anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v},y);return(0,Mi.jsx)(sA,(0,bi.A)({as:a,direction:null==r?void 0:r.direction,slots:{root:w},slotProps:null!=x?x:l},S,{ref:t}))})),cA=Qx;function uA(e){return ga("MuiTooltip",e)}const dA=va("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),hA=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function pA(e){return Math.round(1e5*e)/1e5}const fA=Aa(lA,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((e=>{let{theme:t,ownerState:n,open:r}=e;return(0,bi.A)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!n.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},n.arrow&&{['&[data-popper-placement*="bottom"] .'.concat(dA.arrow)]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},['&[data-popper-placement*="top"] .'.concat(dA.arrow)]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},['&[data-popper-placement*="right"] .'.concat(dA.arrow)]:(0,bi.A)({},n.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),['&[data-popper-placement*="left"] .'.concat(dA.arrow)]:(0,bi.A)({},n.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})})),mA=Aa("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t["tooltipPlacement".concat(Da(n.placement.split("-")[0]))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,zi.X4)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},n.arrow&&{position:"relative",margin:0},n.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat(pA(16/14),"em"),fontWeight:t.typography.fontWeightRegular},{[".".concat(dA.popper,'[data-popper-placement*="left"] &')]:(0,bi.A)({transformOrigin:"right center"},n.isRtl?(0,bi.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"}):(0,bi.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"})),[".".concat(dA.popper,'[data-popper-placement*="right"] &')]:(0,bi.A)({transformOrigin:"left center"},n.isRtl?(0,bi.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"}):(0,bi.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"})),[".".concat(dA.popper,'[data-popper-placement*="top"] &')]:(0,bi.A)({transformOrigin:"center bottom",marginBottom:"14px"},n.touch&&{marginBottom:"24px"}),[".".concat(dA.popper,'[data-popper-placement*="bottom"] &')]:(0,bi.A)({transformOrigin:"center top",marginTop:"14px"},n.touch&&{marginTop:"24px"})})})),gA=Aa("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((e=>{let{theme:t}=e;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:(0,zi.X4)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}}));let vA=!1;const bA=new ts;let xA={x:0,y:0};function yA(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];t&&t(n,...o),e(n,...o)}}const wA=r.forwardRef((function(e,t){var n,o,i,a,s,l,c,u,d,h,p,f,m,g,v,b,x,y,w;const S=Oa({props:e,name:"MuiTooltip"}),{arrow:k=!1,children:j,components:C={},componentsProps:_={},describeChild:A=!1,disableFocusListener:E=!1,disableHoverListener:M=!1,disableInteractive:R=!1,disableTouchListener:P=!1,enterDelay:O=100,enterNextDelay:T=0,enterTouchDelay:N=700,followCursor:L=!1,id:I,leaveDelay:z=0,leaveTouchDelay:D=1500,onClose:F,onOpen:B,open:W,placement:H="bottom",PopperComponent:V,PopperProps:U={},slotProps:q={},slots:$={},title:K,TransitionComponent:X=Gw,TransitionProps:Y}=S,G=(0,rr.A)(S,hA),Q=r.isValidElement(j)?j:(0,Mi.jsx)("span",{children:j}),J=Nv(),Z=Cb(),[ee,te]=r.useState(),[ne,re]=r.useState(null),oe=r.useRef(!1),ie=R||L,ae=ns(),se=ns(),le=ns(),ce=ns(),[ue,de]=Bl({controlled:W,default:!1,name:"Tooltip",state:"open"});let he=ue;const pe=cA(I),fe=r.useRef(),me=Ja((()=>{void 0!==fe.current&&(document.body.style.WebkitUserSelect=fe.current,fe.current=void 0),ce.clear()}));r.useEffect((()=>me),[me]);const ge=e=>{bA.clear(),vA=!0,de(!0),B&&!he&&B(e)},ve=Ja((e=>{bA.start(800+z,(()=>{vA=!1})),de(!1),F&&he&&F(e),ae.start(J.transitions.duration.shortest,(()=>{oe.current=!1}))})),be=e=>{oe.current&&"touchstart"!==e.type||(ee&&ee.removeAttribute("title"),se.clear(),le.clear(),O||vA&&T?se.start(vA?T:O,(()=>{ge(e)})):ge(e))},xe=e=>{se.clear(),le.start(z,(()=>{ve(e)}))},{isFocusVisibleRef:ye,onBlur:we,onFocus:Se,ref:ke}=ds(),[,je]=r.useState(!1),Ce=e=>{we(e),!1===ye.current&&(je(!1),xe(e))},_e=e=>{ee||te(e.currentTarget),Se(e),!0===ye.current&&(je(!0),be(e))},Ae=e=>{oe.current=!0;const t=Q.props;t.onTouchStart&&t.onTouchStart(e)},Ee=e=>{Ae(e),le.clear(),ae.clear(),me(),fe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ce.start(N,(()=>{document.body.style.WebkitUserSelect=fe.current,be(e)}))},Me=e=>{Q.props.onTouchEnd&&Q.props.onTouchEnd(e),me(),le.start(D,(()=>{ve(e)}))};r.useEffect((()=>{if(he)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||ve(e)}}),[ve,he]);const Re=Ya(Jx(Q),ke,te,t);K||0===K||(he=!1);const Pe=r.useRef(),Oe={},Te="string"===typeof K;A?(Oe.title=he||!Te||M?null:K,Oe["aria-describedby"]=he?pe:null):(Oe["aria-label"]=Te?K:null,Oe["aria-labelledby"]=he&&!Te?pe:null);const Ne=(0,bi.A)({},Oe,G,Q.props,{className:yi(G.className,Q.props.className),onTouchStart:Ae,ref:Re},L?{onMouseMove:e=>{const t=Q.props;t.onMouseMove&&t.onMouseMove(e),xA={x:e.clientX,y:e.clientY},Pe.current&&Pe.current.update()}}:{});const Le={};P||(Ne.onTouchStart=Ee,Ne.onTouchEnd=Me),M||(Ne.onMouseOver=yA(be,Ne.onMouseOver),Ne.onMouseLeave=yA(xe,Ne.onMouseLeave),ie||(Le.onMouseOver=be,Le.onMouseLeave=xe)),E||(Ne.onFocus=yA(_e,Ne.onFocus),Ne.onBlur=yA(Ce,Ne.onBlur),ie||(Le.onFocus=_e,Le.onBlur=Ce));const Ie=r.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(ne),options:{element:ne,padding:4}}];return null!=(e=U.popperOptions)&&e.modifiers&&(t=t.concat(U.popperOptions.modifiers)),(0,bi.A)({},U.popperOptions,{modifiers:t})}),[ne,U]),ze=(0,bi.A)({},S,{isRtl:Z,arrow:k,disableInteractive:ie,placement:H,PopperComponentProp:V,touch:oe.current}),De=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e;return Sa({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch","tooltipPlacement".concat(Da(i.split("-")[0]))],arrow:["arrow"]},uA,t)})(ze),Fe=null!=(n=null!=(o=$.popper)?o:C.Popper)?n:fA,Be=null!=(i=null!=(a=null!=(s=$.transition)?s:C.Transition)?a:X)?i:Gw,We=null!=(l=null!=(c=$.tooltip)?c:C.Tooltip)?l:mA,He=null!=(u=null!=(d=$.arrow)?d:C.Arrow)?u:gA,Ve=hc(Fe,(0,bi.A)({},U,null!=(h=q.popper)?h:_.popper,{className:yi(De.popper,null==U?void 0:U.className,null==(p=null!=(f=q.popper)?f:_.popper)?void 0:p.className)}),ze),Ue=hc(Be,(0,bi.A)({},Y,null!=(m=q.transition)?m:_.transition),ze),qe=hc(We,(0,bi.A)({},null!=(g=q.tooltip)?g:_.tooltip,{className:yi(De.tooltip,null==(v=null!=(b=q.tooltip)?b:_.tooltip)?void 0:v.className)}),ze),$e=hc(He,(0,bi.A)({},null!=(x=q.arrow)?x:_.arrow,{className:yi(De.arrow,null==(y=null!=(w=q.arrow)?w:_.arrow)?void 0:y.className)}),ze);return(0,Mi.jsxs)(r.Fragment,{children:[r.cloneElement(Q,Ne),(0,Mi.jsx)(Fe,(0,bi.A)({as:null!=V?V:lA,placement:H,anchorEl:L?{getBoundingClientRect:()=>({top:xA.y,left:xA.x,right:xA.x,bottom:xA.y,width:0,height:0})}:ee,popperRef:Pe,open:!!ee&&he,id:pe,transition:!0},Le,Ve,{popperOptions:Ie,children:e=>{let{TransitionProps:t}=e;return(0,Mi.jsx)(Be,(0,bi.A)({timeout:J.transitions.duration.shorter},t,Ue,{children:(0,Mi.jsxs)(We,(0,bi.A)({},qe,{children:[K,k?(0,Mi.jsx)(He,(0,bi.A)({},$e,{ref:re})):null]}))}))}}))]})})),SA=wA,kA=["className"],jA=Aa("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})})),CA=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiListItemIcon"}),{className:o}=n,i=(0,rr.A)(n,kA),a=r.useContext(Ow),s=(0,bi.A)({},n,{alignItems:a.alignItems}),l=(e=>{const{alignItems:t,classes:n}=e;return Sa({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Dk,n)})(s);return(0,Mi.jsx)(jA,(0,bi.A)({className:yi(l.root,o),ownerState:s,ref:t},i))}));function _A(e){return ga("MuiLinearProgress",e)}va("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var AA,EA,MA,RA,PA,OA;const TA=["className","color","value","valueBuffer","variant"];let NA,LA,IA,zA,DA,FA;const BA=(0,Ss.i7)(NA||(NA=AA||(AA=hs(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])))),WA=(0,Ss.i7)(LA||(LA=EA||(EA=hs(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])))),HA=(0,Ss.i7)(IA||(IA=MA||(MA=hs(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])))),VA=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,zi.a)(e.palette[t].main,.62):(0,zi.e$)(e.palette[t].main,.5),UA=Aa("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["color".concat(Da(n.color))],t[n.variant]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:VA(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),qA=Aa("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t["dashedColor".concat(Da(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;const r=VA(n,t.color);return(0,bi.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,Ss.AH)(zA||(zA=RA||(RA=hs(["\n animation: "," 3s infinite linear;\n "]))),HA)),$A=Aa("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat(Da(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Ss.AH)(DA||(DA=PA||(PA=hs(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "]))),BA)})),KA=Aa("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat(Da(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,bi.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:VA(n,t.color),transition:"transform .".concat(4,"s linear")})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Ss.AH)(FA||(FA=OA||(OA=hs(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "]))),WA)})),XA=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiLinearProgress"}),{className:r,color:o="primary",value:i,valueBuffer:a,variant:s="indeterminate"}=n,l=(0,rr.A)(n,TA),c=(0,bi.A)({},n,{color:o,variant:s}),u=(e=>{const{classes:t,variant:n,color:r}=e;return Sa({root:["root","color".concat(Da(r)),n],dashed:["dashed","dashedColor".concat(Da(r))],bar1:["bar","barColor".concat(Da(r)),("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&"barColor".concat(Da(r)),"buffer"===n&&"color".concat(Da(r)),("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]},_A,t)})(c),d=Cb(),h={},p={bar1:{},bar2:{}};if("determinate"===s||"buffer"===s)if(void 0!==i){h["aria-valuenow"]=Math.round(i),h["aria-valuemin"]=0,h["aria-valuemax"]=100;let e=i-100;d&&(e=-e),p.bar1.transform="translateX(".concat(e,"%)")}else 0;if("buffer"===s)if(void 0!==a){let e=(a||0)-100;d&&(e=-e),p.bar2.transform="translateX(".concat(e,"%)")}else 0;return(0,Mi.jsxs)(UA,(0,bi.A)({className:yi(u.root,r),ownerState:c,role:"progressbar"},h,{ref:t},l,{children:["buffer"===s?(0,Mi.jsx)(qA,{className:u.dashed,ownerState:c}):null,(0,Mi.jsx)($A,{className:u.bar1,ownerState:c,style:p.bar1}),"determinate"===s?null:(0,Mi.jsx)(KA,{className:u.bar2,ownerState:c,style:p.bar2})]}))})),YA=XA,GA=Jl((0,Mi.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),QA=Jl((0,Mi.jsx)("path",{d:"M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"Dns"),JA=Jl((0,Mi.jsx)("path",{d:"M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z"}),"Memory"),ZA=Jl((0,Mi.jsx)("path",{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83"}),"Speed"),eE=Jl((0,Mi.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),tE=Jl((0,Mi.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning");zm.register(Xg,Jg,eg,Jm,Rg,qg,Eg,jg);const nE=e=>{let{processes:t,systemMetrics:n,onRefresh:o}=e;const[i,a]=(0,r.useState)([]),[s,l]=(0,r.useState)([]),[c,u]=(0,r.useState)(!0),d=e=>{if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])},h=()=>{const e=[],r=Date.now();t.forEach((t=>{"online"!==t.pm2_env.status&&e.push({processId:t.pm_id,processName:t.name,type:"error",message:"Process is ".concat(t.pm2_env.status),timestamp:r}),t.monit.memory>524288e3&&e.push({processId:t.pm_id,processName:t.name,type:"warning",message:"High memory usage: ".concat(d(t.monit.memory)),timestamp:r}),t.monit.cpu>80&&e.push({processId:t.pm_id,processName:t.name,type:"warning",message:"High CPU usage: ".concat(t.monit.cpu.toFixed(1),"%"),timestamp:r}),t.pm2_env.restart_time>5&&e.push({processId:t.pm_id,processName:t.name,type:"warning",message:"Frequent restarts: ".concat(t.pm2_env.restart_time," times"),timestamp:r})}));const o=n.memory.used/n.memory.total*100;o>90&&e.push({processId:-1,processName:"System",type:"error",message:"Critical memory usage: ".concat(o.toFixed(1),"%"),timestamp:r});return n.loadAvg[0]/n.cpus*100>100&&e.push({processId:-1,processName:"System",type:"warning",message:"High system load: ".concat(n.loadAvg[0].toFixed(2)),timestamp:r}),e};(0,r.useEffect)((()=>{if(c){const e=Date.now(),r=t.filter((e=>"online"===e.pm2_env.status)).length,o={timestamp:e,cpu:t.reduce(((e,t)=>e+t.monit.cpu),0)/Math.max(t.length,1),memory:n.memory.used,loadAvg:n.loadAvg[0],processCount:t.length,onlineProcesses:r};a((e=>[...e,o].slice(-100))),l(h())}}),[t,n,c,h]);const p={labels:i.map((e=>new Date(e.timestamp).toLocaleTimeString())),datasets:[{label:"CPU Usage (%)",data:i.map((e=>e.cpu)),borderColor:"rgb(75, 192, 192)",backgroundColor:"rgba(75, 192, 192, 0.1)",fill:!0,tension:.4},{label:"Memory Usage (GB)",data:i.map((e=>e.memory/1073741824)),borderColor:"rgb(255, 99, 132)",backgroundColor:"rgba(255, 99, 132, 0.1)",fill:!0,tension:.4,yAxisID:"y1"},{label:"Load Average",data:i.map((e=>e.loadAvg)),borderColor:"rgb(54, 162, 235)",backgroundColor:"rgba(54, 162, 235, 0.1)",fill:!0,tension:.4}]},f=(()=>{const e=n.memory.used/n.memory.total*100,r=n.loadAvg[0]/n.cpus*100,o=t.length>0?t.filter((e=>"online"===e.pm2_env.status)).length/t.length*100:100,i=Math.max(0,100-e),a=Math.max(0,100-r),s=o;return Math.round(.3*i+.3*a+.4*s)})(),m=(g=f)>=80?"success":g>=60?"warning":"error";var g;return(0,Mi.jsxs)(wa,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h4",component:"h1",children:"Advanced Monitoring Dashboard"}),(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:c,onChange:e=>u(e.target.checked),color:"primary"}),label:"Real-time Updates"})," ",(0,Mi.jsx)(SA,{title:"Refresh Data",children:(0,Mi.jsx)(Ec,{onClick:o,children:(0,Mi.jsx)(vx,{})})})]})]}),(0,Mi.jsxs)($v,{container:!0,spacing:3,sx:{mb:3},children:[(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",mb:1},children:[(0,Mi.jsx)(GA,{color:m,sx:{mr:1}}),(0,Mi.jsx)(Ol,{variant:"subtitle2",color:"text.secondary",children:"System Health"})]}),(0,Mi.jsxs)(Ol,{variant:"h3",color:"".concat(m,".main"),children:[f,"%"]}),(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"Overall system status"})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",mb:1},children:[(0,Mi.jsx)(QA,{color:"primary",sx:{mr:1}}),(0,Mi.jsx)(Ol,{variant:"subtitle2",color:"text.secondary",children:"Active Processes"})]}),(0,Mi.jsx)(Ol,{variant:"h3",color:"primary",children:t.filter((e=>"online"===e.pm2_env.status)).length}),(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",children:["of ",t.length," total"]})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",mb:1},children:[(0,Mi.jsx)(JA,{color:"primary",sx:{mr:1}}),(0,Mi.jsx)(Ol,{variant:"subtitle2",color:"text.secondary",children:"Memory Usage"})]}),(0,Mi.jsxs)(Ol,{variant:"h3",color:"primary",children:[Math.round(n.memory.used/n.memory.total*100),"%"]}),(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",children:[d(n.memory.used)," of ",d(n.memory.total)]})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",mb:1},children:[(0,Mi.jsx)(ZA,{color:"primary",sx:{mr:1}}),(0,Mi.jsx)(Ol,{variant:"subtitle2",color:"text.secondary",children:"CPU Load"})]}),(0,Mi.jsx)(Ol,{variant:"h3",color:"primary",children:n.loadAvg[0].toFixed(1)}),(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",children:[n.cpus," cores available"]})]})})})]}),(0,Mi.jsxs)($v,{container:!0,spacing:3,children:[(0,Mi.jsx)($v,{item:!0,xs:12,lg:8,children:(0,Mi.jsx)(Ia,{sx:{p:3},children:(0,Mi.jsx)(wa,{sx:{height:400},children:(0,Mi.jsx)(Tv,{data:p,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top"},title:{display:!0,text:"System Performance Trends"}},scales:{y:{type:"linear",display:!0,position:"left",beginAtZero:!0},y1:{type:"linear",display:!0,position:"right",beginAtZero:!0,grid:{drawOnChartArea:!1}}},interaction:{mode:"index",intersect:!1}}})})})}),(0,Mi.jsx)($v,{item:!0,xs:12,lg:4,children:(0,Mi.jsxs)(Ia,{sx:{p:3,height:400,overflow:"auto"},children:[(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"Active Alerts"}),(0,Mi.jsx)(kb,{sx:{mb:2}}),0===s.length?(0,Mi.jsxs)(wa,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"60%",color:"success.main"},children:[(0,Mi.jsx)(GA,{sx:{fontSize:48,mb:2}}),(0,Mi.jsx)(Ol,{variant:"body1",children:"All systems healthy"})]}):(0,Mi.jsx)(Iw,{children:s.map(((e,t)=>(0,Mi.jsxs)(Hj,{sx:{px:0},children:[(0,Mi.jsxs)(CA,{children:["error"===e.type&&(0,Mi.jsx)(eE,{color:"error"}),"warning"===e.type&&(0,Mi.jsx)(tE,{color:"warning"}),"info"===e.type&&(0,Mi.jsx)(GA,{color:"info"})]}),(0,Mi.jsx)(qj,{primary:(0,Mi.jsx)(Ol,{variant:"body2",fontWeight:"medium",children:e.processName}),secondary:(0,Mi.jsx)(Ol,{variant:"caption",color:"text.secondary",children:e.message})})]},t)))})]})})]}),(0,Mi.jsxs)(Ia,{sx:{p:3,mt:3},children:[(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"Process Performance Overview"}),(0,Mi.jsx)($v,{container:!0,spacing:2,children:t.map((e=>(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:4,children:(0,Mi.jsx)(Gv,{variant:"outlined",children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",mb:1},children:[(0,Mi.jsx)(Ol,{variant:"subtitle1",fontWeight:"bold",children:e.name}),(0,Mi.jsx)(gb,{label:e.pm2_env.status,color:"online"===e.pm2_env.status?"success":"error",size:"small"})]}),(0,Mi.jsxs)(wa,{sx:{mb:1},children:[(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",children:["CPU: ",e.monit.cpu.toFixed(1),"%"]}),(0,Mi.jsx)(YA,{variant:"determinate",value:Math.min(e.monit.cpu,100),color:e.monit.cpu>80?"error":e.monit.cpu>50?"warning":"primary",sx:{height:6,borderRadius:3}})]}),(0,Mi.jsxs)(wa,{sx:{mb:1},children:[(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",children:["Memory: ",d(e.monit.memory)]}),(0,Mi.jsx)(YA,{variant:"determinate",value:Math.min(e.monit.memory/104857600*100,100),color:e.monit.memory>524288e3?"error":e.monit.memory>209715200?"warning":"primary",sx:{height:6,borderRadius:3}})]}),(0,Mi.jsxs)(Ol,{variant:"caption",color:"text.secondary",children:["Restarts: ",e.pm2_env.restart_time]})]})})},e.pm_id)))})]})]})},rE=e=>{const t=r.useRef({});return r.useEffect((()=>{t.current=e})),t.current};const oE=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=rE({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:e;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?"".concat(l,"+"):s}};function iE(e){return ga("MuiBadge",e)}const aE=va("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),sE=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],lE=Aa("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),cE=Aa("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t["anchorOrigin".concat(Da(n.anchorOrigin.vertical)).concat(Da(n.anchorOrigin.horizontal)).concat(Da(n.overlap))],"default"!==n.color&&t["color".concat(Da(n.color))],n.invisible&&t.invisible]}})((e=>{let{theme:t}=e;var n;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n,r;return(null!=(n=t.vars)?n:t).palette[e].main&&(null!=(r=t.vars)?r:t).palette[e].contrastText})).map((e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(aE.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}})),uE=r.forwardRef((function(e,t){var n,r,o,i,a,s;const l=Oa({props:e,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:u,component:d,components:h={},componentsProps:p={},children:f,overlap:m="rectangular",color:g="default",invisible:v=!1,max:b=99,badgeContent:x,slots:y,slotProps:w,showZero:S=!1,variant:k="standard"}=l,j=(0,rr.A)(l,sE),{badgeContent:C,invisible:_,max:A,displayValue:E}=oE({max:b,invisible:v,badgeContent:x,showZero:S}),M=rE({anchorOrigin:c,color:g,overlap:m,variant:k,badgeContent:x}),R=_||null==C&&"dot"!==k,{color:P=g,overlap:O=m,anchorOrigin:T=c,variant:N=k}=R?M:l,L="dot"!==N?E:void 0,I=(0,bi.A)({},l,{badgeContent:C,invisible:R,max:A,displayValue:L,showZero:S,anchorOrigin:T,color:P,overlap:O,variant:N}),z=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e;return Sa({root:["root"],badge:["badge",i,r&&"invisible","anchorOrigin".concat(Da(n.vertical)).concat(Da(n.horizontal)),"anchorOrigin".concat(Da(n.vertical)).concat(Da(n.horizontal)).concat(Da(o)),"overlap".concat(Da(o)),"default"!==t&&"color".concat(Da(t))]},iE,a)})(I),D=null!=(n=null!=(r=null==y?void 0:y.root)?r:h.Root)?n:lE,F=null!=(o=null!=(i=null==y?void 0:y.badge)?i:h.Badge)?o:cE,B=null!=(a=null==w?void 0:w.root)?a:p.root,W=null!=(s=null==w?void 0:w.badge)?s:p.badge,H=Ab({elementType:D,externalSlotProps:B,externalForwardedProps:j,additionalProps:{ref:t,as:d},ownerState:I,className:yi(null==B?void 0:B.className,z.root,u)}),V=Ab({elementType:F,externalSlotProps:W,ownerState:I,className:yi(z.badge,null==W?void 0:W.className)});return(0,Mi.jsxs)(D,(0,bi.A)({},H,{children:[f,(0,Mi.jsx)(F,(0,bi.A)({},V,{children:L}))]}))})),dE=uE;function hE(e){return ga("MuiCollapse",e)}va("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const pE=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],fE=Aa("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,bi.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,bi.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})})),mE=Aa("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((e=>{let{ownerState:t}=e;return(0,bi.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),gE=Aa("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((e=>{let{ownerState:t}=e;return(0,bi.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),vE=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:h,onEntering:p,onExit:f,onExited:m,onExiting:g,orientation:v="vertical",style:b,timeout:x=aa.standard,TransitionComponent:y=py}=n,w=(0,rr.A)(n,pE),S=(0,bi.A)({},n,{orientation:v,collapsedSize:s}),k=(e=>{const{orientation:t,classes:n}=e;return Sa({root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]},hE,n)})(S),j=Nv(),C=ns(),_=r.useRef(null),A=r.useRef(),E="number"===typeof s?"".concat(s,"px"):s,M="horizontal"===v,R=M?"width":"height",P=r.useRef(null),O=Ya(t,P),T=e=>t=>{if(e){const n=P.current;void 0===t?e(n):e(n,t)}},N=()=>_.current?_.current[M?"clientWidth":"clientHeight"]:0,L=T(((e,t)=>{_.current&&M&&(_.current.style.position="absolute"),e.style[R]=E,d&&d(e,t)})),I=T(((e,t)=>{const n=N();_.current&&M&&(_.current.style.position="");const{duration:r,easing:o}=my({style:b,timeout:x,easing:c},{mode:"enter"});if("auto"===x){const t=j.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(t,"ms"),A.current=t}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style[R]="".concat(n,"px"),e.style.transitionTimingFunction=o,p&&p(e,t)})),z=T(((e,t)=>{e.style[R]="auto",h&&h(e,t)})),D=T((e=>{e.style[R]="".concat(N(),"px"),f&&f(e)})),F=T(m),B=T((e=>{const t=N(),{duration:n,easing:r}=my({style:b,timeout:x,easing:c},{mode:"exit"});if("auto"===x){const n=j.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(n,"ms"),A.current=n}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style[R]=E,e.style.transitionTimingFunction=r,g&&g(e)}));return(0,Mi.jsx)(y,(0,bi.A)({in:u,onEnter:L,onEntered:z,onEntering:I,onExit:D,onExited:F,onExiting:B,addEndListener:e=>{"auto"===x&&C.start(A.current||0,e),o&&o(P.current,e)},nodeRef:P,timeout:"auto"===x?null:x},w,{children:(e,t)=>(0,Mi.jsx)(fE,(0,bi.A)({as:l,className:yi(k.root,a,{entered:k.entered,exited:!u&&"0px"===E&&k.hidden}[e]),style:(0,bi.A)({[M?"minWidth":"minHeight"]:E},b),ref:O},t,{ownerState:(0,bi.A)({},S,{state:e}),children:(0,Mi.jsx)(mE,{ownerState:(0,bi.A)({},S,{state:e}),className:k.wrapper,ref:_,children:(0,Mi.jsx)(gE,{ownerState:(0,bi.A)({},S,{state:e}),className:k.wrapperInner,children:i})})}))}))}));vE.muiSupportAuto=!0;const bE=vE;const xE=r.createContext({});function yE(e){return ga("MuiAccordion",e)}const wE=va("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),SE=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],kE=Aa(Ia,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(wE.region)]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],n),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],n)},"&:first-of-type":{"&::before":{display:"none"}},["&.".concat(wE.expanded)]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},["&.".concat(wE.disabled)]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),(e=>{let{theme:t}=e;return{variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{["&.".concat(wE.expanded)]:{margin:"16px 0"}}}]}})),jE=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:h={},slotProps:p={},TransitionComponent:f,TransitionProps:m}=n,g=(0,rr.A)(n,SE),[v,b]=Bl({controlled:c,default:a,name:"Accordion",state:"expanded"}),x=r.useCallback((e=>{b(!v),u&&u(e,!v)}),[v,u,b]),[y,...w]=r.Children.toArray(o),S=r.useMemo((()=>({expanded:v,disabled:s,disableGutters:l,toggle:x})),[v,s,l,x]),k=(0,bi.A)({},n,{square:d,disabled:s,disableGutters:l,expanded:v}),j=(e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return Sa({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],region:["region"]},yE,t)})(k),C=(0,bi.A)({transition:f},h),_=(0,bi.A)({transition:m},p),[A,E]=yc("transition",{elementType:bE,externalForwardedProps:{slots:C,slotProps:_},ownerState:k});return(0,Mi.jsxs)(kE,(0,bi.A)({className:yi(j.root,i),ref:t,ownerState:k,square:d},g,{children:[(0,Mi.jsx)(xE.Provider,{value:S,children:y}),(0,Mi.jsx)(A,(0,bi.A)({in:v,timeout:"auto"},E,{children:(0,Mi.jsx)("div",{"aria-labelledby":y.props.id,id:y.props["aria-controls"],role:"region",className:j.region,children:w})}))]}))}));function CE(e){return ga("MuiAccordionSummary",e)}const _E=va("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),AE=["children","className","expandIcon","focusVisibleClassName","onClick"],EE=Aa($s,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],n),["&.".concat(_E.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(_E.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["&:hover:not(.".concat(_E.disabled,")")]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{["&.".concat(_E.expanded)]:{minHeight:64}}}]}})),ME=Aa("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{theme:t}=e;return{display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),["&.".concat(_E.expanded)]:{margin:"20px 0"}}}]}})),RE=Aa("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),["&.".concat(_E.expanded)]:{transform:"rotate(180deg)"}}})),PE=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l}=n,c=(0,rr.A)(n,AE),{disabled:u=!1,disableGutters:d,expanded:h,toggle:p}=r.useContext(xE),f=(0,bi.A)({},n,{expanded:h,disabled:u,disableGutters:d}),m=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return Sa({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},CE,t)})(f);return(0,Mi.jsxs)(EE,(0,bi.A)({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":h,className:yi(m.root,i),focusVisibleClassName:yi(m.focusVisible,s),onClick:e=>{p&&p(e),l&&l(e)},ref:t,ownerState:f},c,{children:[(0,Mi.jsx)(ME,{className:m.content,ownerState:f,children:o}),a&&(0,Mi.jsx)(RE,{className:m.expandIconWrapper,ownerState:f,children:a})]}))}));function OE(e){return ga("MuiAccordionDetails",e)}va("MuiAccordionDetails",["root"]);const TE=["className"],NE=Aa("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}})),LE=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiAccordionDetails"}),{className:r}=n,o=(0,rr.A)(n,TE),i=n,a=(e=>{const{classes:t}=e;return Sa({root:["root"]},OE,t)})(i);return(0,Mi.jsx)(NE,(0,bi.A)({className:yi(a.root,r),ref:t,ownerState:i},o))}));function IE(e){return ga("MuiListItemAvatar",e)}va("MuiListItemAvatar",["root","alignItemsFlexStart"]);const zE=["className"],DE=Aa("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((e=>{let{ownerState:t}=e;return(0,bi.A)({minWidth:56,flexShrink:0},"flex-start"===t.alignItems&&{marginTop:8})})),FE=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiListItemAvatar"}),{className:o}=n,i=(0,rr.A)(n,zE),a=r.useContext(Ow),s=(0,bi.A)({},n,{alignItems:a.alignItems}),l=(e=>{const{alignItems:t,classes:n}=e;return Sa({root:["root","flex-start"===t&&"alignItemsFlexStart"]},IE,n)})(s);return(0,Mi.jsx)(DE,(0,bi.A)({className:yi(l.root,o),ownerState:s,ref:t},i))})),BE=Jl((0,Mi.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function WE(e){return ga("MuiAvatar",e)}va("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const HE=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],VE=Aa("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})((e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,bi.A)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,bi.A)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}})),UE=Aa("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),qE=Aa(BE,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});const $E=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:h,srcSet:p,variant:f="circular"}=n,m=(0,rr.A)(n,HE);let g=null;const v=function(e){let{crossOrigin:t,referrerPolicy:n,src:o,srcSet:i}=e;const[a,s]=r.useState(!1);return r.useEffect((()=>{if(!o&&!i)return;s(!1);let e=!0;const r=new Image;return r.onload=()=>{e&&s("loaded")},r.onerror=()=>{e&&s("error")},r.crossOrigin=t,r.referrerPolicy=n,r.src=o,i&&(r.srcset=i),()=>{e=!1}}),[t,n,o,i]),a}((0,bi.A)({},u,{src:h,srcSet:p})),b=h||p,x=b&&"error"!==v,y=(0,bi.A)({},n,{colorDefault:!x,component:s,variant:f}),w=(e=>{const{classes:t,variant:n,colorDefault:r}=e;return Sa({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},WE,t)})(y),[S,k]=yc("img",{className:w.img,elementType:UE,externalForwardedProps:{slots:l,slotProps:{img:(0,bi.A)({},u,c.img)}},additionalProps:{alt:o,src:h,srcSet:p,sizes:d},ownerState:y});return g=x?(0,Mi.jsx)(S,(0,bi.A)({},k)):i||0===i?i:b&&o?o[0]:(0,Mi.jsx)(qE,{ownerState:y,className:w.fallback}),(0,Mi.jsx)(VE,(0,bi.A)({as:s,ownerState:y,className:yi(w.root,a),ref:t},m,{children:g}))})),KE=$E,XE=Jl((0,Mi.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),YE=Jl((0,Mi.jsx)("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z"}),"BugReport"),GE=Jl((0,Mi.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96"}),"Cloud"),QE=Jl((0,Mi.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage"),JE=Jl((0,Mi.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),ZE=Jl((0,Mi.jsx)("path",{d:"M4 8h4V4H4zm6 12h4v-4h-4zm-6 0h4v-4H4zm0-6h4v-4H4zm6 0h4v-4h-4zm6-10v4h4V4zm-6 4h4V4h-4zm6 6h4v-4h-4zm0 6h4v-4h-4z"}),"Apps"),eM=Jl((0,Mi.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),tM=()=>{const e=Nv(),t=(0,r.useRef)(null),[n,o]=((0,r.useRef)(null),(0,r.useState)([])),[i,a]=(0,r.useState)([]),[s,l]=(0,r.useState)([]),[c,d]=(0,r.useState)([]),[h,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(!0),[g,v]=(0,r.useState)(""),[b,x]=(0,r.useState)(!1),[y,w]=(0,r.useState)(!0),[S,k]=(0,r.useState)(0),[j,C]=(0,r.useState)(["local"]),[_,A]=(0,r.useState)({serverIds:[],processIds:[],logTypes:["out","err"],logLevels:["error","warn","info","debug","unknown"],searchTerm:"",timeRange:"1h"}),E=e=>{const t=e.toLowerCase();return t.includes("error")||t.includes("err:")?"error":t.includes("warn")||t.includes("warning")?"warn":t.includes("info")||t.includes("log:")?"info":t.includes("debug")||t.includes("dbg:")?"debug":"unknown"};(0,r.useEffect)((()=>{(async()=>{try{m(!0);const e=(await nr.get("/api/processes")).data,t=(await nr.get("/api/remote/connections")).data;a(t);const n=[];n.push({serverId:"local",serverName:"Local Server",isRemote:!1,processes:e});for(const r of t)try{if(r.connected){const e=await nr.get("/api/remote/".concat(r.id,"/processes"));n.push({serverId:r.id,serverName:r.name,isRemote:!0,processes:e.data})}}catch(AR){console.warn("Failed to fetch processes for remote server ".concat(r.name,":"),AR),n.push({serverId:r.id,serverName:r.name,isRemote:!0,processes:[]})}o(n),A((e=>u(u({},e),{},{serverIds:n.map((e=>e.serverId))}))),m(!1)}catch(AR){v("Failed to fetch servers and processes"),m(!1)}})()}),[]);const M=e=>{const t=[];n.forEach((n=>{n.processes.forEach((r=>{const o=e.filter((e=>e.serverId===n.serverId&&e.processId===r.pm_id));o.length>0&&t.push({serverId:n.serverId,serverName:n.serverName,processId:"".concat(n.serverId,"-").concat(r.pm_id),processName:r.name,totalLogs:o.length,errorCount:o.filter((e=>"error"===e.level)).length,warningCount:o.filter((e=>"warn"===e.level)).length,infoCount:o.filter((e=>"info"===e.level)).length,lastLogTime:o.length>0?o[0].timestamp:null})}))})),p(t)};(0,r.useEffect)((()=>{let e=s;if(_.serverIds.length>0&&(e=e.filter((e=>_.serverIds.includes(e.serverId)))),_.processIds.length>0&&(e=e.filter((e=>_.processIds.includes("".concat(e.serverId,"-").concat(e.processId))))),_.logTypes.length>0&&(e=e.filter((e=>_.logTypes.includes(e.type)))),_.logLevels.length>0&&(e=e.filter((e=>_.logLevels.includes(e.level)))),_.searchTerm){const t=_.searchTerm.toLowerCase();e=e.filter((e=>e.content.toLowerCase().includes(t)||e.processName.toLowerCase().includes(t)||e.serverName.toLowerCase().includes(t)))}if("all"!==_.timeRange){const t=new Date,n={"1h":36e5,"6h":216e5,"24h":864e5}[_.timeRange];e=e.filter((e=>t.getTime()-e.timestamp.getTime()<=n))}d(e)}),[s,_]),(0,r.useEffect)((()=>{y&&t.current&&(t.current.scrollTop=t.current.scrollHeight)}),[c,y]);const R=e=>{A((t=>u(u({},t),{},{logTypes:t.logTypes.includes(e)?t.logTypes.filter((t=>t!==e)):[...t.logTypes,e]})))},P=e=>{switch(e){case"error":return(0,Mi.jsx)(eE,{color:"error",fontSize:"small"});case"warn":return(0,Mi.jsx)(tE,{color:"warning",fontSize:"small"});case"info":return(0,Mi.jsx)(XE,{color:"info",fontSize:"small"});case"debug":return(0,Mi.jsx)(YE,{color:"action",fontSize:"small"});default:return(0,Mi.jsx)(XE,{color:"disabled",fontSize:"small"})}},O=e=>{switch(e){case"error":return"error";case"warn":return"warning";case"info":return"info";default:return"primary"}},T=e=>e?(0,Mi.jsx)(GE,{color:"primary"}):(0,Mi.jsx)(QE,{color:"secondary"}),N=()=>{const e=[];return n.forEach((t=>{t.processes.forEach((n=>{e.push({value:"".concat(t.serverId,"-").concat(n.pm_id),label:"".concat(n.name," (").concat(t.serverName,")"),serverId:t.serverId,serverName:t.serverName})}))})),e};return(0,Mi.jsxs)(wa,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h4",component:"h1",children:"Remote Enhanced Log Management"}),(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1},children:[(0,Mi.jsx)(tl,{variant:b?"contained":"outlined",color:b?"error":"primary",onClick:()=>{x(!b)},startIcon:b?(0,Mi.jsx)(JE,{}):(0,Mi.jsx)(mx,{}),disabled:0===_.serverIds.length,children:b?"Stop Stream":"Start Stream"}),(0,Mi.jsx)(Ec,{onClick:async()=>{if(0!==_.serverIds.length)try{m(!0);const o=[];for(const i of _.serverIds){const a=n.find((e=>e.serverId===i));if(!a)continue;const s=_.processIds.length>0?a.processes.filter((e=>_.processIds.includes("".concat(i,"-").concat(e.pm_id)))):a.processes;for(const n of s)try{var e,t;let r;if(a.isRemote)r=await nr.get("/api/remote/".concat(i,"/logs/").concat(n.pm_id));else{const[e,t]=await Promise.all([nr.get("/api/logs/".concat(n.pm_id,"/out")),nr.get("/api/logs/".concat(n.pm_id,"/err"))]);r={data:{stdout:e.data.logs||[],stderr:t.data.logs||[]}}}null===(e=r.data.stdout)||void 0===e||e.forEach(((e,t)=>{e.trim()&&o.push({id:"".concat(i,"-").concat(n.pm_id,"-out-").concat(t,"-").concat(Date.now()),serverId:i,serverName:a.serverName,processId:n.pm_id,processName:n.name,type:"out",level:E(e),content:e,timestamp:new Date(Date.now()-1e3*(r.data.stdout.length-t)),raw:e,isRemote:a.isRemote})})),null===(t=r.data.stderr)||void 0===t||t.forEach(((e,t)=>{e.trim()&&o.push({id:"".concat(i,"-").concat(n.pm_id,"-err-").concat(t,"-").concat(Date.now()),serverId:i,serverName:a.serverName,processId:n.pm_id,processName:n.name,type:"err",level:E(e),content:e,timestamp:new Date(Date.now()-1e3*(r.data.stderr.length-t)),raw:e,isRemote:a.isRemote})}))}catch(r){console.warn("Failed to fetch logs for process ".concat(n.pm_id," on ").concat(a.serverName,":"),r)}}o.sort(((e,t)=>t.timestamp.getTime()-e.timestamp.getTime())),l(o),M(o),m(!1)}catch(AR){v("Failed to fetch logs"),m(!1)}},disabled:f,children:(0,Mi.jsx)(vx,{})}),(0,Mi.jsx)(Ec,{onClick:()=>{l([]),d([])},children:(0,Mi.jsx)(NC,{})}),(0,Mi.jsx)(Ec,{onClick:()=>{const e=c.map((e=>"[".concat(e.timestamp.toISOString(),"] [").concat(e.serverName,"] [").concat(e.processName,"] [").concat(e.type.toUpperCase(),"] [").concat(e.level.toUpperCase(),"] ").concat(e.content))).join("\n"),t=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download="ezpm2gui-remote-logs-".concat((new Date).toISOString().split("T")[0],".log"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)},disabled:0===c.length,children:(0,Mi.jsx)(LC,{})})]})]}),g&&(0,Mi.jsx)(Wc,{severity:"error",sx:{mb:2},children:g}),(0,Mi.jsxs)(sx,{value:S,onChange:(e,t)=>k(t),sx:{mb:2},children:[(0,Mi.jsx)(px,{label:"Log Viewer"}),(0,Mi.jsx)(px,{label:"Statistics"}),(0,Mi.jsx)(px,{label:"Server Tree"})]}),0===S&&(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsxs)(Ia,{sx:{p:2,mb:2},children:[(0,Mi.jsxs)($v,{container:!0,spacing:2,alignItems:"center",children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:3,children:(0,Mi.jsx)(oj,{fullWidth:!0,size:"small",placeholder:"Search logs...",value:_.searchTerm,onChange:e=>A((t=>u(u({},t),{},{searchTerm:e.target.value}))),InputProps:{startAdornment:(0,Mi.jsx)(TC,{sx:{mr:1,color:"action.active"}})}})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:3,children:(0,Mi.jsxs)(yw,{fullWidth:!0,size:"small",children:[(0,Mi.jsx)(Pw,{children:"Servers"}),(0,Mi.jsx)(zk,{multiple:!0,value:_.serverIds,onChange:e=>{A((t=>u(u({},t),{},{serverIds:e.target.value})))},renderValue:e=>(0,Mi.jsx)(wa,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((e=>{const t=n.find((t=>t.serverId===e));return(0,Mi.jsx)(gb,{label:(null===t||void 0===t?void 0:t.serverName)||e,size:"small",icon:T((null===t||void 0===t?void 0:t.isRemote)||!1)},e)}))}),children:n.map((e=>(0,Mi.jsx)($k,{value:e.serverId,children:(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:1},children:[T(e.isRemote),e.serverName,(0,Mi.jsx)(dE,{badgeContent:e.processes.length,color:"primary"})]})},e.serverId)))})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:3,children:(0,Mi.jsxs)(yw,{fullWidth:!0,size:"small",children:[(0,Mi.jsx)(Pw,{children:"Applications"}),(0,Mi.jsx)(zk,{multiple:!0,value:_.processIds,onChange:e=>{A((t=>u(u({},t),{},{processIds:e.target.value})))},renderValue:e=>(0,Mi.jsx)(wa,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((e=>{const t=N().find((t=>t.value===e));return(0,Mi.jsx)(gb,{label:(null===t||void 0===t?void 0:t.label)||e,size:"small"},e)}))}),children:N().map((e=>(0,Mi.jsx)($k,{value:e.value,children:(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,Mi.jsx)(ZE,{fontSize:"small"}),e.label]})},e.value)))})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:3,children:(0,Mi.jsxs)(yw,{fullWidth:!0,size:"small",children:[(0,Mi.jsx)(Pw,{children:"Time Range"}),(0,Mi.jsxs)(zk,{value:_.timeRange,onChange:e=>A((t=>u(u({},t),{},{timeRange:e.target.value}))),children:[(0,Mi.jsx)($k,{value:"1h",children:"Last Hour"}),(0,Mi.jsx)($k,{value:"6h",children:"Last 6 Hours"}),(0,Mi.jsx)($k,{value:"24h",children:"Last 24 Hours"}),(0,Mi.jsx)($k,{value:"all",children:"All Time"})]})]})})]}),(0,Mi.jsxs)(wa,{sx:{mt:2,display:"flex",gap:1,flexWrap:"wrap",alignItems:"center"},children:[(0,Mi.jsx)(Ol,{variant:"body2",sx:{mr:2},children:"Log Types:"}),(0,Mi.jsxs)($a,{size:"small",children:[(0,Mi.jsx)(tl,{variant:_.logTypes.includes("out")?"contained":"outlined",onClick:()=>R("out"),children:"Stdout"}),(0,Mi.jsx)(tl,{variant:_.logTypes.includes("err")?"contained":"outlined",onClick:()=>R("err"),color:"error",children:"Stderr"})]}),(0,Mi.jsx)(Ol,{variant:"body2",sx:{ml:2,mr:2},children:"Levels:"}),(0,Mi.jsx)($a,{size:"small",children:["error","warn","info","debug"].map((e=>(0,Mi.jsx)(tl,{variant:_.logLevels.includes(e)?"contained":"outlined",onClick:()=>(e=>{A((t=>u(u({},t),{},{logLevels:t.logLevels.includes(e)?t.logLevels.filter((t=>t!==e)):[...t.logLevels,e]})))})(e),color:O(e),children:e},e)))}),(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:y,onChange:e=>w(e.target.checked),size:"small"}),label:"Auto-scroll",sx:{ml:2}})]})]}),(0,Mi.jsxs)(Ia,{sx:{height:600,overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,Mi.jsx)(wa,{sx:{p:2,borderBottom:1,borderColor:"divider"},children:(0,Mi.jsxs)(Ol,{variant:"h6",children:["Logs (",c.length,")",b&&(0,Mi.jsx)(gb,{label:"STREAMING",color:"success",size:"small",sx:{ml:2}})]})}),f?(0,Mi.jsxs)(wa,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flex:1},children:[(0,Mi.jsx)(iu,{}),(0,Mi.jsx)(Ol,{sx:{ml:2},children:"Loading logs..."})]}):(0,Mi.jsx)(wa,{ref:t,sx:{flex:1,overflow:"auto",p:1,fontFamily:"monospace",fontSize:"0.875rem",backgroundColor:"dark"===e.palette.mode?"#1e1e1e":"#f5f5f5"},children:0===c.length?(0,Mi.jsx)(wa,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:(0,Mi.jsx)(Ol,{color:"text.secondary",children:"No logs found matching the current filters"})}):c.map((e=>(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"flex-start",gap:1,py:.5,px:1,borderBottom:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:[(0,Mi.jsx)(Ol,{variant:"caption",sx:{minWidth:60,color:"text.secondary",fontSize:"0.75rem"},children:e.timestamp.toLocaleTimeString()}),(0,Mi.jsx)(gb,{label:e.serverName,size:"small",icon:T(e.isRemote),sx:{minWidth:100,fontSize:"0.7rem"},color:e.isRemote?"primary":"secondary"}),(0,Mi.jsx)(gb,{label:e.processName,size:"small",sx:{minWidth:80,fontSize:"0.7rem"}}),(0,Mi.jsx)(wa,{sx:{display:"flex",alignItems:"center",minWidth:20},children:P(e.level)}),(0,Mi.jsx)(Ol,{sx:{flex:1,whiteSpace:"pre-wrap",wordBreak:"break-word",color:"err"===e.type?"error.main":"text.primary"},children:e.content})]},e.id)))})]})]}),1===S&&(0,Mi.jsx)($v,{container:!0,spacing:3,children:h.map((e=>(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:4,children:(0,Mi.jsx)(Gv,{children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[T("local"!==e.serverId),(0,Mi.jsx)(Ol,{variant:"h6",children:e.processName})]}),(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:["Server: ",e.serverName]}),(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:["Total Logs: ",e.totalLogs]}),(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1,mb:2,flexWrap:"wrap"},children:[(0,Mi.jsx)(gb,{label:"".concat(e.errorCount," Errors"),color:"error",size:"small",variant:e.errorCount>0?"filled":"outlined"}),(0,Mi.jsx)(gb,{label:"".concat(e.warningCount," Warnings"),color:"warning",size:"small",variant:e.warningCount>0?"filled":"outlined"}),(0,Mi.jsx)(gb,{label:"".concat(e.infoCount," Info"),color:"info",size:"small",variant:e.infoCount>0?"filled":"outlined"})]}),e.lastLogTime&&(0,Mi.jsxs)(Ol,{variant:"caption",color:"text.secondary",children:["Last log: ",e.lastLogTime.toLocaleString()]})]})})},e.processId)))}),2===S&&(0,Mi.jsxs)(Ia,{sx:{p:3},children:[(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"Server and Application Tree"}),(0,Mi.jsx)(kb,{sx:{mb:2}}),n.map((e=>(0,Mi.jsxs)(jE,{expanded:j.includes(e.serverId),onChange:()=>{C((t=>t.includes(e.serverId)?t.filter((t=>t!==e.serverId)):[...t,e.serverId]))},children:[(0,Mi.jsx)(PE,{expandIcon:(0,Mi.jsx)(eM,{}),children:(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:2},children:[T(e.isRemote),(0,Mi.jsx)(Ol,{variant:"h6",children:e.serverName}),(0,Mi.jsx)(dE,{badgeContent:e.processes.length,color:"primary",children:(0,Mi.jsx)(ZE,{})})]})}),(0,Mi.jsx)(LE,{children:(0,Mi.jsx)(Iw,{children:0===e.processes.length?(0,Mi.jsx)(Hj,{children:(0,Mi.jsx)(qj,{primary:"No applications found",secondary:e.isRemote?"Check remote connection":"No PM2 processes running"})}):e.processes.map((t=>{const n=h.find((n=>n.serverId===e.serverId&&n.processId==="".concat(e.serverId,"-").concat(t.pm_id)));return(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(FE,{children:(0,Mi.jsx)(KE,{children:(0,Mi.jsx)(ZE,{})})}),(0,Mi.jsx)(qj,{primary:(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,Mi.jsx)(Ol,{variant:"subtitle1",children:t.name}),(0,Mi.jsx)(gb,{label:"ID: ".concat(t.pm_id),size:"small",variant:"outlined"})]}),secondary:(0,Mi.jsx)(wa,{sx:{mt:1},children:n?(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:[(0,Mi.jsx)(gb,{label:"".concat(n.totalLogs," Total"),size:"small",variant:"outlined"}),n.errorCount>0&&(0,Mi.jsx)(gb,{label:"".concat(n.errorCount," Errors"),size:"small",color:"error"}),n.warningCount>0&&(0,Mi.jsx)(gb,{label:"".concat(n.warningCount," Warnings"),size:"small",color:"warning"})]}):(0,Mi.jsx)(Ol,{variant:"caption",color:"text.secondary",children:"No logs available"})})})]},t.pm_id)}))})})]},e.serverId)))]})]})},nM=["title","titleId"];function rM(e,t){let{title:n,titleId:o}=e,i=or(e,nM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const oM=r.forwardRef(rM),iM=["title","titleId"];function aM(e,t){let{title:n,titleId:o}=e,i=or(e,iM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"}))}const sM=r.forwardRef(aM),lM=["title","titleId"];function cM(e,t){let{title:n,titleId:o}=e,i=or(e,lM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5m.75-9 3-3 2.148 2.148A12.061 12.061 0 0 1 16.5 7.605"}))}const uM=r.forwardRef(cM),dM=["title","titleId"];function hM(e,t){let{title:n,titleId:o}=e,i=or(e,dM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"}))}const pM=r.forwardRef(hM),fM=["title","titleId"];function mM(e,t){let{title:n,titleId:o}=e,i=or(e,fM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15a4.5 4.5 0 0 0 4.5 4.5H18a3.75 3.75 0 0 0 1.332-7.257 3 3 0 0 0-3.758-3.848 5.25 5.25 0 0 0-10.233 2.33A4.502 4.502 0 0 0 2.25 15Z"}))}const gM=r.forwardRef(mM),vM=["title","titleId"];function bM(e,t){let{title:n,titleId:o}=e,i=or(e,vM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const xM=r.forwardRef(bM),yM=["title","titleId"];function wM(e,t){let{title:n,titleId:o}=e,i=or(e,yM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"}))}const SM=r.forwardRef(wM),kM=["title","titleId"];function jM(e,t){let{title:n,titleId:o}=e,i=or(e,kM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z"}))}const CM=r.forwardRef(jM),_M=["title","titleId"];function AM(e,t){let{title:n,titleId:o}=e,i=or(e,_M);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const EM=r.forwardRef(AM),MM=["title","titleId"];function RM(e,t){let{title:n,titleId:o}=e,i=or(e,MM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z"}))}const PM=r.forwardRef(RM),OM=["title","titleId"];function TM(e,t){let{title:n,titleId:o}=e,i=or(e,OM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6a7.5 7.5 0 1 0 7.5 7.5h-7.5V6Z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5H21A7.5 7.5 0 0 0 13.5 3v7.5Z"}))}const NM=r.forwardRef(TM),LM=["title","titleId"];function IM(e,t){let{title:n,titleId:o}=e,i=or(e,LM);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const zM=r.forwardRef(IM),DM=e=>{let{toggleAbout:t,onItemClick:n}=e;const r=io().pathname,o=()=>{n&&n()},i=e=>"/"===e&&("/"===r||"/processes"===r)||r===e,a=[{label:"Processes",path:"/processes",icon:oM},{label:"Monitoring",path:"/monit",icon:sM},{label:"Advanced Monitoring",path:"/advanced-monitoring",icon:uM},{label:"Enhanced Logs",path:"/enhanced-logs",icon:pM},{label:"Remote Servers",path:"/remote",icon:gM},{label:"Deploy New App",path:"/deploy",icon:xM},{label:"PM2 Modules",path:"/modules",icon:SM},{label:"Ecosystem Config",path:"/ecosystem",icon:Bx},{label:"Cluster Management",path:"/cluster",icon:CM},{label:"Cron Jobs",path:"/cron-jobs",icon:EM},{label:"Load Balancing Guide",path:"/load-balancing-guide",icon:PM},{label:"Log Streaming",path:"/logs",icon:NM}];return(0,Mi.jsx)("div",{className:"h-full flex flex-col bg-white border-r border-gray-200",children:(0,Mi.jsxs)("nav",{className:"flex-1 px-3 py-4 space-y-1 overflow-y-auto",children:[(0,Mi.jsxs)("div",{className:"space-y-1",children:[(0,Mi.jsx)("div",{className:"px-2 pb-1",children:(0,Mi.jsx)("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Process Management"})}),a.map((e=>{const t=e.icon;return(0,Mi.jsxs)(ui,{to:e.path,onClick:o,className:"\n group flex items-center px-2 py-2 text-xs font-medium rounded-md transition-all duration-200 relative\n ".concat(i(e.path)?"bg-blue-100 text-blue-700 border-l-2 border-blue-500":"text-gray-700 hover:text-gray-900 hover:bg-gray-100","\n "),children:[(0,Mi.jsx)("div",{className:"\n flex items-center justify-center w-6 h-6 rounded-md mr-2 transition-all duration-200\n ".concat(i(e.path)?"bg-blue-500 text-white":"bg-gray-200 text-gray-600 group-hover:bg-gray-300","\n "),children:(0,Mi.jsx)(t,{className:"h-3.5 w-3.5"})}),(0,Mi.jsx)("span",{className:"truncate font-medium",children:e.label}),i(e.path)&&(0,Mi.jsx)("div",{className:"absolute right-2 w-1.5 h-1.5 bg-blue-500 rounded-full"})]},e.path)}))]}),(0,Mi.jsxs)("div",{className:"pt-4 space-y-1 border-t border-gray-200 mt-4",children:[(0,Mi.jsx)("div",{className:"px-2 pb-1",children:(0,Mi.jsx)("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"System"})}),(0,Mi.jsxs)("button",{onClick:()=>{t(),o()},className:"w-full group flex items-center px-2 py-2 text-xs font-medium rounded-md text-gray-700 hover:text-gray-900 hover:bg-gray-100 transition-all duration-200",children:[(0,Mi.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-md mr-2 bg-gray-200 text-gray-600 group-hover:bg-gray-300 transition-all duration-200",children:(0,Mi.jsx)(Cx,{className:"h-3.5 w-3.5"})}),(0,Mi.jsx)("span",{className:"truncate font-medium",children:"About"})]}),(0,Mi.jsxs)(ui,{to:"/settings",onClick:o,className:"\n group flex items-center px-2 py-2 text-xs font-medium rounded-md transition-all duration-200 relative\n ".concat(i("/settings")?"bg-blue-100 text-blue-700 border-l-2 border-blue-500":"text-gray-700 hover:text-gray-900 hover:bg-gray-100","\n "),children:[(0,Mi.jsx)("div",{className:"\n flex items-center justify-center w-6 h-6 rounded-md mr-2 transition-all duration-200\n ".concat(i("/settings")?"bg-blue-500 text-white":"bg-gray-200 text-gray-600 group-hover:bg-gray-300","\n "),children:(0,Mi.jsx)(zM,{className:"h-3.5 w-3.5"})}),(0,Mi.jsx)("span",{className:"truncate font-medium",children:"Settings"}),i("/settings")&&(0,Mi.jsx)("div",{className:"absolute right-2 w-1.5 h-1.5 bg-blue-500 rounded-full"})]})]})]})})},FM=()=>{const[e,t]=(0,r.useState)(!0),[n,o]=(0,r.useState)("3000"),[i,a]=(0,r.useState)("100"),[s,l]=(0,r.useState)("true"===localStorage.getItem("darkMode")),[c,u]=(0,r.useState)("pm2"),[d,h]=(0,r.useState)("blue"),[p,f]=(0,r.useState)(!1),m=(e,t)=>{"clickaway"!==t&&f(!1)};return(0,Mi.jsxs)(sb,{maxWidth:"lg",sx:{mt:4,mb:4},children:[(0,Mi.jsxs)(Ia,{sx:{p:3},variant:"outlined",children:[(0,Mi.jsx)(Ol,{variant:"h5",gutterBottom:!0,color:"primary",children:"Application Settings"}),(0,Mi.jsx)(kb,{sx:{my:3}}),(0,Mi.jsxs)($v,{container:!0,spacing:4,children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(Gv,{variant:"outlined",sx:{height:"100%"},children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"User Interface"}),(0,Mi.jsxs)(kl,{spacing:3,sx:{mt:3},children:[(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:s,onChange:e=>l(e.target.checked),color:"primary"}),label:"Dark Mode"}),(0,Mi.jsxs)(yw,{fullWidth:!0,variant:"outlined",size:"small",children:[(0,Mi.jsx)(Pw,{id:"theme-select-label",children:"Theme Color"}),(0,Mi.jsxs)(zk,{labelId:"theme-select-label",id:"theme-select",value:d,label:"Theme Color",onChange:e=>{h(e.target.value)},children:[(0,Mi.jsx)($k,{value:"blue",children:"Blue"}),(0,Mi.jsx)($k,{value:"green",children:"Green"}),(0,Mi.jsx)($k,{value:"purple",children:"Purple"}),(0,Mi.jsx)($k,{value:"orange",children:"Orange"})]})]}),(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:e,onChange:e=>t(e.target.checked),color:"primary"}),label:"Auto Refresh Dashboard"}),(0,Mi.jsx)(oj,{label:"Refresh Interval (ms)",variant:"outlined",type:"number",value:n,onChange:e=>o(e.target.value),disabled:!e,size:"small",fullWidth:!0})]})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsx)(Gv,{variant:"outlined",sx:{height:"100%"},children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"h6",gutterBottom:!0,children:"PM2 Configuration"}),(0,Mi.jsxs)(kl,{spacing:3,sx:{mt:3},children:[(0,Mi.jsx)(oj,{label:"PM2 Path",variant:"outlined",value:c,onChange:e=>u(e.target.value),size:"small",fullWidth:!0,helperText:"Path to the PM2 executable (default: 'pm2')"}),(0,Mi.jsx)(oj,{label:"Log Lines to Display",variant:"outlined",type:"number",value:i,onChange:e=>a(e.target.value),size:"small",fullWidth:!0,helperText:"Maximum number of log lines to display"})]})]})})})]}),(0,Mi.jsx)(wa,{sx:{mt:4,display:"flex",justifyContent:"flex-end"},children:(0,Mi.jsx)(tl,{variant:"contained",color:"primary",onClick:()=>{localStorage.setItem("autoRefresh",e.toString()),localStorage.setItem("refreshInterval",n),localStorage.setItem("logLines",i),localStorage.setItem("darkMode",s.toString()),localStorage.setItem("pm2Path",c),localStorage.setItem("theme",d),f(!0)},children:"Save Settings"})})]}),(0,Mi.jsx)(Aj,{open:p,autoHideDuration:6e3,onClose:m,children:(0,Mi.jsx)(Wc,{onClose:m,severity:"success",sx:{width:"100%"},children:"Settings saved successfully!"})})]})};function BM(e){return ga("MuiCardHeader",e)}const WM=va("MuiCardHeader",["root","avatar","action","content","title","subheader"]),HM=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],VM=Aa("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,bi.A)({["& .".concat(WM.title)]:t.title,["& .".concat(WM.subheader)]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),UM=Aa("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),qM=Aa("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),$M=Aa("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),KM=r.forwardRef((function(e,t){const n=Oa({props:e,name:"MuiCardHeader"}),{action:r,avatar:o,className:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:d}=n,h=(0,rr.A)(n,HM),p=(0,bi.A)({},n,{component:a,disableTypography:s}),f=(e=>{const{classes:t}=e;return Sa({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},BM,t)})(p);let m=u;null==m||m.type===Ol||s||(m=(0,Mi.jsx)(Ol,(0,bi.A)({variant:o?"body2":"h5",className:f.title,component:"span",display:"block"},d,{children:m})));let g=l;return null==g||g.type===Ol||s||(g=(0,Mi.jsx)(Ol,(0,bi.A)({variant:o?"body2":"body1",className:f.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:g}))),(0,Mi.jsxs)(VM,(0,bi.A)({className:yi(f.root,i),as:a,ref:t,ownerState:p},h,{children:[o&&(0,Mi.jsx)(UM,{className:f.avatar,ownerState:p,children:o}),(0,Mi.jsxs)($M,{className:f.content,ownerState:p,children:[m,g]}),r&&(0,Mi.jsx)(qM,{className:f.action,ownerState:p,children:r})]}))})),XM=Jl((0,Mi.jsx)("path",{d:"m17 16-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5z"}),"DeviceHub"),YM=Jl((0,Mi.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update"),GM=Jl((0,Mi.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),QM=Jl((0,Mi.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),JM=Jl([(0,Mi.jsx)("circle",{cx:"7.2",cy:"14.4",r:"3.2"},"0"),(0,Mi.jsx)("circle",{cx:"14.8",cy:"18",r:"2"},"1"),(0,Mi.jsx)("circle",{cx:"15.2",cy:"8.8",r:"4.8"},"2")],"BubbleChart"),ZM=()=>{const[e,t]=(0,r.useState)("panel1"),n=e=>(n,r)=>{t(!!r&&e)};return(0,Mi.jsx)(wa,{children:(0,Mi.jsxs)(Ia,{sx:{p:3,mb:3},children:[(0,Mi.jsx)(Ol,{variant:"h5",gutterBottom:!0,children:"PM2 Load Balancing Guide"}),(0,Mi.jsx)(kb,{sx:{mb:3}}),(0,Mi.jsx)(Wc,{severity:"info",sx:{mb:3},children:(0,Mi.jsx)(Ol,{variant:"body1",children:"PM2 provides built-in load balancing capabilities for Node.js applications. This guide will help you understand how to set it up and use it effectively."})}),(0,Mi.jsxs)(jE,{expanded:"panel1"===e,onChange:n("panel1"),children:[(0,Mi.jsx)(PE,{expandIcon:(0,Mi.jsx)(eM,{}),children:(0,Mi.jsx)(Ol,{variant:"h6",children:"What is PM2 Load Balancing?"})}),(0,Mi.jsxs)(LE,{children:[(0,Mi.jsx)(Ol,{variant:"body1",paragraph:!0,children:"PM2 Load Balancing allows your application to handle more traffic by creating multiple instances of your application that work together. This is particularly useful for:"}),(0,Mi.jsxs)(Iw,{children:[(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(CA,{children:(0,Mi.jsx)(ZA,{})}),(0,Mi.jsx)(qj,{primary:"Improving performance by utilizing all CPU cores"})]}),(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(CA,{children:(0,Mi.jsx)(XM,{})}),(0,Mi.jsx)(qj,{primary:"Distributing incoming requests across multiple instances"})]}),(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(CA,{children:(0,Mi.jsx)(YM,{})}),(0,Mi.jsx)(qj,{primary:"Enabling zero-downtime reloads and updates"})]})]})]})]}),(0,Mi.jsxs)(jE,{expanded:"panel2"===e,onChange:n("panel2"),children:[(0,Mi.jsx)(PE,{expandIcon:(0,Mi.jsx)(eM,{}),children:(0,Mi.jsx)(Ol,{variant:"h6",children:"How to Set Up Load Balancing"})}),(0,Mi.jsxs)(LE,{children:[(0,Mi.jsx)(Ol,{variant:"body1",paragraph:!0,children:"Setting up load balancing with PM2 requires two key settings:"}),(0,Mi.jsxs)($v,{container:!0,spacing:3,children:[(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsxs)(Gv,{variant:"outlined",children:[(0,Mi.jsx)(KM,{title:"Multiple Instances"}),(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"body2",paragraph:!0,children:"Set the number of instances greater than 1 to create multiple workers. Use 0 or -1 to automatically use all available CPU cores."}),(0,Mi.jsx)(wa,{sx:{p:1,bgcolor:"grey.100",borderRadius:1},children:(0,Mi.jsx)(Ol,{variant:"body2",component:"code",children:'"instances": 4 // or -1 for max'})})]})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:6,children:(0,Mi.jsxs)(Gv,{variant:"outlined",children:[(0,Mi.jsx)(KM,{title:"Cluster Mode"}),(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"body2",paragraph:!0,children:'Set the execution mode to "cluster" to allow all instances to share the same server port.'}),(0,Mi.jsx)(wa,{sx:{p:1,bgcolor:"grey.100",borderRadius:1},children:(0,Mi.jsx)(Ol,{variant:"body2",component:"code",children:'"exec_mode": "cluster"'})})]})]})})]})]})]}),(0,Mi.jsxs)(jE,{expanded:"panel3"===e,onChange:n("panel3"),children:[(0,Mi.jsx)(PE,{expandIcon:(0,Mi.jsx)(eM,{}),children:(0,Mi.jsx)(Ol,{variant:"h6",children:"Best Practices"})}),(0,Mi.jsx)(LE,{children:(0,Mi.jsxs)(Iw,{children:[(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(CA,{children:(0,Mi.jsx)(GM,{})}),(0,Mi.jsx)(qj,{primary:"Number of Instances",secondary:"For CPU-bound applications, use a number equal to your CPU cores. For I/O-bound applications, you can use more."})]}),(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(CA,{children:(0,Mi.jsx)(QM,{})}),(0,Mi.jsx)(qj,{primary:"Application Design",secondary:"Ensure your application is stateless or uses external state storage like Redis for session management."})]}),(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(CA,{children:(0,Mi.jsx)(JM,{})}),(0,Mi.jsx)(qj,{primary:"Memory Management",secondary:"Monitor memory usage and set appropriate max_memory_restart limits to prevent memory leaks."})]}),(0,Mi.jsxs)(Hj,{children:[(0,Mi.jsx)(CA,{children:(0,Mi.jsx)(YM,{})}),(0,Mi.jsx)(qj,{primary:"Zero-downtime Updates",secondary:"Use the reload feature instead of restart to update your application without disrupting service."})]})]})})]}),(0,Mi.jsx)($v,{container:!0,sx:{mt:3},children:(0,Mi.jsx)($v,{item:!0,children:(0,Mi.jsx)(tl,{variant:"contained",color:"primary",href:"/processes",children:"Go to Process List"})})})]})})},eR=Jl((0,Mi.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),tR=Jl((0,Mi.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),nR=Jl((0,Mi.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),rR=Jl((0,Mi.jsx)("path",{d:"M3 3h18v2H3z"}),"Maximize"),oR=Jl((0,Mi.jsx)("path",{d:"M6 19h12v2H6z"}),"Minimize"),iR=Jl((0,Mi.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),aR=e=>{let{connectionId:t,processId:n,processName:o,connectionName:i,logs:a,onClose:s,onClear:l,rightOffset:c=20,zIndex:u=1e3}=e;const[d,h]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[m,g]=(0,r.useState)({stdout:[],stderr:[]}),[v,b]=(0,r.useState)("all"),x=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(!p){const e={stdout:[],stderr:[]};a.forEach(((t,n)=>{const r=t.startsWith("[STDOUT]")?"stdout":"stderr",o=t.replace(/^\[(STDOUT|STDERR)\]\s*/,"");if(o.trim()){const t={id:"".concat(Date.now(),"-").concat(n),timestamp:new Date,type:r,message:o};e[r].push(t)}})),g(e)}}),[a,p]),(0,r.useEffect)((()=>{var e;d||p||(null===(e=x.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[m,d,p]);const y=()=>m.stdout.length+m.stderr.length;return(0,Mi.jsxs)(Ia,{elevation:8,sx:{position:"fixed",bottom:0,right:c,width:d?400:1e3,maxHeight:d?60:800,zIndex:u,borderRadius:"8px 8px 0 0",overflow:"hidden",transition:"all 0.3s ease-in-out"},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:1,bgcolor:"primary.main",color:"primary.contrastText",cursor:"pointer"},onClick:()=>h(!d),children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,Mi.jsxs)(Ol,{variant:"body2",fontWeight:"bold",children:["Logs: ",o]}),(0,Mi.jsx)(gb,{label:i,size:"small",sx:{bgcolor:"rgba(255,255,255,0.2)",color:"inherit",fontSize:"0.7rem",height:20}})," ",y()>0&&(0,Mi.jsx)(gb,{label:"".concat(y()," lines"),size:"small",sx:{bgcolor:"rgba(255,255,255,0.2)",color:"inherit",fontSize:"0.7rem",height:20}}),m.stdout.length>0&&(0,Mi.jsx)(gb,{label:"OUT: ".concat(m.stdout.length),size:"small",sx:{bgcolor:"rgba(76,175,80,0.8)",color:"white",fontSize:"0.7rem",height:20}}),m.stderr.length>0&&(0,Mi.jsx)(gb,{label:"ERR: ".concat(m.stderr.length),size:"small",sx:{bgcolor:"rgba(244,67,54,0.8)",color:"white",fontSize:"0.7rem",height:20}})]}),(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center"},children:[(0,Mi.jsx)(SA,{title:p?"Resume":"Pause",children:(0,Mi.jsx)(Ec,{size:"small",onClick:e=>{e.stopPropagation(),f(!p)},sx:{color:"inherit",mr:.5},children:p?(0,Mi.jsx)(mx,{fontSize:"small"}):(0,Mi.jsx)(JE,{fontSize:"small"})})}),(0,Mi.jsx)(SA,{title:"Clear logs",children:(0,Mi.jsx)(Ec,{size:"small",onClick:e=>{e.stopPropagation(),l(),g({stdout:[],stderr:[]})},sx:{color:"inherit",mr:.5},children:(0,Mi.jsx)(NC,{fontSize:"small"})})}),(0,Mi.jsx)(SA,{title:d?"Maximize":"Minimize",children:(0,Mi.jsx)(Ec,{size:"small",onClick:e=>{e.stopPropagation(),h(!d)},sx:{color:"inherit",mr:.5},children:d?(0,Mi.jsx)(rR,{fontSize:"small"}):(0,Mi.jsx)(oR,{fontSize:"small"})})}),(0,Mi.jsx)(SA,{title:"Close",children:(0,Mi.jsx)(Ec,{size:"small",onClick:e=>{e.stopPropagation(),s()},sx:{color:"inherit"},children:(0,Mi.jsx)(iR,{fontSize:"small"})})})]})]}),(0,Mi.jsxs)(bE,{in:!d,children:[" ",(0,Mi.jsx)(wa,{sx:{height:440,overflow:"auto",bgcolor:"#1e1e1e",color:"#fff",fontFamily:"monospace",fontSize:"12px"},children:0===y()?(0,Mi.jsx)(wa,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#888"},children:p?"Logs paused - Click play to resume":"Waiting for logs..."}):(0,Mi.jsxs)(Iw,{dense:!0,sx:{p:0},children:[" ",[...m.stdout,...m.stderr].sort(((e,t)=>e.timestamp.getTime()-t.timestamp.getTime())).map((e=>{return(0,Mi.jsx)(Hj,{sx:{py:.1,px:1,borderBottom:"1px solid rgba(255,255,255,0.05)","&:hover":{bgcolor:"rgba(255,255,255,0.05)"}},children:(0,Mi.jsxs)(wa,{sx:{width:"100%",display:"flex",alignItems:"center",gap:1,minHeight:"20px"},children:[(0,Mi.jsx)(Ol,{variant:"caption",sx:{color:"#888",fontSize:"10px",minWidth:"60px",flexShrink:0},children:(n=e.timestamp,n.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}))}),(0,Mi.jsx)(gb,{label:"stderr"===e.type?"ERR":"OUT",size:"small",sx:{bgcolor:(t=e.type,"stderr"===t?"#ff5252":"#4caf50"),color:"white",fontSize:"8px",height:14,minWidth:32,flexShrink:0,"& .MuiChip-label":{px:.5}}})," ",(0,Mi.jsx)(SA,{title:e.message,placement:"top",children:(0,Mi.jsx)(Ol,{variant:"body2",sx:{wordBreak:"break-word",fontSize:"11px",lineHeight:1.3,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:e.message})})]})},e.id);var t,n})),(0,Mi.jsx)("div",{ref:x})]})})]})]})},sR=["children","value","index"];function lR(e){const{children:t,value:n,index:r}=e,o=or(e,sR);return(0,Mi.jsx)("div",u(u({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&(0,Mi.jsx)(wa,{sx:{p:3},children:t})}))}const cR=()=>{const[e,t]=(0,r.useState)([]),[n,o]=(0,r.useState)(!1),[i,a]=(0,r.useState)(null),[s,l]=(0,r.useState)({}),[c,d]=(0,r.useState)({}),[h,p]=(0,r.useState)(new Set),[f,m]=(0,r.useState)({}),[g,v]=(0,r.useState)(null),[b,x]=(0,r.useState)(0),[y,w]=(0,r.useState)({}),[S,k]=(0,r.useState)(null),[j,C]=(0,r.useState)({name:"",host:"",port:22,username:"",password:"",privateKey:"",useSudo:!1});(0,r.useEffect)((()=>{_();const e=Oe();return k(e),e.on("remote-log-line",(e=>{console.log("Received remote-log-line:",e);const t="".concat(e.connectionId,"-").concat(e.processId);console.log("Looking for window key:",t),w((n=>(console.log("Current log windows:",Object.keys(n)),n[t]?(console.log("Updating logs for window:",t),u(u({},n),{},{[t]:u(u({},n[t]),{},{logs:[...n[t].logs,"[".concat(e.logType.toUpperCase(),"] ").concat(e.line)]})})):(console.log("Window not found for key:",t),n))))})),e.on("remote-log-error",(e=>{console.error("Remote log error:",e),v("Log error: ".concat(e.error))})),e.on("remote-log-error",(e=>{console.error("Remote log error:",e),v("Log streaming error: ".concat(e.error))})),()=>{e&&e.disconnect()}}),[]);const _=async()=>{try{const e=await fetch("/api/remote/connections");if(e.ok){const n=await e.json();t(n)}}catch(g){console.error("Failed to load connections:",g),v("Failed to load connections")}},A=async e=>{m((t=>u(u({},t),{},{[e]:!0})));try{const r=await fetch("/api/remote/".concat(e,"/connect"),{method:"POST"});if(r.ok)await M(e),await R(e),t((t=>t.map((t=>t.id===e?u(u({},t),{},{connected:!0}):t))));else try{const e=await r.json();v(e.error||"Failed to connect")}catch(n){const e=await r.text();v(e||"Failed to connect (Invalid server response)")}}catch(g){console.error("Connection failed:",g),v("Connection failed: ".concat(g instanceof Error?g.message:"Unknown error"))}finally{m((t=>u(u({},t),{},{[e]:!1})))}},E=async e=>{try{(await fetch("/api/remote/".concat(e,"/disconnect"),{method:"POST"})).ok&&(t((t=>t.map((t=>t.id===e?u(u({},t),{},{connected:!1}):t)))),l((t=>{const n=u({},t);return delete n[e],n})))}catch(g){console.error("Disconnect failed:",g),v("Disconnect failed")}},M=async e=>{try{const t=await fetch("/api/remote/".concat(e,"/processes"));if(t.ok){const n=await t.json();l((t=>u(u({},t),{},{[e]:n})))}}catch(g){console.error("Failed to load processes:",g)}},R=async e=>{try{const t=await fetch("/api/remote/".concat(e,"/system-info"));if(t.ok){const n=await t.json();d((t=>u(u({},t),{},{[e]:n})))}}catch(g){console.error("Failed to load system info:",g)}},P=async(e,t,n)=>{try{const r=await fetch("/api/remote/".concat(e,"/processes/").concat(t,"/").concat(n),{method:"POST"});if(r.ok)await M(e);else{const e=await r.json();v(e.error||"Failed to ".concat(n," process"))}}catch(g){console.error("Process ".concat(n," failed:"),g),v("Process ".concat(n," failed"))}},O=()=>{o(!1),a(null),C({name:"",host:"",port:22,username:"",password:"",privateKey:"",useSudo:!1})},T=e=>{switch(e){case"online":return"success";case"stopped":return"error";case"stopping":return"warning";case"waiting restart":case"launching":return"info";default:return"default"}};return(0,Mi.jsxs)(wa,{sx:{p:3},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:3},children:[(0,Mi.jsxs)(Ol,{variant:"h4",gutterBottom:!0,children:[(0,Mi.jsx)(GE,{sx:{mr:2,verticalAlign:"middle"}}),"Remote Server Connections"]}),(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1},children:[e.some((e=>!e.connected))&&(0,Mi.jsx)(tl,{variant:"outlined",startIcon:(0,Mi.jsx)(mx,{}),onClick:async()=>{const t=e.filter((e=>!e.connected));for(const e of t)await A(e.id)},disabled:Object.values(f).some((e=>e)),children:"Connect All"}),e.some((e=>e.connected))&&(0,Mi.jsx)(tl,{variant:"outlined",startIcon:(0,Mi.jsx)(gx,{}),onClick:async()=>{const t=e.filter((e=>e.connected));for(const e of t)await E(e.id)},disabled:Object.values(f).some((e=>e)),children:"Disconnect All"}),(0,Mi.jsx)(tl,{variant:"contained",startIcon:(0,Mi.jsx)($j,{}),onClick:()=>o(!0),children:"Add Connection"})]})]}),e.length>0&&!e.some((e=>e.connected))&&(0,Mi.jsxs)(Wc,{severity:"info",sx:{mb:2},children:[(0,Mi.jsx)("strong",{children:"Remote servers are configured but not connected."}),' Click the "Connect" button on any server below to establish an SSH connection and manage remote PM2 processes.']}),g&&(0,Mi.jsx)(Wc,{severity:"error",sx:{mb:2},onClose:()=>v(null),children:g}),(0,Mi.jsx)($v,{container:!0,spacing:3,children:e.map((t=>{var n;return(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(Gv,{children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center"},children:[(0,Mi.jsx)(Ol,{variant:"h6",children:t.name}),(0,Mi.jsx)(gb,{label:t.connected?"Connected":"Disconnected",color:t.connected?"success":"default",size:"small",sx:{ml:2}})]}),(0,Mi.jsxs)(wa,{children:[t.connected?(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsx)(Ec,{onClick:()=>{M(t.id),R(t.id)},disabled:f[t.id],children:(0,Mi.jsx)(vx,{})}),(0,Mi.jsx)(Ec,{onClick:()=>{return e=t.id,void p((t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}));var e},children:h.has(t.id)?(0,Mi.jsx)(eR,{}):(0,Mi.jsx)(eM,{})}),(0,Mi.jsx)(tl,{variant:"outlined",onClick:()=>E(t.id),disabled:f[t.id],children:"Disconnect"})]}):(0,Mi.jsx)(tl,{variant:"contained",onClick:()=>A(t.id),disabled:f[t.id],startIcon:f[t.id]?(0,Mi.jsx)(iu,{size:20}):void 0,children:"Connect"}),(0,Mi.jsx)(Ec,{onClick:()=>(e=>{a(e),C({name:e.name,host:e.host,port:e.port,username:e.username,password:"",privateKey:e.privateKey||"",useSudo:e.useSudo||!1}),o(!0)})(t),sx:{ml:1},title:"Edit Connection",children:(0,Mi.jsx)(tR,{})}),(0,Mi.jsx)(Ec,{onClick:()=>(async e=>{try{(await fetch("/api/remote/connections/".concat(e),{method:"DELETE"})).ok&&await _()}catch(g){console.error("Failed to delete connection:",g),v("Failed to delete connection")}})(t.id),color:"error",sx:{ml:1},title:"Delete Connection",children:(0,Mi.jsx)(bx,{})})]})]}),(0,Mi.jsxs)(Ol,{variant:"body2",color:"text.secondary",children:[t.username,"@",t.host,":",t.port]}),(0,Mi.jsx)(bE,{in:h.has(t.id)&&t.connected,children:(0,Mi.jsxs)(wa,{sx:{mt:2},children:[(0,Mi.jsxs)(sx,{value:b,onChange:(e,t)=>x(t),children:[(0,Mi.jsx)(px,{label:"Processes"}),(0,Mi.jsx)(px,{label:"System Info"})]}),(0,Mi.jsx)(lR,{value:b,index:0,children:s[t.id]&&(0,Mi.jsx)(Zj,{component:Ia,children:(0,Mi.jsxs)(iC,{size:"small",children:[(0,Mi.jsx)(hC,{children:(0,Mi.jsxs)(xC,{children:[(0,Mi.jsx)(CC,{children:"Name"}),(0,Mi.jsx)(CC,{children:"Status"}),(0,Mi.jsx)(CC,{children:"CPU"}),(0,Mi.jsx)(CC,{children:"Memory"}),(0,Mi.jsx)(CC,{children:"Uptime"}),(0,Mi.jsx)(CC,{children:"Actions"})]})}),(0,Mi.jsx)(PC,{children:s[t.id].map((n=>(0,Mi.jsxs)(xC,{children:[(0,Mi.jsx)(CC,{children:n.name}),(0,Mi.jsx)(CC,{children:(0,Mi.jsx)(gb,{label:n.status,color:T(n.status),size:"small"})}),(0,Mi.jsxs)(CC,{children:[n.cpu,"%"]}),(0,Mi.jsx)(CC,{children:n.memory}),(0,Mi.jsx)(CC,{children:n.uptime}),(0,Mi.jsxs)(CC,{children:[(0,Mi.jsx)(Ec,{size:"small",onClick:()=>P(t.id,n.name,"start"),disabled:"online"===n.status,children:(0,Mi.jsx)(mx,{})}),(0,Mi.jsx)(Ec,{size:"small",onClick:()=>P(t.id,n.name,"stop"),disabled:"stopped"===n.status,children:(0,Mi.jsx)(gx,{})})," ",(0,Mi.jsx)(Ec,{size:"small",onClick:()=>P(t.id,n.name,"restart"),children:(0,Mi.jsx)(vx,{})})," ",(0,Mi.jsx)(Ec,{size:"small",onClick:()=>P(t.id,n.name,"delete"),color:"error",children:(0,Mi.jsx)(bx,{})})," ",(0,Mi.jsx)(Ec,{size:"small",onClick:()=>(async(t,n,r)=>{try{const o=void 0!==r?r.toString():n,i="".concat(t,"-").concat(o);if(y[i])return void console.log("Log window already open for:",i);const a=e.find((e=>e.id===t)),s=(null===a||void 0===a?void 0:a.name)||"Unknown";w((e=>u(u({},e),{},{[i]:{connectionId:t,processName:n,processId:o,connectionName:s,logs:[]}})));const l=await fetch("/api/remote/".concat(t,"/logs/").concat(o));if(l.ok){const e=await l.json(),t=[];e.stdout&&e.stdout.length>0&&t.push(...e.stdout.map((e=>"[STDOUT] ".concat(e)))),e.stderr&&e.stderr.length>0&&t.push(...e.stderr.map((e=>"[STDERR] ".concat(e)))),w((e=>u(u({},e),{},{[i]:u(u({},e[i]),{},{logs:t})})))}S?(console.log("Emitting subscribe-remote-logs with:",{connectionId:t,processId:o}),S.emit("subscribe-remote-logs",{connectionId:t,processId:o}),console.log("Socket subscription sent, current log windows:",Object.keys(y))):console.error("Socket not available for subscription")}catch(g){console.error("Failed to open live logs:",g),v("Failed to open live logs")}})(t.id,n.name,n.pm_id),color:"primary",title:"View Live Logs",children:(0,Mi.jsx)(nR,{})})]})]},n.name)))})]})})}),(0,Mi.jsx)(lR,{value:b,index:1,children:c[t.id]&&(0,Mi.jsxs)($v,{container:!0,spacing:2,children:[(0,Mi.jsxs)($v,{item:!0,xs:12,md:6,children:[(0,Mi.jsx)(Ol,{variant:"h6",children:"System Information"}),(0,Mi.jsxs)(Ol,{children:["Hostname: ",c[t.id].hostname]}),(0,Mi.jsxs)(Ol,{children:["Platform: ",c[t.id].platform]}),(0,Mi.jsxs)(Ol,{children:["Architecture: ",c[t.id].arch]}),(0,Mi.jsxs)(Ol,{children:["Node.js: ",c[t.id].nodeVersion]})]}),(0,Mi.jsxs)($v,{item:!0,xs:12,md:6,children:[(0,Mi.jsx)(Ol,{variant:"h6",children:"Resources"}),(0,Mi.jsxs)(Ol,{children:["Total Memory: ",c[t.id].totalMemory]}),(0,Mi.jsxs)(Ol,{children:["Free Memory: ",c[t.id].freeMemory]}),(0,Mi.jsxs)(Ol,{children:["CPU Count: ",c[t.id].cpuCount]}),(0,Mi.jsxs)(Ol,{children:["Load Average: ",null===(n=c[t.id].loadAverage)||void 0===n?void 0:n.join(", ")]})]})]})})]})})]})})},t.id)}))})," ",(0,Mi.jsxs)(Ky,{open:n,onClose:O,maxWidth:"md",fullWidth:!0,children:[(0,Mi.jsx)(Jy,{children:i?"Edit Remote Connection":"Add Remote Connection"}),(0,Mi.jsx)(nw,{children:(0,Mi.jsxs)($v,{container:!0,spacing:2,sx:{mt:1},children:[(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Connection Name",value:j.name,onChange:e=>C((t=>u(u({},t),{},{name:e.target.value})))})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:8,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Host",value:j.host,onChange:e=>C((t=>u(u({},t),{},{host:e.target.value})))})}),(0,Mi.jsx)($v,{item:!0,xs:12,md:4,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Port",type:"number",value:j.port,onChange:e=>C((t=>u(u({},t),{},{port:parseInt(e.target.value)})))})}),(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Username",value:j.username,onChange:e=>C((t=>u(u({},t),{},{username:e.target.value})))})}),(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Password",type:"password",value:j.password,onChange:e=>C((t=>u(u({},t),{},{password:e.target.value}))),placeholder:i?"Leave blank to keep existing password":"",helperText:i?"Leave blank to keep current password":""})}),(0,Mi.jsxs)($v,{item:!0,xs:12,children:[" ",(0,Mi.jsx)(oj,{fullWidth:!0,label:"Private Key (optional)",multiline:!0,rows:4,value:j.privateKey,onChange:e=>C((t=>u(u({},t),{},{privateKey:e.target.value}))),placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----"})]})," ",(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(uc,{checked:j.useSudo,onChange:e=>C((t=>u(u({},t),{},{useSudo:e.target.checked})))}),label:"Use sudo for privileged commands (requires password)"})})]})}),(0,Mi.jsxs)(uw,{children:[(0,Mi.jsx)(tl,{onClick:O,children:"Cancel"}),(0,Mi.jsx)(tl,{onClick:()=>{i?(async()=>{if(i)try{const e=await fetch("/api/remote/connections/".concat(i.id),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(e.ok)await _(),o(!1),a(null),C({name:"",host:"",port:22,username:"",password:"",privateKey:"",useSudo:!1});else{const t=await e.json();v(t.error||"Failed to update connection")}}catch(g){console.error("Failed to update connection:",g),v("Failed to update connection")}})():(async()=>{try{const e=await fetch("/api/remote/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(e.ok)await _(),o(!1),C({name:"",host:"",port:22,username:"",password:"",privateKey:"",useSudo:!1});else{const t=await e.json();v(t.error||"Failed to add connection")}}catch(g){console.error("Failed to add connection:",g),v("Failed to add connection")}})()},variant:"contained",children:i?"Update Connection":"Add Connection"})]})]})," ",Object.entries(y).map(((e,t)=>{let[n,r]=e;return(0,Mi.jsx)(aR,{connectionId:r.connectionId,processId:r.processId,processName:r.processName,connectionName:r.connectionName,logs:r.logs,onClose:()=>(e=>{const t=y[e];S&&t&&S.emit("unsubscribe-remote-logs",{connectionId:t.connectionId,processId:t.processId}),w((t=>{const n=u({},t);return delete n[e],n}))})(n),onClear:()=>(e=>{w((t=>u(u({},t),{},{[e]:u(u({},t[e]),{},{logs:[]})})))})(n),rightOffset:20+420*t,zIndex:1e3+t},n)}))]})},uR=Jl([(0,Mi.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Mi.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"Schedule"),dR=e=>{let{value:t,onChange:n,onValidationChange:o}=e;const i=Nv(),a=e=>{const t=e.split(" ");return 5===t.length?{minute:t[0],hour:t[1],dayOfMonth:t[2],month:t[3],dayOfWeek:t[4]}:{minute:"*",hour:"*",dayOfMonth:"*",month:"*",dayOfWeek:"*"}},[s,l]=(0,r.useState)(a(t)),[c,d]=(0,r.useState)({valid:!0,description:""}),[h,p]=(0,r.useState)(!1);(0,r.useEffect)((()=>{t&&(async()=>{try{const e=await nr.post("/api/cron-jobs/validate",{expression:t});if(e.data.success){const t=e.data.data;d(t),o&&o(t)}}catch(e){d({valid:!1,error:"Invalid cron expression"}),o&&o({valid:!1,error:"Invalid cron expression"})}})()}),[t,o]),(0,r.useEffect)((()=>{const e="".concat(s.minute," ").concat(s.hour," ").concat(s.dayOfMonth," ").concat(s.month," ").concat(s.dayOfWeek);e!==t&&n(e)}),[s]);const f=(e,t)=>{l((n=>u(u({},n),{},{[e]:t}))),p(!1)};return(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"Cron Schedule"}),(0,Mi.jsxs)(yw,{fullWidth:!0,sx:{mb:3},children:[(0,Mi.jsx)(Pw,{children:"Use Preset"}),(0,Mi.jsxs)(zk,{value:h?t:"",onChange:e=>{const t=e.target.value;n(t),l(a(t)),p(!0)},label:"Use Preset",children:[(0,Mi.jsx)($k,{value:"",children:(0,Mi.jsx)("em",{children:"Custom"})}),Object.entries({"Every minute":"* * * * *","Every 5 minutes":"*/5 * * * *","Every 15 minutes":"*/15 * * * *","Every 30 minutes":"*/30 * * * *","Every hour":"0 * * * *","Every 6 hours":"0 */6 * * *","Every day at midnight":"0 0 * * *","Every day at noon":"0 12 * * *","Every Monday at 9 AM":"0 9 * * 1","Every weekday at 9 AM":"0 9 * * 1-5","Every month on the 1st":"0 0 1 * *"}).map((e=>{let[t,n]=e;return(0,Mi.jsxs)($k,{value:n,children:[t," (",n,")"]},n)}))]})]}),(0,Mi.jsx)(oj,{fullWidth:!0,label:"Cron Expression",value:t,onChange:e=>{n(e.target.value),l(a(e.target.value)),p(!1)},placeholder:"* * * * *",sx:{mb:2},error:!c.valid,helperText:c.valid?c.description:c.error}),(0,Mi.jsxs)(Ia,{sx:{p:2,mb:2,backgroundColor:"dark"===i.palette.mode?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)"},children:[(0,Mi.jsx)(Ol,{variant:"caption",sx:{mb:2,display:"block",color:"text.secondary"},children:"Build cron expression visually"}),(0,Mi.jsxs)($v,{container:!0,spacing:2,children:[(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:2.4,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Minute",value:s.minute,onChange:e=>f("minute",e.target.value),placeholder:"*",size:"small",helperText:"0-59 or *"})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:2.4,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Hour",value:s.hour,onChange:e=>f("hour",e.target.value),placeholder:"*",size:"small",helperText:"0-23 or *"})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:2.4,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Day of Month",value:s.dayOfMonth,onChange:e=>f("dayOfMonth",e.target.value),placeholder:"*",size:"small",helperText:"1-31 or *"})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:2.4,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Month",value:s.month,onChange:e=>f("month",e.target.value),placeholder:"*",size:"small",helperText:"1-12 or *"})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:2.4,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Day of Week",value:s.dayOfWeek,onChange:e=>f("dayOfWeek",e.target.value),placeholder:"*",size:"small",helperText:"0-6 or *"})})]})]}),c.valid&&c.nextRun&&(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1,alignItems:"center",flexWrap:"wrap"},children:[(0,Mi.jsx)(Ol,{variant:"caption",color:"text.secondary",children:"Next run:"}),(0,Mi.jsx)(gb,{label:new Date(c.nextRun).toLocaleString(),size:"small",color:"success"})]}),(0,Mi.jsxs)(wa,{sx:{mt:2,p:2,backgroundColor:"dark"===i.palette.mode?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.01)",borderRadius:1},children:[(0,Mi.jsxs)(Ol,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:1},children:[(0,Mi.jsx)("strong",{children:"Cron Expression Format:"})," minute hour day-of-month month day-of-week"]}),(0,Mi.jsxs)(Ol,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:[(0,Mi.jsx)("strong",{children:"Examples:"})," * = any value, */5 = every 5 units, 1-5 = range, 1,3,5 = specific values"]})]})]})},hR=e=>{let{value:t,onChange:n,scriptType:r,placeholder:o}=e;const i=Nv();return(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",sx:{mb:1,fontWeight:600},children:"Inline Script"}),(0,Mi.jsx)(Ia,{sx:{p:0,backgroundColor:"dark"===i.palette.mode?"#1e1e1e":"#f5f5f5",border:"1px solid ".concat(i.palette.divider),borderRadius:1},children:(0,Mi.jsx)("textarea",{value:t,onChange:e=>n(e.target.value),placeholder:(()=>{if(o)return o;switch(r){case"node":return"// Node.js script\nconsole.log('Hello from cron job!');\nconsole.log('Current time:', new Date().toISOString());\n\n// Access environment variables\nconsole.log('Environment:', process.env.NODE_ENV);\n\n// Exit with success code\nprocess.exit(0);";case"python":return"# Python script\nimport sys\nfrom datetime import datetime\n\nprint('Hello from cron job!')\nprint(f'Current time: {datetime.now().isoformat()}')\n\n# Access command line arguments\nprint(f'Arguments: {sys.argv[1:]}')\n\n# Exit with success code\nsys.exit(0)";case"shell":return'#!/bin/bash\n# Shell script\n\necho "Hello from cron job!"\necho "Current time: $(date -Iseconds)"\necho "Current user: $(whoami)"\necho "Working directory: $(pwd)"\n\n# Exit with success code\nexit 0';case"dotnet":return'// C# script\nusing System;\n\nclass Program\n{\n static void Main(string[] args)\n {\n Console.WriteLine("Hello from cron job!");\n Console.WriteLine($"Current time: {DateTime.Now}");\n \n // Access command line arguments\n Console.WriteLine($"Arguments: {string.Join(", ", args)}");\n \n Environment.Exit(0);\n }\n}';default:return"Write your script here..."}})(),style:{width:"100%",minHeight:"300px",padding:"12px",fontFamily:"'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace",fontSize:"13px",lineHeight:"1.6",backgroundColor:"transparent",color:i.palette.text.primary,border:"none",outline:"none",resize:"vertical",whiteSpace:"pre",overflowWrap:"normal",overflowX:"auto"},spellCheck:!1})}),(0,Mi.jsx)(Ol,{variant:"caption",color:"text.secondary",sx:{mt:1,display:"block"},children:"Tip: Use console.log/print/echo for output. Scripts should exit when complete."})]})},pR=e=>{let{open:t,onClose:n,onSave:o,editJob:i}=e;const a=Nv(),[s,l]=(0,r.useState)(!1),[c,d]=(0,r.useState)({valid:!0}),[h,p]=(0,r.useState)({name:"",description:"",scriptType:"node",scriptMode:"inline",scriptPath:"",inlineScript:"",cronExpression:"0 * * * *",args:[],env:{},cwd:"",enabled:!0}),[f,m]=(0,r.useState)(""),[g,v]=(0,r.useState)(""),[b,x]=(0,r.useState)("");(0,r.useEffect)((()=>{p(i?{name:i.name,description:i.description||"",scriptType:i.scriptType,scriptMode:i.scriptMode||"file",scriptPath:i.scriptPath,inlineScript:i.inlineScript||"",cronExpression:i.cronExpression,args:i.args||[],env:i.env||{},cwd:i.cwd||"",enabled:i.enabled}:{name:"",description:"",scriptType:"node",scriptMode:"inline",scriptPath:"",inlineScript:"",cronExpression:"0 * * * *",args:[],env:{},cwd:"",enabled:!0})}),[i,t]);const y=e=>t=>{p((n=>u(u({},n),{},{[e]:t.target.value})))},w=()=>{f.trim()&&(p((e=>u(u({},e),{},{args:[...e.args,f.trim()]}))),m(""))},S=()=>{g.trim()&&(p((e=>u(u({},e),{},{env:u(u({},e.env),{},{[g.trim()]:b.trim()})}))),v(""),x(""))};return(0,Mi.jsxs)(Ky,{open:t,onClose:n,maxWidth:"md",fullWidth:!0,children:[(0,Mi.jsx)(Jy,{children:i?"Edit Cron Job":"Create New Cron Job"}),(0,Mi.jsx)(nw,{dividers:!0,sx:{minHeight:"500px"},children:(0,Mi.jsxs)(wa,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"Basic Information"}),(0,Mi.jsxs)($v,{container:!0,spacing:2,children:[(0,Mi.jsx)($v,{item:!0,xs:12,sm:8,children:(0,Mi.jsx)(oj,{fullWidth:!0,required:!0,label:"Job Name",value:h.name,onChange:y("name"),placeholder:"My Scheduled Task"})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:4,children:(0,Mi.jsx)(Fl,{control:(0,Mi.jsx)(pj,{checked:h.enabled,onChange:(k="enabled",e=>{p((t=>u(u({},t),{},{[k]:e.target.checked})))}),color:"success"}),label:"Enabled"})}),(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,multiline:!0,rows:2,label:"Description",value:h.description,onChange:y("description"),placeholder:"Optional description of this job"})})]})]}),(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"Script Configuration"}),(0,Mi.jsxs)($v,{container:!0,spacing:2,children:[(0,Mi.jsx)($v,{item:!0,xs:12,sm:4,children:(0,Mi.jsxs)(yw,{fullWidth:!0,required:!0,children:[(0,Mi.jsx)(Pw,{children:"Script Type"}),(0,Mi.jsxs)(zk,{value:h.scriptType,onChange:y("scriptType"),label:"Script Type",children:[(0,Mi.jsx)($k,{value:"node",children:"Node.js"}),(0,Mi.jsx)($k,{value:"python",children:"Python"}),(0,Mi.jsx)($k,{value:"shell",children:"Shell Script"}),(0,Mi.jsx)($k,{value:"dotnet",children:".NET"})]})]})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:8,children:(0,Mi.jsxs)(yw,{fullWidth:!0,required:!0,children:[(0,Mi.jsx)(Pw,{children:"Script Mode"}),(0,Mi.jsxs)(zk,{value:h.scriptMode,onChange:y("scriptMode"),label:"Script Mode",children:[(0,Mi.jsx)($k,{value:"inline",children:"Write Script Inline"}),(0,Mi.jsx)($k,{value:"file",children:"Use Script File"})]})]})}),"file"===h.scriptMode?(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,required:!0,label:"Script Path",value:h.scriptPath,onChange:y("scriptPath"),placeholder:"/path/to/script.js",helperText:"Absolute or relative path to your script"})}),(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(oj,{fullWidth:!0,label:"Working Directory",value:h.cwd,onChange:y("cwd"),placeholder:"/path/to/working/directory",helperText:"Optional: Directory to run the script from"})})]}):(0,Mi.jsx)($v,{item:!0,xs:12,children:(0,Mi.jsx)(hR,{value:h.inlineScript,onChange:e=>p((t=>u(u({},t),{},{inlineScript:e}))),scriptType:h.scriptType})})]})]}),(0,Mi.jsx)(wa,{children:(0,Mi.jsx)(dR,{value:h.cronExpression,onChange:e=>p((t=>u(u({},t),{},{cronExpression:e}))),onValidationChange:d})}),(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"Script Arguments (Optional)"}),(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1,mb:1},children:[(0,Mi.jsx)(oj,{size:"small",fullWidth:!0,placeholder:"Add argument",value:f,onChange:e=>m(e.target.value),onKeyPress:e=>"Enter"===e.key&&w()}),(0,Mi.jsx)(Ec,{onClick:w,color:"primary",children:(0,Mi.jsx)($j,{})})]}),(0,Mi.jsx)(wa,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:h.args.map(((e,t)=>(0,Mi.jsx)(gb,{label:e,onDelete:()=>(e=>{p((t=>u(u({},t),{},{args:t.args.filter(((t,n)=>n!==e))})))})(t),size:"small"},t)))})]}),(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(Ol,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"Environment Variables (Optional)"}),(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1,mb:1},children:[(0,Mi.jsx)(oj,{size:"small",placeholder:"Key",value:g,onChange:e=>v(e.target.value),sx:{flex:1}}),(0,Mi.jsx)(oj,{size:"small",placeholder:"Value",value:b,onChange:e=>x(e.target.value),onKeyPress:e=>"Enter"===e.key&&S(),sx:{flex:2}}),(0,Mi.jsx)(Ec,{onClick:S,color:"primary",children:(0,Mi.jsx)($j,{})})]}),(0,Mi.jsx)(wa,{sx:{display:"flex",flexDirection:"column",gap:.5},children:Object.entries(h.env).map((e=>{let[t,n]=e;return(0,Mi.jsxs)(wa,{sx:{display:"flex",alignItems:"center",gap:1,p:1,backgroundColor:"dark"===a.palette.mode?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)",borderRadius:1},children:[(0,Mi.jsx)(Ol,{variant:"body2",sx:{fontWeight:600,minWidth:"100px"},children:t}),(0,Mi.jsx)(Ol,{variant:"body2",sx:{flex:1,color:"text.secondary"},children:n}),(0,Mi.jsx)(Ec,{size:"small",onClick:()=>(e=>{p((t=>{const n=u({},t.env);return delete n[e],u(u({},t),{},{env:n})}))})(t),children:(0,Mi.jsx)(bx,{fontSize:"small"})})]},t)}))})]})]})}),(0,Mi.jsxs)(uw,{children:[(0,Mi.jsx)(tl,{onClick:n,disabled:s,children:"Cancel"}),(0,Mi.jsx)(tl,{onClick:async()=>{if(c.valid)if(h.name&&h.cronExpression)if("file"!==h.scriptMode||h.scriptPath)if("inline"!==h.scriptMode||h.inlineScript){l(!0);try{await o(h),n()}catch(e){console.error("Error saving cron job:",e),alert("Failed to save cron job")}finally{l(!1)}}else alert("Please write your script");else alert("Please provide a script path");else alert("Please fill in all required fields")},variant:"contained",disabled:s||!c.valid,children:s?"Saving...":i?"Update":"Create"})]})]});var k},fR=()=>{const e=Nv(),[t,n]=(0,r.useState)([]),[o,i]=(0,r.useState)(!0),[a,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(),[u,d]=(0,r.useState)(!1),[h,p]=(0,r.useState)(null),f=async()=>{try{i(!0);const e=await nr.get("/api/cron-jobs/status");e.data.success&&n(e.data.data)}catch(e){console.error("Error fetching cron jobs:",e)}finally{i(!1)}};(0,r.useEffect)((()=>{f()}),[]);const m=()=>{c(void 0),s(!0)};return(0,Mi.jsxs)(sb,{maxWidth:"xl",sx:{py:3},children:[(0,Mi.jsxs)(wa,{sx:{mb:4,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Mi.jsxs)(wa,{children:[(0,Mi.jsxs)(Ol,{variant:"h4",sx:{fontWeight:700,display:"flex",alignItems:"center",gap:1},children:[(0,Mi.jsx)(uR,{sx:{fontSize:40}}),"Cron Jobs"]}),(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Schedule and manage automated tasks using PM2's cron feature"})]}),(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:1},children:[(0,Mi.jsx)(tl,{variant:"outlined",startIcon:(0,Mi.jsx)(vx,{}),onClick:f,disabled:o,children:"Refresh"}),(0,Mi.jsx)(tl,{variant:"contained",startIcon:(0,Mi.jsx)($j,{}),onClick:m,children:"Create Job"})]})]}),(0,Mi.jsxs)($v,{container:!0,spacing:2,sx:{mb:3},children:[(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{sx:{background:"linear-gradient(135deg, ".concat(e.palette.primary.main,", ").concat(e.palette.primary.dark,")"),color:"white"},children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"h3",sx:{fontWeight:700},children:t.length}),(0,Mi.jsx)(Ol,{variant:"body2",sx:{opacity:.9},children:"Total Jobs"})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{sx:{background:"linear-gradient(135deg, ".concat(e.palette.success.main,", ").concat(e.palette.success.dark,")"),color:"white"},children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"h3",sx:{fontWeight:700},children:t.filter((e=>e.config.enabled)).length}),(0,Mi.jsx)(Ol,{variant:"body2",sx:{opacity:.9},children:"Enabled"})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{sx:{background:"linear-gradient(135deg, ".concat(e.palette.info.main,", ").concat(e.palette.info.dark,")"),color:"white"},children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"h3",sx:{fontWeight:700},children:t.filter((e=>e.isRunning)).length}),(0,Mi.jsx)(Ol,{variant:"body2",sx:{opacity:.9},children:"Running"})]})})}),(0,Mi.jsx)($v,{item:!0,xs:12,sm:6,md:3,children:(0,Mi.jsx)(Gv,{sx:{background:"linear-gradient(135deg, ".concat(e.palette.warning.main,", ").concat(e.palette.warning.dark,")"),color:"white"},children:(0,Mi.jsxs)(eb,{children:[(0,Mi.jsx)(Ol,{variant:"h3",sx:{fontWeight:700},children:t.filter((e=>e.config.enabled&&!e.isRunning)).length}),(0,Mi.jsx)(Ol,{variant:"body2",sx:{opacity:.9},children:"Scheduled"})]})})})]}),0===t.length?(0,Mi.jsxs)(Ia,{sx:{p:4,textAlign:"center"},children:[(0,Mi.jsx)(uR,{sx:{fontSize:60,color:"text.secondary",mb:2}}),(0,Mi.jsx)(Ol,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No cron jobs yet"}),(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",sx:{mb:3},children:"Create your first scheduled task to automate your workflows"}),(0,Mi.jsx)(tl,{variant:"contained",startIcon:(0,Mi.jsx)($j,{}),onClick:m,children:"Create First Job"})]}):(0,Mi.jsx)(Zj,{component:Ia,children:(0,Mi.jsxs)(iC,{children:[(0,Mi.jsx)(hC,{children:(0,Mi.jsxs)(xC,{sx:{backgroundColor:"dark"===e.palette.mode?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)"},children:[(0,Mi.jsx)(CC,{sx:{fontWeight:600},children:"Name"}),(0,Mi.jsx)(CC,{sx:{fontWeight:600},children:"Type"}),(0,Mi.jsx)(CC,{sx:{fontWeight:600},children:"Schedule"}),(0,Mi.jsx)(CC,{sx:{fontWeight:600},children:"Next Run"}),(0,Mi.jsx)(CC,{sx:{fontWeight:600},children:"Status"}),(0,Mi.jsx)(CC,{sx:{fontWeight:600},children:"Enabled"}),(0,Mi.jsx)(CC,{sx:{fontWeight:600},align:"right",children:"Actions"})]})}),(0,Mi.jsx)(PC,{children:t.map((e=>{return(0,Mi.jsxs)(xC,{hover:!0,children:[(0,Mi.jsx)(CC,{children:(0,Mi.jsxs)(wa,{children:[(0,Mi.jsx)(Ol,{variant:"body2",sx:{fontWeight:600},children:e.config.name}),e.config.description&&(0,Mi.jsx)(Ol,{variant:"caption",color:"text.secondary",children:e.config.description}),(0,Mi.jsx)(Ol,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:.5},children:e.config.scriptPath})]})}),(0,Mi.jsx)(CC,{children:(0,Mi.jsx)(gb,{icon:(e.config.scriptType,(0,Mi.jsx)(QM,{fontSize:"small"})),label:e.config.scriptType.toUpperCase(),size:"small",color:(t=e.config.scriptType,{node:"success",python:"info",shell:"warning",dotnet:"secondary"}[t]||"default")})}),(0,Mi.jsx)(CC,{children:(0,Mi.jsx)(Ol,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.75rem"},children:e.config.cronExpression})}),(0,Mi.jsx)(CC,{children:e.nextExecution?(0,Mi.jsx)(Ol,{variant:"body2",children:new Date(e.nextExecution).toLocaleString()}):(0,Mi.jsx)(Ol,{variant:"body2",color:"text.secondary",children:"-"})}),(0,Mi.jsx)(CC,{children:e.isRunning?(0,Mi.jsx)(gb,{icon:(0,Mi.jsx)(GA,{}),label:"Running",size:"small",color:"success"}):e.config.enabled?(0,Mi.jsx)(gb,{label:"Scheduled",size:"small",color:"default"}):(0,Mi.jsx)(gb,{icon:(0,Mi.jsx)(eE,{}),label:"Disabled",size:"small",color:"default"})}),(0,Mi.jsx)(CC,{children:(0,Mi.jsx)(pj,{checked:e.config.enabled,onChange:()=>(async e=>{try{await nr.post("/api/cron-jobs/".concat(e,"/toggle")),f()}catch(t){console.error("Error toggling cron job:",t)}})(e.config.id),color:"success",size:"small"})}),(0,Mi.jsx)(CC,{align:"right",children:(0,Mi.jsxs)(wa,{sx:{display:"flex",gap:.5,justifyContent:"flex-end"},children:[e.isRunning?(0,Mi.jsx)(SA,{title:"Stop",children:(0,Mi.jsx)(Ec,{size:"small",onClick:()=>(async e=>{try{await nr.post("/api/cron-jobs/".concat(e,"/stop")),f()}catch(t){console.error("Error stopping cron job:",t)}})(e.config.id),color:"error",children:(0,Mi.jsx)(gx,{fontSize:"small"})})}):(0,Mi.jsx)(SA,{title:"Start",children:(0,Mi.jsx)(Ec,{size:"small",onClick:()=>(async e=>{try{await nr.post("/api/cron-jobs/".concat(e,"/start")),f()}catch(t){console.error("Error starting cron job:",t)}})(e.config.id),color:"success",children:(0,Mi.jsx)(mx,{fontSize:"small"})})}),(0,Mi.jsx)(SA,{title:"Edit",children:(0,Mi.jsx)(Ec,{size:"small",onClick:()=>(e=>{c(e),s(!0)})(e.config),color:"primary",children:(0,Mi.jsx)(tR,{fontSize:"small"})})}),(0,Mi.jsx)(SA,{title:"Delete",children:(0,Mi.jsx)(Ec,{size:"small",onClick:()=>{p(e.config.id),d(!0)},color:"error",children:(0,Mi.jsx)(bx,{fontSize:"small"})})})]})})]},e.config.id);var t}))})]})}),(0,Mi.jsxs)(Wc,{severity:"info",sx:{mt:3},children:[(0,Mi.jsx)(Ol,{variant:"body2",sx:{fontWeight:600,mb:.5},children:"About PM2 Cron Jobs"}),(0,Mi.jsx)(Ol,{variant:"caption",children:"Cron jobs run as PM2 processes with automatic restart on the specified schedule. They will continue running even after system reboot if PM2 is set to start on boot. Use the PM2 ecosystem file or PM2 startup command to configure PM2 auto-start."})]}),(0,Mi.jsx)(pR,{open:a,onClose:()=>{s(!1),c(void 0)},onSave:async e=>{try{l?await nr.put("/api/cron-jobs/".concat(l.id),e):await nr.post("/api/cron-jobs",e),f(),s(!1)}catch(t){throw console.error("Error saving cron job:",t),t}},editJob:l}),(0,Mi.jsx)(dw,{isOpen:u,title:"Delete Cron Job",message:"Are you sure you want to delete this cron job? This action cannot be undone.",onConfirm:async()=>{if(h)try{await nr.delete("/api/cron-jobs/".concat(h)),f(),d(!1),p(null)}catch(e){console.error("Error deleting cron job:",e)}},onCancel:()=>{d(!1),p(null)},type:"danger"})]})},mR=["title","titleId"];function gR(e,t){let{title:n,titleId:o}=e,i=or(e,mR);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const vR=r.forwardRef(gR),bR=["title","titleId"];function xR(e,t){let{title:n,titleId:o}=e,i=or(e,bR);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const yR=r.forwardRef(xR),wR=["title","titleId"];function SR(e,t){let{title:n,titleId:o}=e,i=or(e,wR);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const kR=r.forwardRef(SR),jR=Oe("http://localhost:2502"),CR=()=>{const[e,t]=(0,r.useState)([]),[n,o]=(0,r.useState)([]),[i,a]=(0,r.useState)({loadAvg:[0,0,0],memory:{total:0,free:0,used:0},uptime:0,cpus:0}),[s,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!0),[h,p]=(0,r.useState)(""),[f,m]=(0,r.useState)("all"),[g,v]=(0,r.useState)(!1),[b,x]=(0,r.useState)(!1),[y,w]=(0,r.useState)("undefined"!==typeof window&&window.matchMedia("(prefers-color-scheme: dark)").matches),[S,k]=(0,r.useState)({isOpen:!1,title:"",message:"",action:"",processId:null});(0,r.useEffect)((()=>((async()=>{try{const[e,n]=await Promise.all([nr.get("/api/processes"),nr.get("/api/metrics")]);t(e.data),a(n.data),d(!1)}catch(AR){var e,n;console.error("Error fetching initial data:",AR),null!==(e=AR.response)&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.pmNotInstalled?l(AR.response.data.error||"PM2 is not installed. Please install PM2 globally: npm install -g pm2"):l("Failed to connect to the server. Is PM2 running?"),d(!1)}})(),jR.on("processes",(e=>{t(e)})),jR.on("metrics",(e=>{a(e)})),jR.on("connect_error",(()=>{l("Connection to server lost. Trying to reconnect...")})),jR.on("connect",(()=>{l("")})),()=>{jR.off("processes"),jR.off("metrics"),jR.off("connect_error"),jR.off("connect")})),[]),(0,r.useEffect)((()=>{let t=[...e];if("all"!==f&&(t=t.filter((e=>e.pm2_env.status===f))),h.trim()){const e=h.toLowerCase();t=t.filter((t=>t.name.toLowerCase().includes(e)||String(t.pm_id).includes(e)))}o(t)}),[e,h,f]),(0,r.useEffect)((()=>{y?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),[y]);const j=(t,n)=>{if(["stop","delete","restart"].includes(n)){var r;const o=(null===(r=e.find((e=>e.pm_id===t)))||void 0===r?void 0:r.name)||"Process ".concat(t);let i,a;switch(n){case"stop":i="Stop Process?",a="Are you sure you want to stop ".concat(o,"?");break;case"delete":i="Delete Process?",a="Are you sure you want to delete ".concat(o," from PM2?");break;case"restart":i="Restart Process?",a="Are you sure you want to restart ".concat(o,"?");break;default:i="Confirm Action",a="Are you sure you want to ".concat(n," ").concat(o,"?")}k({isOpen:!0,title:i,message:a,action:n,processId:t})}else C(t,n)},C=async(e,t)=>{try{await nr.post("/api/process/".concat(e,"/").concat(t))}catch(AR){console.error("Error performing ".concat(t,":"),AR),l("Failed to ".concat(t," process. ").concat(AR instanceof Error?AR.message:"Unknown error"))}},_=()=>{v(!g)},A=()=>{x(!b)},E=e=>{p(e.target.value)},M=e=>{m(e.target.value)};return c?(0,Mi.jsx)("div",{className:"min-h-screen flex items-center justify-center ".concat(y?"bg-gray-900":"bg-gray-50"),children:(0,Mi.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,Mi.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"}),(0,Mi.jsx)("h6",{className:"text-lg font-medium ".concat(y?"text-white":"text-gray-900"),children:"Loading PM2 data..."})]})}):(0,Mi.jsx)(li,{children:(0,Mi.jsxs)("div",{className:"min-h-screen transition-all duration-300 ".concat(y?"bg-neutral-950":"bg-neutral-50"),children:[(0,Mi.jsxs)("div",{className:"flex",children:[(0,Mi.jsx)("nav",{className:"fixed w-full z-50 bg-white/95 backdrop-blur-md border-b border-gray-200 transition-all duration-300 ".concat(y?"bg-neutral-900/95 border-neutral-800":"bg-white/95 border-gray-200"),children:(0,Mi.jsx)("div",{className:"px-3 py-3",children:(0,Mi.jsxs)("div",{className:"flex items-center justify-between max-w mx-auto",children:[(0,Mi.jsx)("button",{onClick:A,className:"sm:hidden p-3 rounded-xl transition-all duration-200 ".concat(y?"text-neutral-400 hover:text-white hover:bg-neutral-800/50":"text-neutral-600 hover:text-neutral-900 hover:bg-neutral-100/50"," hover:shadow-md"),children:(0,Mi.jsx)(vR,{className:"h-6 w-6"})}),(0,Mi.jsx)(ui,{to:"/",className:"text-2xl font-bold tracking-tight no-underline transition-all duration-200 flex-grow sm:flex-grow-0 ".concat(y?"text-white hover:text-primary-400":"text-neutral-900 hover:text-primary-600"),children:(0,Mi.jsx)("span",{className:"text-gradient",children:"EZ PM2 GUI"})}),(0,Mi.jsx)("div",{className:"flex items-center space-x-4",children:(0,Mi.jsx)("button",{onClick:()=>{w(!y)},className:"p-3 rounded-xl transition-all duration-200 ".concat(y?"text-neutral-400 hover:text-white hover:bg-neutral-800/50":"text-neutral-600 hover:text-neutral-900 hover:bg-neutral-100/50"," hover:shadow-md"),children:y?(0,Mi.jsx)(yR,{className:"h-6 w-6"}):(0,Mi.jsx)(kR,{className:"h-6 w-6"})})})]})})}),b&&(0,Mi.jsxs)("div",{className:"fixed inset-0 z-40 sm:hidden animate-fade-in",children:[(0,Mi.jsx)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-md",onClick:A}),(0,Mi.jsx)("div",{className:"fixed left-0 top-0 h-full w-80 bg-white border-r border-gray-200 transform transition-all duration-500 ease-out animate-slide-up ".concat(y?"bg-neutral-900 border-neutral-800":"bg-white border-gray-200"," shadow-2xl"),children:(0,Mi.jsx)("div",{className:"pt-16 h-full overflow-y-auto",children:(0,Mi.jsx)(DM,{toggleAbout:_,onItemClick:A})})})]}),(0,Mi.jsx)("div",{className:"hidden sm:block fixed left-0 top-16 h-[calc(100vh-4rem)] w-80 bg-white border-r border-gray-200 overflow-y-auto ".concat(y?"bg-neutral-900 border-neutral-800":"bg-white border-gray-200"),children:(0,Mi.jsx)(DM,{toggleAbout:_})}),(0,Mi.jsx)("main",{className:"flex-1 sm:ml-80 pt-16 min-h-screen transition-all duration-300 ".concat("bg-gray-50"),children:(0,Mi.jsxs)("div",{className:"max-w mx-auto px-3 py-3",children:[g&&(0,Mi.jsxs)("div",{className:"card-premium p-12 mb-12 animate-fade-in ".concat(y?"bg-neutral-900/80":"bg-white/80"," border ").concat(y?"border-neutral-800/50":"border-neutral-200/50"," shadow-xl"),children:[(0,Mi.jsxs)("div",{className:"flex items-center space-x-4 mb-8",children:[(0,Mi.jsx)("div",{className:"w-16 h-16 bg-gradient-to-br from-primary-500 to-accent-500 rounded-2xl flex items-center justify-center shadow-lg",children:(0,Mi.jsx)("span",{className:"text-white font-bold text-2xl",children:"ez"})}),(0,Mi.jsxs)("div",{children:[(0,Mi.jsx)("h2",{className:"text-3xl font-bold tracking-tight mb-2 ".concat(y?"text-white":"text-neutral-900"),children:"About ezPM2GUI"}),(0,Mi.jsx)("p",{className:"text-lg ".concat(y?"text-neutral-400":"text-neutral-600"),children:"Professional Process Management Interface"})]})]}),(0,Mi.jsx)("p",{className:"mb-6 text-lg leading-relaxed ".concat(y?"text-neutral-300":"text-neutral-700"),children:"Version: 1.0.0"}),(0,Mi.jsx)("p",{className:"mb-2 ".concat(y?"text-gray-300":"text-gray-700"),children:"Created by: Chandan Bhagat"}),(0,Mi.jsx)("p",{className:"mb-2 ".concat(y?"text-gray-300":"text-gray-700"),children:"Features:"}),(0,Mi.jsxs)("ul",{className:"list-disc pl-6 mb-4 ".concat(y?"text-gray-300":"text-gray-700"),children:[(0,Mi.jsx)("li",{children:"Monitor and manage PM2 processes"}),(0,Mi.jsx)("li",{children:"Real-time logs and metrics"}),(0,Mi.jsx)("li",{children:"Deploy new applications"}),(0,Mi.jsx)("li",{children:"Configure ecosystem files"}),(0,Mi.jsx)("li",{children:"Cluster management"}),(0,Mi.jsx)("li",{children:"Dark mode support"})]}),(0,Mi.jsxs)("p",{className:"".concat(y?"text-gray-300":"text-gray-700"),children:["GitHub:\xa0",(0,Mi.jsx)("a",{href:"https://github.com/thechandanbhagat/ezpm2gui",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-600 underline",children:"GitHub Repository"})]})]}),s&&(0,Mi.jsx)("div",{className:"bg-danger-100 dark:bg-danger-900/20 border border-danger-200 dark:border-danger-800/50 text-danger-800 dark:text-danger-400 px-6 py-4 rounded-xl mb-8 animate-fade-in",children:(0,Mi.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,Mi.jsx)("div",{className:"w-2 h-2 bg-danger-500 rounded-full animate-pulse"}),(0,Mi.jsx)("span",{className:"font-medium",children:s})]})})," ",(0,Mi.jsxs)(Ao,{children:[(0,Mi.jsx)(Co,{path:"/",element:(0,Mi.jsx)(Xx,{processes:n,metrics:i,searchTerm:h,statusFilter:f,onSearchChange:E,onStatusFilterChange:M,onProcessAction:j})}),(0,Mi.jsx)(Co,{path:"/processes",element:(0,Mi.jsx)(Xx,{processes:n,metrics:i,searchTerm:h,statusFilter:f,onSearchChange:E,onStatusFilterChange:M,onProcessAction:j})}),(0,Mi.jsx)(Co,{path:"/process/:id",element:(0,Mi.jsx)(wx,{onAction:j})}),(0,Mi.jsx)(Co,{path:"/monit",element:(0,Mi.jsx)(hw,{processes:e,onRefresh:()=>{(async()=>{try{const e=await nr.get("/api/processes");t(e.data)}catch(AR){console.error("Error refreshing processes:",AR),l("Failed to refresh process data")}})()}})}),(0,Mi.jsx)(Co,{path:"/advanced-monitoring",element:(0,Mi.jsx)(nE,{processes:e,systemMetrics:i,onRefresh:()=>{(async()=>{try{const[e,n]=await Promise.all([nr.get("/api/processes"),nr.get("/api/metrics")]);t(e.data),a(n.data)}catch(AR){console.error("Error refreshing data:",AR),l("Failed to refresh data")}})()}})}),(0,Mi.jsx)(Co,{path:"/enhanced-logs",element:(0,Mi.jsx)(tM,{})}),(0,Mi.jsx)(Co,{path:"/remote",element:(0,Mi.jsx)(cR,{})}),(0,Mi.jsx)(Co,{path:"/deploy",element:(0,Mi.jsx)(Mj,{})}),(0,Mi.jsx)(Co,{path:"/modules",element:(0,Mi.jsx)(Kj,{})}),(0,Mi.jsx)(Co,{path:"/ecosystem",element:(0,Mi.jsx)(Xj,{})}),(0,Mi.jsx)(Co,{path:"/configure/:id",element:(0,Mi.jsx)(Yj,{procId:0})}),(0,Mi.jsx)(Co,{path:"/cluster",element:(0,Mi.jsx)(OC,{processes:e,onRefresh:()=>{(async()=>{try{const e=await nr.get("/api/processes");t(e.data)}catch(AR){console.error("Error refreshing processes:",AR),l("Failed to refresh process data")}})()}})})," ",(0,Mi.jsx)(Co,{path:"/logs",element:(0,Mi.jsx)(IC,{})}),(0,Mi.jsx)(Co,{path:"/logs/:id",element:(0,Mi.jsx)(IC,{})}),(0,Mi.jsx)(Co,{path:"/cron-jobs",element:(0,Mi.jsx)(fR,{})}),(0,Mi.jsx)(Co,{path:"/settings",element:(0,Mi.jsx)(FM,{})}),(0,Mi.jsx)(Co,{path:"/load-balancing-guide",element:(0,Mi.jsx)(ZM,{})})]})]})})]}),(0,Mi.jsx)(dw,{isOpen:S.isOpen,title:S.title,message:S.message,onConfirm:()=>{null!==S.processId&&C(S.processId,S.action),k((e=>u(u({},e),{},{isOpen:!1})))},onCancel:()=>{k((e=>u(u({},e),{},{isOpen:!1})))},type:"delete"===S.action?"danger":"warning"})]})})},_R=document.getElementById("root");if(!_R)throw new Error("Failed to find the root element");i.createRoot(_R).render((0,Mi.jsx)(r.StrictMode,{children:(0,Mi.jsx)(CR,{})}))})()})();
|
|
3
|
+
//# sourceMappingURL=main.b0e1c9b1.js.map
|