anarock-widgets 1.0.396 → 1.0.397

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/dist/index.cjs.js CHANGED
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var U1;function C4(){return U1||(U1=1,process.env.NODE_ENV!=="production"&&(function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function v($){if($===null||typeof $!="object")return null;var te=m&&$[m]||$[g];return typeof te=="function"?te:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _($){{for(var te=arguments.length,de=new Array(te>1?te-1:0),xe=1;xe<te;xe++)de[xe-1]=arguments[xe];w("error",$,de)}}function w($,te,de){{var xe=x.ReactDebugCurrentFrame,ze=xe.getStackAddendum();ze!==""&&(te+="%s",de=de.concat([ze]));var at=de.map(function(Te){return String(Te)});at.unshift("Warning: "+te),Function.prototype.apply.call(console[$],console,at)}}var y=!1,E=!1,S=!1,P=!1,D=!1,T;T=Symbol.for("react.module.reference");function R($){return!!(typeof $=="string"||typeof $=="function"||$===r||$===o||D||$===i||$===c||$===u||P||$===p||y||E||S||typeof $=="object"&&$!==null&&($.$$typeof===f||$.$$typeof===d||$.$$typeof===a||$.$$typeof===s||$.$$typeof===l||$.$$typeof===T||$.getModuleId!==void 0))}function A($,te,de){var xe=$.displayName;if(xe)return xe;var ze=te.displayName||te.name||"";return ze!==""?de+"("+ze+")":de}function C($){return $.displayName||"Context"}function j($){if($==null)return null;if(typeof $.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof $=="function")return $.displayName||$.name||null;if(typeof $=="string")return $;switch($){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof $=="object")switch($.$$typeof){case s:var te=$;return C(te)+".Consumer";case a:var de=$;return C(de._context)+".Provider";case l:return A($,$.render,"ForwardRef");case d:var xe=$.displayName||null;return xe!==null?xe:j($.type)||"Memo";case f:{var ze=$,at=ze._payload,Te=ze._init;try{return j(Te(at))}catch{return null}}}return null}var N=Object.assign,M=0,L,B,V,z,W,Q,X;function ie(){}ie.__reactDisabledLog=!0;function J(){{if(M===0){L=console.log,B=console.info,V=console.warn,z=console.error,W=console.group,Q=console.groupCollapsed,X=console.groupEnd;var $={configurable:!0,enumerable:!0,value:ie,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}M++}}function re(){{if(M--,M===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},$,{value:L}),info:N({},$,{value:B}),warn:N({},$,{value:V}),error:N({},$,{value:z}),group:N({},$,{value:W}),groupCollapsed:N({},$,{value:Q}),groupEnd:N({},$,{value:X})})}M<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=x.ReactCurrentDispatcher,le;function ue($,te,de){{if(le===void 0)try{throw Error()}catch(ze){var xe=ze.stack.trim().match(/\n( *(at )?)/);le=xe&&xe[1]||""}return`
17
+ */var U1;function C4(){return U1||(U1=1,process.env.NODE_ENV!=="production"&&(function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function v($){if($===null||typeof $!="object")return null;var te=m&&$[m]||$[g];return typeof te=="function"?te:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _($){{for(var te=arguments.length,de=new Array(te>1?te-1:0),xe=1;xe<te;xe++)de[xe-1]=arguments[xe];w("error",$,de)}}function w($,te,de){{var xe=x.ReactDebugCurrentFrame,ze=xe.getStackAddendum();ze!==""&&(te+="%s",de=de.concat([ze]));var at=de.map(function(Te){return String(Te)});at.unshift("Warning: "+te),Function.prototype.apply.call(console[$],console,at)}}var y=!1,E=!1,S=!1,P=!1,D=!1,T;T=Symbol.for("react.module.reference");function R($){return!!(typeof $=="string"||typeof $=="function"||$===r||$===o||D||$===i||$===c||$===u||P||$===p||y||E||S||typeof $=="object"&&$!==null&&($.$$typeof===f||$.$$typeof===d||$.$$typeof===a||$.$$typeof===s||$.$$typeof===l||$.$$typeof===T||$.getModuleId!==void 0))}function A($,te,de){var xe=$.displayName;if(xe)return xe;var ze=te.displayName||te.name||"";return ze!==""?de+"("+ze+")":de}function C($){return $.displayName||"Context"}function j($){if($==null)return null;if(typeof $.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof $=="function")return $.displayName||$.name||null;if(typeof $=="string")return $;switch($){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof $=="object")switch($.$$typeof){case s:var te=$;return C(te)+".Consumer";case a:var de=$;return C(de._context)+".Provider";case l:return A($,$.render,"ForwardRef");case d:var xe=$.displayName||null;return xe!==null?xe:j($.type)||"Memo";case f:{var ze=$,at=ze._payload,Te=ze._init;try{return j(Te(at))}catch{return null}}}return null}var N=Object.assign,M=0,L,B,V,z,W,Q,G;function ie(){}ie.__reactDisabledLog=!0;function J(){{if(M===0){L=console.log,B=console.info,V=console.warn,z=console.error,W=console.group,Q=console.groupCollapsed,G=console.groupEnd;var $={configurable:!0,enumerable:!0,value:ie,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}M++}}function re(){{if(M--,M===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},$,{value:L}),info:N({},$,{value:B}),warn:N({},$,{value:V}),error:N({},$,{value:z}),group:N({},$,{value:W}),groupCollapsed:N({},$,{value:Q}),groupEnd:N({},$,{value:G})})}M<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=x.ReactCurrentDispatcher,le;function ue($,te,de){{if(le===void 0)try{throw Error()}catch(ze){var xe=ze.stack.trim().match(/\n( *(at )?)/);le=xe&&xe[1]||""}return`
18
18
  `+le+$}}var K=!1,U;{var Z=typeof WeakMap=="function"?WeakMap:Map;U=new Z}function I($,te){if(!$||K)return"";{var de=U.get($);if(de!==void 0)return de}var xe;K=!0;var ze=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var at;at=ae.current,ae.current=null,J();try{if(te){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(Qn){xe=Qn}Reflect.construct($,[],Te)}else{try{Te.call()}catch(Qn){xe=Qn}$.call(Te.prototype)}}else{try{throw Error()}catch(Qn){xe=Qn}$()}}catch(Qn){if(Qn&&xe&&typeof Qn.stack=="string"){for(var Pe=Qn.stack.split(`
19
19
  `),zn=xe.stack.split(`
20
20
  `),It=Pe.length-1,Kt=zn.length-1;It>=1&&Kt>=0&&Pe[It]!==zn[Kt];)Kt--;for(;It>=1&&Kt>=0;It--,Kt--)if(Pe[It]!==zn[Kt]){if(It!==1||Kt!==1)do if(It--,Kt--,Kt<0||Pe[It]!==zn[Kt]){var Ar=`
@@ -41,12 +41,12 @@ React keys must be passed directly to JSX without using spread:
41
41
  *
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
- */var Q1;function T4(){return Q1||(Q1=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(I){return typeof I=="string"||typeof I=="function"||I===r||I===c||I===o||I===i||I===d||I===f||typeof I=="object"&&I!==null&&(I.$$typeof===m||I.$$typeof===p||I.$$typeof===a||I.$$typeof===s||I.$$typeof===u||I.$$typeof===v||I.$$typeof===x||I.$$typeof===_||I.$$typeof===g)}function y(I){if(typeof I=="object"&&I!==null){var me=I.$$typeof;switch(me){case t:var oe=I.type;switch(oe){case l:case c:case r:case o:case i:case d:return oe;default:var ve=oe&&oe.$$typeof;switch(ve){case s:case u:case m:case p:case a:return ve;default:return me}}case n:return me}}}var E=l,S=c,P=s,D=a,T=t,R=u,A=r,C=m,j=p,N=n,M=o,L=i,B=d,V=!1;function z(I){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(I)||y(I)===l}function W(I){return y(I)===c}function Q(I){return y(I)===s}function X(I){return y(I)===a}function ie(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function J(I){return y(I)===u}function re(I){return y(I)===r}function ae(I){return y(I)===m}function le(I){return y(I)===p}function ue(I){return y(I)===n}function K(I){return y(I)===o}function U(I){return y(I)===i}function Z(I){return y(I)===d}He.AsyncMode=E,He.ConcurrentMode=S,He.ContextConsumer=P,He.ContextProvider=D,He.Element=T,He.ForwardRef=R,He.Fragment=A,He.Lazy=C,He.Memo=j,He.Portal=N,He.Profiler=M,He.StrictMode=L,He.Suspense=B,He.isAsyncMode=z,He.isConcurrentMode=W,He.isContextConsumer=Q,He.isContextProvider=X,He.isElement=ie,He.isForwardRef=J,He.isFragment=re,He.isLazy=ae,He.isMemo=le,He.isPortal=ue,He.isProfiler=K,He.isStrictMode=U,He.isSuspense=Z,He.isValidElementType=w,He.typeOf=y})()),He}var Z1;function mP(){return Z1||(Z1=1,process.env.NODE_ENV==="production"?rd.exports=A4():rd.exports=T4()),rd.exports}/*
44
+ */var Q1;function T4(){return Q1||(Q1=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(I){return typeof I=="string"||typeof I=="function"||I===r||I===c||I===o||I===i||I===d||I===f||typeof I=="object"&&I!==null&&(I.$$typeof===m||I.$$typeof===p||I.$$typeof===a||I.$$typeof===s||I.$$typeof===u||I.$$typeof===v||I.$$typeof===x||I.$$typeof===_||I.$$typeof===g)}function y(I){if(typeof I=="object"&&I!==null){var me=I.$$typeof;switch(me){case t:var oe=I.type;switch(oe){case l:case c:case r:case o:case i:case d:return oe;default:var ve=oe&&oe.$$typeof;switch(ve){case s:case u:case m:case p:case a:return ve;default:return me}}case n:return me}}}var E=l,S=c,P=s,D=a,T=t,R=u,A=r,C=m,j=p,N=n,M=o,L=i,B=d,V=!1;function z(I){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(I)||y(I)===l}function W(I){return y(I)===c}function Q(I){return y(I)===s}function G(I){return y(I)===a}function ie(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function J(I){return y(I)===u}function re(I){return y(I)===r}function ae(I){return y(I)===m}function le(I){return y(I)===p}function ue(I){return y(I)===n}function K(I){return y(I)===o}function U(I){return y(I)===i}function Z(I){return y(I)===d}He.AsyncMode=E,He.ConcurrentMode=S,He.ContextConsumer=P,He.ContextProvider=D,He.Element=T,He.ForwardRef=R,He.Fragment=A,He.Lazy=C,He.Memo=j,He.Portal=N,He.Profiler=M,He.StrictMode=L,He.Suspense=B,He.isAsyncMode=z,He.isConcurrentMode=W,He.isContextConsumer=Q,He.isContextProvider=G,He.isElement=ie,He.isForwardRef=J,He.isFragment=re,He.isLazy=ae,He.isMemo=le,He.isPortal=ue,He.isProfiler=K,He.isStrictMode=U,He.isSuspense=Z,He.isValidElementType=w,He.typeOf=y})()),He}var Z1;function mP(){return Z1||(Z1=1,process.env.NODE_ENV==="production"?rd.exports=A4():rd.exports=T4()),rd.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var ym,J1;function N4(){if(J1)return ym;J1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ym=i()?Object.assign:function(o,a){for(var s,l=r(o),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},ym}var bm,ew;function xb(){if(ew)return bm;ew=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return bm=e,bm}var xm,tw;function gP(){return tw||(tw=1,xm=Function.call.bind(Object.prototype.hasOwnProperty)),xm}var wm,nw;function j4(){if(nw)return wm;nw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=xb(),n={},r=gP();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in o)if(r(o,u)){var d;try{if(typeof o[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=o[u](a,u,l,s,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},wm=i,wm}var _m,rw;function M4(){if(rw)return _m;rw=1;var e=mP(),t=N4(),n=xb(),r=gP(),i=j4(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return _m=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(W){var Q=W&&(c&&W[c]||W[u]);if(typeof Q=="function")return Q}var f="<<anonymous>>",p={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:_(),arrayOf:w,element:y(),elementType:E(),instanceOf:S,node:R(),objectOf:D,oneOf:P,oneOfType:T,shape:C,exact:j};function m(W,Q){return W===Q?W!==0||1/W===1/Q:W!==W&&Q!==Q}function g(W,Q){this.message=W,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}g.prototype=Error.prototype;function v(W){if(process.env.NODE_ENV!=="production")var Q={},X=0;function ie(re,ae,le,ue,K,U,Z){if(ue=ue||f,U=U||le,Z!==n){if(l){var I=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=ue+":"+le;!Q[me]&&X<3&&(o("You are manually calling a React.PropTypes validation function for the `"+U+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Q[me]=!0,X++)}}return ae[le]==null?re?ae[le]===null?new g("The "+K+" `"+U+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new g("The "+K+" `"+U+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:W(ae,le,ue,K,U)}var J=ie.bind(null,!1);return J.isRequired=ie.bind(null,!0),J}function x(W){function Q(X,ie,J,re,ae,le){var ue=X[ie],K=L(ue);if(K!==W){var U=B(ue);return new g("Invalid "+re+" `"+ae+"` of type "+("`"+U+"` supplied to `"+J+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return v(Q)}function _(){return v(a)}function w(W){function Q(X,ie,J,re,ae){if(typeof W!="function")return new g("Property `"+ae+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var le=X[ie];if(!Array.isArray(le)){var ue=L(le);return new g("Invalid "+re+" `"+ae+"` of type "+("`"+ue+"` supplied to `"+J+"`, expected an array."))}for(var K=0;K<le.length;K++){var U=W(le,K,J,re,ae+"["+K+"]",n);if(U instanceof Error)return U}return null}return v(Q)}function y(){function W(Q,X,ie,J,re){var ae=Q[X];if(!s(ae)){var le=L(ae);return new g("Invalid "+J+" `"+re+"` of type "+("`"+le+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return v(W)}function E(){function W(Q,X,ie,J,re){var ae=Q[X];if(!e.isValidElementType(ae)){var le=L(ae);return new g("Invalid "+J+" `"+re+"` of type "+("`"+le+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return v(W)}function S(W){function Q(X,ie,J,re,ae){if(!(X[ie]instanceof W)){var le=W.name||f,ue=z(X[ie]);return new g("Invalid "+re+" `"+ae+"` of type "+("`"+ue+"` supplied to `"+J+"`, expected ")+("instance of `"+le+"`."))}return null}return v(Q)}function P(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Q(X,ie,J,re,ae){for(var le=X[ie],ue=0;ue<W.length;ue++)if(m(le,W[ue]))return null;var K=JSON.stringify(W,function(Z,I){var me=B(I);return me==="symbol"?String(I):I});return new g("Invalid "+re+" `"+ae+"` of value `"+String(le)+"` "+("supplied to `"+J+"`, expected one of "+K+"."))}return v(Q)}function D(W){function Q(X,ie,J,re,ae){if(typeof W!="function")return new g("Property `"+ae+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var le=X[ie],ue=L(le);if(ue!=="object")return new g("Invalid "+re+" `"+ae+"` of type "+("`"+ue+"` supplied to `"+J+"`, expected an object."));for(var K in le)if(r(le,K)){var U=W(le,K,J,re,ae+"."+K,n);if(U instanceof Error)return U}return null}return v(Q)}function T(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Q=0;Q<W.length;Q++){var X=W[Q];if(typeof X!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(X)+" at index "+Q+"."),a}function ie(J,re,ae,le,ue){for(var K=[],U=0;U<W.length;U++){var Z=W[U],I=Z(J,re,ae,le,ue,n);if(I==null)return null;I.data&&r(I.data,"expectedType")&&K.push(I.data.expectedType)}var me=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+le+" `"+ue+"` supplied to "+("`"+ae+"`"+me+"."))}return v(ie)}function R(){function W(Q,X,ie,J,re){return N(Q[X])?null:new g("Invalid "+J+" `"+re+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return v(W)}function A(W,Q,X,ie,J){return new g((W||"React class")+": "+Q+" type `"+X+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function C(W){function Q(X,ie,J,re,ae){var le=X[ie],ue=L(le);if(ue!=="object")return new g("Invalid "+re+" `"+ae+"` of type `"+ue+"` "+("supplied to `"+J+"`, expected `object`."));for(var K in W){var U=W[K];if(typeof U!="function")return A(J,re,ae,K,B(U));var Z=U(le,K,J,re,ae+"."+K,n);if(Z)return Z}return null}return v(Q)}function j(W){function Q(X,ie,J,re,ae){var le=X[ie],ue=L(le);if(ue!=="object")return new g("Invalid "+re+" `"+ae+"` of type `"+ue+"` "+("supplied to `"+J+"`, expected `object`."));var K=t({},X[ie],W);for(var U in K){var Z=W[U];if(r(W,U)&&typeof Z!="function")return A(J,re,ae,U,B(Z));if(!Z)return new g("Invalid "+re+" `"+ae+"` key `"+U+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(X[ie],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys(W),null," "));var I=Z(le,U,J,re,ae+"."+U,n);if(I)return I}return null}return v(Q)}function N(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(N);if(W===null||s(W))return!0;var Q=d(W);if(Q){var X=Q.call(W),ie;if(Q!==W.entries){for(;!(ie=X.next()).done;)if(!N(ie.value))return!1}else for(;!(ie=X.next()).done;){var J=ie.value;if(J&&!N(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(W,Q){return W==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function L(W){var Q=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":M(Q,W)?"symbol":Q}function B(W){if(typeof W>"u"||W===null)return""+W;var Q=L(W);if(Q==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return Q}function V(W){var Q=B(W);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function z(W){return!W.constructor||!W.constructor.name?f:W.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},_m}var Em,iw;function R4(){if(iw)return Em;iw=1;var e=xb();function t(){}function n(){}return n.resetWarningCache=t,Em=function(){function r(a,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Em}var ow;function I4(){if(ow)return nd.exports;if(ow=1,process.env.NODE_ENV!=="production"){var e=mP(),t=!0;nd.exports=M4()(e.isElement,t)}else nd.exports=R4()();return nd.exports}var F4=I4();const b=Co(F4);function vP(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=vP(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ce(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vP(e))&&(r&&(r+=" "),r+=t);return r}function Bn(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}var id={exports:{}},tt={};/**
48
+ */var ym,J1;function N4(){if(J1)return ym;J1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ym=i()?Object.assign:function(o,a){for(var s,l=r(o),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},ym}var bm,ew;function xb(){if(ew)return bm;ew=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return bm=e,bm}var xm,tw;function gP(){return tw||(tw=1,xm=Function.call.bind(Object.prototype.hasOwnProperty)),xm}var wm,nw;function j4(){if(nw)return wm;nw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=xb(),n={},r=gP();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in o)if(r(o,u)){var d;try{if(typeof o[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=o[u](a,u,l,s,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},wm=i,wm}var _m,rw;function M4(){if(rw)return _m;rw=1;var e=mP(),t=N4(),n=xb(),r=gP(),i=j4(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return _m=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(W){var Q=W&&(c&&W[c]||W[u]);if(typeof Q=="function")return Q}var f="<<anonymous>>",p={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:_(),arrayOf:w,element:y(),elementType:E(),instanceOf:S,node:R(),objectOf:D,oneOf:P,oneOfType:T,shape:C,exact:j};function m(W,Q){return W===Q?W!==0||1/W===1/Q:W!==W&&Q!==Q}function g(W,Q){this.message=W,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}g.prototype=Error.prototype;function v(W){if(process.env.NODE_ENV!=="production")var Q={},G=0;function ie(re,ae,le,ue,K,U,Z){if(ue=ue||f,U=U||le,Z!==n){if(l){var I=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=ue+":"+le;!Q[me]&&G<3&&(o("You are manually calling a React.PropTypes validation function for the `"+U+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Q[me]=!0,G++)}}return ae[le]==null?re?ae[le]===null?new g("The "+K+" `"+U+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new g("The "+K+" `"+U+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:W(ae,le,ue,K,U)}var J=ie.bind(null,!1);return J.isRequired=ie.bind(null,!0),J}function x(W){function Q(G,ie,J,re,ae,le){var ue=G[ie],K=L(ue);if(K!==W){var U=B(ue);return new g("Invalid "+re+" `"+ae+"` of type "+("`"+U+"` supplied to `"+J+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return v(Q)}function _(){return v(a)}function w(W){function Q(G,ie,J,re,ae){if(typeof W!="function")return new g("Property `"+ae+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var le=G[ie];if(!Array.isArray(le)){var ue=L(le);return new g("Invalid "+re+" `"+ae+"` of type "+("`"+ue+"` supplied to `"+J+"`, expected an array."))}for(var K=0;K<le.length;K++){var U=W(le,K,J,re,ae+"["+K+"]",n);if(U instanceof Error)return U}return null}return v(Q)}function y(){function W(Q,G,ie,J,re){var ae=Q[G];if(!s(ae)){var le=L(ae);return new g("Invalid "+J+" `"+re+"` of type "+("`"+le+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return v(W)}function E(){function W(Q,G,ie,J,re){var ae=Q[G];if(!e.isValidElementType(ae)){var le=L(ae);return new g("Invalid "+J+" `"+re+"` of type "+("`"+le+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return v(W)}function S(W){function Q(G,ie,J,re,ae){if(!(G[ie]instanceof W)){var le=W.name||f,ue=z(G[ie]);return new g("Invalid "+re+" `"+ae+"` of type "+("`"+ue+"` supplied to `"+J+"`, expected ")+("instance of `"+le+"`."))}return null}return v(Q)}function P(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Q(G,ie,J,re,ae){for(var le=G[ie],ue=0;ue<W.length;ue++)if(m(le,W[ue]))return null;var K=JSON.stringify(W,function(Z,I){var me=B(I);return me==="symbol"?String(I):I});return new g("Invalid "+re+" `"+ae+"` of value `"+String(le)+"` "+("supplied to `"+J+"`, expected one of "+K+"."))}return v(Q)}function D(W){function Q(G,ie,J,re,ae){if(typeof W!="function")return new g("Property `"+ae+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var le=G[ie],ue=L(le);if(ue!=="object")return new g("Invalid "+re+" `"+ae+"` of type "+("`"+ue+"` supplied to `"+J+"`, expected an object."));for(var K in le)if(r(le,K)){var U=W(le,K,J,re,ae+"."+K,n);if(U instanceof Error)return U}return null}return v(Q)}function T(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Q=0;Q<W.length;Q++){var G=W[Q];if(typeof G!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(G)+" at index "+Q+"."),a}function ie(J,re,ae,le,ue){for(var K=[],U=0;U<W.length;U++){var Z=W[U],I=Z(J,re,ae,le,ue,n);if(I==null)return null;I.data&&r(I.data,"expectedType")&&K.push(I.data.expectedType)}var me=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+le+" `"+ue+"` supplied to "+("`"+ae+"`"+me+"."))}return v(ie)}function R(){function W(Q,G,ie,J,re){return N(Q[G])?null:new g("Invalid "+J+" `"+re+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return v(W)}function A(W,Q,G,ie,J){return new g((W||"React class")+": "+Q+" type `"+G+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function C(W){function Q(G,ie,J,re,ae){var le=G[ie],ue=L(le);if(ue!=="object")return new g("Invalid "+re+" `"+ae+"` of type `"+ue+"` "+("supplied to `"+J+"`, expected `object`."));for(var K in W){var U=W[K];if(typeof U!="function")return A(J,re,ae,K,B(U));var Z=U(le,K,J,re,ae+"."+K,n);if(Z)return Z}return null}return v(Q)}function j(W){function Q(G,ie,J,re,ae){var le=G[ie],ue=L(le);if(ue!=="object")return new g("Invalid "+re+" `"+ae+"` of type `"+ue+"` "+("supplied to `"+J+"`, expected `object`."));var K=t({},G[ie],W);for(var U in K){var Z=W[U];if(r(W,U)&&typeof Z!="function")return A(J,re,ae,U,B(Z));if(!Z)return new g("Invalid "+re+" `"+ae+"` key `"+U+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(G[ie],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var I=Z(le,U,J,re,ae+"."+U,n);if(I)return I}return null}return v(Q)}function N(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(N);if(W===null||s(W))return!0;var Q=d(W);if(Q){var G=Q.call(W),ie;if(Q!==W.entries){for(;!(ie=G.next()).done;)if(!N(ie.value))return!1}else for(;!(ie=G.next()).done;){var J=ie.value;if(J&&!N(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(W,Q){return W==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function L(W){var Q=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":M(Q,W)?"symbol":Q}function B(W){if(typeof W>"u"||W===null)return""+W;var Q=L(W);if(Q==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return Q}function V(W){var Q=B(W);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function z(W){return!W.constructor||!W.constructor.name?f:W.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},_m}var Em,iw;function R4(){if(iw)return Em;iw=1;var e=xb();function t(){}function n(){}return n.resetWarningCache=t,Em=function(){function r(a,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Em}var ow;function I4(){if(ow)return nd.exports;if(ow=1,process.env.NODE_ENV!=="production"){var e=mP(),t=!0;nd.exports=M4()(e.isElement,t)}else nd.exports=R4()();return nd.exports}var F4=I4();const b=Co(F4);function vP(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=vP(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ce(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vP(e))&&(r&&(r+=" "),r+=t);return r}function Bn(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}var id={exports:{}},tt={};/**
50
50
  * @license React
51
51
  * react-is.production.js
52
52
  *
@@ -80,7 +80,7 @@ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Mi(18,`(${t})`));return
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var vw;function lL(){return vw||(vw=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(I){return typeof I=="string"||typeof I=="function"||I===r||I===c||I===o||I===i||I===d||I===f||typeof I=="object"&&I!==null&&(I.$$typeof===m||I.$$typeof===p||I.$$typeof===a||I.$$typeof===s||I.$$typeof===u||I.$$typeof===v||I.$$typeof===x||I.$$typeof===_||I.$$typeof===g)}function y(I){if(typeof I=="object"&&I!==null){var me=I.$$typeof;switch(me){case t:var oe=I.type;switch(oe){case l:case c:case r:case o:case i:case d:return oe;default:var ve=oe&&oe.$$typeof;switch(ve){case s:case u:case m:case p:case a:return ve;default:return me}}case n:return me}}}var E=l,S=c,P=s,D=a,T=t,R=u,A=r,C=m,j=p,N=n,M=o,L=i,B=d,V=!1;function z(I){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(I)||y(I)===l}function W(I){return y(I)===c}function Q(I){return y(I)===s}function X(I){return y(I)===a}function ie(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function J(I){return y(I)===u}function re(I){return y(I)===r}function ae(I){return y(I)===m}function le(I){return y(I)===p}function ue(I){return y(I)===n}function K(I){return y(I)===o}function U(I){return y(I)===i}function Z(I){return y(I)===d}Ue.AsyncMode=E,Ue.ConcurrentMode=S,Ue.ContextConsumer=P,Ue.ContextProvider=D,Ue.Element=T,Ue.ForwardRef=R,Ue.Fragment=A,Ue.Lazy=C,Ue.Memo=j,Ue.Portal=N,Ue.Profiler=M,Ue.StrictMode=L,Ue.Suspense=B,Ue.isAsyncMode=z,Ue.isConcurrentMode=W,Ue.isContextConsumer=Q,Ue.isContextProvider=X,Ue.isElement=ie,Ue.isForwardRef=J,Ue.isFragment=re,Ue.isLazy=ae,Ue.isMemo=le,Ue.isPortal=ue,Ue.isProfiler=K,Ue.isStrictMode=U,Ue.isSuspense=Z,Ue.isValidElementType=w,Ue.typeOf=y})()),Ue}var yw;function cL(){return yw||(yw=1,process.env.NODE_ENV==="production"?ad.exports=sL():ad.exports=lL()),ad.exports}var Sm,bw;function uL(){if(bw)return Sm;bw=1;var e=cL(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=i;function a(m){return e.isMemo(m)?i:o[m.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function p(m,g,v){if(typeof g!="string"){if(f){var x=d(g);x&&x!==f&&p(m,x,v)}var _=l(g);c&&(_=_.concat(c(g)));for(var w=a(m),y=a(g),E=0;E<_.length;++E){var S=_[E];if(!n[S]&&!(v&&v[S])&&!(y&&y[S])&&!(w&&w[S])){var P=u(g,S);try{s(m,S,P)}catch{}}}}return m}return Sm=p,Sm}uL();var dL=!0;function PP(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Cb=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||dL===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},kb=function(t,n,r){Cb(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function fL(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var pL={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},hL=/[A-Z]|^ms/g,mL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DP=function(t){return t.charCodeAt(1)===45},xw=function(t){return t!=null&&typeof t!="boolean"},Om=CP(function(e){return DP(e)?e:e.replace(hL,"-$&").toLowerCase()}),ww=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(mL,function(r,i,o){return yi={name:i,styles:o,next:yi},i})}return pL[t]!==1&&!DP(t)&&typeof n=="number"&&n!==0?n+"px":n};function Wc(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return yi={name:i.name,styles:i.styles,next:yi},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)yi={name:a.name,styles:a.styles,next:yi},a=a.next;var s=o.styles+";";return s}return gL(e,t,n)}case"function":{if(e!==void 0){var l=yi,c=n(e);return yi=l,Wc(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function gL(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Wc(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":xw(s)&&(r+=Om(o)+":"+ww(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)xw(a[l])&&(r+=Om(o)+":"+ww(o,a[l])+";");else{var c=Wc(e,t,a);switch(o){case"animation":case"animationName":{r+=Om(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var _w=/label:\s*([^\s;{]+)\s*(;|$)/g,yi;function rh(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";yi=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Wc(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Wc(n,t,e[s]),r){var l=o;i+=l[s]}_w.lastIndex=0;for(var c="",u;(u=_w.exec(i))!==null;)c+="-"+u[1];var d=fL(i)+c;return{name:d,styles:i,next:yi}}var vL=function(t){return t()},AP=O.useInsertionEffect?O.useInsertionEffect:!1,TP=AP||vL,Ew=AP||O.useLayoutEffect,NP=O.createContext(typeof HTMLElement<"u"?aL({key:"css"}):null);NP.Provider;var Pb=function(t){return k.forwardRef(function(n,r){var i=k.useContext(NP);return t(n,i,r)})},ih=O.createContext({}),Db={}.hasOwnProperty,Yv="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yL=function(t,n){var r={};for(var i in n)Db.call(n,i)&&(r[i]=n[i]);return r[Yv]=t,r},bL=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Cb(n,r,i),TP(function(){return kb(n,r,i)}),null},xL=Pb(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Yv],o=[r],a="";typeof e.className=="string"?a=PP(t.registered,o,e.className):e.className!=null&&(a=e.className+" ");var s=rh(o,void 0,O.useContext(ih));a+=t.key+"-"+s.name;var l={};for(var c in e)Db.call(e,c)&&c!=="css"&&c!==Yv&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),O.createElement(O.Fragment,null,O.createElement(bL,{cache:t,serialized:s,isStringTag:typeof i=="string"}),O.createElement(i,l))}),wL=xL,Sw=function(t,n){var r=arguments;if(n==null||!Db.call(n,"css"))return O.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=wL,o[1]=yL(t,n);for(var a=2;a<i;a++)o[a]=r[a];return O.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Sw||(Sw={}));var _L=Pb(function(e,t){var n=e.styles,r=rh([n],void 0,O.useContext(ih)),i=O.useRef();return Ew(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),Ew(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&kb(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null}),EL=/^((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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,SL=CP(function(e){return EL.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),OL=SL,CL=function(t){return t!=="theme"},Ow=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?OL:CL},Cw=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},kL=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Cb(n,r,i),TP(function(){return kb(n,r,i)}),null},PL=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=Cw(t,n,r),l=s||Ow(i),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var g=Pb(function(v,x,_){var w=c&&v.as||i,y="",E=[],S=v;if(v.theme==null){S={};for(var P in v)S[P]=v[P];S.theme=O.useContext(ih)}typeof v.className=="string"?y=PP(x.registered,E,v.className):v.className!=null&&(y=v.className+" ");var D=rh(d.concat(E),x.registered,S);y+=x.key+"-"+D.name,a!==void 0&&(y+=" "+a);var T=c&&s===void 0?Ow(w):l,R={};for(var A in v)c&&A==="as"||T(A)&&(R[A]=v[A]);return R.className=y,_&&(R.ref=_),O.createElement(O.Fragment,null,O.createElement(kL,{cache:x,serialized:D,isStringTag:typeof w=="string"}),O.createElement(w,R))});return g.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=d,g.__emotion_forwardProp=s,Object.defineProperty(g,"toString",{value:function(){return"."+a}}),g.withComponent=function(v,x){var _=e(v,zv({},n,x,{shouldForwardProp:Cw(g,x,!0)}));return _.apply(void 0,d)},g}},DL=["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"],Of=PL.bind(null);DL.forEach(function(e){Of[e]=Of(e)});function AL(e){return e==null||Object.keys(e).length===0}function jP(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?i=>t(AL(i)?n:i):t;return h.jsx(_L,{styles:r})}process.env.NODE_ENV!=="production"&&(jP.propTypes={defaultTheme:b.object,styles:b.oneOfType([b.array,b.string,b.object,b.func])});/**
83
+ */var vw;function lL(){return vw||(vw=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(I){return typeof I=="string"||typeof I=="function"||I===r||I===c||I===o||I===i||I===d||I===f||typeof I=="object"&&I!==null&&(I.$$typeof===m||I.$$typeof===p||I.$$typeof===a||I.$$typeof===s||I.$$typeof===u||I.$$typeof===v||I.$$typeof===x||I.$$typeof===_||I.$$typeof===g)}function y(I){if(typeof I=="object"&&I!==null){var me=I.$$typeof;switch(me){case t:var oe=I.type;switch(oe){case l:case c:case r:case o:case i:case d:return oe;default:var ve=oe&&oe.$$typeof;switch(ve){case s:case u:case m:case p:case a:return ve;default:return me}}case n:return me}}}var E=l,S=c,P=s,D=a,T=t,R=u,A=r,C=m,j=p,N=n,M=o,L=i,B=d,V=!1;function z(I){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(I)||y(I)===l}function W(I){return y(I)===c}function Q(I){return y(I)===s}function G(I){return y(I)===a}function ie(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function J(I){return y(I)===u}function re(I){return y(I)===r}function ae(I){return y(I)===m}function le(I){return y(I)===p}function ue(I){return y(I)===n}function K(I){return y(I)===o}function U(I){return y(I)===i}function Z(I){return y(I)===d}Ue.AsyncMode=E,Ue.ConcurrentMode=S,Ue.ContextConsumer=P,Ue.ContextProvider=D,Ue.Element=T,Ue.ForwardRef=R,Ue.Fragment=A,Ue.Lazy=C,Ue.Memo=j,Ue.Portal=N,Ue.Profiler=M,Ue.StrictMode=L,Ue.Suspense=B,Ue.isAsyncMode=z,Ue.isConcurrentMode=W,Ue.isContextConsumer=Q,Ue.isContextProvider=G,Ue.isElement=ie,Ue.isForwardRef=J,Ue.isFragment=re,Ue.isLazy=ae,Ue.isMemo=le,Ue.isPortal=ue,Ue.isProfiler=K,Ue.isStrictMode=U,Ue.isSuspense=Z,Ue.isValidElementType=w,Ue.typeOf=y})()),Ue}var yw;function cL(){return yw||(yw=1,process.env.NODE_ENV==="production"?ad.exports=sL():ad.exports=lL()),ad.exports}var Sm,bw;function uL(){if(bw)return Sm;bw=1;var e=cL(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=i;function a(m){return e.isMemo(m)?i:o[m.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function p(m,g,v){if(typeof g!="string"){if(f){var x=d(g);x&&x!==f&&p(m,x,v)}var _=l(g);c&&(_=_.concat(c(g)));for(var w=a(m),y=a(g),E=0;E<_.length;++E){var S=_[E];if(!n[S]&&!(v&&v[S])&&!(y&&y[S])&&!(w&&w[S])){var P=u(g,S);try{s(m,S,P)}catch{}}}}return m}return Sm=p,Sm}uL();var dL=!0;function PP(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Cb=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||dL===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},kb=function(t,n,r){Cb(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function fL(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var pL={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},hL=/[A-Z]|^ms/g,mL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DP=function(t){return t.charCodeAt(1)===45},xw=function(t){return t!=null&&typeof t!="boolean"},Om=CP(function(e){return DP(e)?e:e.replace(hL,"-$&").toLowerCase()}),ww=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(mL,function(r,i,o){return yi={name:i,styles:o,next:yi},i})}return pL[t]!==1&&!DP(t)&&typeof n=="number"&&n!==0?n+"px":n};function Wc(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return yi={name:i.name,styles:i.styles,next:yi},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)yi={name:a.name,styles:a.styles,next:yi},a=a.next;var s=o.styles+";";return s}return gL(e,t,n)}case"function":{if(e!==void 0){var l=yi,c=n(e);return yi=l,Wc(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function gL(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Wc(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":xw(s)&&(r+=Om(o)+":"+ww(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)xw(a[l])&&(r+=Om(o)+":"+ww(o,a[l])+";");else{var c=Wc(e,t,a);switch(o){case"animation":case"animationName":{r+=Om(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var _w=/label:\s*([^\s;{]+)\s*(;|$)/g,yi;function rh(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";yi=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Wc(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Wc(n,t,e[s]),r){var l=o;i+=l[s]}_w.lastIndex=0;for(var c="",u;(u=_w.exec(i))!==null;)c+="-"+u[1];var d=fL(i)+c;return{name:d,styles:i,next:yi}}var vL=function(t){return t()},AP=O.useInsertionEffect?O.useInsertionEffect:!1,TP=AP||vL,Ew=AP||O.useLayoutEffect,NP=O.createContext(typeof HTMLElement<"u"?aL({key:"css"}):null);NP.Provider;var Pb=function(t){return k.forwardRef(function(n,r){var i=k.useContext(NP);return t(n,i,r)})},ih=O.createContext({}),Db={}.hasOwnProperty,Yv="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yL=function(t,n){var r={};for(var i in n)Db.call(n,i)&&(r[i]=n[i]);return r[Yv]=t,r},bL=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Cb(n,r,i),TP(function(){return kb(n,r,i)}),null},xL=Pb(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Yv],o=[r],a="";typeof e.className=="string"?a=PP(t.registered,o,e.className):e.className!=null&&(a=e.className+" ");var s=rh(o,void 0,O.useContext(ih));a+=t.key+"-"+s.name;var l={};for(var c in e)Db.call(e,c)&&c!=="css"&&c!==Yv&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),O.createElement(O.Fragment,null,O.createElement(bL,{cache:t,serialized:s,isStringTag:typeof i=="string"}),O.createElement(i,l))}),wL=xL,Sw=function(t,n){var r=arguments;if(n==null||!Db.call(n,"css"))return O.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=wL,o[1]=yL(t,n);for(var a=2;a<i;a++)o[a]=r[a];return O.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Sw||(Sw={}));var _L=Pb(function(e,t){var n=e.styles,r=rh([n],void 0,O.useContext(ih)),i=O.useRef();return Ew(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),Ew(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&kb(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null}),EL=/^((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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,SL=CP(function(e){return EL.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),OL=SL,CL=function(t){return t!=="theme"},Ow=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?OL:CL},Cw=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},kL=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Cb(n,r,i),TP(function(){return kb(n,r,i)}),null},PL=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=Cw(t,n,r),l=s||Ow(i),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var g=Pb(function(v,x,_){var w=c&&v.as||i,y="",E=[],S=v;if(v.theme==null){S={};for(var P in v)S[P]=v[P];S.theme=O.useContext(ih)}typeof v.className=="string"?y=PP(x.registered,E,v.className):v.className!=null&&(y=v.className+" ");var D=rh(d.concat(E),x.registered,S);y+=x.key+"-"+D.name,a!==void 0&&(y+=" "+a);var T=c&&s===void 0?Ow(w):l,R={};for(var A in v)c&&A==="as"||T(A)&&(R[A]=v[A]);return R.className=y,_&&(R.ref=_),O.createElement(O.Fragment,null,O.createElement(kL,{cache:x,serialized:D,isStringTag:typeof w=="string"}),O.createElement(w,R))});return g.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=d,g.__emotion_forwardProp=s,Object.defineProperty(g,"toString",{value:function(){return"."+a}}),g.withComponent=function(v,x){var _=e(v,zv({},n,x,{shouldForwardProp:Cw(g,x,!0)}));return _.apply(void 0,d)},g}},DL=["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"],Of=PL.bind(null);DL.forEach(function(e){Of[e]=Of(e)});function AL(e){return e==null||Object.keys(e).length===0}function jP(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?i=>t(AL(i)?n:i):t;return h.jsx(_L,{styles:r})}process.env.NODE_ENV!=="production"&&(jP.propTypes={defaultTheme:b.object,styles:b.oneOfType([b.array,b.string,b.object,b.func])});/**
84
84
  * @mui/styled-engine v7.3.2
85
85
  *
86
86
  * @license MIT
@@ -113,15 +113,15 @@ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
113
113
  theme.transitions = createTransitions(theme.transitions || {});
114
114
 
115
115
  export default theme;`}function $w(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const R$=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function I$(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:Cf(t,R$(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${$w(n)})`:sh(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${$w(n)})`:ah(t,n)}})}function Gv(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:s={},shape:l,colorSpace:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Mi(20));const d=jb({...o,colorSpace:c}),f=Ab(e);let p=Rn(f,{mixins:_$(f.breakpoints,r),palette:d,shadows:P$.slice(),typography:S$(d,s),transitions:N$(a),zIndex:{...j$}});if(p=Rn(p,u),p=t.reduce((m,g)=>Rn(m,g),p),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],g=(v,x)=>{let _;for(_ in v){const w=v[_];if(m.includes(_)&&Object.keys(w).length>0){if(process.env.NODE_ENV!=="production"){const y=En("",_);console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${_}\` internal state.`,"You can not override it like this: ",JSON.stringify(v,null,2),"",`Instead, you need to use the '&.${y}' syntax:`,JSON.stringify({root:{[`&.${y}`]:w}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
116
- `))}v[_]={}}}};Object.keys(p.components).forEach(v=>{const x=p.components[v].styleOverrides;x&&v.startsWith("Mui")&&g(x,v)})}return p.unstable_sxConfig={...Jp,...u?.unstable_sxConfig},p.unstable_sx=function(g){return Qs({sx:g,theme:this})},p.toRuntimeSource=KP,I$(p),p}function Xv(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const F$=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Xv(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function qP(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function GP(e){return e==="dark"?F$:[]}function L$(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:i,...o}=e,a=jb({...t,colorSpace:i});return{palette:a,opacity:{...qP(a.mode),...n},overlays:r||GP(a.mode),...o}}function $$(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const B$=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],W$=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return B$(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function z$(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function G(e,t,n){!e[t]&&n&&(e[t]=n)}function vc(e){return typeof e!="string"||!e.startsWith("hsl")?e:WP(e)}function Ui(e,t){`${t}Channel`in e||(e[`${t}Channel`]=gc(vc(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
117
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function V$(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const di=e=>{try{return e()}catch{}},H$=(e="mui")=>l$(e);function Dm(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;const o=i==="dark"?"dark":"light";if(!r){t[i]=L$({...n,palette:{mode:o,...n?.palette},colorSpace:e});return}const{palette:a,...s}=Gv({...r,palette:{mode:o,...n?.palette},colorSpace:e});return t[i]={...n,palette:a,opacity:{...qP(o),...n?.opacity},overlays:n?.overlays||GP(o)},s}function Y$(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=$$,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),p=H$(o),{[f]:m,light:g,dark:v,...x}=n,_={...x};let w=m;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Mi(21,f));let y;a&&(y="oklch");const E=Dm(y,_,w,u,f);g&&!_.light&&Dm(y,_,g,void 0,"light"),v&&!_.dark&&Dm(y,_,v,void 0,"dark");let S={defaultColorScheme:f,...E,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:_,font:{...w$(E.typography),...E.font},spacing:V$(u.spacing)};Object.keys(S.colorSchemes).forEach(A=>{const C=S.colorSchemes[A].palette,j=M=>{const L=M.split("-"),B=L[1],V=L[2];return p(M,C[B][V])};C.mode==="light"&&(G(C.common,"background","#fff"),G(C.common,"onBackground","#000")),C.mode==="dark"&&(G(C.common,"background","#000"),G(C.common,"onBackground","#fff"));function N(M,L,B){if(y){let V;return M===ba&&(V=`transparent ${((1-B)*100).toFixed(0)}%`),M===Ge&&(V=`#000 ${(B*100).toFixed(0)}%`),M===Xe&&(V=`#fff ${(B*100).toFixed(0)}%`),`color-mix(in ${y}, ${L}, ${V})`}return M(L,B)}if(z$(C,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),C.mode==="light"){G(C.Alert,"errorColor",N(Ge,C.error.light,.6)),G(C.Alert,"infoColor",N(Ge,C.info.light,.6)),G(C.Alert,"successColor",N(Ge,C.success.light,.6)),G(C.Alert,"warningColor",N(Ge,C.warning.light,.6)),G(C.Alert,"errorFilledBg",j("palette-error-main")),G(C.Alert,"infoFilledBg",j("palette-info-main")),G(C.Alert,"successFilledBg",j("palette-success-main")),G(C.Alert,"warningFilledBg",j("palette-warning-main")),G(C.Alert,"errorFilledColor",di(()=>C.getContrastText(C.error.main))),G(C.Alert,"infoFilledColor",di(()=>C.getContrastText(C.info.main))),G(C.Alert,"successFilledColor",di(()=>C.getContrastText(C.success.main))),G(C.Alert,"warningFilledColor",di(()=>C.getContrastText(C.warning.main))),G(C.Alert,"errorStandardBg",N(Xe,C.error.light,.9)),G(C.Alert,"infoStandardBg",N(Xe,C.info.light,.9)),G(C.Alert,"successStandardBg",N(Xe,C.success.light,.9)),G(C.Alert,"warningStandardBg",N(Xe,C.warning.light,.9)),G(C.Alert,"errorIconColor",j("palette-error-main")),G(C.Alert,"infoIconColor",j("palette-info-main")),G(C.Alert,"successIconColor",j("palette-success-main")),G(C.Alert,"warningIconColor",j("palette-warning-main")),G(C.AppBar,"defaultBg",j("palette-grey-100")),G(C.Avatar,"defaultBg",j("palette-grey-400")),G(C.Button,"inheritContainedBg",j("palette-grey-300")),G(C.Button,"inheritContainedHoverBg",j("palette-grey-A100")),G(C.Chip,"defaultBorder",j("palette-grey-400")),G(C.Chip,"defaultAvatarColor",j("palette-grey-700")),G(C.Chip,"defaultIconColor",j("palette-grey-700")),G(C.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),G(C.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),G(C.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),G(C.LinearProgress,"primaryBg",N(Xe,C.primary.main,.62)),G(C.LinearProgress,"secondaryBg",N(Xe,C.secondary.main,.62)),G(C.LinearProgress,"errorBg",N(Xe,C.error.main,.62)),G(C.LinearProgress,"infoBg",N(Xe,C.info.main,.62)),G(C.LinearProgress,"successBg",N(Xe,C.success.main,.62)),G(C.LinearProgress,"warningBg",N(Xe,C.warning.main,.62)),G(C.Skeleton,"bg",y?N(ba,C.text.primary,.11):`rgba(${j("palette-text-primaryChannel")} / 0.11)`),G(C.Slider,"primaryTrack",N(Xe,C.primary.main,.62)),G(C.Slider,"secondaryTrack",N(Xe,C.secondary.main,.62)),G(C.Slider,"errorTrack",N(Xe,C.error.main,.62)),G(C.Slider,"infoTrack",N(Xe,C.info.main,.62)),G(C.Slider,"successTrack",N(Xe,C.success.main,.62)),G(C.Slider,"warningTrack",N(Xe,C.warning.main,.62));const M=y?N(Ge,C.background.default,.6825):sd(C.background.default,.8);G(C.SnackbarContent,"bg",M),G(C.SnackbarContent,"color",di(()=>y?qv.text.primary:C.getContrastText(M))),G(C.SpeedDialAction,"fabHoverBg",sd(C.background.paper,.15)),G(C.StepConnector,"border",j("palette-grey-400")),G(C.StepContent,"border",j("palette-grey-400")),G(C.Switch,"defaultColor",j("palette-common-white")),G(C.Switch,"defaultDisabledColor",j("palette-grey-100")),G(C.Switch,"primaryDisabledColor",N(Xe,C.primary.main,.62)),G(C.Switch,"secondaryDisabledColor",N(Xe,C.secondary.main,.62)),G(C.Switch,"errorDisabledColor",N(Xe,C.error.main,.62)),G(C.Switch,"infoDisabledColor",N(Xe,C.info.main,.62)),G(C.Switch,"successDisabledColor",N(Xe,C.success.main,.62)),G(C.Switch,"warningDisabledColor",N(Xe,C.warning.main,.62)),G(C.TableCell,"border",N(Xe,N(ba,C.divider,1),.88)),G(C.Tooltip,"bg",N(ba,C.grey[700],.92))}if(C.mode==="dark"){G(C.Alert,"errorColor",N(Xe,C.error.light,.6)),G(C.Alert,"infoColor",N(Xe,C.info.light,.6)),G(C.Alert,"successColor",N(Xe,C.success.light,.6)),G(C.Alert,"warningColor",N(Xe,C.warning.light,.6)),G(C.Alert,"errorFilledBg",j("palette-error-dark")),G(C.Alert,"infoFilledBg",j("palette-info-dark")),G(C.Alert,"successFilledBg",j("palette-success-dark")),G(C.Alert,"warningFilledBg",j("palette-warning-dark")),G(C.Alert,"errorFilledColor",di(()=>C.getContrastText(C.error.dark))),G(C.Alert,"infoFilledColor",di(()=>C.getContrastText(C.info.dark))),G(C.Alert,"successFilledColor",di(()=>C.getContrastText(C.success.dark))),G(C.Alert,"warningFilledColor",di(()=>C.getContrastText(C.warning.dark))),G(C.Alert,"errorStandardBg",N(Ge,C.error.light,.9)),G(C.Alert,"infoStandardBg",N(Ge,C.info.light,.9)),G(C.Alert,"successStandardBg",N(Ge,C.success.light,.9)),G(C.Alert,"warningStandardBg",N(Ge,C.warning.light,.9)),G(C.Alert,"errorIconColor",j("palette-error-main")),G(C.Alert,"infoIconColor",j("palette-info-main")),G(C.Alert,"successIconColor",j("palette-success-main")),G(C.Alert,"warningIconColor",j("palette-warning-main")),G(C.AppBar,"defaultBg",j("palette-grey-900")),G(C.AppBar,"darkBg",j("palette-background-paper")),G(C.AppBar,"darkColor",j("palette-text-primary")),G(C.Avatar,"defaultBg",j("palette-grey-600")),G(C.Button,"inheritContainedBg",j("palette-grey-800")),G(C.Button,"inheritContainedHoverBg",j("palette-grey-700")),G(C.Chip,"defaultBorder",j("palette-grey-700")),G(C.Chip,"defaultAvatarColor",j("palette-grey-300")),G(C.Chip,"defaultIconColor",j("palette-grey-300")),G(C.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),G(C.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),G(C.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),G(C.LinearProgress,"primaryBg",N(Ge,C.primary.main,.5)),G(C.LinearProgress,"secondaryBg",N(Ge,C.secondary.main,.5)),G(C.LinearProgress,"errorBg",N(Ge,C.error.main,.5)),G(C.LinearProgress,"infoBg",N(Ge,C.info.main,.5)),G(C.LinearProgress,"successBg",N(Ge,C.success.main,.5)),G(C.LinearProgress,"warningBg",N(Ge,C.warning.main,.5)),G(C.Skeleton,"bg",y?N(ba,C.text.primary,.13):`rgba(${j("palette-text-primaryChannel")} / 0.13)`),G(C.Slider,"primaryTrack",N(Ge,C.primary.main,.5)),G(C.Slider,"secondaryTrack",N(Ge,C.secondary.main,.5)),G(C.Slider,"errorTrack",N(Ge,C.error.main,.5)),G(C.Slider,"infoTrack",N(Ge,C.info.main,.5)),G(C.Slider,"successTrack",N(Ge,C.success.main,.5)),G(C.Slider,"warningTrack",N(Ge,C.warning.main,.5));const M=y?N(Xe,C.background.default,.985):sd(C.background.default,.98);G(C.SnackbarContent,"bg",M),G(C.SnackbarContent,"color",di(()=>y?YP.text.primary:C.getContrastText(M))),G(C.SpeedDialAction,"fabHoverBg",sd(C.background.paper,.15)),G(C.StepConnector,"border",j("palette-grey-600")),G(C.StepContent,"border",j("palette-grey-600")),G(C.Switch,"defaultColor",j("palette-grey-300")),G(C.Switch,"defaultDisabledColor",j("palette-grey-600")),G(C.Switch,"primaryDisabledColor",N(Ge,C.primary.main,.55)),G(C.Switch,"secondaryDisabledColor",N(Ge,C.secondary.main,.55)),G(C.Switch,"errorDisabledColor",N(Ge,C.error.main,.55)),G(C.Switch,"infoDisabledColor",N(Ge,C.info.main,.55)),G(C.Switch,"successDisabledColor",N(Ge,C.success.main,.55)),G(C.Switch,"warningDisabledColor",N(Ge,C.warning.main,.55)),G(C.TableCell,"border",N(Ge,N(ba,C.divider,1),.68)),G(C.Tooltip,"bg",N(ba,C.grey[700],.92))}Ui(C.background,"default"),Ui(C.background,"paper"),Ui(C.common,"background"),Ui(C.common,"onBackground"),Ui(C,"divider"),Object.keys(C).forEach(M=>{const L=C[M];M!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&G(C[M],"mainChannel",gc(vc(L.main))),L.light&&G(C[M],"lightChannel",gc(vc(L.light))),L.dark&&G(C[M],"darkChannel",gc(vc(L.dark))),L.contrastText&&G(C[M],"contrastTextChannel",gc(vc(L.contrastText))),M==="text"&&(Ui(C[M],"primary"),Ui(C[M],"secondary")),M==="action"&&(L.active&&Ui(C[M],"active"),L.selected&&Ui(C[M],"selected")))})}),S=t.reduce((A,C)=>Rn(A,C),S);const P={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:W$(S),enableContrastVars:a},{vars:D,generateThemeVars:T,generateStyleSheets:R}=d$(S,P);return S.vars=D,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([A,C])=>{S[A]=C}),S.generateThemeVars=T,S.generateStyleSheets=R,S.generateSpacing=function(){return MP(u.spacing,wb(this))},S.getColorSchemeSelector=f$(l),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Jp,...u?.unstable_sxConfig},S.unstable_sx=function(C){return Qs({sx:C,theme:this})},S.toRuntimeSource=KP,S}function Bw(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:jb({...n===!0?{}:n.palette,mode:t})})}function U$(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n?.mode,...a}=e,s=o||"light",l=i?.[s],c={...i,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Gv(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=Gv({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},Bw(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Bw(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),Y$({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Mb=U$(),Rb="$$material";function lh(){const e=RP(Mb);return process.env.NODE_ENV!=="production"&&O.useDebugValue(e),e[Rb]||e}function XP(e){return h.jsx(IP,{...e,defaultTheme:Mb,themeId:Rb})}process.env.NODE_ENV!=="production"&&(XP.propTypes={styles:b.oneOfType([b.array,b.func,b.number,b.object,b.string,b.bool])});function QP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ko=e=>QP(e)&&e!=="classes",Ae=YL({themeId:Rb,defaultTheme:Mb,rootShouldForwardProp:ko});function K$(e){return function(n){return h.jsx(XP,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}const qn=s$;process.env.NODE_ENV!=="production"&&(b.node,b.object.isRequired);function dr(e){return i$(e)}function q$(e){return En("MuiSvgIcon",e)}Kn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const G$=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${wn(t)}`,`fontSize${wn(n)}`]};return Bn(i,q$,r)},X$=Ae("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${wn(n.color)}`],t[`fontSize${wn(n.fontSize)}`]]}})(qn(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),kf=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,m=O.isValidElement(i)&&i.type==="svg",g={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},v={};u||(v.viewBox=f);const x=G$(g);return h.jsxs(X$,{as:s,className:ce(x.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...v,...p,...m&&i.props,ownerState:g,children:[m?i.props.children:i,d?h.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(kf.propTypes={children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),b.string]),component:b.elementType,fontSize:b.oneOfType([b.oneOf(["inherit","large","medium","small"]),b.string]),htmlColor:b.string,inheritViewBox:b.bool,shapeRendering:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),titleAccess:b.string,viewBox:b.string});kf.muiName="SvgIcon";function _u(e,t){function n(r,i){return h.jsx(kf,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=kf.muiName,O.memo(O.forwardRef(n))}function ZP(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function Or(e){return e&&e.ownerDocument||document}function yo(e){return Or(e).defaultView||window}function Ww(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Qv(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:o}=O.useRef(t!==void 0),[a,s]=O.useState(n),l=o?t:a;if(process.env.NODE_ENV!=="production"){O.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${i} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
116
+ `))}v[_]={}}}};Object.keys(p.components).forEach(v=>{const x=p.components[v].styleOverrides;x&&v.startsWith("Mui")&&g(x,v)})}return p.unstable_sxConfig={...Jp,...u?.unstable_sxConfig},p.unstable_sx=function(g){return Qs({sx:g,theme:this})},p.toRuntimeSource=KP,I$(p),p}function Xv(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const F$=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Xv(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function qP(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function GP(e){return e==="dark"?F$:[]}function L$(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:i,...o}=e,a=jb({...t,colorSpace:i});return{palette:a,opacity:{...qP(a.mode),...n},overlays:r||GP(a.mode),...o}}function $$(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const B$=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],W$=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return B$(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function z$(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function X(e,t,n){!e[t]&&n&&(e[t]=n)}function vc(e){return typeof e!="string"||!e.startsWith("hsl")?e:WP(e)}function Ui(e,t){`${t}Channel`in e||(e[`${t}Channel`]=gc(vc(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
117
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function V$(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const di=e=>{try{return e()}catch{}},H$=(e="mui")=>l$(e);function Dm(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;const o=i==="dark"?"dark":"light";if(!r){t[i]=L$({...n,palette:{mode:o,...n?.palette},colorSpace:e});return}const{palette:a,...s}=Gv({...r,palette:{mode:o,...n?.palette},colorSpace:e});return t[i]={...n,palette:a,opacity:{...qP(o),...n?.opacity},overlays:n?.overlays||GP(o)},s}function Y$(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=$$,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),p=H$(o),{[f]:m,light:g,dark:v,...x}=n,_={...x};let w=m;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Mi(21,f));let y;a&&(y="oklch");const E=Dm(y,_,w,u,f);g&&!_.light&&Dm(y,_,g,void 0,"light"),v&&!_.dark&&Dm(y,_,v,void 0,"dark");let S={defaultColorScheme:f,...E,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:_,font:{...w$(E.typography),...E.font},spacing:V$(u.spacing)};Object.keys(S.colorSchemes).forEach(A=>{const C=S.colorSchemes[A].palette,j=M=>{const L=M.split("-"),B=L[1],V=L[2];return p(M,C[B][V])};C.mode==="light"&&(X(C.common,"background","#fff"),X(C.common,"onBackground","#000")),C.mode==="dark"&&(X(C.common,"background","#000"),X(C.common,"onBackground","#fff"));function N(M,L,B){if(y){let V;return M===ba&&(V=`transparent ${((1-B)*100).toFixed(0)}%`),M===Ge&&(V=`#000 ${(B*100).toFixed(0)}%`),M===Xe&&(V=`#fff ${(B*100).toFixed(0)}%`),`color-mix(in ${y}, ${L}, ${V})`}return M(L,B)}if(z$(C,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),C.mode==="light"){X(C.Alert,"errorColor",N(Ge,C.error.light,.6)),X(C.Alert,"infoColor",N(Ge,C.info.light,.6)),X(C.Alert,"successColor",N(Ge,C.success.light,.6)),X(C.Alert,"warningColor",N(Ge,C.warning.light,.6)),X(C.Alert,"errorFilledBg",j("palette-error-main")),X(C.Alert,"infoFilledBg",j("palette-info-main")),X(C.Alert,"successFilledBg",j("palette-success-main")),X(C.Alert,"warningFilledBg",j("palette-warning-main")),X(C.Alert,"errorFilledColor",di(()=>C.getContrastText(C.error.main))),X(C.Alert,"infoFilledColor",di(()=>C.getContrastText(C.info.main))),X(C.Alert,"successFilledColor",di(()=>C.getContrastText(C.success.main))),X(C.Alert,"warningFilledColor",di(()=>C.getContrastText(C.warning.main))),X(C.Alert,"errorStandardBg",N(Xe,C.error.light,.9)),X(C.Alert,"infoStandardBg",N(Xe,C.info.light,.9)),X(C.Alert,"successStandardBg",N(Xe,C.success.light,.9)),X(C.Alert,"warningStandardBg",N(Xe,C.warning.light,.9)),X(C.Alert,"errorIconColor",j("palette-error-main")),X(C.Alert,"infoIconColor",j("palette-info-main")),X(C.Alert,"successIconColor",j("palette-success-main")),X(C.Alert,"warningIconColor",j("palette-warning-main")),X(C.AppBar,"defaultBg",j("palette-grey-100")),X(C.Avatar,"defaultBg",j("palette-grey-400")),X(C.Button,"inheritContainedBg",j("palette-grey-300")),X(C.Button,"inheritContainedHoverBg",j("palette-grey-A100")),X(C.Chip,"defaultBorder",j("palette-grey-400")),X(C.Chip,"defaultAvatarColor",j("palette-grey-700")),X(C.Chip,"defaultIconColor",j("palette-grey-700")),X(C.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),X(C.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),X(C.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),X(C.LinearProgress,"primaryBg",N(Xe,C.primary.main,.62)),X(C.LinearProgress,"secondaryBg",N(Xe,C.secondary.main,.62)),X(C.LinearProgress,"errorBg",N(Xe,C.error.main,.62)),X(C.LinearProgress,"infoBg",N(Xe,C.info.main,.62)),X(C.LinearProgress,"successBg",N(Xe,C.success.main,.62)),X(C.LinearProgress,"warningBg",N(Xe,C.warning.main,.62)),X(C.Skeleton,"bg",y?N(ba,C.text.primary,.11):`rgba(${j("palette-text-primaryChannel")} / 0.11)`),X(C.Slider,"primaryTrack",N(Xe,C.primary.main,.62)),X(C.Slider,"secondaryTrack",N(Xe,C.secondary.main,.62)),X(C.Slider,"errorTrack",N(Xe,C.error.main,.62)),X(C.Slider,"infoTrack",N(Xe,C.info.main,.62)),X(C.Slider,"successTrack",N(Xe,C.success.main,.62)),X(C.Slider,"warningTrack",N(Xe,C.warning.main,.62));const M=y?N(Ge,C.background.default,.6825):sd(C.background.default,.8);X(C.SnackbarContent,"bg",M),X(C.SnackbarContent,"color",di(()=>y?qv.text.primary:C.getContrastText(M))),X(C.SpeedDialAction,"fabHoverBg",sd(C.background.paper,.15)),X(C.StepConnector,"border",j("palette-grey-400")),X(C.StepContent,"border",j("palette-grey-400")),X(C.Switch,"defaultColor",j("palette-common-white")),X(C.Switch,"defaultDisabledColor",j("palette-grey-100")),X(C.Switch,"primaryDisabledColor",N(Xe,C.primary.main,.62)),X(C.Switch,"secondaryDisabledColor",N(Xe,C.secondary.main,.62)),X(C.Switch,"errorDisabledColor",N(Xe,C.error.main,.62)),X(C.Switch,"infoDisabledColor",N(Xe,C.info.main,.62)),X(C.Switch,"successDisabledColor",N(Xe,C.success.main,.62)),X(C.Switch,"warningDisabledColor",N(Xe,C.warning.main,.62)),X(C.TableCell,"border",N(Xe,N(ba,C.divider,1),.88)),X(C.Tooltip,"bg",N(ba,C.grey[700],.92))}if(C.mode==="dark"){X(C.Alert,"errorColor",N(Xe,C.error.light,.6)),X(C.Alert,"infoColor",N(Xe,C.info.light,.6)),X(C.Alert,"successColor",N(Xe,C.success.light,.6)),X(C.Alert,"warningColor",N(Xe,C.warning.light,.6)),X(C.Alert,"errorFilledBg",j("palette-error-dark")),X(C.Alert,"infoFilledBg",j("palette-info-dark")),X(C.Alert,"successFilledBg",j("palette-success-dark")),X(C.Alert,"warningFilledBg",j("palette-warning-dark")),X(C.Alert,"errorFilledColor",di(()=>C.getContrastText(C.error.dark))),X(C.Alert,"infoFilledColor",di(()=>C.getContrastText(C.info.dark))),X(C.Alert,"successFilledColor",di(()=>C.getContrastText(C.success.dark))),X(C.Alert,"warningFilledColor",di(()=>C.getContrastText(C.warning.dark))),X(C.Alert,"errorStandardBg",N(Ge,C.error.light,.9)),X(C.Alert,"infoStandardBg",N(Ge,C.info.light,.9)),X(C.Alert,"successStandardBg",N(Ge,C.success.light,.9)),X(C.Alert,"warningStandardBg",N(Ge,C.warning.light,.9)),X(C.Alert,"errorIconColor",j("palette-error-main")),X(C.Alert,"infoIconColor",j("palette-info-main")),X(C.Alert,"successIconColor",j("palette-success-main")),X(C.Alert,"warningIconColor",j("palette-warning-main")),X(C.AppBar,"defaultBg",j("palette-grey-900")),X(C.AppBar,"darkBg",j("palette-background-paper")),X(C.AppBar,"darkColor",j("palette-text-primary")),X(C.Avatar,"defaultBg",j("palette-grey-600")),X(C.Button,"inheritContainedBg",j("palette-grey-800")),X(C.Button,"inheritContainedHoverBg",j("palette-grey-700")),X(C.Chip,"defaultBorder",j("palette-grey-700")),X(C.Chip,"defaultAvatarColor",j("palette-grey-300")),X(C.Chip,"defaultIconColor",j("palette-grey-300")),X(C.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),X(C.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),X(C.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),X(C.LinearProgress,"primaryBg",N(Ge,C.primary.main,.5)),X(C.LinearProgress,"secondaryBg",N(Ge,C.secondary.main,.5)),X(C.LinearProgress,"errorBg",N(Ge,C.error.main,.5)),X(C.LinearProgress,"infoBg",N(Ge,C.info.main,.5)),X(C.LinearProgress,"successBg",N(Ge,C.success.main,.5)),X(C.LinearProgress,"warningBg",N(Ge,C.warning.main,.5)),X(C.Skeleton,"bg",y?N(ba,C.text.primary,.13):`rgba(${j("palette-text-primaryChannel")} / 0.13)`),X(C.Slider,"primaryTrack",N(Ge,C.primary.main,.5)),X(C.Slider,"secondaryTrack",N(Ge,C.secondary.main,.5)),X(C.Slider,"errorTrack",N(Ge,C.error.main,.5)),X(C.Slider,"infoTrack",N(Ge,C.info.main,.5)),X(C.Slider,"successTrack",N(Ge,C.success.main,.5)),X(C.Slider,"warningTrack",N(Ge,C.warning.main,.5));const M=y?N(Xe,C.background.default,.985):sd(C.background.default,.98);X(C.SnackbarContent,"bg",M),X(C.SnackbarContent,"color",di(()=>y?YP.text.primary:C.getContrastText(M))),X(C.SpeedDialAction,"fabHoverBg",sd(C.background.paper,.15)),X(C.StepConnector,"border",j("palette-grey-600")),X(C.StepContent,"border",j("palette-grey-600")),X(C.Switch,"defaultColor",j("palette-grey-300")),X(C.Switch,"defaultDisabledColor",j("palette-grey-600")),X(C.Switch,"primaryDisabledColor",N(Ge,C.primary.main,.55)),X(C.Switch,"secondaryDisabledColor",N(Ge,C.secondary.main,.55)),X(C.Switch,"errorDisabledColor",N(Ge,C.error.main,.55)),X(C.Switch,"infoDisabledColor",N(Ge,C.info.main,.55)),X(C.Switch,"successDisabledColor",N(Ge,C.success.main,.55)),X(C.Switch,"warningDisabledColor",N(Ge,C.warning.main,.55)),X(C.TableCell,"border",N(Ge,N(ba,C.divider,1),.68)),X(C.Tooltip,"bg",N(ba,C.grey[700],.92))}Ui(C.background,"default"),Ui(C.background,"paper"),Ui(C.common,"background"),Ui(C.common,"onBackground"),Ui(C,"divider"),Object.keys(C).forEach(M=>{const L=C[M];M!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&X(C[M],"mainChannel",gc(vc(L.main))),L.light&&X(C[M],"lightChannel",gc(vc(L.light))),L.dark&&X(C[M],"darkChannel",gc(vc(L.dark))),L.contrastText&&X(C[M],"contrastTextChannel",gc(vc(L.contrastText))),M==="text"&&(Ui(C[M],"primary"),Ui(C[M],"secondary")),M==="action"&&(L.active&&Ui(C[M],"active"),L.selected&&Ui(C[M],"selected")))})}),S=t.reduce((A,C)=>Rn(A,C),S);const P={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:W$(S),enableContrastVars:a},{vars:D,generateThemeVars:T,generateStyleSheets:R}=d$(S,P);return S.vars=D,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([A,C])=>{S[A]=C}),S.generateThemeVars=T,S.generateStyleSheets=R,S.generateSpacing=function(){return MP(u.spacing,wb(this))},S.getColorSchemeSelector=f$(l),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Jp,...u?.unstable_sxConfig},S.unstable_sx=function(C){return Qs({sx:C,theme:this})},S.toRuntimeSource=KP,S}function Bw(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:jb({...n===!0?{}:n.palette,mode:t})})}function U$(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n?.mode,...a}=e,s=o||"light",l=i?.[s],c={...i,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Gv(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=Gv({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},Bw(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Bw(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),Y$({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Mb=U$(),Rb="$$material";function lh(){const e=RP(Mb);return process.env.NODE_ENV!=="production"&&O.useDebugValue(e),e[Rb]||e}function XP(e){return h.jsx(IP,{...e,defaultTheme:Mb,themeId:Rb})}process.env.NODE_ENV!=="production"&&(XP.propTypes={styles:b.oneOfType([b.array,b.func,b.number,b.object,b.string,b.bool])});function QP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ko=e=>QP(e)&&e!=="classes",Ae=YL({themeId:Rb,defaultTheme:Mb,rootShouldForwardProp:ko});function K$(e){return function(n){return h.jsx(XP,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}const qn=s$;process.env.NODE_ENV!=="production"&&(b.node,b.object.isRequired);function dr(e){return i$(e)}function q$(e){return En("MuiSvgIcon",e)}Kn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const G$=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${wn(t)}`,`fontSize${wn(n)}`]};return Bn(i,q$,r)},X$=Ae("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${wn(n.color)}`],t[`fontSize${wn(n.fontSize)}`]]}})(qn(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),kf=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,m=O.isValidElement(i)&&i.type==="svg",g={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},v={};u||(v.viewBox=f);const x=G$(g);return h.jsxs(X$,{as:s,className:ce(x.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...v,...p,...m&&i.props,ownerState:g,children:[m?i.props.children:i,d?h.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(kf.propTypes={children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),b.string]),component:b.elementType,fontSize:b.oneOfType([b.oneOf(["inherit","large","medium","small"]),b.string]),htmlColor:b.string,inheritViewBox:b.bool,shapeRendering:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),titleAccess:b.string,viewBox:b.string});kf.muiName="SvgIcon";function _u(e,t){function n(r,i){return h.jsx(kf,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=kf.muiName,O.memo(O.forwardRef(n))}function ZP(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function Or(e){return e&&e.ownerDocument||document}function yo(e){return Or(e).defaultView||window}function Ww(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Qv(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:o}=O.useRef(t!==void 0),[a,s]=O.useState(n),l=o?t:a;if(process.env.NODE_ENV!=="production"){O.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${i} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
118
118
  `))},[i,r,t]);const{current:u}=O.useRef(n);O.useEffect(()=>{!o&&JSON.stringify(n)!==JSON.stringify(u)&&console.error([`MUI: A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
119
119
  `))},[JSON.stringify(n)])}const c=O.useCallback(u=>{o||s(u)},[]);return[l,c]}function Vc(e){const t=O.useRef(e);return vo(()=>{t.current=e}),O.useRef((...n)=>(0,t.current)(...n)).current}function Un(...e){const t=O.useRef(void 0),n=O.useCallback(r=>{const i=e.map(o=>{if(o==null)return null;if(typeof o=="function"){const a=o,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return o.current=r,()=>{o.current=null}});return()=>{i.forEach(o=>o?.())}},e);return O.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function Q$(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function Z$(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(c=>{Q$(c,s[c])&&typeof a[c]=="function"&&(l[c]=(...u)=>{a[c](...u),s[c](...u)})}),l}if(typeof e=="function"||typeof t=="function")return a=>{const s=typeof t=="function"?t(a):t,l=typeof e=="function"?e({...a,...s}):e,c=ce(a?.className,s?.className,l?.className),u=n(l,s);return{...s,...l,...u,...!!c&&{className:c},...s?.style&&l?.style&&{style:{...s.style,...l.style}},...s?.sx&&l?.sx&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,i=n(e,r),o=ce(r?.className,e?.className);return{...t,...e,...i,...!!o&&{className:o},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const J$=_u(h.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V10h16zm0-13H4V5h16z"}),"CalendarTodayOutlined"),ch=_u(h.jsx("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"}),"DescriptionOutlined"),e5=_u(h.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),t5=_u(h.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),JP=6048e5,n5=864e5,uh=6e4,dh=36e5,r5=1e3,zw=Symbol.for("constructDateFrom");function et(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&zw in e?e[zw](t):e instanceof Date?new e.constructor(t):new Date(t)}function ge(e,t){return et(t||e,e)}function ii(e,t,n){const r=ge(e,n?.in);return isNaN(t)?et(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ai(e,t,n){const r=ge(e,n?.in);if(isNaN(t))return et(e,NaN);if(!t)return r;const i=r.getDate(),o=et(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function eD(e,t,n){return et(e,+ge(e)+t)}function i5(e,t,n){return eD(e,t*dh)}let o5={};function hs(){return o5}function bo(e,t){const n=hs(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ge(e,t?.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Js(e,t){return bo(e,{...t,weekStartsOn:1})}function tD(e,t){const n=ge(e,t?.in),r=n.getFullYear(),i=et(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Js(i),a=et(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Js(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Pf(e){const t=ge(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Po(e,...t){const n=et.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ns(e,t){const n=ge(e,t?.in);return n.setHours(0,0,0,0),n}function el(e,t,n){const[r,i]=Po(n?.in,e,t),o=ns(r),a=ns(i),s=+o-Pf(o),l=+a-Pf(a);return Math.round((s-l)/n5)}function a5(e,t){const n=tD(e,t),r=et(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Js(r)}function Hc(e,t,n){const r=ge(e,n?.in);return r.setTime(r.getTime()+t*uh),r}function Ib(e,t,n){return ai(e,t*3,n)}function s5(e,t,n){return eD(e,t*1e3)}function Df(e,t,n){return ii(e,t*7,n)}function oi(e,t,n){return ai(e,t*12,n)}function Vw(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=et.bind(null,i));const o=ge(i,r);(!n||n<o||isNaN(+o))&&(n=o)}),et(r,n||NaN)}function Hw(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=et.bind(null,i));const o=ge(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),et(r,n||NaN)}function l5(e,t,n){const[r,i]=Po(n?.in,e,t);return+ns(r)==+ns(i)}function Di(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function tl(e){return!(!Di(e)&&typeof e!="number"||isNaN(+ge(e)))}function Af(e,t,n){const[r,i]=Po(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Vo(e,t){const n=ge(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function Tf(e,t,n){const[r,i]=Po(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=Vo(r)-Vo(i);return o*4+a}function Nf(e,t,n){const[r,i]=Po(n?.in,e,t);return r.getFullYear()-i.getFullYear()}function c5(e,t,n){const[r,i]=Po(n?.in,e,t),o=Yw(r,i),a=Math.abs(el(r,i));r.setDate(r.getDate()-o*a);const s=+(Yw(r,i)===-o),l=o*(a-s);return l===0?0:l}function Yw(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function nD(e,t){const n=ge(e,t?.in);return n.setHours(23,59,59,999),n}function rD(e,t){const n=ge(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Zv(e,t){const n=ge(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function iD(e,t){const n=ge(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function oD(e,t){const n=ge(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function fh(e,t){const n=ge(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function u5(e,t){const n=hs(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ge(e,t?.in),o=i.getDay(),a=(o<r?-7:0)+6-(o-r);return i.setDate(i.getDate()+a),i.setHours(23,59,59,999),i}const d5={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},f5=(e,t,n)=>{let r;const i=d5[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Am(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const p5={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},h5={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},m5={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},g5={date:Am({formats:p5,defaultWidth:"full"}),time:Am({formats:h5,defaultWidth:"full"}),dateTime:Am({formats:m5,defaultWidth:"full"})},v5={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},y5=(e,t,n,r)=>v5[e];function Kl(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const b5={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},x5={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},w5={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_5={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},E5={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},S5={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},O5=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},C5={ordinalNumber:O5,era:Kl({values:b5,defaultWidth:"wide"}),quarter:Kl({values:x5,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Kl({values:w5,defaultWidth:"wide"}),day:Kl({values:_5,defaultWidth:"wide"}),dayPeriod:Kl({values:E5,defaultWidth:"wide",formattingValues:S5,defaultFormattingWidth:"wide"})};function ql(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?P5(s,d=>d.test(a)):k5(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function k5(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function P5(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function D5(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const A5=/^(\d+)(th|st|nd|rd)?/i,T5=/\d+/i,N5={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},j5={any:[/^b/i,/^(a|c)/i]},M5={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},R5={any:[/1/i,/2/i,/3/i,/4/i]},I5={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},F5={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},L5={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$5={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},B5={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},W5={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},z5={ordinalNumber:D5({matchPattern:A5,parsePattern:T5,valueCallback:e=>parseInt(e,10)}),era:ql({matchPatterns:N5,defaultMatchWidth:"wide",parsePatterns:j5,defaultParseWidth:"any"}),quarter:ql({matchPatterns:M5,defaultMatchWidth:"wide",parsePatterns:R5,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ql({matchPatterns:I5,defaultMatchWidth:"wide",parsePatterns:F5,defaultParseWidth:"any"}),day:ql({matchPatterns:L5,defaultMatchWidth:"wide",parsePatterns:$5,defaultParseWidth:"any"}),dayPeriod:ql({matchPatterns:B5,defaultMatchWidth:"any",parsePatterns:W5,defaultParseWidth:"any"})},aD={code:"en-US",formatDistance:f5,formatLong:g5,formatRelative:y5,localize:C5,match:z5,options:{weekStartsOn:0,firstWeekContainsDate:1}};function V5(e,t){const n=ge(e,t?.in);return el(n,fh(n))+1}function Fb(e,t){const n=ge(e,t?.in),r=+Js(n)-+a5(n);return Math.round(r/JP)+1}function Lb(e,t){const n=ge(e,t?.in),r=n.getFullYear(),i=hs(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=et(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=bo(a,t),l=et(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=bo(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function H5(e,t){const n=hs(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Lb(e,t),o=et(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),bo(o,t)}function sD(e,t){const n=ge(e,t?.in),r=+bo(n,t)-+H5(n,t);return Math.round(r/JP)+1}function Qe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Lo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Qe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Qe(n+1,2)},d(e,t){return Qe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Qe(e.getHours()%12||12,t.length)},H(e,t){return Qe(e.getHours(),t.length)},m(e,t){return Qe(e.getMinutes(),t.length)},s(e,t){return Qe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Qe(i,t.length)}},ks={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Uw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Lo.y(e,t)},Y:function(e,t,n,r){const i=Lb(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Qe(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Qe(o,t.length)},R:function(e,t){const n=tD(e);return Qe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Qe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Qe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Qe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Lo.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Qe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=sD(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Qe(i,t.length)},I:function(e,t,n){const r=Fb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Qe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Lo.d(e,t)},D:function(e,t,n){const r=V5(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Qe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Qe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Qe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Qe(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=ks.noon:r===0?i=ks.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=ks.evening:r>=12?i=ks.afternoon:r>=4?i=ks.morning:i=ks.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Lo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Lo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Lo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Lo.s(e,t)},S:function(e,t){return Lo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return qw(r);case"XXXX":case"XX":return ka(r);case"XXXXX":case"XXX":default:return ka(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return qw(r);case"xxxx":case"xx":return ka(r);case"xxxxx":case"xxx":default:return ka(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Kw(r,":");case"OOOO":default:return"GMT"+ka(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Kw(r,":");case"zzzz":default:return"GMT"+ka(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Qe(r,t.length)},T:function(e,t,n){return Qe(+e,t.length)}};function Kw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Qe(o,2)}function qw(e,t){return e%60===0?(e>0?"-":"+")+Qe(Math.abs(e)/60,2):ka(e,t)}function ka(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Qe(Math.trunc(r/60),2),o=Qe(r%60,2);return n+i+t+o}const Gw=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},lD=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Y5=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Gw(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Gw(r,t)).replace("{{time}}",lD(i,t))},Jv={p:lD,P:Y5},U5=/^D+$/,K5=/^Y+$/,q5=["D","DD","YY","YYYY"];function G5(e){return U5.test(e)}function X5(e){return K5.test(e)}function Q5(e,t,n){const r=Z5(e,t,n);if(console.warn(r),q5.includes(e))throw new RangeError(r)}function Z5(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const J5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tB=/^'([^]*?)'?$/,nB=/''/g,rB=/[a-zA-Z]/;function Xw(e,t,n){const r=hs(),i=n?.locale??r.locale??aD,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=ge(e,n?.in);if(!tl(s))throw new RangeError("Invalid time value");let l=t.match(eB).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Jv[d];return f(u,i.formatLong)}return u}).join("").match(J5).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:iB(u)};if(Uw[d])return{isToken:!0,value:u};if(d.match(rB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&X5(d)||!n?.useAdditionalDayOfYearTokens&&G5(d))&&Q5(d,t,String(e));const f=Uw[d[0]];return f(s,d,i.localize,c)}).join("")}function iB(e){const t=e.match(tB);return t?t[1].replace(nB,"'"):e}function Qw(e,t){return ge(e,t?.in).getDate()}function oB(e,t){return ge(e,t?.in).getDay()}function aB(e,t){const n=ge(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=et(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function sB(){return Object.assign({},hs())}function An(e,t){return ge(e,t?.in).getHours()}function lB(e,t){const n=ge(e,t?.in).getDay();return n===0?7:n}function Tn(e,t){return ge(e,t?.in).getMinutes()}function nr(e,t){return ge(e,t?.in).getMonth()}function Go(e){return ge(e).getSeconds()}function ey(e){return+ge(e)}function Ce(e,t){return ge(e,t?.in).getFullYear()}function uo(e,t){return+ge(e)>+ge(t)}function Oi(e,t){return+ge(e)<+ge(t)}function cB(e,t){return+ge(e)==+ge(t)}function uB(e,t){const n=dB(t)?new t(0):et(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function dB(e){return typeof e=="function"&&e.prototype?.constructor===e}const fB=10;class cD{subPriority=0;validate(t,n){return!0}}class pB extends cD{constructor(t,n,r,i,o){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=i,o&&(this.subPriority=o)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class hB extends cD{priority=fB;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>et(n,r))}set(t,n){return n.timestampIsSet?t:et(t,uB(t,this.context))}}class We{run(t,n,r,i){const o=this.parse(t,n,r,i);return o?{setter:new pB(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,n,r){return!0}}class mB extends We{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},_i={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function $t(e,t){return e&&{value:t(e.value),rest:e.rest}}function Dt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Ei(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(i*dh+o*uh+a*r5),rest:t.slice(n[0].length)}}function uD(e){return Dt(Lt.anyDigitsSigned,e)}function Rt(e,t){switch(e){case 1:return Dt(Lt.singleDigit,t);case 2:return Dt(Lt.twoDigits,t);case 3:return Dt(Lt.threeDigits,t);case 4:return Dt(Lt.fourDigits,t);default:return Dt(new RegExp("^\\d{1,"+e+"}"),t)}}function jf(e,t){switch(e){case 1:return Dt(Lt.singleDigitSigned,t);case 2:return Dt(Lt.twoDigitsSigned,t);case 3:return Dt(Lt.threeDigitsSigned,t);case 4:return Dt(Lt.fourDigitsSigned,t);default:return Dt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function $b(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function dD(e,t){const n=t>0,r=n?t:1-t;let i;if(r<=50)i=e||100;else{const o=r+50,a=Math.trunc(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return n?i:1-i}function fD(e){return e%400===0||e%4===0&&e%100!==0}class gB extends We{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const i=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return $t(Rt(4,t),i);case"yo":return $t(r.ordinalNumber(t,{unit:"year"}),i);default:return $t(Rt(n.length,t),i)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const i=t.getFullYear();if(r.isTwoDigitYear){const a=dD(r.year,i);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const o=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class vB extends We{priority=130;parse(t,n,r){const i=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return $t(Rt(4,t),i);case"Yo":return $t(r.ordinalNumber(t,{unit:"year"}),i);default:return $t(Rt(n.length,t),i)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,i){const o=Lb(t,i);if(r.isTwoDigitYear){const s=dD(r.year,o);return t.setFullYear(s,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),bo(t,i)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),bo(t,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class yB extends We{priority=130;parse(t,n){return jf(n==="R"?4:n.length,t)}set(t,n,r){const i=et(t,0);return i.setFullYear(r,0,4),i.setHours(0,0,0,0),Js(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class bB extends We{priority=130;parse(t,n){return jf(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class xB extends We{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Rt(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class wB extends We{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Rt(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class _B extends We{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const i=o=>o-1;switch(n){case"M":return $t(Dt(Lt.month,t),i);case"MM":return $t(Rt(2,t),i);case"Mo":return $t(r.ordinalNumber(t,{unit:"month"}),i);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class EB extends We{priority=110;parse(t,n,r){const i=o=>o-1;switch(n){case"L":return $t(Dt(Lt.month,t),i);case"LL":return $t(Rt(2,t),i);case"Lo":return $t(r.ordinalNumber(t,{unit:"month"}),i);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function SB(e,t,n){const r=ge(e,n?.in),i=sD(r,n)-t;return r.setDate(r.getDate()-i*7),ge(r,n?.in)}class OB extends We{priority=100;parse(t,n,r){switch(n){case"w":return Dt(Lt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Rt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,i){return bo(SB(t,r,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function CB(e,t,n){const r=ge(e,n?.in),i=Fb(r,n)-t;return r.setDate(r.getDate()-i*7),r}class kB extends We{priority=100;parse(t,n,r){switch(n){case"I":return Dt(Lt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Rt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Js(CB(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const PB=[31,28,31,30,31,30,31,31,30,31,30,31],DB=[31,29,31,30,31,30,31,31,30,31,30,31];class AB extends We{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return Dt(Lt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Rt(n.length,t)}}validate(t,n){const r=t.getFullYear(),i=fD(r),o=t.getMonth();return i?n>=1&&n<=DB[o]:n>=1&&n<=PB[o]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class TB extends We{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return Dt(Lt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Rt(n.length,t)}}validate(t,n){const r=t.getFullYear();return fD(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Bb(e,t,n){const r=hs(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=ge(e,n?.in),a=o.getDay(),l=(t%7+7)%7,c=7-i,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return ii(o,u,n)}class NB extends We{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,i){return t=Bb(t,r,i),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class jB extends We{priority=90;parse(t,n,r,i){const o=a=>{const s=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return $t(Rt(n.length,t),o);case"eo":return $t(r.ordinalNumber(t,{unit:"day"}),o);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,i){return t=Bb(t,r,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class MB extends We{priority=90;parse(t,n,r,i){const o=a=>{const s=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return $t(Rt(n.length,t),o);case"co":return $t(r.ordinalNumber(t,{unit:"day"}),o);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,i){return t=Bb(t,r,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function RB(e,t,n){const r=ge(e,n?.in),i=lB(r,n),o=t-i;return ii(r,o,n)}class IB extends We{priority=90;parse(t,n,r){const i=o=>o===0?7:o;switch(n){case"i":case"ii":return Rt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return $t(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return $t(r.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return $t(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return $t(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),i)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=RB(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class FB extends We{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours($b(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class LB extends We{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours($b(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class $B extends We{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours($b(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class BB extends We{priority=70;parse(t,n,r){switch(n){case"h":return Dt(Lt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Rt(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const i=t.getHours()>=12;return i&&r<12?t.setHours(r+12,0,0,0):!i&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class WB extends We{priority=70;parse(t,n,r){switch(n){case"H":return Dt(Lt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Rt(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class zB extends We{priority=70;parse(t,n,r){switch(n){case"K":return Dt(Lt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Rt(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class VB extends We{priority=70;parse(t,n,r){switch(n){case"k":return Dt(Lt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Rt(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const i=r<=24?r%24:r;return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class HB extends We{priority=60;parse(t,n,r){switch(n){case"m":return Dt(Lt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Rt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class YB extends We{priority=50;parse(t,n,r){switch(n){case"s":return Dt(Lt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Rt(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class UB extends We{priority=30;parse(t,n){const r=i=>Math.trunc(i*Math.pow(10,-n.length+3));return $t(Rt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class KB extends We{priority=10;parse(t,n){switch(n){case"X":return Ei(_i.basicOptionalMinutes,t);case"XX":return Ei(_i.basic,t);case"XXXX":return Ei(_i.basicOptionalSeconds,t);case"XXXXX":return Ei(_i.extendedOptionalSeconds,t);case"XXX":default:return Ei(_i.extended,t)}}set(t,n,r){return n.timestampIsSet?t:et(t,t.getTime()-Pf(t)-r)}incompatibleTokens=["t","T","x"]}class qB extends We{priority=10;parse(t,n){switch(n){case"x":return Ei(_i.basicOptionalMinutes,t);case"xx":return Ei(_i.basic,t);case"xxxx":return Ei(_i.basicOptionalSeconds,t);case"xxxxx":return Ei(_i.extendedOptionalSeconds,t);case"xxx":default:return Ei(_i.extended,t)}}set(t,n,r){return n.timestampIsSet?t:et(t,t.getTime()-Pf(t)-r)}incompatibleTokens=["t","T","X"]}class GB extends We{priority=40;parse(t){return uD(t)}set(t,n,r){return[et(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class XB extends We{priority=20;parse(t){return uD(t)}set(t,n,r){return[et(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const QB={G:new mB,y:new gB,Y:new vB,R:new yB,u:new bB,Q:new xB,q:new wB,M:new _B,L:new EB,w:new OB,I:new kB,d:new AB,D:new TB,E:new NB,e:new jB,c:new MB,i:new IB,a:new FB,b:new LB,B:new $B,h:new BB,H:new WB,K:new zB,k:new VB,m:new HB,s:new YB,S:new UB,X:new KB,x:new qB,t:new GB,T:new XB},ZB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e6=/^'([^]*?)'?$/,t6=/''/g,n6=/\S/,r6=/[a-zA-Z]/;function i6(e,t,n,r){const i=()=>et(r?.in||n,NaN),o=sB(),a=r?.locale??o.locale??aD,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!t)return e?i():ge(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new hB(r?.in,n)],d=t.match(JB).map(v=>{const x=v[0];if(x in Jv){const _=Jv[x];return _(v,a.formatLong)}return v}).join("").match(ZB),f=[];for(let v of d){const x=v[0],_=QB[x];if(_){const{incompatibleTokens:w}=_;if(Array.isArray(w)){const E=f.find(S=>w.includes(S.token)||S.token===x);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${v}\` at the same time`)}else if(_.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${v}\` and any other token at the same time`);f.push({token:x,fullToken:v});const y=_.run(e,v,a.match,c);if(!y)return i();u.push(y.setter),e=y.rest}else{if(x.match(r6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(v==="''"?v="'":x==="'"&&(v=o6(v)),e.indexOf(v)===0)e=e.slice(v.length);else return i()}}if(e.length>0&&n6.test(e))return i();const p=u.map(v=>v.priority).sort((v,x)=>x-v).filter((v,x,_)=>_.indexOf(v)===x).map(v=>u.filter(x=>x.priority===v).sort((x,_)=>_.subPriority-x.subPriority)).map(v=>v[0]);let m=ge(n,r?.in);if(isNaN(+m))return i();const g={};for(const v of p){if(!v.validate(m,c))return i();const x=v.set(m,g,c);Array.isArray(x)?(m=x[0],Object.assign(g,x[1])):m=x}return m}function o6(e){return e.match(e6)[1].replace(t6,"'")}function a6(e,t,n){const[r,i]=Po(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function s6(e,t,n){const[r,i]=Po(n?.in,e,t);return+Zv(r)==+Zv(i)}function l6(e,t,n){const[r,i]=Po(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function Yc(e,t,n){const r=+ge(e,n?.in),[i,o]=[+ge(t.start,n?.in),+ge(t.end,n?.in)].sort((a,s)=>a-s);return r>=i&&r<=o}function c6(e,t,n){return ii(e,-1,n)}function u6(e,t){const n=()=>et(t?.in,NaN),i=h6(e);let o;if(i.date){const c=m6(i.date,2);o=g6(c.restDateString,c.year)}if(!o||isNaN(+o))return n();const a=+o;let s=0,l;if(i.time&&(s=v6(i.time),isNaN(s)))return n();if(i.timezone){if(l=y6(i.timezone),isNaN(l))return n()}else{const c=new Date(a+s),u=ge(0,t?.in);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return ge(a+s+l,t?.in)}const ld={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},d6=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,f6=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,p6=/^([+-])(\d{2})(?::?(\d{2}))?$/;function h6(e){const t={},n=e.split(ld.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ld.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ld.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=ld.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function m6(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function g6(e,t){if(t===null)return new Date(NaN);const n=e.match(d6);if(!n)return new Date(NaN);const r=!!n[4],i=Gl(n[1]),o=Gl(n[2])-1,a=Gl(n[3]),s=Gl(n[4]),l=Gl(n[5])-1;if(r)return E6(t,s,l)?b6(t,s,l):new Date(NaN);{const c=new Date(0);return!w6(t,o,a)||!_6(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}}function Gl(e){return e?parseInt(e):1}function v6(e){const t=e.match(f6);if(!t)return NaN;const n=Tm(t[1]),r=Tm(t[2]),i=Tm(t[3]);return S6(n,r,i)?n*dh+r*uh+i*1e3:NaN}function Tm(e){return e&&parseFloat(e.replace(",","."))||0}function y6(e){if(e==="Z")return 0;const t=e.match(p6);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return O6(r,i)?n*(r*dh+i*uh):NaN}function b6(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const x6=[31,null,31,30,31,30,31,31,30,31,30,31];function pD(e){return e%400===0||e%4===0&&e%100!==0}function w6(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(x6[t]||(pD(e)?29:28))}function _6(e,t){return t>=1&&t<=(pD(e)?366:365)}function E6(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function S6(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function O6(e,t){return t>=0&&t<=59}function gr(e,t,n){const r=ge(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=et(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=aB(a);return r.setMonth(t,Math.min(o,s)),r}function pf(e,t,n){const r=ge(e,n?.in);return r.setHours(t),r}function hf(e,t,n){const r=ge(e,n?.in);return r.setMinutes(t),r}function Fs(e,t,n){const r=ge(e,n?.in),i=Math.trunc(r.getMonth()/3)+1,o=t-i;return gr(r,r.getMonth()+o*3)}function mf(e,t,n){const r=ge(e,n?.in);return r.setSeconds(t),r}function gi(e,t,n){const r=ge(e,n?.in);return isNaN(+r)?et(e,NaN):(r.setFullYear(t),r)}function Ka(e,t,n){return ai(e,-t,n)}function hD(e,t,n){return Ib(e,-1,n)}function Zw(e,t,n){return Df(e,-1,n)}function na(e,t,n){return oi(e,-t,n)}function ph(){return typeof window<"u"}function El(e){return mD(e)?(e.nodeName||"").toLowerCase():"#document"}function Sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bi(e){var t;return(t=(mD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mD(e){return ph()?e instanceof Node||e instanceof Sr(e).Node:!1}function jn(e){return ph()?e instanceof Element||e instanceof Sr(e).Element:!1}function Ri(e){return ph()?e instanceof HTMLElement||e instanceof Sr(e).HTMLElement:!1}function Jw(e){return!ph()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sr(e).ShadowRoot}const C6=new Set(["inline","contents"]);function Eu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!C6.has(i)}const k6=new Set(["table","td","th"]);function P6(e){return k6.has(El(e))}const D6=[":popover-open",":modal"];function hh(e){return D6.some(t=>{try{return e.matches(t)}catch{return!1}})}const A6=["transform","translate","scale","rotate","perspective"],T6=["transform","translate","scale","rotate","perspective","filter"],N6=["paint","layout","strict","content"];function Wb(e){const t=zb(),n=jn(e)?Wr(e):e;return A6.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||T6.some(r=>(n.willChange||"").includes(r))||N6.some(r=>(n.contain||"").includes(r))}function j6(e){let t=ra(e);for(;Ri(t)&&!nl(t);){if(Wb(t))return t;if(hh(t))return null;t=ra(t)}return null}function zb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const M6=new Set(["html","body","#document"]);function nl(e){return M6.has(El(e))}function Wr(e){return Sr(e).getComputedStyle(e)}function mh(e){return jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ra(e){if(El(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jw(e)&&e.host||Bi(e);return Jw(t)?t.host:t}function gD(e){const t=ra(e);return nl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ri(t)&&Eu(t)?t:gD(t)}function Uc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=gD(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Sr(i);if(o){const s=ty(a);return t.concat(a,a.visualViewport||[],Eu(i)?i:[],s&&n?Uc(s):[])}return t.concat(i,Uc(i,[],n))}function ty(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const rl=Math.min,qa=Math.max,Mf=Math.round,cd=Math.floor,Ai=e=>({x:e,y:e}),R6={left:"right",right:"left",bottom:"top",top:"bottom"},I6={start:"end",end:"start"};function F6(e,t,n){return qa(e,rl(t,n))}function gh(e,t){return typeof e=="function"?e(t):e}function il(e){return e.split("-")[0]}function Su(e){return e.split("-")[1]}function L6(e){return e==="x"?"y":"x"}function Vb(e){return e==="y"?"height":"width"}const $6=new Set(["top","bottom"]);function $a(e){return $6.has(il(e))?"y":"x"}function Hb(e){return L6($a(e))}function B6(e,t,n){n===void 0&&(n=!1);const r=Su(e),i=Hb(e),o=Vb(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Rf(a)),[a,Rf(a)]}function W6(e){const t=Rf(e);return[ny(e),t,ny(t)]}function ny(e){return e.replace(/start|end/g,t=>I6[t])}const e_=["left","right"],t_=["right","left"],z6=["top","bottom"],V6=["bottom","top"];function H6(e,t,n){switch(e){case"top":case"bottom":return n?t?t_:e_:t?e_:t_;case"left":case"right":return t?z6:V6;default:return[]}}function Y6(e,t,n,r){const i=Su(e);let o=H6(il(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(ny)))),o}function Rf(e){return e.replace(/left|right|bottom|top/g,t=>R6[t])}function U6(e){return{top:0,right:0,bottom:0,left:0,...e}}function vD(e){return typeof e!="number"?U6(e):{top:e,right:e,bottom:e,left:e}}function If(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var K6=typeof document<"u",q6=function(){},Ff=K6?k.useLayoutEffect:q6;const G6={...O},X6=G6.useInsertionEffect,Q6=X6||(e=>e());function Z6(e){const t=O.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Q6(()=>{t.current=e}),O.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function n_(e,t,n){let{reference:r,floating:i}=e;const o=$a(t),a=Hb(t),s=Vb(a),l=il(t),c=o==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Su(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const J6=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=n_(c,r,l),f=r,p={},m=0;for(let g=0;g<s.length;g++){const{name:v,fn:x}=s[g],{x:_,y:w,data:y,reset:E}=await x({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=_??u,d=w??d,p={...p,[v]:{...p[v],...y}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:u,y:d}=n_(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function e3(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=gh(t,e),m=vD(p),v=s[f?d==="floating"?"reference":"floating":d],x=If(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),_=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),y=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},E=If(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:w,strategy:l}):_);return{top:(x.top-E.top+m.top)/y.y,bottom:(E.bottom-x.bottom+m.bottom)/y.y,left:(x.left-E.left+m.left)/y.x,right:(E.right-x.right+m.right)/y.x}}const t3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=gh(e,t)||{};if(c==null)return{};const d=vD(u),f={x:n,y:r},p=Hb(i),m=Vb(p),g=await a.getDimensions(c),v=p==="y",x=v?"top":"left",_=v?"bottom":"right",w=v?"clientHeight":"clientWidth",y=o.reference[m]+o.reference[p]-f[p]-o.floating[m],E=f[p]-o.reference[p],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let P=S?S[w]:0;(!P||!await(a.isElement==null?void 0:a.isElement(S)))&&(P=s.floating[w]||o.floating[m]);const D=y/2-E/2,T=P/2-g[m]/2-1,R=rl(d[x],T),A=rl(d[_],T),C=R,j=P-g[m]-A,N=P/2-g[m]/2+D,M=F6(C,N,j),L=!l.arrow&&Su(i)!=null&&N!==M&&o.reference[m]/2-(N<C?R:A)-g[m]/2<0,B=L?N<C?N-C:N-j:0;return{[p]:f[p]+B,data:{[p]:M,centerOffset:N-M-B,...L&&{alignmentOffset:B}},reset:L}}}),n3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...v}=gh(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=il(i),_=$a(s),w=il(s)===s,y=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(w||!g?[Rf(s)]:W6(s)),S=m!=="none";!f&&S&&E.push(...Y6(s,g,m,y));const P=[s,...E],D=await e3(t,v),T=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&T.push(D[x]),d){const N=B6(i,a,y);T.push(D[N[0]],D[N[1]])}if(R=[...R,{placement:i,overflows:T}],!T.every(N=>N<=0)){var A,C;const N=(((A=o.flip)==null?void 0:A.index)||0)+1,M=P[N];if(M&&(!(d==="alignment"?_!==$a(M):!1)||R.every(V=>$a(V.placement)===_?V.overflows[0]>0:!0)))return{data:{index:N,overflows:R},reset:{placement:M}};let L=(C=R.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:C.placement;if(!L)switch(p){case"bestFit":{var j;const B=(j=R.filter(V=>{if(S){const z=$a(V.placement);return z===_||z==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(z=>z>0).reduce((z,W)=>z+W,0)]).sort((V,z)=>V[1]-z[1])[0])==null?void 0:j[0];B&&(L=B);break}case"initialPlacement":L=s;break}if(i!==L)return{reset:{placement:L}}}return{}}}},r3=new Set(["left","top"]);async function i3(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=il(n),s=Su(n),l=$a(n)==="y",c=r3.has(a)?-1:1,u=o&&l?-1:1,d=gh(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const o3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await i3(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}};function yD(e){const t=Wr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ri(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Mf(n)!==o||Mf(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Yb(e){return jn(e)?e:e.contextElement}function Hs(e){const t=Yb(e);if(!Ri(t))return Ai(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=yD(t);let a=(o?Mf(n.width):n.width)/r,s=(o?Mf(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const a3=Ai(0);function bD(e){const t=Sr(e);return!zb()||!t.visualViewport?a3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function s3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Sr(e)?!1:t}function rs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Yb(e);let a=Ai(1);t&&(r?jn(r)&&(a=Hs(r)):a=Hs(e));const s=s3(o,n,r)?bD(o):Ai(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const f=Sr(o),p=r&&jn(r)?Sr(r):r;let m=f,g=ty(m);for(;g&&r&&p!==m;){const v=Hs(g),x=g.getBoundingClientRect(),_=Wr(g),w=x.left+(g.clientLeft+parseFloat(_.paddingLeft))*v.x,y=x.top+(g.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=w,c+=y,m=Sr(g),g=ty(m)}}return If({width:u,height:d,x:l,y:c})}function vh(e,t){const n=mh(e).scrollLeft;return t?t.left+n:rs(Bi(e)).left+n}function xD(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vh(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function l3(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Bi(r),s=t?hh(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Ai(1);const u=Ai(0),d=Ri(r);if((d||!d&&!o)&&((El(r)!=="body"||Eu(a))&&(l=mh(r)),Ri(r))){const p=rs(r);c=Hs(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!o?xD(a,l):Ai(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function c3(e){return Array.from(e.getClientRects())}function u3(e){const t=Bi(e),n=mh(e),r=e.ownerDocument.body,i=qa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=qa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+vh(e);const s=-n.scrollTop;return Wr(r).direction==="rtl"&&(a+=qa(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}const r_=25;function d3(e,t){const n=Sr(e),r=Bi(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=zb();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=vh(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-p);m<=r_&&(o-=m)}else c<=r_&&(o+=c);return{width:o,height:a,x:s,y:l}}const f3=new Set(["absolute","fixed"]);function p3(e,t){const n=rs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ri(e)?Hs(e):Ai(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:a,height:s,x:l,y:c}}function i_(e,t,n){let r;if(t==="viewport")r=d3(e,n);else if(t==="document")r=u3(Bi(e));else if(jn(t))r=p3(t,n);else{const i=bD(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return If(r)}function wD(e,t){const n=ra(e);return n===t||!jn(n)||nl(n)?!1:Wr(n).position==="fixed"||wD(n,t)}function h3(e,t){const n=t.get(e);if(n)return n;let r=Uc(e,[],!1).filter(s=>jn(s)&&El(s)!=="body"),i=null;const o=Wr(e).position==="fixed";let a=o?ra(e):e;for(;jn(a)&&!nl(a);){const s=Wr(a),l=Wb(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&f3.has(i.position)||Eu(a)&&!l&&wD(e,a))?r=r.filter(u=>u!==a):i=s,a=ra(a)}return t.set(e,r),r}function m3(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?hh(t)?[]:h3(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=i_(t,u,i);return c.top=qa(d.top,c.top),c.right=rl(d.right,c.right),c.bottom=rl(d.bottom,c.bottom),c.left=qa(d.left,c.left),c},i_(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function g3(e){const{width:t,height:n}=yD(e);return{width:t,height:n}}function v3(e,t,n){const r=Ri(t),i=Bi(t),o=n==="fixed",a=rs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ai(0);function c(){l.x=vh(i)}if(r||!r&&!o)if((El(t)!=="body"||Eu(i))&&(s=mh(t)),r){const p=rs(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=i&&!r&&!o?xD(i,s):Ai(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function Nm(e){return Wr(e).position==="static"}function o_(e,t){if(!Ri(e)||Wr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bi(e)===n&&(n=n.ownerDocument.body),n}function _D(e,t){const n=Sr(e);if(hh(e))return n;if(!Ri(e)){let i=ra(e);for(;i&&!nl(i);){if(jn(i)&&!Nm(i))return i;i=ra(i)}return n}let r=o_(e,t);for(;r&&P6(r)&&Nm(r);)r=o_(r,t);return r&&nl(r)&&Nm(r)&&!Wb(r)?n:r||j6(e)||n}const y3=async function(e){const t=this.getOffsetParent||_D,n=this.getDimensions,r=await n(e.floating);return{reference:v3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function b3(e){return Wr(e).direction==="rtl"}const x3={convertOffsetParentRelativeRectToViewportRelativeRect:l3,getDocumentElement:Bi,getClippingRect:m3,getOffsetParent:_D,getElementRects:y3,getClientRects:c3,getDimensions:g3,getScale:Hs,isElement:jn,isRTL:b3};function ED(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function w3(e,t){let n=null,r;const i=Bi(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const m=cd(d),g=cd(i.clientWidth-(u+f)),v=cd(i.clientHeight-(d+p)),x=cd(u),w={rootMargin:-m+"px "+-g+"px "+-v+"px "+-x+"px",threshold:qa(0,rl(1,l))||1};let y=!0;function E(S){const P=S[0].intersectionRatio;if(P!==l){if(!y)return a();P?a(!1,P):r=setTimeout(()=>{a(!1,1e-7)},1e3)}P===1&&!ED(c,e.getBoundingClientRect())&&a(),y=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return a(!0),o}function _3(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Yb(e),u=i||o?[...c?Uc(c):[],...Uc(t)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=c&&s?w3(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(x=>{let[_]=x;_&&_.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,g=l?rs(e):null;l&&v();function v(){const x=rs(e);g&&!ED(g,x)&&n(),g=x,m=requestAnimationFrame(v)}return n(),()=>{var x;u.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),d?.(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const E3=o3,S3=n3,a_=t3,O3=(e,t,n)=>{const r=new Map,i={platform:x3,...n},o={...i.platform,_c:r};return J6(e,t,{...i,platform:o})};var C3=typeof document<"u",k3=function(){},gf=C3?k.useLayoutEffect:k3;function Lf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Lf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function SD(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function s_(e,t){const n=SD(e);return Math.round(t*n)/n}function jm(e){const t=O.useRef(e);return gf(()=>{t.current=e}),t}function P3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=O.useState(r);Lf(f,r)||p(r);const[m,g]=O.useState(null),[v,x]=O.useState(null),_=O.useCallback(V=>{V!==S.current&&(S.current=V,g(V))},[]),w=O.useCallback(V=>{V!==P.current&&(P.current=V,x(V))},[]),y=o||m,E=a||v,S=O.useRef(null),P=O.useRef(null),D=O.useRef(u),T=l!=null,R=jm(l),A=jm(i),C=jm(c),j=O.useCallback(()=>{if(!S.current||!P.current)return;const V={placement:t,strategy:n,middleware:f};A.current&&(V.platform=A.current),O3(S.current,P.current,V).then(z=>{const W={...z,isPositioned:C.current!==!1};N.current&&!Lf(D.current,W)&&(D.current=W,hP.flushSync(()=>{d(W)}))})},[f,t,n,A,C]);gf(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[c]);const N=O.useRef(!1);gf(()=>(N.current=!0,()=>{N.current=!1}),[]),gf(()=>{if(y&&(S.current=y),E&&(P.current=E),y&&E){if(R.current)return R.current(y,E,j);j()}},[y,E,j,R,T]);const M=O.useMemo(()=>({reference:S,floating:P,setReference:_,setFloating:w}),[_,w]),L=O.useMemo(()=>({reference:y,floating:E}),[y,E]),B=O.useMemo(()=>{const V={position:n,left:0,top:0};if(!L.floating)return V;const z=s_(L.floating,u.x),W=s_(L.floating,u.y);return s?{...V,transform:"translate("+z+"px, "+W+"px)",...SD(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:W}},[n,s,L.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:j,refs:M,elements:L,floatingStyles:B}),[u,j,M,L,B])}const D3=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?a_({element:r.current,padding:i}).fn(n):{}:r?a_({element:r,padding:i}).fn(n):{}}}},A3=(e,t)=>({...E3(e),options:[e,t]}),T3=(e,t)=>({...S3(e),options:[e,t]}),N3=(e,t)=>({...D3(e),options:[e,t]}),j3={...O};let l_=!1,M3=0;const c_=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+M3++;function R3(){const[e,t]=O.useState(()=>l_?c_():void 0);return Ff(()=>{e==null&&t(c_())},[]),O.useEffect(()=>{l_=!0},[]),e}const I3=j3.useId,OD=I3||R3;let Kc;process.env.NODE_ENV!=="production"&&(Kc=new Set);function F3(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=Kc)!=null&&e.has(i))){var o;(o=Kc)==null||o.add(i),console.warn(i)}}function L3(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=Kc)!=null&&e.has(i))){var o;(o=Kc)==null||o.add(i),console.error(i)}}const $3=O.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:m,...g}={},...v}=t;process.env.NODE_ENV!=="production"&&(n||F3("The `ref` prop is required for `FloatingArrow`."));const x=OD(),[_,w]=O.useState(!1);if(Ff(()=>{if(!i)return;Wr(i).direction==="rtl"&&w(!0)},[i]),!i)return null;const[y,E]=r.split("-"),S=y==="top"||y==="bottom";let P=d;(S&&a!=null&&a.x||!S&&a!=null&&a.y)&&(P=null);const D=u*2,T=D/2,R=s/2*(c/-8+1),A=l/2*c/4,C=!!p,j=P&&E==="end"?"bottom":"top";let N=P&&E==="end"?"right":"left";P&&_&&(N=E==="end"?"left":"right");const M=o?.x!=null?P||o.x:"",L=o?.y!=null?P||o.y:"",B=p||"M0,0"+(" H"+s)+(" L"+(s-R)+","+(l-A))+(" Q"+s/2+","+l+" "+R+","+(l-A))+" Z",V={top:C?"rotate(180deg)":"",left:C?"rotate(90deg)":"rotate(-90deg)",bottom:C?"":"rotate(180deg)",right:C?"rotate(-90deg)":"rotate(90deg)"}[y];return h.jsxs("svg",{...v,"aria-hidden":!0,ref:n,width:C?s:s+D,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[N]:M,[j]:L,[y]:S||C?"100%":"calc(100% - "+D/2+"px)",transform:[V,m].filter(z=>!!z).join(" "),...g},children:[D>0&&h.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:f,strokeWidth:D+(p?0:1),d:B}),h.jsx("path",{stroke:D&&!p?v.fill:"none",d:B}),h.jsx("clipPath",{id:x,children:h.jsx("rect",{x:-T,y:T*(C?-1:1),width:s+D,height:s})})]})});function B3(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const W3=O.createContext(null),z3=O.createContext(null),V3=()=>{var e;return((e=O.useContext(W3))==null?void 0:e.id)||null},H3=()=>O.useContext(z3);function Y3(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=OD(),o=O.useRef({}),[a]=O.useState(()=>B3()),s=V3()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!jn(p)&&L3("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=O.useState(r.reference),u=Z6((p,m,g)=>{o.current.openEvent=p?m:void 0,a.emit("openchange",{open:p,event:m,reason:g,nested:s}),n?.(p,m,g)}),d=O.useMemo(()=>({setPositionReference:c}),[]),f=O.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return O.useMemo(()=>({dataRef:o,open:t,onOpenChange:u,elements:f,events:a,floatingId:i,refs:d}),[t,u,f,a,i,d])}function U3(e){e===void 0&&(e={});const{nodeId:t}=e,n=Y3({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=O.useState(null),[s,l]=O.useState(null),u=i?.domReference||o,d=O.useRef(null),f=H3();Ff(()=>{u&&(d.current=u)},[u]);const p=P3({...e,elements:{...i,...s&&{reference:s}}}),m=O.useCallback(w=>{const y=jn(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(y),p.refs.setReference(y)},[p.refs]),g=O.useCallback(w=>{(jn(w)||w===null)&&(d.current=w,a(w)),(jn(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!jn(w))&&p.refs.setReference(w)},[p.refs]),v=O.useMemo(()=>({...p.refs,setReference:g,setPositionReference:m,domReference:d}),[p.refs,g,m]),x=O.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),_=O.useMemo(()=>({...p,...r,refs:v,elements:x,nodeId:t}),[p,v,x,t,r]);return Ff(()=>{r.dataRef.current.floatingContext=_;const w=f?.nodesRef.current.find(y=>y.id===t);w&&(w.context=_)}),O.useMemo(()=>({...p,context:_,refs:v,elements:x}),[p,v,x,_])}/*!
120
120
  react-datepicker v9.1.0
121
121
  https://github.com/Hacker0x01/react-datepicker
122
122
  Released under the MIT License.
123
123
  */var ry=function(t,n){return ry=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},ry(t,n)};function Sn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ry(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ee=function(){return Ee=Object.assign||function(n){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},Ee.apply(this,arguments)};function Ci(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var K3=function(e){var t=e.showTimeSelectOnly,n=t===void 0?!1:t,r=e.showTime,i=r===void 0?!1:r,o=e.className,a=e.children,s=e.inline,l=n?"Choose Time":"Choose Date".concat(i?" and Time":"");return k.createElement("div",{className:o,"aria-label":l,role:s?void 0:"dialog","aria-modal":s?void 0:"true",translate:"no"},a)},q3=function(e,t){var n=k.useRef(null),r=k.useRef(e);k.useEffect(function(){r.current=e},[e]);var i=k.useCallback(function(o){var a,s=o.composed&&o.composedPath&&o.composedPath().find(function(l){return l instanceof Node})||o.target;n.current&&!n.current.contains(s)&&(t&&s instanceof HTMLElement&&s.classList.contains(t)||(a=r.current)===null||a===void 0||a.call(r,o))},[t]);return k.useEffect(function(){return document.addEventListener("mousedown",i),function(){document.removeEventListener("mousedown",i)}},[i]),n},yh=function(e){var t=e.children,n=e.onClickOutside,r=e.className,i=e.containerRef,o=e.style,a=e.ignoreClass,s=q3(n,a);return k.createElement("div",{className:r,style:o,ref:function(l){s.current=l,i&&(i.current=l)}},t)},ud=null,u_=!1;function CD(){if(u_)return ud;u_=!0;try{var e="date-fns-tz";ud=require(e)}catch{ud=null}return ud}function d_(e,t){if(!t)return e;var n=CD();return n?n.toZonedTime(e,t):(process.env.NODE_ENV!=="production"&&console.warn('react-datepicker: timeZone prop requires "date-fns-tz" package. Please install it: npm install date-fns-tz'),e)}function Ki(e,t){if(!t)return e;var n=CD();return n?n.fromZonedTime(e,t):(process.env.NODE_ENV!=="production"&&console.warn('react-datepicker: timeZone prop requires "date-fns-tz" package. Please install it: npm install date-fns-tz'),e)}var se;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(se||(se={}));function kD(){var e=typeof window<"u"?window:globalThis;return e}var Ou=12;function Me(e){if(e==null)return new Date;var t=typeof e=="string"?u6(e):ge(e);return tr(t)?t:new Date}function xa(e,t,n,r,i){i===void 0&&(i=Me());for(var o=ol(n)||ol(Ub()),a=Array.isArray(t)?t:[t],s=0,l=a;s<l.length;s++){var c=l[s],u=i6(e,c,i,{locale:o});if(tr(u)&&(!r||e===gt(u,c,n)))return u}if(!r&&e&&e.length>=8){var d=new Date(e);if(tl(d))return d}return null}function G3(e,t){if(t===void 0&&(t=Me()),!e)return null;var n=e.match(/\b(1\d{3}|2\d{3})\b/);if(!n||!n[1])return null;var r=parseInt(n[1],10),i=e.match(/(?:^|[/\-\s])?(0?[1-9]|1[0-2])(?:[/\-\s]|$)/),o=i&&i[1]?parseInt(i[1],10)-1:t.getMonth();return new Date(r,o,1)}function tr(e){return tl(e)}function Ba(e){return e==null?null:Di(e)&&tl(e)?e:null}function gt(e,t,n){if(n==="en")return Xw(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var r=n?ol(n):void 0;return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),r=r||ol(Ub()),Xw(e,t,{locale:r,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Jn(e,t){var n=t.dateFormat,r=t.locale,i=Array.isArray(n)&&n.length>0?n[0]:n;return e&&gt(e,i,r)||""}var PD=" - ";function X3(e,t,n){if(!e&&!t)return"";var r=e?Jn(e,n):"",i=t?Jn(t,n):"",o=n.rangeSeparator||PD;return"".concat(r).concat(o).concat(i)}function Q3(e,t){if(!e?.length)return"";var n=e[0]?Jn(e[0],t):"";if(e.length===1)return n;if(e.length===2&&e[1]){var r=Jn(e[1],t);return"".concat(n,", ").concat(r)}var i=e.length-1;return"".concat(n," (+").concat(i,")")}function qi(e,t){var n=t.hour,r=n===void 0?0:n,i=t.minute,o=i===void 0?0:i,a=t.second,s=a===void 0?0:a;return pf(hf(mf(e,s),o),r)}function Z3(e){return Fb(e)}function J3(e,t){return gt(e,"ddd",t)}function yc(e){return ns(e)}function Xo(e,t,n){var r=ol(t||Ub());return bo(e,{locale:r,weekStartsOn:n})}function fo(e){return iD(e)}function bc(e){return fh(e)}function f_(e){return Zv(e)}function p_(){return ns(Me())}function h_(e){return nD(e)}function e8(e){return u5(e)}function t8(e){return rD(e)}function bi(e,t){return e&&t?l6(e,t):!e&&!t}function Vn(e,t){return e&&t?a6(e,t):!e&&!t}function $f(e,t){return e&&t?s6(e,t):!e&&!t}function De(e,t){return e&&t?l5(e,t):!e&&!t}function Wa(e,t){return e&&t?cB(e,t):!e&&!t}function Pa(e,t,n){var r,i=ns(t),o=nD(n);try{r=Yc(e,{start:i,end:o})}catch{r=!1}return r}function Ub(){var e=kD();return e.__localeId__}function ol(e){if(typeof e=="string"){var t=kD();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function n8(e,t,n){return t(gt(e,"EEEE",n))}function r8(e,t){return gt(e,"EEEEEE",t)}function i8(e,t){return gt(e,"EEE",t)}function Kb(e,t){return gt(gr(Me(),e),"LLLL",t)}function DD(e,t){return gt(gr(Me(),e),"LLL",t)}function o8(e,t){return gt(Fs(Me(),e),"QQQ",t)}function Fr(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.excludeDateIntervals,s=n.includeDates,l=n.includeDateIntervals,c=n.filterDate,u=n.disabled;return u?!0:Cu(e,{minDate:r,maxDate:i})||o&&o.some(function(d){return d instanceof Date?De(e,d):De(e,d.date)})||a&&a.some(function(d){var f=d.start,p=d.end;return Yc(e,{start:f,end:p})})||s&&!s.some(function(d){return De(e,d)})||l&&!l.some(function(d){var f=d.start,p=d.end;return Yc(e,{start:f,end:p})})||c&&!c(Me(e))||!1}function qb(e,t){var n=t===void 0?{}:t,r=n.excludeDates,i=n.excludeDateIntervals;return i&&i.length>0?i.some(function(o){var a=o.start,s=o.end;return Yc(e,{start:a,end:s})}):r&&r.some(function(o){var a;return o instanceof Date?De(e,o):De(e,(a=o.date)!==null&&a!==void 0?a:new Date)})||!1}function AD(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates,s=n.filterDate;return Cu(e,{minDate:r?iD(r):void 0,maxDate:i?rD(i):void 0})||o?.some(function(l){return Vn(e,l instanceof Date?l:l.date)})||a&&!a.some(function(l){return Vn(e,l)})||s&&!s(Me(e))||!1}function dd(e,t,n,r){var i=Ce(e),o=nr(e),a=Ce(t),s=nr(t),l=Ce(r);return i===a&&i===l?o<=n&&n<=s:i<a?l===i&&o<=n||l===a&&s>=n||l<a&&l>i:!1}function a8(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates;return Cu(e,{minDate:r,maxDate:i})||o&&o.some(function(s){return Vn(s instanceof Date?s:s.date,e)})||a&&!a.some(function(s){return Vn(s,e)})||!1}function fd(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates,s=n.filterDate,l=n.disabled;return l?!0:Cu(e,{minDate:r,maxDate:i})||o?.some(function(c){return $f(e,c instanceof Date?c:c.date)})||a&&!a.some(function(c){return $f(e,c)})||s&&!s(Me(e))||!1}function pd(e,t,n){if(!t||!n||!tl(t)||!tl(n))return!1;var r=Ce(t),i=Ce(n);return r<=e&&i>=e}function vf(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates,s=n.filterDate,l=n.disabled;if(l)return!0;var c=new Date(e,0,1);return Cu(c,{minDate:r?fh(r):void 0,maxDate:i?oD(i):void 0})||o?.some(function(u){return bi(c,u instanceof Date?u:u.date)})||a&&!a.some(function(u){return bi(c,u)})||s&&!s(Me(c))||!1}function hd(e,t,n,r){var i=Ce(e),o=Vo(e),a=Ce(t),s=Vo(t),l=Ce(r);return i===a&&i===l?o<=n&&n<=s:i<a?l===i&&o<=n||l===a&&s>=n||l<a&&l>i:!1}function Cu(e,t){var n,r=t===void 0?{}:t,i=r.minDate,o=r.maxDate;return(n=i&&el(e,i)<0||o&&el(e,o)>0)!==null&&n!==void 0?n:!1}function m_(e,t){return t.some(function(n){return An(n)===An(e)&&Tn(n)===Tn(e)&&Go(n)===Go(e)})}function g_(e,t){var n=t===void 0?{}:t,r=n.excludeTimes,i=n.includeTimes,o=n.filterTime;return r&&m_(e,r)||i&&!m_(e,i)||o&&!o(e)||!1}function v_(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i=Me();i=pf(i,An(e)),i=hf(i,Tn(e)),i=mf(i,Go(e));var o=Me();o=pf(o,An(n)),o=hf(o,Tn(n)),o=mf(o,Go(n));var a=Me();a=pf(a,An(r)),a=hf(a,Tn(r)),a=mf(a,Go(r));var s;try{s=!Yc(i,{start:o,end:a})}catch{s=!1}return s}function y_(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.includeDates,o=Ka(e,1);return r&&Af(r,o)>0||i&&i.every(function(a){return Af(a,o)>0})||!1}function b_(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.includeDates,o=ai(e,1);return r&&Af(o,r)>0||i&&i.every(function(a){return Af(o,a)>0})||!1}function s8(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.includeDates,o=fh(e),a=hD(o);return r&&Tf(r,a)>0||i&&i.every(function(s){return Tf(s,a)>0})||!1}function l8(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.includeDates,o=oD(e),a=Ib(o,1);return r&&Tf(a,r)>0||i&&i.every(function(s){return Tf(a,s)>0})||!1}function x_(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.includeDates,o=na(e,1);return r&&Nf(r,o)>0||i&&i.every(function(a){return Nf(a,o)>0})||!1}function c8(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.yearItemNumber,o=i===void 0?Ou:i,a=bc(na(e,o)),s=io(a,o).endPeriod,l=r&&Ce(r);return l&&l>s||!1}function w_(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.includeDates,o=oi(e,1);return r&&Nf(o,r)>0||i&&i.every(function(a){return Nf(o,a)>0})||!1}function u8(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.yearItemNumber,o=i===void 0?Ou:i,a=oi(e,o),s=io(a,o).startPeriod,l=r&&Ce(r);return l&&l<s||!1}function TD(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return el(i,t)>=0});return Hw(r)}else return n?Hw(n):t}function ND(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return el(i,t)<=0});return Vw(r)}else return n?Vw(n):t}function __(e,t){var n;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var r=new Map,i=0,o=e.length;i<o;i++){var a=e[i];if(Di(a)){var s=gt(a,"MM.dd.yyyy"),l=r.get(s)||[];l.includes(t)||(l.push(t),r.set(s,l))}else if(typeof a=="object"){var c=Object.keys(a),u=(n=c[0])!==null&&n!==void 0?n:"",d=a[u];if(typeof u=="string"&&Array.isArray(d))for(var f=0,p=d.length;f<p;f++){var m=d[f];if(m){var s=gt(m,"MM.dd.yyyy"),l=r.get(s)||[];l.includes(u)||(l.push(u),r.set(s,l))}}}}return r}function d8(e,t){return e.length!==t.length?!1:e.every(function(n,r){return n===t[r]})}function f8(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var n=new Map;return e.forEach(function(r){var i=r.date,o=r.holidayName;if(Di(i)){var a=gt(i,"MM.dd.yyyy"),s=n.get(a)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===t&&d8(s.holidayNames,[o]))){s.className=t;var l=s.holidayNames;s.holidayNames=l?Ci(Ci([],l,!0),[o],!1):[o],n.set(a,s)}}}),n}function p8(e,t,n,r,i){for(var o=i.length,a=[],s=0;s<o;s++){var l=e,c=i[s];c&&(l=i5(l,An(c)),l=Hc(l,Tn(c)),l=s5(l,Go(c)));var u=Hc(e,(n+1)*r);uo(l,t)&&Oi(l,u)&&c!=null&&a.push(c)}return a}function Ps(e){return e<10?"0".concat(e):"".concat(e)}function io(e,t){t===void 0&&(t=Ou);var n=Math.ceil(Ce(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function h8(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+n-+t)/36e5)}function E_(e){var t=e.getSeconds(),n=e.getMilliseconds();return ge(e.getTime()-t*1e3-n)}function jD(e,t){return E_(e).getTime()===E_(t).getTime()}function S_(e){if(!Di(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function Mm(e,t){if(!Di(e)||!Di(t))throw new Error("Invalid date received");var n=S_(e),r=S_(t);return Oi(n,r)}function MD(e){return e.key===se.Space}var Rm=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;return r.inputRef=k.createRef(),r.onTimeChange=function(i){var o,a;r.setState({time:i});var s=r.props.date,l=s instanceof Date&&!isNaN(+s),c=l?s:new Date;if(i?.includes(":")){var u=i.split(":"),d=u[0],f=u[1];c.setHours(Number(d)),c.setMinutes(Number(f))}(a=(o=r.props).onChange)===null||a===void 0||a.call(o,c)},r.renderTimeInput=function(){var i=r.state.time,o=r.props,a=o.date,s=o.timeString,l=o.customTimeInput;return l?k.cloneElement(l,{date:a,value:i,onChange:r.onTimeChange}):k.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:r.inputRef,onClick:function(){var c;(c=r.inputRef.current)===null||c===void 0||c.focus()},required:!0,value:i,onChange:function(c){r.onTimeChange(c.target.value||s)}})},r.state={time:r.props.timeString},r}return t.getDerivedStateFromProps=function(n,r){return n.timeString!==r.time?{time:n.timeString}:null},t.prototype.render=function(){return k.createElement("div",{className:"react-datepicker__input-time-container"},k.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),k.createElement("div",{className:"react-datepicker-time__input-container"},k.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t})(k.Component),m8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.dayEl=k.createRef(),n.handleClick=function(r){!n.isDisabled()&&n.props.onClick&&n.props.onClick(r)},n.handleMouseEnter=function(r){!n.isDisabled()&&n.props.onMouseEnter&&n.props.onMouseEnter(r)},n.handleOnKeyDown=function(r){var i,o,a=r.key;a===se.Space&&(r.preventDefault(),r.key=se.Enter),(o=(i=n.props).handleOnKeyDown)===null||o===void 0||o.call(i,r)},n.isSameDay=function(r){return De(n.props.day,r)},n.isKeyboardSelected=function(){var r;if(n.props.disabledKeyboardNavigation)return!1;var i=n.props.selectsMultiple?(r=n.props.selectedDates)===null||r===void 0?void 0:r.some(function(a){return n.isSameDayOrWeek(a)}):n.isSameDayOrWeek(n.props.selected),o=n.props.preSelection&&n.isDisabled(n.props.preSelection);return!i&&n.isSameDayOrWeek(n.props.preSelection)&&!o},n.isDisabled=function(r){return r===void 0&&(r=n.props.day),Fr(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate,disabled:n.props.disabled})},n.isExcluded=function(){return qb(n.props.day,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.isStartOfWeek=function(){return De(n.props.day,Xo(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameWeek=function(r){return n.props.showWeekPicker&&De(r,Xo(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameDayOrWeek=function(r){return n.isSameDay(r)||n.isSameWeek(r)},n.getHighLightedClass=function(){var r=n.props,i=r.day,o=r.highlightDates;if(!o)return!1;var a=gt(i,"MM.dd.yyyy");return o.get(a)},n.getHolidaysClass=function(){var r,i=n.props,o=i.day,a=i.holidays;if(!a)return[void 0];var s=gt(o,"MM.dd.yyyy");return a.has(s)?[(r=a.get(s))===null||r===void 0?void 0:r.className]:[void 0]},n.isInRange=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Pa(i,o,a)},n.isInSelectingRange=function(){var r,i=n.props,o=i.day,a=i.selectsStart,s=i.selectsEnd,l=i.selectsRange,c=i.selectsDisabledDaysInRange,u=i.startDate,d=i.swapRange,f=i.endDate,p=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;if(n.isAfterMonth()||n.isBeforeMonth()||!(a||s||l)||!p||!c&&n.isDisabled())return!1;if(a&&f&&(Oi(p,f)||Wa(p,f)))return Pa(o,p,f);if(s&&u&&(uo(p,u)||Wa(p,u)))return Pa(o,u,p);if(l&&u&&!f){if(Wa(p,u)||uo(p,u))return Pa(o,u,p);if(d&&Oi(p,u))return Pa(o,p,u)}return!1},n.isSelectingRangeStart=function(){var r;if(!n.isInSelectingRange())return!1;var i=n.props,o=i.day,a=i.startDate,s=i.selectsStart,l=i.swapRange,c=i.selectsRange,u=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return s?De(o,u):c&&l&&a&&u?De(o,Oi(u,a)?u:a):De(o,a)},n.isSelectingRangeEnd=function(){var r;if(!n.isInSelectingRange())return!1;var i=n.props,o=i.day,a=i.endDate,s=i.selectsEnd,l=i.selectsRange,c=i.swapRange,u=i.startDate,d=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return s?De(o,d):l&&c&&u&&d?De(o,Oi(d,u)?u:d):l?De(o,d):De(o,a)},n.isRangeStart=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:De(o,i)},n.isRangeEnd=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:De(a,i)},n.isWeekend=function(){var r=oB(n.props.day);return r===0||r===6},n.isAfterMonth=function(){return n.props.month!==void 0&&(n.props.month+1)%12===nr(n.props.day)},n.isBeforeMonth=function(){return n.props.month!==void 0&&(nr(n.props.day)+1)%12===n.props.month},n.isCurrentDay=function(){return n.isSameDay(Me())},n.isSelected=function(){var r;return n.props.selectsMultiple?(r=n.props.selectedDates)===null||r===void 0?void 0:r.some(function(i){return n.isSameDayOrWeek(i)}):n.isSameDayOrWeek(n.props.selected)},n.getClassNames=function(r){var i=n.props.dayClassName?n.props.dayClassName(r):void 0;return ce("react-datepicker__day",i,"react-datepicker__day--"+J3(n.props.day),{"react-datepicker__day--disabled":n.isDisabled(),"react-datepicker__day--excluded":n.isExcluded(),"react-datepicker__day--selected":n.isSelected(),"react-datepicker__day--keyboard-selected":n.isKeyboardSelected(),"react-datepicker__day--range-start":n.isRangeStart(),"react-datepicker__day--range-end":n.isRangeEnd(),"react-datepicker__day--in-range":n.isInRange(),"react-datepicker__day--in-selecting-range":n.isInSelectingRange(),"react-datepicker__day--selecting-range-start":n.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":n.isSelectingRangeEnd(),"react-datepicker__day--today":n.isCurrentDay(),"react-datepicker__day--weekend":n.isWeekend(),"react-datepicker__day--outside-month":n.isAfterMonth()||n.isBeforeMonth()},n.getHighLightedClass(),n.getHolidaysClass())},n.getAriaLabel=function(){var r=n.props,i=r.day,o=r.ariaLabelPrefixWhenEnabled,a=o===void 0?"Choose":o,s=r.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,c=n.isDisabled()||n.isExcluded()?l:a;return"".concat(c," ").concat(gt(i,"PPPP",n.props.locale))},n.getTitle=function(){var r=n.props,i=r.day,o=r.holidays,a=o===void 0?new Map:o,s=r.excludeDates,l=gt(i,"MM.dd.yyyy"),c=[];return a.has(l)&&c.push.apply(c,a.get(l).holidayNames),n.isExcluded()&&c.push(s?.filter(function(u){return u instanceof Date?De(u,i):De(u?.date,i)}).map(function(u){if(!(u instanceof Date))return u?.message})),c.join(", ")},n.getTabIndex=function(){var r=n.props.selected,i=n.props.preSelection,o=!(n.props.showWeekPicker&&(n.props.showWeekNumber||!n.isStartOfWeek()))&&(n.isKeyboardSelected()||n.isSameDay(r)&&De(i,r))?0:-1;return o},n.handleFocusDay=function(){var r;n.shouldFocusDay()&&((r=n.dayEl.current)===null||r===void 0||r.focus({preventScroll:!0}))},n.renderDayContents=function(){return n.props.monthShowsDuplicateDaysEnd&&n.isAfterMonth()||n.props.monthShowsDuplicateDaysStart&&n.isBeforeMonth()?null:n.props.renderDayContents?n.props.renderDayContents(Qw(n.props.day),n.props.day):Qw(n.props.day)},n.render=function(){return k.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.props.usePointerEvent?void 0:n.handleMouseEnter,onPointerEnter:n.props.usePointerEvent?n.handleMouseEnter:void 0,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"gridcell",title:n.getTitle(),"aria-disabled":n.isDisabled(),"aria-current":n.isCurrentDay()?"date":void 0,"aria-selected":n.isSelected()||n.isInRange()},n.renderDayContents(),n.getTitle()!==""&&k.createElement("span",{className:"overlay"},n.getTitle()))},n}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var n=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(n=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(n=!1),this.isDayActiveElement()&&(n=!0),this.isDuplicateDay()&&(n=!1)),n},t.prototype.isDayActiveElement=function(){var n,r,i;return((r=(n=this.props.containerRef)===null||n===void 0?void 0:n.current)===null||r===void 0?void 0:r.contains(document.activeElement))&&((i=document.activeElement)===null||i===void 0?void 0:i.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t})(k.Component),g8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.weekNumberEl=k.createRef(),n.handleClick=function(r){n.props.onClick&&n.props.onClick(r)},n.handleOnKeyDown=function(r){var i,o,a=r.key;a===se.Space&&(r.preventDefault(),r.key=se.Enter),(o=(i=n.props).handleOnKeyDown)===null||o===void 0||o.call(i,r)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!De(n.props.date,n.props.selected)&&De(n.props.date,n.props.preSelection)},n.getTabIndex=function(){return n.props.showWeekPicker&&n.props.showWeekNumber&&(n.isKeyboardSelected()||De(n.props.date,n.props.selected)&&De(n.props.preSelection,n.props.selected))?0:-1},n.handleFocusWeekNumber=function(r){var i=!1;n.getTabIndex()===0&&!r?.isInputFocused&&De(n.props.date,n.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(i=!0),n.props.inline&&!n.props.shouldFocusDayInline&&(i=!1),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(i=!0)),i&&n.weekNumberEl.current&&n.weekNumberEl.current.focus({preventScroll:!0})},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(n){this.handleFocusWeekNumber(n)},t.prototype.render=function(){var n=this.props,r=n.weekNumber,i=n.isWeekDisabled,o=n.ariaLabelPrefix,a=o===void 0?t.defaultProps.ariaLabelPrefix:o,s=n.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!i,"react-datepicker__week-number--selected":!!s&&De(this.props.date,this.props.selected)};return k.createElement("div",{ref:this.weekNumberEl,className:ce(l),"aria-label":"".concat(a," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},r)},t})(k.Component),v8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.isDisabled=function(r){return Fr(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.handleDayClick=function(r,i){n.props.onDayClick&&n.props.onDayClick(r,i)},n.handleDayMouseEnter=function(r){n.props.onDayMouseEnter&&n.props.onDayMouseEnter(r)},n.handleWeekClick=function(r,i,o){for(var a,s,l,c=new Date(r),u=0;u<7;u++){var d=new Date(r);d.setDate(d.getDate()+u);var f=!n.isDisabled(d);if(f){c=d;break}}typeof n.props.onWeekSelect=="function"&&n.props.onWeekSelect(c,i,o),n.props.showWeekPicker&&n.handleDayClick(c,o),((a=n.props.shouldCloseOnSelect)!==null&&a!==void 0?a:t.defaultProps.shouldCloseOnSelect)&&((l=(s=n.props).setOpen)===null||l===void 0||l.call(s,!1))},n.formatWeekNumber=function(r){return n.props.formatWeekNumber?n.props.formatWeekNumber(r):Z3(r)},n.isWeekDisabled=function(){for(var r=n.startOfWeek(),i=ii(r,6),o=new Date(r);o<=i;){if(!n.isDisabled(o))return!1;o=ii(o,1)}return!0},n.renderDays=function(){var r=n.startOfWeek(),i=[],o=n.formatWeekNumber(r);if(n.props.showWeekNumber){var a=n.props.onWeekSelect||n.props.showWeekPicker?n.handleWeekClick.bind(n,r,o):void 0;i.push(k.createElement(g8,Ee({key:"W"},t.defaultProps,n.props,{weekNumber:o,isWeekDisabled:n.isWeekDisabled(),date:r,onClick:a})))}return i.concat([0,1,2,3,4,5,6].map(function(s){var l=ii(r,s);return k.createElement(m8,Ee({},t.defaultProps,n.props,{ariaLabelPrefixWhenEnabled:n.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:n.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:n.handleDayClick.bind(n,l),onMouseEnter:n.handleDayMouseEnter.bind(n,l)}))}))},n.startOfWeek=function(){return Xo(n.props.day,n.props.locale,n.props.calendarStartDay)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!De(n.startOfWeek(),n.props.selected)&&De(n.startOfWeek(),n.props.preSelection)},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var n={"react-datepicker__week":!0,"react-datepicker__week--selected":De(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},r=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return k.createElement("div",{className:ce(n,r),role:"row"},this.renderDays())},t})(k.Component),Xl,y8=6,Ys={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Im=(Xl={},Xl[Ys.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Xl[Ys.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Xl[Ys.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Xl),md=1;function O_(e,t){return e?Ys.FOUR_COLUMNS:t?Ys.TWO_COLUMNS:Ys.THREE_COLUMNS}var b8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.MONTH_REFS=Ci([],Array(12),!0).map(function(){return k.createRef()}),n.QUARTER_REFS=Ci([],Array(4),!0).map(function(){return k.createRef()}),n.isDisabled=function(r){return Fr(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate,disabled:n.props.disabled})},n.isExcluded=function(r){return qb(r,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.handleDayClick=function(r,i){var o,a;(a=(o=n.props).onDayClick)===null||a===void 0||a.call(o,r,i,n.props.orderInDisplay)},n.handleDayMouseEnter=function(r){var i,o;(o=(i=n.props).onDayMouseEnter)===null||o===void 0||o.call(i,r)},n.handleMouseLeave=function(){var r,i;(i=(r=n.props).onMouseLeave)===null||i===void 0||i.call(r)},n.isRangeStartMonth=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:Vn(gr(o,r),a)},n.isRangeStartQuarter=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:$f(Fs(o,r),a)},n.isRangeEndMonth=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:Vn(gr(o,r),s)},n.isRangeEndQuarter=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:$f(Fs(o,r),s)},n.isInSelectingRangeMonth=function(r){var i,o=n.props,a=o.day,s=o.selectsStart,l=o.selectsEnd,c=o.selectsRange,u=o.startDate,d=o.endDate,f=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return!(s||l||c)||!f?!1:s&&d?dd(f,d,r,a):l&&u||c&&u&&!d?dd(u,f,r,a):!1},n.isSelectingMonthRangeStart=function(r){var i;if(!n.isInSelectingRangeMonth(r))return!1;var o=n.props,a=o.day,s=o.startDate,l=o.selectsStart,c=gr(a,r),u=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return l?Vn(c,u):Vn(c,s)},n.isSelectingMonthRangeEnd=function(r){var i;if(!n.isInSelectingRangeMonth(r))return!1;var o=n.props,a=o.day,s=o.endDate,l=o.selectsEnd,c=o.selectsRange,u=gr(a,r),d=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return l||c?Vn(u,d):Vn(u,s)},n.isInSelectingRangeQuarter=function(r){var i,o=n.props,a=o.day,s=o.selectsStart,l=o.selectsEnd,c=o.selectsRange,u=o.startDate,d=o.endDate,f=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return!(s||l||c)||!f?!1:s&&d?hd(f,d,r,a):l&&u||c&&u&&!d?hd(u,f,r,a):!1},n.isWeekInMonth=function(r){var i=n.props.day,o=ii(r,6);return Vn(r,i)||Vn(o,i)},n.isCurrentMonth=function(r,i){return Ce(r)===Ce(Me())&&i===nr(Me())},n.isCurrentQuarter=function(r,i){return Ce(r)===Ce(Me())&&i===Vo(Me())},n.isSelectedMonth=function(r,i,o){return nr(o)===i&&Ce(r)===Ce(o)},n.isSelectMonthInList=function(r,i,o){return o.some(function(a){return n.isSelectedMonth(r,i,a)})},n.isSelectedQuarter=function(r,i,o){return Vo(o)===i&&Ce(r)===Ce(o)},n.isSelectQuarterInList=function(r,i,o){return o.some(function(a){return n.isSelectedQuarter(r,i,a)})},n.isMonthSelected=function(){var r=n.props,i=r.day,o=r.selected,a=r.selectedDates,s=r.selectsMultiple,l=nr(i);return s?a?.some(function(c){return n.isSelectedMonth(i,l,c)}):!!o&&n.isSelectedMonth(i,l,o)},n.isQuarterSelected=function(){var r=n.props,i=r.day,o=r.selected,a=r.selectedDates,s=r.selectsMultiple,l=Vo(i);return s?a?.some(function(c){return n.isSelectedQuarter(i,l,c)}):!!o&&n.isSelectedQuarter(i,l,o)},n.renderWeeks=function(){if(!tr(n.props.day))return[];for(var r=[],i=n.props.fixedHeight,o=0,a=!1,s=Xo(fo(n.props.day),n.props.locale,n.props.calendarStartDay),l=function(m){return n.props.showWeekPicker?Xo(m,n.props.locale,n.props.calendarStartDay):n.props.preSelection},c=function(m){return n.props.showWeekPicker?Xo(m,n.props.locale,n.props.calendarStartDay):n.props.selected},u=n.props.selected?c(n.props.selected):void 0,d=n.props.preSelection?l(n.props.preSelection):void 0;r.push(k.createElement(v8,Ee({},n.props,{ariaLabelPrefix:n.props.weekAriaLabelPrefix,key:o,day:s,month:nr(n.props.day),onDayClick:n.handleDayClick,onDayMouseEnter:n.handleDayMouseEnter,selected:u,preSelection:d,showWeekNumber:n.props.showWeekNumbers}))),!a;){o++,s=Df(s,1);var f=i&&o>=y8,p=!i&&!n.isWeekInMonth(s);if(f||p)if(n.props.peekNextMonth)a=!0;else break}return r},n.onMonthClick=function(r,i){var o=n.isMonthDisabledForLabelDate(i),a=o.isDisabled,s=o.labelDate;a||n.handleDayClick(fo(s),r)},n.onMonthMouseEnter=function(r){var i=n.isMonthDisabledForLabelDate(r),o=i.isDisabled,a=i.labelDate;o||n.handleDayMouseEnter(fo(a))},n.handleMonthNavigation=function(r,i){var o,a,s,l;(a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,i),(l=(s=n.MONTH_REFS[r])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},n.handleKeyboardNavigation=function(r,i,o){var a,s=n.props,l=s.selected,c=s.preSelection,u=s.setPreSelection,d=s.minDate,f=s.maxDate,p=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(c){var g=O_(p,m),v=n.getVerticalOffset(g),x=(a=Im[g])===null||a===void 0?void 0:a.grid,_=function(P,D,T){var R,A,C=D,j=T;switch(P){case se.ArrowRight:C=ai(D,md),j=T===11?0:T+md;break;case se.ArrowLeft:C=Ka(D,md),j=T===0?11:T-md;break;case se.ArrowUp:C=Ka(D,v),j=!((R=x?.[0])===null||R===void 0)&&R.includes(T)?T+12-v:T-v;break;case se.ArrowDown:C=ai(D,v),j=!((A=x?.[x.length-1])===null||A===void 0)&&A.includes(T)?T-12+v:T+v;break}return{newCalculatedDate:C,newCalculatedMonth:j}},w=function(P,D,T){for(var R=40,A=P,C=!1,j=0,N=_(A,D,T),M=N.newCalculatedDate,L=N.newCalculatedMonth;!C;){if(j>=R){M=D,L=T;break}if(d&&M<d){A=se.ArrowRight;var B=_(A,M,L);M=B.newCalculatedDate,L=B.newCalculatedMonth}if(f&&M>f){A=se.ArrowLeft;var B=_(A,M,L);M=B.newCalculatedDate,L=B.newCalculatedMonth}if(a8(M,n.props)){var B=_(A,M,L);M=B.newCalculatedDate,L=B.newCalculatedMonth}else C=!0;j++}return{newCalculatedDate:M,newCalculatedMonth:L}};if(i===se.Enter){n.isMonthDisabled(o)||(n.onMonthClick(r,o),u?.(l));return}var y=w(i,c,o),E=y.newCalculatedDate,S=y.newCalculatedMonth;switch(i){case se.ArrowRight:case se.ArrowLeft:case se.ArrowUp:case se.ArrowDown:n.handleMonthNavigation(S,E);break}}},n.getVerticalOffset=function(r){var i,o;return(o=(i=Im[r])===null||i===void 0?void 0:i.verticalNavigationOffset)!==null&&o!==void 0?o:0},n.onMonthKeyDown=function(r,i){var o=n.props,a=o.disabledKeyboardNavigation,s=o.handleOnMonthKeyDown,l=r.key;l!==se.Tab&&r.preventDefault(),a||n.handleKeyboardNavigation(r,l,i),s&&s(r)},n.onQuarterClick=function(r,i){var o=Fs(n.props.day,i);fd(o,n.props)||n.handleDayClick(f_(o),r)},n.onQuarterMouseEnter=function(r){var i=Fs(n.props.day,r);fd(i,n.props)||n.handleDayMouseEnter(f_(i))},n.handleQuarterNavigation=function(r,i){var o,a,s,l;n.isDisabled(i)||n.isExcluded(i)||((a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,i),(l=(s=n.QUARTER_REFS[r-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},n.onQuarterKeyDown=function(r,i){var o,a,s=r.key;if(!n.props.disabledKeyboardNavigation)switch(s){case se.Enter:n.onQuarterClick(r,i),(a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,n.props.selected);break;case se.ArrowRight:if(!n.props.preSelection)break;n.handleQuarterNavigation(i===4?1:i+1,Ib(n.props.preSelection,1));break;case se.ArrowLeft:if(!n.props.preSelection)break;n.handleQuarterNavigation(i===1?4:i-1,hD(n.props.preSelection));break}},n.isMonthDisabledForLabelDate=function(r){var i,o=n.props,a=o.day,s=o.disabled,l=o.minDate,c=o.maxDate,u=o.excludeDates,d=o.includeDates,f=gr(a,r);return s?{isDisabled:!0,labelDate:gr(a,r)}:{isDisabled:(i=(l||c||u||d)&&AD(f,n.props))!==null&&i!==void 0?i:!1,labelDate:f}},n.isMonthDisabled=function(r){var i=n.isMonthDisabledForLabelDate(r).isDisabled;return i},n.getMonthClassNames=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate,l=i.preSelection,c=i.monthClassName,u=c?c(gr(o,r)):void 0,d=n.getSelection();return ce("react-datepicker__month-text","react-datepicker__month-".concat(r),u,{"react-datepicker__month-text--disabled":n.isMonthDisabled(r),"react-datepicker__month-text--selected":d?n.isSelectMonthInList(o,r,d):void 0,"react-datepicker__month-text--keyboard-selected":!n.props.disabledKeyboardNavigation&&l&&n.isSelectedMonth(o,r,l)&&!n.isMonthSelected()&&!n.isMonthDisabled(r),"react-datepicker__month-text--in-selecting-range":n.isInSelectingRangeMonth(r),"react-datepicker__month-text--in-range":a&&s?dd(a,s,r,o):void 0,"react-datepicker__month-text--range-start":n.isRangeStartMonth(r),"react-datepicker__month-text--range-end":n.isRangeEndMonth(r),"react-datepicker__month-text--selecting-range-start":n.isSelectingMonthRangeStart(r),"react-datepicker__month-text--selecting-range-end":n.isSelectingMonthRangeEnd(r),"react-datepicker__month-text--today":n.isCurrentMonth(o,r)})},n.getTabIndex=function(r){if(n.props.preSelection==null)return"-1";var i=nr(n.props.preSelection),o=n.isMonthDisabledForLabelDate(i).isDisabled,a=r===i&&!(o||n.props.disabledKeyboardNavigation)?"0":"-1";return a},n.getQuarterTabIndex=function(r){if(n.props.preSelection==null)return"-1";var i=Vo(n.props.preSelection),o=fd(n.props.day,n.props),a=r===i&&!(o||n.props.disabledKeyboardNavigation)?"0":"-1";return a},n.getAriaLabel=function(r){var i=n.props,o=i.chooseDayAriaLabelPrefix,a=o===void 0?"Choose":o,s=i.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,c=i.day,u=i.locale,d=gr(c,r),f=n.isDisabled(d)||n.isExcluded(d)?l:a;return"".concat(f," ").concat(gt(d,"MMMM yyyy",u))},n.getQuarterClassNames=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate,l=i.minDate,c=i.maxDate,u=i.excludeDates,d=i.includeDates,f=i.filterDate,p=i.preSelection,m=i.disabledKeyboardNavigation,g=i.disabled,v=(l||c||u||d||f||g)&&fd(Fs(o,r),n.props),x=n.getSelection();return ce("react-datepicker__quarter-text","react-datepicker__quarter-".concat(r),{"react-datepicker__quarter-text--disabled":v,"react-datepicker__quarter-text--selected":x?n.isSelectQuarterInList(o,r,x):void 0,"react-datepicker__quarter-text--keyboard-selected":!m&&p&&n.isSelectedQuarter(o,r,p)&&!n.isQuarterSelected()&&!v,"react-datepicker__quarter-text--in-selecting-range":n.isInSelectingRangeQuarter(r),"react-datepicker__quarter-text--in-range":a&&s?hd(a,s,r,o):void 0,"react-datepicker__quarter-text--range-start":n.isRangeStartQuarter(r),"react-datepicker__quarter-text--range-end":n.isRangeEndQuarter(r),"react-datepicker__quarter-text--today":n.isCurrentQuarter(o,r)})},n.getMonthContent=function(r){var i=n.props,o=i.showFullMonthYearPicker,a=i.renderMonthContent,s=i.locale,l=i.day,c=DD(r,s),u=Kb(r,s);return a?a(r,c,u,l):o?u:c},n.getQuarterContent=function(r){var i,o=n.props,a=o.renderQuarterContent,s=o.locale,l=o8(r,s);return(i=a?.(r,l))!==null&&i!==void 0?i:l},n.renderMonths=function(){var r,i=n.props,o=i.showTwoColumnMonthYearPicker,a=i.showFourColumnMonthYearPicker,s=i.day,l=i.selected,c=(r=Im[O_(a,o)])===null||r===void 0?void 0:r.grid;return c?.map(function(u,d){return k.createElement("div",{className:"react-datepicker__month-wrapper",key:d},u.map(function(f,p){return k.createElement("div",{ref:n.MONTH_REFS[f],key:p,onClick:function(m){n.onMonthClick(m,f)},onKeyDown:function(m){MD(m)&&(m.preventDefault(),m.key=se.Enter),n.onMonthKeyDown(m,f)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onMonthMouseEnter(f)},onPointerEnter:n.props.usePointerEvent?function(){return n.onMonthMouseEnter(f)}:void 0,tabIndex:Number(n.getTabIndex(f)),className:n.getMonthClassNames(f),"aria-disabled":n.isMonthDisabled(f),role:"option","aria-label":n.getAriaLabel(f),"aria-current":n.isCurrentMonth(s,f)?"date":void 0,"aria-selected":l?n.isSelectedMonth(s,f,l):void 0},n.getMonthContent(f))}))})},n.renderQuarters=function(){var r=n.props,i=r.day,o=r.selected,a=[1,2,3,4];return k.createElement("div",{className:"react-datepicker__quarter-wrapper"},a.map(function(s,l){return k.createElement("div",{key:l,ref:n.QUARTER_REFS[l],role:"option",onClick:function(c){n.onQuarterClick(c,s)},onKeyDown:function(c){n.onQuarterKeyDown(c,s)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onQuarterMouseEnter(s)},onPointerEnter:n.props.usePointerEvent?function(){return n.onQuarterMouseEnter(s)}:void 0,className:n.getQuarterClassNames(s),"aria-selected":o?n.isSelectedQuarter(i,s,o):void 0,tabIndex:Number(n.getQuarterTabIndex(s)),"aria-current":n.isCurrentQuarter(i,s)?"date":void 0},n.getQuarterContent(s))}))},n.getClassNames=function(){var r=n.props,i=r.selectingDate,o=r.selectsStart,a=r.selectsEnd,s=r.showMonthYearPicker,l=r.showQuarterYearPicker,c=r.showWeekPicker;return ce("react-datepicker__month",{"react-datepicker__month--selecting-range":i&&(o||a)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":c})},n}return t.prototype.getSelection=function(){var n=this.props,r=n.selected,i=n.selectedDates,o=n.selectsMultiple;if(o)return i;if(r)return[r]},t.prototype.render=function(){var n=this.props,r=n.showMonthYearPicker,i=n.showQuarterYearPicker,o=n.day,a=n.ariaLabelPrefix,s=a===void 0?"Month ":a,l=s?s.trim()+" ":"",c=tr(o)?"".concat(l).concat(gt(o,"MMMM, yyyy",this.props.locale)):"",u=r||i;return u?k.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":c,role:"listbox"},r?this.renderMonths():this.renderQuarters()):k.createElement("div",{role:"table"},this.props.dayNamesHeader&&k.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),this.props.monthHeader&&k.createElement("div",{role:"rowgroup"},this.props.monthHeader),k.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":c,role:"rowgroup"},this.renderWeeks()),this.props.monthFooter&&k.createElement("div",{role:"rowgroup"},this.props.monthFooter))},t})(k.Component),x8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.monthOptionButtonsRef={},n.isSelectedMonth=function(r){return n.props.month===r},n.handleOptionKeyDown=function(r,i){var o;switch(i.key){case"Enter":i.preventDefault(),n.onChange(r);break;case"Escape":i.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{i.preventDefault();var a=(r+(i.key==="ArrowUp"?-1:1)+n.props.monthNames.length)%n.props.monthNames.length;(o=n.monthOptionButtonsRef[a])===null||o===void 0||o.focus();break}}},n.renderOptions=function(){return n.monthOptionButtonsRef={},n.props.monthNames.map(function(r,i){return k.createElement("div",{ref:function(o){n.monthOptionButtonsRef[i]=o,n.isSelectedMonth(i)&&o?.focus()},role:"button",tabIndex:0,className:n.isSelectedMonth(i)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:r,onClick:n.onChange.bind(n,i),onKeyDown:n.handleOptionKeyDown.bind(n,i),"aria-selected":n.isSelectedMonth(i)?"true":void 0},n.isSelectedMonth(i)?k.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",r)})},n.onChange=function(r){return n.props.onChange(r)},n.handleClickOutside=function(){return n.props.onCancel()},n}return t.prototype.render=function(){return k.createElement(yh,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(k.Component),w8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(r){return r.map(function(i,o){return k.createElement("option",{key:i,value:o},i)})},n.renderSelectMode=function(r){return k.createElement("select",{value:n.props.month,className:"react-datepicker__month-select",onChange:function(i){return n.onChange(parseInt(i.target.value))}},n.renderSelectOptions(r))},n.renderReadView=function(r,i){return k.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:n.toggleDropdown},k.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),k.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},i[n.props.month]))},n.renderDropdown=function(r){return k.createElement(x8,Ee({key:"dropdown"},n.props,{monthNames:r,onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(r){var i=n.state.dropdownVisible,o=[n.renderReadView(!i,r)];return i&&o.unshift(n.renderDropdown(r)),o},n.onChange=function(r){n.toggleDropdown(),r!==n.props.month&&n.props.onChange(r)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return t.prototype.render=function(){var n=this,r=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(o){return DD(o,n.props.locale)}:function(o){return Kb(o,n.props.locale)}),i;switch(this.props.dropdownMode){case"scroll":i=this.renderScrollMode(r);break;case"select":i=this.renderSelectMode(r);break}return k.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},i)},t})(k.Component),C_=5;function _8(e,t,n){for(var r=[],i=e??na(n,C_),o=t??oi(n,C_),a=fo(i),s=fo(o);!uo(a,s);)r.push(Me(a)),a=ai(a,1);return r}var E8=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;return r.renderOptions=function(){return r.state.monthYearsList.map(function(i){var o=ey(i),a=bi(r.props.date,i)&&Vn(r.props.date,i);return k.createElement("div",{className:a?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:o,onClick:r.onChange.bind(r,o),"aria-selected":a?"true":void 0},a?k.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",gt(i,r.props.dateFormat,r.props.locale))})},r.onChange=function(i){return r.props.onChange(i)},r.handleClickOutside=function(){r.props.onCancel()},r.state={monthYearsList:_8(r.props.minDate,r.props.maxDate,r.props.date)},r}return t.prototype.render=function(){var n=ce({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return k.createElement(yh,{className:n,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(k.Component),k_=5,S8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var r,i,o=(r=n.props.minDate)!==null&&r!==void 0?r:na(n.props.date,k_),a=(i=n.props.maxDate)!==null&&i!==void 0?i:oi(n.props.date,k_),s=fo(o),l=fo(a),c=[];!uo(s,l);){var u=ey(s);c.push(k.createElement("option",{key:u,value:u},gt(s,n.props.dateFormat,n.props.locale))),s=ai(s,1)}return c},n.onSelectChange=function(r){n.onChange(parseInt(r.target.value))},n.renderSelectMode=function(){return k.createElement("select",{value:ey(fo(n.props.date)),className:"react-datepicker__month-year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(r){var i=gt(n.props.date,n.props.dateFormat,n.props.locale);return k.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:n.toggleDropdown},k.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),k.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},i))},n.renderDropdown=function(){return k.createElement(E8,Ee({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var r=n.state.dropdownVisible,i=[n.renderReadView(!r)];return r&&i.unshift(n.renderDropdown()),i},n.onChange=function(r){n.toggleDropdown();var i=Me(r);bi(n.props.date,i)&&Vn(n.props.date,i)||n.props.onChange(i)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return t.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return k.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},n)},t})(k.Component),O8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={height:null},n.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var r,i,o;n.list&&(n.list.scrollTop=(o=n.centerLi&&t.calcCenterPosition(n.props.monthRef?n.props.monthRef.clientHeight-((i=(r=n.header)===null||r===void 0?void 0:r.clientHeight)!==null&&i!==void 0?i:0):n.list.clientHeight,n.centerLi))!==null&&o!==void 0?o:0)})},n.handleClick=function(r){var i,o;(n.props.minTime||n.props.maxTime)&&v_(r,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&g_(r,n.props)||(o=(i=n.props).onChange)===null||o===void 0||o.call(i,r)},n.isSelectedTime=function(r){var i=Ba(n.props.selected);return i&&jD(i,r)},n.isDisabledTime=function(r){return(n.props.minTime||n.props.maxTime)&&v_(r,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&g_(r,n.props)},n.liClasses=function(r){var i,o=["react-datepicker__time-list-item",n.props.timeClassName?n.props.timeClassName(r):void 0];return n.isSelectedTime(r)&&o.push("react-datepicker__time-list-item--selected"),n.isDisabledTime(r)&&o.push("react-datepicker__time-list-item--disabled"),n.props.injectTimes&&(An(r)*3600+Tn(r)*60+Go(r))%(((i=n.props.intervals)!==null&&i!==void 0?i:t.defaultProps.intervals)*60)!==0&&o.push("react-datepicker__time-list-item--injected"),o.join(" ")},n.handleOnKeyDown=function(r,i){var o,a;r.key===se.Space&&(r.preventDefault(),r.key=se.Enter),(r.key===se.ArrowUp||r.key===se.ArrowLeft)&&r.target instanceof HTMLElement&&r.target.previousSibling&&(r.preventDefault(),r.target.previousSibling instanceof HTMLElement&&r.target.previousSibling.focus()),(r.key===se.ArrowDown||r.key===se.ArrowRight)&&r.target instanceof HTMLElement&&r.target.nextSibling&&(r.preventDefault(),r.target.nextSibling instanceof HTMLElement&&r.target.nextSibling.focus()),r.key===se.Enter&&n.handleClick(i),(a=(o=n.props).handleOnKeyDown)===null||a===void 0||a.call(o,r)},n.renderTimes=function(){for(var r,i=[],o=typeof n.props.format=="string"?n.props.format:"p",a=(r=n.props.intervals)!==null&&r!==void 0?r:t.defaultProps.intervals,s=Ba(n.props.selected)||Ba(n.props.openToDate)||Me(),l=yc(s),c=n.props.injectTimes&&n.props.injectTimes.sort(function(v,x){return v.getTime()-x.getTime()}),u=60*h8(s),d=u/a,f=0;f<d;f++){var p=Hc(l,f*a);if(i.push(p),c){var m=p8(l,p,f,a,c);i=i.concat(m)}}var g=i.reduce(function(v,x){return x.getTime()<=s.getTime()?x:v},i[0]);return i.map(function(v){return k.createElement("li",{key:v.valueOf(),onClick:n.handleClick.bind(n,v),className:n.liClasses(v),ref:function(x){v===g&&(n.centerLi=x)},onKeyDown:function(x){n.handleOnKeyDown(x,v)},tabIndex:v===g?0:-1,role:"option","aria-selected":n.isSelectedTime(v)?"true":void 0,"aria-disabled":n.isDisabledTime(v)?"true":void 0},gt(v,o,n.props.locale))})},n.renderTimeCaption=function(){return n.props.showTimeCaption===!1?k.createElement(k.Fragment,null):k.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(n.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(r){n.header=r}},k.createElement("div",{className:"react-datepicker-time__header"},n.props.timeCaption))},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},t.prototype.componentWillUnmount=function(){var n;(n=this.resizeObserver)===null||n===void 0||n.disconnect()},t.prototype.observeDatePickerHeightChanges=function(){var n=this,r=this.props.monthRef;this.updateContainerHeight(),r&&(this.resizeObserver=new ResizeObserver(function(){n.updateContainerHeight()}),this.resizeObserver.observe(r))},t.prototype.updateContainerHeight=function(){if(this.props.monthRef&&this.header){var n=this.props.monthRef.clientHeight-this.header.clientHeight;this.state.height!==n&&this.setState({height:n})}},t.prototype.render=function(){var n=this,r,i=this.state.height;return k.createElement("div",{className:"react-datepicker__time-container ".concat(((r=this.props.todayButton)!==null&&r!==void 0?r:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),k.createElement("div",{className:"react-datepicker__time"},k.createElement("div",{className:"react-datepicker__time-box"},k.createElement("ul",{className:"react-datepicker__time-list",ref:function(o){n.list=o},style:i?{height:i}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(n,r){return r.offsetTop-(n/2-r.clientHeight/2)},t})(k.Component),P_=3,C8=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;return r.YEAR_REFS=Ci([],Array(r.props.yearItemNumber),!0).map(function(){return k.createRef()}),r.isDisabled=function(i){return Fr(i,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(i){return qb(i,{excludeDates:r.props.excludeDates})},r.selectingDate=function(){var i;return(i=r.props.selectingDate)!==null&&i!==void 0?i:r.props.preSelection},r.updateFocusOnPaginate=function(i){var o=function(){var a,s;(s=(a=r.YEAR_REFS[i])===null||a===void 0?void 0:a.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(o)},r.handleYearClick=function(i,o){r.props.onDayClick&&r.props.onDayClick(i,o)},r.handleYearNavigation=function(i,o){var a,s,l,c,u=r.props,d=u.date,f=u.yearItemNumber;if(!(d===void 0||f===void 0)){var p=io(d,f).startPeriod;r.isDisabled(o)||r.isExcluded(o)||((s=(a=r.props).setPreSelection)===null||s===void 0||s.call(a,o),i-p<0?r.updateFocusOnPaginate(f-(p-i)):i-p>=f?r.updateFocusOnPaginate(Math.abs(f-(i-p))):(c=(l=r.YEAR_REFS[i-p])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())}},r.isSameDay=function(i,o){return De(i,o)},r.isCurrentYear=function(i){return i===Ce(Me())},r.isRangeStart=function(i){return r.props.startDate&&r.props.endDate&&bi(gi(Me(),i),r.props.startDate)},r.isRangeEnd=function(i){return r.props.startDate&&r.props.endDate&&bi(gi(Me(),i),r.props.endDate)},r.isInRange=function(i){return pd(i,r.props.startDate,r.props.endDate)},r.isInSelectingRange=function(i){var o=r.props,a=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,c=o.startDate,u=o.endDate;return!(a||s||l)||!r.selectingDate()?!1:a&&u?pd(i,r.selectingDate(),u):s&&c||l&&c&&!u?pd(i,c,r.selectingDate()):!1},r.isSelectingRangeStart=function(i){var o;if(!r.isInSelectingRange(i))return!1;var a=r.props,s=a.startDate,l=a.selectsStart,c=gi(Me(),i);return l?bi(c,(o=r.selectingDate())!==null&&o!==void 0?o:null):bi(c,s??null)},r.isSelectingRangeEnd=function(i){var o;if(!r.isInSelectingRange(i))return!1;var a=r.props,s=a.endDate,l=a.selectsEnd,c=a.selectsRange,u=gi(Me(),i);return l||c?bi(u,(o=r.selectingDate())!==null&&o!==void 0?o:null):bi(u,s??null)},r.isKeyboardSelected=function(i){if(!(r.props.disabledKeyboardNavigation||r.props.date===void 0||r.props.preSelection==null)){var o=r.props,a=o.minDate,s=o.maxDate,l=o.excludeDates,c=o.includeDates,u=o.filterDate,d=o.selected,f=bc(gi(r.props.date,i)),p=(a||s||l||c||u)&&vf(i,r.props),m=!!d&&De(f,bc(d)),g=De(f,bc(r.props.preSelection));return!r.props.inline&&!m&&g&&!p}},r.isSelectedYear=function(i){var o=r.props,a=o.selectsMultiple,s=o.selected,l=o.selectedDates;return a?l?.some(function(c){return i===Ce(c)}):!!s&&i===Ce(s)},r.onYearClick=function(i,o){var a=r.props.date;a!==void 0&&r.handleYearClick(bc(gi(a,o)),i)},r.onYearKeyDown=function(i,o){var a,s,l=i.key,c=r.props,u=c.date,d=c.yearItemNumber,f=c.handleOnKeyDown;if(l!==se.Tab&&i.preventDefault(),!r.props.disabledKeyboardNavigation)switch(l){case se.Enter:if(r.props.selected==null)break;r.onYearClick(i,o),(s=(a=r.props).setPreSelection)===null||s===void 0||s.call(a,r.props.selected);break;case se.ArrowRight:if(r.props.preSelection==null)break;r.handleYearNavigation(o+1,oi(r.props.preSelection,1));break;case se.ArrowLeft:if(r.props.preSelection==null)break;r.handleYearNavigation(o-1,na(r.props.preSelection,1));break;case se.ArrowUp:{if(u===void 0||d===void 0||r.props.preSelection==null)break;var p=io(u,d).startPeriod,m=P_,g=o-m;if(g<p){var v=d%m;o>=p&&o<p+v?m=v:m+=v,g=o-m}r.handleYearNavigation(g,na(r.props.preSelection,m));break}case se.ArrowDown:{if(u===void 0||d===void 0||r.props.preSelection==null)break;var x=io(u,d).endPeriod,m=P_,g=o+m;if(g>x){var v=d%m;o<=x&&o>x-v?m=v:m+=v,g=o+m}r.handleYearNavigation(g,oi(r.props.preSelection,m));break}}f&&f(i)},r.getYearClassNames=function(i){var o=r.props,a=o.date,s=o.disabled,l=o.minDate,c=o.maxDate,u=o.excludeDates,d=o.includeDates,f=o.filterDate,p=o.yearClassName;return ce("react-datepicker__year-text","react-datepicker__year-".concat(i),a?p?.(gi(a,i)):void 0,{"react-datepicker__year-text--selected":r.isSelectedYear(i),"react-datepicker__year-text--disabled":(l||c||u||d||f||s)&&vf(i,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(i),"react-datepicker__year-text--range-start":r.isRangeStart(i),"react-datepicker__year-text--range-end":r.isRangeEnd(i),"react-datepicker__year-text--in-range":r.isInRange(i),"react-datepicker__year-text--in-selecting-range":r.isInSelectingRange(i),"react-datepicker__year-text--selecting-range-start":r.isSelectingRangeStart(i),"react-datepicker__year-text--selecting-range-end":r.isSelectingRangeEnd(i),"react-datepicker__year-text--today":r.isCurrentYear(i)})},r.getYearTabIndex=function(i){if(r.props.disabledKeyboardNavigation||r.props.preSelection==null)return"-1";var o=Ce(r.props.preSelection),a=vf(i,r.props);return i===o&&!a?"0":"-1"},r.getYearContent=function(i){return r.props.renderYearContent?r.props.renderYearContent(i):i},r}return t.prototype.render=function(){var n=this,r=[],i=this.props,o=i.date,a=i.yearItemNumber,s=i.onYearMouseEnter,l=i.onYearMouseLeave;if(o===void 0)return null;for(var c=io(o,a),u=c.startPeriod,d=c.endPeriod,f=function(g){r.push(k.createElement("div",{ref:p.YEAR_REFS[g-u],onClick:function(v){n.onYearClick(v,g)},onKeyDown:function(v){MD(v)&&(v.preventDefault(),v.key=se.Enter),n.onYearKeyDown(v,g)},tabIndex:Number(p.getYearTabIndex(g)),className:p.getYearClassNames(g),onMouseEnter:p.props.usePointerEvent?void 0:function(v){return s(v,g)},onPointerEnter:p.props.usePointerEvent?function(v){return s(v,g)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(v){return l(v,g)},onPointerLeave:p.props.usePointerEvent?function(v){return l(v,g)}:void 0,key:g,"aria-current":p.isCurrentYear(g)?"date":void 0},p.getYearContent(g)))},p=this,m=u;m<=d;m++)f(m);return k.createElement("div",{className:"react-datepicker__year"},k.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},r))},t})(k.Component);function k8(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var a=e+t-o,s=!0;n&&(s=Ce(n)<=a),r&&s&&(s=Ce(r)>=a),s&&i.push(a)}return i}var P8=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;r.yearOptionButtonsRef={},r.handleOptionKeyDown=function(s,l){var c;switch(l.key){case"Enter":l.preventDefault(),r.onChange(s);break;case"Escape":l.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{l.preventDefault();var u=s+(l.key==="ArrowUp"?1:-1);r.yearOptionButtonsRef[u]&&((c=r.yearOptionButtonsRef[u])===null||c===void 0||c.focus());break}}},r.renderOptions=function(){r.yearOptionButtonsRef={};var s=r.props.year,l=r.state.yearsList.map(function(d){return k.createElement("div",{ref:function(f){r.yearOptionButtonsRef[d]=f,d===s&&f?.focus()},role:"button",tabIndex:0,className:s===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:r.onChange.bind(r,d),onKeyDown:r.handleOptionKeyDown.bind(r,d),"aria-selected":s===d?"true":void 0},s===d?k.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),c=r.props.minDate?Ce(r.props.minDate):null,u=r.props.maxDate?Ce(r.props.maxDate):null;return(!u||!r.state.yearsList.find(function(d){return d===u}))&&l.unshift(k.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},k.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!c||!r.state.yearsList.find(function(d){return d===c}))&&l.push(k.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},k.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},r.onChange=function(s){r.props.onChange(s)},r.handleClickOutside=function(){r.props.onCancel()},r.shiftYears=function(s){var l=r.state.yearsList.map(function(c){return c+s});r.setState({yearsList:l})},r.incrementYears=function(){return r.shiftYears(1)},r.decrementYears=function(){return r.shiftYears(-1)};var i=n.yearDropdownItemNumber,o=n.scrollableYearDropdown,a=i||(o?10:5);return r.state={yearsList:k8(r.props.year,a,r.props.minDate,r.props.maxDate)},r.dropdownRef=k.createRef(),r}return t.prototype.componentDidMount=function(){var n=this.dropdownRef.current;if(n){var r=n.children?Array.from(n.children):null,i=r?r.find(function(o){return o.ariaSelected}):null;n.scrollTop=i&&i instanceof HTMLElement?i.offsetTop+(i.clientHeight-n.clientHeight)/2:(n.scrollHeight-n.clientHeight)/2}},t.prototype.render=function(){var n=ce({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return k.createElement(yh,{className:n,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(k.Component),D8=(function(e){Sn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var r=n.props.minDate?Ce(n.props.minDate):1900,i=n.props.maxDate?Ce(n.props.maxDate):2100,o=[],a=r;a<=i;a++)o.push(k.createElement("option",{key:a,value:a},a));return o},n.onSelectChange=function(r){n.onChange(parseInt(r.target.value))},n.renderSelectMode=function(){return k.createElement("select",{value:n.props.year,className:"react-datepicker__year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(r){return k.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:n.toggleDropdown},k.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),k.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},n.props.year))},n.renderDropdown=function(){return k.createElement(P8,Ee({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var r=n.state.dropdownVisible,i=[n.renderReadView(!r)];return r&&i.unshift(n.renderDropdown()),i},n.onChange=function(r){n.toggleDropdown(),r!==n.props.year&&n.props.onChange(r)},n.toggleDropdown=function(r){n.setState({dropdownVisible:!n.state.dropdownVisible},function(){n.props.adjustDateOnChange&&n.handleYearChange(n.props.date,r)})},n.handleYearChange=function(r,i){var o;(o=n.onSelect)===null||o===void 0||o.call(n,r,i),n.setOpen()},n.onSelect=function(r,i){var o,a;(a=(o=n.props).onSelect)===null||a===void 0||a.call(o,r,i)},n.setOpen=function(){var r,i;(i=(r=n.props).setOpen)===null||i===void 0||i.call(r,!0)},n}return t.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return k.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},n)},t})(k.Component),A8=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],RD="react-datepicker-ignore-onclickoutside",T8=function(e){var t=(e.className||"").split(/\s+/);return A8.some(function(n){return t.indexOf(n)>=0})},N8=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;return r.monthContainer=void 0,r.handleClickOutside=function(i){r.props.onClickOutside(i)},r.setClickOutsideRef=function(){return r.containerRef.current},r.handleDropdownFocus=function(i){var o,a;T8(i.target)&&((a=(o=r.props).onDropdownFocus)===null||a===void 0||a.call(o,i))},r.getDateInView=function(){var i=r.props,o=i.preSelection,a=i.selected,s=i.openToDate,l=TD(r.props),c=ND(r.props),u=Me(),d=s||a||o;return d||(l&&Oi(u,l)?l:c&&uo(u,c)?c:u)},r.increaseMonth=function(){r.setState(function(i){var o=i.date;return{date:ai(o,1)}},function(){return r.handleMonthChange(r.state.date)})},r.decreaseMonth=function(){r.setState(function(i){var o=i.date;return{date:Ka(o,1)}},function(){return r.handleMonthChange(r.state.date)})},r.handleDayClick=function(i,o,a){r.props.onSelect(i,o,a),r.props.setPreSelection&&r.props.setPreSelection(i)},r.handleDayMouseEnter=function(i){r.setState({selectingDate:i}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(i)},r.handleMonthMouseLeave=function(){r.setState({selectingDate:void 0}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()},r.handleYearMouseEnter=function(i,o){r.setState({selectingDate:gi(Me(),o)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(i,o)},r.handleYearMouseLeave=function(i,o){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(i,o)},r.handleYearChange=function(i){var o,a,s,l;(a=(o=r.props).onYearChange)===null||a===void 0||a.call(o,i),r.setState({isRenderAriaLiveMessage:!0}),r.props.adjustDateOnChange&&(r.props.onSelect(i),(l=(s=r.props).setOpen)===null||l===void 0||l.call(s,!0)),r.props.setPreSelection&&r.props.setPreSelection(i)},r.getEnabledPreSelectionDateForMonth=function(i){if(!Fr(i,r.props))return i;for(var o=fo(i),a=t8(i),s=c5(a,o),l=null,c=0;c<=s;c++){var u=ii(o,c);if(!Fr(u,r.props)){l=u;break}}return l},r.handleMonthChange=function(i){var o,a,s,l=(o=r.getEnabledPreSelectionDateForMonth(i))!==null&&o!==void 0?o:i;r.handleCustomMonthChange(l),r.props.adjustDateOnChange&&(r.props.onSelect(l),(s=(a=r.props).setOpen)===null||s===void 0||s.call(a,!0)),r.props.setPreSelection&&r.props.setPreSelection(l)},r.handleCustomMonthChange=function(i){var o,a;(a=(o=r.props).onMonthChange)===null||a===void 0||a.call(o,i),r.setState({isRenderAriaLiveMessage:!0})},r.handleMonthYearChange=function(i){r.handleYearChange(i),r.handleMonthChange(i)},r.changeYear=function(i){r.setState(function(o){var a=o.date;return{date:gi(a,Number(i))}},function(){return r.handleYearChange(r.state.date)})},r.changeMonth=function(i){r.setState(function(o){var a=o.date;return{date:gr(a,Number(i))}},function(){var o,a;r.handleMonthChange(r.state.date),(a=(o=r.props).onMonthSelectedInChange)===null||a===void 0||a.call(o,0)})},r.changeMonthYear=function(i){r.setState(function(o){var a=o.date;return{date:gi(gr(a,nr(i)),Ce(i))}},function(){return r.handleMonthYearChange(r.state.date)})},r.header=function(i,o){if(i===void 0&&(i=r.state.date),o===void 0&&(o=0),!tr(i))return[];var a=r.props.disabled,s=Xo(i,r.props.locale,r.props.calendarStartDay),l=[];return r.props.showWeekNumbers&&l.push(k.createElement("div",{key:"W",className:"react-datepicker__day-name ".concat(a?"react-datepicker__day-name--disabled":""),role:"columnheader"},k.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),k.createElement("span",{"aria-hidden":"true"},r.props.weekLabel||"#"))),l.concat([0,1,2,3,4,5,6].map(function(c){var u=ii(s,c),d=r.formatWeekday(u,r.props.locale),f=gt(u,"EEEE",r.props.locale),p=r.props.weekDayClassName?r.props.weekDayClassName(u):void 0;if(r.props.renderCustomDayName){var m=r.props.renderCustomDayName({day:u,shortName:d,fullName:f,locale:r.props.locale,customDayNameCount:o});return k.createElement("div",{key:c,role:"columnheader",className:ce("react-datepicker__day-name",p,a?"react-datepicker__day-name--disabled":"")},m)}return k.createElement("div",{key:c,role:"columnheader",className:ce("react-datepicker__day-name",p,a?"react-datepicker__day-name--disabled":"")},k.createElement("span",{className:"react-datepicker__sr-only"},f),k.createElement("span",{"aria-hidden":"true"},d))}))},r.formatWeekday=function(i,o){return r.props.formatWeekDay?n8(i,r.props.formatWeekDay,o):r.props.useWeekdaysShort?i8(i,o):r8(i,o)},r.decreaseYear=function(){r.setState(function(i){var o,a=i.date;return{date:na(a,r.props.showYearPicker?(o=r.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.clearSelectingDate=function(){r.setState({selectingDate:void 0})},r.renderPreviousButton=function(){var i,o,a;if(!r.props.renderCustomHeader){var s=(i=r.props.monthsShown)!==null&&i!==void 0?i:t.defaultProps.monthsShown,l=r.props.showPreviousMonths?s-1:0,c=(o=r.props.monthSelectedIn)!==null&&o!==void 0?o:l,u=Ka(r.state.date,c),d;switch(!0){case r.props.disabled:d=!0;break;case r.props.showMonthYearPicker:d=x_(r.state.date,r.props);break;case r.props.showYearPicker:d=c8(r.state.date,r.props);break;case r.props.showQuarterYearPicker:d=s8(r.state.date,r.props);break;default:d=y_(u,r.props);break}if(!(!((a=r.props.forceShowMonthNavigation)!==null&&a!==void 0?a:t.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&d||r.props.showTimeSelectOnly)){var f=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],p=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(m=r.decreaseYear),d&&r.props.showDisabledMonthNavigation&&(p.push("react-datepicker__navigation--previous--disabled"),m=void 0);var g=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,v=r.props,x=v.previousMonthButtonLabel,_=x===void 0?t.defaultProps.previousMonthButtonLabel:x,w=v.previousYearButtonLabel,y=w===void 0?t.defaultProps.previousYearButtonLabel:w,E=r.props,S=E.previousMonthAriaLabel,P=S===void 0?typeof _=="string"?_:"Previous Month":S,D=E.previousYearAriaLabel,T=D===void 0?typeof y=="string"?y:"Previous Year":D;return k.createElement("button",{type:"button",className:p.join(" "),onClick:m,onKeyDown:r.props.handleOnKeyDown,"aria-label":g?T:P},k.createElement("span",{className:f.join(" ")},g?y:_))}}},r.increaseYear=function(){r.setState(function(i){var o,a=i.date;return{date:oi(a,r.props.showYearPicker?(o=r.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.renderNextButton=function(){var i;if(!r.props.renderCustomHeader){var o;switch(!0){case r.props.disabled:o=!0;break;case r.props.showMonthYearPicker:o=w_(r.state.date,r.props);break;case r.props.showYearPicker:o=u8(r.state.date,r.props);break;case r.props.showQuarterYearPicker:o=l8(r.state.date,r.props);break;default:o=b_(r.state.date,r.props);break}if(!(!((i=r.props.forceShowMonthNavigation)!==null&&i!==void 0?i:t.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&o||r.props.showTimeSelectOnly)){var a=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];r.props.showTimeSelect&&a.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&a.push("react-datepicker__navigation--next--with-today-button");var l=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(l=r.increaseYear),o&&r.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--next--disabled"),l=void 0);var c=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,u=r.props,d=u.nextMonthButtonLabel,f=d===void 0?t.defaultProps.nextMonthButtonLabel:d,p=u.nextYearButtonLabel,m=p===void 0?t.defaultProps.nextYearButtonLabel:p,g=r.props,v=g.nextMonthAriaLabel,x=v===void 0?typeof f=="string"?f:"Next Month":v,_=g.nextYearAriaLabel,w=_===void 0?typeof m=="string"?m:"Next Year":_;return k.createElement("button",{type:"button",className:a.join(" "),onClick:l,onKeyDown:r.props.handleOnKeyDown,"aria-label":c?w:x},k.createElement("span",{className:s.join(" ")},c?m:f))}}},r.renderCurrentMonth=function(i){i===void 0&&(i=r.state.date);var o=["react-datepicker__current-month"];return r.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),k.createElement("h2",{className:o.join(" ")},tr(i)?gt(i,r.props.dateFormat,r.props.locale):"")},r.renderYearDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showYearDropdown||i))return k.createElement(D8,Ee({},t.defaultProps,r.props,{date:r.state.date,onChange:r.changeYear,year:Ce(r.state.date)}))},r.renderMonthDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showMonthDropdown||i))return k.createElement(w8,Ee({},t.defaultProps,r.props,{month:nr(r.state.date),onChange:r.changeMonth}))},r.renderMonthYearDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showMonthYearDropdown||i))return k.createElement(S8,Ee({},t.defaultProps,r.props,{date:r.state.date,onChange:r.changeMonthYear}))},r.handleTodayButtonClick=function(i){r.props.onSelect(p_(),i),r.props.setPreSelection&&r.props.setPreSelection(p_())},r.renderTodayButton=function(){if(!(!r.props.todayButton||r.props.showTimeSelectOnly))return k.createElement("div",{className:"react-datepicker__today-button",onClick:r.handleTodayButtonClick},r.props.todayButton)},r.renderDayNamesHeader=function(i,o){return o===void 0&&(o=0),k.createElement("div",{className:"react-datepicker__day-names",role:"row"},r.header(i,o))},r.renderDefaultHeader=function(i){var o=i.monthDate,a=i.i,s=k.createElement("div",{className:ce("react-datepicker__header",{"react-datepicker__header--has-time-select":r.props.showTimeSelect,"react-datepicker__header--middle":r.props.monthHeaderPosition==="middle","react-datepicker__header--bottom":r.props.monthHeaderPosition==="bottom"})},r.renderCurrentMonth(o),k.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(a!==0),r.renderMonthYearDropdown(a!==0),r.renderYearDropdown(a!==0)));return r.props.monthHeaderPosition==="top"?s:k.createElement("div",{className:"react-datepicker__header-wrapper"},r.renderPreviousButton()||null,r.renderNextButton()||null,s)},r.renderCustomHeader=function(i){var o,a,s=i.monthDate,l=i.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var c=r.props,u=c.showYearPicker,d=c.yearItemNumber,f;if(u){var p=io(s,d),m=p.startPeriod,g=p.endPeriod;f={startYear:m,endYear:g}}var v=y_(r.state.date,r.props),x=b_(r.state.date,r.props),_=x_(r.state.date,r.props),w=w_(r.state.date,r.props);return k.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},(a=(o=r.props).renderCustomHeader)===null||a===void 0?void 0:a.call(o,Ee(Ee(Ee({},r.state),u&&{visibleYearsRange:f}),{customHeaderCount:l,monthDate:s,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:v,nextMonthButtonDisabled:x,prevYearButtonDisabled:_,nextYearButtonDisabled:w})))},r.renderYearHeader=function(i){var o=i.monthDate,a=r.props,s=a.showYearPicker,l=a.yearItemNumber,c=l===void 0?t.defaultProps.yearItemNumber:l,u=io(o,c),d=u.startPeriod,f=u.endPeriod;return k.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(d," - ").concat(f):Ce(o))},r.renderHeader=function(i){var o=i.monthDate,a=i.i,s=a===void 0?0:a,l={monthDate:o,i:s};switch(!0){case r.props.renderCustomHeader!==void 0:return r.renderCustomHeader(l);case(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker):return r.renderYearHeader(l);default:return r.renderDefaultHeader(l)}},r.renderMonths=function(){var i,o;if(!(r.props.showTimeSelectOnly||r.props.showYearPicker)){for(var a=[],s=(i=r.props.monthsShown)!==null&&i!==void 0?i:t.defaultProps.monthsShown,l=r.props.showPreviousMonths?s-1:0,c=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?oi(r.state.date,l):Ka(r.state.date,l),u=(o=r.props.monthSelectedIn)!==null&&o!==void 0?o:l,d=0;d<s;++d){var f=d-u+l,p=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?oi(c,f):ai(c,f),m="month-".concat(d),g=d<s-1,v=d>0;a.push(k.createElement("div",{key:m,ref:function(x){r.monthContainer=x??void 0},className:"react-datepicker__month-container"},r.props.monthHeaderPosition==="top"&&r.renderHeader({monthDate:p,i:d}),k.createElement(b8,Ee({},t.defaultProps,r.props,{containerRef:r.containerRef,ariaLabelPrefix:r.props.monthAriaLabelPrefix,day:p,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,handleOnMonthKeyDown:r.props.handleOnKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,orderInDisplay:d,selectingDate:r.state.selectingDate,monthShowsDuplicateDaysEnd:g,monthShowsDuplicateDaysStart:v,dayNamesHeader:r.renderDayNamesHeader(p,d),monthHeader:r.props.monthHeaderPosition==="middle"?r.renderHeader({monthDate:p,i:d}):void 0,monthFooter:r.props.monthHeaderPosition==="bottom"?r.renderHeader({monthDate:p,i:d}):void 0}))))}return a}},r.renderYears=function(){if(!r.props.showTimeSelectOnly&&r.props.showYearPicker)return k.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader({monthDate:r.state.date}),k.createElement(C8,Ee({},t.defaultProps,r.props,{selectingDate:r.state.selectingDate,date:r.state.date,onDayClick:r.handleDayClick,clearSelectingDate:r.clearSelectingDate,onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave})))},r.renderTimeSection=function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return k.createElement(O8,Ee({},t.defaultProps,r.props,{onChange:r.props.onTimeChange,format:r.props.timeFormat,intervals:r.props.timeIntervals,monthRef:r.state.monthContainer}))},r.renderInputTimeSection=function(){var i,o;if(r.props.showTimeInput){if(r.props.selectsRange){var a=r.props,s=a.startDate,l=a.endDate,c=s?new Date(s):void 0,u=c&&tr(c)&&!!s,d=u?"".concat(Ps(c.getHours()),":").concat(Ps(c.getMinutes())):"",f=l?new Date(l):void 0,p=f&&tr(f)&&!!l,m=p?"".concat(Ps(f.getHours()),":").concat(Ps(f.getMinutes())):"";return k.createElement(k.Fragment,null,k.createElement(Rm,Ee({},t.defaultProps,r.props,{date:c,timeString:d,onChange:function(_){var w,y;(y=(w=r.props).onTimeChange)===null||y===void 0||y.call(w,_,"start")},timeInputLabel:((i=r.props.timeInputLabel)!==null&&i!==void 0?i:"Time")+" (Start)"})),k.createElement(Rm,Ee({},t.defaultProps,r.props,{date:f,timeString:m,onChange:function(_){var w,y;(y=(w=r.props).onTimeChange)===null||y===void 0||y.call(w,_,"end")},timeInputLabel:((o=r.props.timeInputLabel)!==null&&o!==void 0?o:"Time")+" (End)"})))}var g=r.props.selected?new Date(r.props.selected):void 0,v=g&&tr(g)&&!!r.props.selected,x=v?"".concat(Ps(g.getHours()),":").concat(Ps(g.getMinutes())):"";return k.createElement(Rm,Ee({},t.defaultProps,r.props,{date:g,timeString:x,onChange:function(_){var w,y;(y=(w=r.props).onTimeChange)===null||y===void 0||y.call(w,_)}}))}},r.renderAriaLiveRegion=function(){var i;if(!tr(r.state.date))return k.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"});var o=io(r.state.date,(i=r.props.yearItemNumber)!==null&&i!==void 0?i:t.defaultProps.yearItemNumber),a=o.startPeriod,s=o.endPeriod,l;return r.props.showYearPicker?l="".concat(a," - ").concat(s):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?l=Ce(r.state.date):l="".concat(Kb(nr(r.state.date),r.props.locale)," ").concat(Ce(r.state.date)),k.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&l)},r.renderChildren=function(){if(r.props.children)return k.createElement("div",{className:"react-datepicker__children-container"},r.props.children)},r.containerRef=k.createRef(),r.state={date:r.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:RD,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Ou,monthHeaderPosition:"top"}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){n.setState({monthContainer:n.monthContainer})})())},t.prototype.componentDidUpdate=function(n){var r=this;if(this.props.preSelection&&tr(this.props.preSelection)&&(!De(this.props.preSelection,n.preSelection)||this.props.monthSelectedIn!==n.monthSelectedIn)){var i=!Vn(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return i&&r.handleCustomMonthChange(r.state.date)})}else this.props.openToDate&&!De(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var n=this.props.container||K3;return k.createElement(yh,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},k.createElement("div",{style:{display:"contents"},ref:this.containerRef},k.createElement(n,{className:ce("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly,inline:this.props.inline},this.renderAriaLiveRegion(),this.props.monthHeaderPosition==="top"&&this.renderPreviousButton(),this.props.monthHeaderPosition==="top"&&this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},t})(k.Component),j8=function(e){var t=e.icon,n=e.className,r=n===void 0?"":n,i=e.onClick,o="react-datepicker__calendar-icon";if(typeof t=="string")return k.createElement("i",{className:"".concat(o," ").concat(t," ").concat(r),"aria-hidden":"true",onClick:i});if(k.isValidElement(t)){var a=t;return k.cloneElement(a,{className:"".concat(a.props.className||""," ").concat(o," ").concat(r),onClick:function(s){typeof a.props.onClick=="function"&&a.props.onClick(s),typeof i=="function"&&i(s)}})}return k.createElement("svg",{className:"".concat(o," ").concat(r),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:i},k.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},ID=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;return r.portalRoot=null,r.el=document.createElement("div"),r}return t.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return Si.createPortal(this.props.children,this.el)},t})(k.Component),M8="[tabindex], a, button, input, select, textarea",R8=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},FD=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;return r.getTabChildren=function(){var i;return Array.prototype.slice.call((i=r.tabLoopRef.current)===null||i===void 0?void 0:i.querySelectorAll(M8),1,-1).filter(R8)},r.handleFocusStart=function(){var i=r.getTabChildren();i&&i.length>1&&i[i.length-1].focus()},r.handleFocusEnd=function(){var i=r.getTabChildren();i&&i.length>1&&i[0].focus()},r.tabLoopRef=k.createRef(),r}return t.prototype.render=function(){var n;return((n=this.props.enableTabLoop)!==null&&n!==void 0?n:t.defaultProps.enableTabLoop)?k.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},k.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,k.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t})(k.Component);function I8(e){function t(n){var r,i=typeof n.hidePopper=="boolean"?n.hidePopper:!0,o=k.useRef(null),a=U3(Ee({open:!i,whileElementsMounted:_3,placement:n.popperPlacement,middleware:Ci([T3({padding:15}),A3(10),N3({element:o})],(r=n.popperModifiers)!==null&&r!==void 0?r:[],!0)},n.popperProps)),s=Ee(Ee({},n),{hidePopper:i,popperProps:Ee(Ee({},a),{arrowRef:o})});return k.createElement(e,Ee({},s))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var F8=function(e){var t=e.className,n=e.wrapperClassName,r=e.hidePopper,i=r===void 0?!0:r,o=e.popperComponent,a=e.targetComponent,s=e.enableTabLoop,l=e.popperOnKeyDown,c=e.portalId,u=e.portalHost,d=e.popperProps,f=e.showArrow,p=e.popperTargetRef,m=e.monthHeaderPosition;k.useEffect(function(){p?.current&&d.refs.setPositionReference(p.current)},[p,d.refs]);var g=void 0;if(!i){var v=ce("react-datepicker-popper",!f&&"react-datepicker-popper-offset",m==="middle"&&"react-datepicker-popper--header-middle",m==="bottom"&&"react-datepicker-popper--header-bottom",t);g=k.createElement(FD,{enableTabLoop:s},k.createElement("div",{ref:d.refs.setFloating,style:d.floatingStyles,className:v,"data-placement":d.placement,onKeyDown:l},o,f&&k.createElement($3,{ref:d.arrowRef,context:d.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(g=k.createElement(e.popperContainer,{},g)),c&&!i&&(g=k.createElement(ID,{portalId:c,portalHost:u},g));var x=ce("react-datepicker-wrapper",n);return k.createElement(k.Fragment,null,k.createElement("div",{ref:d.refs.setReference,className:x},a),g)},L8=I8(F8);function D_(e,t){return e&&t?nr(e)!==nr(t)||Ce(e)!==Ce(t):e!==t}var Fm="Date input not valid.",LD=(function(e){Sn(t,e);function t(n){var r=e.call(this,n)||this;return r.calendar=null,r.input=null,r.getPreSelection=function(){var i=r.props.timeZone,o=r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:Me();return i?d_(o,i):o},r.modifyHolidays=function(){var i;return(i=r.props.holidays)===null||i===void 0?void 0:i.reduce(function(o,a){var s=xa(a.date,"yyyy-MM-dd",void 0,!1);return s?Ci(Ci([],o,!0),[Ee(Ee({},a),{date:s})],!1):o},[])},r.calcInitialState=function(){var i=r.props.timeZone,o=r.getPreSelection(),a=TD(r.props),s=ND(r.props),l=a&&Oi(o,yc(a))?a:s&&uo(o,h_(s))?s:o,c=r.props.selectsRange?r.props.startDate:r.props.selected;return c&&i&&(c=d_(c,i)),{open:r.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:c??l,highlightDates:__(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},r.getInputValue=function(){var i,o=r.props,a=o.locale,s=o.startDate,l=o.endDate,c=o.rangeSeparator,u=o.selected,d=o.selectedDates,f=o.selectsMultiple,p=o.selectsRange,m=o.formatMultipleDates,g=o.value,v=(i=r.props.dateFormat)!==null&&i!==void 0?i:t.defaultProps.dateFormat,x=r.state.inputValue;if(typeof g=="string")return g;if(typeof x=="string")return x;if(p)return X3(s,l,{dateFormat:v,locale:a,rangeSeparator:c});if(f){if(m){var _=function(w){return Jn(w,{dateFormat:v,locale:a})};return m(d??[],_)}return Q3(d??[],{dateFormat:v,locale:a})}return Jn(u,{dateFormat:v,locale:a})},r.resetHiddenStatus=function(){r.setState(Ee(Ee({},r.state),{wasHidden:!1}))},r.setHiddenStatus=function(){r.setState(Ee(Ee({},r.state),{wasHidden:!0}))},r.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&r.setHiddenStatus()},r.clearPreventFocusTimeout=function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)},r.setFocus=function(){var i,o;(o=(i=r.input)===null||i===void 0?void 0:i.focus)===null||o===void 0||o.call(i,{preventScroll:!0})},r.setBlur=function(){var i,o;(o=(i=r.input)===null||i===void 0?void 0:i.blur)===null||o===void 0||o.call(i),r.cancelFocusInput()},r.deferBlur=function(){requestAnimationFrame(function(){r.setBlur()})},r.setOpen=function(i,o){o===void 0&&(o=!1),r.setState({open:i,preSelection:i&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:Lm},function(){i||r.setState(function(a){return{focused:o?a.focused:!1}},function(){!o&&r.deferBlur(),r.setState({inputValue:null})})})},r.inputOk=function(){return Di(r.state.preSelection)},r.isCalendarOpen=function(){return r.props.open===void 0?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open},r.handleFocus=function(i){var o,a,s=r.state.wasHidden,l=s?r.state.open:!0;s&&r.resetHiddenStatus(),r.state.preventFocus||((a=(o=r.props).onFocus)===null||a===void 0||a.call(o,i),l&&!r.props.preventOpenOnFocus&&!r.props.readOnly&&r.setOpen(!0)),r.setState({focused:!0})},r.sendFocusBackToInput=function(){r.preventFocusTimeout&&r.clearPreventFocusTimeout(),r.setState({preventFocus:!0},function(){r.preventFocusTimeout=setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})})},r.cancelFocusInput=function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=void 0},r.deferFocusInput=function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout(function(){return r.setFocus()},1)},r.handleDropdownFocus=function(){r.cancelFocusInput()},r.resetInputValue=function(){r.setState(Ee(Ee({},r.state),{inputValue:null}))},r.handleBlur=function(i){var o,a;(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&((a=(o=r.props).onBlur)===null||a===void 0||a.call(o,i));var s=r.state.inputValue;if(typeof s=="string"&&s.length>0){var l=/[a-zA-Z0-9]/.test(s);!l&&r.props.selected&&r.setSelected(null,void 0,!0)}r.resetInputValue(),r.state.open&&r.props.open===!1&&r.setOpen(!1),r.setState({focused:!1})},r.handleCalendarClickOutside=function(i){var o,a;(a=(o=r.props).onClickOutside)===null||a===void 0||a.call(o,i),!r.props.inline&&!i.defaultPrevented&&r.setOpen(!1),r.props.withPortal&&i.preventDefault()},r.handleChange=function(){for(var i,o,a,s,l,c,u,d,f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];var m=f[0];if(!(r.props.onChangeRaw&&(r.props.onChangeRaw.apply(r,f),!m||typeof m.isDefaultPrevented!="function"||m.isDefaultPrevented()))){r.setState({inputValue:m?.target instanceof HTMLInputElement?m.target.value:null,lastPreSelectChange:$8});var g=r.props,v=g.selectsRange,x=g.startDate,_=g.endDate,w=(i=r.props.dateFormat)!==null&&i!==void 0?i:t.defaultProps.dateFormat,y=(o=r.props.strictParsing)!==null&&o!==void 0?o:t.defaultProps.strictParsing,E=m?.target instanceof HTMLInputElement?m.target.value:"";if(v){var S=r.props.rangeSeparator,P=S.trim(),D=E.split(w.includes(P)?S:P,2).map(function(B){return B.trim()}),T=D[0],R=D[1],A=xa(T??"",w,r.props.locale,y),C=A?xa(R??"",w,r.props.locale,y):null,j=((a=Ba(x))===null||a===void 0?void 0:a.getTime())!==A?.getTime(),N=((s=Ba(_))===null||s===void 0?void 0:s.getTime())!==C?.getTime();if(!j&&!N||A&&Fr(A,r.props)||C&&Fr(C,r.props))return;A&&r.setState({preSelection:A}),(c=(l=r.props).onChange)===null||c===void 0||c.call(l,[A,C],m)}else{var M=xa(E,w,r.props.locale,y,(u=r.props.selected)!==null&&u!==void 0?u:void 0);if(M||!E)r.setSelected(M,m,!0);else if(!r.props.inline){var L=G3(E,(d=r.state.preSelection)!==null&&d!==void 0?d:void 0);L&&(!r.props.minDate||!Oi(L,r.props.minDate))&&(!r.props.maxDate||!uo(L,r.props.maxDate))&&r.setState({preSelection:L})}}}},r.handleSelect=function(i,o,a){var s;if(!r.props.readOnly){var l=r.props,c=l.selectsRange,u=l.startDate,d=l.endDate,f=l.locale,p=l.swapRange,m=(s=r.props.dateFormat)!==null&&s!==void 0?s:t.defaultProps.dateFormat,g=!c||u&&!d&&(p||!Mm(i,u));if(r.props.shouldCloseOnSelect&&!r.props.showTimeSelect&&g&&r.sendFocusBackToInput(),r.props.onChangeRaw){var v=Jn(i,{dateFormat:m,locale:f});r.props.onChangeRaw(o,{date:i,formattedDate:v})}r.setSelected(i,o,!1,a),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect?r.setPreSelection(i):g&&r.setOpen(!1)}},r.setSelected=function(i,o,a,s){var l,c,u=r.props.timeZone,d=i;if(d&&u&&(d=Ki(d,u)),r.props.showYearPicker){if(d!==null&&vf(Ce(d),r.props))return}else if(r.props.showMonthYearPicker){if(d!==null&&AD(d,r.props))return}else if(d!==null&&Fr(d,r.props))return;var f=r.props,p=f.onChange,m=f.selectsRange,g=f.startDate,v=f.endDate,x=f.selectsMultiple,_=f.selectedDates,w=f.minTime,y=f.swapRange;if(!Wa(r.props.selected,d)||r.props.allowSameDay||m||x)if(d!==null&&(r.props.selected&&(!a||!r.props.showTimeSelect&&!r.props.showTimeSelectOnly&&!r.props.showTimeInput)&&(d=qi(d,{hour:An(r.props.selected),minute:Tn(r.props.selected),second:Go(r.props.selected)})),!a&&(r.props.showTimeSelect||r.props.showTimeSelectOnly)&&w&&(d=qi(d,{hour:w.getHours(),minute:w.getMinutes(),second:w.getSeconds()})),r.props.inline||r.setState({preSelection:d}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:s})),m){var E=p,S=!g&&!v,P=g&&!v,D=!g&&!!v,T=g&&v;S?E?.([d,null],o):P?d===null?E?.([null,null],o):Mm(d,g)?E?.(y?[d,g]:[d,null],o):E?.([g,d],o):D&&(d&&Mm(d,v)?E?.([d,v],o):E?.([d,null],o)),T&&E?.([d,null],o)}else if(x){var R=p;if(d!==null)if(!_?.length)R?.([d],o);else{var A=_.some(function(j){return De(j,d)});if(A){var C=_.filter(function(j){return!De(j,d)});R?.(C,o)}else R?.(Ci(Ci([],_,!0),[d],!1),o)}}else p?.(d,o);a||((c=(l=r.props).onSelect)===null||c===void 0||c.call(l,d,o),r.setState({inputValue:null}))},r.setPreSelection=function(i){if(!r.props.readOnly){var o=Di(r.props.minDate),a=Di(r.props.maxDate),s=!0;if(i){var l=yc(i);if(o&&a)s=Pa(i,r.props.minDate,r.props.maxDate);else if(o){var c=yc(r.props.minDate);s=uo(i,c)||Wa(l,c)}else if(a){var u=h_(r.props.maxDate);s=Oi(i,u)||Wa(l,u)}}s&&r.setState({preSelection:i})}},r.toggleCalendar=function(){r.setOpen(!r.state.open)},r.handleTimeChange=function(i,o){var a,s;if(!r.props.selectsMultiple){var l=r.props,c=l.selectsRange,u=l.startDate,d=l.endDate,f=l.onChange,p=l.timeZone;if(c){var m=f;if(o==="start"){if(u){var g=qi(u,{hour:An(i),minute:Tn(i)});r.setState({preSelection:g}),p&&(g=Ki(g,p)),m?.([g,d?p?Ki(d,p):d:null],void 0)}}else if(o==="end"){if(d){var v=qi(d,{hour:An(i),minute:Tn(i)});r.setState({preSelection:v}),p&&(v=Ki(v,p)),m?.([u?p?Ki(u,p):u:null,v],void 0)}}else{var x=u&&!d;if(x){var g=qi(u,{hour:An(i),minute:Tn(i)});r.setState({preSelection:g}),p&&(g=Ki(g,p)),m?.([g,null],void 0)}else if(u&&d){var v=qi(d,{hour:An(i),minute:Tn(i)});r.setState({preSelection:v}),p&&(v=Ki(v,p)),m?.([p?Ki(u,p):u,v],void 0)}else{var _=qi(r.getPreSelection(),{hour:An(i),minute:Tn(i)});r.setState({preSelection:_})}}}else{var w=r.props.selected?r.props.selected:r.getPreSelection(),_=r.props.selected?i:qi(w,{hour:An(i),minute:Tn(i)});r.setState({preSelection:_}),_&&p&&(_=Ki(_,p)),(s=(a=r.props).onChange)===null||s===void 0||s.call(a,_)}r.props.shouldCloseOnSelect&&!r.props.showTimeInput&&(r.sendFocusBackToInput(),r.setOpen(!1)),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})}},r.onInputClick=function(){var i,o;!r.props.disabled&&!r.props.readOnly&&r.setOpen(!0),(o=(i=r.props).onInputClick)===null||o===void 0||o.call(i)},r.handleTimeOnlyArrowKey=function(i){var o,a,s,l,c=Ba(r.props.selected)||r.state.preSelection||Me(),u=(o=r.props.timeIntervals)!==null&&o!==void 0?o:30,d=(a=r.props.dateFormat)!==null&&a!==void 0?a:t.defaultProps.dateFormat,f=Array.isArray(d)?d[0]:d,p=yc(c),m=An(c)*60+Tn(c),g=1440-u,v;if(i===se.ArrowUp){var x=Math.max(0,m-u);v=Hc(p,x)}else{var x=Math.min(g,m+u);v=Hc(p,x)}var _=gt(v,f||t.defaultProps.dateFormat,r.props.locale);if(r.setState({preSelection:v,inputValue:_}),!(r.props.selectsRange||r.props.selectsMultiple)){var w=r.props.selected?r.props.selected:r.getPreSelection(),y=r.props.selected?v:qi(w,{hour:An(v),minute:Tn(v)});(l=(s=r.props).onChange)===null||l===void 0||l.call(s,y),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),requestAnimationFrame(function(){r.scrollToTimeOption(v)})}},r.handleTimeOnlyEnterKey=function(i){var o,a,s,l,c=i.target,u=c.value,d=(o=r.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,f=r.props.timeFormat||"p",p=r.state.preSelection||Ba(r.props.selected)||Me(),m=xa(u,d,r.props.locale,(a=r.props.strictParsing)!==null&&a!==void 0?a:!1,p),g=p;if(m&&tr(m))g=m;else{var v=((s=r.calendar)===null||s===void 0?void 0:s.containerRef.current)instanceof Element&&r.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");if(v instanceof HTMLElement){var x=(l=v.textContent)===null||l===void 0?void 0:l.trim();if(x){var _=xa(x,f,r.props.locale,!1,p);_&&tr(_)&&(g=_)}}}r.handleTimeChange(g),r.setOpen(!1),r.sendFocusBackToInput()},r.scrollToTimeOption=function(i){var o,a;if(!((o=r.calendar)===null||o===void 0)&&o.containerRef.current){for(var s=r.calendar.containerRef.current,l=Array.from(s.querySelectorAll(".react-datepicker__time-list-item")),c=null,u=1/0,d=r.props.timeFormat||"p",f=0,p=l;f<p.length;f++){var m=p[f],g=(a=m.textContent)===null||a===void 0?void 0:a.trim();if(g){var v=xa(g,d,r.props.locale,!1,i);if(v&&tr(v)){if(jD(v,i)){c=m;break}var x=Math.abs(v.getTime()-i.getTime());x<u&&(u=x,c=m)}}}c&&(l.forEach(function(_){_.setAttribute("tabindex","-1")}),c.setAttribute("tabindex","0"),c.scrollIntoView({behavior:"smooth",block:"center"}))}},r.onInputKeyDown=function(i){var o,a,s,l,c,u;(a=(o=r.props).onKeyDown)===null||a===void 0||a.call(o,i);var d=i.key;if(!r.state.open&&!r.props.inline&&!r.props.preventOpenOnFocus){(d===se.ArrowDown||d===se.ArrowUp||d===se.Enter)&&((s=r.onInputClick)===null||s===void 0||s.call(r));return}if(r.state.open&&r.props.showTimeSelectOnly){if(d===se.ArrowDown||d===se.ArrowUp){i.preventDefault(),r.handleTimeOnlyArrowKey(d);return}if(d===se.Enter){i.preventDefault(),r.handleTimeOnlyEnterKey(i);return}}if(r.state.open){if(d===se.ArrowDown||d===se.ArrowUp){i.preventDefault();var f=r.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":r.props.showWeekPicker&&r.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':r.props.showFullMonthYearPicker||r.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',p=((l=r.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&r.calendar.containerRef.current.querySelector(f);p instanceof HTMLElement&&p.focus({preventScroll:!0});return}var m=Me(r.state.preSelection);d===se.Enter?(i.preventDefault(),i.target.blur(),r.inputOk()&&r.state.lastPreSelectChange===Lm?(r.handleSelect(m,i),!r.props.shouldCloseOnSelect&&r.setPreSelection(m)):r.setOpen(!1)):d===se.Escape?(i.preventDefault(),i.target.blur(),r.sendFocusBackToInput(),r.setOpen(!1)):d===se.Tab&&r.setOpen(!1),r.inputOk()||(u=(c=r.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Fm})}},r.onPortalKeyDown=function(i){var o=i.key;o===se.Escape&&(i.preventDefault(),r.setState({preventFocus:!0},function(){r.setOpen(!1),setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})}))},r.onDayKeyDown=function(i){var o,a,s,l,c,u,d=r.props,f=d.minDate,p=d.maxDate,m=d.disabledKeyboardNavigation,g=d.showWeekPicker,v=d.shouldCloseOnSelect,x=d.locale,_=d.calendarStartDay,w=d.adjustDateOnChange,y=d.inline;if((a=(o=r.props).onKeyDown)===null||a===void 0||a.call(o,i),!m){var E=i.key,S=i.shiftKey,P=Me(r.state.preSelection),D=function(A,C){var j=C;switch(A){case se.ArrowRight:j=g?Df(C,1):ii(C,1);break;case se.ArrowLeft:j=g?Zw(C):c6(C);break;case se.ArrowUp:j=Zw(C);break;case se.ArrowDown:j=Df(C,1);break;case se.PageUp:j=S?na(C,1):Ka(C,1);break;case se.PageDown:j=S?oi(C,1):ai(C,1);break;case se.Home:j=Xo(C,x,_);break;case se.End:j=e8(C);break}return j},T=function(A,C){for(var j=40,N=A,M=!1,L=0,B=D(A,C);!M;){if(L>=j){B=C;break}f&&B<f&&(N=se.ArrowRight,B=Fr(f,r.props)?D(N,B):f),p&&B>p&&(N=se.ArrowLeft,B=Fr(p,r.props)?D(N,B):p),Fr(B,r.props)?((N===se.PageUp||N===se.Home)&&(N=se.ArrowRight),(N===se.PageDown||N===se.End)&&(N=se.ArrowLeft),B=D(N,B)):M=!0,L++}return B};if(E===se.Enter){i.preventDefault(),r.handleSelect(P,i),!v&&r.setPreSelection(P);return}else if(E===se.Escape){i.preventDefault(),r.setOpen(!1),r.inputOk()||(l=(s=r.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Fm});return}var R=null;switch(E){case se.ArrowLeft:case se.ArrowRight:case se.ArrowUp:case se.ArrowDown:case se.PageUp:case se.PageDown:case se.Home:case se.End:R=T(E,P);break}if(!R){(u=(c=r.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Fm});return}i.preventDefault(),r.setState({lastPreSelectChange:Lm}),w&&r.setSelected(R),r.setPreSelection(R),y&&r.setState({shouldFocusDayInline:!0})}},r.onPopperKeyDown=function(i){var o=i.key;o===se.Escape&&(i.preventDefault(),r.sendFocusBackToInput(),r.setOpen(!1))},r.onClearClick=function(i){i&&i.preventDefault&&i.preventDefault(),r.sendFocusBackToInput();var o=r.props,a=o.selectsRange,s=o.onChange;s?.(a?[null,null]:null,i),r.setState({inputValue:null})},r.clear=function(){r.onClearClick()},r.onScroll=function(i){typeof r.props.closeOnScroll=="boolean"&&r.props.closeOnScroll?(i.target===document||i.target===document.documentElement||i.target===document.body)&&r.setOpen(!1):typeof r.props.closeOnScroll=="function"&&r.props.closeOnScroll(i)&&r.setOpen(!1)},r.handleMonthSelectedInChange=function(i){r.setState({monthSelectedIn:i})},r.renderCalendar=function(){var i,o;return!r.props.inline&&!r.isCalendarOpen()?null:k.createElement(N8,Ee({showMonthYearDropdown:void 0,ref:function(a){r.calendar=a}},r.props,r.state,{setOpen:r.setOpen,dateFormat:(i=r.props.dateFormatCalendar)!==null&&i!==void 0?i:t.defaultProps.dateFormatCalendar,onSelect:r.handleSelect,onClickOutside:r.handleCalendarClickOutside,holidays:f8(r.modifyHolidays()),outsideClickIgnoreClass:r.props.outsideClickIgnoreClass,onDropdownFocus:r.handleDropdownFocus,onTimeChange:r.handleTimeChange,className:r.props.calendarClassName,container:r.props.calendarContainer,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,setPreSelection:r.setPreSelection,dropdownMode:(o=r.props.dropdownMode)!==null&&o!==void 0?o:t.defaultProps.dropdownMode,onMonthSelectedInChange:r.handleMonthSelectedInChange}),r.props.children)},r.renderAriaLiveRegion=function(){var i,o=r.props.locale,a=(i=r.props.dateFormat)!==null&&i!==void 0?i:t.defaultProps.dateFormat,s=r.props.showTimeInput||r.props.showTimeSelect,l=s?"PPPPp":"PPPP",c;return r.props.selectsRange?c="Selected start date: ".concat(Jn(r.props.startDate,{dateFormat:l,locale:o}),". ").concat(r.props.endDate?"End date: "+Jn(r.props.endDate,{dateFormat:l,locale:o}):""):r.props.showTimeSelectOnly?c="Selected time: ".concat(Jn(r.props.selected,{dateFormat:a,locale:o})):r.props.showYearPicker?c="Selected year: ".concat(Jn(r.props.selected,{dateFormat:"yyyy",locale:o})):r.props.showMonthYearPicker?c="Selected month: ".concat(Jn(r.props.selected,{dateFormat:"MMMM yyyy",locale:o})):r.props.showQuarterYearPicker?c="Selected quarter: ".concat(Jn(r.props.selected,{dateFormat:"yyyy, QQQ",locale:o})):c="Selected date: ".concat(Jn(r.props.selected,{dateFormat:l,locale:o})),k.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},r.renderDateInput=function(){var i,o,a,s,l,c,u,d=ce(r.props.className,(i={},i[r.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=r.state.open,i)),f=r.props.customInput||k.createElement("input",{type:"text"}),p=r.props.customInputRef||"ref",m={},g=(a=r.props["aria-describedby"])!==null&&a!==void 0?a:r.props.ariaDescribedBy,v=(s=r.props["aria-invalid"])!==null&&s!==void 0?s:r.props.ariaInvalid,x=(l=r.props["aria-label"])!==null&&l!==void 0?l:r.props.ariaLabel,_=(c=r.props["aria-labelledby"])!==null&&c!==void 0?c:r.props.ariaLabelledBy,w=(u=r.props["aria-required"])!==null&&u!==void 0?u:r.props.ariaRequired;return g!=null&&(m["aria-describedby"]=g),v!=null&&(m["aria-invalid"]=v),x!=null&&(m["aria-label"]=x),_!=null&&(m["aria-labelledby"]=_),w!=null&&(m["aria-required"]=w),k.cloneElement(f,Ee((o={},o[p]=function(y){r.input=y},o.value=r.getInputValue(),o.onBlur=r.handleBlur,o.onChange=r.handleChange,o.onClick=r.onInputClick,o.onFocus=r.handleFocus,o.onKeyDown=r.onInputKeyDown,o.id=r.props.id,o.name=r.props.name,o.form=r.props.form,o.autoFocus=r.props.autoFocus,o.placeholder=r.props.placeholderText,o.disabled=r.props.disabled,o.autoComplete=r.props.autoComplete,o.className=ce(f.props.className,d),o.title=r.props.title,o.readOnly=r.props.readOnly,o.required=r.props.required,o.tabIndex=r.props.tabIndex,o),m))},r.renderClearButton=function(){var i=r.props,o=i.isClearable,a=i.disabled,s=i.selected,l=i.startDate,c=i.endDate,u=i.clearButtonTitle,d=i.clearButtonClassName,f=d===void 0?"":d,p=i.ariaLabelClose,m=p===void 0?"Close":p,g=i.selectedDates,v=i.readOnly;return o&&!v&&(s!=null||l!=null||c!=null||g?.length)?k.createElement("button",{type:"button",className:ce("react-datepicker__close-icon",f,{"react-datepicker__close-icon--disabled":a}),disabled:a,"aria-label":m,onClick:r.onClearClick,title:u,tabIndex:-1}):null},r.state=r.calcInitialState(),r.preventFocusTimeout=void 0,r}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:RD,readOnly:!1,rangeSeparator:PD,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Ou,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(n,r){var i,o,a,s;this.props.selectsRange&&D_(n.startDate,this.props.startDate)?this.setPreSelection(this.props.startDate):D_(n.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&n.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),this.props.selectsRange&&r.open===!1&&this.state.open===!0&&this.state.monthSelectedIn!==0&&this.setState({monthSelectedIn:0}),n.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:__(this.props.highlightDates)}),!r.focused&&!Wa(n.selected,this.props.selected)&&this.setState({inputValue:null}),r.open!==this.state.open&&(r.open===!1&&this.state.open===!0&&((o=(i=this.props).onCalendarOpen)===null||o===void 0||o.call(i)),r.open===!0&&this.state.open===!1&&((s=(a=this.props).onCalendarClose)===null||s===void 0||s.call(a)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var n=this.props,r=n.showIcon,i=n.icon,o=n.calendarIconClassname,a=n.calendarIconClassName,s=n.toggleCalendarOnIconClick,l=this.state.open;return o&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),k.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&k.createElement(j8,Ee({icon:i,className:ce(a,!a&&o,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},t.prototype.render=function(){var n=this.renderCalendar();if(this.props.inline)return n;if(this.props.withPortal){var r=this.state.open?k.createElement(FD,{enableTabLoop:this.props.enableTabLoop},k.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},n)):null;return this.state.open&&this.props.portalId&&(r=k.createElement(ID,Ee({portalId:this.props.portalId},this.props),r)),k.createElement(k.Fragment,null,this.renderInputContainer(),r)}return k.createElement(L8,Ee({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:n,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow,monthHeaderPosition:this.props.monthHeaderPosition}))},t})(k.Component),$8="input",Lm="navigate";const A_=e=>String(e).padStart(2,"0"),Ds=(e,t="start")=>e?`${[e.getFullYear(),A_(e.getMonth()+1),A_(e.getDate())].join("-")} ${t==="end"?"23:59:59":"00:00:00"}`:"";function B8({title:e,description:t,onExport:n}){const[r,i]=k.useState(!1),[o,a]=k.useState(!1),[s,l]=k.useState("Last 7 Days"),[c,u]=k.useState(null),[d,f]=k.useState(null),[p,m]=k.useState(!1),[g,v]=k.useState(!1),x=k.useRef(null),_=k.useRef(null),w=["Last 7 Days","Last 30 Days","This Month","Previous Month","Custom Range"],y=[{label:"Export as Excel",value:"xlsx"},{label:"Export as PDF",value:"pdf"}];k.useEffect(()=>{const A=C=>{x.current&&!x.current.contains(C.target)&&(i(!1),m(!1)),_.current&&!_.current.contains(C.target)&&a(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),k.useEffect(()=>{const A=new URLSearchParams(window.location.search),C=A.get(`${e.toLowerCase()}start_date`),j=A.get(`${e.toLowerCase()}end_date`);C&&j&&(u(new Date(C)),f(new Date(j)),l("Custom Range"))},[e]);const E=A=>{const C=new Date;C.setHours(0,0,0,0);let j,N;switch(A){case"Last 7 Days":j=new Date(C),j.setDate(C.getDate()-6),N=C;break;case"Last 30 Days":j=new Date(C),j.setDate(C.getDate()-29),N=C;break;case"This Month":j=new Date(C.getFullYear(),C.getMonth(),1),N=C;break;case"Previous Month":j=new Date(C.getFullYear(),C.getMonth()-1,1),N=new Date(C.getFullYear(),C.getMonth(),0);break;default:return null}return{start:Ds(j,"start"),end:Ds(N,"end")}},S=(A,C)=>{const j=new URLSearchParams(window.location.search);j.set(`${e.toLowerCase()}start_date`,A),j.set(`${e.toLowerCase()}end_date`,C),window.history.pushState({},"",`${window.location.pathname}?${j.toString()}`),window.dispatchEvent(new Event("dateRangeChange"))},P=A=>{if(A==="Custom Range"){l(A),m(!0),u(null),f(null);return}const C=E(A);C&&(l(A),i(!1),m(!1),S(C.start,C.end))},D=()=>{!c||!d||(S(Ds(c,"start"),Ds(d,"end")),i(!1),m(!1))},T=()=>s==="Custom Range"&&c&&d?`${c.toLocaleDateString()} - ${d.toLocaleDateString()}`:s,R=async A=>{v(!0),a(!1);try{let C,j;if(s==="Custom Range")C=Ds(c,"start"),j=Ds(d,"end");else{const N=E(s);C=N?.start,j=N?.end}await n?.({format:A,section:e,start:C,end:j})}finally{v(!1)}};return h.jsxs("div",{className:"flex items-center justify-between px-[24px] my-6",children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-[24px] font-semibold text-[#121212]",children:e}),h.jsx("div",{className:"text-gray-500 text-sm",children:t})]}),h.jsxs("div",{className:"flex gap-[12px]",children:[h.jsxs("div",{className:"relative",ref:x,children:[h.jsxs("button",{onClick:()=>i(A=>!A),className:"flex items-center gap-[8px] bg-gray-50 px-[16px] py-[8px].5 rounded-[8px] border border-gray-200 text-sm font-medium text-gray-700 hover:bg-gray-100 transition-colors",children:[h.jsx(J$,{fontSize:"small",className:"text-gray-600"}),T(),h.jsx(t5,{className:"text-gray-500"})]}),r&&h.jsx("div",{className:"absolute right-0 mt-2 bg-white rounded-[8px] shadow-xl border border-gray-200 z-50",children:p?h.jsxs("div",{className:"p-[16px] w-[360px]",children:[h.jsx(LD,{inline:!0,selectsRange:!0,startDate:c,endDate:d,onChange:([A,C])=>{u(A),f(C)},maxDate:new Date,showYearDropdown:!0,scrollableYearDropdown:!0,yearDropdownItemNumber:40}),h.jsxs("div",{className:"flex justify-between mt-4 gap-[8px]",children:[h.jsx("button",{onClick:()=>m(!1),className:"px-[16px] py-[8px] border border-gray-300 rounded-[8px] text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancel"}),h.jsx("button",{onClick:D,disabled:!c||!d,className:"px-[16px] py-[8px] bg-purple-600 text-white rounded-[8px] text-sm font-medium hover:bg-purple-700 disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]}):h.jsx("div",{className:"min-w-[200px] py-[4px]",children:w.map(A=>h.jsx("button",{onClick:()=>P(A),className:`w-full text-left px-[16px] py-[8px].5 text-sm hover:bg-purple-50 transition-colors ${s===A?"bg-purple-50 text-purple-600 font-medium":"text-gray-700"}`,children:A},A))})})]}),h.jsxs("div",{className:"relative",ref:_,children:[h.jsxs("button",{disabled:g,onClick:()=>a(A=>!A),className:"flex items-center gap-[8px] px-[16px] py-[8px].5 rounded-[8px] bg-purple-600 text-white font-medium text-sm hover:bg-purple-700 transition-colors disabled:bg-gray-400 disabled:cursor-not-allowed",children:[g?"Exporting...":"Export Report",h.jsx(e5,{fontSize:"small"})]}),o&&h.jsx("div",{className:"absolute right-0 mt-2 bg-white border border-gray-200 rounded-[8px] shadow-lg z-50 min-w-[180px]",children:y.map(A=>h.jsx("button",{onClick:()=>R(A.value),className:"block px-[16px] py-[8px].5 text-sm hover:bg-purple-50 w-full text-left text-gray-700 transition-colors first:rounded-t-lg last:rounded-b-lg",children:A.label},A.value))})]})]})]})}var $D={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},T_=k.createContext&&k.createContext($D),W8=["attr","size","title"];function z8(e,t){if(e==null)return{};var n=V8(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function V8(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bf(){return Bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bf.apply(this,arguments)}function N_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N_(Object(n),!0).forEach(function(r){H8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H8(e,t,n){return t=Y8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y8(e){var t=U8(e,"string");return typeof t=="symbol"?t:t+""}function U8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BD(e){return e&&e.map((t,n)=>k.createElement(t.tag,Wf({key:n},t.attr),BD(t.child)))}function yt(e){return t=>k.createElement(K8,Bf({attr:Wf({},e.attr)},t),BD(e.child))}function K8(e){var t=n=>{var{attr:r,size:i,title:o}=e,a=z8(e,W8),s=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),k.createElement("svg",Bf({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Wf(Wf({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&k.createElement("title",null,o),e.children)};return T_!==void 0?k.createElement(T_.Consumer,null,n=>t(n)):t($D)}function ia(e){return yt({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"},child:[]}]})(e)}function oa(e){return yt({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"},child:[]}]})(e)}function q8(e){return yt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M192 208c0-17.67-14.33-32-32-32h-16c-35.35 0-64 28.65-64 64v48c0 35.35 28.65 64 64 64h16c17.67 0 32-14.33 32-32V208zm176 144c35.35 0 64-28.65 64-64v-48c0-35.35-28.65-64-64-64h-16c-17.67 0-32 14.33-32 32v112c0 17.67 14.33 32 32 32h16zM256 0C113.18 0 4.58 118.83 0 256v16c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-16c0-114.69 93.31-208 208-208s208 93.31 208 208h-.12c.08 2.43.12 165.72.12 165.72 0 23.35-18.93 42.28-42.28 42.28H320c0-26.51-21.49-48-48-48h-32c-26.51 0-48 21.49-48 48s21.49 48 48 48h181.72c49.86 0 90.28-40.42 90.28-90.28V256C507.42 118.83 398.82 0 256 0z"},child:[]}]})(e)}function WD(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M9 22v-4h6v4"},child:[]},{tag:"path",attr:{d:"M8 6h.01"},child:[]},{tag:"path",attr:{d:"M16 6h.01"},child:[]},{tag:"path",attr:{d:"M12 6h.01"},child:[]},{tag:"path",attr:{d:"M12 10h.01"},child:[]},{tag:"path",attr:{d:"M12 14h.01"},child:[]},{tag:"path",attr:{d:"M16 10h.01"},child:[]},{tag:"path",attr:{d:"M16 14h.01"},child:[]},{tag:"path",attr:{d:"M8 10h.01"},child:[]},{tag:"path",attr:{d:"M8 14h.01"},child:[]}]})(e)}function G8(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2"},child:[]},{tag:"circle",attr:{cx:"7",cy:"17",r:"2"},child:[]},{tag:"path",attr:{d:"M9 17h6"},child:[]},{tag:"circle",attr:{cx:"17",cy:"17",r:"2"},child:[]}]})(e)}function Gb(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 4h3a2 2 0 0 1 2 2v14"},child:[]},{tag:"path",attr:{d:"M2 20h3"},child:[]},{tag:"path",attr:{d:"M13 20h9"},child:[]},{tag:"path",attr:{d:"M10 12v.01"},child:[]},{tag:"path",attr:{d:"M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z"},child:[]}]})(e)}function zD(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function zf(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z"},child:[]},{tag:"path",attr:{d:"M14 8H8"},child:[]},{tag:"path",attr:{d:"M16 12H8"},child:[]},{tag:"path",attr:{d:"M13 16H8"},child:[]}]})(e)}function VD(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"},child:[]},{tag:"path",attr:{d:"m9 12 2 2 4-4"},child:[]}]})(e)}function Xb(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]},{tag:"path",attr:{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]},{tag:"path",attr:{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]}]})(e)}function X8(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"},child:[]}]})(e)}function HD(e){return yt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z"},child:[]}]})(e)}function Qb(e){return yt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function Q8(e){return yt({attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 2 7 L 2 24 L 30 24 L 30 7 L 2 7 z M 6 9 L 26 9 C 26 10.105 26.895 11 28 11 L 28 20 C 26.895 20 26 20.895 26 22 L 6 22 C 6 20.895 5.105 20 4 20 L 4 11 C 5.105 11 6 10.105 6 9 z M 16 11 C 13.789 11 12 13.016 12 15.5 C 12 17.984 13.789 20 16 20 C 18.211 20 20 17.984 20 15.5 C 20 13.016 18.211 11 16 11 z M 16 13 C 17.102 13 18 14.121 18 15.5 C 18 16.879 17.102 18 16 18 C 14.898 18 14 16.879 14 15.5 C 14 14.121 14.898 13 16 13 z M 8.5 14 C 7.672 14 7 14.672 7 15.5 C 7 16.328 7.672 17 8.5 17 C 9.328 17 10 16.328 10 15.5 C 10 14.672 9.328 14 8.5 14 z M 23.5 14 C 22.672 14 22 14.672 22 15.5 C 22 16.328 22.672 17 23.5 17 C 24.328 17 25 16.328 25 15.5 C 25 14.672 24.328 14 23.5 14 z"},child:[]}]})(e)}const Z8=[{name:"Overview",icon:HD},{name:"Community",icon:WD},{name:"Financials",icon:Q8},{name:"Facilities",icon:Gb},{name:"Gate & Security",icon:Xb},{name:"Helpdesk",icon:q8},{name:"Engagement",icon:zD}];function J8(){const[e,t]=k.useState("Overview");return h.jsx("div",{className:"flex gap-[8px] p-[12px]",children:Z8.map(n=>{const r=n.icon,i=e===n.name;return h.jsxs("button",{onClick:()=>t(n.name),className:`flex items-center gap-[8px] rounded px-[16px] py-[12px] text-[14px] leading-[16px] font-medium transition
124
- ${i?"bg-[#FBF5FF] text-[#884EA7]":"bg-white text-[#64748B] hover:bg-gray-50"}`,children:[h.jsx(r,{className:"h-[15px] w-[15px] font-bold"}),n.name]},n.name)})})}function eW(e){return yt({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z"},child:[]}]})(e)}function tW(e){return yt({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"},child:[]}]})(e)}function nW(e){return yt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"},child:[]}]})(e)}var lr="top",zr="bottom",Vr="right",cr="left",Zb="auto",ku=[lr,zr,Vr,cr],al="start",qc="end",rW="clippingParents",YD="viewport",Ql="popper",iW="reference",j_=ku.reduce(function(e,t){return e.concat([t+"-"+al,t+"-"+qc])},[]),UD=[].concat(ku,[Zb]).reduce(function(e,t){return e.concat([t,t+"-"+al,t+"-"+qc])},[]),oW="beforeRead",aW="read",sW="afterRead",lW="beforeMain",cW="main",uW="afterMain",dW="beforeWrite",fW="write",pW="afterWrite",hW=[oW,aW,sW,lW,cW,uW,dW,fW,pW];function Ii(e){return e?(e.nodeName||"").toLowerCase():null}function Cr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function is(e){var t=Cr(e).Element;return e instanceof t||e instanceof Element}function Br(e){var t=Cr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Jb(e){if(typeof ShadowRoot>"u")return!1;var t=Cr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mW(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Br(o)||!Ii(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function gW(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(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Br(i)||!Ii(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const e0={name:"applyStyles",enabled:!0,phase:"write",fn:mW,effect:gW,requires:["computeStyles"]};function Ti(e){return e.split("-")[0]}var Ga=Math.max,Vf=Math.min,sl=Math.round;function iy(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function KD(){return!/^((?!chrome|android).)*safari/i.test(iy())}function ll(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Br(e)&&(i=e.offsetWidth>0&&sl(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&sl(r.height)/e.offsetHeight||1);var a=is(e)?Cr(e):window,s=a.visualViewport,l=!KD()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function t0(e){var t=ll(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 qD(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Jb(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xo(e){return Cr(e).getComputedStyle(e)}function vW(e){return["table","td","th"].indexOf(Ii(e))>=0}function fa(e){return((is(e)?e.ownerDocument:e.document)||window.document).documentElement}function bh(e){return Ii(e)==="html"?e:e.assignedSlot||e.parentNode||(Jb(e)?e.host:null)||fa(e)}function M_(e){return!Br(e)||xo(e).position==="fixed"?null:e.offsetParent}function yW(e){var t=/firefox/i.test(iy()),n=/Trident/i.test(iy());if(n&&Br(e)){var r=xo(e);if(r.position==="fixed")return null}var i=bh(e);for(Jb(i)&&(i=i.host);Br(i)&&["html","body"].indexOf(Ii(i))<0;){var o=xo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Pu(e){for(var t=Cr(e),n=M_(e);n&&vW(n)&&xo(n).position==="static";)n=M_(n);return n&&(Ii(n)==="html"||Ii(n)==="body"&&xo(n).position==="static")?t:n||yW(e)||t}function n0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dc(e,t,n){return Ga(e,Vf(t,n))}function bW(e,t,n){var r=Dc(e,t,n);return r>n?n:r}function GD(){return{top:0,right:0,bottom:0,left:0}}function XD(e){return Object.assign({},GD(),e)}function QD(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var xW=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,XD(typeof t!="number"?t:QD(t,ku))};function wW(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ti(n.placement),l=n0(s),c=[cr,Vr].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=xW(i.padding,n),f=t0(o),p=l==="y"?lr:cr,m=l==="y"?zr:Vr,g=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],x=Pu(o),_=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,w=g/2-v/2,y=d[p],E=_-f[u]-d[m],S=_/2-f[u]/2+w,P=Dc(y,S,E),D=l;n.modifiersData[r]=(t={},t[D]=P,t.centerOffset=P-S,t)}}function _W(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||qD(t.elements.popper,i)&&(t.elements.arrow=i))}const EW={name:"arrow",enabled:!0,phase:"main",fn:wW,effect:_W,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cl(e){return e.split("-")[1]}var SW={top:"auto",right:"auto",bottom:"auto",left:"auto"};function OW(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:sl(n*i)/i||0,y:sl(r*i)/i||0}}function R_(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,g=m===void 0?0:m,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var x=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),w=cr,y=lr,E=window;if(c){var S=Pu(n),P="clientHeight",D="clientWidth";if(S===Cr(n)&&(S=fa(n),xo(S).position!=="static"&&s==="absolute"&&(P="scrollHeight",D="scrollWidth")),S=S,i===lr||(i===cr||i===Vr)&&o===qc){y=zr;var T=d&&S===E&&E.visualViewport?E.visualViewport.height:S[P];g-=T-r.height,g*=l?1:-1}if(i===cr||(i===lr||i===zr)&&o===qc){w=Vr;var R=d&&S===E&&E.visualViewport?E.visualViewport.width:S[D];p-=R-r.width,p*=l?1:-1}}var A=Object.assign({position:s},c&&SW),C=u===!0?OW({x:p,y:g},Cr(n)):{x:p,y:g};if(p=C.x,g=C.y,l){var j;return Object.assign({},A,(j={},j[y]=_?"0":"",j[w]=x?"0":"",j.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",j))}return Object.assign({},A,(t={},t[y]=_?g+"px":"",t[w]=x?p+"px":"",t.transform="",t))}function CW(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Ti(t.placement),variation:cl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,R_(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,R_(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})}const kW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:CW,data:{}};var gd={passive:!0};function PW(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Cr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,gd)}),s&&l.addEventListener("resize",n.update,gd),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,gd)}),s&&l.removeEventListener("resize",n.update,gd)}}const DW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:PW,data:{}};var AW={left:"right",right:"left",bottom:"top",top:"bottom"};function yf(e){return e.replace(/left|right|bottom|top/g,function(t){return AW[t]})}var TW={start:"end",end:"start"};function I_(e){return e.replace(/start|end/g,function(t){return TW[t]})}function r0(e){var t=Cr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function i0(e){return ll(fa(e)).left+r0(e).scrollLeft}function NW(e,t){var n=Cr(e),r=fa(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=KD();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+i0(e),y:l}}function jW(e){var t,n=fa(e),r=r0(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ga(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Ga(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+i0(e),l=-r.scrollTop;return xo(i||n).direction==="rtl"&&(s+=Ga(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function o0(e){var t=xo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ZD(e){return["html","body","#document"].indexOf(Ii(e))>=0?e.ownerDocument.body:Br(e)&&o0(e)?e:ZD(bh(e))}function Ac(e,t){var n;t===void 0&&(t=[]);var r=ZD(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Cr(r),a=i?[o].concat(o.visualViewport||[],o0(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ac(bh(a)))}function oy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function MW(e,t){var n=ll(e,!1,t==="fixed");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}function F_(e,t,n){return t===YD?oy(NW(e,n)):is(t)?MW(t,n):oy(jW(fa(e)))}function RW(e){var t=Ac(bh(e)),n=["absolute","fixed"].indexOf(xo(e).position)>=0,r=n&&Br(e)?Pu(e):e;return is(r)?t.filter(function(i){return is(i)&&qD(i,r)&&Ii(i)!=="body"}):[]}function IW(e,t,n,r){var i=t==="clippingParents"?RW(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=F_(e,c,r);return l.top=Ga(u.top,l.top),l.right=Vf(u.right,l.right),l.bottom=Vf(u.bottom,l.bottom),l.left=Ga(u.left,l.left),l},F_(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 JD(e){var t=e.reference,n=e.element,r=e.placement,i=r?Ti(r):null,o=r?cl(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case lr:l={x:a,y:t.y-n.height};break;case zr:l={x:a,y:t.y+t.height};break;case Vr:l={x:t.x+t.width,y:s};break;case cr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?n0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case al:l[c]=l[c]-(t[u]/2-n[u]/2);break;case qc:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Gc(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?rW:s,c=n.rootBoundary,u=c===void 0?YD:c,d=n.elementContext,f=d===void 0?Ql:d,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,v=g===void 0?0:g,x=XD(typeof v!="number"?v:QD(v,ku)),_=f===Ql?iW:Ql,w=e.rects.popper,y=e.elements[m?_:f],E=IW(is(y)?y:y.contextElement||fa(e.elements.popper),l,u,a),S=ll(e.elements.reference),P=JD({reference:S,element:w,placement:i}),D=oy(Object.assign({},w,P)),T=f===Ql?D:S,R={top:E.top-T.top+x.top,bottom:T.bottom-E.bottom+x.bottom,left:E.left-T.left+x.left,right:T.right-E.right+x.right},A=e.modifiersData.offset;if(f===Ql&&A){var C=A[i];Object.keys(R).forEach(function(j){var N=[Vr,zr].indexOf(j)>=0?1:-1,M=[lr,zr].indexOf(j)>=0?"y":"x";R[j]+=C[M]*N})}return R}function FW(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?UD:l,u=cl(r),d=u?s?j_:j_.filter(function(m){return cl(m)===u}):ku,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,g){return m[g]=Gc(e,{placement:g,boundary:i,rootBoundary:o,padding:a})[Ti(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function LW(e){if(Ti(e)===Zb)return[];var t=yf(e);return[I_(e),t,I_(t)]}function $W(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,v=t.options.placement,x=Ti(v),_=x===v,w=l||(_||!m?[yf(v)]:LW(v)),y=[v].concat(w).reduce(function(J,re){return J.concat(Ti(re)===Zb?FW(t,{placement:re,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):re)},[]),E=t.rects.reference,S=t.rects.popper,P=new Map,D=!0,T=y[0],R=0;R<y.length;R++){var A=y[R],C=Ti(A),j=cl(A)===al,N=[lr,zr].indexOf(C)>=0,M=N?"width":"height",L=Gc(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),B=N?j?Vr:cr:j?zr:lr;E[M]>S[M]&&(B=yf(B));var V=yf(B),z=[];if(o&&z.push(L[C]<=0),s&&z.push(L[B]<=0,L[V]<=0),z.every(function(J){return J})){T=A,D=!1;break}P.set(A,z)}if(D)for(var W=m?3:1,Q=function(re){var ae=y.find(function(le){var ue=P.get(le);if(ue)return ue.slice(0,re).every(function(K){return K})});if(ae)return T=ae,"break"},X=W;X>0;X--){var ie=Q(X);if(ie==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}const BW={name:"flip",enabled:!0,phase:"main",fn:$W,requiresIfExists:["offset"],data:{_skip:!1}};function L_(e,t,n){return n===void 0&&(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 $_(e){return[lr,Vr,zr,cr].some(function(t){return e[t]>=0})}function WW(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Gc(t,{elementContext:"reference"}),s=Gc(t,{altBoundary:!0}),l=L_(a,r),c=L_(s,i,o),u=$_(l),d=$_(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})}const zW={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:WW};function VW(e,t,n){var r=Ti(e),i=[cr,lr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[cr,Vr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function HW(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=UD.reduce(function(u,d){return u[d]=VW(d,t.rects,o),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const YW={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:HW};function UW(e){var t=e.state,n=e.name;t.modifiersData[n]=JD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const KW={name:"popperOffsets",enabled:!0,phase:"read",fn:UW,data:{}};function qW(e){return e==="x"?"y":"x"}function GW(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,v=Gc(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),x=Ti(t.placement),_=cl(t.placement),w=!_,y=n0(x),E=qW(y),S=t.modifiersData.popperOffsets,P=t.rects.reference,D=t.rects.popper,T=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,R=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(S){if(o){var j,N=y==="y"?lr:cr,M=y==="y"?zr:Vr,L=y==="y"?"height":"width",B=S[y],V=B+v[N],z=B-v[M],W=p?-D[L]/2:0,Q=_===al?P[L]:D[L],X=_===al?-D[L]:-P[L],ie=t.elements.arrow,J=p&&ie?t0(ie):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:GD(),ae=re[N],le=re[M],ue=Dc(0,P[L],J[L]),K=w?P[L]/2-W-ue-ae-R.mainAxis:Q-ue-ae-R.mainAxis,U=w?-P[L]/2+W+ue+le+R.mainAxis:X+ue+le+R.mainAxis,Z=t.elements.arrow&&Pu(t.elements.arrow),I=Z?y==="y"?Z.clientTop||0:Z.clientLeft||0:0,me=(j=A?.[y])!=null?j:0,oe=B+K-me-I,ve=B+U-me,we=Dc(p?Vf(V,oe):V,B,p?Ga(z,ve):z);S[y]=we,C[y]=we-B}if(s){var Ne,qe=y==="x"?lr:cr,ut=y==="x"?zr:Vr,ot=S[E],je=E==="y"?"height":"width",bt=ot+v[qe],xt=ot-v[ut],dt=[lr,cr].indexOf(x)!==-1,cn=(Ne=A?.[E])!=null?Ne:0,Jt=dt?bt:ot-P[je]-D[je]-cn+R.altAxis,un=dt?ot+P[je]+D[je]-cn-R.altAxis:xt,Cn=p&&dt?bW(Jt,ot,un):Dc(p?Jt:bt,ot,p?un:xt);S[E]=Cn,C[E]=Cn-ot}t.modifiersData[r]=C}}const XW={name:"preventOverflow",enabled:!0,phase:"main",fn:GW,requiresIfExists:["offset"]};function QW(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ZW(e){return e===Cr(e)||!Br(e)?r0(e):QW(e)}function JW(e){var t=e.getBoundingClientRect(),n=sl(t.width)/e.offsetWidth||1,r=sl(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ez(e,t,n){n===void 0&&(n=!1);var r=Br(t),i=Br(t)&&JW(t),o=fa(t),a=ll(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ii(t)!=="body"||o0(o))&&(s=ZW(t)),Br(t)?(l=ll(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=i0(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function tz(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function nz(e){var t=tz(e);return hW.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function rz(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function iz(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var B_={placement:"bottom",modifiers:[],strategy:"absolute"};function W_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function oz(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?B_:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},B_,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(x){var _=typeof x=="function"?x(u.options):x;g(),u.options=Object.assign({},o,u.options,_),u.scrollParents={reference:is(s)?Ac(s):s.contextElement?Ac(s.contextElement):[],popper:Ac(l)};var w=nz(iz([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(y){return y.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var x=u.elements,_=x.reference,w=x.popper;if(W_(_,w)){u.rects={reference:ez(_,Pu(w),u.options.strategy==="fixed"),popper:t0(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(R){return u.modifiersData[R.name]=Object.assign({},R.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var E=u.orderedModifiers[y],S=E.fn,P=E.options,D=P===void 0?{}:P,T=E.name;typeof S=="function"&&(u=S({state:u,options:D,name:T,instance:p})||u)}}}},update:rz(function(){return new Promise(function(v){p.forceUpdate(),v(u)})}),destroy:function(){g(),f=!0}};if(!W_(s,l))return p;p.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function m(){u.orderedModifiers.forEach(function(v){var x=v.name,_=v.options,w=_===void 0?{}:_,y=v.effect;if(typeof y=="function"){var E=y({state:u,name:x,instance:p,options:w}),S=function(){};d.push(E||S)}})}function g(){d.forEach(function(v){return v()}),d=[]}return p}}var az=[DW,KW,kW,e0,YW,BW,XW,EW,zW],a0=oz({defaultModifiers:az}),sz="tippy-box",eA="tippy-content",lz="tippy-backdrop",tA="tippy-arrow",nA="tippy-svg-arrow",Da={passive:!0,capture:!0},rA=function(){return document.body};function cz(e,t){return{}.hasOwnProperty.call(e,t)}function $m(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function s0(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function iA(e,t){return typeof e=="function"?e.apply(void 0,t):e}function z_(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function uz(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function dz(e){return e.split(/\s+/).filter(Boolean)}function Ls(e){return[].concat(e)}function V_(e,t){e.indexOf(t)===-1&&e.push(t)}function fz(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function pz(e){return e.split("-")[0]}function Hf(e){return[].slice.call(e)}function H_(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Tc(){return document.createElement("div")}function Xc(e){return["Element","Fragment"].some(function(t){return s0(e,t)})}function hz(e){return s0(e,"NodeList")}function mz(e){return s0(e,"MouseEvent")}function gz(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function vz(e){return Xc(e)?[e]:hz(e)?Hf(e):Array.isArray(e)?e:Hf(document.querySelectorAll(e))}function Bm(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Y_(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function yz(e){var t,n=Ls(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function bz(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=pz(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function Wm(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function U_(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var xi={isTouch:!1},K_=0;function xz(){xi.isTouch||(xi.isTouch=!0,window.performance&&document.addEventListener("mousemove",oA))}function oA(){var e=performance.now();e-K_<20&&(xi.isTouch=!1,document.removeEventListener("mousemove",oA)),K_=e}function wz(){var e=document.activeElement;if(gz(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function _z(){document.addEventListener("touchstart",xz,Da),window.addEventListener("blur",wz)}var Ez=typeof window<"u"&&typeof document<"u",Sz=Ez?!!window.msCrypto:!1;function As(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function q_(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Oz(e){return q_(`
124
+ ${i?"bg-[#FBF5FF] text-[#884EA7]":"bg-white text-[#64748B] hover:bg-gray-50"}`,children:[h.jsx(r,{className:"h-[15px] w-[15px] font-bold"}),n.name]},n.name)})})}function eW(e){return yt({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z"},child:[]}]})(e)}function tW(e){return yt({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"},child:[]}]})(e)}function nW(e){return yt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"},child:[]}]})(e)}var lr="top",zr="bottom",Vr="right",cr="left",Zb="auto",ku=[lr,zr,Vr,cr],al="start",qc="end",rW="clippingParents",YD="viewport",Ql="popper",iW="reference",j_=ku.reduce(function(e,t){return e.concat([t+"-"+al,t+"-"+qc])},[]),UD=[].concat(ku,[Zb]).reduce(function(e,t){return e.concat([t,t+"-"+al,t+"-"+qc])},[]),oW="beforeRead",aW="read",sW="afterRead",lW="beforeMain",cW="main",uW="afterMain",dW="beforeWrite",fW="write",pW="afterWrite",hW=[oW,aW,sW,lW,cW,uW,dW,fW,pW];function Ii(e){return e?(e.nodeName||"").toLowerCase():null}function Cr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function is(e){var t=Cr(e).Element;return e instanceof t||e instanceof Element}function Br(e){var t=Cr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Jb(e){if(typeof ShadowRoot>"u")return!1;var t=Cr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mW(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Br(o)||!Ii(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function gW(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(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Br(i)||!Ii(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const e0={name:"applyStyles",enabled:!0,phase:"write",fn:mW,effect:gW,requires:["computeStyles"]};function Ti(e){return e.split("-")[0]}var Ga=Math.max,Vf=Math.min,sl=Math.round;function iy(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function KD(){return!/^((?!chrome|android).)*safari/i.test(iy())}function ll(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Br(e)&&(i=e.offsetWidth>0&&sl(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&sl(r.height)/e.offsetHeight||1);var a=is(e)?Cr(e):window,s=a.visualViewport,l=!KD()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function t0(e){var t=ll(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 qD(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Jb(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xo(e){return Cr(e).getComputedStyle(e)}function vW(e){return["table","td","th"].indexOf(Ii(e))>=0}function fa(e){return((is(e)?e.ownerDocument:e.document)||window.document).documentElement}function bh(e){return Ii(e)==="html"?e:e.assignedSlot||e.parentNode||(Jb(e)?e.host:null)||fa(e)}function M_(e){return!Br(e)||xo(e).position==="fixed"?null:e.offsetParent}function yW(e){var t=/firefox/i.test(iy()),n=/Trident/i.test(iy());if(n&&Br(e)){var r=xo(e);if(r.position==="fixed")return null}var i=bh(e);for(Jb(i)&&(i=i.host);Br(i)&&["html","body"].indexOf(Ii(i))<0;){var o=xo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Pu(e){for(var t=Cr(e),n=M_(e);n&&vW(n)&&xo(n).position==="static";)n=M_(n);return n&&(Ii(n)==="html"||Ii(n)==="body"&&xo(n).position==="static")?t:n||yW(e)||t}function n0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dc(e,t,n){return Ga(e,Vf(t,n))}function bW(e,t,n){var r=Dc(e,t,n);return r>n?n:r}function GD(){return{top:0,right:0,bottom:0,left:0}}function XD(e){return Object.assign({},GD(),e)}function QD(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var xW=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,XD(typeof t!="number"?t:QD(t,ku))};function wW(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ti(n.placement),l=n0(s),c=[cr,Vr].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=xW(i.padding,n),f=t0(o),p=l==="y"?lr:cr,m=l==="y"?zr:Vr,g=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],x=Pu(o),_=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,w=g/2-v/2,y=d[p],E=_-f[u]-d[m],S=_/2-f[u]/2+w,P=Dc(y,S,E),D=l;n.modifiersData[r]=(t={},t[D]=P,t.centerOffset=P-S,t)}}function _W(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||qD(t.elements.popper,i)&&(t.elements.arrow=i))}const EW={name:"arrow",enabled:!0,phase:"main",fn:wW,effect:_W,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cl(e){return e.split("-")[1]}var SW={top:"auto",right:"auto",bottom:"auto",left:"auto"};function OW(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:sl(n*i)/i||0,y:sl(r*i)/i||0}}function R_(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,g=m===void 0?0:m,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var x=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),w=cr,y=lr,E=window;if(c){var S=Pu(n),P="clientHeight",D="clientWidth";if(S===Cr(n)&&(S=fa(n),xo(S).position!=="static"&&s==="absolute"&&(P="scrollHeight",D="scrollWidth")),S=S,i===lr||(i===cr||i===Vr)&&o===qc){y=zr;var T=d&&S===E&&E.visualViewport?E.visualViewport.height:S[P];g-=T-r.height,g*=l?1:-1}if(i===cr||(i===lr||i===zr)&&o===qc){w=Vr;var R=d&&S===E&&E.visualViewport?E.visualViewport.width:S[D];p-=R-r.width,p*=l?1:-1}}var A=Object.assign({position:s},c&&SW),C=u===!0?OW({x:p,y:g},Cr(n)):{x:p,y:g};if(p=C.x,g=C.y,l){var j;return Object.assign({},A,(j={},j[y]=_?"0":"",j[w]=x?"0":"",j.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",j))}return Object.assign({},A,(t={},t[y]=_?g+"px":"",t[w]=x?p+"px":"",t.transform="",t))}function CW(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Ti(t.placement),variation:cl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,R_(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,R_(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})}const kW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:CW,data:{}};var gd={passive:!0};function PW(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Cr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,gd)}),s&&l.addEventListener("resize",n.update,gd),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,gd)}),s&&l.removeEventListener("resize",n.update,gd)}}const DW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:PW,data:{}};var AW={left:"right",right:"left",bottom:"top",top:"bottom"};function yf(e){return e.replace(/left|right|bottom|top/g,function(t){return AW[t]})}var TW={start:"end",end:"start"};function I_(e){return e.replace(/start|end/g,function(t){return TW[t]})}function r0(e){var t=Cr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function i0(e){return ll(fa(e)).left+r0(e).scrollLeft}function NW(e,t){var n=Cr(e),r=fa(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=KD();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+i0(e),y:l}}function jW(e){var t,n=fa(e),r=r0(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ga(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Ga(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+i0(e),l=-r.scrollTop;return xo(i||n).direction==="rtl"&&(s+=Ga(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function o0(e){var t=xo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ZD(e){return["html","body","#document"].indexOf(Ii(e))>=0?e.ownerDocument.body:Br(e)&&o0(e)?e:ZD(bh(e))}function Ac(e,t){var n;t===void 0&&(t=[]);var r=ZD(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Cr(r),a=i?[o].concat(o.visualViewport||[],o0(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Ac(bh(a)))}function oy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function MW(e,t){var n=ll(e,!1,t==="fixed");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}function F_(e,t,n){return t===YD?oy(NW(e,n)):is(t)?MW(t,n):oy(jW(fa(e)))}function RW(e){var t=Ac(bh(e)),n=["absolute","fixed"].indexOf(xo(e).position)>=0,r=n&&Br(e)?Pu(e):e;return is(r)?t.filter(function(i){return is(i)&&qD(i,r)&&Ii(i)!=="body"}):[]}function IW(e,t,n,r){var i=t==="clippingParents"?RW(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=F_(e,c,r);return l.top=Ga(u.top,l.top),l.right=Vf(u.right,l.right),l.bottom=Vf(u.bottom,l.bottom),l.left=Ga(u.left,l.left),l},F_(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 JD(e){var t=e.reference,n=e.element,r=e.placement,i=r?Ti(r):null,o=r?cl(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case lr:l={x:a,y:t.y-n.height};break;case zr:l={x:a,y:t.y+t.height};break;case Vr:l={x:t.x+t.width,y:s};break;case cr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?n0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case al:l[c]=l[c]-(t[u]/2-n[u]/2);break;case qc:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Gc(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?rW:s,c=n.rootBoundary,u=c===void 0?YD:c,d=n.elementContext,f=d===void 0?Ql:d,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,v=g===void 0?0:g,x=XD(typeof v!="number"?v:QD(v,ku)),_=f===Ql?iW:Ql,w=e.rects.popper,y=e.elements[m?_:f],E=IW(is(y)?y:y.contextElement||fa(e.elements.popper),l,u,a),S=ll(e.elements.reference),P=JD({reference:S,element:w,placement:i}),D=oy(Object.assign({},w,P)),T=f===Ql?D:S,R={top:E.top-T.top+x.top,bottom:T.bottom-E.bottom+x.bottom,left:E.left-T.left+x.left,right:T.right-E.right+x.right},A=e.modifiersData.offset;if(f===Ql&&A){var C=A[i];Object.keys(R).forEach(function(j){var N=[Vr,zr].indexOf(j)>=0?1:-1,M=[lr,zr].indexOf(j)>=0?"y":"x";R[j]+=C[M]*N})}return R}function FW(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?UD:l,u=cl(r),d=u?s?j_:j_.filter(function(m){return cl(m)===u}):ku,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,g){return m[g]=Gc(e,{placement:g,boundary:i,rootBoundary:o,padding:a})[Ti(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function LW(e){if(Ti(e)===Zb)return[];var t=yf(e);return[I_(e),t,I_(t)]}function $W(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,v=t.options.placement,x=Ti(v),_=x===v,w=l||(_||!m?[yf(v)]:LW(v)),y=[v].concat(w).reduce(function(J,re){return J.concat(Ti(re)===Zb?FW(t,{placement:re,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):re)},[]),E=t.rects.reference,S=t.rects.popper,P=new Map,D=!0,T=y[0],R=0;R<y.length;R++){var A=y[R],C=Ti(A),j=cl(A)===al,N=[lr,zr].indexOf(C)>=0,M=N?"width":"height",L=Gc(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),B=N?j?Vr:cr:j?zr:lr;E[M]>S[M]&&(B=yf(B));var V=yf(B),z=[];if(o&&z.push(L[C]<=0),s&&z.push(L[B]<=0,L[V]<=0),z.every(function(J){return J})){T=A,D=!1;break}P.set(A,z)}if(D)for(var W=m?3:1,Q=function(re){var ae=y.find(function(le){var ue=P.get(le);if(ue)return ue.slice(0,re).every(function(K){return K})});if(ae)return T=ae,"break"},G=W;G>0;G--){var ie=Q(G);if(ie==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}const BW={name:"flip",enabled:!0,phase:"main",fn:$W,requiresIfExists:["offset"],data:{_skip:!1}};function L_(e,t,n){return n===void 0&&(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 $_(e){return[lr,Vr,zr,cr].some(function(t){return e[t]>=0})}function WW(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Gc(t,{elementContext:"reference"}),s=Gc(t,{altBoundary:!0}),l=L_(a,r),c=L_(s,i,o),u=$_(l),d=$_(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})}const zW={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:WW};function VW(e,t,n){var r=Ti(e),i=[cr,lr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[cr,Vr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function HW(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=UD.reduce(function(u,d){return u[d]=VW(d,t.rects,o),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const YW={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:HW};function UW(e){var t=e.state,n=e.name;t.modifiersData[n]=JD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const KW={name:"popperOffsets",enabled:!0,phase:"read",fn:UW,data:{}};function qW(e){return e==="x"?"y":"x"}function GW(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,v=Gc(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),x=Ti(t.placement),_=cl(t.placement),w=!_,y=n0(x),E=qW(y),S=t.modifiersData.popperOffsets,P=t.rects.reference,D=t.rects.popper,T=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,R=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(S){if(o){var j,N=y==="y"?lr:cr,M=y==="y"?zr:Vr,L=y==="y"?"height":"width",B=S[y],V=B+v[N],z=B-v[M],W=p?-D[L]/2:0,Q=_===al?P[L]:D[L],G=_===al?-D[L]:-P[L],ie=t.elements.arrow,J=p&&ie?t0(ie):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:GD(),ae=re[N],le=re[M],ue=Dc(0,P[L],J[L]),K=w?P[L]/2-W-ue-ae-R.mainAxis:Q-ue-ae-R.mainAxis,U=w?-P[L]/2+W+ue+le+R.mainAxis:G+ue+le+R.mainAxis,Z=t.elements.arrow&&Pu(t.elements.arrow),I=Z?y==="y"?Z.clientTop||0:Z.clientLeft||0:0,me=(j=A?.[y])!=null?j:0,oe=B+K-me-I,ve=B+U-me,we=Dc(p?Vf(V,oe):V,B,p?Ga(z,ve):z);S[y]=we,C[y]=we-B}if(s){var Ne,qe=y==="x"?lr:cr,ut=y==="x"?zr:Vr,ot=S[E],je=E==="y"?"height":"width",bt=ot+v[qe],xt=ot-v[ut],dt=[lr,cr].indexOf(x)!==-1,cn=(Ne=A?.[E])!=null?Ne:0,Jt=dt?bt:ot-P[je]-D[je]-cn+R.altAxis,un=dt?ot+P[je]+D[je]-cn-R.altAxis:xt,Cn=p&&dt?bW(Jt,ot,un):Dc(p?Jt:bt,ot,p?un:xt);S[E]=Cn,C[E]=Cn-ot}t.modifiersData[r]=C}}const XW={name:"preventOverflow",enabled:!0,phase:"main",fn:GW,requiresIfExists:["offset"]};function QW(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ZW(e){return e===Cr(e)||!Br(e)?r0(e):QW(e)}function JW(e){var t=e.getBoundingClientRect(),n=sl(t.width)/e.offsetWidth||1,r=sl(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ez(e,t,n){n===void 0&&(n=!1);var r=Br(t),i=Br(t)&&JW(t),o=fa(t),a=ll(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ii(t)!=="body"||o0(o))&&(s=ZW(t)),Br(t)?(l=ll(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=i0(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function tz(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function nz(e){var t=tz(e);return hW.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function rz(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function iz(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var B_={placement:"bottom",modifiers:[],strategy:"absolute"};function W_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function oz(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?B_:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},B_,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(x){var _=typeof x=="function"?x(u.options):x;g(),u.options=Object.assign({},o,u.options,_),u.scrollParents={reference:is(s)?Ac(s):s.contextElement?Ac(s.contextElement):[],popper:Ac(l)};var w=nz(iz([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(y){return y.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var x=u.elements,_=x.reference,w=x.popper;if(W_(_,w)){u.rects={reference:ez(_,Pu(w),u.options.strategy==="fixed"),popper:t0(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(R){return u.modifiersData[R.name]=Object.assign({},R.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var E=u.orderedModifiers[y],S=E.fn,P=E.options,D=P===void 0?{}:P,T=E.name;typeof S=="function"&&(u=S({state:u,options:D,name:T,instance:p})||u)}}}},update:rz(function(){return new Promise(function(v){p.forceUpdate(),v(u)})}),destroy:function(){g(),f=!0}};if(!W_(s,l))return p;p.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function m(){u.orderedModifiers.forEach(function(v){var x=v.name,_=v.options,w=_===void 0?{}:_,y=v.effect;if(typeof y=="function"){var E=y({state:u,name:x,instance:p,options:w}),S=function(){};d.push(E||S)}})}function g(){d.forEach(function(v){return v()}),d=[]}return p}}var az=[DW,KW,kW,e0,YW,BW,XW,EW,zW],a0=oz({defaultModifiers:az}),sz="tippy-box",eA="tippy-content",lz="tippy-backdrop",tA="tippy-arrow",nA="tippy-svg-arrow",Da={passive:!0,capture:!0},rA=function(){return document.body};function cz(e,t){return{}.hasOwnProperty.call(e,t)}function $m(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function s0(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function iA(e,t){return typeof e=="function"?e.apply(void 0,t):e}function z_(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function uz(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function dz(e){return e.split(/\s+/).filter(Boolean)}function Ls(e){return[].concat(e)}function V_(e,t){e.indexOf(t)===-1&&e.push(t)}function fz(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function pz(e){return e.split("-")[0]}function Hf(e){return[].slice.call(e)}function H_(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Tc(){return document.createElement("div")}function Xc(e){return["Element","Fragment"].some(function(t){return s0(e,t)})}function hz(e){return s0(e,"NodeList")}function mz(e){return s0(e,"MouseEvent")}function gz(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function vz(e){return Xc(e)?[e]:hz(e)?Hf(e):Array.isArray(e)?e:Hf(document.querySelectorAll(e))}function Bm(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Y_(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function yz(e){var t,n=Ls(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function bz(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=pz(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function Wm(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function U_(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var xi={isTouch:!1},K_=0;function xz(){xi.isTouch||(xi.isTouch=!0,window.performance&&document.addEventListener("mousemove",oA))}function oA(){var e=performance.now();e-K_<20&&(xi.isTouch=!1,document.removeEventListener("mousemove",oA)),K_=e}function wz(){var e=document.activeElement;if(gz(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function _z(){document.addEventListener("touchstart",xz,Da),window.addEventListener("blur",wz)}var Ez=typeof window<"u"&&typeof document<"u",Sz=Ez?!!window.msCrypto:!1;function As(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function q_(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Oz(e){return q_(`
125
125
  %ctippy.js
126
126
 
127
127
  %c`+q_(e)+`
@@ -130,7 +130,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
130
130
  `)}function aA(e){return[Oz(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Qc;process.env.NODE_ENV!=="production"&&Cz();function Cz(){Qc=new Set}function Zi(e,t){if(e&&!Qc.has(t)){var n;Qc.add(t),(n=console).warn.apply(n,aA(t))}}function ay(e,t){if(e&&!Qc.has(t)){var n;Qc.add(t),(n=console).error.apply(n,aA(t))}}function kz(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;ay(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),ay(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var sA={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Pz={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},xr=Object.assign({appendTo:rA,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},sA,Pz),Dz=Object.keys(xr),Az=function(t){process.env.NODE_ENV!=="production"&&cA(t,[]);var n=Object.keys(t);n.forEach(function(r){xr[r]=t[r]})};function lA(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,a=i.defaultValue;if(o){var s;r[o]=e[o]!==void 0?e[o]:(s=xr[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function Tz(e,t){var n=t?Object.keys(lA(Object.assign({},xr,{plugins:t}))):Dz,r=n.reduce(function(i,o){var a=(e.getAttribute("data-tippy-"+o)||"").trim();if(!a)return i;if(o==="content")i[o]=a;else try{i[o]=JSON.parse(a)}catch{i[o]=a}return i},{});return r}function G_(e,t){var n=Object.assign({},t,{content:iA(t.content,[e])},t.ignoreAttributes?{}:Tz(e,t.plugins));return n.aria=Object.assign({},xr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function cA(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=uz(xr,Object.keys(sA)),o=!cz(i,r);o&&(o=t.filter(function(a){return a.name===r}).length===0),Zi(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
131
131
 
132
132
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
133
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Nz=function(){return"innerHTML"};function sy(e,t){e[Nz()]=t}function X_(e){var t=Tc();return e===!0?t.className=tA:(t.className=nA,Xc(e)?t.appendChild(e):sy(t,e)),t}function Q_(e,t){Xc(t.content)?(sy(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?sy(e,t.content):e.textContent=t.content)}function ly(e){var t=e.firstElementChild,n=Hf(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(eA)}),arrow:n.find(function(r){return r.classList.contains(tA)||r.classList.contains(nA)}),backdrop:n.find(function(r){return r.classList.contains(lz)})}}function uA(e){var t=Tc(),n=Tc();n.className=sz,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Tc();r.className=eA,r.setAttribute("data-state","hidden"),Q_(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=ly(t),l=s.box,c=s.content,u=s.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&Q_(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(X_(a.arrow))):l.appendChild(X_(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}uA.$$tippy=!0;var jz=1,vd=[],zm=[];function Mz(e,t){var n=G_(e,Object.assign({},xr,lA(H_(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=z_(oe,n.interactiveDebounce),g,v=jz++,x=null,_=fz(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:e,popper:Tc(),popperInstance:x,props:n,state:w,plugins:_,clearDelayTimeouts:Jt,setProps:un,setContent:Cn,show:Ht,hide:kn,hideWithInteractivity:ye,enable:dt,disable:cn,unmount:dn,destroy:Yt};if(!n.render)return process.env.NODE_ENV!=="production"&&ay(!0,"render() function has not been supplied."),y;var E=n.render(y),S=E.popper,P=E.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+y.id,y.popper=S,e._tippy=y,S._tippy=y;var D=_.map(function(F){return F.fn(y)}),T=e.hasAttribute("aria-expanded");return Z(),W(),B(),V("onCreate",[y]),n.showOnCreate&&bt(),S.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&N().addEventListener("mousemove",m)}),y;function R(){var F=y.props.touch;return Array.isArray(F)?F:[F,0]}function A(){return R()[0]==="hold"}function C(){var F;return!!((F=y.props.render)!=null&&F.$$tippy)}function j(){return g||e}function N(){var F=j().parentNode;return F?yz(F):document}function M(){return ly(S)}function L(F){return y.state.isMounted&&!y.state.isVisible||xi.isTouch||u&&u.type==="focus"?0:$m(y.props.delay,F?0:1,xr.delay)}function B(F){F===void 0&&(F=!1),S.style.pointerEvents=y.props.interactive&&!F?"":"none",S.style.zIndex=""+y.props.zIndex}function V(F,q,H){if(H===void 0&&(H=!0),D.forEach(function(ne){ne[F]&&ne[F].apply(ne,q)}),H){var ee;(ee=y.props)[F].apply(ee,q)}}function z(){var F=y.props.aria;if(F.content){var q="aria-"+F.content,H=S.id,ee=Ls(y.props.triggerTarget||e);ee.forEach(function(ne){var _e=ne.getAttribute(q);if(y.state.isVisible)ne.setAttribute(q,_e?_e+" "+H:H);else{var Oe=_e&&_e.replace(H,"").trim();Oe?ne.setAttribute(q,Oe):ne.removeAttribute(q)}})}}function W(){if(!(T||!y.props.aria.expanded)){var F=Ls(y.props.triggerTarget||e);F.forEach(function(q){y.props.interactive?q.setAttribute("aria-expanded",y.state.isVisible&&q===j()?"true":"false"):q.removeAttribute("aria-expanded")})}}function Q(){N().removeEventListener("mousemove",m),vd=vd.filter(function(F){return F!==m})}function X(F){if(!(xi.isTouch&&(l||F.type==="mousedown"))){var q=F.composedPath&&F.composedPath()[0]||F.target;if(!(y.props.interactive&&U_(S,q))){if(Ls(y.props.triggerTarget||e).some(function(H){return U_(H,q)})){if(xi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[y,F]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||ae())}}}function ie(){l=!0}function J(){l=!1}function re(){var F=N();F.addEventListener("mousedown",X,!0),F.addEventListener("touchend",X,Da),F.addEventListener("touchstart",J,Da),F.addEventListener("touchmove",ie,Da)}function ae(){var F=N();F.removeEventListener("mousedown",X,!0),F.removeEventListener("touchend",X,Da),F.removeEventListener("touchstart",J,Da),F.removeEventListener("touchmove",ie,Da)}function le(F,q){K(F,function(){!y.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&q()})}function ue(F,q){K(F,q)}function K(F,q){var H=M().box;function ee(ne){ne.target===H&&(Wm(H,"remove",ee),q())}if(F===0)return q();Wm(H,"remove",d),Wm(H,"add",ee),d=ee}function U(F,q,H){H===void 0&&(H=!1);var ee=Ls(y.props.triggerTarget||e);ee.forEach(function(ne){ne.addEventListener(F,q,H),p.push({node:ne,eventType:F,handler:q,options:H})})}function Z(){A()&&(U("touchstart",me,{passive:!0}),U("touchend",ve,{passive:!0})),dz(y.props.trigger).forEach(function(F){if(F!=="manual")switch(U(F,me),F){case"mouseenter":U("mouseleave",ve);break;case"focus":U(Sz?"focusout":"blur",we);break;case"focusin":U("focusout",we);break}})}function I(){p.forEach(function(F){var q=F.node,H=F.eventType,ee=F.handler,ne=F.options;q.removeEventListener(H,ee,ne)}),p=[]}function me(F){var q,H=!1;if(!(!y.state.isEnabled||Ne(F)||s)){var ee=((q=u)==null?void 0:q.type)==="focus";u=F,g=F.currentTarget,W(),!y.state.isVisible&&mz(F)&&vd.forEach(function(ne){return ne(F)}),F.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==!1&&y.state.isVisible?H=!0:bt(F),F.type==="click"&&(a=!H),H&&!ee&&xt(F)}}function oe(F){var q=F.target,H=j().contains(q)||S.contains(q);if(!(F.type==="mousemove"&&H)){var ee=je().concat(S).map(function(ne){var _e,Oe=ne._tippy,en=(_e=Oe.popperInstance)==null?void 0:_e.state;return en?{popperRect:ne.getBoundingClientRect(),popperState:en,props:n}:null}).filter(Boolean);bz(ee,F)&&(Q(),xt(F))}}function ve(F){var q=Ne(F)||y.props.trigger.indexOf("click")>=0&&a;if(!q){if(y.props.interactive){y.hideWithInteractivity(F);return}xt(F)}}function we(F){y.props.trigger.indexOf("focusin")<0&&F.target!==j()||y.props.interactive&&F.relatedTarget&&S.contains(F.relatedTarget)||xt(F)}function Ne(F){return xi.isTouch?A()!==F.type.indexOf("touch")>=0:!1}function qe(){ut();var F=y.props,q=F.popperOptions,H=F.placement,ee=F.offset,ne=F.getReferenceClientRect,_e=F.moveTransition,Oe=C()?ly(S).arrow:null,en=ne?{getBoundingClientRect:ne,contextElement:ne.contextElement||j()}:e,Jr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Xn){var vn=Xn.state;if(C()){var be=M(),tn=be.box;["placement","reference-hidden","escaped"].forEach(function(ti){ti==="placement"?tn.setAttribute("data-placement",vn.placement):vn.attributes.popper["data-popper-"+ti]?tn.setAttribute("data-"+ti,""):tn.removeAttribute("data-"+ti)}),vn.attributes.popper={}}}},Ut=[{name:"offset",options:{offset:ee}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!_e}},Jr];C()&&Oe&&Ut.push({name:"arrow",options:{element:Oe,padding:3}}),Ut.push.apply(Ut,q?.modifiers||[]),y.popperInstance=a0(en,S,Object.assign({},q,{placement:H,onFirstUpdate:f,modifiers:Ut}))}function ut(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function ot(){var F=y.props.appendTo,q,H=j();y.props.interactive&&F===rA||F==="parent"?q=H.parentNode:q=iA(F,[H]),q.contains(S)||q.appendChild(S),y.state.isMounted=!0,qe(),process.env.NODE_ENV!=="production"&&Zi(y.props.interactive&&F===xr.appendTo&&H.nextElementSibling!==S,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
133
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Nz=function(){return"innerHTML"};function sy(e,t){e[Nz()]=t}function X_(e){var t=Tc();return e===!0?t.className=tA:(t.className=nA,Xc(e)?t.appendChild(e):sy(t,e)),t}function Q_(e,t){Xc(t.content)?(sy(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?sy(e,t.content):e.textContent=t.content)}function ly(e){var t=e.firstElementChild,n=Hf(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(eA)}),arrow:n.find(function(r){return r.classList.contains(tA)||r.classList.contains(nA)}),backdrop:n.find(function(r){return r.classList.contains(lz)})}}function uA(e){var t=Tc(),n=Tc();n.className=sz,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Tc();r.className=eA,r.setAttribute("data-state","hidden"),Q_(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=ly(t),l=s.box,c=s.content,u=s.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&Q_(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(X_(a.arrow))):l.appendChild(X_(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}uA.$$tippy=!0;var jz=1,vd=[],zm=[];function Mz(e,t){var n=G_(e,Object.assign({},xr,lA(H_(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=z_(oe,n.interactiveDebounce),g,v=jz++,x=null,_=fz(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:e,popper:Tc(),popperInstance:x,props:n,state:w,plugins:_,clearDelayTimeouts:Jt,setProps:un,setContent:Cn,show:Ht,hide:kn,hideWithInteractivity:ye,enable:dt,disable:cn,unmount:dn,destroy:Yt};if(!n.render)return process.env.NODE_ENV!=="production"&&ay(!0,"render() function has not been supplied."),y;var E=n.render(y),S=E.popper,P=E.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+y.id,y.popper=S,e._tippy=y,S._tippy=y;var D=_.map(function(F){return F.fn(y)}),T=e.hasAttribute("aria-expanded");return Z(),W(),B(),V("onCreate",[y]),n.showOnCreate&&bt(),S.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&N().addEventListener("mousemove",m)}),y;function R(){var F=y.props.touch;return Array.isArray(F)?F:[F,0]}function A(){return R()[0]==="hold"}function C(){var F;return!!((F=y.props.render)!=null&&F.$$tippy)}function j(){return g||e}function N(){var F=j().parentNode;return F?yz(F):document}function M(){return ly(S)}function L(F){return y.state.isMounted&&!y.state.isVisible||xi.isTouch||u&&u.type==="focus"?0:$m(y.props.delay,F?0:1,xr.delay)}function B(F){F===void 0&&(F=!1),S.style.pointerEvents=y.props.interactive&&!F?"":"none",S.style.zIndex=""+y.props.zIndex}function V(F,q,H){if(H===void 0&&(H=!0),D.forEach(function(ne){ne[F]&&ne[F].apply(ne,q)}),H){var ee;(ee=y.props)[F].apply(ee,q)}}function z(){var F=y.props.aria;if(F.content){var q="aria-"+F.content,H=S.id,ee=Ls(y.props.triggerTarget||e);ee.forEach(function(ne){var _e=ne.getAttribute(q);if(y.state.isVisible)ne.setAttribute(q,_e?_e+" "+H:H);else{var Oe=_e&&_e.replace(H,"").trim();Oe?ne.setAttribute(q,Oe):ne.removeAttribute(q)}})}}function W(){if(!(T||!y.props.aria.expanded)){var F=Ls(y.props.triggerTarget||e);F.forEach(function(q){y.props.interactive?q.setAttribute("aria-expanded",y.state.isVisible&&q===j()?"true":"false"):q.removeAttribute("aria-expanded")})}}function Q(){N().removeEventListener("mousemove",m),vd=vd.filter(function(F){return F!==m})}function G(F){if(!(xi.isTouch&&(l||F.type==="mousedown"))){var q=F.composedPath&&F.composedPath()[0]||F.target;if(!(y.props.interactive&&U_(S,q))){if(Ls(y.props.triggerTarget||e).some(function(H){return U_(H,q)})){if(xi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[y,F]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||ae())}}}function ie(){l=!0}function J(){l=!1}function re(){var F=N();F.addEventListener("mousedown",G,!0),F.addEventListener("touchend",G,Da),F.addEventListener("touchstart",J,Da),F.addEventListener("touchmove",ie,Da)}function ae(){var F=N();F.removeEventListener("mousedown",G,!0),F.removeEventListener("touchend",G,Da),F.removeEventListener("touchstart",J,Da),F.removeEventListener("touchmove",ie,Da)}function le(F,q){K(F,function(){!y.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&q()})}function ue(F,q){K(F,q)}function K(F,q){var H=M().box;function ee(ne){ne.target===H&&(Wm(H,"remove",ee),q())}if(F===0)return q();Wm(H,"remove",d),Wm(H,"add",ee),d=ee}function U(F,q,H){H===void 0&&(H=!1);var ee=Ls(y.props.triggerTarget||e);ee.forEach(function(ne){ne.addEventListener(F,q,H),p.push({node:ne,eventType:F,handler:q,options:H})})}function Z(){A()&&(U("touchstart",me,{passive:!0}),U("touchend",ve,{passive:!0})),dz(y.props.trigger).forEach(function(F){if(F!=="manual")switch(U(F,me),F){case"mouseenter":U("mouseleave",ve);break;case"focus":U(Sz?"focusout":"blur",we);break;case"focusin":U("focusout",we);break}})}function I(){p.forEach(function(F){var q=F.node,H=F.eventType,ee=F.handler,ne=F.options;q.removeEventListener(H,ee,ne)}),p=[]}function me(F){var q,H=!1;if(!(!y.state.isEnabled||Ne(F)||s)){var ee=((q=u)==null?void 0:q.type)==="focus";u=F,g=F.currentTarget,W(),!y.state.isVisible&&mz(F)&&vd.forEach(function(ne){return ne(F)}),F.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==!1&&y.state.isVisible?H=!0:bt(F),F.type==="click"&&(a=!H),H&&!ee&&xt(F)}}function oe(F){var q=F.target,H=j().contains(q)||S.contains(q);if(!(F.type==="mousemove"&&H)){var ee=je().concat(S).map(function(ne){var _e,Oe=ne._tippy,en=(_e=Oe.popperInstance)==null?void 0:_e.state;return en?{popperRect:ne.getBoundingClientRect(),popperState:en,props:n}:null}).filter(Boolean);bz(ee,F)&&(Q(),xt(F))}}function ve(F){var q=Ne(F)||y.props.trigger.indexOf("click")>=0&&a;if(!q){if(y.props.interactive){y.hideWithInteractivity(F);return}xt(F)}}function we(F){y.props.trigger.indexOf("focusin")<0&&F.target!==j()||y.props.interactive&&F.relatedTarget&&S.contains(F.relatedTarget)||xt(F)}function Ne(F){return xi.isTouch?A()!==F.type.indexOf("touch")>=0:!1}function qe(){ut();var F=y.props,q=F.popperOptions,H=F.placement,ee=F.offset,ne=F.getReferenceClientRect,_e=F.moveTransition,Oe=C()?ly(S).arrow:null,en=ne?{getBoundingClientRect:ne,contextElement:ne.contextElement||j()}:e,Jr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Xn){var vn=Xn.state;if(C()){var be=M(),tn=be.box;["placement","reference-hidden","escaped"].forEach(function(ti){ti==="placement"?tn.setAttribute("data-placement",vn.placement):vn.attributes.popper["data-popper-"+ti]?tn.setAttribute("data-"+ti,""):tn.removeAttribute("data-"+ti)}),vn.attributes.popper={}}}},Ut=[{name:"offset",options:{offset:ee}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!_e}},Jr];C()&&Oe&&Ut.push({name:"arrow",options:{element:Oe,padding:3}}),Ut.push.apply(Ut,q?.modifiers||[]),y.popperInstance=a0(en,S,Object.assign({},q,{placement:H,onFirstUpdate:f,modifiers:Ut}))}function ut(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function ot(){var F=y.props.appendTo,q,H=j();y.props.interactive&&F===rA||F==="parent"?q=H.parentNode:q=iA(F,[H]),q.contains(S)||q.appendChild(S),y.state.isMounted=!0,qe(),process.env.NODE_ENV!=="production"&&Zi(y.props.interactive&&F===xr.appendTo&&H.nextElementSibling!==S,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
134
134
 
135
135
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
136
136
 
@@ -217,7 +217,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
217
217
  `);if(r>0){var{circleTangency:w,lineTangency:y,theta:E}=Ad({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:S,lineTangency:P,theta:D}=Ad({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),T=s?Math.abs(l-c):Math.abs(l-c)-E-D;if(T<0&&o===0)return"".concat(_,"L").concat(t,",").concat(n,"Z");_+="L".concat(P.x,",").concat(P.y,`
218
218
  A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,`
219
219
  A`).concat(r,",").concat(r,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(w.x,",").concat(w.y,`
220
- A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,"Z")}else _+="L".concat(t,",").concat(n,"Z");return _},hU={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},KT=e=>{var t=an(e,hU),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=ce("recharts-sector",d),p=o-i,m=In(a,p,0,!0),g;return m>0&&Math.abs(c-u)<360?g=pU({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):g=UT({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",jy({},pt(t,!0),{className:f,d:g}))};function mU(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Xt(s,l,c,d),p=Xt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return YT(t);return[{x:r,y:i},{x:o,y:a}]}var Ug={},Kg={},qg={},XS;function gU(){return XS||(XS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GA();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(qg)),qg}var QS;function vU(){return QS||(QS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gU();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(Kg)),Kg}var ZS;function yU(){return ZS||(ZS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XA(),n=vU();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(Ug)),Ug}var Gg,JS;function bU(){return JS||(JS=1,Gg=yU().range),Gg}var xU=bU();const qT=Co(xU);function Qo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wU(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function N0(e){let t,n,r;e.length!==2?(t=Qo,n=(s,l)=>Qo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Qo||e===wU?e:_U,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function _U(){return 0}function GT(e){return e===null?NaN:+e}function*EU(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const SU=N0(Qo),$u=SU.right;N0(GT).center;class e2 extends Map{constructor(t,n=kU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(t2(this,t))}has(t){return super.has(t2(this,t))}set(t,n){return super.set(OU(this,t),n)}delete(t){return super.delete(CU(this,t))}}function t2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function OU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function CU({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function kU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function PU(e=Qo){if(e===Qo)return XT;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function XT(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const DU=Math.sqrt(50),AU=Math.sqrt(10),TU=Math.sqrt(2);function sp(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=DU?10:o>=AU?5:o>=TU?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?sp(e,t,n*2):[s,l,c]}function My(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?sp(t,e,n):sp(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function Ry(e,t,n){return t=+t,e=+e,n=+n,sp(e,t,n)[2]}function Iy(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Ry(t,e,n):Ry(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function n2(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function r2(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function QT(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?XT:PU(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));QT(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(nc(e,n,t),i(e[r],o)>0&&nc(e,n,r);a<s;){for(nc(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?nc(e,n,s):(++s,nc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function nc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function NU(e,t,n){if(e=Float64Array.from(EU(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return r2(e);if(t>=1)return n2(e);var r,i=(r-1)*t,o=Math.floor(i),a=n2(QT(e,o).subarray(0,o+1)),s=r2(e.subarray(o+1));return a+(s-a)*(i-o)}}function jU(e,t,n=GT){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function MU(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Qr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function No(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Fy=Symbol("implicit");function j0(){var e=new e2,t=[],n=[],r=Fy;function i(o){let a=e.get(o);if(a===void 0){if(r!==Fy)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new e2;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return j0(t,n).unknown(r)},Qr.apply(i,arguments),i}function M0(){var e=j0().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,g=p?r:i;o=(g-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(g-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var v=MU(f).map(function(x){return m+o*x});return n(p?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return M0(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Qr.apply(d(),arguments)}function ZT(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ZT(t())},e}function RU(){return ZT(M0.apply(null,arguments).paddingInner(1))}function R0(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function JT(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Bu(){}var nu=.7,lp=1/nu,qs="\\s*([+-]?\\d+)\\s*",ru="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IU=/^#([0-9a-f]{3,8})$/,FU=new RegExp(`^rgb\\(${qs},${qs},${qs}\\)$`),LU=new RegExp(`^rgb\\(${Ni},${Ni},${Ni}\\)$`),$U=new RegExp(`^rgba\\(${qs},${qs},${qs},${ru}\\)$`),BU=new RegExp(`^rgba\\(${Ni},${Ni},${Ni},${ru}\\)$`),WU=new RegExp(`^hsl\\(${ru},${Ni},${Ni}\\)$`),zU=new RegExp(`^hsla\\(${ru},${Ni},${Ni},${ru}\\)$`),i2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};R0(Bu,iu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:o2,formatHex:o2,formatHex8:VU,formatHsl:HU,formatRgb:a2,toString:a2});function o2(){return this.rgb().formatHex()}function VU(){return this.rgb().formatHex8()}function HU(){return eN(this).formatHsl()}function a2(){return this.rgb().formatRgb()}function iu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=IU.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?s2(t):n===3?new or(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Td(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Td(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=FU.exec(e))?new or(t[1],t[2],t[3],1):(t=LU.exec(e))?new or(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$U.exec(e))?Td(t[1],t[2],t[3],t[4]):(t=BU.exec(e))?Td(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=WU.exec(e))?u2(t[1],t[2]/100,t[3]/100,1):(t=zU.exec(e))?u2(t[1],t[2]/100,t[3]/100,t[4]):i2.hasOwnProperty(e)?s2(i2[e]):e==="transparent"?new or(NaN,NaN,NaN,0):null}function s2(e){return new or(e>>16&255,e>>8&255,e&255,1)}function Td(e,t,n,r){return r<=0&&(e=t=n=NaN),new or(e,t,n,r)}function YU(e){return e instanceof Bu||(e=iu(e)),e?(e=e.rgb(),new or(e.r,e.g,e.b,e.opacity)):new or}function Ly(e,t,n,r){return arguments.length===1?YU(e):new or(e,t,n,r??1)}function or(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}R0(or,Ly,JT(Bu,{brighter(e){return e=e==null?lp:Math.pow(lp,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?nu:Math.pow(nu,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new or(Ja(this.r),Ja(this.g),Ja(this.b),cp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:l2,formatHex:l2,formatHex8:UU,formatRgb:c2,toString:c2}));function l2(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}`}function UU(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}${Va((isNaN(this.opacity)?1:this.opacity)*255)}`}function c2(){const e=cp(this.opacity);return`${e===1?"rgb(":"rgba("}${Ja(this.r)}, ${Ja(this.g)}, ${Ja(this.b)}${e===1?")":`, ${e})`}`}function cp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ja(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Va(e){return e=Ja(e),(e<16?"0":"")+e.toString(16)}function u2(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ri(e,t,n,r)}function eN(e){if(e instanceof ri)return new ri(e.h,e.s,e.l,e.opacity);if(e instanceof Bu||(e=iu(e)),!e)return new ri;if(e instanceof ri)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ri(a,s,l,e.opacity)}function KU(e,t,n,r){return arguments.length===1?eN(e):new ri(e,t,n,r??1)}function ri(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}R0(ri,KU,JT(Bu,{brighter(e){return e=e==null?lp:Math.pow(lp,e),new ri(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?nu:Math.pow(nu,e),new ri(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new or(Xg(e>=240?e-240:e+120,i,r),Xg(e,i,r),Xg(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ri(d2(this.h),Nd(this.s),Nd(this.l),cp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=cp(this.opacity);return`${e===1?"hsl(":"hsla("}${d2(this.h)}, ${Nd(this.s)*100}%, ${Nd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function d2(e){return e=(e||0)%360,e<0?e+360:e}function Nd(e){return Math.max(0,Math.min(1,e||0))}function Xg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const I0=e=>()=>e;function qU(e,t){return function(n){return e+n*t}}function GU(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function XU(e){return(e=+e)==1?tN:function(t,n){return n-t?GU(t,n,e):I0(isNaN(t)?n:t)}}function tN(e,t){var n=t-e;return n?qU(e,n):I0(isNaN(e)?t:e)}const f2=(function e(t){var n=XU(t);function r(i,o){var a=n((i=Ly(i)).r,(o=Ly(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=tN(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function QU(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function ZU(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function JU(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Pl(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function eK(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function up(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tK(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Pl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var $y=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qg=new RegExp($y.source,"g");function nK(e){return function(){return e}}function rK(e){return function(t){return e(t)+""}}function iK(e,t){var n=$y.lastIndex=Qg.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=$y.exec(e))&&(i=Qg.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:up(r,i)})),n=Qg.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?rK(l[0].x):nK(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Pl(e,t){var n=typeof t,r;return t==null||n==="boolean"?I0(t):(n==="number"?up:n==="string"?(r=iu(t))?(t=r,f2):iK:t instanceof iu?f2:t instanceof Date?eK:ZU(t)?QU:Array.isArray(t)?JU:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tK:up)(e,t)}function F0(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function oK(e,t){t===void 0&&(t=e,e=Pl);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function aK(e){return function(){return e}}function dp(e){return+e}var p2=[0,1];function Yn(e){return e}function By(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:aK(isNaN(t)?NaN:.5)}function sK(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function lK(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=By(i,r),o=n(a,o)):(r=By(r,i),o=n(o,a)),function(s){return o(r(s))}}function cK(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=By(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=$u(e,s,1,r)-1;return o[l](i[l](s))}}function Wu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Mh(){var e=p2,t=p2,n=Pl,r,i,o,a=Yn,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==Yn&&(a=sK(e[0],e[f-1])),s=f>2?cK:lK,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),up)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,dp),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=F0,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Yn,u()):a!==Yn},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function L0(){return Mh()(Yn,Yn)}function uK(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function fp(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hl(e){return e=fp(Math.abs(e)),e?e[1]:NaN}function dK(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function fK(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var pK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ou(e){if(!(t=pK.exec(e)))throw new Error("invalid format: "+e);var t;return new $0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ou.prototype=$0.prototype;function $0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}$0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function hK(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var nN;function mK(e,t){var n=fp(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(nN=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+fp(e,Math.max(0,t+o-1))[0]}function h2(e,t){var n=fp(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const m2={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:uK,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>h2(e*100,t),r:h2,s:mK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function g2(e){return e}var v2=Array.prototype.map,y2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gK(e){var t=e.grouping===void 0||e.thousands===void 0?g2:dK(v2.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?g2:fK(v2.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=ou(d);var f=d.fill,p=d.align,m=d.sign,g=d.symbol,v=d.zero,x=d.width,_=d.comma,w=d.precision,y=d.trim,E=d.type;E==="n"?(_=!0,E="g"):m2[E]||(w===void 0&&(w=12),y=!0,E="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var S=g==="$"?n:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",P=g==="$"?r:/[%p]/.test(E)?a:"",D=m2[E],T=/[defgprs%]/.test(E);w=w===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function R(A){var C=S,j=P,N,M,L;if(E==="c")j=D(A)+j,A="";else{A=+A;var B=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),y&&(A=hK(A)),B&&+A==0&&m!=="+"&&(B=!1),C=(B?m==="("?m:s:m==="-"||m==="("?"":m)+C,j=(E==="s"?y2[8+nN/3]:"")+j+(B&&m==="("?")":""),T){for(N=-1,M=A.length;++N<M;)if(L=A.charCodeAt(N),48>L||L>57){j=(L===46?i+A.slice(N+1):A.slice(N))+j,A=A.slice(0,N);break}}}_&&!v&&(A=t(A,1/0));var V=C.length+A.length+j.length,z=V<x?new Array(x-V+1).join(f):"";switch(_&&v&&(A=t(z+A,z.length?x-j.length:1/0),z=""),p){case"<":A=C+A+j+z;break;case"=":A=C+z+A+j;break;case"^":A=z.slice(0,V=z.length>>1)+C+A+j+z.slice(V);break;default:A=z+C+A+j;break}return o(A)}return R.toString=function(){return d+""},R}function u(d,f){var p=c((d=ou(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(hl(f)/3)))*3,g=Math.pow(10,-m),v=y2[8+m/3];return function(x){return p(g*x)+v}}return{format:c,formatPrefix:u}}var jd,B0,rN;vK({thousands:",",grouping:[3],currency:["$",""]});function vK(e){return jd=gK(e),B0=jd.format,rN=jd.formatPrefix,jd}function yK(e){return Math.max(0,-hl(Math.abs(e)))}function bK(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(hl(t)/3)))*3-hl(Math.abs(e)))}function xK(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hl(t)-hl(e))+1}function iN(e,t,n,r){var i=Iy(e,t,n),o;switch(r=ou(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=bK(i,a))&&(r.precision=o),rN(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=xK(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=yK(i))&&(r.precision=o-(r.type==="%")*2);break}}return B0(r)}function ha(e){var t=e.domain;return e.ticks=function(n){var r=t();return My(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return iN(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=Ry(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function oN(){var e=L0();return e.copy=function(){return Wu(e,oN())},Qr.apply(e,arguments),ha(e)}function aN(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,dp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return aN(e).unknown(t)},e=arguments.length?Array.from(e,dp):[0,1],ha(n)}function sN(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function b2(e){return Math.log(e)}function x2(e){return Math.exp(e)}function wK(e){return-Math.log(-e)}function _K(e){return-Math.exp(-e)}function EK(e){return isFinite(e)?+("1e"+e):e<0?0:e}function SK(e){return e===10?EK:e===Math.E?Math.exp:t=>Math.pow(e,t)}function OK(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function w2(e){return(t,n)=>-e(-t,n)}function W0(e){const t=e(b2,x2),n=t.domain;let r=10,i,o;function a(){return i=OK(r),o=SK(r),n()[0]<0?(i=w2(i),o=w2(o),e(wK,_K)):e(b2,x2),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,g;const v=s==null?10:+s;let x=[];if(!(r%1)&&p-f<v){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(g=f<0?m/o(-f):m*o(f),!(g<c)){if(g>u)break;x.push(g)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(g=f>0?m/o(-f):m*o(f),!(g<c)){if(g>u)break;x.push(g)}x.length*2<v&&(x=My(c,u,v))}else x=My(f,p,Math.min(p-f,v)).map(o);return d?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=ou(l)).precision==null&&(l.trim=!0),l=B0(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(sN(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function lN(){const e=W0(Mh()).domain([1,10]);return e.copy=()=>Wu(e,lN()).base(e.base()),Qr.apply(e,arguments),e}function _2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function E2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function z0(e){var t=1,n=e(_2(t),E2(t));return n.constant=function(r){return arguments.length?e(_2(t=+r),E2(t)):t},ha(n)}function cN(){var e=z0(Mh());return e.copy=function(){return Wu(e,cN()).constant(e.constant())},Qr.apply(e,arguments)}function S2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function CK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function kK(e){return e<0?-e*e:e*e}function V0(e){var t=e(Yn,Yn),n=1;function r(){return n===1?e(Yn,Yn):n===.5?e(CK,kK):e(S2(n),S2(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ha(t)}function H0(){var e=V0(Mh());return e.copy=function(){return Wu(e,H0()).exponent(e.exponent())},Qr.apply(e,arguments),e}function PK(){return H0.apply(null,arguments).exponent(.5)}function O2(e){return Math.sign(e)*e*e}function DK(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uN(){var e=L0(),t=[0,1],n=!1,r;function i(o){var a=DK(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(O2(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,dp)).map(O2)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return uN(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Qr.apply(i,arguments),ha(i)}function dN(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=jU(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[$u(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Qo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return dN().domain(e).range(t).unknown(r)},Qr.apply(o,arguments)}function fN(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[$u(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return fN().domain([e,t]).range(i).unknown(o)},Qr.apply(ha(a),arguments)}function pN(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[$u(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return pN().domain(e).range(t).unknown(n)},Qr.apply(i,arguments)}const Zg=new Date,Jg=new Date;function sn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>sn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(Zg.setTime(+o),Jg.setTime(+a),e(Zg),e(Jg),Math.floor(n(Zg,Jg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const pp=sn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);pp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?sn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):pp);pp.range;const oo=1e3,$r=oo*60,ao=$r*60,_o=ao*24,Y0=_o*7,C2=_o*30,ev=_o*365,Ha=sn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oo)},(e,t)=>(t-e)/oo,e=>e.getUTCSeconds());Ha.range;const U0=sn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oo)},(e,t)=>{e.setTime(+e+t*$r)},(e,t)=>(t-e)/$r,e=>e.getMinutes());U0.range;const K0=sn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*$r)},(e,t)=>(t-e)/$r,e=>e.getUTCMinutes());K0.range;const q0=sn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oo-e.getMinutes()*$r)},(e,t)=>{e.setTime(+e+t*ao)},(e,t)=>(t-e)/ao,e=>e.getHours());q0.range;const G0=sn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ao)},(e,t)=>(t-e)/ao,e=>e.getUTCHours());G0.range;const zu=sn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$r)/_o,e=>e.getDate()-1);zu.range;const Rh=sn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_o,e=>e.getUTCDate()-1);Rh.range;const hN=sn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_o,e=>Math.floor(e/_o));hN.range;function gs(e){return sn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*$r)/Y0)}const Ih=gs(0),hp=gs(1),AK=gs(2),TK=gs(3),ml=gs(4),NK=gs(5),jK=gs(6);Ih.range;hp.range;AK.range;TK.range;ml.range;NK.range;jK.range;function vs(e){return sn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Y0)}const Fh=vs(0),mp=vs(1),MK=vs(2),RK=vs(3),gl=vs(4),IK=vs(5),FK=vs(6);Fh.range;mp.range;MK.range;RK.range;gl.range;IK.range;FK.range;const X0=sn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());X0.range;const Q0=sn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Q0.range;const Eo=sn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Eo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Eo.range;const So=sn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());So.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});So.range;function mN(e,t,n,r,i,o){const a=[[Ha,1,oo],[Ha,5,5*oo],[Ha,15,15*oo],[Ha,30,30*oo],[o,1,$r],[o,5,5*$r],[o,15,15*$r],[o,30,30*$r],[i,1,ao],[i,3,3*ao],[i,6,6*ao],[i,12,12*ao],[r,1,_o],[r,2,2*_o],[n,1,Y0],[t,1,C2],[t,3,3*C2],[e,1,ev]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=N0(([,,v])=>v).right(a,f);if(p===a.length)return e.every(Iy(c/ev,u/ev,d));if(p===0)return pp.every(Math.max(Iy(c,u,d),1));const[m,g]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(g)}return[s,l]}const[LK,$K]=mN(So,Q0,Fh,hN,G0,K0),[BK,WK]=mN(Eo,X0,Ih,zu,q0,U0);function tv(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function nv(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function rc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zK(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=ic(i),u=oc(i),d=ic(o),f=oc(o),p=ic(a),m=oc(a),g=ic(s),v=oc(s),x=ic(l),_=oc(l),w={a:B,A:V,b:z,B:W,c:null,d:N2,e:N2,f:dq,g:wq,G:Eq,H:lq,I:cq,j:uq,L:gN,m:fq,M:pq,p:Q,q:X,Q:R2,s:I2,S:hq,u:mq,U:gq,V:vq,w:yq,W:bq,x:null,X:null,y:xq,Y:_q,Z:Sq,"%":M2},y={a:ie,A:J,b:re,B:ae,c:null,d:j2,e:j2,f:Pq,g:Lq,G:Bq,H:Oq,I:Cq,j:kq,L:yN,m:Dq,M:Aq,p:le,q:ue,Q:R2,s:I2,S:Tq,u:Nq,U:jq,V:Mq,w:Rq,W:Iq,x:null,X:null,y:Fq,Y:$q,Z:Wq,"%":M2},E={a:R,A,b:C,B:j,c:N,d:A2,e:A2,f:iq,g:D2,G:P2,H:T2,I:T2,j:eq,L:rq,m:JK,M:tq,p:T,q:ZK,Q:aq,s:sq,S:nq,u:KK,U:qK,V:GK,w:UK,W:XK,x:M,X:L,y:D2,Y:P2,Z:QK,"%":oq};w.x=S(n,w),w.X=S(r,w),w.c=S(t,w),y.x=S(n,y),y.X=S(r,y),y.c=S(t,y);function S(K,U){return function(Z){var I=[],me=-1,oe=0,ve=K.length,we,Ne,qe;for(Z instanceof Date||(Z=new Date(+Z));++me<ve;)K.charCodeAt(me)===37&&(I.push(K.slice(oe,me)),(Ne=k2[we=K.charAt(++me)])!=null?we=K.charAt(++me):Ne=we==="e"?" ":"0",(qe=U[we])&&(we=qe(Z,Ne)),I.push(we),oe=me+1);return I.push(K.slice(oe,me)),I.join("")}}function P(K,U){return function(Z){var I=rc(1900,void 0,1),me=D(I,K,Z+="",0),oe,ve;if(me!=Z.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(U&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(oe=nv(rc(I.y,0,1)),ve=oe.getUTCDay(),oe=ve>4||ve===0?mp.ceil(oe):mp(oe),oe=Rh.offset(oe,(I.V-1)*7),I.y=oe.getUTCFullYear(),I.m=oe.getUTCMonth(),I.d=oe.getUTCDate()+(I.w+6)%7):(oe=tv(rc(I.y,0,1)),ve=oe.getDay(),oe=ve>4||ve===0?hp.ceil(oe):hp(oe),oe=zu.offset(oe,(I.V-1)*7),I.y=oe.getFullYear(),I.m=oe.getMonth(),I.d=oe.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),ve="Z"in I?nv(rc(I.y,0,1)).getUTCDay():tv(rc(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(ve+5)%7:I.w+I.U*7-(ve+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,nv(I)):tv(I)}}function D(K,U,Z,I){for(var me=0,oe=U.length,ve=Z.length,we,Ne;me<oe;){if(I>=ve)return-1;if(we=U.charCodeAt(me++),we===37){if(we=U.charAt(me++),Ne=E[we in k2?U.charAt(me++):we],!Ne||(I=Ne(K,Z,I))<0)return-1}else if(we!=Z.charCodeAt(I++))return-1}return I}function T(K,U,Z){var I=c.exec(U.slice(Z));return I?(K.p=u.get(I[0].toLowerCase()),Z+I[0].length):-1}function R(K,U,Z){var I=p.exec(U.slice(Z));return I?(K.w=m.get(I[0].toLowerCase()),Z+I[0].length):-1}function A(K,U,Z){var I=d.exec(U.slice(Z));return I?(K.w=f.get(I[0].toLowerCase()),Z+I[0].length):-1}function C(K,U,Z){var I=x.exec(U.slice(Z));return I?(K.m=_.get(I[0].toLowerCase()),Z+I[0].length):-1}function j(K,U,Z){var I=g.exec(U.slice(Z));return I?(K.m=v.get(I[0].toLowerCase()),Z+I[0].length):-1}function N(K,U,Z){return D(K,t,U,Z)}function M(K,U,Z){return D(K,n,U,Z)}function L(K,U,Z){return D(K,r,U,Z)}function B(K){return a[K.getDay()]}function V(K){return o[K.getDay()]}function z(K){return l[K.getMonth()]}function W(K){return s[K.getMonth()]}function Q(K){return i[+(K.getHours()>=12)]}function X(K){return 1+~~(K.getMonth()/3)}function ie(K){return a[K.getUTCDay()]}function J(K){return o[K.getUTCDay()]}function re(K){return l[K.getUTCMonth()]}function ae(K){return s[K.getUTCMonth()]}function le(K){return i[+(K.getUTCHours()>=12)]}function ue(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var U=S(K+="",w);return U.toString=function(){return K},U},parse:function(K){var U=P(K+="",!1);return U.toString=function(){return K},U},utcFormat:function(K){var U=S(K+="",y);return U.toString=function(){return K},U},utcParse:function(K){var U=P(K+="",!0);return U.toString=function(){return K},U}}}var k2={"-":"",_:" ",0:"0"},mn=/^\s*\d+/,VK=/^%/,HK=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function YK(e){return e.replace(HK,"\\$&")}function ic(e){return new RegExp("^(?:"+e.map(YK).join("|")+")","i")}function oc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function UK(e,t,n){var r=mn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function KK(e,t,n){var r=mn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function qK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function GK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function XK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function P2(e,t,n){var r=mn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function D2(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function QK(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ZK(e,t,n){var r=mn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function JK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function A2(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function eq(e,t,n){var r=mn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function T2(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tq(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nq(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rq(e,t,n){var r=mn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function iq(e,t,n){var r=mn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oq(e,t,n){var r=VK.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aq(e,t,n){var r=mn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function sq(e,t,n){var r=mn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function N2(e,t){return Fe(e.getDate(),t,2)}function lq(e,t){return Fe(e.getHours(),t,2)}function cq(e,t){return Fe(e.getHours()%12||12,t,2)}function uq(e,t){return Fe(1+zu.count(Eo(e),e),t,3)}function gN(e,t){return Fe(e.getMilliseconds(),t,3)}function dq(e,t){return gN(e,t)+"000"}function fq(e,t){return Fe(e.getMonth()+1,t,2)}function pq(e,t){return Fe(e.getMinutes(),t,2)}function hq(e,t){return Fe(e.getSeconds(),t,2)}function mq(e){var t=e.getDay();return t===0?7:t}function gq(e,t){return Fe(Ih.count(Eo(e)-1,e),t,2)}function vN(e){var t=e.getDay();return t>=4||t===0?ml(e):ml.ceil(e)}function vq(e,t){return e=vN(e),Fe(ml.count(Eo(e),e)+(Eo(e).getDay()===4),t,2)}function yq(e){return e.getDay()}function bq(e,t){return Fe(hp.count(Eo(e)-1,e),t,2)}function xq(e,t){return Fe(e.getFullYear()%100,t,2)}function wq(e,t){return e=vN(e),Fe(e.getFullYear()%100,t,2)}function _q(e,t){return Fe(e.getFullYear()%1e4,t,4)}function Eq(e,t){var n=e.getDay();return e=n>=4||n===0?ml(e):ml.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function Sq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function j2(e,t){return Fe(e.getUTCDate(),t,2)}function Oq(e,t){return Fe(e.getUTCHours(),t,2)}function Cq(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function kq(e,t){return Fe(1+Rh.count(So(e),e),t,3)}function yN(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function Pq(e,t){return yN(e,t)+"000"}function Dq(e,t){return Fe(e.getUTCMonth()+1,t,2)}function Aq(e,t){return Fe(e.getUTCMinutes(),t,2)}function Tq(e,t){return Fe(e.getUTCSeconds(),t,2)}function Nq(e){var t=e.getUTCDay();return t===0?7:t}function jq(e,t){return Fe(Fh.count(So(e)-1,e),t,2)}function bN(e){var t=e.getUTCDay();return t>=4||t===0?gl(e):gl.ceil(e)}function Mq(e,t){return e=bN(e),Fe(gl.count(So(e),e)+(So(e).getUTCDay()===4),t,2)}function Rq(e){return e.getUTCDay()}function Iq(e,t){return Fe(mp.count(So(e)-1,e),t,2)}function Fq(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function Lq(e,t){return e=bN(e),Fe(e.getUTCFullYear()%100,t,2)}function $q(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function Bq(e,t){var n=e.getUTCDay();return e=n>=4||n===0?gl(e):gl.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function Wq(){return"+0000"}function M2(){return"%"}function R2(e){return+e}function I2(e){return Math.floor(+e/1e3)}var Ts,xN,wN;zq({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function zq(e){return Ts=zK(e),xN=Ts.format,Ts.parse,wN=Ts.utcFormat,Ts.utcParse,Ts}function Vq(e){return new Date(e)}function Hq(e){return e instanceof Date?+e:+new Date(+e)}function Z0(e,t,n,r,i,o,a,s,l,c){var u=L0(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),v=c("%I %p"),x=c("%a %d"),_=c("%b %d"),w=c("%B"),y=c("%Y");function E(S){return(l(S)<S?p:s(S)<S?m:a(S)<S?g:o(S)<S?v:r(S)<S?i(S)<S?x:_:n(S)<S?w:y)(S)}return u.invert=function(S){return new Date(d(S))},u.domain=function(S){return arguments.length?f(Array.from(S,Hq)):f().map(Vq)},u.ticks=function(S){var P=f();return e(P[0],P[P.length-1],S??10)},u.tickFormat=function(S,P){return P==null?E:c(P)},u.nice=function(S){var P=f();return(!S||typeof S.range!="function")&&(S=t(P[0],P[P.length-1],S??10)),S?f(sN(P,S)):u},u.copy=function(){return Wu(u,Z0(e,t,n,r,i,o,a,s,l,c))},u}function Yq(){return Qr.apply(Z0(BK,WK,Eo,X0,Ih,zu,q0,U0,Ha,xN).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Uq(){return Qr.apply(Z0(LK,$K,So,Q0,Fh,Rh,G0,K0,Ha,wN).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Lh(){var e=0,t=1,n,r,i,o,a=Yn,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(Pl),c.rangeRound=u(F0),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function ma(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _N(){var e=ha(Lh()(Yn));return e.copy=function(){return ma(e,_N())},No.apply(e,arguments)}function EN(){var e=W0(Lh()).domain([1,10]);return e.copy=function(){return ma(e,EN()).base(e.base())},No.apply(e,arguments)}function SN(){var e=z0(Lh());return e.copy=function(){return ma(e,SN()).constant(e.constant())},No.apply(e,arguments)}function J0(){var e=V0(Lh());return e.copy=function(){return ma(e,J0()).exponent(e.exponent())},No.apply(e,arguments)}function Kq(){return J0.apply(null,arguments).exponent(.5)}function ON(){var e=[],t=Yn;function n(r){if(r!=null&&!isNaN(r=+r))return t(($u(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Qo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>NU(e,o/r))},n.copy=function(){return ON(t).domain(e)},No.apply(n,arguments)}function $h(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=Yn,u,d=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+u(g))-o)*(r*g<r*o?s:l),c(d?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([e,t,n]=g,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(g){return arguments.length?(d=!!g,p):d},p.interpolator=function(g){return arguments.length?(c=g,p):c};function m(g){return function(v){var x,_,w;return arguments.length?([x,_,w]=v,c=oK(g,[x,_,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(Pl),p.rangeRound=m(F0),p.unknown=function(g){return arguments.length?(f=g,p):f},function(g){return u=g,i=g(e),o=g(t),a=g(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function CN(){var e=ha($h()(Yn));return e.copy=function(){return ma(e,CN())},No.apply(e,arguments)}function kN(){var e=W0($h()).domain([.1,1,10]);return e.copy=function(){return ma(e,kN()).base(e.base())},No.apply(e,arguments)}function PN(){var e=z0($h());return e.copy=function(){return ma(e,PN()).constant(e.constant())},No.apply(e,arguments)}function ex(){var e=V0($h());return e.copy=function(){return ma(e,ex()).exponent(e.exponent())},No.apply(e,arguments)}function qq(){return ex.apply(null,arguments).exponent(.5)}const wc=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:M0,scaleDiverging:CN,scaleDivergingLog:kN,scaleDivergingPow:ex,scaleDivergingSqrt:qq,scaleDivergingSymlog:PN,scaleIdentity:aN,scaleImplicit:Fy,scaleLinear:oN,scaleLog:lN,scaleOrdinal:j0,scalePoint:RU,scalePow:H0,scaleQuantile:dN,scaleQuantize:fN,scaleRadial:uN,scaleSequential:_N,scaleSequentialLog:EN,scaleSequentialPow:J0,scaleSequentialQuantile:ON,scaleSequentialSqrt:Kq,scaleSequentialSymlog:SN,scaleSqrt:PK,scaleSymlog:cN,scaleThreshold:pN,scaleTime:Yq,scaleUtc:Uq,tickFormat:iN},Symbol.toStringTag,{value:"Module"}));var ga=e=>e.chartData,tx=Y([ga],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Vu=(e,t,n,r)=>r?tx(e):ga(e);function vl(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(_n(t)&&_n(n))return!0}return!1}function F2(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function Gq(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(_n(n))i=n;else if(typeof n=="function")return;if(_n(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(vl(a))return a}}function Xq(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(vl(r))return F2(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(he(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&kS.test(i)){var l=kS.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(he(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&PS.test(o)){var u=PS.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(vl(f))return t==null?f:F2(f,t,n)}}}var Dl=1e9,Qq={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},rx,Et=!0,Ur="[DecimalError] ",es=Ur+"Invalid argument: ",nx=Ur+"Exponent out of range: ",Al=Math.floor,Na=Math.pow,Zq=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wr,fn=1e7,mt=7,DN=9007199254740991,gp=Al(DN/mt),pe={};pe.absoluteValue=pe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};pe.comparedTo=pe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};pe.decimalPlaces=pe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*mt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};pe.dividedBy=pe.div=function(e){return ho(this,new this.constructor(e))};pe.dividedToIntegerBy=pe.idiv=function(e){var t=this,n=t.constructor;return lt(ho(t,new n(e),0,1),n.precision)};pe.equals=pe.eq=function(e){return!this.cmp(e)};pe.exponent=function(){return Qt(this)};pe.greaterThan=pe.gt=function(e){return this.cmp(e)>0};pe.greaterThanOrEqualTo=pe.gte=function(e){return this.cmp(e)>=0};pe.isInteger=pe.isint=function(){return this.e>this.d.length-2};pe.isNegative=pe.isneg=function(){return this.s<0};pe.isPositive=pe.ispos=function(){return this.s>0};pe.isZero=function(){return this.s===0};pe.lessThan=pe.lt=function(e){return this.cmp(e)<0};pe.lessThanOrEqualTo=pe.lte=function(e){return this.cmp(e)<1};pe.logarithm=pe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(wr))throw Error(Ur+"NaN");if(n.s<1)throw Error(Ur+(n.s?"NaN":"-Infinity"));return n.eq(wr)?new r(0):(Et=!1,t=ho(au(n,o),au(e,o),o),Et=!0,lt(t,i))};pe.minus=pe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?NN(t,e):AN(t,(e.s=-e.s,e))};pe.modulo=pe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ur+"NaN");return n.s?(Et=!1,t=ho(n,e,0,1).times(e),Et=!0,n.minus(t)):lt(new r(n),i)};pe.naturalExponential=pe.exp=function(){return TN(this)};pe.naturalLogarithm=pe.ln=function(){return au(this)};pe.negated=pe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};pe.plus=pe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AN(t,e):NN(t,(e.s=-e.s,e))};pe.precision=pe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(es+e);if(t=Qt(i)+1,r=i.d.length-1,n=r*mt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};pe.squareRoot=pe.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ur+"NaN")}for(e=Qt(s),Et=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ki(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Al((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(ho(s,o,a+2)).times(.5),ki(o.d).slice(0,a)===(t=ki(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(lt(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Et=!0,lt(r,n)};pe.times=pe.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%fn|0,t=s/fn|0;o[i]=(o[i]+t)%fn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Et?lt(e,d.precision):e};pe.toDecimalPlaces=pe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Fi(e,0,Dl),t===void 0?t=r.rounding:Fi(t,0,8),lt(n,e+Qt(n)+1,t))};pe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=cs(r,!0):(Fi(e,0,Dl),t===void 0?t=i.rounding:Fi(t,0,8),r=lt(new i(r),e+1,t),n=cs(r,!0,e+1)),n};pe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?cs(i):(Fi(e,0,Dl),t===void 0?t=o.rounding:Fi(t,0,8),r=lt(new o(i),e+Qt(i)+1,t),n=cs(r.abs(),!1,e+Qt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};pe.toInteger=pe.toint=function(){var e=this,t=e.constructor;return lt(new t(e),Qt(e)+1,t.rounding)};pe.toNumber=function(){return+this};pe.toPower=pe.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(wr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ur+"Infinity");return s}if(s.eq(wr))return s;if(r=l.precision,e.eq(wr))return lt(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=DN){for(i=new l(wr),t=Math.ceil(r/mt+4),Et=!1;n%2&&(i=i.times(s),$2(i.d,t)),n=Al(n/2),n!==0;)s=s.times(s),$2(s.d,t);return Et=!0,e.s<0?new l(wr).div(i):lt(i,r)}}else if(o<0)throw Error(Ur+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Et=!1,i=e.times(au(s,r+c)),Et=!0,i=TN(i),i.s=o,i};pe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Qt(i),r=cs(i,n<=o.toExpNeg||n>=o.toExpPos)):(Fi(e,1,Dl),t===void 0?t=o.rounding:Fi(t,0,8),i=lt(new o(i),e,t),n=Qt(i),r=cs(i,e<=n||n<=o.toExpNeg,e)),r};pe.toSignificantDigits=pe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Fi(e,1,Dl),t===void 0?t=r.rounding:Fi(t,0,8)),lt(new r(n),e,t)};pe.toString=pe.valueOf=pe.val=pe.toJSON=pe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Qt(e),n=e.constructor;return cs(e,t<=n.toExpNeg||t>=n.toExpPos)};function AN(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Et?lt(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/mt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/fn|0,l[o]%=fn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Et?lt(t,d):t}function Fi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(es+e)}function ki(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=mt-r.length,n&&(o+=Bo(n)),o+=r;a=e[t],r=a+"",n=mt-r.length,n&&(o+=Bo(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var ho=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%fn|0,a=o/fn|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*fn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,g,v,x,_,w,y,E,S,P,D,T=r.constructor,R=r.s==i.s?1:-1,A=r.d,C=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Ur+"Division by zero");for(l=r.e-i.e,P=C.length,E=A.length,p=new T(R),m=p.d=[],c=0;C[c]==(A[c]||0);)++c;if(C[c]>(A[c]||0)&&--l,o==null?_=o=T.precision:a?_=o+(Qt(r)-Qt(i))+1:_=o,_<0)return new T(0);if(_=_/mt+2|0,c=0,P==1)for(u=0,C=C[0],_++;(c<E||u)&&_--;c++)w=u*fn+(A[c]||0),m[c]=w/C|0,u=w%C|0;else{for(u=fn/(C[0]+1)|0,u>1&&(C=e(C,u),A=e(A,u),P=C.length,E=A.length),y=P,g=A.slice(0,P),v=g.length;v<P;)g[v++]=0;D=C.slice(),D.unshift(0),S=C[0],C[1]>=fn/2&&++S;do u=0,s=t(C,g,P,v),s<0?(x=g[0],P!=v&&(x=x*fn+(g[1]||0)),u=x/S|0,u>1?(u>=fn&&(u=fn-1),d=e(C,u),f=d.length,v=g.length,s=t(d,g,f,v),s==1&&(u--,n(d,P<f?D:C,f))):(u==0&&(s=u=1),d=C.slice()),f=d.length,f<v&&d.unshift(0),n(g,d,v),s==-1&&(v=g.length,s=t(C,g,P,v),s<1&&(u++,n(g,P<v?D:C,v))),v=g.length):s===0&&(u++,g=[0]),m[c++]=u,s&&g[0]?g[v++]=A[y]||0:(g=[A[y]],v=1);while((y++<E||g[0]!==void 0)&&_--)}return m[0]||m.shift(),p.e=l,lt(p,a?o+Qt(p)+1:o)}})();function TN(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(Qt(e)>16)throw Error(nx+Qt(e));if(!e.s)return new u(wr);for(Et=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Na(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(wr),u.precision=s;;){if(i=lt(i.times(e),s),n=n.times(++l),a=o.plus(ho(i,n,s)),ki(a.d).slice(0,s)===ki(o.d).slice(0,s)){for(;c--;)o=lt(o.times(o),s);return u.precision=d,t==null?(Et=!0,lt(o,d)):o}o=a}}function Qt(e){for(var t=e.e*mt,n=e.d[0];n>=10;n/=10)t++;return t}function rv(e,t,n){if(t>e.LN10.sd())throw Et=!0,n&&(e.precision=n),Error(Ur+"LN10 precision limit exceeded");return lt(new e(e.LN10),t)}function Bo(e){for(var t="";e--;)t+="0";return t}function au(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,g=p.constructor,v=g.precision;if(p.s<1)throw Error(Ur+(p.s?"NaN":"-Infinity"));if(p.eq(wr))return new g(0);if(t==null?(Et=!1,c=v):c=t,p.eq(10))return t==null&&(Et=!0),rv(g,c);if(c+=f,g.precision=c,n=ki(m),r=n.charAt(0),o=Qt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ki(p.d),r=n.charAt(0),d++;o=Qt(p),r>1?(p=new g("0."+n),o++):p=new g(r+"."+n.slice(1))}else return l=rv(g,c+2,v).times(o+""),p=au(new g(r+"."+n.slice(1)),c-f).plus(l),g.precision=v,t==null?(Et=!0,lt(p,v)):p;for(s=a=p=ho(p.minus(wr),p.plus(wr),c),u=lt(p.times(p),c),i=3;;){if(a=lt(a.times(u),c),l=s.plus(ho(a,new g(i),c)),ki(l.d).slice(0,c)===ki(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(rv(g,c+2,v).times(o+""))),s=ho(s,new g(d),c),g.precision=v,t==null?(Et=!0,lt(s,v)):s;s=l,i+=2}}function L2(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Al(n/mt),e.d=[],r=(n+1)%mt,n<0&&(r+=mt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=mt;r<i;)e.d.push(+t.slice(r,r+=mt));t=t.slice(r),r=mt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Et&&(e.e>gp||e.e<-gp))throw Error(nx+n)}else e.s=0,e.e=0,e.d=[0];return e}function lt(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=mt,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/mt),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=mt,i=r-mt+a}if(n!==void 0&&(o=Na(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/Na(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=Qt(e),d.length=1,t=t-o-1,d[0]=Na(10,(mt-t%mt)%mt),e.e=Al(-t/mt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=Na(10,mt-r),d[u]=i>0?(c/Na(10,a-i)%Na(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==fn&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=fn)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Et&&(e.e>gp||e.e<-gp))throw Error(nx+Qt(e));return e}function NN(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),Et?lt(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/mt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=fn-1;--l[o],l[i]+=fn}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Et?lt(t,p):t):new f(0)}function cs(e,t,n){var r,i=Qt(e),o=ki(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Bo(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Bo(-i-1)+o,n&&(r=n-a)>0&&(o+=Bo(r))):i>=a?(o+=Bo(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Bo(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Bo(r))),e.s<0?"-"+o:o}function $2(e,t){if(e.length>t)return e.length=t,!0}function jN(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(es+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return L2(a,o.toString())}else if(typeof o!="string")throw Error(es+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Zq.test(o))L2(a,o);else throw Error(es+o)}if(i.prototype=pe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=jN,i.config=i.set=Jq,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Jq(e){if(!e||typeof e!="object")throw Error(Ur+"Object expected");var t,n,r,i=["precision",1,Dl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Al(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(es+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(es+n+": "+r);return this}var rx=jN(Qq);wr=new rx(1);const Je=rx;var eG=e=>e,MN={},RN=e=>e===MN,B2=e=>function t(){return arguments.length===0||arguments.length===1&&RN(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},IN=(e,t)=>e===1?t:B2(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==MN).length;return o>=e?t(...r):IN(e-o,B2(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>RN(u)?s.shift():u);return t(...c,...s)}))}),Bh=e=>IN(e.length,e),Wy=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},tG=Bh((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),nG=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return eG;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},zy=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),FN=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function LN(e){var t;return e===0?t=1:t=Math.floor(new Je(e).abs().log(10).toNumber())+1,t}function $N(e,t,n){for(var r=new Je(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}Bh((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});Bh((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});Bh((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var BN=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},WN=(e,t,n)=>{if(e.lte(0))return new Je(0);var r=LN(e.toNumber()),i=new Je(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Je(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Je(l.toNumber()):new Je(Math.ceil(l.toNumber()))},rG=(e,t,n)=>{var r=new Je(1),i=new Je(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Je(10).pow(LN(e)-1),i=new Je(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Je(Math.floor(e)))}else e===0?i=new Je(Math.floor((t-1)/2)):n||(i=new Je(Math.floor(e)));var a=Math.floor((t-1)/2),s=nG(tG(l=>i.add(new Je(l-a).mul(r)).toNumber()),Wy);return s(0,t)},zN=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Je(0),tickMin:new Je(0),tickMax:new Je(0)};var a=WN(new Je(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Je(0):(s=new Je(t).add(n).div(2),s=s.sub(new Je(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Je(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?zN(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Je(l).mul(a)),tickMax:s.add(new Je(c).mul(a))})};function iG(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=BN([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...Wy(0,r-1).map(()=>1/0)]:[...Wy(0,r-1).map(()=>-1/0),s];return t>n?zy(l):l}if(a===s)return rG(a,r,i);var{step:c,tickMin:u,tickMax:d}=zN(a,s,o,i,0),f=$N(u,d.add(new Je(.1).mul(c)),c);return t>n?zy(f):f}function oG(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=BN([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=WN(new Je(a).sub(o).div(s-1),i,0),c=[...$N(new Je(o),new Je(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?zy(c):c}var aG=FN(iG),sG=FN(oG),VN=e=>e.rootProps.maxBarSize,lG=e=>e.rootProps.barGap,HN=e=>e.rootProps.barCategoryGap,cG=e=>e.rootProps.barSize,Hu=e=>e.rootProps.stackOffset,ix=e=>e.options.chartName,ox=e=>e.rootProps.syncId,YN=e=>e.rootProps.syncMethod,ax=e=>e.options.eventEmitter,no={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},vr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Wh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},uG={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:no.angleAxisId,includeHidden:!1,name:void 0,reversed:no.reversed,scale:no.scale,tick:no.tick,tickCount:void 0,ticks:void 0,type:no.type,unit:void 0},dG={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:vr.type,unit:void 0},fG={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:no.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:no.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:no.scale,tick:no.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},pG={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:"category",unit:void 0},sx=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?fG:uG,lx=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?pG:dG,zh=e=>e.polarOptions,cx=Y([Do,Ao,on],kT),UN=Y([zh,cx],(e,t)=>{if(e!=null)return In(e.innerRadius,t,0)}),KN=Y([zh,cx],(e,t)=>{if(e!=null)return In(e.outerRadius,t,t*.8)}),hG=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},qN=Y([zh],hG);Y([sx,qN],Wh);var GN=Y([cx,UN,KN],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});Y([lx,GN],Wh);var XN=Y([ke,zh,UN,KN,Do,Ao],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:In(a,i,i/2),cy:In(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),Ct=(e,t)=>t,Yu=(e,t,n)=>n;function Vh(e){return e?.id}var ln=e=>{var t=ke(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Tl=e=>e.tooltip.settings.axisId,gn=e=>{var t=ln(e),n=Tl(e);return Uu(e,t,n)},QN=Y([gn],e=>e?.dataKey);function ZN(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=Vh(s);c.forEach((d,f)=>{var p=o==null||i?f:String(it(d,o,null)),m=it(d,s.dataKey,0),g;a.has(p)?g=a.get(p):g={},Object.assign(g,{[u]:m}),a.set(p,g)})}}),Array.from(a.values())}function Hh(e){return e.stackId!=null&&e.dataKey!=null}function W2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W2(Object(n),!0).forEach(function(r){mG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mG(e,t,n){return(t=gG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gG(e){var t=vG(e,"string");return typeof t=="symbol"?t:t+""}function vG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vy=[0,"auto"],pr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},JN=(e,t)=>e.cartesianAxis.xAxis[t],zi=(e,t)=>{var n=JN(e,t);return n??pr},hr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Vy,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Fu},ej=(e,t)=>e.cartesianAxis.yAxis[t],Vi=(e,t)=>{var n=ej(e,t);return n??hr},yG={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},ux=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??yG},zt=(e,t,n)=>{switch(t){case"xAxis":return zi(e,n);case"yAxis":return Vi(e,n);case"zAxis":return ux(e,n);case"angleAxis":return sx(e,n);case"radiusAxis":return lx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},bG=(e,t,n)=>{switch(t){case"xAxis":return zi(e,n);case"yAxis":return Vi(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Uu=(e,t,n)=>{switch(t){case"xAxis":return zi(e,n);case"yAxis":return Vi(e,n);case"angleAxis":return sx(e,n);case"radiusAxis":return lx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},tj=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function dx(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Ku=e=>e.graphicalItems.cartesianItems,xG=Y([Ct,Yu],dx),fx=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),qu=Y([Ku,zt,xG],fx),nj=Y([qu],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Hh)),rj=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),ij=Y([qu],rj),px=e=>e.map(t=>t.data).filter(Boolean).flat(1),wG=Y([qu],px),hx=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},mx=Y([wG,Vu],hx),gx=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:it(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:it(i,r)}))):e.map(r=>({value:r})),Yh=Y([mx,zt,qu],gx);function oj(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ys(e){return e.filter(t=>Hr(t)||t instanceof Date).map(Number).filter(t=>Fn(t)===!1)}function _G(e,t,n){return!n||typeof t!="number"||Fn(t)?[]:n.length?ys(n.flatMap(r=>{var i=it(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!_n(o)||!_n(a)))return[t-o,t+a]})):[]}var EG=Y([nj,Vu,gn],ZN),aj=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(Vh);return[a,{stackedData:PY(e,l,n),graphicalItems:s}]}))},su=Y([EG,nj,Hu],aj),sj=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=NY(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},SG=Y([su,ga,Ct],sj),lj=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>oj(i,d)),u=it(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:_G(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:it(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Uh=e=>e.errorBars,cj=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>oj(n,r));Y([ij,Uh,Ct],cj);var OG=Y([mx,zt,ij,Uh,Ct],lj);function CG(e){var{value:t}=e;if(Hr(t)||t instanceof Date)return t}var z2=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=ys(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},kG=(e,t,n)=>{var r=e.map(CG).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&gA(r))?qT(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},vx=e=>{var t;if(e==null||!("domain"in e))return Vy;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=ys(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Vy},yp=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},uj=e=>e.referenceElements.dots,Nl=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),PG=Y([uj,Ct,Yu],Nl),dj=e=>e.referenceElements.areas,DG=Y([dj,Ct,Yu],Nl),fj=e=>e.referenceElements.lines,AG=Y([fj,Ct,Yu],Nl),pj=(e,t)=>{var n=ys(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},TG=Y(PG,Ct,pj),hj=(e,t)=>{var n=ys(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},NG=Y([DG,Ct],hj),mj=(e,t)=>{var n=ys(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},jG=Y(AG,Ct,mj),MG=Y(TG,jG,NG,(e,t,n)=>yp(e,n,t)),gj=Y([zt],vx),yx=(e,t,n,r,i,o,a)=>{var s=Gq(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?yp(n,i,z2(r)):yp(i,z2(r));return Xq(t,c,e.allowDataOverflow)},RG=Y([zt,gj,SG,OG,MG,ke,Ct],yx),IG=[0,1],bx=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=Wi(t,o);return c&&s==null?qT(0,n.length):l==="category"?kG(r,e,c):i==="expand"?IG:a}},xx=Y([zt,ke,mx,Yh,Hu,Ct,RG],bx),vj=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(Tu(o));return s in wc?s:"point"}}},jl=Y([zt,ke,tj,ix,Ct],vj);function FG(e){if(e!=null){if(e in wc)return wc[e]();var t="scale".concat(Tu(e));if(t in wc)return wc[t]()}}function wx(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=FG(t);if(i!=null){var o=i.domain(n).range(r);return EY(o),o}}}var _x=(e,t,n)=>{var r=vx(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&vl(e))return aG(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&vl(e))return sG(e,t.tickCount,t.allowDecimals)}},Ex=Y([xx,Uu,jl],_x),Sx=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&vl(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},LG=Y([zt,xx,Ex,Ct],Sx),$G=Y(Yh,zt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ys(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),yj=Y($G,ke,HN,on,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!_n(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=In(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),BG=(e,t)=>{var n=zi(e,t);return n==null||typeof n.padding!="string"?0:yj(e,"xAxis",t,n.padding)},WG=(e,t)=>{var n=Vi(e,t);return n==null||typeof n.padding!="string"?0:yj(e,"yAxis",t,n.padding)},zG=Y(zi,BG,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),VG=Y(Vi,WG,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),HG=Y([on,zG,Nh,Th,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),YG=Y([on,ke,VG,Nh,Th,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Gu=(e,t,n,r)=>{var i;switch(t){case"xAxis":return HG(e,n,r);case"yAxis":return YG(e,n,r);case"zAxis":return(i=ux(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return qN(e);case"radiusAxis":return GN(e,n);default:return}},bj=Y([zt,Gu],Wh),aa=Y([zt,jl,LG,bj],wx);Y([qu,Uh,Ct],cj);function xj(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Kh=(e,t)=>t,qh=(e,t,n)=>n,UG=Y(Dh,Kh,qh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(xj)),KG=Y(Ah,Kh,qh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(xj)),wj=(e,t)=>({width:e.width,height:t.height}),qG=(e,t)=>{var n=typeof t.width=="number"?t.width:Fu;return{width:n,height:e.height}},_j=Y(on,zi,wj),GG=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},XG=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},QG=Y(Ao,on,UG,Kh,qh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=wj(t,s);a==null&&(a=GG(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),ZG=Y(Do,on,KG,Kh,qh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=qG(t,s);a==null&&(a=XG(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),JG=(e,t)=>{var n=zi(e,t);if(n!=null)return QG(e,n.orientation,n.mirror)},eX=Y([on,zi,JG,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),tX=(e,t)=>{var n=Vi(e,t);if(n!=null)return ZG(e,n.orientation,n.mirror)},nX=Y([on,Vi,tX,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Ej=Y(on,Vi,(e,t)=>{var n=typeof t.width=="number"?t.width:Fu;return{width:n,height:e.height}}),V2=(e,t,n)=>{switch(t){case"xAxis":return _j(e,n).width;case"yAxis":return Ej(e,n).height;default:return}},Sj=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=Wi(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&gA(l))return l}},Ox=Y([ke,Yh,zt,Ct],Sj),Oj=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=Wi(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},Cx=Y([ke,Yh,Uu,Ct],Oj),H2=Y([ke,bG,jl,aa,Ox,Cx,Gu,Ex,Ct],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=Wi(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),rX=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=Wi(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?hn(o[0]-o[1])*2*m:m;var g=d||i;if(g){var v=g.map((x,_)=>{var w=a?a.indexOf(x):x;return{index:_,coordinate:r(w)+m,value:x,offset:m}});return v.filter(x=>!Fn(x.coordinate))}return c&&s?s.map((x,_)=>({coordinate:r(x)+m,value:x,index:_,offset:m})):r.ticks?r.ticks(f).map(x=>({coordinate:r(x)+m,value:x,offset:m})):r.domain().map((x,_)=>({coordinate:r(x)+m,value:a?a[x]:x,index:_,offset:m}))}},Cj=Y([ke,Uu,jl,aa,Ex,Gu,Ox,Cx,Ct],rX),iX=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=Wi(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?hn(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},Li=Y([ke,Uu,aa,Gu,Ox,Cx,Ct],iX),$i=Y(zt,aa,(e,t)=>{if(!(e==null||t==null))return vp(vp({},e),{},{scale:t})}),oX=Y([zt,jl,xx,bj],wx);Y((e,t,n)=>ux(e,n),oX,(e,t)=>{if(!(e==null||t==null))return vp(vp({},e),{},{scale:t})});var aX=Y([ke,Dh,Ah],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),kj=e=>e.options.defaultTooltipEventType,Pj=e=>e.options.validateTooltipEventTypes;function Dj(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function kx(e,t){var n=kj(e),r=Pj(e);return Dj(t,n,r)}function sX(e){return fe(t=>kx(t,e))}var Aj=(e,t)=>{var n,r=Number(t);if(!(Fn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},lX=e=>e.tooltip.settings,zo={active:!1,index:null,dataKey:void 0,coordinate:void 0},cX={itemInteraction:{click:zo,hover:zo},axisInteraction:{click:zo,hover:zo},keyboardInteraction:zo,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Tj=Pr({name:"tooltip",initialState:cX,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=po(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:uX,removeTooltipEntrySettings:dX,setTooltipSettingsState:fX,setActiveMouseOverItemIndex:Nj,mouseLeaveItem:pX,mouseLeaveChart:jj,setActiveClickItemIndex:hX,setMouseOverAxisIndex:Mj,setMouseClickAxisIndex:mX,setSyncInteraction:Hy,setKeyboardInteraction:Yy}=Tj.actions,gX=Tj.reducer;function Y2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Md(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y2(Object(n),!0).forEach(function(r){vX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vX(e,t,n){return(t=yX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yX(e){var t=bX(e,"string");return typeof t=="symbol"?t:t+""}function bX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xX(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function wX(e){return e.index!=null}var Rj=(e,t,n,r)=>{if(t==null)return zo;var i=xX(e,t,n);if(i==null)return zo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(wX(i)){if(o)return Md(Md({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return Md(Md({},zo),{},{coordinate:i.coordinate})},Px=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!_n(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},Ij=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},Fj=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Xu=e=>e.options.tooltipPayloadSearcher,Ml=e=>e.tooltip;function U2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U2(Object(n),!0).forEach(function(r){_X(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _X(e,t,n){return(t=EX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EX(e){var t=SX(e,"string");return typeof t=="symbol"?t:t+""}function SX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OX(e,t){return e??t}var Lj=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:g,settings:v}=p,x=OX(g,s),_=Array.isArray(x)?PT(x,c,u):x,w=(m=v?.dataKey)!==null&&m!==void 0?m:r,y=v?.nameKey,E;if(r&&Array.isArray(_)&&!Array.isArray(_[0])&&a==="axis"?E=vA(_,r,i):E=o(_,t,l,y),Array.isArray(E))E.forEach(P=>{var D=K2(K2({},v),{},{name:P.name,unit:P.unit,color:void 0,fill:void 0});f.push(DS({tooltipEntrySettings:D,dataKey:P.dataKey,payload:P.payload,value:it(P.payload,P.dataKey),name:P.name}))});else{var S;f.push(DS({tooltipEntrySettings:v,dataKey:w,payload:E,value:it(E,w),name:(S=it(E,y))!==null&&S!==void 0?S:v?.name}))}return f},d)}},Dx=Y([gn,ke,tj,ix,ln],vj),CX=Y([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),kX=Y([ln,Tl],dx),Qu=Y([CX,gn,kX],fx),PX=Y([Qu],e=>e.filter(Hh)),DX=Y([Qu],px),Rl=Y([DX,ga],hx),AX=Y([PX,ga,gn],ZN),Ax=Y([Rl,gn,Qu],gx),TX=Y([gn],vx),NX=Y([Qu],e=>e.filter(Hh)),jX=Y([AX,NX,Hu],aj),MX=Y([jX,ga,ln],sj),RX=Y([Qu],rj),IX=Y([Rl,gn,RX,Uh,ln],lj),FX=Y([uj,ln,Tl],Nl),LX=Y([FX,ln],pj),$X=Y([dj,ln,Tl],Nl),BX=Y([$X,ln],hj),WX=Y([fj,ln,Tl],Nl),zX=Y([WX,ln],mj),VX=Y([LX,zX,BX],yp),HX=Y([gn,TX,MX,IX,VX,ke,ln],yx),$j=Y([gn,ke,Rl,Ax,Hu,ln,HX],bx),YX=Y([$j,gn,Dx],_x),UX=Y([gn,$j,YX,ln],Sx),Bj=e=>{var t=ln(e),n=Tl(e),r=!1;return Gu(e,t,n,r)},Wj=Y([gn,Bj],Wh),zj=Y([gn,Dx,UX,Wj],wx),KX=Y([ke,Ax,gn,ln],Sj),qX=Y([ke,Ax,gn,ln],Oj),GX=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=Wi(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?hn(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},jo=Y([ke,gn,Dx,zj,Bj,KX,qX,ln],GX),Tx=Y([kj,Pj,lX],(e,t,n)=>Dj(n.shared,e,t)),Vj=e=>e.tooltip.settings.trigger,Nx=e=>e.tooltip.settings.defaultIndex,Gh=Y([Ml,Tx,Vj,Nx],Rj),sa=Y([Gh,Rl],Px),Hj=Y([jo,sa],Aj),Yj=Y([Gh],e=>{if(e)return e.dataKey}),Uj=Y([Ml,Tx,Vj,Nx],Fj),XX=Y([Do,Ao,ke,on,jo,Nx,Uj,Xu],Ij),QX=Y([Gh,XX],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),ZX=Y([Gh],e=>e.active),JX=Y([Uj,sa,ga,QN,Hj,Xu,Tx],Lj),eQ=Y([JX],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function q2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q2(Object(n),!0).forEach(function(r){tQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tQ(e,t,n){return(t=nQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nQ(e){var t=rQ(e,"string");return typeof t=="symbol"?t:t+""}function rQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iQ=()=>fe(gn),oQ=()=>{var e=iQ(),t=fe(jo),n=fe(zj);return ls(G2(G2({},e),{},{scale:n}),t)},Kj=()=>fe(ix),jx=(e,t)=>t,qj=(e,t,n)=>n,Mx=(e,t,n,r)=>r,aQ=Y(jo,e=>Sh(e,t=>t.coordinate)),Rx=Y([Ml,jx,qj,Mx],Rj),Gj=Y([Rx,Rl],Px),sQ=(e,t,n)=>{if(t!=null){var r=Ml(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},Xj=Y([Ml,jx,qj,Mx],Fj),bp=Y([Do,Ao,ke,on,jo,Mx,Xj,Xu],Ij),lQ=Y([Rx,bp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),Qj=Y(jo,Gj,Aj),cQ=Y([Xj,Gj,ga,QN,Qj,Xu,jx],Lj),uQ=Y([Rx],e=>({isActive:e.active,activeIndex:e.index})),dQ=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=jY(e.chartX,e.chartY,t,n,s);if(l){var c=RY(l,t),u=wY(c,a,o,r,i),d=MY(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function Uy(){return Uy=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},Uy.apply(null,arguments)}function X2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X2(Object(n),!0).forEach(function(r){fQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fQ(e,t,n){return(t=pQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pQ(e){var t=hQ(e,"string");return typeof t=="symbol"?t:t+""}function hQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mQ(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=R9;else if(c==="BarChart")p=I9(a,u,i,o),m=HT;else if(a==="radial"){var{cx:g,cy:v,radius:x,startAngle:_,endAngle:w}=YT(u);p={cx:g,cy:v,startAngle:_,endAngle:w,innerRadius:x,outerRadius:x},m=KT}else p={points:mU(a,u,i)},m=Ks;var y=typeof s=="object"&&"className"in s?s.className:void 0,E=Rd(Rd(Rd(Rd({stroke:"#ccc",pointerEvents:"none"},i),p),pt(s,!1)),{},{payload:d,payloadIndex:f,className:ce("recharts-tooltip-cursor",y)});return k.isValidElement(s)?k.cloneElement(s,E):k.createElement(m,E)}function gQ(e){var t=oQ(),n=RT(),r=Lu(),i=Kj();return O.createElement(mQ,Uy({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var Zj=k.createContext(null),vQ=()=>k.useContext(Zj),iv={exports:{}},Q2;function yQ(){return Q2||(Q2=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var g=n?n+c:c;if(!this._events[g])return!1;var v=this._events[g],x=arguments.length,_,w;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),x){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,d),!0;case 4:return v.fn.call(v.context,u,d,f),!0;case 5:return v.fn.call(v.context,u,d,f,p),!0;case 6:return v.fn.call(v.context,u,d,f,p,m),!0}for(w=1,_=new Array(x-1);w<x;w++)_[w-1]=arguments[w];v.fn.apply(v.context,_)}else{var y=v.length,E;for(w=0;w<y;w++)switch(v[w].once&&this.removeListener(c,v[w].fn,void 0,!0),x){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,u);break;case 3:v[w].fn.call(v[w].context,u,d);break;case 4:v[w].fn.call(v[w].context,u,d,f);break;default:if(!_)for(E=1,_=new Array(x-1);E<x;E++)_[E-1]=arguments[E];v[w].fn.apply(v[w].context,_)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var g=0,v=[],x=m.length;g<x;g++)(m[g].fn!==u||f&&!m[g].once||d&&m[g].context!==d)&&v.push(m[g]);v.length?this._events[p]=v.length===1?v[0]:v:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(iv)),iv.exports}var bQ=yQ();const xQ=Co(bQ);var lu=new xQ,Ky="recharts.syncEvent.tooltip",Z2="recharts.syncEvent.brush";function Xh(e,t){if(t){var n=Number.parseInt(t,10);if(!Fn(n))return e?.[n]}}var wQ={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},Jj=Pr({name:"options",initialState:wQ,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),_Q=Jj.reducer,{createEventEmitter:EQ}=Jj.actions;function SQ(e){return e.tooltip.syncInteraction}var OQ={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},eM=Pr({name:"chartData",initialState:OQ,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:J2,setDataStartEndIndexes:CQ,setComputedData:Ome}=eM.actions,kQ=eM.reducer,PQ=["x","y"];function eO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eO(Object(n),!0).forEach(function(r){DQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DQ(e,t,n){return(t=AQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AQ(e){var t=TQ(e,"string");return typeof t=="symbol"?t:t+""}function TQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NQ(e,t){if(e==null)return{};var n,r,i=jQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var tM=()=>{};function MQ(){var e=fe(ox),t=fe(ax),n=Ot(),r=fe(YN),i=fe(jo),o=Lu(),a=jh(),s=fe(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return tM;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:g}=p,v=NQ(p,PQ),x=wa(wa(wa({},v),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof g=="number"&&{y:Math.max(a.y,Math.min(g,a.y+a.height))}),_=wa(wa({},u),{},{payload:wa(wa({},u.payload),{},{coordinate:x})});n(_)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var y={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},E=r(i,y);w=i[E]}else r==="value"&&(w=i.find(j=>String(j.value)===u.payload.label));var{coordinate:S}=u.payload;if(w==null||u.payload.active===!1||S==null||a==null){n(Hy({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:P,y:D}=S,T=Math.min(P,a.x+a.width),R=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?R:w.coordinate},C=Hy({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(C)}}};return lu.on(Ky,l),()=>{lu.off(Ky,l)}},[s,n,t,e,r,i,o,a])}function RQ(){var e=fe(ox),t=fe(ax),n=Ot();k.useEffect(()=>{if(e==null)return tM;var r=(i,o,a)=>{t!==a&&e===i&&n(CQ(o))};return lu.on(Z2,r),()=>{lu.off(Z2,r)}},[n,t,e])}function IQ(){var e=Ot();k.useEffect(()=>{e(EQ())},[e]),MQ(),RQ()}function FQ(e,t,n,r,i,o){var a=fe(f=>sQ(f,e,t)),s=fe(ax),l=fe(ox),c=fe(YN),u=fe(SQ),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=Hy({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});lu.emit(Ky,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function tO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tO(Object(n),!0).forEach(function(r){LQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LQ(e,t,n){return(t=$Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Q(e){var t=BQ(e,"string");return typeof t=="symbol"?t:t+""}function BQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WQ(e){return e.dataKey}function zQ(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(p9,t)}var rO=[],VQ={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!To.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function kt(e){var t=an(e,VQ),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:g,shared:v,trigger:x,defaultIndex:_,portal:w,axisId:y}=t,E=Ot(),S=typeof _=="number"?String(_):_;k.useEffect(()=>{E(fX({shared:v,trigger:x,axisId:y,active:n,defaultIndex:S}))},[E,v,x,y,n,S]);var P=jh(),D=$T(),T=sX(v),{activeIndex:R,isActive:A}=fe(re=>uQ(re,T,x,S)),C=fe(re=>cQ(re,T,x,S)),j=fe(re=>Qj(re,T,x,S)),N=fe(re=>lQ(re,T,x,S)),M=C,L=vQ(),B=n??A,[V,z]=ZA([M,B]),W=T==="axis"?j:void 0;FQ(T,x,N,W,R,B);var Q=w??L;if(Q==null)return null;var X=M??rO;B||(X=rO),s&&X.length&&(X=UA(M.filter(re=>re.value!=null&&(re.hide!==!0||t.includeHidden)),u,WQ));var ie=X.length>0,J=O.createElement(x9,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:B,coordinate:N,hasPayload:ie,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:P,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},zQ(a,nO(nO({},t),{},{payload:X,label:W,active:B,coordinate:N,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Si.createPortal(J,Q),B&&O.createElement(gQ,{cursor:g,tooltipEventType:T,coordinate:N,payload:M,index:R}))}var ov={},av={},sv={},iO;function HQ(){return iO||(iO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),g()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},g=()=>{m(),a=void 0,s=null},v=()=>{u()},x=function(..._){if(i?.aborted)return;a=this,s=_;const w=f==null;p(),l&&w&&u()};return x.schedule=p,x.cancel=g,x.flush=v,i?.addEventListener("abort",g,{once:!0}),x}e.debounce=t})(sv)),sv}var oO;function YQ(){return oO||(oO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HQ();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...g){u=r.apply(this,g),d=null},i,{edges:c}),p=function(...g){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,g),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,g),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(av)),av}var aO;function UQ(){return aO||(aO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YQ();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})(ov)),ov}var lv,sO;function KQ(){return sO||(sO=1,lv=UQ().throttle),lv}var qQ=KQ();const GQ=Co(qQ);var XQ=process.env.NODE_ENV!=="production",Nc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(XQ&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function lO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lO(Object(n),!0).forEach(function(r){QQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QQ(e,t,n){return(t=ZQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZQ(e){var t=JQ(e,"string");return typeof t=="symbol"?t:t+""}function JQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pt=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,g=k.useRef(null),v=k.useRef();v.current=p,k.useImperativeHandle(t,()=>g.current);var[x,_]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((E,S)=>{_(P=>{var D=Math.round(E),T=Math.round(S);return P.containerWidth===D&&P.containerHeight===T?P:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var E=T=>{var R,{width:A,height:C}=T[0].contentRect;w(A,C),(R=v.current)===null||R===void 0||R.call(v,A,C)};u>0&&(E=GQ(E,u,{trailing:!0,leading:!1}));var S=new ResizeObserver(E),{width:P,height:D}=g.current.getBoundingClientRect();return w(P,D),S.observe(g.current),()=>{S.disconnect()}},[w,u]);var y=k.useMemo(()=>{var{containerWidth:E,containerHeight:S}=x;if(E<0||S<0)return null;Nc(za(i)||za(o),`The width(%s) and height(%s) are both fixed numbers,
220
+ A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,"Z")}else _+="L".concat(t,",").concat(n,"Z");return _},hU={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},KT=e=>{var t=an(e,hU),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=ce("recharts-sector",d),p=o-i,m=In(a,p,0,!0),g;return m>0&&Math.abs(c-u)<360?g=pU({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):g=UT({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",jy({},pt(t,!0),{className:f,d:g}))};function mU(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Xt(s,l,c,d),p=Xt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return YT(t);return[{x:r,y:i},{x:o,y:a}]}var Ug={},Kg={},qg={},XS;function gU(){return XS||(XS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GA();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(qg)),qg}var QS;function vU(){return QS||(QS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gU();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(Kg)),Kg}var ZS;function yU(){return ZS||(ZS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XA(),n=vU();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(Ug)),Ug}var Gg,JS;function bU(){return JS||(JS=1,Gg=yU().range),Gg}var xU=bU();const qT=Co(xU);function Qo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wU(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function N0(e){let t,n,r;e.length!==2?(t=Qo,n=(s,l)=>Qo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Qo||e===wU?e:_U,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function _U(){return 0}function GT(e){return e===null?NaN:+e}function*EU(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const SU=N0(Qo),$u=SU.right;N0(GT).center;class e2 extends Map{constructor(t,n=kU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(t2(this,t))}has(t){return super.has(t2(this,t))}set(t,n){return super.set(OU(this,t),n)}delete(t){return super.delete(CU(this,t))}}function t2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function OU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function CU({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function kU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function PU(e=Qo){if(e===Qo)return XT;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function XT(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const DU=Math.sqrt(50),AU=Math.sqrt(10),TU=Math.sqrt(2);function sp(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=DU?10:o>=AU?5:o>=TU?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?sp(e,t,n*2):[s,l,c]}function My(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?sp(t,e,n):sp(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function Ry(e,t,n){return t=+t,e=+e,n=+n,sp(e,t,n)[2]}function Iy(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Ry(t,e,n):Ry(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function n2(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function r2(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function QT(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?XT:PU(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));QT(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(nc(e,n,t),i(e[r],o)>0&&nc(e,n,r);a<s;){for(nc(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?nc(e,n,s):(++s,nc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function nc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function NU(e,t,n){if(e=Float64Array.from(EU(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return r2(e);if(t>=1)return n2(e);var r,i=(r-1)*t,o=Math.floor(i),a=n2(QT(e,o).subarray(0,o+1)),s=r2(e.subarray(o+1));return a+(s-a)*(i-o)}}function jU(e,t,n=GT){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function MU(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Qr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function No(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Fy=Symbol("implicit");function j0(){var e=new e2,t=[],n=[],r=Fy;function i(o){let a=e.get(o);if(a===void 0){if(r!==Fy)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new e2;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return j0(t,n).unknown(r)},Qr.apply(i,arguments),i}function M0(){var e=j0().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,g=p?r:i;o=(g-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(g-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var v=MU(f).map(function(x){return m+o*x});return n(p?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return M0(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Qr.apply(d(),arguments)}function ZT(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ZT(t())},e}function RU(){return ZT(M0.apply(null,arguments).paddingInner(1))}function R0(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function JT(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Bu(){}var nu=.7,lp=1/nu,qs="\\s*([+-]?\\d+)\\s*",ru="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IU=/^#([0-9a-f]{3,8})$/,FU=new RegExp(`^rgb\\(${qs},${qs},${qs}\\)$`),LU=new RegExp(`^rgb\\(${Ni},${Ni},${Ni}\\)$`),$U=new RegExp(`^rgba\\(${qs},${qs},${qs},${ru}\\)$`),BU=new RegExp(`^rgba\\(${Ni},${Ni},${Ni},${ru}\\)$`),WU=new RegExp(`^hsl\\(${ru},${Ni},${Ni}\\)$`),zU=new RegExp(`^hsla\\(${ru},${Ni},${Ni},${ru}\\)$`),i2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};R0(Bu,iu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:o2,formatHex:o2,formatHex8:VU,formatHsl:HU,formatRgb:a2,toString:a2});function o2(){return this.rgb().formatHex()}function VU(){return this.rgb().formatHex8()}function HU(){return eN(this).formatHsl()}function a2(){return this.rgb().formatRgb()}function iu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=IU.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?s2(t):n===3?new or(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Td(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Td(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=FU.exec(e))?new or(t[1],t[2],t[3],1):(t=LU.exec(e))?new or(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$U.exec(e))?Td(t[1],t[2],t[3],t[4]):(t=BU.exec(e))?Td(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=WU.exec(e))?u2(t[1],t[2]/100,t[3]/100,1):(t=zU.exec(e))?u2(t[1],t[2]/100,t[3]/100,t[4]):i2.hasOwnProperty(e)?s2(i2[e]):e==="transparent"?new or(NaN,NaN,NaN,0):null}function s2(e){return new or(e>>16&255,e>>8&255,e&255,1)}function Td(e,t,n,r){return r<=0&&(e=t=n=NaN),new or(e,t,n,r)}function YU(e){return e instanceof Bu||(e=iu(e)),e?(e=e.rgb(),new or(e.r,e.g,e.b,e.opacity)):new or}function Ly(e,t,n,r){return arguments.length===1?YU(e):new or(e,t,n,r??1)}function or(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}R0(or,Ly,JT(Bu,{brighter(e){return e=e==null?lp:Math.pow(lp,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?nu:Math.pow(nu,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new or(Ja(this.r),Ja(this.g),Ja(this.b),cp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:l2,formatHex:l2,formatHex8:UU,formatRgb:c2,toString:c2}));function l2(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}`}function UU(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}${Va((isNaN(this.opacity)?1:this.opacity)*255)}`}function c2(){const e=cp(this.opacity);return`${e===1?"rgb(":"rgba("}${Ja(this.r)}, ${Ja(this.g)}, ${Ja(this.b)}${e===1?")":`, ${e})`}`}function cp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ja(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Va(e){return e=Ja(e),(e<16?"0":"")+e.toString(16)}function u2(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ri(e,t,n,r)}function eN(e){if(e instanceof ri)return new ri(e.h,e.s,e.l,e.opacity);if(e instanceof Bu||(e=iu(e)),!e)return new ri;if(e instanceof ri)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ri(a,s,l,e.opacity)}function KU(e,t,n,r){return arguments.length===1?eN(e):new ri(e,t,n,r??1)}function ri(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}R0(ri,KU,JT(Bu,{brighter(e){return e=e==null?lp:Math.pow(lp,e),new ri(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?nu:Math.pow(nu,e),new ri(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new or(Xg(e>=240?e-240:e+120,i,r),Xg(e,i,r),Xg(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ri(d2(this.h),Nd(this.s),Nd(this.l),cp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=cp(this.opacity);return`${e===1?"hsl(":"hsla("}${d2(this.h)}, ${Nd(this.s)*100}%, ${Nd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function d2(e){return e=(e||0)%360,e<0?e+360:e}function Nd(e){return Math.max(0,Math.min(1,e||0))}function Xg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const I0=e=>()=>e;function qU(e,t){return function(n){return e+n*t}}function GU(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function XU(e){return(e=+e)==1?tN:function(t,n){return n-t?GU(t,n,e):I0(isNaN(t)?n:t)}}function tN(e,t){var n=t-e;return n?qU(e,n):I0(isNaN(e)?t:e)}const f2=(function e(t){var n=XU(t);function r(i,o){var a=n((i=Ly(i)).r,(o=Ly(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=tN(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function QU(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function ZU(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function JU(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Pl(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function eK(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function up(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tK(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Pl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var $y=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qg=new RegExp($y.source,"g");function nK(e){return function(){return e}}function rK(e){return function(t){return e(t)+""}}function iK(e,t){var n=$y.lastIndex=Qg.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=$y.exec(e))&&(i=Qg.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:up(r,i)})),n=Qg.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?rK(l[0].x):nK(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Pl(e,t){var n=typeof t,r;return t==null||n==="boolean"?I0(t):(n==="number"?up:n==="string"?(r=iu(t))?(t=r,f2):iK:t instanceof iu?f2:t instanceof Date?eK:ZU(t)?QU:Array.isArray(t)?JU:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tK:up)(e,t)}function F0(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function oK(e,t){t===void 0&&(t=e,e=Pl);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function aK(e){return function(){return e}}function dp(e){return+e}var p2=[0,1];function Yn(e){return e}function By(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:aK(isNaN(t)?NaN:.5)}function sK(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function lK(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=By(i,r),o=n(a,o)):(r=By(r,i),o=n(o,a)),function(s){return o(r(s))}}function cK(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=By(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=$u(e,s,1,r)-1;return o[l](i[l](s))}}function Wu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Mh(){var e=p2,t=p2,n=Pl,r,i,o,a=Yn,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==Yn&&(a=sK(e[0],e[f-1])),s=f>2?cK:lK,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),up)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,dp),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=F0,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Yn,u()):a!==Yn},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function L0(){return Mh()(Yn,Yn)}function uK(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function fp(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hl(e){return e=fp(Math.abs(e)),e?e[1]:NaN}function dK(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function fK(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var pK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ou(e){if(!(t=pK.exec(e)))throw new Error("invalid format: "+e);var t;return new $0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ou.prototype=$0.prototype;function $0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}$0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function hK(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var nN;function mK(e,t){var n=fp(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(nN=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+fp(e,Math.max(0,t+o-1))[0]}function h2(e,t){var n=fp(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const m2={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:uK,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>h2(e*100,t),r:h2,s:mK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function g2(e){return e}var v2=Array.prototype.map,y2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gK(e){var t=e.grouping===void 0||e.thousands===void 0?g2:dK(v2.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?g2:fK(v2.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=ou(d);var f=d.fill,p=d.align,m=d.sign,g=d.symbol,v=d.zero,x=d.width,_=d.comma,w=d.precision,y=d.trim,E=d.type;E==="n"?(_=!0,E="g"):m2[E]||(w===void 0&&(w=12),y=!0,E="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var S=g==="$"?n:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",P=g==="$"?r:/[%p]/.test(E)?a:"",D=m2[E],T=/[defgprs%]/.test(E);w=w===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function R(A){var C=S,j=P,N,M,L;if(E==="c")j=D(A)+j,A="";else{A=+A;var B=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),y&&(A=hK(A)),B&&+A==0&&m!=="+"&&(B=!1),C=(B?m==="("?m:s:m==="-"||m==="("?"":m)+C,j=(E==="s"?y2[8+nN/3]:"")+j+(B&&m==="("?")":""),T){for(N=-1,M=A.length;++N<M;)if(L=A.charCodeAt(N),48>L||L>57){j=(L===46?i+A.slice(N+1):A.slice(N))+j,A=A.slice(0,N);break}}}_&&!v&&(A=t(A,1/0));var V=C.length+A.length+j.length,z=V<x?new Array(x-V+1).join(f):"";switch(_&&v&&(A=t(z+A,z.length?x-j.length:1/0),z=""),p){case"<":A=C+A+j+z;break;case"=":A=C+z+A+j;break;case"^":A=z.slice(0,V=z.length>>1)+C+A+j+z.slice(V);break;default:A=z+C+A+j;break}return o(A)}return R.toString=function(){return d+""},R}function u(d,f){var p=c((d=ou(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(hl(f)/3)))*3,g=Math.pow(10,-m),v=y2[8+m/3];return function(x){return p(g*x)+v}}return{format:c,formatPrefix:u}}var jd,B0,rN;vK({thousands:",",grouping:[3],currency:["$",""]});function vK(e){return jd=gK(e),B0=jd.format,rN=jd.formatPrefix,jd}function yK(e){return Math.max(0,-hl(Math.abs(e)))}function bK(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(hl(t)/3)))*3-hl(Math.abs(e)))}function xK(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hl(t)-hl(e))+1}function iN(e,t,n,r){var i=Iy(e,t,n),o;switch(r=ou(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=bK(i,a))&&(r.precision=o),rN(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=xK(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=yK(i))&&(r.precision=o-(r.type==="%")*2);break}}return B0(r)}function ha(e){var t=e.domain;return e.ticks=function(n){var r=t();return My(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return iN(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=Ry(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function oN(){var e=L0();return e.copy=function(){return Wu(e,oN())},Qr.apply(e,arguments),ha(e)}function aN(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,dp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return aN(e).unknown(t)},e=arguments.length?Array.from(e,dp):[0,1],ha(n)}function sN(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function b2(e){return Math.log(e)}function x2(e){return Math.exp(e)}function wK(e){return-Math.log(-e)}function _K(e){return-Math.exp(-e)}function EK(e){return isFinite(e)?+("1e"+e):e<0?0:e}function SK(e){return e===10?EK:e===Math.E?Math.exp:t=>Math.pow(e,t)}function OK(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function w2(e){return(t,n)=>-e(-t,n)}function W0(e){const t=e(b2,x2),n=t.domain;let r=10,i,o;function a(){return i=OK(r),o=SK(r),n()[0]<0?(i=w2(i),o=w2(o),e(wK,_K)):e(b2,x2),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,g;const v=s==null?10:+s;let x=[];if(!(r%1)&&p-f<v){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(g=f<0?m/o(-f):m*o(f),!(g<c)){if(g>u)break;x.push(g)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(g=f>0?m/o(-f):m*o(f),!(g<c)){if(g>u)break;x.push(g)}x.length*2<v&&(x=My(c,u,v))}else x=My(f,p,Math.min(p-f,v)).map(o);return d?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=ou(l)).precision==null&&(l.trim=!0),l=B0(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(sN(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function lN(){const e=W0(Mh()).domain([1,10]);return e.copy=()=>Wu(e,lN()).base(e.base()),Qr.apply(e,arguments),e}function _2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function E2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function z0(e){var t=1,n=e(_2(t),E2(t));return n.constant=function(r){return arguments.length?e(_2(t=+r),E2(t)):t},ha(n)}function cN(){var e=z0(Mh());return e.copy=function(){return Wu(e,cN()).constant(e.constant())},Qr.apply(e,arguments)}function S2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function CK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function kK(e){return e<0?-e*e:e*e}function V0(e){var t=e(Yn,Yn),n=1;function r(){return n===1?e(Yn,Yn):n===.5?e(CK,kK):e(S2(n),S2(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ha(t)}function H0(){var e=V0(Mh());return e.copy=function(){return Wu(e,H0()).exponent(e.exponent())},Qr.apply(e,arguments),e}function PK(){return H0.apply(null,arguments).exponent(.5)}function O2(e){return Math.sign(e)*e*e}function DK(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uN(){var e=L0(),t=[0,1],n=!1,r;function i(o){var a=DK(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(O2(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,dp)).map(O2)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return uN(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Qr.apply(i,arguments),ha(i)}function dN(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=jU(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[$u(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Qo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return dN().domain(e).range(t).unknown(r)},Qr.apply(o,arguments)}function fN(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[$u(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return fN().domain([e,t]).range(i).unknown(o)},Qr.apply(ha(a),arguments)}function pN(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[$u(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return pN().domain(e).range(t).unknown(n)},Qr.apply(i,arguments)}const Zg=new Date,Jg=new Date;function sn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>sn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(Zg.setTime(+o),Jg.setTime(+a),e(Zg),e(Jg),Math.floor(n(Zg,Jg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const pp=sn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);pp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?sn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):pp);pp.range;const oo=1e3,$r=oo*60,ao=$r*60,_o=ao*24,Y0=_o*7,C2=_o*30,ev=_o*365,Ha=sn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oo)},(e,t)=>(t-e)/oo,e=>e.getUTCSeconds());Ha.range;const U0=sn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oo)},(e,t)=>{e.setTime(+e+t*$r)},(e,t)=>(t-e)/$r,e=>e.getMinutes());U0.range;const K0=sn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*$r)},(e,t)=>(t-e)/$r,e=>e.getUTCMinutes());K0.range;const q0=sn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oo-e.getMinutes()*$r)},(e,t)=>{e.setTime(+e+t*ao)},(e,t)=>(t-e)/ao,e=>e.getHours());q0.range;const G0=sn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ao)},(e,t)=>(t-e)/ao,e=>e.getUTCHours());G0.range;const zu=sn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$r)/_o,e=>e.getDate()-1);zu.range;const Rh=sn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_o,e=>e.getUTCDate()-1);Rh.range;const hN=sn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_o,e=>Math.floor(e/_o));hN.range;function gs(e){return sn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*$r)/Y0)}const Ih=gs(0),hp=gs(1),AK=gs(2),TK=gs(3),ml=gs(4),NK=gs(5),jK=gs(6);Ih.range;hp.range;AK.range;TK.range;ml.range;NK.range;jK.range;function vs(e){return sn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Y0)}const Fh=vs(0),mp=vs(1),MK=vs(2),RK=vs(3),gl=vs(4),IK=vs(5),FK=vs(6);Fh.range;mp.range;MK.range;RK.range;gl.range;IK.range;FK.range;const X0=sn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());X0.range;const Q0=sn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Q0.range;const Eo=sn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Eo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Eo.range;const So=sn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());So.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});So.range;function mN(e,t,n,r,i,o){const a=[[Ha,1,oo],[Ha,5,5*oo],[Ha,15,15*oo],[Ha,30,30*oo],[o,1,$r],[o,5,5*$r],[o,15,15*$r],[o,30,30*$r],[i,1,ao],[i,3,3*ao],[i,6,6*ao],[i,12,12*ao],[r,1,_o],[r,2,2*_o],[n,1,Y0],[t,1,C2],[t,3,3*C2],[e,1,ev]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=N0(([,,v])=>v).right(a,f);if(p===a.length)return e.every(Iy(c/ev,u/ev,d));if(p===0)return pp.every(Math.max(Iy(c,u,d),1));const[m,g]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(g)}return[s,l]}const[LK,$K]=mN(So,Q0,Fh,hN,G0,K0),[BK,WK]=mN(Eo,X0,Ih,zu,q0,U0);function tv(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function nv(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function rc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zK(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=ic(i),u=oc(i),d=ic(o),f=oc(o),p=ic(a),m=oc(a),g=ic(s),v=oc(s),x=ic(l),_=oc(l),w={a:B,A:V,b:z,B:W,c:null,d:N2,e:N2,f:dq,g:wq,G:Eq,H:lq,I:cq,j:uq,L:gN,m:fq,M:pq,p:Q,q:G,Q:R2,s:I2,S:hq,u:mq,U:gq,V:vq,w:yq,W:bq,x:null,X:null,y:xq,Y:_q,Z:Sq,"%":M2},y={a:ie,A:J,b:re,B:ae,c:null,d:j2,e:j2,f:Pq,g:Lq,G:Bq,H:Oq,I:Cq,j:kq,L:yN,m:Dq,M:Aq,p:le,q:ue,Q:R2,s:I2,S:Tq,u:Nq,U:jq,V:Mq,w:Rq,W:Iq,x:null,X:null,y:Fq,Y:$q,Z:Wq,"%":M2},E={a:R,A,b:C,B:j,c:N,d:A2,e:A2,f:iq,g:D2,G:P2,H:T2,I:T2,j:eq,L:rq,m:JK,M:tq,p:T,q:ZK,Q:aq,s:sq,S:nq,u:KK,U:qK,V:GK,w:UK,W:XK,x:M,X:L,y:D2,Y:P2,Z:QK,"%":oq};w.x=S(n,w),w.X=S(r,w),w.c=S(t,w),y.x=S(n,y),y.X=S(r,y),y.c=S(t,y);function S(K,U){return function(Z){var I=[],me=-1,oe=0,ve=K.length,we,Ne,qe;for(Z instanceof Date||(Z=new Date(+Z));++me<ve;)K.charCodeAt(me)===37&&(I.push(K.slice(oe,me)),(Ne=k2[we=K.charAt(++me)])!=null?we=K.charAt(++me):Ne=we==="e"?" ":"0",(qe=U[we])&&(we=qe(Z,Ne)),I.push(we),oe=me+1);return I.push(K.slice(oe,me)),I.join("")}}function P(K,U){return function(Z){var I=rc(1900,void 0,1),me=D(I,K,Z+="",0),oe,ve;if(me!=Z.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(U&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(oe=nv(rc(I.y,0,1)),ve=oe.getUTCDay(),oe=ve>4||ve===0?mp.ceil(oe):mp(oe),oe=Rh.offset(oe,(I.V-1)*7),I.y=oe.getUTCFullYear(),I.m=oe.getUTCMonth(),I.d=oe.getUTCDate()+(I.w+6)%7):(oe=tv(rc(I.y,0,1)),ve=oe.getDay(),oe=ve>4||ve===0?hp.ceil(oe):hp(oe),oe=zu.offset(oe,(I.V-1)*7),I.y=oe.getFullYear(),I.m=oe.getMonth(),I.d=oe.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),ve="Z"in I?nv(rc(I.y,0,1)).getUTCDay():tv(rc(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(ve+5)%7:I.w+I.U*7-(ve+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,nv(I)):tv(I)}}function D(K,U,Z,I){for(var me=0,oe=U.length,ve=Z.length,we,Ne;me<oe;){if(I>=ve)return-1;if(we=U.charCodeAt(me++),we===37){if(we=U.charAt(me++),Ne=E[we in k2?U.charAt(me++):we],!Ne||(I=Ne(K,Z,I))<0)return-1}else if(we!=Z.charCodeAt(I++))return-1}return I}function T(K,U,Z){var I=c.exec(U.slice(Z));return I?(K.p=u.get(I[0].toLowerCase()),Z+I[0].length):-1}function R(K,U,Z){var I=p.exec(U.slice(Z));return I?(K.w=m.get(I[0].toLowerCase()),Z+I[0].length):-1}function A(K,U,Z){var I=d.exec(U.slice(Z));return I?(K.w=f.get(I[0].toLowerCase()),Z+I[0].length):-1}function C(K,U,Z){var I=x.exec(U.slice(Z));return I?(K.m=_.get(I[0].toLowerCase()),Z+I[0].length):-1}function j(K,U,Z){var I=g.exec(U.slice(Z));return I?(K.m=v.get(I[0].toLowerCase()),Z+I[0].length):-1}function N(K,U,Z){return D(K,t,U,Z)}function M(K,U,Z){return D(K,n,U,Z)}function L(K,U,Z){return D(K,r,U,Z)}function B(K){return a[K.getDay()]}function V(K){return o[K.getDay()]}function z(K){return l[K.getMonth()]}function W(K){return s[K.getMonth()]}function Q(K){return i[+(K.getHours()>=12)]}function G(K){return 1+~~(K.getMonth()/3)}function ie(K){return a[K.getUTCDay()]}function J(K){return o[K.getUTCDay()]}function re(K){return l[K.getUTCMonth()]}function ae(K){return s[K.getUTCMonth()]}function le(K){return i[+(K.getUTCHours()>=12)]}function ue(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var U=S(K+="",w);return U.toString=function(){return K},U},parse:function(K){var U=P(K+="",!1);return U.toString=function(){return K},U},utcFormat:function(K){var U=S(K+="",y);return U.toString=function(){return K},U},utcParse:function(K){var U=P(K+="",!0);return U.toString=function(){return K},U}}}var k2={"-":"",_:" ",0:"0"},mn=/^\s*\d+/,VK=/^%/,HK=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function YK(e){return e.replace(HK,"\\$&")}function ic(e){return new RegExp("^(?:"+e.map(YK).join("|")+")","i")}function oc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function UK(e,t,n){var r=mn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function KK(e,t,n){var r=mn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function qK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function GK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function XK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function P2(e,t,n){var r=mn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function D2(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function QK(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ZK(e,t,n){var r=mn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function JK(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function A2(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function eq(e,t,n){var r=mn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function T2(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tq(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nq(e,t,n){var r=mn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rq(e,t,n){var r=mn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function iq(e,t,n){var r=mn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oq(e,t,n){var r=VK.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aq(e,t,n){var r=mn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function sq(e,t,n){var r=mn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function N2(e,t){return Fe(e.getDate(),t,2)}function lq(e,t){return Fe(e.getHours(),t,2)}function cq(e,t){return Fe(e.getHours()%12||12,t,2)}function uq(e,t){return Fe(1+zu.count(Eo(e),e),t,3)}function gN(e,t){return Fe(e.getMilliseconds(),t,3)}function dq(e,t){return gN(e,t)+"000"}function fq(e,t){return Fe(e.getMonth()+1,t,2)}function pq(e,t){return Fe(e.getMinutes(),t,2)}function hq(e,t){return Fe(e.getSeconds(),t,2)}function mq(e){var t=e.getDay();return t===0?7:t}function gq(e,t){return Fe(Ih.count(Eo(e)-1,e),t,2)}function vN(e){var t=e.getDay();return t>=4||t===0?ml(e):ml.ceil(e)}function vq(e,t){return e=vN(e),Fe(ml.count(Eo(e),e)+(Eo(e).getDay()===4),t,2)}function yq(e){return e.getDay()}function bq(e,t){return Fe(hp.count(Eo(e)-1,e),t,2)}function xq(e,t){return Fe(e.getFullYear()%100,t,2)}function wq(e,t){return e=vN(e),Fe(e.getFullYear()%100,t,2)}function _q(e,t){return Fe(e.getFullYear()%1e4,t,4)}function Eq(e,t){var n=e.getDay();return e=n>=4||n===0?ml(e):ml.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function Sq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function j2(e,t){return Fe(e.getUTCDate(),t,2)}function Oq(e,t){return Fe(e.getUTCHours(),t,2)}function Cq(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function kq(e,t){return Fe(1+Rh.count(So(e),e),t,3)}function yN(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function Pq(e,t){return yN(e,t)+"000"}function Dq(e,t){return Fe(e.getUTCMonth()+1,t,2)}function Aq(e,t){return Fe(e.getUTCMinutes(),t,2)}function Tq(e,t){return Fe(e.getUTCSeconds(),t,2)}function Nq(e){var t=e.getUTCDay();return t===0?7:t}function jq(e,t){return Fe(Fh.count(So(e)-1,e),t,2)}function bN(e){var t=e.getUTCDay();return t>=4||t===0?gl(e):gl.ceil(e)}function Mq(e,t){return e=bN(e),Fe(gl.count(So(e),e)+(So(e).getUTCDay()===4),t,2)}function Rq(e){return e.getUTCDay()}function Iq(e,t){return Fe(mp.count(So(e)-1,e),t,2)}function Fq(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function Lq(e,t){return e=bN(e),Fe(e.getUTCFullYear()%100,t,2)}function $q(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function Bq(e,t){var n=e.getUTCDay();return e=n>=4||n===0?gl(e):gl.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function Wq(){return"+0000"}function M2(){return"%"}function R2(e){return+e}function I2(e){return Math.floor(+e/1e3)}var Ts,xN,wN;zq({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function zq(e){return Ts=zK(e),xN=Ts.format,Ts.parse,wN=Ts.utcFormat,Ts.utcParse,Ts}function Vq(e){return new Date(e)}function Hq(e){return e instanceof Date?+e:+new Date(+e)}function Z0(e,t,n,r,i,o,a,s,l,c){var u=L0(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),v=c("%I %p"),x=c("%a %d"),_=c("%b %d"),w=c("%B"),y=c("%Y");function E(S){return(l(S)<S?p:s(S)<S?m:a(S)<S?g:o(S)<S?v:r(S)<S?i(S)<S?x:_:n(S)<S?w:y)(S)}return u.invert=function(S){return new Date(d(S))},u.domain=function(S){return arguments.length?f(Array.from(S,Hq)):f().map(Vq)},u.ticks=function(S){var P=f();return e(P[0],P[P.length-1],S??10)},u.tickFormat=function(S,P){return P==null?E:c(P)},u.nice=function(S){var P=f();return(!S||typeof S.range!="function")&&(S=t(P[0],P[P.length-1],S??10)),S?f(sN(P,S)):u},u.copy=function(){return Wu(u,Z0(e,t,n,r,i,o,a,s,l,c))},u}function Yq(){return Qr.apply(Z0(BK,WK,Eo,X0,Ih,zu,q0,U0,Ha,xN).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Uq(){return Qr.apply(Z0(LK,$K,So,Q0,Fh,Rh,G0,K0,Ha,wN).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Lh(){var e=0,t=1,n,r,i,o,a=Yn,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(Pl),c.rangeRound=u(F0),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function ma(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _N(){var e=ha(Lh()(Yn));return e.copy=function(){return ma(e,_N())},No.apply(e,arguments)}function EN(){var e=W0(Lh()).domain([1,10]);return e.copy=function(){return ma(e,EN()).base(e.base())},No.apply(e,arguments)}function SN(){var e=z0(Lh());return e.copy=function(){return ma(e,SN()).constant(e.constant())},No.apply(e,arguments)}function J0(){var e=V0(Lh());return e.copy=function(){return ma(e,J0()).exponent(e.exponent())},No.apply(e,arguments)}function Kq(){return J0.apply(null,arguments).exponent(.5)}function ON(){var e=[],t=Yn;function n(r){if(r!=null&&!isNaN(r=+r))return t(($u(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Qo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>NU(e,o/r))},n.copy=function(){return ON(t).domain(e)},No.apply(n,arguments)}function $h(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=Yn,u,d=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+u(g))-o)*(r*g<r*o?s:l),c(d?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([e,t,n]=g,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(g){return arguments.length?(d=!!g,p):d},p.interpolator=function(g){return arguments.length?(c=g,p):c};function m(g){return function(v){var x,_,w;return arguments.length?([x,_,w]=v,c=oK(g,[x,_,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(Pl),p.rangeRound=m(F0),p.unknown=function(g){return arguments.length?(f=g,p):f},function(g){return u=g,i=g(e),o=g(t),a=g(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function CN(){var e=ha($h()(Yn));return e.copy=function(){return ma(e,CN())},No.apply(e,arguments)}function kN(){var e=W0($h()).domain([.1,1,10]);return e.copy=function(){return ma(e,kN()).base(e.base())},No.apply(e,arguments)}function PN(){var e=z0($h());return e.copy=function(){return ma(e,PN()).constant(e.constant())},No.apply(e,arguments)}function ex(){var e=V0($h());return e.copy=function(){return ma(e,ex()).exponent(e.exponent())},No.apply(e,arguments)}function qq(){return ex.apply(null,arguments).exponent(.5)}const wc=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:M0,scaleDiverging:CN,scaleDivergingLog:kN,scaleDivergingPow:ex,scaleDivergingSqrt:qq,scaleDivergingSymlog:PN,scaleIdentity:aN,scaleImplicit:Fy,scaleLinear:oN,scaleLog:lN,scaleOrdinal:j0,scalePoint:RU,scalePow:H0,scaleQuantile:dN,scaleQuantize:fN,scaleRadial:uN,scaleSequential:_N,scaleSequentialLog:EN,scaleSequentialPow:J0,scaleSequentialQuantile:ON,scaleSequentialSqrt:Kq,scaleSequentialSymlog:SN,scaleSqrt:PK,scaleSymlog:cN,scaleThreshold:pN,scaleTime:Yq,scaleUtc:Uq,tickFormat:iN},Symbol.toStringTag,{value:"Module"}));var ga=e=>e.chartData,tx=Y([ga],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Vu=(e,t,n,r)=>r?tx(e):ga(e);function vl(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(_n(t)&&_n(n))return!0}return!1}function F2(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function Gq(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(_n(n))i=n;else if(typeof n=="function")return;if(_n(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(vl(a))return a}}function Xq(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(vl(r))return F2(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(he(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&kS.test(i)){var l=kS.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(he(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&PS.test(o)){var u=PS.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(vl(f))return t==null?f:F2(f,t,n)}}}var Dl=1e9,Qq={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},rx,Et=!0,Ur="[DecimalError] ",es=Ur+"Invalid argument: ",nx=Ur+"Exponent out of range: ",Al=Math.floor,Na=Math.pow,Zq=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wr,fn=1e7,mt=7,DN=9007199254740991,gp=Al(DN/mt),pe={};pe.absoluteValue=pe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};pe.comparedTo=pe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};pe.decimalPlaces=pe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*mt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};pe.dividedBy=pe.div=function(e){return ho(this,new this.constructor(e))};pe.dividedToIntegerBy=pe.idiv=function(e){var t=this,n=t.constructor;return lt(ho(t,new n(e),0,1),n.precision)};pe.equals=pe.eq=function(e){return!this.cmp(e)};pe.exponent=function(){return Qt(this)};pe.greaterThan=pe.gt=function(e){return this.cmp(e)>0};pe.greaterThanOrEqualTo=pe.gte=function(e){return this.cmp(e)>=0};pe.isInteger=pe.isint=function(){return this.e>this.d.length-2};pe.isNegative=pe.isneg=function(){return this.s<0};pe.isPositive=pe.ispos=function(){return this.s>0};pe.isZero=function(){return this.s===0};pe.lessThan=pe.lt=function(e){return this.cmp(e)<0};pe.lessThanOrEqualTo=pe.lte=function(e){return this.cmp(e)<1};pe.logarithm=pe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(wr))throw Error(Ur+"NaN");if(n.s<1)throw Error(Ur+(n.s?"NaN":"-Infinity"));return n.eq(wr)?new r(0):(Et=!1,t=ho(au(n,o),au(e,o),o),Et=!0,lt(t,i))};pe.minus=pe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?NN(t,e):AN(t,(e.s=-e.s,e))};pe.modulo=pe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ur+"NaN");return n.s?(Et=!1,t=ho(n,e,0,1).times(e),Et=!0,n.minus(t)):lt(new r(n),i)};pe.naturalExponential=pe.exp=function(){return TN(this)};pe.naturalLogarithm=pe.ln=function(){return au(this)};pe.negated=pe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};pe.plus=pe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AN(t,e):NN(t,(e.s=-e.s,e))};pe.precision=pe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(es+e);if(t=Qt(i)+1,r=i.d.length-1,n=r*mt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};pe.squareRoot=pe.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ur+"NaN")}for(e=Qt(s),Et=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ki(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Al((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(ho(s,o,a+2)).times(.5),ki(o.d).slice(0,a)===(t=ki(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(lt(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Et=!0,lt(r,n)};pe.times=pe.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%fn|0,t=s/fn|0;o[i]=(o[i]+t)%fn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Et?lt(e,d.precision):e};pe.toDecimalPlaces=pe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Fi(e,0,Dl),t===void 0?t=r.rounding:Fi(t,0,8),lt(n,e+Qt(n)+1,t))};pe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=cs(r,!0):(Fi(e,0,Dl),t===void 0?t=i.rounding:Fi(t,0,8),r=lt(new i(r),e+1,t),n=cs(r,!0,e+1)),n};pe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?cs(i):(Fi(e,0,Dl),t===void 0?t=o.rounding:Fi(t,0,8),r=lt(new o(i),e+Qt(i)+1,t),n=cs(r.abs(),!1,e+Qt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};pe.toInteger=pe.toint=function(){var e=this,t=e.constructor;return lt(new t(e),Qt(e)+1,t.rounding)};pe.toNumber=function(){return+this};pe.toPower=pe.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(wr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ur+"Infinity");return s}if(s.eq(wr))return s;if(r=l.precision,e.eq(wr))return lt(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=DN){for(i=new l(wr),t=Math.ceil(r/mt+4),Et=!1;n%2&&(i=i.times(s),$2(i.d,t)),n=Al(n/2),n!==0;)s=s.times(s),$2(s.d,t);return Et=!0,e.s<0?new l(wr).div(i):lt(i,r)}}else if(o<0)throw Error(Ur+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Et=!1,i=e.times(au(s,r+c)),Et=!0,i=TN(i),i.s=o,i};pe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Qt(i),r=cs(i,n<=o.toExpNeg||n>=o.toExpPos)):(Fi(e,1,Dl),t===void 0?t=o.rounding:Fi(t,0,8),i=lt(new o(i),e,t),n=Qt(i),r=cs(i,e<=n||n<=o.toExpNeg,e)),r};pe.toSignificantDigits=pe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Fi(e,1,Dl),t===void 0?t=r.rounding:Fi(t,0,8)),lt(new r(n),e,t)};pe.toString=pe.valueOf=pe.val=pe.toJSON=pe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Qt(e),n=e.constructor;return cs(e,t<=n.toExpNeg||t>=n.toExpPos)};function AN(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Et?lt(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/mt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/fn|0,l[o]%=fn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Et?lt(t,d):t}function Fi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(es+e)}function ki(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=mt-r.length,n&&(o+=Bo(n)),o+=r;a=e[t],r=a+"",n=mt-r.length,n&&(o+=Bo(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var ho=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%fn|0,a=o/fn|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*fn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,g,v,x,_,w,y,E,S,P,D,T=r.constructor,R=r.s==i.s?1:-1,A=r.d,C=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Ur+"Division by zero");for(l=r.e-i.e,P=C.length,E=A.length,p=new T(R),m=p.d=[],c=0;C[c]==(A[c]||0);)++c;if(C[c]>(A[c]||0)&&--l,o==null?_=o=T.precision:a?_=o+(Qt(r)-Qt(i))+1:_=o,_<0)return new T(0);if(_=_/mt+2|0,c=0,P==1)for(u=0,C=C[0],_++;(c<E||u)&&_--;c++)w=u*fn+(A[c]||0),m[c]=w/C|0,u=w%C|0;else{for(u=fn/(C[0]+1)|0,u>1&&(C=e(C,u),A=e(A,u),P=C.length,E=A.length),y=P,g=A.slice(0,P),v=g.length;v<P;)g[v++]=0;D=C.slice(),D.unshift(0),S=C[0],C[1]>=fn/2&&++S;do u=0,s=t(C,g,P,v),s<0?(x=g[0],P!=v&&(x=x*fn+(g[1]||0)),u=x/S|0,u>1?(u>=fn&&(u=fn-1),d=e(C,u),f=d.length,v=g.length,s=t(d,g,f,v),s==1&&(u--,n(d,P<f?D:C,f))):(u==0&&(s=u=1),d=C.slice()),f=d.length,f<v&&d.unshift(0),n(g,d,v),s==-1&&(v=g.length,s=t(C,g,P,v),s<1&&(u++,n(g,P<v?D:C,v))),v=g.length):s===0&&(u++,g=[0]),m[c++]=u,s&&g[0]?g[v++]=A[y]||0:(g=[A[y]],v=1);while((y++<E||g[0]!==void 0)&&_--)}return m[0]||m.shift(),p.e=l,lt(p,a?o+Qt(p)+1:o)}})();function TN(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(Qt(e)>16)throw Error(nx+Qt(e));if(!e.s)return new u(wr);for(Et=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Na(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(wr),u.precision=s;;){if(i=lt(i.times(e),s),n=n.times(++l),a=o.plus(ho(i,n,s)),ki(a.d).slice(0,s)===ki(o.d).slice(0,s)){for(;c--;)o=lt(o.times(o),s);return u.precision=d,t==null?(Et=!0,lt(o,d)):o}o=a}}function Qt(e){for(var t=e.e*mt,n=e.d[0];n>=10;n/=10)t++;return t}function rv(e,t,n){if(t>e.LN10.sd())throw Et=!0,n&&(e.precision=n),Error(Ur+"LN10 precision limit exceeded");return lt(new e(e.LN10),t)}function Bo(e){for(var t="";e--;)t+="0";return t}function au(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,g=p.constructor,v=g.precision;if(p.s<1)throw Error(Ur+(p.s?"NaN":"-Infinity"));if(p.eq(wr))return new g(0);if(t==null?(Et=!1,c=v):c=t,p.eq(10))return t==null&&(Et=!0),rv(g,c);if(c+=f,g.precision=c,n=ki(m),r=n.charAt(0),o=Qt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ki(p.d),r=n.charAt(0),d++;o=Qt(p),r>1?(p=new g("0."+n),o++):p=new g(r+"."+n.slice(1))}else return l=rv(g,c+2,v).times(o+""),p=au(new g(r+"."+n.slice(1)),c-f).plus(l),g.precision=v,t==null?(Et=!0,lt(p,v)):p;for(s=a=p=ho(p.minus(wr),p.plus(wr),c),u=lt(p.times(p),c),i=3;;){if(a=lt(a.times(u),c),l=s.plus(ho(a,new g(i),c)),ki(l.d).slice(0,c)===ki(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(rv(g,c+2,v).times(o+""))),s=ho(s,new g(d),c),g.precision=v,t==null?(Et=!0,lt(s,v)):s;s=l,i+=2}}function L2(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Al(n/mt),e.d=[],r=(n+1)%mt,n<0&&(r+=mt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=mt;r<i;)e.d.push(+t.slice(r,r+=mt));t=t.slice(r),r=mt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Et&&(e.e>gp||e.e<-gp))throw Error(nx+n)}else e.s=0,e.e=0,e.d=[0];return e}function lt(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=mt,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/mt),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=mt,i=r-mt+a}if(n!==void 0&&(o=Na(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/Na(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=Qt(e),d.length=1,t=t-o-1,d[0]=Na(10,(mt-t%mt)%mt),e.e=Al(-t/mt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=Na(10,mt-r),d[u]=i>0?(c/Na(10,a-i)%Na(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==fn&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=fn)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Et&&(e.e>gp||e.e<-gp))throw Error(nx+Qt(e));return e}function NN(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),Et?lt(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/mt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=fn-1;--l[o],l[i]+=fn}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Et?lt(t,p):t):new f(0)}function cs(e,t,n){var r,i=Qt(e),o=ki(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Bo(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Bo(-i-1)+o,n&&(r=n-a)>0&&(o+=Bo(r))):i>=a?(o+=Bo(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Bo(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Bo(r))),e.s<0?"-"+o:o}function $2(e,t){if(e.length>t)return e.length=t,!0}function jN(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(es+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return L2(a,o.toString())}else if(typeof o!="string")throw Error(es+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Zq.test(o))L2(a,o);else throw Error(es+o)}if(i.prototype=pe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=jN,i.config=i.set=Jq,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Jq(e){if(!e||typeof e!="object")throw Error(Ur+"Object expected");var t,n,r,i=["precision",1,Dl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Al(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(es+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(es+n+": "+r);return this}var rx=jN(Qq);wr=new rx(1);const Je=rx;var eG=e=>e,MN={},RN=e=>e===MN,B2=e=>function t(){return arguments.length===0||arguments.length===1&&RN(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},IN=(e,t)=>e===1?t:B2(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==MN).length;return o>=e?t(...r):IN(e-o,B2(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>RN(u)?s.shift():u);return t(...c,...s)}))}),Bh=e=>IN(e.length,e),Wy=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},tG=Bh((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),nG=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return eG;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},zy=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),FN=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function LN(e){var t;return e===0?t=1:t=Math.floor(new Je(e).abs().log(10).toNumber())+1,t}function $N(e,t,n){for(var r=new Je(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}Bh((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});Bh((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});Bh((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var BN=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},WN=(e,t,n)=>{if(e.lte(0))return new Je(0);var r=LN(e.toNumber()),i=new Je(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Je(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Je(l.toNumber()):new Je(Math.ceil(l.toNumber()))},rG=(e,t,n)=>{var r=new Je(1),i=new Je(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Je(10).pow(LN(e)-1),i=new Je(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Je(Math.floor(e)))}else e===0?i=new Je(Math.floor((t-1)/2)):n||(i=new Je(Math.floor(e)));var a=Math.floor((t-1)/2),s=nG(tG(l=>i.add(new Je(l-a).mul(r)).toNumber()),Wy);return s(0,t)},zN=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Je(0),tickMin:new Je(0),tickMax:new Je(0)};var a=WN(new Je(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Je(0):(s=new Je(t).add(n).div(2),s=s.sub(new Je(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Je(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?zN(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Je(l).mul(a)),tickMax:s.add(new Je(c).mul(a))})};function iG(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=BN([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...Wy(0,r-1).map(()=>1/0)]:[...Wy(0,r-1).map(()=>-1/0),s];return t>n?zy(l):l}if(a===s)return rG(a,r,i);var{step:c,tickMin:u,tickMax:d}=zN(a,s,o,i,0),f=$N(u,d.add(new Je(.1).mul(c)),c);return t>n?zy(f):f}function oG(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=BN([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=WN(new Je(a).sub(o).div(s-1),i,0),c=[...$N(new Je(o),new Je(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?zy(c):c}var aG=FN(iG),sG=FN(oG),VN=e=>e.rootProps.maxBarSize,lG=e=>e.rootProps.barGap,HN=e=>e.rootProps.barCategoryGap,cG=e=>e.rootProps.barSize,Hu=e=>e.rootProps.stackOffset,ix=e=>e.options.chartName,ox=e=>e.rootProps.syncId,YN=e=>e.rootProps.syncMethod,ax=e=>e.options.eventEmitter,no={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},vr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Wh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},uG={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:no.angleAxisId,includeHidden:!1,name:void 0,reversed:no.reversed,scale:no.scale,tick:no.tick,tickCount:void 0,ticks:void 0,type:no.type,unit:void 0},dG={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:vr.type,unit:void 0},fG={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:no.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:no.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:no.scale,tick:no.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},pG={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:"category",unit:void 0},sx=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?fG:uG,lx=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?pG:dG,zh=e=>e.polarOptions,cx=Y([Do,Ao,on],kT),UN=Y([zh,cx],(e,t)=>{if(e!=null)return In(e.innerRadius,t,0)}),KN=Y([zh,cx],(e,t)=>{if(e!=null)return In(e.outerRadius,t,t*.8)}),hG=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},qN=Y([zh],hG);Y([sx,qN],Wh);var GN=Y([cx,UN,KN],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});Y([lx,GN],Wh);var XN=Y([ke,zh,UN,KN,Do,Ao],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:In(a,i,i/2),cy:In(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),Ct=(e,t)=>t,Yu=(e,t,n)=>n;function Vh(e){return e?.id}var ln=e=>{var t=ke(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Tl=e=>e.tooltip.settings.axisId,gn=e=>{var t=ln(e),n=Tl(e);return Uu(e,t,n)},QN=Y([gn],e=>e?.dataKey);function ZN(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=Vh(s);c.forEach((d,f)=>{var p=o==null||i?f:String(it(d,o,null)),m=it(d,s.dataKey,0),g;a.has(p)?g=a.get(p):g={},Object.assign(g,{[u]:m}),a.set(p,g)})}}),Array.from(a.values())}function Hh(e){return e.stackId!=null&&e.dataKey!=null}function W2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W2(Object(n),!0).forEach(function(r){mG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mG(e,t,n){return(t=gG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gG(e){var t=vG(e,"string");return typeof t=="symbol"?t:t+""}function vG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vy=[0,"auto"],pr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},JN=(e,t)=>e.cartesianAxis.xAxis[t],zi=(e,t)=>{var n=JN(e,t);return n??pr},hr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Vy,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Fu},ej=(e,t)=>e.cartesianAxis.yAxis[t],Vi=(e,t)=>{var n=ej(e,t);return n??hr},yG={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},ux=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??yG},zt=(e,t,n)=>{switch(t){case"xAxis":return zi(e,n);case"yAxis":return Vi(e,n);case"zAxis":return ux(e,n);case"angleAxis":return sx(e,n);case"radiusAxis":return lx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},bG=(e,t,n)=>{switch(t){case"xAxis":return zi(e,n);case"yAxis":return Vi(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Uu=(e,t,n)=>{switch(t){case"xAxis":return zi(e,n);case"yAxis":return Vi(e,n);case"angleAxis":return sx(e,n);case"radiusAxis":return lx(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},tj=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function dx(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Ku=e=>e.graphicalItems.cartesianItems,xG=Y([Ct,Yu],dx),fx=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),qu=Y([Ku,zt,xG],fx),nj=Y([qu],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Hh)),rj=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),ij=Y([qu],rj),px=e=>e.map(t=>t.data).filter(Boolean).flat(1),wG=Y([qu],px),hx=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},mx=Y([wG,Vu],hx),gx=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:it(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:it(i,r)}))):e.map(r=>({value:r})),Yh=Y([mx,zt,qu],gx);function oj(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ys(e){return e.filter(t=>Hr(t)||t instanceof Date).map(Number).filter(t=>Fn(t)===!1)}function _G(e,t,n){return!n||typeof t!="number"||Fn(t)?[]:n.length?ys(n.flatMap(r=>{var i=it(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!_n(o)||!_n(a)))return[t-o,t+a]})):[]}var EG=Y([nj,Vu,gn],ZN),aj=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(Vh);return[a,{stackedData:PY(e,l,n),graphicalItems:s}]}))},su=Y([EG,nj,Hu],aj),sj=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=NY(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},SG=Y([su,ga,Ct],sj),lj=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>oj(i,d)),u=it(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:_G(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:it(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Uh=e=>e.errorBars,cj=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>oj(n,r));Y([ij,Uh,Ct],cj);var OG=Y([mx,zt,ij,Uh,Ct],lj);function CG(e){var{value:t}=e;if(Hr(t)||t instanceof Date)return t}var z2=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=ys(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},kG=(e,t,n)=>{var r=e.map(CG).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&gA(r))?qT(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},vx=e=>{var t;if(e==null||!("domain"in e))return Vy;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=ys(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Vy},yp=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},uj=e=>e.referenceElements.dots,Nl=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),PG=Y([uj,Ct,Yu],Nl),dj=e=>e.referenceElements.areas,DG=Y([dj,Ct,Yu],Nl),fj=e=>e.referenceElements.lines,AG=Y([fj,Ct,Yu],Nl),pj=(e,t)=>{var n=ys(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},TG=Y(PG,Ct,pj),hj=(e,t)=>{var n=ys(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},NG=Y([DG,Ct],hj),mj=(e,t)=>{var n=ys(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},jG=Y(AG,Ct,mj),MG=Y(TG,jG,NG,(e,t,n)=>yp(e,n,t)),gj=Y([zt],vx),yx=(e,t,n,r,i,o,a)=>{var s=Gq(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?yp(n,i,z2(r)):yp(i,z2(r));return Xq(t,c,e.allowDataOverflow)},RG=Y([zt,gj,SG,OG,MG,ke,Ct],yx),IG=[0,1],bx=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=Wi(t,o);return c&&s==null?qT(0,n.length):l==="category"?kG(r,e,c):i==="expand"?IG:a}},xx=Y([zt,ke,mx,Yh,Hu,Ct,RG],bx),vj=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(Tu(o));return s in wc?s:"point"}}},jl=Y([zt,ke,tj,ix,Ct],vj);function FG(e){if(e!=null){if(e in wc)return wc[e]();var t="scale".concat(Tu(e));if(t in wc)return wc[t]()}}function wx(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=FG(t);if(i!=null){var o=i.domain(n).range(r);return EY(o),o}}}var _x=(e,t,n)=>{var r=vx(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&vl(e))return aG(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&vl(e))return sG(e,t.tickCount,t.allowDecimals)}},Ex=Y([xx,Uu,jl],_x),Sx=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&vl(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},LG=Y([zt,xx,Ex,Ct],Sx),$G=Y(Yh,zt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ys(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),yj=Y($G,ke,HN,on,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!_n(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=In(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),BG=(e,t)=>{var n=zi(e,t);return n==null||typeof n.padding!="string"?0:yj(e,"xAxis",t,n.padding)},WG=(e,t)=>{var n=Vi(e,t);return n==null||typeof n.padding!="string"?0:yj(e,"yAxis",t,n.padding)},zG=Y(zi,BG,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),VG=Y(Vi,WG,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),HG=Y([on,zG,Nh,Th,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),YG=Y([on,ke,VG,Nh,Th,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Gu=(e,t,n,r)=>{var i;switch(t){case"xAxis":return HG(e,n,r);case"yAxis":return YG(e,n,r);case"zAxis":return(i=ux(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return qN(e);case"radiusAxis":return GN(e,n);default:return}},bj=Y([zt,Gu],Wh),aa=Y([zt,jl,LG,bj],wx);Y([qu,Uh,Ct],cj);function xj(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Kh=(e,t)=>t,qh=(e,t,n)=>n,UG=Y(Dh,Kh,qh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(xj)),KG=Y(Ah,Kh,qh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(xj)),wj=(e,t)=>({width:e.width,height:t.height}),qG=(e,t)=>{var n=typeof t.width=="number"?t.width:Fu;return{width:n,height:e.height}},_j=Y(on,zi,wj),GG=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},XG=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},QG=Y(Ao,on,UG,Kh,qh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=wj(t,s);a==null&&(a=GG(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),ZG=Y(Do,on,KG,Kh,qh,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=qG(t,s);a==null&&(a=XG(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),JG=(e,t)=>{var n=zi(e,t);if(n!=null)return QG(e,n.orientation,n.mirror)},eX=Y([on,zi,JG,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),tX=(e,t)=>{var n=Vi(e,t);if(n!=null)return ZG(e,n.orientation,n.mirror)},nX=Y([on,Vi,tX,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Ej=Y(on,Vi,(e,t)=>{var n=typeof t.width=="number"?t.width:Fu;return{width:n,height:e.height}}),V2=(e,t,n)=>{switch(t){case"xAxis":return _j(e,n).width;case"yAxis":return Ej(e,n).height;default:return}},Sj=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=Wi(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&gA(l))return l}},Ox=Y([ke,Yh,zt,Ct],Sj),Oj=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=Wi(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},Cx=Y([ke,Yh,Uu,Ct],Oj),H2=Y([ke,bG,jl,aa,Ox,Cx,Gu,Ex,Ct],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=Wi(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),rX=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=Wi(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?hn(o[0]-o[1])*2*m:m;var g=d||i;if(g){var v=g.map((x,_)=>{var w=a?a.indexOf(x):x;return{index:_,coordinate:r(w)+m,value:x,offset:m}});return v.filter(x=>!Fn(x.coordinate))}return c&&s?s.map((x,_)=>({coordinate:r(x)+m,value:x,index:_,offset:m})):r.ticks?r.ticks(f).map(x=>({coordinate:r(x)+m,value:x,offset:m})):r.domain().map((x,_)=>({coordinate:r(x)+m,value:a?a[x]:x,index:_,offset:m}))}},Cj=Y([ke,Uu,jl,aa,Ex,Gu,Ox,Cx,Ct],rX),iX=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=Wi(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?hn(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},Li=Y([ke,Uu,aa,Gu,Ox,Cx,Ct],iX),$i=Y(zt,aa,(e,t)=>{if(!(e==null||t==null))return vp(vp({},e),{},{scale:t})}),oX=Y([zt,jl,xx,bj],wx);Y((e,t,n)=>ux(e,n),oX,(e,t)=>{if(!(e==null||t==null))return vp(vp({},e),{},{scale:t})});var aX=Y([ke,Dh,Ah],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),kj=e=>e.options.defaultTooltipEventType,Pj=e=>e.options.validateTooltipEventTypes;function Dj(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function kx(e,t){var n=kj(e),r=Pj(e);return Dj(t,n,r)}function sX(e){return fe(t=>kx(t,e))}var Aj=(e,t)=>{var n,r=Number(t);if(!(Fn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},lX=e=>e.tooltip.settings,zo={active:!1,index:null,dataKey:void 0,coordinate:void 0},cX={itemInteraction:{click:zo,hover:zo},axisInteraction:{click:zo,hover:zo},keyboardInteraction:zo,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Tj=Pr({name:"tooltip",initialState:cX,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=po(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:uX,removeTooltipEntrySettings:dX,setTooltipSettingsState:fX,setActiveMouseOverItemIndex:Nj,mouseLeaveItem:pX,mouseLeaveChart:jj,setActiveClickItemIndex:hX,setMouseOverAxisIndex:Mj,setMouseClickAxisIndex:mX,setSyncInteraction:Hy,setKeyboardInteraction:Yy}=Tj.actions,gX=Tj.reducer;function Y2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Md(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y2(Object(n),!0).forEach(function(r){vX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vX(e,t,n){return(t=yX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yX(e){var t=bX(e,"string");return typeof t=="symbol"?t:t+""}function bX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xX(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function wX(e){return e.index!=null}var Rj=(e,t,n,r)=>{if(t==null)return zo;var i=xX(e,t,n);if(i==null)return zo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(wX(i)){if(o)return Md(Md({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return Md(Md({},zo),{},{coordinate:i.coordinate})},Px=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!_n(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},Ij=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},Fj=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Xu=e=>e.options.tooltipPayloadSearcher,Ml=e=>e.tooltip;function U2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U2(Object(n),!0).forEach(function(r){_X(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _X(e,t,n){return(t=EX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EX(e){var t=SX(e,"string");return typeof t=="symbol"?t:t+""}function SX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OX(e,t){return e??t}var Lj=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:g,settings:v}=p,x=OX(g,s),_=Array.isArray(x)?PT(x,c,u):x,w=(m=v?.dataKey)!==null&&m!==void 0?m:r,y=v?.nameKey,E;if(r&&Array.isArray(_)&&!Array.isArray(_[0])&&a==="axis"?E=vA(_,r,i):E=o(_,t,l,y),Array.isArray(E))E.forEach(P=>{var D=K2(K2({},v),{},{name:P.name,unit:P.unit,color:void 0,fill:void 0});f.push(DS({tooltipEntrySettings:D,dataKey:P.dataKey,payload:P.payload,value:it(P.payload,P.dataKey),name:P.name}))});else{var S;f.push(DS({tooltipEntrySettings:v,dataKey:w,payload:E,value:it(E,w),name:(S=it(E,y))!==null&&S!==void 0?S:v?.name}))}return f},d)}},Dx=Y([gn,ke,tj,ix,ln],vj),CX=Y([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),kX=Y([ln,Tl],dx),Qu=Y([CX,gn,kX],fx),PX=Y([Qu],e=>e.filter(Hh)),DX=Y([Qu],px),Rl=Y([DX,ga],hx),AX=Y([PX,ga,gn],ZN),Ax=Y([Rl,gn,Qu],gx),TX=Y([gn],vx),NX=Y([Qu],e=>e.filter(Hh)),jX=Y([AX,NX,Hu],aj),MX=Y([jX,ga,ln],sj),RX=Y([Qu],rj),IX=Y([Rl,gn,RX,Uh,ln],lj),FX=Y([uj,ln,Tl],Nl),LX=Y([FX,ln],pj),$X=Y([dj,ln,Tl],Nl),BX=Y([$X,ln],hj),WX=Y([fj,ln,Tl],Nl),zX=Y([WX,ln],mj),VX=Y([LX,zX,BX],yp),HX=Y([gn,TX,MX,IX,VX,ke,ln],yx),$j=Y([gn,ke,Rl,Ax,Hu,ln,HX],bx),YX=Y([$j,gn,Dx],_x),UX=Y([gn,$j,YX,ln],Sx),Bj=e=>{var t=ln(e),n=Tl(e),r=!1;return Gu(e,t,n,r)},Wj=Y([gn,Bj],Wh),zj=Y([gn,Dx,UX,Wj],wx),KX=Y([ke,Ax,gn,ln],Sj),qX=Y([ke,Ax,gn,ln],Oj),GX=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=Wi(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?hn(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},jo=Y([ke,gn,Dx,zj,Bj,KX,qX,ln],GX),Tx=Y([kj,Pj,lX],(e,t,n)=>Dj(n.shared,e,t)),Vj=e=>e.tooltip.settings.trigger,Nx=e=>e.tooltip.settings.defaultIndex,Gh=Y([Ml,Tx,Vj,Nx],Rj),sa=Y([Gh,Rl],Px),Hj=Y([jo,sa],Aj),Yj=Y([Gh],e=>{if(e)return e.dataKey}),Uj=Y([Ml,Tx,Vj,Nx],Fj),XX=Y([Do,Ao,ke,on,jo,Nx,Uj,Xu],Ij),QX=Y([Gh,XX],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),ZX=Y([Gh],e=>e.active),JX=Y([Uj,sa,ga,QN,Hj,Xu,Tx],Lj),eQ=Y([JX],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function q2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q2(Object(n),!0).forEach(function(r){tQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tQ(e,t,n){return(t=nQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nQ(e){var t=rQ(e,"string");return typeof t=="symbol"?t:t+""}function rQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iQ=()=>fe(gn),oQ=()=>{var e=iQ(),t=fe(jo),n=fe(zj);return ls(G2(G2({},e),{},{scale:n}),t)},Kj=()=>fe(ix),jx=(e,t)=>t,qj=(e,t,n)=>n,Mx=(e,t,n,r)=>r,aQ=Y(jo,e=>Sh(e,t=>t.coordinate)),Rx=Y([Ml,jx,qj,Mx],Rj),Gj=Y([Rx,Rl],Px),sQ=(e,t,n)=>{if(t!=null){var r=Ml(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},Xj=Y([Ml,jx,qj,Mx],Fj),bp=Y([Do,Ao,ke,on,jo,Mx,Xj,Xu],Ij),lQ=Y([Rx,bp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),Qj=Y(jo,Gj,Aj),cQ=Y([Xj,Gj,ga,QN,Qj,Xu,jx],Lj),uQ=Y([Rx],e=>({isActive:e.active,activeIndex:e.index})),dQ=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=jY(e.chartX,e.chartY,t,n,s);if(l){var c=RY(l,t),u=wY(c,a,o,r,i),d=MY(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function Uy(){return Uy=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},Uy.apply(null,arguments)}function X2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X2(Object(n),!0).forEach(function(r){fQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fQ(e,t,n){return(t=pQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pQ(e){var t=hQ(e,"string");return typeof t=="symbol"?t:t+""}function hQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mQ(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=R9;else if(c==="BarChart")p=I9(a,u,i,o),m=HT;else if(a==="radial"){var{cx:g,cy:v,radius:x,startAngle:_,endAngle:w}=YT(u);p={cx:g,cy:v,startAngle:_,endAngle:w,innerRadius:x,outerRadius:x},m=KT}else p={points:mU(a,u,i)},m=Ks;var y=typeof s=="object"&&"className"in s?s.className:void 0,E=Rd(Rd(Rd(Rd({stroke:"#ccc",pointerEvents:"none"},i),p),pt(s,!1)),{},{payload:d,payloadIndex:f,className:ce("recharts-tooltip-cursor",y)});return k.isValidElement(s)?k.cloneElement(s,E):k.createElement(m,E)}function gQ(e){var t=oQ(),n=RT(),r=Lu(),i=Kj();return O.createElement(mQ,Uy({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var Zj=k.createContext(null),vQ=()=>k.useContext(Zj),iv={exports:{}},Q2;function yQ(){return Q2||(Q2=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var g=n?n+c:c;if(!this._events[g])return!1;var v=this._events[g],x=arguments.length,_,w;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),x){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,d),!0;case 4:return v.fn.call(v.context,u,d,f),!0;case 5:return v.fn.call(v.context,u,d,f,p),!0;case 6:return v.fn.call(v.context,u,d,f,p,m),!0}for(w=1,_=new Array(x-1);w<x;w++)_[w-1]=arguments[w];v.fn.apply(v.context,_)}else{var y=v.length,E;for(w=0;w<y;w++)switch(v[w].once&&this.removeListener(c,v[w].fn,void 0,!0),x){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,u);break;case 3:v[w].fn.call(v[w].context,u,d);break;case 4:v[w].fn.call(v[w].context,u,d,f);break;default:if(!_)for(E=1,_=new Array(x-1);E<x;E++)_[E-1]=arguments[E];v[w].fn.apply(v[w].context,_)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var g=0,v=[],x=m.length;g<x;g++)(m[g].fn!==u||f&&!m[g].once||d&&m[g].context!==d)&&v.push(m[g]);v.length?this._events[p]=v.length===1?v[0]:v:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(iv)),iv.exports}var bQ=yQ();const xQ=Co(bQ);var lu=new xQ,Ky="recharts.syncEvent.tooltip",Z2="recharts.syncEvent.brush";function Xh(e,t){if(t){var n=Number.parseInt(t,10);if(!Fn(n))return e?.[n]}}var wQ={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},Jj=Pr({name:"options",initialState:wQ,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),_Q=Jj.reducer,{createEventEmitter:EQ}=Jj.actions;function SQ(e){return e.tooltip.syncInteraction}var OQ={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},eM=Pr({name:"chartData",initialState:OQ,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:J2,setDataStartEndIndexes:CQ,setComputedData:Ome}=eM.actions,kQ=eM.reducer,PQ=["x","y"];function eO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eO(Object(n),!0).forEach(function(r){DQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DQ(e,t,n){return(t=AQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AQ(e){var t=TQ(e,"string");return typeof t=="symbol"?t:t+""}function TQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NQ(e,t){if(e==null)return{};var n,r,i=jQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var tM=()=>{};function MQ(){var e=fe(ox),t=fe(ax),n=Ot(),r=fe(YN),i=fe(jo),o=Lu(),a=jh(),s=fe(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return tM;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:g}=p,v=NQ(p,PQ),x=wa(wa(wa({},v),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof g=="number"&&{y:Math.max(a.y,Math.min(g,a.y+a.height))}),_=wa(wa({},u),{},{payload:wa(wa({},u.payload),{},{coordinate:x})});n(_)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var y={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},E=r(i,y);w=i[E]}else r==="value"&&(w=i.find(j=>String(j.value)===u.payload.label));var{coordinate:S}=u.payload;if(w==null||u.payload.active===!1||S==null||a==null){n(Hy({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:P,y:D}=S,T=Math.min(P,a.x+a.width),R=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?R:w.coordinate},C=Hy({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(C)}}};return lu.on(Ky,l),()=>{lu.off(Ky,l)}},[s,n,t,e,r,i,o,a])}function RQ(){var e=fe(ox),t=fe(ax),n=Ot();k.useEffect(()=>{if(e==null)return tM;var r=(i,o,a)=>{t!==a&&e===i&&n(CQ(o))};return lu.on(Z2,r),()=>{lu.off(Z2,r)}},[n,t,e])}function IQ(){var e=Ot();k.useEffect(()=>{e(EQ())},[e]),MQ(),RQ()}function FQ(e,t,n,r,i,o){var a=fe(f=>sQ(f,e,t)),s=fe(ax),l=fe(ox),c=fe(YN),u=fe(SQ),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=Hy({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});lu.emit(Ky,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function tO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tO(Object(n),!0).forEach(function(r){LQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LQ(e,t,n){return(t=$Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Q(e){var t=BQ(e,"string");return typeof t=="symbol"?t:t+""}function BQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WQ(e){return e.dataKey}function zQ(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(p9,t)}var rO=[],VQ={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!To.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function kt(e){var t=an(e,VQ),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:g,shared:v,trigger:x,defaultIndex:_,portal:w,axisId:y}=t,E=Ot(),S=typeof _=="number"?String(_):_;k.useEffect(()=>{E(fX({shared:v,trigger:x,axisId:y,active:n,defaultIndex:S}))},[E,v,x,y,n,S]);var P=jh(),D=$T(),T=sX(v),{activeIndex:R,isActive:A}=fe(re=>uQ(re,T,x,S)),C=fe(re=>cQ(re,T,x,S)),j=fe(re=>Qj(re,T,x,S)),N=fe(re=>lQ(re,T,x,S)),M=C,L=vQ(),B=n??A,[V,z]=ZA([M,B]),W=T==="axis"?j:void 0;FQ(T,x,N,W,R,B);var Q=w??L;if(Q==null)return null;var G=M??rO;B||(G=rO),s&&G.length&&(G=UA(M.filter(re=>re.value!=null&&(re.hide!==!0||t.includeHidden)),u,WQ));var ie=G.length>0,J=O.createElement(x9,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:B,coordinate:N,hasPayload:ie,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:P,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},zQ(a,nO(nO({},t),{},{payload:G,label:W,active:B,coordinate:N,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Si.createPortal(J,Q),B&&O.createElement(gQ,{cursor:g,tooltipEventType:T,coordinate:N,payload:M,index:R}))}var ov={},av={},sv={},iO;function HQ(){return iO||(iO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),g()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},g=()=>{m(),a=void 0,s=null},v=()=>{u()},x=function(..._){if(i?.aborted)return;a=this,s=_;const w=f==null;p(),l&&w&&u()};return x.schedule=p,x.cancel=g,x.flush=v,i?.addEventListener("abort",g,{once:!0}),x}e.debounce=t})(sv)),sv}var oO;function YQ(){return oO||(oO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HQ();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...g){u=r.apply(this,g),d=null},i,{edges:c}),p=function(...g){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,g),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,g),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(av)),av}var aO;function UQ(){return aO||(aO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YQ();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})(ov)),ov}var lv,sO;function KQ(){return sO||(sO=1,lv=UQ().throttle),lv}var qQ=KQ();const GQ=Co(qQ);var XQ=process.env.NODE_ENV!=="production",Nc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(XQ&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function lO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lO(Object(n),!0).forEach(function(r){QQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QQ(e,t,n){return(t=ZQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZQ(e){var t=JQ(e,"string");return typeof t=="symbol"?t:t+""}function JQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pt=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,g=k.useRef(null),v=k.useRef();v.current=p,k.useImperativeHandle(t,()=>g.current);var[x,_]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((E,S)=>{_(P=>{var D=Math.round(E),T=Math.round(S);return P.containerWidth===D&&P.containerHeight===T?P:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var E=T=>{var R,{width:A,height:C}=T[0].contentRect;w(A,C),(R=v.current)===null||R===void 0||R.call(v,A,C)};u>0&&(E=GQ(E,u,{trailing:!0,leading:!1}));var S=new ResizeObserver(E),{width:P,height:D}=g.current.getBoundingClientRect();return w(P,D),S.observe(g.current),()=>{S.disconnect()}},[w,u]);var y=k.useMemo(()=>{var{containerWidth:E,containerHeight:S}=x;if(E<0||S<0)return null;Nc(za(i)||za(o),`The width(%s) and height(%s) are both fixed numbers,
221
221
  maybe you don't need to use a ResponsiveContainer.`,i,o),Nc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var P=za(i)?E:i,D=za(o)?S:o;return n&&n>0&&(P?D=P/n:D&&(P=D*n),l&&D>l&&(D=l)),Nc(P>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0,
222
222
  please check the style of container, or the props width(%s) and height(%s),
223
223
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
@@ -239,27 +239,27 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
239
239
  *
240
240
  * This source code is licensed under the MIT license found in the
241
241
  * LICENSE file in the root directory of this source tree.
242
- */var rC;function gie(){return rC||(rC=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;xv.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!x){if(x=!0,_=E,E=d(E),f!==void 0&&m.hasValue){var S=m.value;if(f(S,E))return w=S}return w=E}if(S=w,n(_,E))return S;var P=d(E);return f!==void 0&&f(S,P)?(_=E,S):(_=E,w=P)}var x=!1,_,w,y=u===void 0?null:u;return[function(){return v(c())},y===null?void 0:function(){return v(y())}]},[c,u,d,f]);var g=r(l,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),s(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),xv}var iC;function vie(){return iC||(iC=1,process.env.NODE_ENV==="production"?Ld.exports=mie():Ld.exports=gie()),Ld.exports}vie();function yie(e){e()}function bie(){let e=null,t=null;return{clear(){e=null,t=null},notify(){yie(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var oC={notify(){},get:()=>[]};function xie(e,t){let n,r=oC,i=0,o=!1;function a(g){u();const v=r.subscribe(g);let x=!1;return()=>{x||(x=!0,v(),d())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=bie())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=oC)}function f(){o||(o=!0,u())}function p(){o&&(o=!1,d())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var wie=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_ie=wie(),Eie=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Sie=Eie(),Oie=()=>_ie||Sie?O.useLayoutEffect:O.useEffect,Cie=Oie(),kie=Symbol.for("react-redux-context"),Pie=typeof globalThis<"u"?globalThis:{};function Die(){if(!O.createContext)return{};const e=Pie[kie]??=new Map;let t=e.get(O.createContext);return t||(t=O.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(O.createContext,t)),t}var Aie=Die();function Tie(e){const{children:t,context:n,serverState:r,store:i}=e,o=O.useMemo(()=>{const l=xie(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[i,r]),a=O.useMemo(()=>i.getState(),[i]);Cie(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||Aie;return O.createElement(s.Provider,{value:o},t)}var Nie=Tie,jie=(e,t)=>t,i1=Y([jie,ke,XN,ln,Wj,jo,aQ,on],dQ),o1=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},UM=Yr("mouseClick"),KM=Iu();KM.startListening({actionCreator:UM,effect:(e,t)=>{var n=e.payload,r=i1(t.getState(),o1(n));r?.activeIndex!=null&&t.dispatch(mX({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var nb=Yr("mouseMove"),qM=Iu();qM.startListening({actionCreator:nb,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=kx(r,r.tooltip.settings.shared),o=i1(r,o1(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch(Mj({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(jj()))}});var aC={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},GM=Pr({name:"rootProps",initialState:aC,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:aC.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),Mie=GM.reducer,{updateOptions:Rie}=GM.actions,XM=Pr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:Iie}=XM.actions,Fie=XM.reducer,QM=Yr("keyDown"),ZM=Yr("focus"),a1=Iu();a1.startListening({actionCreator:QM,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(Px(i,Rl(n))),s=jo(n);if(o==="Enter"){var l=bp(n,"axis","hover",String(i.index));t.dispatch(Yy({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=aX(n),u=c==="left-to-right"?1:-1,d=o==="ArrowRight"?1:-1,f=a+d*u;if(!(s==null||f>=s.length||f<0)){var p=bp(n,"axis","hover",String(f));t.dispatch(Yy({active:!0,activeIndex:f.toString(),activeDataKey:void 0,activeCoordinate:p}))}}}}});a1.startListening({actionCreator:ZM,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=bp(n,"axis","hover",String(o));t.dispatch(Yy({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var Rr=Yr("externalEvent"),JM=Iu();JM.startListening({actionCreator:Rr,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:QX(n),activeDataKey:Yj(n),activeIndex:sa(n),activeLabel:Hj(n),activeTooltipIndex:sa(n),isTooltipActive:ZX(n)};e.payload.handler(r,e.payload.reactEvent)}}});var Lie=Y([Ml],e=>e.tooltipItemPayloads),$ie=Y([Lie,Xu,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=t(o,n);return a}}}),eR=Yr("touchMove"),tR=Iu();tR.startListening({actionCreator:eR,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=kx(r,r.tooltip.settings.shared);if(i==="axis"){var o=i1(r,o1({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch(Mj({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(jT),u=(a=l.getAttribute(MT))!==null&&a!==void 0?a:void 0,d=$ie(t.getState(),c,u);t.dispatch(Nj({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var Bie=eT({brush:Wte,cartesianAxis:_ee,chartData:kQ,errorBars:Bee,graphicalItems:WJ,layout:lY,legend:QY,options:_Q,polarAxis:iJ,polarOptions:Fie,referenceElements:Zte,rootProps:Mie,tooltip:gX}),Wie=function(t){return jH({reducer:Bie,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([KM.middleware,qM.middleware,a1.middleware,JM.middleware,tR.middleware]),devTools:To.devToolsEnabled})};function nR(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=On(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=Wie(t));var a=_0;return O.createElement(Nie,{context:a,store:o.current},n)}function rR(e){var{layout:t,width:n,height:r,margin:i}=e,o=Ot(),a=On();return k.useEffect(()=>{a||(o(oY(t)),o(aY({width:n,height:r})),o(iY(i)))},[o,a,t,n,r,i]),null}function iR(e){var t=Ot();return k.useEffect(()=>{t(Rie(e))},[t,e]),null}var zie=["children"];function Vie(e,t){if(e==null)return{};var n,r,i=Hie(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dp(){return Dp=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},Dp.apply(null,arguments)}var Yie={width:"100%",height:"100%"},Uie=k.forwardRef((e,t)=>{var n=D0(),r=A0(),i=$T();if(!pl(n)||!pl(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=e,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,O.createElement(p0,Dp({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:Yie,ref:t}),o)}),Kie=e=>{var{children:t}=e,n=fe(Nh);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return O.createElement(p0,{width:r,height:i,x:a,y:o},t)},sC=k.forwardRef((e,t)=>{var{children:n}=e,r=Vie(e,zie),i=On();return i?O.createElement(Kie,null,n):O.createElement(Uie,Dp({ref:t},r),n)});function qie(){var e=Ot(),[t,n]=k.useState(null),r=fe(IY);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;_n(o)&&o!==r&&e(sY(o))}},[t,e,r]),n}function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(n),!0).forEach(function(r){Xie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xie(e,t,n){return(t=Qie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qie(e){var t=Zie(e,"string");return typeof t=="symbol"?t:t+""}function Zie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jie=k.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:p,onTouchMove:m,onTouchStart:g,style:v,width:x}=e,_=Ot(),[w,y]=k.useState(null),[E,S]=k.useState(null);IQ();var P=qie(),D=k.useCallback(X=>{P(X),typeof t=="function"&&t(X),y(X),S(X)},[P,t,y,S]),T=k.useCallback(X=>{_(UM(X)),_(Rr({handler:o,reactEvent:X}))},[_,o]),R=k.useCallback(X=>{_(nb(X)),_(Rr({handler:c,reactEvent:X}))},[_,c]),A=k.useCallback(X=>{_(jj()),_(Rr({handler:u,reactEvent:X}))},[_,u]),C=k.useCallback(X=>{_(nb(X)),_(Rr({handler:d,reactEvent:X}))},[_,d]),j=k.useCallback(()=>{_(ZM())},[_]),N=k.useCallback(X=>{_(QM(X.key))},[_]),M=k.useCallback(X=>{_(Rr({handler:a,reactEvent:X}))},[_,a]),L=k.useCallback(X=>{_(Rr({handler:s,reactEvent:X}))},[_,s]),B=k.useCallback(X=>{_(Rr({handler:l,reactEvent:X}))},[_,l]),V=k.useCallback(X=>{_(Rr({handler:f,reactEvent:X}))},[_,f]),z=k.useCallback(X=>{_(Rr({handler:g,reactEvent:X}))},[_,g]),W=k.useCallback(X=>{_(eR(X)),_(Rr({handler:m,reactEvent:X}))},[_,m]),Q=k.useCallback(X=>{_(Rr({handler:p,reactEvent:X}))},[_,p]);return O.createElement(Zj.Provider,{value:w},O.createElement(xA.Provider,{value:E},O.createElement("div",{className:ce("recharts-wrapper",r),style:Gie({position:"relative",cursor:"default",width:x,height:i},v),onClick:T,onContextMenu:M,onDoubleClick:L,onFocus:j,onKeyDown:N,onMouseDown:B,onMouseEnter:R,onMouseLeave:A,onMouseMove:C,onMouseUp:V,onTouchEnd:Q,onTouchMove:W,onTouchStart:z,ref:D},n)))}),eoe=["children","className","width","height","style","compact","title","desc"];function toe(e,t){if(e==null)return{};var n,r,i=noe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function noe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var oR=k.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=e,u=toe(e,eoe),d=Xr(u);return s?O.createElement(sC,{otherAttributes:d,title:l,desc:c},n):O.createElement(Jie,{className:r,style:a,width:i,height:o,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},O.createElement(sC,{otherAttributes:d,title:l,desc:c,ref:t},O.createElement(Jte,null,n)))}),roe=["width","height"];function rb(){return rb=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},rb.apply(null,arguments)}function ioe(e,t){if(e==null)return{};var n,r,i=ooe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ooe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var aoe={top:5,right:5,bottom:5,left:5},soe={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:aoe,reverseStackOrder:!1,syncMethod:"index"},s1=k.forwardRef(function(t,n){var r,i=an(t.categoricalChartProps,soe),{width:o,height:a}=i,s=ioe(i,roe);if(!pl(o)||!pl(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,categoricalChartProps:f}=t,p={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return O.createElement(nR,{preloadedState:{options:p},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:l},O.createElement(CM,{chartData:f.data}),O.createElement(rR,{width:o,height:a,layout:i.layout,margin:i.margin}),O.createElement(iR,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(oR,rb({},s,{width:o,height:a,ref:n})))}),loe=["axis"],l1=k.forwardRef((e,t)=>O.createElement(s1,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:loe,tooltipPayloadSearcher:Xh,categoricalChartProps:e,ref:t})),coe=["axis","item"],Mo=k.forwardRef((e,t)=>O.createElement(s1,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:coe,tooltipPayloadSearcher:Xh,categoricalChartProps:e,ref:t}));function uoe(e){var t=Ot();return k.useEffect(()=>{t(Iie(e))},[t,e]),null}var doe=["width","height","layout"];function ib(){return ib=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},ib.apply(null,arguments)}function foe(e,t){if(e==null)return{};var n,r,i=poe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function poe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var hoe={top:5,right:5,bottom:5,left:5},moe={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:hoe,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},goe=k.forwardRef(function(t,n){var r,i=an(t.categoricalChartProps,moe),{width:o,height:a,layout:s}=i,l=foe(i,doe);if(!pl(o)||!pl(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f}=t,p={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,eventEmitter:void 0};return O.createElement(nR,{preloadedState:{options:p},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},O.createElement(CM,{chartData:i.data}),O.createElement(rR,{width:o,height:a,layout:s,margin:i.margin}),O.createElement(iR,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(uoe,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),O.createElement(oR,ib({width:o,height:a},l,{ref:n})))}),voe=["item"],yoe={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Hi=k.forwardRef((e,t)=>{var n=an(e,yoe);return O.createElement(goe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:voe,tooltipPayloadSearcher:Xh,categoricalChartProps:n,ref:t})}),boe=["axis"],aR=k.forwardRef((e,t)=>O.createElement(s1,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:boe,tooltipPayloadSearcher:Xh,categoricalChartProps:e,ref:t}));function Il(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function xoe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ob(e,t){return ob=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ob(e,t)}function woe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ob(e,t)}const cC={disabled:!1};var _oe=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.shape({enter:b.number,exit:b.number,appear:b.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&b.oneOfType([b.string,b.shape({enter:b.string,exit:b.string,active:b.string}),b.shape({enter:b.string,enterDone:b.string,enterActive:b.string,exit:b.string,exitDone:b.string,exitActive:b.string})]);const sR=k.createContext(null);var Eoe=function(t){return t.scrollTop},_c="unmounted",ja="exited",Ma="entering",$s="entered",ab="exiting",Yi=(function(e){woe(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=ja,o.appearStatus=Ma):l=$s:r.unmountOnExit||r.mountOnEnter?l=_c:l=ja,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===_c?{status:ja}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Ma&&a!==$s&&(o=Ma):(a===Ma||a===$s)&&(o=ab)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Ma){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Si.findDOMNode(this);a&&Eoe(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ja&&this.setState({status:_c})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Si.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!a||cC.disabled){this.safeSetState({status:$s},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ma},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:$s},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Si.findDOMNode(this);if(!o||cC.disabled){this.safeSetState({status:ja},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ab},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:ja},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Si.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===_c)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=xoe(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(sR.Provider,{value:null},typeof a=="function"?a(i,s):k.cloneElement(k.Children.only(a),s))},t})(k.Component);Yi.contextType=sR;Yi.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:b.shape({current:typeof Element>"u"?b.any:function(e,t,n,r,i,o){var a=e[t];return b.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:b.oneOfType([b.func.isRequired,b.element.isRequired]).isRequired,in:b.bool,mountOnEnter:b.bool,unmountOnExit:b.bool,appear:b.bool,enter:b.bool,exit:b.bool,timeout:function(t){var n=_oe;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:b.func,onEnter:b.func,onEntering:b.func,onEntered:b.func,onExit:b.func,onExiting:b.func,onExited:b.func}:{};function Ns(){}Yi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ns,onEntering:Ns,onEntered:Ns,onExit:Ns,onExiting:Ns,onExited:Ns};Yi.UNMOUNTED=_c;Yi.EXITED=ja;Yi.ENTERING=Ma;Yi.ENTERED=$s;Yi.EXITING=ab;const uC={};function Soe(e,t){const n=O.useRef(uC);return n.current===uC&&(n.current=e(t)),n}const Ooe=[];function Coe(e){O.useEffect(e,Ooe)}class im{static create(){return new im}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Ec(){const e=Soe(im.create).current;return Coe(e.disposeEffect),e}function koe(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Poe(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!koe(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const lR=Il(b.elementType,Poe),cR=e=>e.scrollTop;function Ap(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function Doe(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function uR(e,t,n,r){const i=e[t];if(i==null||!Number.isInteger(i)){const o=Doe(i);return new RangeError(`Invalid ${r} \`${t}\` of type \`${o}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function dR(e,t,n,r){return e[t]===void 0?null:uR(e,t,n,r)}function sb(){return null}dR.isRequired=uR;sb.isRequired=sb;const fR=process.env.NODE_ENV==="production"?sb:dR;function Aoe(e){return En("MuiPaper",e)}Kn("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 Toe=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Bn(o,Aoe,i)},Noe=Ae("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(qn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),pR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiPaper"}),i=lh(),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=Toe(d);return process.env.NODE_ENV!=="production"&&i.shadows[s]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${s}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(`
242
+ */var rC;function gie(){return rC||(rC=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;xv.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!x){if(x=!0,_=E,E=d(E),f!==void 0&&m.hasValue){var S=m.value;if(f(S,E))return w=S}return w=E}if(S=w,n(_,E))return S;var P=d(E);return f!==void 0&&f(S,P)?(_=E,S):(_=E,w=P)}var x=!1,_,w,y=u===void 0?null:u;return[function(){return v(c())},y===null?void 0:function(){return v(y())}]},[c,u,d,f]);var g=r(l,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),s(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),xv}var iC;function vie(){return iC||(iC=1,process.env.NODE_ENV==="production"?Ld.exports=mie():Ld.exports=gie()),Ld.exports}vie();function yie(e){e()}function bie(){let e=null,t=null;return{clear(){e=null,t=null},notify(){yie(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var oC={notify(){},get:()=>[]};function xie(e,t){let n,r=oC,i=0,o=!1;function a(g){u();const v=r.subscribe(g);let x=!1;return()=>{x||(x=!0,v(),d())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=bie())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=oC)}function f(){o||(o=!0,u())}function p(){o&&(o=!1,d())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var wie=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_ie=wie(),Eie=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Sie=Eie(),Oie=()=>_ie||Sie?O.useLayoutEffect:O.useEffect,Cie=Oie(),kie=Symbol.for("react-redux-context"),Pie=typeof globalThis<"u"?globalThis:{};function Die(){if(!O.createContext)return{};const e=Pie[kie]??=new Map;let t=e.get(O.createContext);return t||(t=O.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(O.createContext,t)),t}var Aie=Die();function Tie(e){const{children:t,context:n,serverState:r,store:i}=e,o=O.useMemo(()=>{const l=xie(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[i,r]),a=O.useMemo(()=>i.getState(),[i]);Cie(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||Aie;return O.createElement(s.Provider,{value:o},t)}var Nie=Tie,jie=(e,t)=>t,i1=Y([jie,ke,XN,ln,Wj,jo,aQ,on],dQ),o1=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},UM=Yr("mouseClick"),KM=Iu();KM.startListening({actionCreator:UM,effect:(e,t)=>{var n=e.payload,r=i1(t.getState(),o1(n));r?.activeIndex!=null&&t.dispatch(mX({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var nb=Yr("mouseMove"),qM=Iu();qM.startListening({actionCreator:nb,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=kx(r,r.tooltip.settings.shared),o=i1(r,o1(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch(Mj({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(jj()))}});var aC={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},GM=Pr({name:"rootProps",initialState:aC,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:aC.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),Mie=GM.reducer,{updateOptions:Rie}=GM.actions,XM=Pr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:Iie}=XM.actions,Fie=XM.reducer,QM=Yr("keyDown"),ZM=Yr("focus"),a1=Iu();a1.startListening({actionCreator:QM,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(Px(i,Rl(n))),s=jo(n);if(o==="Enter"){var l=bp(n,"axis","hover",String(i.index));t.dispatch(Yy({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=aX(n),u=c==="left-to-right"?1:-1,d=o==="ArrowRight"?1:-1,f=a+d*u;if(!(s==null||f>=s.length||f<0)){var p=bp(n,"axis","hover",String(f));t.dispatch(Yy({active:!0,activeIndex:f.toString(),activeDataKey:void 0,activeCoordinate:p}))}}}}});a1.startListening({actionCreator:ZM,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=bp(n,"axis","hover",String(o));t.dispatch(Yy({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var Rr=Yr("externalEvent"),JM=Iu();JM.startListening({actionCreator:Rr,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:QX(n),activeDataKey:Yj(n),activeIndex:sa(n),activeLabel:Hj(n),activeTooltipIndex:sa(n),isTooltipActive:ZX(n)};e.payload.handler(r,e.payload.reactEvent)}}});var Lie=Y([Ml],e=>e.tooltipItemPayloads),$ie=Y([Lie,Xu,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=t(o,n);return a}}}),eR=Yr("touchMove"),tR=Iu();tR.startListening({actionCreator:eR,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=kx(r,r.tooltip.settings.shared);if(i==="axis"){var o=i1(r,o1({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch(Mj({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(jT),u=(a=l.getAttribute(MT))!==null&&a!==void 0?a:void 0,d=$ie(t.getState(),c,u);t.dispatch(Nj({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var Bie=eT({brush:Wte,cartesianAxis:_ee,chartData:kQ,errorBars:Bee,graphicalItems:WJ,layout:lY,legend:QY,options:_Q,polarAxis:iJ,polarOptions:Fie,referenceElements:Zte,rootProps:Mie,tooltip:gX}),Wie=function(t){return jH({reducer:Bie,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([KM.middleware,qM.middleware,a1.middleware,JM.middleware,tR.middleware]),devTools:To.devToolsEnabled})};function nR(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=On(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=Wie(t));var a=_0;return O.createElement(Nie,{context:a,store:o.current},n)}function rR(e){var{layout:t,width:n,height:r,margin:i}=e,o=Ot(),a=On();return k.useEffect(()=>{a||(o(oY(t)),o(aY({width:n,height:r})),o(iY(i)))},[o,a,t,n,r,i]),null}function iR(e){var t=Ot();return k.useEffect(()=>{t(Rie(e))},[t,e]),null}var zie=["children"];function Vie(e,t){if(e==null)return{};var n,r,i=Hie(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dp(){return Dp=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},Dp.apply(null,arguments)}var Yie={width:"100%",height:"100%"},Uie=k.forwardRef((e,t)=>{var n=D0(),r=A0(),i=$T();if(!pl(n)||!pl(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=e,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,O.createElement(p0,Dp({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:Yie,ref:t}),o)}),Kie=e=>{var{children:t}=e,n=fe(Nh);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return O.createElement(p0,{width:r,height:i,x:a,y:o},t)},sC=k.forwardRef((e,t)=>{var{children:n}=e,r=Vie(e,zie),i=On();return i?O.createElement(Kie,null,n):O.createElement(Uie,Dp({ref:t},r),n)});function qie(){var e=Ot(),[t,n]=k.useState(null),r=fe(IY);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;_n(o)&&o!==r&&e(sY(o))}},[t,e,r]),n}function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(n),!0).forEach(function(r){Xie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xie(e,t,n){return(t=Qie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qie(e){var t=Zie(e,"string");return typeof t=="symbol"?t:t+""}function Zie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jie=k.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:p,onTouchMove:m,onTouchStart:g,style:v,width:x}=e,_=Ot(),[w,y]=k.useState(null),[E,S]=k.useState(null);IQ();var P=qie(),D=k.useCallback(G=>{P(G),typeof t=="function"&&t(G),y(G),S(G)},[P,t,y,S]),T=k.useCallback(G=>{_(UM(G)),_(Rr({handler:o,reactEvent:G}))},[_,o]),R=k.useCallback(G=>{_(nb(G)),_(Rr({handler:c,reactEvent:G}))},[_,c]),A=k.useCallback(G=>{_(jj()),_(Rr({handler:u,reactEvent:G}))},[_,u]),C=k.useCallback(G=>{_(nb(G)),_(Rr({handler:d,reactEvent:G}))},[_,d]),j=k.useCallback(()=>{_(ZM())},[_]),N=k.useCallback(G=>{_(QM(G.key))},[_]),M=k.useCallback(G=>{_(Rr({handler:a,reactEvent:G}))},[_,a]),L=k.useCallback(G=>{_(Rr({handler:s,reactEvent:G}))},[_,s]),B=k.useCallback(G=>{_(Rr({handler:l,reactEvent:G}))},[_,l]),V=k.useCallback(G=>{_(Rr({handler:f,reactEvent:G}))},[_,f]),z=k.useCallback(G=>{_(Rr({handler:g,reactEvent:G}))},[_,g]),W=k.useCallback(G=>{_(eR(G)),_(Rr({handler:m,reactEvent:G}))},[_,m]),Q=k.useCallback(G=>{_(Rr({handler:p,reactEvent:G}))},[_,p]);return O.createElement(Zj.Provider,{value:w},O.createElement(xA.Provider,{value:E},O.createElement("div",{className:ce("recharts-wrapper",r),style:Gie({position:"relative",cursor:"default",width:x,height:i},v),onClick:T,onContextMenu:M,onDoubleClick:L,onFocus:j,onKeyDown:N,onMouseDown:B,onMouseEnter:R,onMouseLeave:A,onMouseMove:C,onMouseUp:V,onTouchEnd:Q,onTouchMove:W,onTouchStart:z,ref:D},n)))}),eoe=["children","className","width","height","style","compact","title","desc"];function toe(e,t){if(e==null)return{};var n,r,i=noe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function noe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var oR=k.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=e,u=toe(e,eoe),d=Xr(u);return s?O.createElement(sC,{otherAttributes:d,title:l,desc:c},n):O.createElement(Jie,{className:r,style:a,width:i,height:o,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},O.createElement(sC,{otherAttributes:d,title:l,desc:c,ref:t},O.createElement(Jte,null,n)))}),roe=["width","height"];function rb(){return rb=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},rb.apply(null,arguments)}function ioe(e,t){if(e==null)return{};var n,r,i=ooe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ooe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var aoe={top:5,right:5,bottom:5,left:5},soe={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:aoe,reverseStackOrder:!1,syncMethod:"index"},s1=k.forwardRef(function(t,n){var r,i=an(t.categoricalChartProps,soe),{width:o,height:a}=i,s=ioe(i,roe);if(!pl(o)||!pl(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,categoricalChartProps:f}=t,p={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return O.createElement(nR,{preloadedState:{options:p},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:l},O.createElement(CM,{chartData:f.data}),O.createElement(rR,{width:o,height:a,layout:i.layout,margin:i.margin}),O.createElement(iR,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(oR,rb({},s,{width:o,height:a,ref:n})))}),loe=["axis"],l1=k.forwardRef((e,t)=>O.createElement(s1,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:loe,tooltipPayloadSearcher:Xh,categoricalChartProps:e,ref:t})),coe=["axis","item"],Mo=k.forwardRef((e,t)=>O.createElement(s1,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:coe,tooltipPayloadSearcher:Xh,categoricalChartProps:e,ref:t}));function uoe(e){var t=Ot();return k.useEffect(()=>{t(Iie(e))},[t,e]),null}var doe=["width","height","layout"];function ib(){return ib=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},ib.apply(null,arguments)}function foe(e,t){if(e==null)return{};var n,r,i=poe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function poe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var hoe={top:5,right:5,bottom:5,left:5},moe={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:hoe,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},goe=k.forwardRef(function(t,n){var r,i=an(t.categoricalChartProps,moe),{width:o,height:a,layout:s}=i,l=foe(i,doe);if(!pl(o)||!pl(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f}=t,p={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,eventEmitter:void 0};return O.createElement(nR,{preloadedState:{options:p},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},O.createElement(CM,{chartData:i.data}),O.createElement(rR,{width:o,height:a,layout:s,margin:i.margin}),O.createElement(iR,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(uoe,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),O.createElement(oR,ib({width:o,height:a},l,{ref:n})))}),voe=["item"],yoe={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Hi=k.forwardRef((e,t)=>{var n=an(e,yoe);return O.createElement(goe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:voe,tooltipPayloadSearcher:Xh,categoricalChartProps:n,ref:t})}),boe=["axis"],aR=k.forwardRef((e,t)=>O.createElement(s1,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:boe,tooltipPayloadSearcher:Xh,categoricalChartProps:e,ref:t}));function Il(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function xoe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ob(e,t){return ob=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ob(e,t)}function woe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ob(e,t)}const cC={disabled:!1};var _oe=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.shape({enter:b.number,exit:b.number,appear:b.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&b.oneOfType([b.string,b.shape({enter:b.string,exit:b.string,active:b.string}),b.shape({enter:b.string,enterDone:b.string,enterActive:b.string,exit:b.string,exitDone:b.string,exitActive:b.string})]);const sR=k.createContext(null);var Eoe=function(t){return t.scrollTop},_c="unmounted",ja="exited",Ma="entering",$s="entered",ab="exiting",Yi=(function(e){woe(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=ja,o.appearStatus=Ma):l=$s:r.unmountOnExit||r.mountOnEnter?l=_c:l=ja,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===_c?{status:ja}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Ma&&a!==$s&&(o=Ma):(a===Ma||a===$s)&&(o=ab)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Ma){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Si.findDOMNode(this);a&&Eoe(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ja&&this.setState({status:_c})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Si.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!a||cC.disabled){this.safeSetState({status:$s},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ma},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:$s},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Si.findDOMNode(this);if(!o||cC.disabled){this.safeSetState({status:ja},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ab},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:ja},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Si.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===_c)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=xoe(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(sR.Provider,{value:null},typeof a=="function"?a(i,s):k.cloneElement(k.Children.only(a),s))},t})(k.Component);Yi.contextType=sR;Yi.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:b.shape({current:typeof Element>"u"?b.any:function(e,t,n,r,i,o){var a=e[t];return b.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:b.oneOfType([b.func.isRequired,b.element.isRequired]).isRequired,in:b.bool,mountOnEnter:b.bool,unmountOnExit:b.bool,appear:b.bool,enter:b.bool,exit:b.bool,timeout:function(t){var n=_oe;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:b.func,onEnter:b.func,onEntering:b.func,onEntered:b.func,onExit:b.func,onExiting:b.func,onExited:b.func}:{};function Ns(){}Yi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ns,onEntering:Ns,onEntered:Ns,onExit:Ns,onExiting:Ns,onExited:Ns};Yi.UNMOUNTED=_c;Yi.EXITED=ja;Yi.ENTERING=Ma;Yi.ENTERED=$s;Yi.EXITING=ab;const uC={};function Soe(e,t){const n=O.useRef(uC);return n.current===uC&&(n.current=e(t)),n}const Ooe=[];function Coe(e){O.useEffect(e,Ooe)}class im{static create(){return new im}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Ec(){const e=Soe(im.create).current;return Coe(e.disposeEffect),e}function koe(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Poe(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!koe(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const lR=Il(b.elementType,Poe),cR=e=>e.scrollTop;function Ap(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function Doe(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function uR(e,t,n,r){const i=e[t];if(i==null||!Number.isInteger(i)){const o=Doe(i);return new RangeError(`Invalid ${r} \`${t}\` of type \`${o}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function dR(e,t,n,r){return e[t]===void 0?null:uR(e,t,n,r)}function sb(){return null}dR.isRequired=uR;sb.isRequired=sb;const fR=process.env.NODE_ENV==="production"?sb:dR;function Aoe(e){return En("MuiPaper",e)}Kn("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 Toe=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Bn(o,Aoe,i)},Noe=Ae("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(qn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),pR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiPaper"}),i=lh(),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=Toe(d);return process.env.NODE_ENV!=="production"&&i.shadows[s]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${s}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(`
243
243
  `)),h.jsx(Noe,{as:a,ownerState:d,className:ce(f.root,o),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(i.vars||i).shadows[s],...i.vars&&{"--Paper-overlay":i.vars.overlays?.[s]},...!i.vars&&i.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Cf("#fff",Xv(s))}, ${Cf("#fff",Xv(s))})`}},...u.style}})});process.env.NODE_ENV!=="production"&&(pR.propTypes={children:b.node,classes:b.object,className:b.string,component:b.elementType,elevation:Il(fR,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:b.bool,style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),variant:b.oneOfType([b.oneOf(["elevation","outlined"]),b.string])});function Tp(e){return typeof e=="string"}function hR(e,t,n){return e===void 0||Tp(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function mR(e,t,n){return typeof e=="function"?e(t,n):e}function gR(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function dC(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function vR(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=ce(n?.className,o,i?.className,r?.className),m={...n?.style,...i?.style,...r?.style},g={...n,...i,...r};return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=gR({...i,...r}),s=dC(r),l=dC(i),c=t(a),u=ce(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function ar(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=o,p=u[e]||r,m=mR(d[e],i),{props:{component:g,...v},internalRef:x}=vR({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:m}),_=Un(x,m?.ref,t.ref),w=e==="root"?g||c:g,y=hR(p,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...v,...w&&!s&&{as:w},...w&&s&&{component:w},ref:_},i);return[p,y]}const Ro=b.oneOfType([b.func,b.object]);function fC(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
244
244
  `))}return!1}function joe(e){return typeof e.main=="string"}function Moe(e,t=[]){if(!joe(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function c1(e=[]){return([,t])=>t&&Moe(t,e)}function Oo(e,t,n,r,i){if(process.env.NODE_ENV==="production")return null;const o=e[t],a=i||t;return o==null?null:o&&o.nodeType!==1?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}function yR(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:mR(n,r),{props:s,internalRef:l}=vR({...o,externalSlotProps:a}),c=Un(l,a?.ref,e.additionalProps?.ref);return hR(t,{...s,ref:c},r)}function Fl(e){return parseInt(O.version,10)>=19?e?.props?.ref||null:e?.ref||null}function Roe(e){return typeof e=="function"?e():e}const cu=O.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=O.useState(null),l=Un(O.isValidElement(r)?Fl(r):null,n);if(vo(()=>{o||s(Roe(i)||document.body)},[i,o]),vo(()=>{if(a&&!o)return Ww(n,a),()=>{Ww(n,null)}},[n,a,o]),o){if(O.isValidElement(r)){const c={ref:l};return O.cloneElement(r,c)}return r}return a&&hP.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(cu.propTypes={children:b.node,container:b.oneOfType([Oo,b.func]),disablePortal:b.bool});process.env.NODE_ENV!=="production"&&(cu.propTypes=zP(cu.propTypes));function Ioe(e){return En("MuiPopper",e)}Kn("MuiPopper",["root"]);function Foe(e,t){if(t==="ltr")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}}function Np(e){return typeof e=="function"?e():e}function om(e){return e.nodeType!==void 0}function Loe(e){return!om(e)}const $oe=e=>{const{classes:t}=e;return Bn({root:["root"]},Ioe,t)},Boe={},Woe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:g,...v}=t,x=O.useRef(null),_=Un(x,n),w=O.useRef(null),y=Un(w,d),E=O.useRef(y);vo(()=>{E.current=y},[y]),O.useImperativeHandle(d,()=>w.current,[]);const S=Foe(c,o),[P,D]=O.useState(S),[T,R]=O.useState(Np(r));O.useEffect(()=>{w.current&&w.current.forceUpdate()}),O.useEffect(()=>{r&&R(Np(r))},[r]),vo(()=>{if(!T||!l)return;const M=V=>{D(V.placement)};if(process.env.NODE_ENV!=="production"&&T&&om(T)&&T.nodeType===1){const V=T.getBoundingClientRect();process.env.NODE_ENV!=="test"&&V.top===0&&V.left===0&&V.right===0&&V.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
245
245
  `))}let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:V})=>{M(V)}}];s!=null&&(L=L.concat(s)),u&&u.modifiers!=null&&(L=L.concat(u.modifiers));const B=a0(T,x.current,{placement:S,...u,modifiers:L});return E.current(B),()=>{B.destroy(),E.current(null)}},[T,a,s,l,u,S]);const A={placement:P};m!==null&&(A.TransitionProps=m);const C=$oe(t),j=p.root??"div",N=yR({elementType:j,externalSlotProps:f.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:_},ownerState:t,className:C.root});return h.jsx(j,{...N,children:typeof i=="function"?i(A):i})}),bR=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=Boe,popperRef:p,style:m,transition:g=!1,slotProps:v={},slots:x={},..._}=t,[w,y]=O.useState(!0),E=()=>{y(!1)},S=()=>{y(!0)};if(!l&&!u&&(!g||w))return null;let P;if(o)P=o;else if(r){const R=Np(r);P=R&&om(R)?Or(R).body:Or(null).body}const D=!u&&l&&(!g||w)?"none":void 0,T=g?{in:u,onEnter:E,onExited:S}:void 0;return h.jsx(cu,{disablePortal:s,container:P,children:h.jsx(Woe,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:g?!w:u,placement:d,popperOptions:f,popperRef:p,slotProps:v,slots:x,..._,style:{position:"fixed",top:0,left:0,display:D,...m},TransitionProps:T,children:i})})});process.env.NODE_ENV!=="production"&&(bR.propTypes={anchorEl:Il(b.oneOfType([Oo,b.object,b.func]),e=>{if(e.open){const t=Np(e.anchorEl);if(t&&om(t)&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
246
246
  `))}else if(!t||typeof t.getBoundingClientRect!="function"||Loe(t)&&t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
247
247
  `))}return null}),children:b.oneOfType([b.node,b.func]),container:b.oneOfType([Oo,b.func]),direction:b.oneOf(["ltr","rtl"]),disablePortal:b.bool,keepMounted:b.bool,modifiers:b.arrayOf(b.shape({data:b.object,effect:b.func,enabled:b.bool,fn:b.func,name:b.any,options:b.object,phase:b.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:b.arrayOf(b.string),requiresIfExists:b.arrayOf(b.string)})),open:b.bool.isRequired,placement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:b.shape({modifiers:b.array,onFirstUpdate:b.func,placement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:b.oneOf(["absolute","fixed"])}),popperRef:Ro,slotProps:b.shape({root:b.oneOfType([b.func,b.object])}),slots:b.shape({root:b.elementType}),transition:b.bool});const zoe=Ae(bR,{name:"MuiPopper",slot:"Root"})({}),u1=O.forwardRef(function(t,n){const r=Nb(),i=dr({props:t,name:"MuiPopper"}),{anchorEl:o,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:v,transition:x,slots:_,slotProps:w,...y}=i,E=_?.root??s?.Root,S={anchorEl:o,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:v,transition:x,...y};return h.jsx(zoe,{as:a,direction:r?"rtl":"ltr",slots:{root:E},slotProps:w??l,...S,ref:n})});process.env.NODE_ENV!=="production"&&(u1.propTypes={anchorEl:b.oneOfType([Oo,b.object,b.func]),children:b.oneOfType([b.node,b.func]),component:b.elementType,components:b.shape({Root:b.elementType}),componentsProps:b.shape({root:b.oneOfType([b.func,b.object])}),container:b.oneOfType([Oo,b.func]),disablePortal:b.bool,keepMounted:b.bool,modifiers:b.arrayOf(b.shape({data:b.object,effect:b.func,enabled:b.bool,fn:b.func,name:b.any,options:b.object,phase:b.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:b.arrayOf(b.string),requiresIfExists:b.arrayOf(b.string)})),open:b.bool.isRequired,placement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:b.shape({modifiers:b.array,onFirstUpdate:b.func,placement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:b.oneOf(["absolute","fixed"])}),popperRef:Ro,slotProps:b.shape({root:b.oneOfType([b.func,b.object])}),slots:b.shape({root:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),transition:b.bool});function $d(e){return parseInt(e,10)||0}const Voe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Hoe(e){for(const t in e)return!1;return!0}function pC(e){return Hoe(e)||e.outerHeightStyle===0&&!e.overflowing}const xR=O.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:a,value:s,...l}=t,{current:c}=O.useRef(s!=null),u=O.useRef(null),d=Un(n,u),f=O.useRef(null),p=O.useRef(null),m=O.useCallback(()=>{const w=u.current,y=p.current;if(!w||!y)return;const S=yo(w).getComputedStyle(w);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};y.style.width=S.width,y.value=w.value||t.placeholder||"x",y.value.slice(-1)===`
248
248
  `&&(y.value+=" ");const P=S.boxSizing,D=$d(S.paddingBottom)+$d(S.paddingTop),T=$d(S.borderBottomWidth)+$d(S.borderTopWidth),R=y.scrollHeight;y.value="x";const A=y.scrollHeight;let C=R;o&&(C=Math.max(Number(o)*A,C)),i&&(C=Math.min(Number(i)*A,C)),C=Math.max(C,A);const j=C+(P==="border-box"?D+T:0),N=Math.abs(C-R)<=1;return{outerHeightStyle:j,overflowing:N}},[i,o,t.placeholder]),g=Vc(()=>{const w=u.current,y=m();if(!w||!y||pC(y))return!1;const E=y.outerHeightStyle;return f.current!=null&&f.current!==E}),v=O.useCallback(()=>{const w=u.current,y=m();if(!w||!y||pC(y))return;const E=y.outerHeightStyle;f.current!==E&&(f.current=E,w.style.height=`${E}px`),w.style.overflow=y.overflowing?"hidden":""},[m]),x=O.useRef(-1);vo(()=>{const w=ZP(v),y=u?.current;if(!y)return;const E=yo(y);E.addEventListener("resize",w);let S;return typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>{g()&&(S.unobserve(y),cancelAnimationFrame(x.current),v(),x.current=requestAnimationFrame(()=>{S.observe(y)}))}),S.observe(y)),()=>{w.clear(),cancelAnimationFrame(x.current),E.removeEventListener("resize",w),S&&S.disconnect()}},[m,v,g]),vo(()=>{v()});const _=w=>{c||v();const y=w.target,E=y.value.length,S=y.value.endsWith(`
249
- `),P=y.selectionStart===E;S&&P&&y.setSelectionRange(E,E),r&&r(w)};return h.jsxs(O.Fragment,{children:[h.jsx("textarea",{value:s,onChange:_,ref:d,rows:o,style:a,...l}),h.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...Voe.shadow,...a,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(xR.propTypes={className:b.string,maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),onChange:b.func,placeholder:b.string,style:b.object,value:b.oneOfType([b.arrayOf(b.string),b.number,b.string])});function d1({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const f1=O.createContext(void 0);process.env.NODE_ENV!=="production"&&(f1.displayName="FormControlContext");function p1(){return O.useContext(f1)}function hC(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function wR(e,t=!1){return e&&(hC(e.value)&&e.value!==""||t&&hC(e.defaultValue)&&e.defaultValue!=="")}function Yoe(e){return En("MuiInputBase",e)}const bl=Kn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var mC;const am=(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,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${wn(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},sm=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Uoe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${wn(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${wn(f)}`,u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return Bn(g,Yoe,t)},lm=Ae("div",{name:"MuiInputBase",slot:"Root",overridesResolver:am})(qn(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${bl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),cm=Ae("input",{name:"MuiInputBase",slot:"Input",overridesResolver:sm})(qn(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{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%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${bl.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${bl.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),gC=K$({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),um=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:g,fullWidth:v=!1,id:x,inputComponent:_="input",inputProps:w={},inputRef:y,margin:E,maxRows:S,minRows:P,multiline:D=!1,name:T,onBlur:R,onChange:A,onClick:C,onFocus:j,onKeyDown:N,onKeyUp:M,placeholder:L,readOnly:B,renderSuffix:V,rows:z,size:W,slotProps:Q={},slots:X={},startAdornment:ie,type:J="text",value:re,...ae}=r,le=w.value!=null?w.value:re,{current:ue}=O.useRef(le!=null),K=O.useRef(),U=O.useCallback(ye=>{process.env.NODE_ENV!=="production"&&ye&&ye.nodeName!=="INPUT"&&!ye.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
250
- `))},[]),Z=Un(K,y,w.ref,U),[I,me]=O.useState(!1),oe=p1();process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(oe)return oe.registerEffect()},[oe]);const ve=d1({props:r,muiFormControl:oe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ve.focused=oe?oe.focused:I,O.useEffect(()=>{!oe&&f&&I&&(me(!1),R&&R())},[oe,f,I,R]);const we=oe&&oe.onFilled,Ne=oe&&oe.onEmpty,qe=O.useCallback(ye=>{wR(ye)?we&&we():Ne&&Ne()},[we,Ne]);vo(()=>{ue&&qe({value:le})},[le,qe,ue]);const ut=ye=>{j&&j(ye),w.onFocus&&w.onFocus(ye),oe&&oe.onFocus?oe.onFocus(ye):me(!0)},ot=ye=>{R&&R(ye),w.onBlur&&w.onBlur(ye),oe&&oe.onBlur?oe.onBlur(ye):me(!1)},je=(ye,...dn)=>{if(!ue){const Yt=ye.target||K.current;if(Yt==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Mi(1));qe({value:Yt.value})}w.onChange&&w.onChange(ye,...dn),A&&A(ye,...dn)};O.useEffect(()=>{qe(K.current)},[]);const bt=ye=>{K.current&&ye.currentTarget===ye.target&&K.current.focus(),C&&C(ye)};let xt=_,dt=w;D&&xt==="input"&&(z?(process.env.NODE_ENV!=="production"&&(P||S)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),dt={type:void 0,minRows:z,maxRows:z,...dt}):dt={type:void 0,maxRows:S,minRows:P,...dt},xt=xR);const cn=ye=>{qe(ye.animationName==="mui-auto-fill-cancel"?K.current:{value:"x"})};O.useEffect(()=>{oe&&oe.setAdornedStart(!!ie)},[oe,ie]);const Jt={...r,color:ve.color||"primary",disabled:ve.disabled,endAdornment:m,error:ve.error,focused:ve.focused,formControl:oe,fullWidth:v,hiddenLabel:ve.hiddenLabel,multiline:D,size:ve.size,startAdornment:ie,type:J},un=Uoe(Jt),Cn=X.root||c.Root||lm,Ht=Q.root||u.root||{},kn=X.input||c.Input||cm;return dt={...dt,...Q.input??u.input},h.jsxs(O.Fragment,{children:[!p&&typeof gC=="function"&&(mC||(mC=h.jsx(gC,{}))),h.jsxs(Cn,{...Ht,ref:n,onClick:bt,...ae,...!Tp(Cn)&&{ownerState:{...Jt,...Ht.ownerState}},className:ce(un.root,Ht.className,s,B&&"MuiInputBase-readOnly"),children:[ie,h.jsx(f1.Provider,{value:null,children:h.jsx(kn,{"aria-invalid":ve.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:ve.disabled,id:x,onAnimationStart:cn,name:T,placeholder:L,readOnly:B,required:ve.required,rows:z,value:le,onKeyDown:N,onKeyUp:M,type:J,...dt,...!Tp(kn)&&{as:xt,ownerState:{...Jt,...dt.ownerState}},ref:Z,className:ce(un.input,dt.className,B&&"MuiInputBase-readOnly"),onBlur:ot,onChange:je,onFocus:ut})}),m,V?V({...ve,startAdornment:ie}):null]})]})});process.env.NODE_ENV!=="production"&&(um.propTypes={"aria-describedby":b.string,autoComplete:b.string,autoFocus:b.bool,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["primary","secondary","error","info","success","warning"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),componentsProps:b.shape({input:b.object,root:b.object}),defaultValue:b.any,disabled:b.bool,disableInjectingGlobalStyles:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,id:b.string,inputComponent:lR,inputProps:b.object,inputRef:Ro,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,onBlur:b.func,onChange:b.func,onClick:b.func,onFocus:b.func,onInvalid:b.func,onKeyDown:b.func,onKeyUp:b.func,placeholder:b.string,readOnly:b.bool,renderSuffix:b.func,required:b.bool,rows:b.oneOfType([b.number,b.string]),size:b.oneOfType([b.oneOf(["medium","small"]),b.string]),slotProps:b.shape({input:b.object,root:b.object}),slots:b.shape({input:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});function Koe(e){return En("MuiInput",e)}const sc={...bl,...Kn("MuiInput",["root","underline","input"])};function qoe(e){return En("MuiOutlinedInput",e)}const fi={...bl,...Kn("MuiOutlinedInput",["root","notchedOutline","input"])};function Goe(e){return En("MuiFilledInput",e)}const _a={...bl,...Kn("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Xoe=_u(h.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Qoe(e){const{prototype:t={}}=e;return!!t.isReactComponent}function _R(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!Qoe(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ll=Il(b.element,_R);Ll.isRequired=Il(b.element.isRequired,_R);const Zoe={entering:{opacity:1},entered:{opacity:1}},ER=O.forwardRef(function(t,n){const r=lh(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:g,style:v,timeout:x=i,TransitionComponent:_=Yi,...w}=t,y=O.useRef(null),E=Un(y,Fl(s),n),S=N=>M=>{if(N){const L=y.current;M===void 0?N(L):N(L,M)}},P=S(f),D=S((N,M)=>{cR(N);const L=Ap({style:v,timeout:x,easing:l},{mode:"enter"});N.style.webkitTransition=r.transitions.create("opacity",L),N.style.transition=r.transitions.create("opacity",L),u&&u(N,M)}),T=S(d),R=S(g),A=S(N=>{const M=Ap({style:v,timeout:x,easing:l},{mode:"exit"});N.style.webkitTransition=r.transitions.create("opacity",M),N.style.transition=r.transitions.create("opacity",M),p&&p(N)}),C=S(m),j=N=>{o&&o(y.current,N)};return h.jsx(_,{appear:a,in:c,nodeRef:y,onEnter:D,onEntered:T,onEntering:P,onExit:A,onExited:C,onExiting:R,addEndListener:j,timeout:x,...w,children:(N,{ownerState:M,...L})=>O.cloneElement(s,{style:{opacity:0,visibility:N==="exited"&&!c?"hidden":void 0,...Zoe[N],...v,...s.props.style},ref:E,...L})})});process.env.NODE_ENV!=="production"&&(ER.propTypes={addEndListener:b.func,appear:b.bool,children:Ll.isRequired,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,style:b.object,timeout:b.oneOfType([b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])});function Joe(e){return En("MuiBackdrop",e)}Kn("MuiBackdrop",["root","invisible"]);const eae=e=>{const{classes:t,invisible:n}=e;return Bn({root:["root",n&&"invisible"]},Joe,t)},tae=Ae("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({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",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),SR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...g}=r,v={...r,component:a,invisible:s},x=eae(v),_={transition:p,root:c.Root,...f},w={...u,...d},y={component:a,slots:_,slotProps:w},[E,S]=ar("root",{elementType:tae,externalForwardedProps:y,className:ce(x.root,o),ownerState:v}),[P,D]=ar("transition",{elementType:ER,externalForwardedProps:y,ownerState:v});return h.jsx(P,{in:l,timeout:m,...g,...D,children:h.jsx(E,{"aria-hidden":!0,...S,classes:x,ref:n,children:i})})});process.env.NODE_ENV!=="production"&&(SR.propTypes={children:b.node,classes:b.object,className:b.string,component:b.elementType,components:b.shape({Root:b.elementType}),componentsProps:b.shape({root:b.object}),invisible:b.bool,open:b.bool.isRequired,slotProps:b.shape({root:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({root:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),TransitionComponent:b.elementType,transitionDuration:b.oneOfType([b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])});function OR(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function nae(e){const t=Or(e);return t.body===e?yo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Mc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function vC(e){return parseInt(yo(e).getComputedStyle(e).paddingRight,10)||0}function rae(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function yC(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,a=>{const s=!o.includes(a),l=!rae(a);s&&l&&Mc(a,i)})}function wv(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function iae(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(nae(r)){const a=OR(yo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${vC(r)+a}px`;const s=Or(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${vC(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Or(r).body;else{const a=r.parentElement,s=yo(r);o=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function oae(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class aae{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Mc(t.modalRef,!1);const i=oae(n);yC(n,t.mount,t.modalRef,i,!0);const o=wv(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=wv(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=iae(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=wv(this.containers,a=>a.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Mc(t.modalRef,n),yC(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&Mc(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const sae=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function lae(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function cae(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function uae(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||cae(e))}function dae(e){const t=[],n=[];return Array.from(e.querySelectorAll(sae)).forEach((r,i)=>{const o=lae(r);o===-1||!uae(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function fae(){return!0}function jp(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=dae,isEnabled:a=fae,open:s}=e,l=O.useRef(!1),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=O.useRef(null),p=O.useRef(!1),m=O.useRef(null),g=Un(Fl(t),m),v=O.useRef(null);O.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),O.useEffect(()=>{if(!s||!m.current)return;const w=Or(m.current);return m.current.contains(w.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
251
- `)),m.current.setAttribute("tabIndex","-1")),p.current&&m.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),O.useEffect(()=>{if(!s||!m.current)return;const w=Or(m.current),y=P=>{v.current=P,!(r||!a()||P.key!=="Tab")&&w.activeElement===m.current&&P.shiftKey&&(l.current=!0,u.current&&u.current.focus())},E=()=>{const P=m.current;if(P===null)return;if(!w.hasFocus()||!a()||l.current){l.current=!1;return}if(P.contains(w.activeElement)||r&&w.activeElement!==c.current&&w.activeElement!==u.current)return;if(w.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let D=[];if((w.activeElement===c.current||w.activeElement===u.current)&&(D=o(m.current)),D.length>0){const T=!!(v.current?.shiftKey&&v.current?.key==="Tab"),R=D[0],A=D[D.length-1];typeof R!="string"&&typeof A!="string"&&(T?A.focus():R.focus())}else P.focus()};w.addEventListener("focusin",E),w.addEventListener("keydown",y,!0);const S=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&E()},50);return()=>{clearInterval(S),w.removeEventListener("focusin",E),w.removeEventListener("keydown",y,!0)}},[n,r,i,a,s,o]);const x=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0,f.current=w.target;const y=t.props.onFocus;y&&y(w)},_=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0};return h.jsxs(O.Fragment,{children:[h.jsx("div",{tabIndex:s?0:-1,onFocus:_,ref:c,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:g,onFocus:x}),h.jsx("div",{tabIndex:s?0:-1,onFocus:_,ref:u,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(jp.propTypes={children:Ll,disableAutoFocus:b.bool,disableEnforceFocus:b.bool,disableRestoreFocus:b.bool,getTabbable:b.func,isEnabled:b.func,open:b.bool.isRequired});process.env.NODE_ENV!=="production"&&(jp.propTypes=zP(jp.propTypes));function pae(e){return typeof e=="function"?e():e}function hae(e){return e?e.props.hasOwnProperty("in"):!1}const bC=()=>{},Bd=new aae;function mae(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=O.useRef({}),f=O.useRef(null),p=O.useRef(null),m=Un(p,u),[g,v]=O.useState(!c),x=hae(s);let _=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(_=!1);const w=()=>Or(f.current),y=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),E=()=>{Bd.mount(y(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=Vc(()=>{const M=pae(t)||w().body;Bd.add(y(),M),p.current&&E()}),P=()=>Bd.isTopModal(y()),D=Vc(M=>{f.current=M,M&&(c&&P()?E():p.current&&Mc(p.current,_))}),T=O.useCallback(()=>{Bd.remove(y(),_)},[_]);O.useEffect(()=>()=>{T()},[T]),O.useEffect(()=>{c?S():(!x||!i)&&T()},[c,T,x,i,S]);const R=M=>L=>{M.onKeyDown?.(L),!(L.key!=="Escape"||L.which===229||!P())&&(n||(L.stopPropagation(),l&&l(L,"escapeKeyDown")))},A=M=>L=>{M.onClick?.(L),L.target===L.currentTarget&&l&&l(L,"backdropClick")};return{getRootProps:(M={})=>{const L=gR(e);delete L.onTransitionEnter,delete L.onTransitionExited;const B={...L,...M};return{role:"presentation",...B,onKeyDown:R(B),ref:m}},getBackdropProps:(M={})=>{const L=M;return{"aria-hidden":!0,...L,onClick:A(L),open:c}},getTransitionProps:()=>{const M=()=>{v(!1),o&&o()},L=()=>{v(!0),a&&a(),i&&T()};return{onEnter:G1(M,s?.props.onEnter??bC),onExited:G1(L,s?.props.onExited??bC)}},rootRef:m,portalRef:D,isTopModal:P,exited:g,hasTransition:x}}function gae(e){return En("MuiModal",e)}Kn("MuiModal",["root","hidden","backdrop"]);const vae=e=>{const{open:t,exited:n,classes:r}=e;return Bn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},gae,r)},yae=Ae("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(qn(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),bae=Ae(SR,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),CR=O.forwardRef(function(t,n){const r=dr({name:"MuiModal",props:t}),{BackdropComponent:i=bae,BackdropProps:o,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:v=!1,disablePortal:x=!1,disableRestoreFocus:_=!1,disableScrollLock:w=!1,hideBackdrop:y=!1,keepMounted:E=!1,onClose:S,onTransitionEnter:P,onTransitionExited:D,open:T,slotProps:R={},slots:A={},theme:C,...j}=r,N={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:x,disableRestoreFocus:_,disableScrollLock:w,hideBackdrop:y,keepMounted:E},{getRootProps:M,getBackdropProps:L,getTransitionProps:B,portalRef:V,isTopModal:z,exited:W,hasTransition:Q}=mae({...N,rootRef:n}),X={...N,exited:W},ie=vae(X),J={};if(c.props.tabIndex===void 0&&(J.tabIndex="-1"),Q){const{onEnter:U,onExited:Z}=B();J.onEnter=U,J.onExited=Z}const re={slots:{root:f.Root,backdrop:f.Backdrop,...A},slotProps:{...p,...R}},[ae,le]=ar("root",{ref:n,elementType:yae,externalForwardedProps:{...re,...j,component:d},getSlotProps:M,ownerState:X,className:ce(s,ie?.root,!X.open&&X.exited&&ie?.hidden)}),[ue,K]=ar("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:re,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:U=>L({...U,onClick:Z=>{U?.onClick&&U.onClick(Z)}}),className:ce(o?.className,ie?.backdrop),ownerState:X});return!E&&!T&&(!Q||W)?null:h.jsx(cu,{ref:V,container:u,disablePortal:x,children:h.jsxs(ae,{...le,children:[!y&&i?h.jsx(ue,{...K}):null,h.jsx(jp,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:_,isEnabled:z,open:T,children:O.cloneElement(c,J)})]})})});process.env.NODE_ENV!=="production"&&(CR.propTypes={BackdropComponent:b.elementType,BackdropProps:b.object,children:Ll.isRequired,classes:b.object,className:b.string,closeAfterTransition:b.bool,component:b.elementType,components:b.shape({Backdrop:b.elementType,Root:b.elementType}),componentsProps:b.shape({backdrop:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object])}),container:b.oneOfType([Oo,b.func]),disableAutoFocus:b.bool,disableEnforceFocus:b.bool,disableEscapeKeyDown:b.bool,disablePortal:b.bool,disableRestoreFocus:b.bool,disableScrollLock:b.bool,hideBackdrop:b.bool,keepMounted:b.bool,onClose:b.func,onTransitionEnter:b.func,onTransitionExited:b.func,open:b.bool.isRequired,slotProps:b.shape({backdrop:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object])}),slots:b.shape({backdrop:b.elementType,root:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});const xae=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${wn(o)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Bn(l,Goe,t);return{...t,...c}},wae=Ae(lm,{shouldForwardProp:e=>ko(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...am(e,t),!n.disableUnderline&&t.underline]}})(qn(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${_a.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${_a.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_a.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_a.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${_a.disabled}, .${_a.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${_a.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(c1()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),_ae=Ae(cm,{name:"MuiFilledInput",slot:"Input",overridesResolver:sm})(qn(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),h1=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=r,g={...r,disableUnderline:i,fullWidth:s,inputComponent:c,multiline:u,type:p},v=xae(r),x={root:{ownerState:g},input:{ownerState:g}},_=d??a?Rn(x,d??a):x,w=f.root??o.Root??wae,y=f.input??o.Input??_ae;return h.jsx(um,{slots:{root:w,input:y},slotProps:_,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:v})});process.env.NODE_ENV!=="production"&&(h1.propTypes={autoComplete:b.string,autoFocus:b.bool,classes:b.object,color:b.oneOfType([b.oneOf(["primary","secondary"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),componentsProps:b.shape({input:b.object,root:b.object}),defaultValue:b.any,disabled:b.bool,disableUnderline:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,hiddenLabel:b.bool,id:b.string,inputComponent:b.elementType,inputProps:b.object,inputRef:Ro,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,onChange:b.func,placeholder:b.string,readOnly:b.bool,required:b.bool,rows:b.oneOfType([b.number,b.string]),slotProps:b.shape({input:b.object,root:b.object}),slots:b.shape({input:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});h1.muiName="Input";function lb(e){return`scale(${e}, ${e**2})`}const Eae={entering:{opacity:1,transform:lb(1)},entered:{opacity:1,transform:"none"}},_v=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),uu=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:g="auto",TransitionComponent:v=Yi,...x}=t,_=Ec(),w=O.useRef(),y=lh(),E=O.useRef(null),S=Un(E,Fl(o),n),P=M=>L=>{if(M){const B=E.current;L===void 0?M(B):M(B,L)}},D=P(u),T=P((M,L)=>{cR(M);const{duration:B,delay:V,easing:z}=Ap({style:m,timeout:g,easing:a},{mode:"enter"});let W;g==="auto"?(W=y.transitions.getAutoHeightDuration(M.clientHeight),w.current=W):W=B,M.style.transition=[y.transitions.create("opacity",{duration:W,delay:V}),y.transitions.create("transform",{duration:_v?W:W*.666,delay:V,easing:z})].join(","),l&&l(M,L)}),R=P(c),A=P(p),C=P(M=>{const{duration:L,delay:B,easing:V}=Ap({style:m,timeout:g,easing:a},{mode:"exit"});let z;g==="auto"?(z=y.transitions.getAutoHeightDuration(M.clientHeight),w.current=z):z=L,M.style.transition=[y.transitions.create("opacity",{duration:z,delay:B}),y.transitions.create("transform",{duration:_v?z:z*.666,delay:_v?B:B||z*.333,easing:V})].join(","),M.style.opacity=0,M.style.transform=lb(.75),d&&d(M)}),j=P(f),N=M=>{g==="auto"&&_.start(w.current||0,M),r&&r(E.current,M)};return h.jsx(v,{appear:i,in:s,nodeRef:E,onEnter:T,onEntered:R,onEntering:D,onExit:C,onExited:j,onExiting:A,addEndListener:N,timeout:g==="auto"?null:g,...x,children:(M,{ownerState:L,...B})=>O.cloneElement(o,{style:{opacity:0,transform:lb(.75),visibility:M==="exited"&&!s?"hidden":void 0,...Eae[M],...m,...o.props.style},ref:S,...B})})});process.env.NODE_ENV!=="production"&&(uu.propTypes={addEndListener:b.func,appear:b.bool,children:Ll.isRequired,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,style:b.object,timeout:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])});uu&&(uu.muiSupportAuto=!0);const Sae=e=>{const{classes:t,disableUnderline:n}=e,i=Bn({root:["root",!n&&"underline"],input:["input"]},Koe,t);return{...t,...i}},Oae=Ae(lm,{shouldForwardProp:e=>ko(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...am(e,t),!n.disableUnderline&&t.underline]}})(qn(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${sc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${sc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${sc.disabled}, .${sc.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${sc.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(c1()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),Cae=Ae(cm,{name:"MuiInput",slot:"Input",overridesResolver:sm})({}),m1=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,m=Sae(r),v={root:{ownerState:{disableUnderline:i}}},x=u??a?Rn(u??a,v):v,_=d.root??o.Root??Oae,w=d.input??o.Input??Cae;return h.jsx(um,{slots:{root:_,input:w},slotProps:x,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:m})});process.env.NODE_ENV!=="production"&&(m1.propTypes={autoComplete:b.string,autoFocus:b.bool,classes:b.object,color:b.oneOfType([b.oneOf(["primary","secondary"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),componentsProps:b.shape({input:b.object,root:b.object}),defaultValue:b.any,disabled:b.bool,disableUnderline:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,id:b.string,inputComponent:b.elementType,inputProps:b.object,inputRef:Ro,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,onChange:b.func,placeholder:b.string,readOnly:b.bool,required:b.bool,rows:b.oneOfType([b.number,b.string]),slotProps:b.shape({input:b.object,root:b.object}),slots:b.shape({input:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});m1.muiName="Input";const kR=O.createContext({});process.env.NODE_ENV!=="production"&&(kR.displayName="ListContext");function kae(e){return En("MuiList",e)}Kn("MuiList",["root","padding","dense","subheader"]);const Pae=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Bn({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},kae,t)},Dae=Ae("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]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),PR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=O.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=Pae(f);return h.jsx(kR.Provider,{value:d,children:h.jsxs(Dae,{as:a,className:ce(p.root,o),ref:n,ownerState:f,...u,children:[c,i]})})});process.env.NODE_ENV!=="production"&&(PR.propTypes={children:b.node,classes:b.object,className:b.string,component:b.elementType,dense:b.bool,disablePadding:b.bool,subheader:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});function Ev(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function xC(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function DR(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function lc(e,t,n,r,i,o){let a=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!DR(s,o)||l)s=i(e,s,n);else return s.focus(),!0}return!1}const AR=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=O.useRef(null),m=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});vo(()=>{i&&p.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:y})=>{const E=!p.current.style.width;if(w.clientHeight<p.current.clientHeight&&E){const S=`${OR(yo(w))}px`;p.current.style[y==="rtl"?"paddingLeft":"paddingRight"]=S,p.current.style.width=`calc(100% + ${S})`}return p.current}}),[]);const g=w=>{const y=p.current,E=w.key;if(w.ctrlKey||w.metaKey||w.altKey){u&&u(w);return}const P=Or(y).activeElement;if(E==="ArrowDown")w.preventDefault(),lc(y,P,c,l,Ev);else if(E==="ArrowUp")w.preventDefault(),lc(y,P,c,l,xC);else if(E==="Home")w.preventDefault(),lc(y,null,c,l,Ev);else if(E==="End")w.preventDefault(),lc(y,null,c,l,xC);else if(E.length===1){const D=m.current,T=E.toLowerCase(),R=performance.now();D.keys.length>0&&(R-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&T!==D.keys[0]&&(D.repeating=!1)),D.lastTime=R,D.keys.push(T);const A=P&&!D.repeating&&DR(P,D);D.previousKeyMatched&&(A||lc(y,P,!1,l,Ev,D))?w.preventDefault():D.previousKeyMatched=!1}u&&u(w)},v=Un(p,n);let x=-1;O.Children.forEach(a,(w,y)=>{if(!O.isValidElement(w)){x===y&&(x+=1,x>=a.length&&(x=-1));return}process.env.NODE_ENV!=="production"&&ea.isFragment(w)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
249
+ `),P=y.selectionStart===E;S&&P&&y.setSelectionRange(E,E),r&&r(w)};return h.jsxs(O.Fragment,{children:[h.jsx("textarea",{value:s,onChange:_,ref:d,rows:o,style:a,...l}),h.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...Voe.shadow,...a,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(xR.propTypes={className:b.string,maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),onChange:b.func,placeholder:b.string,style:b.object,value:b.oneOfType([b.arrayOf(b.string),b.number,b.string])});function d1({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const f1=O.createContext(void 0);process.env.NODE_ENV!=="production"&&(f1.displayName="FormControlContext");function p1(){return O.useContext(f1)}function hC(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function wR(e,t=!1){return e&&(hC(e.value)&&e.value!==""||t&&hC(e.defaultValue)&&e.defaultValue!=="")}function Yoe(e){return En("MuiInputBase",e)}const bl=Kn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var mC;const am=(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,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${wn(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},sm=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Uoe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${wn(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${wn(f)}`,u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return Bn(g,Yoe,t)},lm=Ae("div",{name:"MuiInputBase",slot:"Root",overridesResolver:am})(qn(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${bl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),cm=Ae("input",{name:"MuiInputBase",slot:"Input",overridesResolver:sm})(qn(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{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%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${bl.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${bl.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),gC=K$({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),um=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:g,fullWidth:v=!1,id:x,inputComponent:_="input",inputProps:w={},inputRef:y,margin:E,maxRows:S,minRows:P,multiline:D=!1,name:T,onBlur:R,onChange:A,onClick:C,onFocus:j,onKeyDown:N,onKeyUp:M,placeholder:L,readOnly:B,renderSuffix:V,rows:z,size:W,slotProps:Q={},slots:G={},startAdornment:ie,type:J="text",value:re,...ae}=r,le=w.value!=null?w.value:re,{current:ue}=O.useRef(le!=null),K=O.useRef(),U=O.useCallback(ye=>{process.env.NODE_ENV!=="production"&&ye&&ye.nodeName!=="INPUT"&&!ye.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
250
+ `))},[]),Z=Un(K,y,w.ref,U),[I,me]=O.useState(!1),oe=p1();process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(oe)return oe.registerEffect()},[oe]);const ve=d1({props:r,muiFormControl:oe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ve.focused=oe?oe.focused:I,O.useEffect(()=>{!oe&&f&&I&&(me(!1),R&&R())},[oe,f,I,R]);const we=oe&&oe.onFilled,Ne=oe&&oe.onEmpty,qe=O.useCallback(ye=>{wR(ye)?we&&we():Ne&&Ne()},[we,Ne]);vo(()=>{ue&&qe({value:le})},[le,qe,ue]);const ut=ye=>{j&&j(ye),w.onFocus&&w.onFocus(ye),oe&&oe.onFocus?oe.onFocus(ye):me(!0)},ot=ye=>{R&&R(ye),w.onBlur&&w.onBlur(ye),oe&&oe.onBlur?oe.onBlur(ye):me(!1)},je=(ye,...dn)=>{if(!ue){const Yt=ye.target||K.current;if(Yt==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Mi(1));qe({value:Yt.value})}w.onChange&&w.onChange(ye,...dn),A&&A(ye,...dn)};O.useEffect(()=>{qe(K.current)},[]);const bt=ye=>{K.current&&ye.currentTarget===ye.target&&K.current.focus(),C&&C(ye)};let xt=_,dt=w;D&&xt==="input"&&(z?(process.env.NODE_ENV!=="production"&&(P||S)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),dt={type:void 0,minRows:z,maxRows:z,...dt}):dt={type:void 0,maxRows:S,minRows:P,...dt},xt=xR);const cn=ye=>{qe(ye.animationName==="mui-auto-fill-cancel"?K.current:{value:"x"})};O.useEffect(()=>{oe&&oe.setAdornedStart(!!ie)},[oe,ie]);const Jt={...r,color:ve.color||"primary",disabled:ve.disabled,endAdornment:m,error:ve.error,focused:ve.focused,formControl:oe,fullWidth:v,hiddenLabel:ve.hiddenLabel,multiline:D,size:ve.size,startAdornment:ie,type:J},un=Uoe(Jt),Cn=G.root||c.Root||lm,Ht=Q.root||u.root||{},kn=G.input||c.Input||cm;return dt={...dt,...Q.input??u.input},h.jsxs(O.Fragment,{children:[!p&&typeof gC=="function"&&(mC||(mC=h.jsx(gC,{}))),h.jsxs(Cn,{...Ht,ref:n,onClick:bt,...ae,...!Tp(Cn)&&{ownerState:{...Jt,...Ht.ownerState}},className:ce(un.root,Ht.className,s,B&&"MuiInputBase-readOnly"),children:[ie,h.jsx(f1.Provider,{value:null,children:h.jsx(kn,{"aria-invalid":ve.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:ve.disabled,id:x,onAnimationStart:cn,name:T,placeholder:L,readOnly:B,required:ve.required,rows:z,value:le,onKeyDown:N,onKeyUp:M,type:J,...dt,...!Tp(kn)&&{as:xt,ownerState:{...Jt,...dt.ownerState}},ref:Z,className:ce(un.input,dt.className,B&&"MuiInputBase-readOnly"),onBlur:ot,onChange:je,onFocus:ut})}),m,V?V({...ve,startAdornment:ie}):null]})]})});process.env.NODE_ENV!=="production"&&(um.propTypes={"aria-describedby":b.string,autoComplete:b.string,autoFocus:b.bool,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["primary","secondary","error","info","success","warning"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),componentsProps:b.shape({input:b.object,root:b.object}),defaultValue:b.any,disabled:b.bool,disableInjectingGlobalStyles:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,id:b.string,inputComponent:lR,inputProps:b.object,inputRef:Ro,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,onBlur:b.func,onChange:b.func,onClick:b.func,onFocus:b.func,onInvalid:b.func,onKeyDown:b.func,onKeyUp:b.func,placeholder:b.string,readOnly:b.bool,renderSuffix:b.func,required:b.bool,rows:b.oneOfType([b.number,b.string]),size:b.oneOfType([b.oneOf(["medium","small"]),b.string]),slotProps:b.shape({input:b.object,root:b.object}),slots:b.shape({input:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});function Koe(e){return En("MuiInput",e)}const sc={...bl,...Kn("MuiInput",["root","underline","input"])};function qoe(e){return En("MuiOutlinedInput",e)}const fi={...bl,...Kn("MuiOutlinedInput",["root","notchedOutline","input"])};function Goe(e){return En("MuiFilledInput",e)}const _a={...bl,...Kn("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Xoe=_u(h.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Qoe(e){const{prototype:t={}}=e;return!!t.isReactComponent}function _R(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!Qoe(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ll=Il(b.element,_R);Ll.isRequired=Il(b.element.isRequired,_R);const Zoe={entering:{opacity:1},entered:{opacity:1}},ER=O.forwardRef(function(t,n){const r=lh(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:g,style:v,timeout:x=i,TransitionComponent:_=Yi,...w}=t,y=O.useRef(null),E=Un(y,Fl(s),n),S=N=>M=>{if(N){const L=y.current;M===void 0?N(L):N(L,M)}},P=S(f),D=S((N,M)=>{cR(N);const L=Ap({style:v,timeout:x,easing:l},{mode:"enter"});N.style.webkitTransition=r.transitions.create("opacity",L),N.style.transition=r.transitions.create("opacity",L),u&&u(N,M)}),T=S(d),R=S(g),A=S(N=>{const M=Ap({style:v,timeout:x,easing:l},{mode:"exit"});N.style.webkitTransition=r.transitions.create("opacity",M),N.style.transition=r.transitions.create("opacity",M),p&&p(N)}),C=S(m),j=N=>{o&&o(y.current,N)};return h.jsx(_,{appear:a,in:c,nodeRef:y,onEnter:D,onEntered:T,onEntering:P,onExit:A,onExited:C,onExiting:R,addEndListener:j,timeout:x,...w,children:(N,{ownerState:M,...L})=>O.cloneElement(s,{style:{opacity:0,visibility:N==="exited"&&!c?"hidden":void 0,...Zoe[N],...v,...s.props.style},ref:E,...L})})});process.env.NODE_ENV!=="production"&&(ER.propTypes={addEndListener:b.func,appear:b.bool,children:Ll.isRequired,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,style:b.object,timeout:b.oneOfType([b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])});function Joe(e){return En("MuiBackdrop",e)}Kn("MuiBackdrop",["root","invisible"]);const eae=e=>{const{classes:t,invisible:n}=e;return Bn({root:["root",n&&"invisible"]},Joe,t)},tae=Ae("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({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",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),SR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...g}=r,v={...r,component:a,invisible:s},x=eae(v),_={transition:p,root:c.Root,...f},w={...u,...d},y={component:a,slots:_,slotProps:w},[E,S]=ar("root",{elementType:tae,externalForwardedProps:y,className:ce(x.root,o),ownerState:v}),[P,D]=ar("transition",{elementType:ER,externalForwardedProps:y,ownerState:v});return h.jsx(P,{in:l,timeout:m,...g,...D,children:h.jsx(E,{"aria-hidden":!0,...S,classes:x,ref:n,children:i})})});process.env.NODE_ENV!=="production"&&(SR.propTypes={children:b.node,classes:b.object,className:b.string,component:b.elementType,components:b.shape({Root:b.elementType}),componentsProps:b.shape({root:b.object}),invisible:b.bool,open:b.bool.isRequired,slotProps:b.shape({root:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({root:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),TransitionComponent:b.elementType,transitionDuration:b.oneOfType([b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])});function OR(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function nae(e){const t=Or(e);return t.body===e?yo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Mc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function vC(e){return parseInt(yo(e).getComputedStyle(e).paddingRight,10)||0}function rae(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function yC(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,a=>{const s=!o.includes(a),l=!rae(a);s&&l&&Mc(a,i)})}function wv(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function iae(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(nae(r)){const a=OR(yo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${vC(r)+a}px`;const s=Or(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${vC(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Or(r).body;else{const a=r.parentElement,s=yo(r);o=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function oae(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class aae{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Mc(t.modalRef,!1);const i=oae(n);yC(n,t.mount,t.modalRef,i,!0);const o=wv(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=wv(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=iae(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=wv(this.containers,a=>a.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Mc(t.modalRef,n),yC(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&Mc(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const sae=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function lae(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function cae(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function uae(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||cae(e))}function dae(e){const t=[],n=[];return Array.from(e.querySelectorAll(sae)).forEach((r,i)=>{const o=lae(r);o===-1||!uae(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function fae(){return!0}function jp(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=dae,isEnabled:a=fae,open:s}=e,l=O.useRef(!1),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=O.useRef(null),p=O.useRef(!1),m=O.useRef(null),g=Un(Fl(t),m),v=O.useRef(null);O.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),O.useEffect(()=>{if(!s||!m.current)return;const w=Or(m.current);return m.current.contains(w.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
251
+ `)),m.current.setAttribute("tabIndex","-1")),p.current&&m.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),O.useEffect(()=>{if(!s||!m.current)return;const w=Or(m.current),y=P=>{v.current=P,!(r||!a()||P.key!=="Tab")&&w.activeElement===m.current&&P.shiftKey&&(l.current=!0,u.current&&u.current.focus())},E=()=>{const P=m.current;if(P===null)return;if(!w.hasFocus()||!a()||l.current){l.current=!1;return}if(P.contains(w.activeElement)||r&&w.activeElement!==c.current&&w.activeElement!==u.current)return;if(w.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let D=[];if((w.activeElement===c.current||w.activeElement===u.current)&&(D=o(m.current)),D.length>0){const T=!!(v.current?.shiftKey&&v.current?.key==="Tab"),R=D[0],A=D[D.length-1];typeof R!="string"&&typeof A!="string"&&(T?A.focus():R.focus())}else P.focus()};w.addEventListener("focusin",E),w.addEventListener("keydown",y,!0);const S=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&E()},50);return()=>{clearInterval(S),w.removeEventListener("focusin",E),w.removeEventListener("keydown",y,!0)}},[n,r,i,a,s,o]);const x=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0,f.current=w.target;const y=t.props.onFocus;y&&y(w)},_=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0};return h.jsxs(O.Fragment,{children:[h.jsx("div",{tabIndex:s?0:-1,onFocus:_,ref:c,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:g,onFocus:x}),h.jsx("div",{tabIndex:s?0:-1,onFocus:_,ref:u,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(jp.propTypes={children:Ll,disableAutoFocus:b.bool,disableEnforceFocus:b.bool,disableRestoreFocus:b.bool,getTabbable:b.func,isEnabled:b.func,open:b.bool.isRequired});process.env.NODE_ENV!=="production"&&(jp.propTypes=zP(jp.propTypes));function pae(e){return typeof e=="function"?e():e}function hae(e){return e?e.props.hasOwnProperty("in"):!1}const bC=()=>{},Bd=new aae;function mae(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=O.useRef({}),f=O.useRef(null),p=O.useRef(null),m=Un(p,u),[g,v]=O.useState(!c),x=hae(s);let _=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(_=!1);const w=()=>Or(f.current),y=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),E=()=>{Bd.mount(y(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=Vc(()=>{const M=pae(t)||w().body;Bd.add(y(),M),p.current&&E()}),P=()=>Bd.isTopModal(y()),D=Vc(M=>{f.current=M,M&&(c&&P()?E():p.current&&Mc(p.current,_))}),T=O.useCallback(()=>{Bd.remove(y(),_)},[_]);O.useEffect(()=>()=>{T()},[T]),O.useEffect(()=>{c?S():(!x||!i)&&T()},[c,T,x,i,S]);const R=M=>L=>{M.onKeyDown?.(L),!(L.key!=="Escape"||L.which===229||!P())&&(n||(L.stopPropagation(),l&&l(L,"escapeKeyDown")))},A=M=>L=>{M.onClick?.(L),L.target===L.currentTarget&&l&&l(L,"backdropClick")};return{getRootProps:(M={})=>{const L=gR(e);delete L.onTransitionEnter,delete L.onTransitionExited;const B={...L,...M};return{role:"presentation",...B,onKeyDown:R(B),ref:m}},getBackdropProps:(M={})=>{const L=M;return{"aria-hidden":!0,...L,onClick:A(L),open:c}},getTransitionProps:()=>{const M=()=>{v(!1),o&&o()},L=()=>{v(!0),a&&a(),i&&T()};return{onEnter:G1(M,s?.props.onEnter??bC),onExited:G1(L,s?.props.onExited??bC)}},rootRef:m,portalRef:D,isTopModal:P,exited:g,hasTransition:x}}function gae(e){return En("MuiModal",e)}Kn("MuiModal",["root","hidden","backdrop"]);const vae=e=>{const{open:t,exited:n,classes:r}=e;return Bn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},gae,r)},yae=Ae("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(qn(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),bae=Ae(SR,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),CR=O.forwardRef(function(t,n){const r=dr({name:"MuiModal",props:t}),{BackdropComponent:i=bae,BackdropProps:o,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:v=!1,disablePortal:x=!1,disableRestoreFocus:_=!1,disableScrollLock:w=!1,hideBackdrop:y=!1,keepMounted:E=!1,onClose:S,onTransitionEnter:P,onTransitionExited:D,open:T,slotProps:R={},slots:A={},theme:C,...j}=r,N={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:x,disableRestoreFocus:_,disableScrollLock:w,hideBackdrop:y,keepMounted:E},{getRootProps:M,getBackdropProps:L,getTransitionProps:B,portalRef:V,isTopModal:z,exited:W,hasTransition:Q}=mae({...N,rootRef:n}),G={...N,exited:W},ie=vae(G),J={};if(c.props.tabIndex===void 0&&(J.tabIndex="-1"),Q){const{onEnter:U,onExited:Z}=B();J.onEnter=U,J.onExited=Z}const re={slots:{root:f.Root,backdrop:f.Backdrop,...A},slotProps:{...p,...R}},[ae,le]=ar("root",{ref:n,elementType:yae,externalForwardedProps:{...re,...j,component:d},getSlotProps:M,ownerState:G,className:ce(s,ie?.root,!G.open&&G.exited&&ie?.hidden)}),[ue,K]=ar("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:re,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:U=>L({...U,onClick:Z=>{U?.onClick&&U.onClick(Z)}}),className:ce(o?.className,ie?.backdrop),ownerState:G});return!E&&!T&&(!Q||W)?null:h.jsx(cu,{ref:V,container:u,disablePortal:x,children:h.jsxs(ae,{...le,children:[!y&&i?h.jsx(ue,{...K}):null,h.jsx(jp,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:_,isEnabled:z,open:T,children:O.cloneElement(c,J)})]})})});process.env.NODE_ENV!=="production"&&(CR.propTypes={BackdropComponent:b.elementType,BackdropProps:b.object,children:Ll.isRequired,classes:b.object,className:b.string,closeAfterTransition:b.bool,component:b.elementType,components:b.shape({Backdrop:b.elementType,Root:b.elementType}),componentsProps:b.shape({backdrop:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object])}),container:b.oneOfType([Oo,b.func]),disableAutoFocus:b.bool,disableEnforceFocus:b.bool,disableEscapeKeyDown:b.bool,disablePortal:b.bool,disableRestoreFocus:b.bool,disableScrollLock:b.bool,hideBackdrop:b.bool,keepMounted:b.bool,onClose:b.func,onTransitionEnter:b.func,onTransitionExited:b.func,open:b.bool.isRequired,slotProps:b.shape({backdrop:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object])}),slots:b.shape({backdrop:b.elementType,root:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});const xae=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${wn(o)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Bn(l,Goe,t);return{...t,...c}},wae=Ae(lm,{shouldForwardProp:e=>ko(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...am(e,t),!n.disableUnderline&&t.underline]}})(qn(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${_a.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${_a.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_a.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_a.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${_a.disabled}, .${_a.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${_a.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(c1()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),_ae=Ae(cm,{name:"MuiFilledInput",slot:"Input",overridesResolver:sm})(qn(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),h1=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=r,g={...r,disableUnderline:i,fullWidth:s,inputComponent:c,multiline:u,type:p},v=xae(r),x={root:{ownerState:g},input:{ownerState:g}},_=d??a?Rn(x,d??a):x,w=f.root??o.Root??wae,y=f.input??o.Input??_ae;return h.jsx(um,{slots:{root:w,input:y},slotProps:_,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:v})});process.env.NODE_ENV!=="production"&&(h1.propTypes={autoComplete:b.string,autoFocus:b.bool,classes:b.object,color:b.oneOfType([b.oneOf(["primary","secondary"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),componentsProps:b.shape({input:b.object,root:b.object}),defaultValue:b.any,disabled:b.bool,disableUnderline:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,hiddenLabel:b.bool,id:b.string,inputComponent:b.elementType,inputProps:b.object,inputRef:Ro,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,onChange:b.func,placeholder:b.string,readOnly:b.bool,required:b.bool,rows:b.oneOfType([b.number,b.string]),slotProps:b.shape({input:b.object,root:b.object}),slots:b.shape({input:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});h1.muiName="Input";function lb(e){return`scale(${e}, ${e**2})`}const Eae={entering:{opacity:1,transform:lb(1)},entered:{opacity:1,transform:"none"}},_v=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),uu=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:g="auto",TransitionComponent:v=Yi,...x}=t,_=Ec(),w=O.useRef(),y=lh(),E=O.useRef(null),S=Un(E,Fl(o),n),P=M=>L=>{if(M){const B=E.current;L===void 0?M(B):M(B,L)}},D=P(u),T=P((M,L)=>{cR(M);const{duration:B,delay:V,easing:z}=Ap({style:m,timeout:g,easing:a},{mode:"enter"});let W;g==="auto"?(W=y.transitions.getAutoHeightDuration(M.clientHeight),w.current=W):W=B,M.style.transition=[y.transitions.create("opacity",{duration:W,delay:V}),y.transitions.create("transform",{duration:_v?W:W*.666,delay:V,easing:z})].join(","),l&&l(M,L)}),R=P(c),A=P(p),C=P(M=>{const{duration:L,delay:B,easing:V}=Ap({style:m,timeout:g,easing:a},{mode:"exit"});let z;g==="auto"?(z=y.transitions.getAutoHeightDuration(M.clientHeight),w.current=z):z=L,M.style.transition=[y.transitions.create("opacity",{duration:z,delay:B}),y.transitions.create("transform",{duration:_v?z:z*.666,delay:_v?B:B||z*.333,easing:V})].join(","),M.style.opacity=0,M.style.transform=lb(.75),d&&d(M)}),j=P(f),N=M=>{g==="auto"&&_.start(w.current||0,M),r&&r(E.current,M)};return h.jsx(v,{appear:i,in:s,nodeRef:E,onEnter:T,onEntered:R,onEntering:D,onExit:C,onExited:j,onExiting:A,addEndListener:N,timeout:g==="auto"?null:g,...x,children:(M,{ownerState:L,...B})=>O.cloneElement(o,{style:{opacity:0,transform:lb(.75),visibility:M==="exited"&&!s?"hidden":void 0,...Eae[M],...m,...o.props.style},ref:S,...B})})});process.env.NODE_ENV!=="production"&&(uu.propTypes={addEndListener:b.func,appear:b.bool,children:Ll.isRequired,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,style:b.object,timeout:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])});uu&&(uu.muiSupportAuto=!0);const Sae=e=>{const{classes:t,disableUnderline:n}=e,i=Bn({root:["root",!n&&"underline"],input:["input"]},Koe,t);return{...t,...i}},Oae=Ae(lm,{shouldForwardProp:e=>ko(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...am(e,t),!n.disableUnderline&&t.underline]}})(qn(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${sc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${sc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${sc.disabled}, .${sc.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${sc.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(c1()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),Cae=Ae(cm,{name:"MuiInput",slot:"Input",overridesResolver:sm})({}),m1=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,m=Sae(r),v={root:{ownerState:{disableUnderline:i}}},x=u??a?Rn(u??a,v):v,_=d.root??o.Root??Oae,w=d.input??o.Input??Cae;return h.jsx(um,{slots:{root:_,input:w},slotProps:x,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:m})});process.env.NODE_ENV!=="production"&&(m1.propTypes={autoComplete:b.string,autoFocus:b.bool,classes:b.object,color:b.oneOfType([b.oneOf(["primary","secondary"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),componentsProps:b.shape({input:b.object,root:b.object}),defaultValue:b.any,disabled:b.bool,disableUnderline:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,id:b.string,inputComponent:b.elementType,inputProps:b.object,inputRef:Ro,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,onChange:b.func,placeholder:b.string,readOnly:b.bool,required:b.bool,rows:b.oneOfType([b.number,b.string]),slotProps:b.shape({input:b.object,root:b.object}),slots:b.shape({input:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});m1.muiName="Input";const kR=O.createContext({});process.env.NODE_ENV!=="production"&&(kR.displayName="ListContext");function kae(e){return En("MuiList",e)}Kn("MuiList",["root","padding","dense","subheader"]);const Pae=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Bn({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},kae,t)},Dae=Ae("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]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),PR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=O.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=Pae(f);return h.jsx(kR.Provider,{value:d,children:h.jsxs(Dae,{as:a,className:ce(p.root,o),ref:n,ownerState:f,...u,children:[c,i]})})});process.env.NODE_ENV!=="production"&&(PR.propTypes={children:b.node,classes:b.object,className:b.string,component:b.elementType,dense:b.bool,disablePadding:b.bool,subheader:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});function Ev(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function xC(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function DR(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function lc(e,t,n,r,i,o){let a=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!DR(s,o)||l)s=i(e,s,n);else return s.focus(),!0}return!1}const AR=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=O.useRef(null),m=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});vo(()=>{i&&p.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:y})=>{const E=!p.current.style.width;if(w.clientHeight<p.current.clientHeight&&E){const S=`${OR(yo(w))}px`;p.current.style[y==="rtl"?"paddingLeft":"paddingRight"]=S,p.current.style.width=`calc(100% + ${S})`}return p.current}}),[]);const g=w=>{const y=p.current,E=w.key;if(w.ctrlKey||w.metaKey||w.altKey){u&&u(w);return}const P=Or(y).activeElement;if(E==="ArrowDown")w.preventDefault(),lc(y,P,c,l,Ev);else if(E==="ArrowUp")w.preventDefault(),lc(y,P,c,l,xC);else if(E==="Home")w.preventDefault(),lc(y,null,c,l,Ev);else if(E==="End")w.preventDefault(),lc(y,null,c,l,xC);else if(E.length===1){const D=m.current,T=E.toLowerCase(),R=performance.now();D.keys.length>0&&(R-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&T!==D.keys[0]&&(D.repeating=!1)),D.lastTime=R,D.keys.push(T);const A=P&&!D.repeating&&DR(P,D);D.previousKeyMatched&&(A||lc(y,P,!1,l,Ev,D))?w.preventDefault():D.previousKeyMatched=!1}u&&u(w)},v=Un(p,n);let x=-1;O.Children.forEach(a,(w,y)=>{if(!O.isValidElement(w)){x===y&&(x+=1,x>=a.length&&(x=-1));return}process.env.NODE_ENV!=="production"&&ea.isFragment(w)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
252
252
  `)),w.props.disabled||(d==="selectedMenu"&&w.props.selected||x===-1)&&(x=y),x===y&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(x+=1,x>=a.length&&(x=-1))});const _=O.Children.map(a,(w,y)=>{if(y===x){const E={};return o&&(E.autoFocus=!0),w.props.tabIndex===void 0&&d==="selectedMenu"&&(E.tabIndex=0),O.cloneElement(w,E)}return w});return h.jsx(PR,{role:"menu",ref:v,className:s,onKeyDown:g,tabIndex:i?0:-1,...f,children:_})});process.env.NODE_ENV!=="production"&&(AR.propTypes={autoFocus:b.bool,autoFocusItem:b.bool,children:b.node,className:b.string,disabledItemsFocusable:b.bool,disableListWrap:b.bool,onKeyDown:b.func,variant:b.oneOf(["menu","selectedMenu"])});function Aae(e){return En("MuiPopover",e)}Kn("MuiPopover",["root","paper"]);function wC(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function _C(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function EC(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Sc(e){return typeof e=="function"?e():e}const Tae=e=>{const{classes:t}=e;return Bn({root:["root"],paper:["paper"]},Aae,t)},Nae=Ae(CR,{name:"MuiPopover",slot:"Root"})({}),TR=Ae(pR,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),NR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:m,PaperProps:g={},slots:v={},slotProps:x={},transformOrigin:_={vertical:"top",horizontal:"left"},TransitionComponent:w,transitionDuration:y="auto",TransitionProps:E={},disableScrollLock:S=!1,...P}=r,D=O.useRef(),T={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,transformOrigin:_,TransitionComponent:w,transitionDuration:y,TransitionProps:E},R=Tae(T),A=O.useCallback(()=>{if(l==="anchorPosition")return process.env.NODE_ENV!=="production"&&(s||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),s;const U=Sc(o),Z=U&&U.nodeType===1?U:Or(D.current).body,I=Z.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const me=Z.getBoundingClientRect();process.env.NODE_ENV!=="test"&&me.top===0&&me.left===0&&me.right===0&&me.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
253
253
  `))}return{top:I.top+wC(I,a.vertical),left:I.left+_C(I,a.horizontal)}},[o,a.horizontal,a.vertical,s,l]),C=O.useCallback(U=>({vertical:wC(U,_.vertical),horizontal:_C(U,_.horizontal)}),[_.horizontal,_.vertical]),j=O.useCallback(U=>{const Z={width:U.offsetWidth,height:U.offsetHeight},I=C(Z);if(l==="none")return{top:null,left:null,transformOrigin:EC(I)};const me=A();let oe=me.top-I.vertical,ve=me.left-I.horizontal;const we=oe+Z.height,Ne=ve+Z.width,qe=yo(Sc(o)),ut=qe.innerHeight-p,ot=qe.innerWidth-p;if(p!==null&&oe<p){const je=oe-p;oe-=je,I.vertical+=je}else if(p!==null&&we>ut){const je=we-ut;oe-=je,I.vertical+=je}if(process.env.NODE_ENV!=="production"&&Z.height>ut&&Z.height&&ut&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${Z.height-ut}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
254
- `)),p!==null&&ve<p){const je=ve-p;ve-=je,I.horizontal+=je}else if(Ne>ot){const je=Ne-ot;ve-=je,I.horizontal+=je}return{top:`${Math.round(oe)}px`,left:`${Math.round(ve)}px`,transformOrigin:EC(I)}},[o,l,A,C,p]),[N,M]=O.useState(m),L=O.useCallback(()=>{const U=D.current;if(!U)return;const Z=j(U);Z.top!==null&&U.style.setProperty("top",Z.top),Z.left!==null&&(U.style.left=Z.left),U.style.transformOrigin=Z.transformOrigin,M(!0)},[j]);O.useEffect(()=>(S&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,S,L]);const B=()=>{L()},V=()=>{M(!1)};O.useEffect(()=>{m&&L()}),O.useImperativeHandle(i,()=>m?{updatePosition:()=>{L()}}:null,[m,L]),O.useEffect(()=>{if(!m)return;const U=ZP(()=>{L()}),Z=yo(Sc(o));return Z.addEventListener("resize",U),()=>{U.clear(),Z.removeEventListener("resize",U)}},[o,m,L]);let z=y;const W={slots:{transition:w,...v},slotProps:{transition:E,paper:g,...x}},[Q,X]=ar("transition",{elementType:uu,externalForwardedProps:W,ownerState:T,getSlotProps:U=>({...U,onEntering:(Z,I)=>{U.onEntering?.(Z,I),B()},onExited:Z=>{U.onExited?.(Z),V()}}),additionalProps:{appear:!0,in:m}});y==="auto"&&!Q.muiSupportAuto&&(z=void 0);const ie=d||(o?Or(Sc(o)).body:void 0),[J,{slots:re,slotProps:ae,...le}]=ar("root",{ref:n,elementType:Nae,externalForwardedProps:{...W,...P},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:Z$(typeof x.backdrop=="function"?x.backdrop(T):x.backdrop,{invisible:!0})},container:ie,open:m},ownerState:T,className:ce(R.root,u)}),[ue,K]=ar("paper",{ref:D,className:R.paper,elementType:TR,externalForwardedProps:W,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:N?void 0:{opacity:0}},ownerState:T});return h.jsx(J,{...le,...!Tp(J)&&{slots:re,slotProps:ae,disableScrollLock:S},children:h.jsx(Q,{...X,timeout:z,children:h.jsx(ue,{...K,children:c})})})});process.env.NODE_ENV!=="production"&&(NR.propTypes={action:Ro,anchorEl:Il(b.oneOfType([Oo,b.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=Sc(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
254
+ `)),p!==null&&ve<p){const je=ve-p;ve-=je,I.horizontal+=je}else if(Ne>ot){const je=Ne-ot;ve-=je,I.horizontal+=je}return{top:`${Math.round(oe)}px`,left:`${Math.round(ve)}px`,transformOrigin:EC(I)}},[o,l,A,C,p]),[N,M]=O.useState(m),L=O.useCallback(()=>{const U=D.current;if(!U)return;const Z=j(U);Z.top!==null&&U.style.setProperty("top",Z.top),Z.left!==null&&(U.style.left=Z.left),U.style.transformOrigin=Z.transformOrigin,M(!0)},[j]);O.useEffect(()=>(S&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,S,L]);const B=()=>{L()},V=()=>{M(!1)};O.useEffect(()=>{m&&L()}),O.useImperativeHandle(i,()=>m?{updatePosition:()=>{L()}}:null,[m,L]),O.useEffect(()=>{if(!m)return;const U=ZP(()=>{L()}),Z=yo(Sc(o));return Z.addEventListener("resize",U),()=>{U.clear(),Z.removeEventListener("resize",U)}},[o,m,L]);let z=y;const W={slots:{transition:w,...v},slotProps:{transition:E,paper:g,...x}},[Q,G]=ar("transition",{elementType:uu,externalForwardedProps:W,ownerState:T,getSlotProps:U=>({...U,onEntering:(Z,I)=>{U.onEntering?.(Z,I),B()},onExited:Z=>{U.onExited?.(Z),V()}}),additionalProps:{appear:!0,in:m}});y==="auto"&&!Q.muiSupportAuto&&(z=void 0);const ie=d||(o?Or(Sc(o)).body:void 0),[J,{slots:re,slotProps:ae,...le}]=ar("root",{ref:n,elementType:Nae,externalForwardedProps:{...W,...P},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:Z$(typeof x.backdrop=="function"?x.backdrop(T):x.backdrop,{invisible:!0})},container:ie,open:m},ownerState:T,className:ce(R.root,u)}),[ue,K]=ar("paper",{ref:D,className:R.paper,elementType:TR,externalForwardedProps:W,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:N?void 0:{opacity:0}},ownerState:T});return h.jsx(J,{...le,...!Tp(J)&&{slots:re,slotProps:ae,disableScrollLock:S},children:h.jsx(Q,{...G,timeout:z,children:h.jsx(ue,{...K,children:c})})})});process.env.NODE_ENV!=="production"&&(NR.propTypes={action:Ro,anchorEl:Il(b.oneOfType([Oo,b.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=Sc(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
255
255
  `))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
256
256
  `))}return null}),anchorOrigin:b.shape({horizontal:b.oneOfType([b.oneOf(["center","left","right"]),b.number]).isRequired,vertical:b.oneOfType([b.oneOf(["bottom","center","top"]),b.number]).isRequired}),anchorPosition:b.shape({left:b.number.isRequired,top:b.number.isRequired}),anchorReference:b.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:b.elementType,BackdropProps:b.object,children:b.node,classes:b.object,className:b.string,container:b.oneOfType([Oo,b.func]),disableScrollLock:b.bool,elevation:fR,marginThreshold:b.number,onClose:b.func,open:b.bool.isRequired,PaperProps:b.shape({component:lR}),slotProps:b.shape({backdrop:b.oneOfType([b.func,b.object]),paper:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({backdrop:b.elementType,paper:b.elementType,root:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),transformOrigin:b.shape({horizontal:b.oneOfType([b.oneOf(["center","left","right"]),b.number]).isRequired,vertical:b.oneOfType([b.oneOf(["bottom","center","top"]),b.number]).isRequired}),TransitionComponent:b.elementType,transitionDuration:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})]),TransitionProps:b.object});function jae(e){return En("MuiMenu",e)}Kn("MuiMenu",["root","paper","list"]);const Mae={vertical:"top",horizontal:"right"},Rae={vertical:"top",horizontal:"left"},Iae=e=>{const{classes:t}=e;return Bn({root:["root"],paper:["paper"],list:["list"]},jae,t)},Fae=Ae(NR,{shouldForwardProp:e=>ko(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),Lae=Ae(TR,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),$ae=Ae(AR,{name:"MuiMenu",slot:"List"})({outline:0}),jR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:m,...g}={},variant:v="selectedMenu",slots:x={},slotProps:_={},...w}=r,y=Nb(),E={...r,autoFocus:i,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:p,TransitionProps:g,variant:v},S=Iae(E),P=i&&!s&&u,D=O.useRef(null),T=(z,W)=>{D.current&&D.current.adjustStyleForScrollbar(z,{direction:y?"rtl":"ltr"}),m&&m(z,W)},R=z=>{z.key==="Tab"&&(z.preventDefault(),c&&c(z,"tabKeyDown"))};let A=-1;O.Children.map(o,(z,W)=>{O.isValidElement(z)&&(process.env.NODE_ENV!=="production"&&ea.isFragment(z)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
257
- `)),z.props.disabled||(v==="selectedMenu"&&z.props.selected||A===-1)&&(A=W))});const C={slots:x,slotProps:{list:l,transition:g,paper:d,..._}},j=yR({elementType:x.root,externalSlotProps:_.root,ownerState:E,className:[S.root,a]}),[N,M]=ar("paper",{className:S.paper,elementType:Lae,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:E}),[L,B]=ar("list",{className:ce(S.list,l.className),elementType:$ae,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:z=>({...z,onKeyDown:W=>{R(W),z.onKeyDown?.(W)}}),ownerState:E}),V=typeof C.slotProps.transition=="function"?C.slotProps.transition(E):C.slotProps.transition;return h.jsx(Fae,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:y?"right":"left"},transformOrigin:y?Mae:Rae,slots:{root:x.root,paper:N,backdrop:x.backdrop,...x.transition&&{transition:x.transition}},slotProps:{root:j,paper:M,backdrop:typeof _.backdrop=="function"?_.backdrop(E):_.backdrop,transition:{...V,onEntering:(...z)=>{T(...z),V?.onEntering?.(...z)}}},open:u,ref:n,transitionDuration:p,ownerState:E,...w,classes:f,children:h.jsx(L,{actions:D,autoFocus:i&&(A===-1||s),autoFocusItem:P,variant:v,...B,children:o})})});process.env.NODE_ENV!=="production"&&(jR.propTypes={anchorEl:b.oneOfType([Oo,b.func]),autoFocus:b.bool,children:b.node,classes:b.object,className:b.string,disableAutoFocusItem:b.bool,MenuListProps:b.object,onClose:b.func,open:b.bool.isRequired,PaperProps:b.object,PopoverClasses:b.object,slotProps:b.shape({backdrop:b.oneOfType([b.func,b.object]),list:b.oneOfType([b.func,b.object]),paper:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({backdrop:b.elementType,list:b.elementType,paper:b.elementType,root:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),transitionDuration:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})]),TransitionProps:b.object,variant:b.oneOf(["menu","selectedMenu"])});function Bae(e){return En("MuiNativeSelect",e)}const g1=Kn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Wae=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${wn(n)}`,o&&"iconOpen",r&&"disabled"]};return Bn(s,Bae,t)},MR=Ae("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${g1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),zae=Ae(MR,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ko,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${g1.multiple}`]:t.multiple}]}})({}),RR=Ae("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${g1.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Vae=Ae(RR,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${wn(n.variant)}`],n.open&&t.iconOpen]}})({}),IR=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},d=Wae(u);return h.jsxs(O.Fragment,{children:[h.jsx(zae,{ownerState:u,className:ce(d.select,r),disabled:i,ref:s||n,...c}),t.multiple?null:h.jsx(Vae,{as:a,ownerState:u,className:d.icon})]})});process.env.NODE_ENV!=="production"&&(IR.propTypes={children:b.node,classes:b.object,className:b.string,disabled:b.bool,error:b.bool,IconComponent:b.elementType.isRequired,inputRef:Ro,multiple:b.bool,name:b.string,onChange:b.func,value:b.any,variant:b.oneOf(["standard","outlined","filled"])});var SC;const Hae=Ae("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:ko})({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%"}),Yae=Ae("legend",{name:"MuiNotchedOutlined",shouldForwardProp:ko})(qn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function FR(e){const{children:t,classes:n,className:r,label:i,notched:o,...a}=e,s=i!=null&&i!=="",l={...e,notched:o,withLabel:s};return h.jsx(Hae,{"aria-hidden":!0,className:r,ownerState:l,...a,children:h.jsx(Yae,{ownerState:l,children:s?h.jsx("span",{children:i}):SC||(SC=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(FR.propTypes={children:b.node,classes:b.object,className:b.string,label:b.node,notched:b.bool.isRequired,style:b.object});const Uae=e=>{const{classes:t}=e,r=Bn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},qoe,t);return{...t,...r}},Kae=Ae(lm,{shouldForwardProp:e=>ko(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:am})(qn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${fi.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${fi.focused} .${fi.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(c1()).map(([n])=>({props:{color:n},style:{[`&.${fi.focused} .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${fi.error} .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${fi.disabled} .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),qae=Ae(FR,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(qn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Gae=Ae(cm,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:sm})(qn(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),v1=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:f="text",...p}=r,m=Uae(r),g=p1(),v=d1({props:r,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...r,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:g,fullWidth:o,hiddenLabel:v.hiddenLabel,multiline:l,size:v.size,type:f},_=u.root??i.Root??Kae,w=u.input??i.Input??Gae,[y,E]=ar("notchedOutline",{elementType:qae,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&v.required?h.jsxs(O.Fragment,{children:[s," ","*"]}):s}});return h.jsx(um,{slots:{root:_,input:w},slotProps:d,renderSuffix:S=>h.jsx(y,{...E,notched:typeof c<"u"?c:!!(S.startAdornment||S.filled||S.focused)}),fullWidth:o,inputComponent:a,multiline:l,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(v1.propTypes={autoComplete:b.string,autoFocus:b.bool,classes:b.object,color:b.oneOfType([b.oneOf(["primary","secondary"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),defaultValue:b.any,disabled:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,id:b.string,inputComponent:b.elementType,inputProps:b.object,inputRef:Ro,label:b.node,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,notched:b.bool,onChange:b.func,placeholder:b.string,readOnly:b.bool,required:b.bool,rows:b.oneOfType([b.number,b.string]),slotProps:b.shape({input:b.object,notchedOutline:b.oneOfType([b.func,b.object]),root:b.object}),slots:b.shape({input:b.elementType,notchedOutline:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});v1.muiName="Input";function LR(e){return En("MuiSelect",e)}const cc=Kn("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var OC;const Xae=Ae(MR,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${cc.select}`]:t.select},{[`&.${cc.select}`]:t[n.variant]},{[`&.${cc.error}`]:t.error},{[`&.${cc.multiple}`]:t.multiple}]}})({[`&.${cc.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Qae=Ae(RR,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${wn(n.variant)}`],n.open&&t.iconOpen]}})({}),Zae=Ae("input",{shouldForwardProp:e=>QP(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function CC(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Jae(e){return e==null||typeof e=="string"&&!e.trim()}const ese=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${wn(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Bn(s,LR,t)},$R=O.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:x={},multiple:_,name:w,onBlur:y,onChange:E,onClose:S,onFocus:P,onOpen:D,open:T,readOnly:R,renderValue:A,required:C,SelectDisplayProps:j={},tabIndex:N,type:M,value:L,variant:B="standard",...V}=t,[z,W]=Qv({controlled:L,default:u,name:"Select"}),[Q,X]=Qv({controlled:T,default:c,name:"Select"}),ie=O.useRef(null),J=O.useRef(null),[re,ae]=O.useState(null),{current:le}=O.useRef(T!=null),[ue,K]=O.useState(),U=Un(n,g),Z=O.useCallback(H=>{J.current=H,H&&ae(H)},[]),I=re?.parentNode;O.useImperativeHandle(U,()=>({focus:()=>{J.current.focus()},node:ie.current,value:z}),[z]),O.useEffect(()=>{c&&Q&&re&&!le&&(K(a?null:I.clientWidth),J.current.focus())},[re,a]),O.useEffect(()=>{o&&J.current.focus()},[o]),O.useEffect(()=>{if(!v)return;const H=Or(J.current).getElementById(v);if(H){const ee=()=>{getSelection().isCollapsed&&J.current.focus()};return H.addEventListener("click",ee),()=>{H.removeEventListener("click",ee)}}},[v]);const me=(H,ee)=>{H?D&&D(ee):S&&S(ee),le||(K(a?null:I.clientWidth),X(H))},oe=H=>{H.button===0&&(H.preventDefault(),J.current.focus(),me(!0,H))},ve=H=>{me(!1,H)},we=O.Children.toArray(s),Ne=H=>{const ee=we.find(ne=>ne.props.value===H.target.value);ee!==void 0&&(W(ee.props.value),E&&E(H,ee))},qe=H=>ee=>{let ne;if(ee.currentTarget.hasAttribute("tabindex")){if(_){ne=Array.isArray(z)?z.slice():[];const _e=z.indexOf(H.props.value);_e===-1?ne.push(H.props.value):ne.splice(_e,1)}else ne=H.props.value;if(H.props.onClick&&H.props.onClick(ee),z!==ne&&(W(ne),E)){const _e=ee.nativeEvent||ee,Oe=new _e.constructor(_e.type,_e);Object.defineProperty(Oe,"target",{writable:!0,value:{value:ne,name:w}}),E(Oe,H)}_||me(!1,ee)}},ut=H=>{R||[" ","ArrowUp","ArrowDown","Enter"].includes(H.key)&&(H.preventDefault(),me(!0,H))},ot=re!==null&&Q,je=H=>{!ot&&y&&(Object.defineProperty(H,"target",{writable:!0,value:{value:z,name:w}}),y(H))};delete V["aria-invalid"];let bt,xt;const dt=[];let cn=!1,Jt=!1;(wR({value:z})||f)&&(A?bt=A(z):cn=!0);const un=we.map(H=>{if(!O.isValidElement(H))return null;process.env.NODE_ENV!=="production"&&ea.isFragment(H)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
257
+ `)),z.props.disabled||(v==="selectedMenu"&&z.props.selected||A===-1)&&(A=W))});const C={slots:x,slotProps:{list:l,transition:g,paper:d,..._}},j=yR({elementType:x.root,externalSlotProps:_.root,ownerState:E,className:[S.root,a]}),[N,M]=ar("paper",{className:S.paper,elementType:Lae,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:E}),[L,B]=ar("list",{className:ce(S.list,l.className),elementType:$ae,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:z=>({...z,onKeyDown:W=>{R(W),z.onKeyDown?.(W)}}),ownerState:E}),V=typeof C.slotProps.transition=="function"?C.slotProps.transition(E):C.slotProps.transition;return h.jsx(Fae,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:y?"right":"left"},transformOrigin:y?Mae:Rae,slots:{root:x.root,paper:N,backdrop:x.backdrop,...x.transition&&{transition:x.transition}},slotProps:{root:j,paper:M,backdrop:typeof _.backdrop=="function"?_.backdrop(E):_.backdrop,transition:{...V,onEntering:(...z)=>{T(...z),V?.onEntering?.(...z)}}},open:u,ref:n,transitionDuration:p,ownerState:E,...w,classes:f,children:h.jsx(L,{actions:D,autoFocus:i&&(A===-1||s),autoFocusItem:P,variant:v,...B,children:o})})});process.env.NODE_ENV!=="production"&&(jR.propTypes={anchorEl:b.oneOfType([Oo,b.func]),autoFocus:b.bool,children:b.node,classes:b.object,className:b.string,disableAutoFocusItem:b.bool,MenuListProps:b.object,onClose:b.func,open:b.bool.isRequired,PaperProps:b.object,PopoverClasses:b.object,slotProps:b.shape({backdrop:b.oneOfType([b.func,b.object]),list:b.oneOfType([b.func,b.object]),paper:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({backdrop:b.elementType,list:b.elementType,paper:b.elementType,root:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),transitionDuration:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})]),TransitionProps:b.object,variant:b.oneOf(["menu","selectedMenu"])});function Bae(e){return En("MuiNativeSelect",e)}const g1=Kn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Wae=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${wn(n)}`,o&&"iconOpen",r&&"disabled"]};return Bn(s,Bae,t)},MR=Ae("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${g1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),zae=Ae(MR,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ko,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${g1.multiple}`]:t.multiple}]}})({}),RR=Ae("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${g1.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Vae=Ae(RR,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${wn(n.variant)}`],n.open&&t.iconOpen]}})({}),IR=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},d=Wae(u);return h.jsxs(O.Fragment,{children:[h.jsx(zae,{ownerState:u,className:ce(d.select,r),disabled:i,ref:s||n,...c}),t.multiple?null:h.jsx(Vae,{as:a,ownerState:u,className:d.icon})]})});process.env.NODE_ENV!=="production"&&(IR.propTypes={children:b.node,classes:b.object,className:b.string,disabled:b.bool,error:b.bool,IconComponent:b.elementType.isRequired,inputRef:Ro,multiple:b.bool,name:b.string,onChange:b.func,value:b.any,variant:b.oneOf(["standard","outlined","filled"])});var SC;const Hae=Ae("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:ko})({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%"}),Yae=Ae("legend",{name:"MuiNotchedOutlined",shouldForwardProp:ko})(qn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function FR(e){const{children:t,classes:n,className:r,label:i,notched:o,...a}=e,s=i!=null&&i!=="",l={...e,notched:o,withLabel:s};return h.jsx(Hae,{"aria-hidden":!0,className:r,ownerState:l,...a,children:h.jsx(Yae,{ownerState:l,children:s?h.jsx("span",{children:i}):SC||(SC=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(FR.propTypes={children:b.node,classes:b.object,className:b.string,label:b.node,notched:b.bool.isRequired,style:b.object});const Uae=e=>{const{classes:t}=e,r=Bn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},qoe,t);return{...t,...r}},Kae=Ae(lm,{shouldForwardProp:e=>ko(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:am})(qn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${fi.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${fi.focused} .${fi.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(c1()).map(([n])=>({props:{color:n},style:{[`&.${fi.focused} .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${fi.error} .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${fi.disabled} .${fi.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),qae=Ae(FR,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(qn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Gae=Ae(cm,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:sm})(qn(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),v1=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:f="text",...p}=r,m=Uae(r),g=p1(),v=d1({props:r,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...r,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:g,fullWidth:o,hiddenLabel:v.hiddenLabel,multiline:l,size:v.size,type:f},_=u.root??i.Root??Kae,w=u.input??i.Input??Gae,[y,E]=ar("notchedOutline",{elementType:qae,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&v.required?h.jsxs(O.Fragment,{children:[s," ","*"]}):s}});return h.jsx(um,{slots:{root:_,input:w},slotProps:d,renderSuffix:S=>h.jsx(y,{...E,notched:typeof c<"u"?c:!!(S.startAdornment||S.filled||S.focused)}),fullWidth:o,inputComponent:a,multiline:l,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(v1.propTypes={autoComplete:b.string,autoFocus:b.bool,classes:b.object,color:b.oneOfType([b.oneOf(["primary","secondary"]),b.string]),components:b.shape({Input:b.elementType,Root:b.elementType}),defaultValue:b.any,disabled:b.bool,endAdornment:b.node,error:b.bool,fullWidth:b.bool,id:b.string,inputComponent:b.elementType,inputProps:b.object,inputRef:Ro,label:b.node,margin:b.oneOf(["dense","none"]),maxRows:b.oneOfType([b.number,b.string]),minRows:b.oneOfType([b.number,b.string]),multiline:b.bool,name:b.string,notched:b.bool,onChange:b.func,placeholder:b.string,readOnly:b.bool,required:b.bool,rows:b.oneOfType([b.number,b.string]),slotProps:b.shape({input:b.object,notchedOutline:b.oneOfType([b.func,b.object]),root:b.object}),slots:b.shape({input:b.elementType,notchedOutline:b.elementType,root:b.elementType}),startAdornment:b.node,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),type:b.string,value:b.any});v1.muiName="Input";function LR(e){return En("MuiSelect",e)}const cc=Kn("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var OC;const Xae=Ae(MR,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${cc.select}`]:t.select},{[`&.${cc.select}`]:t[n.variant]},{[`&.${cc.error}`]:t.error},{[`&.${cc.multiple}`]:t.multiple}]}})({[`&.${cc.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Qae=Ae(RR,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${wn(n.variant)}`],n.open&&t.iconOpen]}})({}),Zae=Ae("input",{shouldForwardProp:e=>QP(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function CC(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Jae(e){return e==null||typeof e=="string"&&!e.trim()}const ese=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${wn(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Bn(s,LR,t)},$R=O.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:x={},multiple:_,name:w,onBlur:y,onChange:E,onClose:S,onFocus:P,onOpen:D,open:T,readOnly:R,renderValue:A,required:C,SelectDisplayProps:j={},tabIndex:N,type:M,value:L,variant:B="standard",...V}=t,[z,W]=Qv({controlled:L,default:u,name:"Select"}),[Q,G]=Qv({controlled:T,default:c,name:"Select"}),ie=O.useRef(null),J=O.useRef(null),[re,ae]=O.useState(null),{current:le}=O.useRef(T!=null),[ue,K]=O.useState(),U=Un(n,g),Z=O.useCallback(H=>{J.current=H,H&&ae(H)},[]),I=re?.parentNode;O.useImperativeHandle(U,()=>({focus:()=>{J.current.focus()},node:ie.current,value:z}),[z]),O.useEffect(()=>{c&&Q&&re&&!le&&(K(a?null:I.clientWidth),J.current.focus())},[re,a]),O.useEffect(()=>{o&&J.current.focus()},[o]),O.useEffect(()=>{if(!v)return;const H=Or(J.current).getElementById(v);if(H){const ee=()=>{getSelection().isCollapsed&&J.current.focus()};return H.addEventListener("click",ee),()=>{H.removeEventListener("click",ee)}}},[v]);const me=(H,ee)=>{H?D&&D(ee):S&&S(ee),le||(K(a?null:I.clientWidth),G(H))},oe=H=>{H.button===0&&(H.preventDefault(),J.current.focus(),me(!0,H))},ve=H=>{me(!1,H)},we=O.Children.toArray(s),Ne=H=>{const ee=we.find(ne=>ne.props.value===H.target.value);ee!==void 0&&(W(ee.props.value),E&&E(H,ee))},qe=H=>ee=>{let ne;if(ee.currentTarget.hasAttribute("tabindex")){if(_){ne=Array.isArray(z)?z.slice():[];const _e=z.indexOf(H.props.value);_e===-1?ne.push(H.props.value):ne.splice(_e,1)}else ne=H.props.value;if(H.props.onClick&&H.props.onClick(ee),z!==ne&&(W(ne),E)){const _e=ee.nativeEvent||ee,Oe=new _e.constructor(_e.type,_e);Object.defineProperty(Oe,"target",{writable:!0,value:{value:ne,name:w}}),E(Oe,H)}_||me(!1,ee)}},ut=H=>{R||[" ","ArrowUp","ArrowDown","Enter"].includes(H.key)&&(H.preventDefault(),me(!0,H))},ot=re!==null&&Q,je=H=>{!ot&&y&&(Object.defineProperty(H,"target",{writable:!0,value:{value:z,name:w}}),y(H))};delete V["aria-invalid"];let bt,xt;const dt=[];let cn=!1,Jt=!1;(wR({value:z})||f)&&(A?bt=A(z):cn=!0);const un=we.map(H=>{if(!O.isValidElement(H))return null;process.env.NODE_ENV!=="production"&&ea.isFragment(H)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
258
258
  `));let ee;if(_){if(!Array.isArray(z))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Mi(2));ee=z.some(ne=>CC(ne,H.props.value)),ee&&cn&&dt.push(H.props.children)}else ee=CC(z,H.props.value),ee&&cn&&(xt=H.props.children);return ee&&(Jt=!0),O.cloneElement(H,{"aria-selected":ee?"true":"false",onClick:qe(H),onKeyUp:ne=>{ne.key===" "&&ne.preventDefault(),H.props.onKeyUp&&H.props.onKeyUp(ne)},role:"option",selected:ee,value:void 0,"data-value":H.props.value})});process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(!Jt&&!_&&z!==""){const H=we.map(ee=>ee.props.value);console.warn([`MUI: You have provided an out-of-range value \`${z}\` for the select ${w?`(name="${w}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${H.filter(ee=>ee!=null).map(ee=>`\`${ee}\``).join(", ")||'""'}.`].join(`
259
- `))}},[Jt,we,_,w,z]),cn&&(_?dt.length===0?bt=null:bt=dt.reduce((H,ee,ne)=>(H.push(ee),ne<dt.length-1&&H.push(", "),H),[]):bt=xt);let Cn=ue;!a&&le&&re&&(Cn=I.clientWidth);let Ht;typeof N<"u"?Ht=N:Ht=d?null:0;const kn=j.id||(w?`mui-component-select-${w}`:void 0),ye={...t,variant:B,value:z,open:ot,error:p},dn=ese(ye),Yt={...x.PaperProps,...typeof x.slotProps?.paper=="function"?x.slotProps.paper(ye):x.slotProps?.paper},F={...x.MenuListProps,...typeof x.slotProps?.list=="function"?x.slotProps.list(ye):x.slotProps?.list},q=VP();return h.jsxs(O.Fragment,{children:[h.jsx(Xae,{as:"div",ref:Z,tabIndex:Ht,role:"combobox","aria-controls":ot?q:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ot?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,kn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":C?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:ut,onMouseDown:d||R?null:oe,onBlur:je,onFocus:P,...j,ownerState:ye,className:ce(j.className,dn.select,l),id:kn,children:Jae(bt)?OC||(OC=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):bt}),h.jsx(Zae,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:w,ref:ie,"aria-hidden":!0,onChange:Ne,tabIndex:-1,disabled:d,className:dn.nativeInput,autoFocus:o,required:C,...V,ownerState:ye}),h.jsx(Qae,{as:m,className:dn.icon,ownerState:ye}),h.jsx(jR,{id:`menu-${w||""}`,anchorEl:I,open:ot,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...x,slotProps:{...x.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":_?"true":void 0,disableListWrap:!0,id:q,...F},paper:{...Yt,style:{minWidth:Cn,...Yt!=null?Yt.style:null}}},children:un})]})});process.env.NODE_ENV!=="production"&&($R.propTypes={"aria-describedby":b.string,"aria-label":b.string,autoFocus:b.bool,autoWidth:b.bool,children:b.node,classes:b.object,className:b.string,defaultOpen:b.bool,defaultValue:b.any,disabled:b.bool,displayEmpty:b.bool,error:b.bool,IconComponent:b.elementType.isRequired,inputRef:Ro,labelId:b.string,MenuProps:b.object,multiple:b.bool,name:b.string,onBlur:b.func,onChange:b.func,onClose:b.func,onFocus:b.func,onOpen:b.func,open:b.bool,readOnly:b.bool,renderValue:b.func,required:b.bool,SelectDisplayProps:b.object,tabIndex:b.oneOfType([b.number,b.string]),type:b.any,value:b.any,variant:b.oneOf(["standard","outlined","filled"])});const tse=e=>{const{classes:t}=e,r=Bn({root:["root"]},LR,t);return{...t,...r}},y1={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>ko(e)&&e!=="variant"},nse=Ae(m1,y1)(""),rse=Ae(v1,y1)(""),ise=Ae(h1,y1)(""),b1=O.forwardRef(function(t,n){const r=dr({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Xoe,id:d,input:f,inputProps:p,label:m,labelId:g,MenuProps:v,multiple:x=!1,native:_=!1,onClose:w,onOpen:y,open:E,renderValue:S,SelectDisplayProps:P,variant:D="outlined",...T}=r,R=_?IR:$R,A=p1(),C=d1({props:r,muiFormControl:A,states:["variant","error"]}),j=C.variant||D,N={...r,variant:j,classes:a},M=tse(N),{root:L,...B}=M,V=f||{standard:h.jsx(nse,{ownerState:N}),outlined:h.jsx(rse,{label:m,ownerState:N}),filled:h.jsx(ise,{ownerState:N})}[j],z=Un(n,Fl(V));return h.jsx(O.Fragment,{children:O.cloneElement(V,{inputComponent:R,inputProps:{children:o,error:C.error,IconComponent:u,variant:j,type:void 0,multiple:x,..._?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:v,onClose:w,onOpen:y,open:E,renderValue:S,SelectDisplayProps:{id:d,...P}},...p,classes:p?Rn(B,p.classes):B,...f?f.props.inputProps:{}},...(x&&_||c)&&j==="outlined"?{notched:!0}:{},ref:z,className:ce(V.props.className,s,M.root),...!f&&{variant:j},...T})})});process.env.NODE_ENV!=="production"&&(b1.propTypes={autoWidth:b.bool,children:b.node,classes:b.object,className:b.string,defaultOpen:b.bool,defaultValue:b.any,displayEmpty:b.bool,IconComponent:b.elementType,id:b.string,input:b.element,inputProps:b.object,label:b.node,labelId:b.string,MenuProps:b.object,multiple:b.bool,native:b.bool,onChange:b.func,onClose:b.func,onOpen:b.func,open:b.bool,renderValue:b.func,SelectDisplayProps:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),value:b.oneOfType([b.oneOf([""]),b.any]),variant:b.oneOf(["filled","outlined","standard"])});b1.muiName="Select";function ose(e){return En("MuiTooltip",e)}const jt=Kn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function ase(e){return Math.round(e*1e5)/1e5}const sse=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${wn(o.split("-")[0])}`],arrow:["arrow"]};return Bn(a,ose,t)},lse=Ae(u1,{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]}})(qn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${jt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${jt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${jt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${jt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${jt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${jt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${jt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${jt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),cse=Ae("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${wn(n.placement.split("-")[0])}`]]}})(qn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${jt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${jt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${jt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${ase(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${jt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${jt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),use=Ae("span",{name:"MuiTooltip",slot:"Arrow"})(qn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Wd=!1;const kC=new im;let uc={x:0,y:0};function zd(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const BR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:g=0,enterTouchDelay:v=700,followCursor:x=!1,id:_,leaveDelay:w=0,leaveTouchDelay:y=1500,onClose:E,onOpen:S,open:P,placement:D="bottom",PopperComponent:T,PopperProps:R={},slotProps:A={},slots:C={},title:j,TransitionComponent:N,TransitionProps:M,...L}=r,B=O.isValidElement(o)?o:h.jsx("span",{children:o}),V=lh(),z=Nb(),[W,Q]=O.useState(),[X,ie]=O.useState(null),J=O.useRef(!1),re=f||x,ae=Ec(),le=Ec(),ue=Ec(),K=Ec(),[U,Z]=Qv({controlled:P,default:!1,name:"Tooltip",state:"open"});let I=U;if(process.env.NODE_ENV!=="production"){const{current:be}=O.useRef(P!==void 0);O.useEffect(()=>{W&&W.disabled&&!be&&j!==""&&W.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
259
+ `))}},[Jt,we,_,w,z]),cn&&(_?dt.length===0?bt=null:bt=dt.reduce((H,ee,ne)=>(H.push(ee),ne<dt.length-1&&H.push(", "),H),[]):bt=xt);let Cn=ue;!a&&le&&re&&(Cn=I.clientWidth);let Ht;typeof N<"u"?Ht=N:Ht=d?null:0;const kn=j.id||(w?`mui-component-select-${w}`:void 0),ye={...t,variant:B,value:z,open:ot,error:p},dn=ese(ye),Yt={...x.PaperProps,...typeof x.slotProps?.paper=="function"?x.slotProps.paper(ye):x.slotProps?.paper},F={...x.MenuListProps,...typeof x.slotProps?.list=="function"?x.slotProps.list(ye):x.slotProps?.list},q=VP();return h.jsxs(O.Fragment,{children:[h.jsx(Xae,{as:"div",ref:Z,tabIndex:Ht,role:"combobox","aria-controls":ot?q:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ot?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,kn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":C?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:ut,onMouseDown:d||R?null:oe,onBlur:je,onFocus:P,...j,ownerState:ye,className:ce(j.className,dn.select,l),id:kn,children:Jae(bt)?OC||(OC=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):bt}),h.jsx(Zae,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:w,ref:ie,"aria-hidden":!0,onChange:Ne,tabIndex:-1,disabled:d,className:dn.nativeInput,autoFocus:o,required:C,...V,ownerState:ye}),h.jsx(Qae,{as:m,className:dn.icon,ownerState:ye}),h.jsx(jR,{id:`menu-${w||""}`,anchorEl:I,open:ot,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...x,slotProps:{...x.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":_?"true":void 0,disableListWrap:!0,id:q,...F},paper:{...Yt,style:{minWidth:Cn,...Yt!=null?Yt.style:null}}},children:un})]})});process.env.NODE_ENV!=="production"&&($R.propTypes={"aria-describedby":b.string,"aria-label":b.string,autoFocus:b.bool,autoWidth:b.bool,children:b.node,classes:b.object,className:b.string,defaultOpen:b.bool,defaultValue:b.any,disabled:b.bool,displayEmpty:b.bool,error:b.bool,IconComponent:b.elementType.isRequired,inputRef:Ro,labelId:b.string,MenuProps:b.object,multiple:b.bool,name:b.string,onBlur:b.func,onChange:b.func,onClose:b.func,onFocus:b.func,onOpen:b.func,open:b.bool,readOnly:b.bool,renderValue:b.func,required:b.bool,SelectDisplayProps:b.object,tabIndex:b.oneOfType([b.number,b.string]),type:b.any,value:b.any,variant:b.oneOf(["standard","outlined","filled"])});const tse=e=>{const{classes:t}=e,r=Bn({root:["root"]},LR,t);return{...t,...r}},y1={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>ko(e)&&e!=="variant"},nse=Ae(m1,y1)(""),rse=Ae(v1,y1)(""),ise=Ae(h1,y1)(""),b1=O.forwardRef(function(t,n){const r=dr({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Xoe,id:d,input:f,inputProps:p,label:m,labelId:g,MenuProps:v,multiple:x=!1,native:_=!1,onClose:w,onOpen:y,open:E,renderValue:S,SelectDisplayProps:P,variant:D="outlined",...T}=r,R=_?IR:$R,A=p1(),C=d1({props:r,muiFormControl:A,states:["variant","error"]}),j=C.variant||D,N={...r,variant:j,classes:a},M=tse(N),{root:L,...B}=M,V=f||{standard:h.jsx(nse,{ownerState:N}),outlined:h.jsx(rse,{label:m,ownerState:N}),filled:h.jsx(ise,{ownerState:N})}[j],z=Un(n,Fl(V));return h.jsx(O.Fragment,{children:O.cloneElement(V,{inputComponent:R,inputProps:{children:o,error:C.error,IconComponent:u,variant:j,type:void 0,multiple:x,..._?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:v,onClose:w,onOpen:y,open:E,renderValue:S,SelectDisplayProps:{id:d,...P}},...p,classes:p?Rn(B,p.classes):B,...f?f.props.inputProps:{}},...(x&&_||c)&&j==="outlined"?{notched:!0}:{},ref:z,className:ce(V.props.className,s,M.root),...!f&&{variant:j},...T})})});process.env.NODE_ENV!=="production"&&(b1.propTypes={autoWidth:b.bool,children:b.node,classes:b.object,className:b.string,defaultOpen:b.bool,defaultValue:b.any,displayEmpty:b.bool,IconComponent:b.elementType,id:b.string,input:b.element,inputProps:b.object,label:b.node,labelId:b.string,MenuProps:b.object,multiple:b.bool,native:b.bool,onChange:b.func,onClose:b.func,onOpen:b.func,open:b.bool,renderValue:b.func,SelectDisplayProps:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),value:b.oneOfType([b.oneOf([""]),b.any]),variant:b.oneOf(["filled","outlined","standard"])});b1.muiName="Select";function ose(e){return En("MuiTooltip",e)}const jt=Kn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function ase(e){return Math.round(e*1e5)/1e5}const sse=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${wn(o.split("-")[0])}`],arrow:["arrow"]};return Bn(a,ose,t)},lse=Ae(u1,{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]}})(qn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${jt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${jt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${jt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${jt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${jt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${jt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${jt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${jt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),cse=Ae("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${wn(n.placement.split("-")[0])}`]]}})(qn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${jt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${jt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${jt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${ase(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${jt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${jt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${jt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${jt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),use=Ae("span",{name:"MuiTooltip",slot:"Arrow"})(qn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Wd=!1;const kC=new im;let uc={x:0,y:0};function zd(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const BR=O.forwardRef(function(t,n){const r=dr({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:g=0,enterTouchDelay:v=700,followCursor:x=!1,id:_,leaveDelay:w=0,leaveTouchDelay:y=1500,onClose:E,onOpen:S,open:P,placement:D="bottom",PopperComponent:T,PopperProps:R={},slotProps:A={},slots:C={},title:j,TransitionComponent:N,TransitionProps:M,...L}=r,B=O.isValidElement(o)?o:h.jsx("span",{children:o}),V=lh(),z=Nb(),[W,Q]=O.useState(),[G,ie]=O.useState(null),J=O.useRef(!1),re=f||x,ae=Ec(),le=Ec(),ue=Ec(),K=Ec(),[U,Z]=Qv({controlled:P,default:!1,name:"Tooltip",state:"open"});let I=U;if(process.env.NODE_ENV!=="production"){const{current:be}=O.useRef(P!==void 0);O.useEffect(()=>{W&&W.disabled&&!be&&j!==""&&W.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
260
260
  `))},[j,W,be])}const me=VP(_),oe=O.useRef(),ve=Vc(()=>{oe.current!==void 0&&(document.body.style.WebkitUserSelect=oe.current,oe.current=void 0),K.clear()});O.useEffect(()=>ve,[ve]);const we=be=>{kC.clear(),Wd=!0,Z(!0),S&&!I&&S(be)},Ne=Vc(be=>{kC.start(800+w,()=>{Wd=!1}),Z(!1),E&&I&&E(be),ae.start(V.transitions.duration.shortest,()=>{J.current=!1})}),qe=be=>{J.current&&be.type!=="touchstart"||(W&&W.removeAttribute("title"),le.clear(),ue.clear(),m||Wd&&g?le.start(Wd?g:m,()=>{we(be)}):we(be))},ut=be=>{le.clear(),ue.start(w,()=>{Ne(be)})},[,ot]=O.useState(!1),je=be=>{fC(be.target)||(ot(!1),ut(be))},bt=be=>{W||Q(be.currentTarget),fC(be.target)&&(ot(!0),qe(be))},xt=be=>{J.current=!0;const tn=B.props;tn.onTouchStart&&tn.onTouchStart(be)},dt=be=>{xt(be),ue.clear(),ae.clear(),ve(),oe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",K.start(v,()=>{document.body.style.WebkitUserSelect=oe.current,qe(be)})},cn=be=>{B.props.onTouchEnd&&B.props.onTouchEnd(be),ve(),ue.start(y,()=>{Ne(be)})};O.useEffect(()=>{if(!I)return;function be(tn){tn.key==="Escape"&&Ne(tn)}return document.addEventListener("keydown",be),()=>{document.removeEventListener("keydown",be)}},[Ne,I]);const Jt=Un(Fl(B),Q,n);!j&&j!==0&&(I=!1);const un=O.useRef(),Cn=be=>{const tn=B.props;tn.onMouseMove&&tn.onMouseMove(be),uc={x:be.clientX,y:be.clientY},un.current&&un.current.update()},Ht={},kn=typeof j=="string";c?(Ht.title=!I&&kn&&!d?j:null,Ht["aria-describedby"]=I?me:null):(Ht["aria-label"]=kn?j:null,Ht["aria-labelledby"]=I&&!kn?me:null);const ye={...Ht,...L,...B.props,className:ce(L.className,B.props.className),onTouchStart:xt,ref:Jt,...x?{onMouseMove:Cn}:{}};process.env.NODE_ENV!=="production"&&(ye["data-mui-internal-clone-element"]=!0,O.useEffect(()=>{W&&!W.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
261
261
  `))},[W]));const dn={};p||(ye.onTouchStart=dt,ye.onTouchEnd=cn),d||(ye.onMouseOver=zd(qe,ye.onMouseOver),ye.onMouseLeave=zd(ut,ye.onMouseLeave),re||(dn.onMouseOver=qe,dn.onMouseLeave=ut)),u||(ye.onFocus=zd(bt,ye.onFocus),ye.onBlur=zd(je,ye.onBlur),re||(dn.onFocus=bt,dn.onBlur=je)),process.env.NODE_ENV!=="production"&&B.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${B.props.title}\` or the Tooltip component.`].join(`
262
- `));const Yt={...r,isRtl:z,arrow:i,disableInteractive:re,placement:D,PopperComponentProp:T,touch:J.current},F=typeof A.popper=="function"?A.popper(Yt):A.popper,q=O.useMemo(()=>{let be=[{name:"arrow",enabled:!!X,options:{element:X,padding:4}}];return R.popperOptions?.modifiers&&(be=be.concat(R.popperOptions.modifiers)),F?.popperOptions?.modifiers&&(be=be.concat(F.popperOptions.modifiers)),{...R.popperOptions,...F?.popperOptions,modifiers:be}},[X,R.popperOptions,F?.popperOptions]),H=sse(Yt),ee=typeof A.transition=="function"?A.transition(Yt):A.transition,ne={slots:{popper:s.Popper,transition:s.Transition??N,tooltip:s.Tooltip,arrow:s.Arrow,...C},slotProps:{arrow:A.arrow??l.arrow,popper:{...R,...F??l.popper},tooltip:A.tooltip??l.tooltip,transition:{...M,...ee??l.transition}}},[_e,Oe]=ar("popper",{elementType:lse,externalForwardedProps:ne,ownerState:Yt,className:ce(H.popper,R?.className)}),[en,Jr]=ar("transition",{elementType:uu,externalForwardedProps:ne,ownerState:Yt}),[Ut,ei]=ar("tooltip",{elementType:cse,className:H.tooltip,externalForwardedProps:ne,ownerState:Yt}),[Xn,vn]=ar("arrow",{elementType:use,className:H.arrow,externalForwardedProps:ne,ownerState:Yt,ref:ie});return h.jsxs(O.Fragment,{children:[O.cloneElement(B,ye),h.jsx(_e,{as:T??u1,placement:D,anchorEl:x?{getBoundingClientRect:()=>({top:uc.y,left:uc.x,right:uc.x,bottom:uc.y,width:0,height:0})}:W,popperRef:un,open:W?I:!1,id:me,transition:!0,...dn,...Oe,popperOptions:q,children:({TransitionProps:be})=>h.jsx(en,{timeout:V.transitions.duration.shorter,...be,...Jr,children:h.jsxs(Ut,{...ei,children:[j,i?h.jsx(Xn,{...vn}):null]})})})]})});process.env.NODE_ENV!=="production"&&(BR.propTypes={arrow:b.bool,children:Ll.isRequired,classes:b.object,className:b.string,components:b.shape({Arrow:b.elementType,Popper:b.elementType,Tooltip:b.elementType,Transition:b.elementType}),componentsProps:b.shape({arrow:b.object,popper:b.object,tooltip:b.object,transition:b.object}),describeChild:b.bool,disableFocusListener:b.bool,disableHoverListener:b.bool,disableInteractive:b.bool,disableTouchListener:b.bool,enterDelay:b.number,enterNextDelay:b.number,enterTouchDelay:b.number,followCursor:b.bool,id:b.string,leaveDelay:b.number,leaveTouchDelay:b.number,onClose:b.func,onOpen:b.func,open:b.bool,placement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:b.elementType,PopperProps:b.object,slotProps:b.shape({arrow:b.oneOfType([b.func,b.object]),popper:b.oneOfType([b.func,b.object]),tooltip:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({arrow:b.elementType,popper:b.elementType,tooltip:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),title:b.node,TransitionComponent:b.elementType,TransitionProps:b.object});function dse(e){return yt({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function fse(e){return yt({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}Of(b1)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function $l({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||[],[a,s]=k.useState(o),[l,c]=k.useState("");t.filter(d=>d.community_name.toLowerCase().includes(l.toLowerCase()));const u=()=>{eE("widget_id",e),eE("export",!0),i()};return h.jsx("div",{className:"flex items-center gap-[8px]",children:h.jsx(BR,{title:"Export CSV for this widget",children:h.jsx("button",{onClick:u,className:"px-[12px] py-[8px] bg-[#FBF5FF] rounded cursor-pointer",children:h.jsx(dse,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function pse({isStatic:e,data:t}){const n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),r=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),a=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:n,color:a[0]},{name:"Move-outs",value:r,color:a[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return h.jsx(ms,{title:"Community",period:"This Month",icon:h.jsx(WD,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:h.jsx($l,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsxs("div",{className:"flex",children:[h.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[h.jsxs("div",{className:"flex flex-col gap-[8px]",children:[h.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),h.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),h.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[h.jsx(Du,{value:l(i,o)}),h.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),h.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:h.jsx(Pt,{width:"75%",height:"100%",children:h.jsxs(Hi,{children:[h.jsxs(ui,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[h.jsx(Ln,{fill:a[0]}),h.jsx(Ln,{fill:a[1]})]}),h.jsx(kt,{content:Au({data:s})})]})})})]})})}function WR({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),fill:r[0]},{name:"Post",value:Number(t?.total_topics||t?.total_forum_topics||0),fill:r[1]},{name:"Poll",value:Number(t?.total_polls||t?.total_poll_detail||0),fill:r[2]},{name:"Survey",value:Number(t?.total_surveys||t?.total_survey_detail||0),fill:r[3]}],o=t?.widget==="commercial";return h.jsx(ms,{title:"Engagement",period:"This Month",icon:h.jsx(zD,{className:"!text-[20px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} `,childrenClassName:`${o?"mt-[52px]":"mt-0"}`,actionButtons:!o&&h.jsx($l,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsx("div",{className:`w-full ${o?"h-[220px]":"h-[260px]"}`,children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[h.jsx(fr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),h.jsx($n,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),h.jsx(Gn,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),h.jsx(kt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0},allowEscapeViewBox:{x:!0,y:!0},content:a=>a.active?h.jsx(Zt,{...a,data:i,children:h.jsx(Gr,{...a})}):null}),h.jsx(Gt,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>h.jsx(Ln,{fill:r[s],dataKey:"value"},a.name))})]})})})})}function hse({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=k.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return h.jsxs(ms,{title:"Facilities",period:"Today",icon:h.jsx(Gb,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:h.jsx($l,{widgetId:t?.widget_id,options:t?.communities}),children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),h.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),h.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),h.jsx("div",{className:"w-full h-[170px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(l1,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[h.jsx(fr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),h.jsx(Gn,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),h.jsx($n,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx($n,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(kt,{cursor:{stroke:"transparent"},wrapperStyle:{outline:"none"},allowEscapeViewBox:{x:!0,y:!0},content:Au({data:a})}),h.jsx(Zo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),h.jsx(Zo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function mse({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return h.jsx(ms,{title:"Income",period:"This Month",icon:h.jsx(zf,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:h.jsx($l,{widgetId:e?.widget_id,options:e?.communities}),children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Income"}),h.jsx("div",{children:"Collection"}),h.jsx("div",{children:"Closing"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-[8px]",children:[h.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),h.jsx("div",{children:a(t.income,t?.currency_type)}),h.jsx("div",{children:a(t.collection,t?.currency_type)}),h.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),h.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsx(zf,{className:"!text-[24px] text-red-600"}),h.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Expenditure"}),h.jsx("div",{children:"Payment"}),h.jsx("div",{children:"Outstanding"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[h.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),h.jsx("div",{children:a(n.expenditure,n?.currency_type)}),h.jsx("div",{children:a(n.payment,n?.currency_type)}),h.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var gse="tippy-content",vse="tippy-backdrop",yse="tippy-arrow",bse="tippy-svg-arrow",Ra={passive:!0,capture:!0},zR=function(){return document.body};function xse(e,t){return{}.hasOwnProperty.call(e,t)}function Sv(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function x1(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function VR(e,t){return typeof e=="function"?e.apply(void 0,t):e}function PC(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function wse(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function _se(e){return e.split(/\s+/).filter(Boolean)}function Bs(e){return[].concat(e)}function DC(e,t){e.indexOf(t)===-1&&e.push(t)}function Ese(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Sse(e){return e.split("-")[0]}function Mp(e){return[].slice.call(e)}function AC(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Ose(){return document.createElement("div")}function cb(e){return["Element","Fragment"].some(function(t){return x1(e,t)})}function Cse(e){return x1(e,"NodeList")}function kse(e){return x1(e,"MouseEvent")}function Pse(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Dse(e){return cb(e)?[e]:Cse(e)?Mp(e):Array.isArray(e)?e:Mp(document.querySelectorAll(e))}function Ov(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function TC(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Ase(e){var t,n=Bs(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Tse(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=Sse(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function Cv(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function NC(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var wi={isTouch:!1},jC=0;function Nse(){wi.isTouch||(wi.isTouch=!0,window.performance&&document.addEventListener("mousemove",HR))}function HR(){var e=performance.now();e-jC<20&&(wi.isTouch=!1,document.removeEventListener("mousemove",HR)),jC=e}function jse(){var e=document.activeElement;if(Pse(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Mse(){document.addEventListener("touchstart",Nse,Ra),window.addEventListener("blur",jse)}var Rse=typeof window<"u"&&typeof document<"u",Ise=Rse?!!window.msCrypto:!1;function js(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function MC(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Fse(e){return MC(`
262
+ `));const Yt={...r,isRtl:z,arrow:i,disableInteractive:re,placement:D,PopperComponentProp:T,touch:J.current},F=typeof A.popper=="function"?A.popper(Yt):A.popper,q=O.useMemo(()=>{let be=[{name:"arrow",enabled:!!G,options:{element:G,padding:4}}];return R.popperOptions?.modifiers&&(be=be.concat(R.popperOptions.modifiers)),F?.popperOptions?.modifiers&&(be=be.concat(F.popperOptions.modifiers)),{...R.popperOptions,...F?.popperOptions,modifiers:be}},[G,R.popperOptions,F?.popperOptions]),H=sse(Yt),ee=typeof A.transition=="function"?A.transition(Yt):A.transition,ne={slots:{popper:s.Popper,transition:s.Transition??N,tooltip:s.Tooltip,arrow:s.Arrow,...C},slotProps:{arrow:A.arrow??l.arrow,popper:{...R,...F??l.popper},tooltip:A.tooltip??l.tooltip,transition:{...M,...ee??l.transition}}},[_e,Oe]=ar("popper",{elementType:lse,externalForwardedProps:ne,ownerState:Yt,className:ce(H.popper,R?.className)}),[en,Jr]=ar("transition",{elementType:uu,externalForwardedProps:ne,ownerState:Yt}),[Ut,ei]=ar("tooltip",{elementType:cse,className:H.tooltip,externalForwardedProps:ne,ownerState:Yt}),[Xn,vn]=ar("arrow",{elementType:use,className:H.arrow,externalForwardedProps:ne,ownerState:Yt,ref:ie});return h.jsxs(O.Fragment,{children:[O.cloneElement(B,ye),h.jsx(_e,{as:T??u1,placement:D,anchorEl:x?{getBoundingClientRect:()=>({top:uc.y,left:uc.x,right:uc.x,bottom:uc.y,width:0,height:0})}:W,popperRef:un,open:W?I:!1,id:me,transition:!0,...dn,...Oe,popperOptions:q,children:({TransitionProps:be})=>h.jsx(en,{timeout:V.transitions.duration.shorter,...be,...Jr,children:h.jsxs(Ut,{...ei,children:[j,i?h.jsx(Xn,{...vn}):null]})})})]})});process.env.NODE_ENV!=="production"&&(BR.propTypes={arrow:b.bool,children:Ll.isRequired,classes:b.object,className:b.string,components:b.shape({Arrow:b.elementType,Popper:b.elementType,Tooltip:b.elementType,Transition:b.elementType}),componentsProps:b.shape({arrow:b.object,popper:b.object,tooltip:b.object,transition:b.object}),describeChild:b.bool,disableFocusListener:b.bool,disableHoverListener:b.bool,disableInteractive:b.bool,disableTouchListener:b.bool,enterDelay:b.number,enterNextDelay:b.number,enterTouchDelay:b.number,followCursor:b.bool,id:b.string,leaveDelay:b.number,leaveTouchDelay:b.number,onClose:b.func,onOpen:b.func,open:b.bool,placement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:b.elementType,PopperProps:b.object,slotProps:b.shape({arrow:b.oneOfType([b.func,b.object]),popper:b.oneOfType([b.func,b.object]),tooltip:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({arrow:b.elementType,popper:b.elementType,tooltip:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),title:b.node,TransitionComponent:b.elementType,TransitionProps:b.object});function dse(e){return yt({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function fse(e){return yt({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}Of(b1)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function $l({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||[],[a,s]=k.useState(o),[l,c]=k.useState("");t.filter(d=>d.community_name.toLowerCase().includes(l.toLowerCase()));const u=()=>{eE("widget_id",e),eE("export",!0),i()};return h.jsx("div",{className:"flex items-center gap-[8px]",children:h.jsx(BR,{title:"Export CSV for this widget",children:h.jsx("button",{onClick:u,className:"px-[12px] py-[8px] bg-[#FBF5FF] rounded cursor-pointer",children:h.jsx(dse,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function pse({isStatic:e,data:t}){const n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),r=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),a=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:n,color:a[0]},{name:"Move-outs",value:r,color:a[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return h.jsx(ms,{title:"Community",period:"This Month",icon:h.jsx(WD,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:h.jsx($l,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsxs("div",{className:"flex",children:[h.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[h.jsxs("div",{className:"flex flex-col gap-[8px]",children:[h.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),h.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),h.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[h.jsx(Du,{value:l(i,o)}),h.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),h.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:h.jsx(Pt,{width:"75%",height:"100%",children:h.jsxs(Hi,{children:[h.jsxs(ui,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[h.jsx(Ln,{fill:a[0]}),h.jsx(Ln,{fill:a[1]})]}),h.jsx(kt,{content:Au({data:s})})]})})})]})})}function WR({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),fill:r[0]},{name:"Post",value:Number(t?.total_topics||t?.total_forum_topics||0),fill:r[1]},{name:"Poll",value:Number(t?.total_polls||t?.total_poll_detail||0),fill:r[2]},{name:"Survey",value:Number(t?.total_surveys||t?.total_survey_detail||0),fill:r[3]}],o=t?.widget==="commercial";return h.jsx(ms,{title:"Engagement",period:"This Month",icon:h.jsx(zD,{className:"!text-[20px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} `,childrenClassName:`${o?"mt-[52px]":"mt-0"}`,actionButtons:!o&&h.jsx($l,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsx("div",{className:`w-full ${o?"h-[220px]":"h-[260px]"}`,children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[h.jsx(fr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),h.jsx($n,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),h.jsx(Gn,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),h.jsx(kt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0},allowEscapeViewBox:{x:!0,y:!0},content:a=>a.active?h.jsx(Zt,{...a,data:i,children:h.jsx(Gr,{...a})}):null}),h.jsx(Gt,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>h.jsx(Ln,{fill:r[s],dataKey:"value"},a.name))})]})})})})}function hse({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=k.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return h.jsxs(ms,{title:"Facilities",period:"Today",icon:h.jsx(Gb,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:h.jsx($l,{widgetId:t?.widget_id,options:t?.communities}),children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),h.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),h.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),h.jsx("div",{className:"w-full h-[170px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(l1,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[h.jsx(fr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),h.jsx(Gn,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),h.jsx($n,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx($n,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(kt,{cursor:{stroke:"transparent"},wrapperStyle:{outline:"none"},allowEscapeViewBox:{x:!0,y:!0},content:Au({data:a})}),h.jsx(Zo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),h.jsx(Zo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function mse({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return h.jsx(ms,{title:"Income",period:"This Month",icon:h.jsx(zf,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:h.jsx($l,{widgetId:e?.widget_id,options:e?.communities}),children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Income"}),h.jsx("div",{children:"Collection"}),h.jsx("div",{children:"Closing"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-[8px]",children:[h.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),h.jsx("div",{children:a(t.income,t?.currency_type)}),h.jsx("div",{children:a(t.collection,t?.currency_type)}),h.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),h.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsx(zf,{className:"!text-[24px] text-red-600"}),h.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Expenditure"}),h.jsx("div",{children:"Payment"}),h.jsx("div",{children:"Outstanding"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[h.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),h.jsx("div",{children:a(n.expenditure,n?.currency_type)}),h.jsx("div",{children:a(n.payment,n?.currency_type)}),h.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var gse="tippy-content",vse="tippy-backdrop",yse="tippy-arrow",bse="tippy-svg-arrow",Ra={passive:!0,capture:!0},zR=function(){return document.body};function xse(e,t){return{}.hasOwnProperty.call(e,t)}function Sv(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function x1(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function VR(e,t){return typeof e=="function"?e.apply(void 0,t):e}function PC(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function wse(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function _se(e){return e.split(/\s+/).filter(Boolean)}function Bs(e){return[].concat(e)}function DC(e,t){e.indexOf(t)===-1&&e.push(t)}function Ese(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Sse(e){return e.split("-")[0]}function Mp(e){return[].slice.call(e)}function AC(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Ose(){return document.createElement("div")}function cb(e){return["Element","Fragment"].some(function(t){return x1(e,t)})}function Cse(e){return x1(e,"NodeList")}function kse(e){return x1(e,"MouseEvent")}function Pse(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Dse(e){return cb(e)?[e]:Cse(e)?Mp(e):Array.isArray(e)?e:Mp(document.querySelectorAll(e))}function Ov(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function TC(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Ase(e){var t,n=Bs(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Tse(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=Sse(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function Cv(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function NC(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var wi={isTouch:!1},jC=0;function Nse(){wi.isTouch||(wi.isTouch=!0,window.performance&&document.addEventListener("mousemove",HR))}function HR(){var e=performance.now();e-jC<20&&(wi.isTouch=!1,document.removeEventListener("mousemove",HR)),jC=e}function jse(){var e=document.activeElement;if(Pse(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Mse(){document.addEventListener("touchstart",Nse,Ra),window.addEventListener("blur",jse)}var Rse=typeof window<"u"&&typeof document<"u",Ise=Rse?!!window.msCrypto:!1;function js(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function MC(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Fse(e){return MC(`
263
263
  %ctippy.js
264
264
 
265
265
  %c`+MC(e)+`
@@ -268,7 +268,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
268
268
  `)}function YR(e){return[Fse(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var du;process.env.NODE_ENV!=="production"&&Lse();function Lse(){du=new Set}function Ji(e,t){if(e&&!du.has(t)){var n;du.add(t),(n=console).warn.apply(n,YR(t))}}function ub(e,t){if(e&&!du.has(t)){var n;du.add(t),(n=console).error.apply(n,YR(t))}}function $se(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;ub(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),ub(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var UR={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Bse={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},_r=Object.assign({appendTo:zR,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},UR,Bse),Wse=Object.keys(_r),zse=function(t){process.env.NODE_ENV!=="production"&&qR(t,[]);var n=Object.keys(t);n.forEach(function(r){_r[r]=t[r]})};function KR(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,a=i.defaultValue;if(o){var s;r[o]=e[o]!==void 0?e[o]:(s=_r[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function Vse(e,t){var n=t?Object.keys(KR(Object.assign({},_r,{plugins:t}))):Wse,r=n.reduce(function(i,o){var a=(e.getAttribute("data-tippy-"+o)||"").trim();if(!a)return i;if(o==="content")i[o]=a;else try{i[o]=JSON.parse(a)}catch{i[o]=a}return i},{});return r}function RC(e,t){var n=Object.assign({},t,{content:VR(t.content,[e])},t.ignoreAttributes?{}:Vse(e,t.plugins));return n.aria=Object.assign({},_r.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function qR(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=wse(_r,Object.keys(UR)),o=!xse(i,r);o&&(o=t.filter(function(a){return a.name===r}).length===0),Ji(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
269
269
 
270
270
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
271
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function IC(e){var t=e.firstElementChild,n=Mp(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(gse)}),arrow:n.find(function(r){return r.classList.contains(yse)||r.classList.contains(bse)}),backdrop:n.find(function(r){return r.classList.contains(vse)})}}var Hse=1,Vd=[],kv=[];function Yse(e,t){var n=RC(e,Object.assign({},_r,KR(AC(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=PC(oe,n.interactiveDebounce),g,v=Hse++,x=null,_=Ese(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:e,popper:Ose(),popperInstance:x,props:n,state:w,plugins:_,clearDelayTimeouts:Jt,setProps:un,setContent:Cn,show:Ht,hide:kn,hideWithInteractivity:ye,enable:dt,disable:cn,unmount:dn,destroy:Yt};if(!n.render)return process.env.NODE_ENV!=="production"&&ub(!0,"render() function has not been supplied."),y;var E=n.render(y),S=E.popper,P=E.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+y.id,y.popper=S,e._tippy=y,S._tippy=y;var D=_.map(function(F){return F.fn(y)}),T=e.hasAttribute("aria-expanded");return Z(),W(),B(),V("onCreate",[y]),n.showOnCreate&&bt(),S.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&N().addEventListener("mousemove",m)}),y;function R(){var F=y.props.touch;return Array.isArray(F)?F:[F,0]}function A(){return R()[0]==="hold"}function C(){var F;return!!((F=y.props.render)!=null&&F.$$tippy)}function j(){return g||e}function N(){var F=j().parentNode;return F?Ase(F):document}function M(){return IC(S)}function L(F){return y.state.isMounted&&!y.state.isVisible||wi.isTouch||u&&u.type==="focus"?0:Sv(y.props.delay,F?0:1,_r.delay)}function B(F){F===void 0&&(F=!1),S.style.pointerEvents=y.props.interactive&&!F?"":"none",S.style.zIndex=""+y.props.zIndex}function V(F,q,H){if(H===void 0&&(H=!0),D.forEach(function(ne){ne[F]&&ne[F].apply(ne,q)}),H){var ee;(ee=y.props)[F].apply(ee,q)}}function z(){var F=y.props.aria;if(F.content){var q="aria-"+F.content,H=S.id,ee=Bs(y.props.triggerTarget||e);ee.forEach(function(ne){var _e=ne.getAttribute(q);if(y.state.isVisible)ne.setAttribute(q,_e?_e+" "+H:H);else{var Oe=_e&&_e.replace(H,"").trim();Oe?ne.setAttribute(q,Oe):ne.removeAttribute(q)}})}}function W(){if(!(T||!y.props.aria.expanded)){var F=Bs(y.props.triggerTarget||e);F.forEach(function(q){y.props.interactive?q.setAttribute("aria-expanded",y.state.isVisible&&q===j()?"true":"false"):q.removeAttribute("aria-expanded")})}}function Q(){N().removeEventListener("mousemove",m),Vd=Vd.filter(function(F){return F!==m})}function X(F){if(!(wi.isTouch&&(l||F.type==="mousedown"))){var q=F.composedPath&&F.composedPath()[0]||F.target;if(!(y.props.interactive&&NC(S,q))){if(Bs(y.props.triggerTarget||e).some(function(H){return NC(H,q)})){if(wi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[y,F]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||ae())}}}function ie(){l=!0}function J(){l=!1}function re(){var F=N();F.addEventListener("mousedown",X,!0),F.addEventListener("touchend",X,Ra),F.addEventListener("touchstart",J,Ra),F.addEventListener("touchmove",ie,Ra)}function ae(){var F=N();F.removeEventListener("mousedown",X,!0),F.removeEventListener("touchend",X,Ra),F.removeEventListener("touchstart",J,Ra),F.removeEventListener("touchmove",ie,Ra)}function le(F,q){K(F,function(){!y.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&q()})}function ue(F,q){K(F,q)}function K(F,q){var H=M().box;function ee(ne){ne.target===H&&(Cv(H,"remove",ee),q())}if(F===0)return q();Cv(H,"remove",d),Cv(H,"add",ee),d=ee}function U(F,q,H){H===void 0&&(H=!1);var ee=Bs(y.props.triggerTarget||e);ee.forEach(function(ne){ne.addEventListener(F,q,H),p.push({node:ne,eventType:F,handler:q,options:H})})}function Z(){A()&&(U("touchstart",me,{passive:!0}),U("touchend",ve,{passive:!0})),_se(y.props.trigger).forEach(function(F){if(F!=="manual")switch(U(F,me),F){case"mouseenter":U("mouseleave",ve);break;case"focus":U(Ise?"focusout":"blur",we);break;case"focusin":U("focusout",we);break}})}function I(){p.forEach(function(F){var q=F.node,H=F.eventType,ee=F.handler,ne=F.options;q.removeEventListener(H,ee,ne)}),p=[]}function me(F){var q,H=!1;if(!(!y.state.isEnabled||Ne(F)||s)){var ee=((q=u)==null?void 0:q.type)==="focus";u=F,g=F.currentTarget,W(),!y.state.isVisible&&kse(F)&&Vd.forEach(function(ne){return ne(F)}),F.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==!1&&y.state.isVisible?H=!0:bt(F),F.type==="click"&&(a=!H),H&&!ee&&xt(F)}}function oe(F){var q=F.target,H=j().contains(q)||S.contains(q);if(!(F.type==="mousemove"&&H)){var ee=je().concat(S).map(function(ne){var _e,Oe=ne._tippy,en=(_e=Oe.popperInstance)==null?void 0:_e.state;return en?{popperRect:ne.getBoundingClientRect(),popperState:en,props:n}:null}).filter(Boolean);Tse(ee,F)&&(Q(),xt(F))}}function ve(F){var q=Ne(F)||y.props.trigger.indexOf("click")>=0&&a;if(!q){if(y.props.interactive){y.hideWithInteractivity(F);return}xt(F)}}function we(F){y.props.trigger.indexOf("focusin")<0&&F.target!==j()||y.props.interactive&&F.relatedTarget&&S.contains(F.relatedTarget)||xt(F)}function Ne(F){return wi.isTouch?A()!==F.type.indexOf("touch")>=0:!1}function qe(){ut();var F=y.props,q=F.popperOptions,H=F.placement,ee=F.offset,ne=F.getReferenceClientRect,_e=F.moveTransition,Oe=C()?IC(S).arrow:null,en=ne?{getBoundingClientRect:ne,contextElement:ne.contextElement||j()}:e,Jr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Xn){var vn=Xn.state;if(C()){var be=M(),tn=be.box;["placement","reference-hidden","escaped"].forEach(function(ti){ti==="placement"?tn.setAttribute("data-placement",vn.placement):vn.attributes.popper["data-popper-"+ti]?tn.setAttribute("data-"+ti,""):tn.removeAttribute("data-"+ti)}),vn.attributes.popper={}}}},Ut=[{name:"offset",options:{offset:ee}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!_e}},Jr];C()&&Oe&&Ut.push({name:"arrow",options:{element:Oe,padding:3}}),Ut.push.apply(Ut,q?.modifiers||[]),y.popperInstance=a0(en,S,Object.assign({},q,{placement:H,onFirstUpdate:f,modifiers:Ut}))}function ut(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function ot(){var F=y.props.appendTo,q,H=j();y.props.interactive&&F===zR||F==="parent"?q=H.parentNode:q=VR(F,[H]),q.contains(S)||q.appendChild(S),y.state.isMounted=!0,qe(),process.env.NODE_ENV!=="production"&&Ji(y.props.interactive&&F===_r.appendTo&&H.nextElementSibling!==S,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
271
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function IC(e){var t=e.firstElementChild,n=Mp(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(gse)}),arrow:n.find(function(r){return r.classList.contains(yse)||r.classList.contains(bse)}),backdrop:n.find(function(r){return r.classList.contains(vse)})}}var Hse=1,Vd=[],kv=[];function Yse(e,t){var n=RC(e,Object.assign({},_r,KR(AC(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=PC(oe,n.interactiveDebounce),g,v=Hse++,x=null,_=Ese(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:e,popper:Ose(),popperInstance:x,props:n,state:w,plugins:_,clearDelayTimeouts:Jt,setProps:un,setContent:Cn,show:Ht,hide:kn,hideWithInteractivity:ye,enable:dt,disable:cn,unmount:dn,destroy:Yt};if(!n.render)return process.env.NODE_ENV!=="production"&&ub(!0,"render() function has not been supplied."),y;var E=n.render(y),S=E.popper,P=E.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+y.id,y.popper=S,e._tippy=y,S._tippy=y;var D=_.map(function(F){return F.fn(y)}),T=e.hasAttribute("aria-expanded");return Z(),W(),B(),V("onCreate",[y]),n.showOnCreate&&bt(),S.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&N().addEventListener("mousemove",m)}),y;function R(){var F=y.props.touch;return Array.isArray(F)?F:[F,0]}function A(){return R()[0]==="hold"}function C(){var F;return!!((F=y.props.render)!=null&&F.$$tippy)}function j(){return g||e}function N(){var F=j().parentNode;return F?Ase(F):document}function M(){return IC(S)}function L(F){return y.state.isMounted&&!y.state.isVisible||wi.isTouch||u&&u.type==="focus"?0:Sv(y.props.delay,F?0:1,_r.delay)}function B(F){F===void 0&&(F=!1),S.style.pointerEvents=y.props.interactive&&!F?"":"none",S.style.zIndex=""+y.props.zIndex}function V(F,q,H){if(H===void 0&&(H=!0),D.forEach(function(ne){ne[F]&&ne[F].apply(ne,q)}),H){var ee;(ee=y.props)[F].apply(ee,q)}}function z(){var F=y.props.aria;if(F.content){var q="aria-"+F.content,H=S.id,ee=Bs(y.props.triggerTarget||e);ee.forEach(function(ne){var _e=ne.getAttribute(q);if(y.state.isVisible)ne.setAttribute(q,_e?_e+" "+H:H);else{var Oe=_e&&_e.replace(H,"").trim();Oe?ne.setAttribute(q,Oe):ne.removeAttribute(q)}})}}function W(){if(!(T||!y.props.aria.expanded)){var F=Bs(y.props.triggerTarget||e);F.forEach(function(q){y.props.interactive?q.setAttribute("aria-expanded",y.state.isVisible&&q===j()?"true":"false"):q.removeAttribute("aria-expanded")})}}function Q(){N().removeEventListener("mousemove",m),Vd=Vd.filter(function(F){return F!==m})}function G(F){if(!(wi.isTouch&&(l||F.type==="mousedown"))){var q=F.composedPath&&F.composedPath()[0]||F.target;if(!(y.props.interactive&&NC(S,q))){if(Bs(y.props.triggerTarget||e).some(function(H){return NC(H,q)})){if(wi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[y,F]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||ae())}}}function ie(){l=!0}function J(){l=!1}function re(){var F=N();F.addEventListener("mousedown",G,!0),F.addEventListener("touchend",G,Ra),F.addEventListener("touchstart",J,Ra),F.addEventListener("touchmove",ie,Ra)}function ae(){var F=N();F.removeEventListener("mousedown",G,!0),F.removeEventListener("touchend",G,Ra),F.removeEventListener("touchstart",J,Ra),F.removeEventListener("touchmove",ie,Ra)}function le(F,q){K(F,function(){!y.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&q()})}function ue(F,q){K(F,q)}function K(F,q){var H=M().box;function ee(ne){ne.target===H&&(Cv(H,"remove",ee),q())}if(F===0)return q();Cv(H,"remove",d),Cv(H,"add",ee),d=ee}function U(F,q,H){H===void 0&&(H=!1);var ee=Bs(y.props.triggerTarget||e);ee.forEach(function(ne){ne.addEventListener(F,q,H),p.push({node:ne,eventType:F,handler:q,options:H})})}function Z(){A()&&(U("touchstart",me,{passive:!0}),U("touchend",ve,{passive:!0})),_se(y.props.trigger).forEach(function(F){if(F!=="manual")switch(U(F,me),F){case"mouseenter":U("mouseleave",ve);break;case"focus":U(Ise?"focusout":"blur",we);break;case"focusin":U("focusout",we);break}})}function I(){p.forEach(function(F){var q=F.node,H=F.eventType,ee=F.handler,ne=F.options;q.removeEventListener(H,ee,ne)}),p=[]}function me(F){var q,H=!1;if(!(!y.state.isEnabled||Ne(F)||s)){var ee=((q=u)==null?void 0:q.type)==="focus";u=F,g=F.currentTarget,W(),!y.state.isVisible&&kse(F)&&Vd.forEach(function(ne){return ne(F)}),F.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==!1&&y.state.isVisible?H=!0:bt(F),F.type==="click"&&(a=!H),H&&!ee&&xt(F)}}function oe(F){var q=F.target,H=j().contains(q)||S.contains(q);if(!(F.type==="mousemove"&&H)){var ee=je().concat(S).map(function(ne){var _e,Oe=ne._tippy,en=(_e=Oe.popperInstance)==null?void 0:_e.state;return en?{popperRect:ne.getBoundingClientRect(),popperState:en,props:n}:null}).filter(Boolean);Tse(ee,F)&&(Q(),xt(F))}}function ve(F){var q=Ne(F)||y.props.trigger.indexOf("click")>=0&&a;if(!q){if(y.props.interactive){y.hideWithInteractivity(F);return}xt(F)}}function we(F){y.props.trigger.indexOf("focusin")<0&&F.target!==j()||y.props.interactive&&F.relatedTarget&&S.contains(F.relatedTarget)||xt(F)}function Ne(F){return wi.isTouch?A()!==F.type.indexOf("touch")>=0:!1}function qe(){ut();var F=y.props,q=F.popperOptions,H=F.placement,ee=F.offset,ne=F.getReferenceClientRect,_e=F.moveTransition,Oe=C()?IC(S).arrow:null,en=ne?{getBoundingClientRect:ne,contextElement:ne.contextElement||j()}:e,Jr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Xn){var vn=Xn.state;if(C()){var be=M(),tn=be.box;["placement","reference-hidden","escaped"].forEach(function(ti){ti==="placement"?tn.setAttribute("data-placement",vn.placement):vn.attributes.popper["data-popper-"+ti]?tn.setAttribute("data-"+ti,""):tn.removeAttribute("data-"+ti)}),vn.attributes.popper={}}}},Ut=[{name:"offset",options:{offset:ee}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!_e}},Jr];C()&&Oe&&Ut.push({name:"arrow",options:{element:Oe,padding:3}}),Ut.push.apply(Ut,q?.modifiers||[]),y.popperInstance=a0(en,S,Object.assign({},q,{placement:H,onFirstUpdate:f,modifiers:Ut}))}function ut(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function ot(){var F=y.props.appendTo,q,H=j();y.props.interactive&&F===zR||F==="parent"?q=H.parentNode:q=VR(F,[H]),q.contains(S)||q.appendChild(S),y.state.isMounted=!0,qe(),process.env.NODE_ENV!=="production"&&Ji(y.props.interactive&&F===_r.appendTo&&H.nextElementSibling!==S,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
272
272
 
273
273
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
274
274
 
@@ -294,9 +294,9 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
294
294
  * https://www.chartjs.org
295
295
  * (c) 2025 Chart.js Contributors
296
296
  * Released under the MIT License
297
- */class Zce{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=lI.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Xi=new Zce;const lk="transparent",Jce={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=QC(e||lk),i=r.valid&&QC(t||lk);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class eue{constructor(t,n,r,i){const o=n[r];i=qd([t.to,i,o,t.from]);const a=qd([t.from,o,i]);this._active=!0,this._fn=t.fn||Jce[t.type||typeof a],this._easing=Fc[t.easing]||Fc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=qd([t.to,n,i,t.from]),this._from=qd([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class _I{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Re(t))return;const n=Object.keys(Bt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Re(o))return;const a={};for(const s of n)a[s]=o[s];(pn(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=nue(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&tue(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new eue(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Xi.add(this._chart,r),!0}}function tue(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function nue(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function ck(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function rue(e,t,n){if(n===!1)return!1;const r=ck(e,n),i=ck(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function iue(e){let t,n,r,i;return Re(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function EI(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function uk(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],Kr(c)&&(o||t===0||ji(t)===ji(c))&&(t+=c)}return!u&&!r.all?0:t}function oue(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"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]={[i]:u,[o]:e[u]};return s}function Nv(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function aue(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function sue(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function lue(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function dk(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function fk(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=aue(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:g,[c]:v}=m,x=m._stacks||(m._stacks={});f=x[c]=lue(i,u,g),f[s]=v,f._top=dk(f,a,!0,r.type),f._bottom=dk(f,a,!1,r.type);const _=f._visualValues||(f._visualValues={});_[s]=v}}function jv(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function cue(e,t){return bs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function uue(e,t,n){return bs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function dc(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const Mv=e=>e==="reset"||e==="none",pk=(e,t)=>t?e:Object.assign({},e),due=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:EI(n,!0),values:null};class fm{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Nv(t.vScale,t),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(t){this.index!==t&&dc(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Se(r.xAxisID,jv(t,"x")),a=n.yAxisID=Se(r.yAxisID,jv(t,"y")),s=n.rAxisID=Se(r.rAxisID,jv(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&qC(this._data,this),t._stacked&&dc(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Re(n)){const i=this._cachedMeta;this._data=oue(n,i)}else if(r!==n){if(r){qC(r,this);const i=this._cachedMeta;dc(i),i._parsed=[]}n&&Object.isExtensible(n)&&Hle(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=Nv(n.vScale,n),n.stack!==r.stack&&(i=!0,dc(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(fk(this,n._parsed),n._stacked=Nv(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{pn(i[t])?f=this.parseArrayData(r,i,t,n):Re(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}a&&fk(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:a}=t,s=o.axis,l=a.axis,c=o.getLabels(),u=o===a,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+r,d[f]={[s]:u||o.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],s[l]={x:o.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:o,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(fs(p,s),f),y:a.parse(fs(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,a=n[t.axis],s={keys:EI(i,!0),values:n._stacks[t.axis]._visualValues};return uk(s,a,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,a=uk(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,a=i.length,s=this._getOtherScale(t),l=due(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=sue(s);let f,p;function m(){p=i[f];const g=p[s.axis];return!Kr(p[t.axis])||u>g||d<g}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][t.axis],Kr(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=iue(Se(this.options.clip,rue(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=uue(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=cue(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=t+"-"+n,s=o[a],l=this.enableOptionSharing&&hu(r);if(s)return pk(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Bt.elements[t]),m=()=>this.getContext(r,i,n),g=c.resolveNamedOptions(f,p,m,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(pk(g,l))),g}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new _I(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Mv(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){Mv(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Mv(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&dc(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function fue(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=sI(r.sort((i,o)=>i-o))}return e._cache.$bar}function pue(e){const t=e.iScale,n=fue(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(hu(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i<o;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return r}function hue(e,t,n,r){const i=n.barThickness;let o,a;return Ke(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}function mue(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=o-(s===null?t.end-t.start:s-o)),s===null&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}function gue(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);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:i,end:o,min:a,max:s}}function SI(e,t,n,r){return pn(e)?gue(e,t,n,r):t[n.axis]=n.parse(e,r),t}function hk(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(SI(f,d,o,c));return l}function Rv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function vue(e,t,n){return e!==0?ji(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function yue(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function bue(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=yue(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[mk(u,a,s,l)]=!0,i=c)),o[mk(i,a,s,l)]=!0,e.borderSkipped=o}function mk(e,t,n,r){return r?(e=xue(e,t,n),e=gk(e,n,t)):e=gk(e,t,n),e}function xue(e,t,n){return e===t?n:e===n?t:e}function gk(e,t,n){return e==="start"?t:e==="end"?n:e}function wue(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class _ue extends fm{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,i){return hk(t,n,r,i)}parseArrayData(t,n,r,i){return hk(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let f,p,m,g;for(f=r,p=r+i;f<p;++f)g=n[f],m={},m[o.axis]=o.parse(fs(g,c),f),d.push(SI(fs(g,u),m,a,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),a=o._custom,s=Rv(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const m=this.getParsed(p),g=o||Ke(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,u),x=(m._stacks||{})[s.axis],_={horizontal:c,base:g.base,enableBorderRadius:!x||Rv(m._custom)||a===x._top||a===x._bottom,x:c?g.head:v.center,y:c?v.center:g.head,height:c?v.size:Math.abs(g.size),width:c?Math.abs(g.size):v.size};f&&(_.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=_.options||t[p].options;bue(_,w,x,a),wue(_,w,u.ratio),this.updateElement(t[p],p,_,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const d=u._parsed.find(p=>p[r.axis]===l),f=d&&d[u.vScale.axis];if(Ke(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Se(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||pue(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,s=o||0,l=this.getParsed(t),c=l._custom,u=Rv(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,g;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&ji(d)!==ji(c.barEnd)&&(f=0),f+=d);const v=!Ke(o)&&!u?o:f;let x=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=x,g=m-x,Math.abs(g)<a){g=vue(g,n,s)*a,d===s&&(x-=g/2);const _=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),y=Math.min(_,w),E=Math.max(_,w);x=Math.max(Math.min(x,E),y),m=x+g,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(x))}if(x===n.getPixelForValue(s)){const _=ji(g)*n.getLineWidthForValue(s)/2;x+=_,g-=_}return{size:g,base:x,head:m,center:m+g/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,a=Se(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?mue(t,n,i,u*c):hue(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Se(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(a,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function Eue(e,t,n){let r=1,i=1,o=0,a=0;if(t<Mt){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,y,E)=>gu(w,s,l,!0)?1:Math.max(y,y*n,E,E*n),m=(w,y,E)=>gu(w,s,l,!0)?-1:Math.min(y,y*n,E,E*n),g=p(0,c,d),v=p(rn,u,f),x=m(st,c,d),_=m(st+rn,u,f);r=(g-x)/2,i=(v-_)/2,o=-(g+x)/2,a=-(v+_)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class Sue extends fm{static id="doughnut";static 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"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Re(r[t])){const{key:l="value"}=this._parsing;o=c=>+fs(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return lo(this.options.rotation-90)}_getCircumference(){return lo(this.options.circumference)}_getRotationExtents(){let t=Mt,n=-Mt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(kle(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:g}=Eue(d,u,l),v=(r.width-a)/f,x=(r.height-a)/p,_=Math.max(Math.min(v,x)/2,0),w=nI(this.options.radius,_),y=Math.max(w*l,0),E=(w-y)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=g*w,i.total=this.calculateTotal(),this.outerRadius=w-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/Mt)}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.chartArea,c=a.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:g,includeOptions:v}=this._getSharedOptions(n,i);let x=this._getRotation(),_;for(_=0;_<n;++_)x+=this._circumference(_,o);for(_=n;_<n+r;++_){const w=this._circumference(_,o),y=t[_],E={x:u+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+w,circumference:w,outerRadius:m,innerRadius:p};v&&(E.options=g||this.resolveDataElementOptions(_,y.active?"active":i)),x+=w,this.updateElement(y,_,E,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Mt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=k1(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,s=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Se(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Oue extends fm{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=Kle(n,i,a);this._drawStart=s,this._drawCount=l,qle(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=a.axis,p=s.axis,{spanGaps:m,segment:g}=this.options,v=mu(m)?m:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||i==="none",_=n+r,w=t.length;let y=n>0&&this.getParsed(n-1);for(let E=0;E<w;++E){const S=t[E],P=x?S:{};if(E<n||E>=_){P.skip=!0;continue}const D=this.getParsed(E),T=Ke(D[p]),R=P[f]=a.getPixelForValue(D[f],E),A=P[p]=o||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],E);P.skip=isNaN(R)||isNaN(A)||T,P.stop=E>0&&Math.abs(D[f]-y[f])>v,g&&(P.parsed=D,P.raw=c.data[E]),d&&(P.options=u||this.resolveDataElementOptions(E,S.active?"active":i)),x||this.updateElement(S,E,P,i),y=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function Oa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class I1{static override(t){Object.assign(I1.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Oa()}parse(){return Oa()}format(){return Oa()}add(){return Oa()}diff(){return Oa()}startOf(){return Oa()}endOf(){return Oa()}}var Cue={_date:I1};function kue(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const c=s._reversePixels?zle:Ua;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),p=c(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,p=f.slice(0,u.lo+1).reverse().findIndex(g=>!Ke(g[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(g=>!Ke(g[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function pm(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:c,data:u}=o[s],{lo:d,hi:f}=kue(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function Pue(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Iv(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||pm(e,n,t,function(s,l,c){!i&&!vu(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function Due(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=oI(a,{x:t.x,y:t.y});gu(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return pm(e,n,t,o),i}function Aue(e,t,n,r,i,o){let a=[];const s=Pue(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const v=s(t,m);v<l?(a=[{element:u,datasetIndex:d,index:f}],l=v):v===l&&a.push({element:u,datasetIndex:d,index:f})}return pm(e,n,t,c),a}function Fv(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?Due(e,t,n,i):Aue(e,t,n,r,i,o)}function vk(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return pm(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var Tue={modes:{index(e,t,n,r){const i=Ia(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?Iv(e,i,o,r,a):Fv(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=Ia(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?Iv(e,i,o,r,a):Fv(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,n,r){const i=Ia(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Iv(e,i,o,r,a)},nearest(e,t,n,r){const i=Ia(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Fv(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=Ia(t,e);return vk(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Ia(t,e);return vk(e,i,"y",n.intersect,r)}}};const OI=["left","top","right","bottom"];function fc(e,t){return e.filter(n=>n.pos===t)}function yk(e,t){return e.filter(n=>OI.indexOf(n.pos)===-1&&n.box.axis===t)}function pc(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Nue(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return t}function jue(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!OI.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Mue(e,t){const n=jue(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,a,s;for(o=0,a=e.length;o<a;++o){s=e[o];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function Rue(e){const t=Nue(e),n=pc(t.filter(c=>c.box.fullSize),!0),r=pc(fc(t,"left"),!0),i=pc(fc(t,"right")),o=pc(fc(t,"top"),!0),a=pc(fc(t,"bottom")),s=yk(t,"x"),l=yk(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:fc(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function bk(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function CI(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 Iue(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Re(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&CI(a,o.getPadding());const s=Math.max(0,t.outerWidth-bk(a,e,"left","right")),l=Math.max(0,t.outerHeight-bk(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 Fue(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Lue(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function Cc(e,t,n,r){const i=[];let o,a,s,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){s=e[o],l=s.box,l.update(s.width||t.w,s.height||t.h,Lue(s.horizontal,t));const{same:d,other:f}=Iue(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&Cc(i,t,n,r)||u}function Zd(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function xk(e,t,n,r){const i=n.padding;let{x:o,y:a}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,f=c.size||l.height;hu(c.start)&&(a=c.start),l.fullSize?Zd(l,i.left,a,n.outerWidth-i.right-i.left,f):Zd(l,t.left+c.placed,a,d,f),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,f=c.size||l.width;hu(c.start)&&(o=c.start),l.fullSize?Zd(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Zd(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var Uo={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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&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 i=si(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=Rue(e.boxes),l=s.vertical,c=s.horizontal;Ze(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=l.reduce((g,v)=>v.box.options&&v.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},i);CI(f,si(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=Mue(l.concat(c),d);Cc(s.fullSize,p,d,m),Cc(l,p,d,m),Cc(c,p,d,m)&&Cc(l,p,d,m),Fue(p),xk(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,xk(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ze(s.chartArea,g=>{const v=g.box;Object.assign(v,e.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class kI{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class $ue extends kI{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wf="$chartjs",Bue={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wk=e=>e===null||e==="";function Wue(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[wf]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",wk(i)){const o=ik(e,"width");o!==void 0&&(e.width=o)}if(wk(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=ik(e,"height");o!==void 0&&(e.height=o)}return e}const PI=Fce?{passive:!0}:!1;function zue(e,t,n){e&&e.addEventListener(t,n,PI)}function Vue(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,PI)}function Hue(e,t){const n=Bue[e.type]||e.type,{x:r,y:i}=Ia(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Wp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Yue(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Wp(s.addedNodes,r),a=a&&!Wp(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Uue(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Wp(s.removedNodes,r),a=a&&!Wp(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const yu=new Map;let _k=0;function DI(){const e=window.devicePixelRatio;e!==_k&&(_k=e,yu.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Kue(e,t){yu.size||window.addEventListener("resize",DI),yu.set(e,t)}function que(e){yu.delete(e),yu.size||window.removeEventListener("resize",DI)}function Gue(e,t,n){const r=e.canvas,i=r&&R1(r);if(!i)return;const o=cI((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),Kue(e,o),a}function Lv(e,t,n){n&&n.disconnect(),t==="resize"&&que(e)}function Xue(e,t,n){const r=e.canvas,i=cI(o=>{e.ctx!==null&&n(Hue(o,e))},e);return zue(r,t,i),i}class Que extends kI{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Wue(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[wf])return!1;const r=n[wf].initial;["height","width"].forEach(o=>{const a=r[o];Ke(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[wf],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:Yue,detach:Uue,resize:Gue}[n]||Xue;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Lv,detach:Lv,resize:Lv}[n]||Vue)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Ice(t,n,r,i)}isAttached(t){const n=t&&R1(t);return!!(n&&n.isConnected)}}function Zue(e){return!M1()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?$ue:Que}let va=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return mu(this.x)&&mu(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function Jue(e,t){const n=e.options.ticks,r=ede(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?nde(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return rde(t,c,o,a/i),c;const u=tde(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(Jd(t,c,u,Ke(p)?0:s-p,s),d=0,f=a-1;d<f;d++)Jd(t,c,u,o[d],o[d+1]);return Jd(t,c,u,l,Ke(p)?t.length:l+p),c}return Jd(t,c,u),c}function ede(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function tde(e,t,n){const r=ide(e),i=t.length/n;if(!r)return Math.max(i,1);const o=Rle(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function nde(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function rde(e,t,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=n[i*r])}function Jd(e,t,n,r,i){const o=Se(r,0),a=Math.min(Se(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)s++,u=Math.round(o+s*n);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(o+s*n))}function ide(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}const ode=e=>e==="left"?"right":e==="right"?"left":e,Ek=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Sk=(e,t)=>Math.min(t||e,e);function Ok(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function ade(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-s||l>a+s)))return l}function sde(e,t){Ze(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function hc(e){return e.drawTicks?e.tickLength:0}function Ck(e,t){if(!e.display)return 0;const n=sr(e.font,t),r=si(e.padding);return(pn(e.text)?e.text.length:1)*n.lineHeight+r.height}function lde(e,t){return bs(e,{scale:t,type:"scale"})}function cde(e,t,n){return bs(e,{tick:n,index:t,type:"tick"})}function ude(e,t,n){let r=uI(e);return(n&&t!=="right"||!n&&t==="right")&&(r=ode(r)),r}function dde(e,t,n,r){const{top:i,left:o,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const g=a-i,v=s-o;if(e.isHorizontal()){if(p=mr(r,o,s),Re(n)){const x=Object.keys(n)[0],_=n[x];m=u[x].getPixelForValue(_)+g-t}else n==="center"?m=(c.bottom+c.top)/2+g-t:m=Ek(e,n,t);f=s-o}else{if(Re(n)){const x=Object.keys(n)[0],_=n[x];p=u[x].getPixelForValue(_)-v+t}else n==="center"?p=(c.left+c.right)/2-v+t:p=Ek(e,n,t);m=mr(r,a,i),d=n==="left"?-rn:rn}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class Bl extends va{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.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(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=pi(t,Number.POSITIVE_INFINITY),n=pi(n,Number.NEGATIVE_INFINITY),r=pi(r,Number.POSITIVE_INFINITY),i=pi(i,Number.NEGATIVE_INFINITY),{min:pi(t,r),max:pi(n,i),minDefined:Kr(t),maxDefined:Kr(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:pi(n,pi(r,n)),max:pi(r,pi(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 t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ht(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=hce(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Ok(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Jue(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ht(this.options.afterUpdate,[this])}beforeSetDimensions(){ht(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(){ht(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ht(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ht(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=ht(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ht(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ht(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Sk(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=Mn(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(t.offset?.5:1)),l=this.maxHeight-hc(t.grid)-n.padding-Ck(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=$le(Math.min(Math.asin(Mn((u.highest.height+6)/s,-1,1)),Math.asin(Mn(l/c,-1,1))-Math.asin(Mn(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){ht(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ht(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Ck(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=hc(o)+l):(t.height=this.maxHeight,t.width=hc(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=lo(this.labelRotation),g=Math.cos(m),v=Math.sin(m);if(s){const x=r.mirror?0:v*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+x+p)}else{const x=r.mirror?0:g*d.width+v*f.height;t.width=Math.min(this.maxWidth,t.width+x+p)}this._calculatePadding(c,u,v,g)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_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(){ht(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ke(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Ok(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],s=[],l=Math.floor(n/Sk(n,r));let c=0,u=0,d,f,p,m,g,v,x,_,w,y,E;for(d=0;d<n;d+=l){if(m=t[d].label,g=this._resolveTickFontOptions(d),i.font=v=g.string,x=o[v]=o[v]||{data:{},gc:[]},_=g.lineHeight,w=y=0,!Ke(m)&&!pn(m))w=JC(i,x.data,x.gc,w,m),y=_;else if(pn(m))for(f=0,p=m.length;f<p;++f)E=m[f],!Ke(E)&&!pn(E)&&(w=JC(i,x.data,x.gc,w,E),y+=_);a.push(w),s.push(y),c=Math.max(w,c),u=Math.max(y,u)}sde(o,n);const S=a.indexOf(c),P=s.indexOf(u),D=T=>({width:a[T]||0,height:s[T]||0});return{first:D(0),last:D(n-1),widest:D(S),highest:D(P),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Wle(this._alignToPixels?Sa(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=cde(this.getContext(),t,r))}return this.$context||(this.$context=lde(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=lo(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=hc(o),p=[],m=s.setContext(this.getContext()),g=m.display?m.width:0,v=g/2,x=function(L){return Sa(r,L,g)};let _,w,y,E,S,P,D,T,R,A,C,j;if(a==="top")_=x(this.bottom),P=this.bottom-f,T=_-v,A=x(t.top)+v,j=t.bottom;else if(a==="bottom")_=x(this.top),A=t.top,j=x(t.bottom)-v,P=_+v,T=this.top+f;else if(a==="left")_=x(this.right),S=this.right-f,D=_-v,R=x(t.left)+v,C=t.right;else if(a==="right")_=x(this.left),R=t.left,C=x(t.right)-v,S=_+v,D=this.left+f;else if(n==="x"){if(a==="center")_=x((t.top+t.bottom)/2+.5);else if(Re(a)){const L=Object.keys(a)[0],B=a[L];_=x(this.chart.scales[L].getPixelForValue(B))}A=t.top,j=t.bottom,P=_+v,T=P+f}else if(n==="y"){if(a==="center")_=x((t.left+t.right)/2);else if(Re(a)){const L=Object.keys(a)[0],B=a[L];_=x(this.chart.scales[L].getPixelForValue(B))}S=_-v,D=S-f,R=t.left,C=t.right}const N=Se(i.ticks.maxTicksLimit,d),M=Math.max(1,Math.ceil(d/N));for(w=0;w<d;w+=M){const L=this.getContext(w),B=o.setContext(L),V=s.setContext(L),z=B.lineWidth,W=B.color,Q=V.dash||[],X=V.dashOffset,ie=B.tickWidth,J=B.tickColor,re=B.tickBorderDash||[],ae=B.tickBorderDashOffset;y=ade(this,w,l),y!==void 0&&(E=Sa(r,y,z),c?S=D=R=C=E:P=T=A=j=E,p.push({tx1:S,ty1:P,tx2:D,ty2:T,x1:R,y1:A,x2:C,y2:j,width:z,color:W,borderDash:Q,borderDashOffset:X,tickWidth:ie,tickColor:J,tickBorderDash:re,tickBorderDashOffset:ae}))}return this._ticksLength=d,this._borderValue=_,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=hc(r.grid),p=f+u,m=d?-u:p,g=-lo(this.labelRotation),v=[];let x,_,w,y,E,S,P,D,T,R,A,C,j="middle";if(i==="top")S=this.bottom-m,P=this._getXAxisLabelAlignment();else if(i==="bottom")S=this.top+m,P=this._getXAxisLabelAlignment();else if(i==="left"){const M=this._getYAxisLabelAlignment(f);P=M.textAlign,E=M.x}else if(i==="right"){const M=this._getYAxisLabelAlignment(f);P=M.textAlign,E=M.x}else if(n==="x"){if(i==="center")S=(t.top+t.bottom)/2+p;else if(Re(i)){const M=Object.keys(i)[0],L=i[M];S=this.chart.scales[M].getPixelForValue(L)+p}P=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")E=(t.left+t.right)/2-p;else if(Re(i)){const M=Object.keys(i)[0],L=i[M];E=this.chart.scales[M].getPixelForValue(L)}P=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?j="top":l==="end"&&(j="bottom"));const N=this._getLabelSizes();for(x=0,_=s.length;x<_;++x){w=s[x],y=w.label;const M=o.setContext(this.getContext(x));D=this.getPixelForTick(x)+o.labelOffset,T=this._resolveTickFontOptions(x),R=T.lineHeight,A=pn(y)?y.length:1;const L=A/2,B=M.color,V=M.textStrokeColor,z=M.textStrokeWidth;let W=P;a?(E=D,P==="inner"&&(x===_-1?W=this.options.reverse?"left":"right":x===0?W=this.options.reverse?"right":"left":W="center"),i==="top"?c==="near"||g!==0?C=-A*R+R/2:c==="center"?C=-N.highest.height/2-L*R+R:C=-N.highest.height+R/2:c==="near"||g!==0?C=R/2:c==="center"?C=N.highest.height/2-L*R:C=N.highest.height-A*R,d&&(C*=-1),g!==0&&!M.showLabelBackdrop&&(E+=R/2*Math.sin(g))):(S=D,C=(1-A)*R/2);let Q;if(M.showLabelBackdrop){const X=si(M.backdropPadding),ie=N.heights[x],J=N.widths[x];let re=C-X.top,ae=0-X.left;switch(j){case"middle":re-=ie/2;break;case"bottom":re-=ie;break}switch(P){case"center":ae-=J/2;break;case"right":ae-=J;break;case"inner":x===_-1?ae-=J:x>0&&(ae-=J/2);break}Q={left:ae,top:re,width:J+X.width,height:ie+X.height,color:M.backdropColor}}v.push({label:y,font:T,textOffset:C,options:{rotation:g,color:B,strokeColor:V,strokeWidth:z,textAlign:W,textBaseline:j,translation:[E,S],backdrop:Q}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-lo(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=t+o,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const l=i[o];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Sa(t,this.left,a)-a/2,u=Sa(t,this.right,s)+s/2,d=f=l):(d=Sa(t,this.top,a)-a/2,f=Sa(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&P1(r,i);const o=this.getLabelItems(t);for(const a of o){const s=a.options,l=a.font,c=a.label,u=a.textOffset;Lp(r,c,0,u,l,s)}i&&D1(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=sr(r.font),a=si(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Re(n)?(l+=a.bottom,pn(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=dde(this,l,n,s);Lp(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:ude(s,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Se(t.grid&&t.grid.z,-1),i=Se(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Bl.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const s=n[o];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return sr(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ef{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;hde(n)&&(r=this.register(n));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,fde(t,a,r),this.override&&Bt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Bt[i]&&(delete Bt[i][r],this.override&&delete ps[r])}}function fde(e,t,n){const r=pu(Object.create(null),[n?Bt.get(n):{},Bt.get(t),e.defaults]);Bt.set(t,r),e.defaultRoutes&&pde(t,e.defaultRoutes),e.descriptors&&Bt.describe(t,e.descriptors)}function pde(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Bt.route(o,i,l,s)})}function hde(e){return"id"in e&&"defaults"in e}class mde{constructor(){this.controllers=new ef(fm,"datasets",!0),this.elements=new ef(va,"elements"),this.plugins=new ef(Object,"plugins"),this.scales=new ef(Bl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ze(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=S1(t);ht(r["before"+i],[],r),n[t](r),ht(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var mi=new mde;class gde{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,r,i){i=i||{};for(const o of t){const a=o.plugin,s=a[r],l=[n,i,o.options];if(ht(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Ke(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Se(r.options&&r.options.plugins,{}),o=vde(r);return i===!1&&!n?[]:bde(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function vde(e){const t={},n=[],r=Object.keys(mi.plugins.items);for(let o=0;o<r.length;o++)n.push(mi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function yde(e,t){return!t&&e===!1?null:e===!0?{}:e}function bde(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=yde(r[l],i);c!==null&&o.push({plugin:s,options:xde(e.config,{plugin:s,local:n[l]},c,a)})}return o}function xde(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(r,o);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function gb(e,t){const n=Bt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function wde(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function _de(e,t){return e===t?"_index_":"_value_"}function kk(e){if(e==="x"||e==="y"||e==="r")return e}function Ede(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function vb(e,...t){if(kk(e))return e;for(const n of t){const r=n.axis||Ede(n.position)||e.length>1&&kk(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Pk(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Sde(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Pk(e,"x",n[0])||Pk(e,"y",n[0])}return{}}function Ode(e,t){const n=ps[e.type]||{scales:{}},r=t.scales||{},i=gb(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Re(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=vb(a,s,Sde(a,e),Bt.scales[s.type]),c=_de(l,i),u=n.scales||{};o[a]=Rc(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||gb(s,t),u=(ps[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=wde(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),Rc(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];Rc(s,[Bt.scales[s.type],Bt.scale])}),o}function AI(e){const t=e.options||(e.options={});t.plugins=Se(t.plugins,{}),t.scales=Ode(e,t)}function TI(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Cde(e){return e=e||{},e.data=TI(e.data),AI(e),e}const Dk=new Map,NI=new Set;function tf(e,t){let n=Dk.get(e);return n||(n=t(),Dk.set(e,n),NI.add(n)),n}const mc=(e,t,n)=>{const r=fs(t,n);r!==void 0&&e.add(r)};class kde{constructor(t){this._config=Cde(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=TI(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),AI(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tf(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return tf(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return tf(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return tf(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>mc(l,t,d))),u.forEach(d=>mc(l,i,d)),u.forEach(d=>mc(l,ps[o]||{},d)),u.forEach(d=>mc(l,Bt,d)),u.forEach(d=>mc(l,hb,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),NI.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ps[n]||{},Bt.datasets[n]||{},{type:n},Bt,hb]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=Ak(this._resolverCache,t,i);let l=a;if(Dde(a,n)){o.$shared=!1,r=ua(r)?r():r;const c=this.createResolver(t,r,s);l=xl(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=Ak(this._resolverCache,t,r);return Re(n)?xl(o,n,void 0,i):o}}function Ak(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:T1(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const Pde=e=>Re(e)&&Object.getOwnPropertyNames(e).some(t=>ua(e[t]));function Dde(e,t){const{isScriptable:n,isIndexable:r}=hI(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(ua(s)||Pde(s))||a&&pn(s))return!0}return!1}var Ade="4.5.0";const Tde=["top","bottom","left","right","chartArea"];function Tk(e,t){return e==="top"||e==="bottom"||Tde.indexOf(e)===-1&&t==="x"}function Nk(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function jk(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ht(n&&n.onComplete,[e],t)}function Nde(e){const t=e.chart,n=t.options.animation;ht(n&&n.onProgress,[e],t)}function jI(e){return M1()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const _f={},Mk=e=>{const t=jI(e);return Object.values(_f).filter(n=>n.canvas===t).pop()};function jde(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function Mde(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let Wn=class{static defaults=Bt;static instances=_f;static overrides=ps;static registry=mi;static version=Ade;static getChart=Mk;static register(...t){mi.add(...t),Rk()}static unregister(...t){mi.remove(...t),Rk()}constructor(t,n){const r=this.config=new kde(n),i=jI(t),o=Mk(i);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 a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Zue(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Cle(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,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 gde,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yle(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],_f[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Xi.listen(this,"complete",jk),Xi.listen(this,"progress",Nde),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Ke(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return mi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rk(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ek(this.canvas,this.ctx),this}stop(){return Xi.stop(this),this}resize(t,n){Xi.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,rk(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ht(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ze(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=vb(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ze(o,a=>{const s=a.options,l=s.id,c=vb(l,s),u=Se(s.type,a.dtype);(s.position===void 0||Tk(s.position,c)!==Tk(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=mi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Ze(i,(a,s)=>{a||delete r[s]}),Ze(r,a=>{Uo.configure(this,a,a.options),Uo.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Nk("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||gb(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=mi.getController(s),{datasetElementType:c,dataElementType:u}=Bt.datasets[s];Object.assign(l,{dataElementType:mi.getElement(u),datasetElementType:c&&mi.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Ze(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Ze(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Nk("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ze(this.scales,t=>{Uo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!HC(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;jde(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!HC(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Uo.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ze(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,ua(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Xi.has(this)?this.attached&&!Xi.running(this)&&Xi.start(this):(this.draw(),jk({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Qce(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&P1(n,i),t.controller.draw(),i&&D1(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return vu(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=Tue.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=bs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);hu(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Xi.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ek(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete _f[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ze(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){Ze(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ze(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!Rp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=Nle(t),c=Mde(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ht(o.onHover,[t,s,this],this),l&&ht(o.onClick,[t,s,this],this));const u=!Rp(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function Rk(){return Ze(Wn.instances,e=>e._plugins.invalidate())}function Rde(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/a,ni(r-n));if(e.beginPath(),e.arc(i,o,a-c/2,r+d/2,n-d/2),s>0){const f=Math.min(c/s,ni(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*ni(r-n));if(u==="round")e.arc(i,o,f,n-st/2,r+st/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+st/2)+i,g=-p*Math.sin(n+st/2)+o,v=p*Math.cos(r+st/2)+i,x=p*Math.sin(r+st/2)+o;e.lineTo(m,g),e.lineTo(v,x)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Ide(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+rn,r-rn),e.closePath(),e.clip()}function Fde(e){return A1(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Lde(e,t,n,r){const i=Fde(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return Mn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Mn(i.innerStart,0,a),innerEnd:Mn(i.innerEnd,0,a)}}function Is(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function zp(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let p=0;const m=i-l;if(r){const M=u>0?u-r:0,L=d>0?d-r:0,B=(M+L)/2,V=B!==0?m*B/(B+r):m;p=(m-V)/2}const g=Math.max(.001,m*d-n/st)/d,v=(m-g)/2,x=l+v+p,_=i-v-p,{outerStart:w,outerEnd:y,innerStart:E,innerEnd:S}=Lde(t,f,d,_-x),P=d-w,D=d-y,T=x+w/P,R=_-y/D,A=f+E,C=f+S,j=x+E/A,N=_-S/C;if(e.beginPath(),o){const M=(T+R)/2;if(e.arc(a,s,d,T,M),e.arc(a,s,d,M,R),y>0){const z=Is(D,R,a,s);e.arc(z.x,z.y,y,R,_+rn)}const L=Is(C,_,a,s);if(e.lineTo(L.x,L.y),S>0){const z=Is(C,N,a,s);e.arc(z.x,z.y,S,_+rn,N+Math.PI)}const B=(_-S/f+(x+E/f))/2;if(e.arc(a,s,f,_-S/f,B,!0),e.arc(a,s,f,B,x+E/f,!0),E>0){const z=Is(A,j,a,s);e.arc(z.x,z.y,E,j+Math.PI,x-rn)}const V=Is(P,x,a,s);if(e.lineTo(V.x,V.y),w>0){const z=Is(P,T,a,s);e.arc(z.x,z.y,w,x-rn,T)}}else{e.moveTo(a,s);const M=Math.cos(T)*d+a,L=Math.sin(T)*d+s;e.lineTo(M,L);const B=Math.cos(R)*d+a,V=Math.sin(R)*d+s;e.lineTo(B,V)}e.closePath()}function $de(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){zp(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%Mt||Mt))}return zp(e,t,n,r,l,i),e.fill(),l}function Bde(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let g=t.endAngle;if(o){zp(e,t,n,r,g,i);for(let v=0;v<o;++v)e.stroke();isNaN(s)||(g=a+(s%Mt||Mt))}m&&Ide(e,t,g),l.selfJoin&&g-a>=st&&p===0&&u!=="miter"&&Rde(e,t,g),o||(zp(e,t,n,r,g,i),e.stroke())}class hm extends va{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),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,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:a}=oI(i,{x:t,y:n}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,p=Se(d,l-s),m=gu(o,s,l)&&s!==l,g=p>=Mt||m,v=Yo(a,c+f,u+f);return g&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(a+s+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Mt?Math.floor(r/Mt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(st,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,$de(t,this,c,o,a),Bde(t,this,c,o,a),t.restore()}}function MI(e,t,n=t){e.lineCap=Se(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Se(n.borderDash,t.borderDash)),e.lineDashOffset=Se(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Se(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Se(n.borderWidth,t.borderWidth),e.strokeStyle=Se(n.borderColor,t.borderColor)}function Wde(e,t,n){e.lineTo(n.x,n.y)}function zde(e){return e.stepped?oce:e.tension||e.cubicInterpolationMode==="monotone"?ace:Wde}function RI(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function Vde(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=RI(i,n,r),u=zde(o);let{move:d=!0,reverse:f}=r||{},p,m,g;for(p=0;p<=c;++p)m=i[(s+(f?c-p:p))%a],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,g,m,f,o.stepped),g=m);return l&&(m=i[(s+(f?c:0))%a],u(e,g,m,f,o.stepped)),!!l}function Hde(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=RI(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,g,v,x;const _=y=>(a+(c?s-y:y))%o,w=()=>{g!==v&&(e.lineTo(u,v),e.lineTo(u,g),e.lineTo(u,x))};for(l&&(p=i[_(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[_(f)],p.skip)continue;const y=p.x,E=p.y,S=y|0;S===m?(E<g?g=E:E>v&&(v=E),u=(d*u+y)/++d):(w(),e.lineTo(y,E),m=S,d=0,g=v=E),x=E}w()}function yb(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Hde:Vde}function Yde(e){return e.stepped?Lce:e.tension||e.cubicInterpolationMode==="monotone"?$ce:Fa}function Ude(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),MI(e,t.options),e.stroke(i)}function Kde(e,t,n,r){const{segments:i,options:o}=t,a=yb(t);for(const s of i)MI(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const qde=typeof Path2D=="function";function Gde(e,t,n,r){qde&&!t.options.segment?Ude(e,t,n,r):Kde(e,t,n,r)}class F1 extends va{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;Ace(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Kce(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=Hce(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Yde(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:d,end:f}=a[c],p=o[d],m=o[f];if(p===m){s.push(p);continue}const g=Math.abs((i-p[n])/(m[n]-p[n])),v=l(p,m,g,r.stepped);v[n]=t[n],s.push(v)}return s.length===1?s[0]:s}pathSegment(t,n,r){return yb(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=yb(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)a&=o(t,this,s,{start:n,end:n+r-1});return!!a}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Gde(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ik(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class L1 extends va{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return Ik(this,t,"x",n)}inYRange(t,n){return Ik(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!vu(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,mb(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function II(e,t){const{x:n,y:r,base:i,width:o,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,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function Ko(e,t,n,r){return e?0:Mn(t,n,r)}function Xde(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=pI(r);return{t:Ko(i.top,o.top,0,n),r:Ko(i.right,o.right,0,t),b:Ko(i.bottom,o.bottom,0,n),l:Ko(i.left,o.left,0,t)}}function Qde(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=Gs(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Re(i);return{topLeft:Ko(!l||s.top||s.left,o.topLeft,0,a),topRight:Ko(!l||s.top||s.right,o.topRight,0,a),bottomLeft:Ko(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Ko(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Zde(e){const t=II(e),n=t.right-t.left,r=t.bottom-t.top,i=Xde(e,n/2,r/2),o=Qde(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function $v(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&II(e,r);return s&&(i||Yo(t,s.left,s.right))&&(o||Yo(n,s.top,s.bottom))}function Jde(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function efe(e,t){e.rect(t.x,t.y,t.w,t.h)}function Bv(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class Wl extends va{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){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,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=Zde(this),s=Jde(a.radius)?$p:efe;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,Bv(a,n,o)),t.clip(),s(t,Bv(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,Bv(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return $v(this,t,n,r)}inXRange(t,n){return $v(this,t,null,n)}inYRange(t,n){return $v(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const Fk=(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)}},tfe=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Lk extends va{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 t=this.options.labels||{};let n=ht(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=sr(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Fk(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,s,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,g)=>{const v=r+n/2+o.measureText(m.text).width;(g===0||c[c.length-1]+v+2*s>a)&&(d+=u,c[c.length-(g>0?0:1)]=0,p+=u,f++),l[g]={left:0,top:p,row:f,width:v,height:i},c[c.length-1]+=v+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let d=s,f=0,p=0,m=0,g=0;return this.legendItems.forEach((v,x)=>{const{itemWidth:_,itemHeight:w}=nfe(r,n,o,v,i);x>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,g++,f=p=0),l[x]={left:m,top:p,col:g,width:_,height:w},f=Math.max(f,_),p+=w+s}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=Xs(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=mr(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=mr(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=mr(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=mr(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;P1(t,this),this._draw(),D1(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Bt.color,l=Xs(t.rtl,this.left,this.width),c=sr(a.font),{padding:u}=a,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:v}=Fk(a,d),x=function(S,P,D){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const T=Se(D.lineWidth,1);if(i.fillStyle=Se(D.fillStyle,s),i.lineCap=Se(D.lineCap,"butt"),i.lineDashOffset=Se(D.lineDashOffset,0),i.lineJoin=Se(D.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Se(D.strokeStyle,s),i.setLineDash(Se(D.lineDash,[])),a.usePointStyle){const R={radius:g*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:T},A=l.xPlus(S,m/2),C=P+f;fI(i,R,A,C,a.pointStyleWidth&&m)}else{const R=P+Math.max((d-g)/2,0),A=l.leftForLtr(S,m),C=Gs(D.borderRadius);i.beginPath(),Object.values(C).some(j=>j!==0)?$p(i,{x:A,y:R,w:m,h:g,radius:C}):i.rect(A,R,m,g),i.fill(),T!==0&&i.stroke()}i.restore()},_=function(S,P,D){Lp(i,D.text,S,P+v/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),y=this._computeTitleHeight();w?p={x:mr(o,this.left+u,this.right-r[0]),y:this.top+u+y,line:0}:p={x:this.left+u,y:mr(o,this.top+y+u,this.bottom-n[0].height),line:0},bI(this.ctx,t.textDirection);const E=v+u;this.legendItems.forEach((S,P)=>{i.strokeStyle=S.fontColor,i.fillStyle=S.fontColor;const D=i.measureText(S.text).width,T=l.textAlign(S.textAlign||(S.textAlign=a.textAlign)),R=m+f+D;let A=p.x,C=p.y;l.setWidth(this.width),w?P>0&&A+R+u>this.right&&(C=p.y+=E,p.line++,A=p.x=mr(o,this.left+u,this.right-r[p.line])):P>0&&C+E>this.bottom&&(A=p.x=A+n[p.line].width+u,p.line++,C=p.y=mr(o,this.top+y+u,this.bottom-n[p.line].height));const j=l.x(A);if(x(j,C,S),A=Ule(T,A+m+f,w?A+R:this.right,t.rtl),_(l.x(A),C,S),w)p.x+=R+u;else if(typeof S.text!="string"){const N=c.lineHeight;p.y+=FI(S,N)+u}else p.y+=E}),xI(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=sr(n.font),i=si(n.padding);if(!n.display)return;const o=Xs(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=mr(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((g,v)=>Math.max(g,v.height),0);u=c+mr(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=mr(s,d,d+f);a.textAlign=o.textAlign(uI(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Lp(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=sr(t.font),r=si(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Yo(t,this.left,this.right)&&Yo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Yo(t,i.left,i.left+i.width)&&Yo(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!ofe(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=tfe(i,r);i&&!o&&ht(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ht(n.onHover,[t,r,this],this)}else r&&ht(n.onClick,[t,r,this],this)}}function nfe(e,t,n,r,i){const o=rfe(r,e,t,n),a=ife(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function rfe(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function ife(e,t,n){let r=e;return typeof t.text!="string"&&(r=FI(t,n)),r}function FI(e,t){const n=e.text?e.text.length:0;return t*n}function ofe(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Zr={id:"legend",_element:Lk,start(e,t,n){const r=e.legend=new Lk({ctx:e.ctx,options:n,chart:e});Uo.configure(e,r,n),Uo.addBox(e,r)},stop(e){Uo.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Uo.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,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.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:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=si(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.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)}}};const kc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=pb(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function hi(e,t){return t&&(pn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Qi(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
297
+ */class Zce{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=lI.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Xi=new Zce;const lk="transparent",Jce={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=QC(e||lk),i=r.valid&&QC(t||lk);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class eue{constructor(t,n,r,i){const o=n[r];i=qd([t.to,i,o,t.from]);const a=qd([t.from,o,i]);this._active=!0,this._fn=t.fn||Jce[t.type||typeof a],this._easing=Fc[t.easing]||Fc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=qd([t.to,n,i,t.from]),this._from=qd([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class _I{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Re(t))return;const n=Object.keys(Bt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Re(o))return;const a={};for(const s of n)a[s]=o[s];(pn(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=nue(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&tue(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new eue(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Xi.add(this._chart,r),!0}}function tue(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function nue(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function ck(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function rue(e,t,n){if(n===!1)return!1;const r=ck(e,n),i=ck(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function iue(e){let t,n,r,i;return Re(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function EI(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function uk(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],Kr(c)&&(o||t===0||ji(t)===ji(c))&&(t+=c)}return!u&&!r.all?0:t}function oue(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"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]={[i]:u,[o]:e[u]};return s}function Nv(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function aue(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function sue(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function lue(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function dk(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function fk(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=aue(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:g,[c]:v}=m,x=m._stacks||(m._stacks={});f=x[c]=lue(i,u,g),f[s]=v,f._top=dk(f,a,!0,r.type),f._bottom=dk(f,a,!1,r.type);const _=f._visualValues||(f._visualValues={});_[s]=v}}function jv(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function cue(e,t){return bs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function uue(e,t,n){return bs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function dc(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const Mv=e=>e==="reset"||e==="none",pk=(e,t)=>t?e:Object.assign({},e),due=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:EI(n,!0),values:null};class fm{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Nv(t.vScale,t),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(t){this.index!==t&&dc(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Se(r.xAxisID,jv(t,"x")),a=n.yAxisID=Se(r.yAxisID,jv(t,"y")),s=n.rAxisID=Se(r.rAxisID,jv(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&qC(this._data,this),t._stacked&&dc(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Re(n)){const i=this._cachedMeta;this._data=oue(n,i)}else if(r!==n){if(r){qC(r,this);const i=this._cachedMeta;dc(i),i._parsed=[]}n&&Object.isExtensible(n)&&Hle(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=Nv(n.vScale,n),n.stack!==r.stack&&(i=!0,dc(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(fk(this,n._parsed),n._stacked=Nv(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{pn(i[t])?f=this.parseArrayData(r,i,t,n):Re(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}a&&fk(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:a}=t,s=o.axis,l=a.axis,c=o.getLabels(),u=o===a,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+r,d[f]={[s]:u||o.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],s[l]={x:o.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:o,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(fs(p,s),f),y:a.parse(fs(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,a=n[t.axis],s={keys:EI(i,!0),values:n._stacks[t.axis]._visualValues};return uk(s,a,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,a=uk(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,a=i.length,s=this._getOtherScale(t),l=due(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=sue(s);let f,p;function m(){p=i[f];const g=p[s.axis];return!Kr(p[t.axis])||u>g||d<g}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][t.axis],Kr(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=iue(Se(this.options.clip,rue(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=uue(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=cue(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=t+"-"+n,s=o[a],l=this.enableOptionSharing&&hu(r);if(s)return pk(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Bt.elements[t]),m=()=>this.getContext(r,i,n),g=c.resolveNamedOptions(f,p,m,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(pk(g,l))),g}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new _I(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Mv(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){Mv(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Mv(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&dc(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function fue(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=sI(r.sort((i,o)=>i-o))}return e._cache.$bar}function pue(e){const t=e.iScale,n=fue(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(hu(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i<o;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return r}function hue(e,t,n,r){const i=n.barThickness;let o,a;return Ke(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}function mue(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=o-(s===null?t.end-t.start:s-o)),s===null&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}function gue(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);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:i,end:o,min:a,max:s}}function SI(e,t,n,r){return pn(e)?gue(e,t,n,r):t[n.axis]=n.parse(e,r),t}function hk(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(SI(f,d,o,c));return l}function Rv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function vue(e,t,n){return e!==0?ji(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function yue(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function bue(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=yue(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[mk(u,a,s,l)]=!0,i=c)),o[mk(i,a,s,l)]=!0,e.borderSkipped=o}function mk(e,t,n,r){return r?(e=xue(e,t,n),e=gk(e,n,t)):e=gk(e,t,n),e}function xue(e,t,n){return e===t?n:e===n?t:e}function gk(e,t,n){return e==="start"?t:e==="end"?n:e}function wue(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class _ue extends fm{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,i){return hk(t,n,r,i)}parseArrayData(t,n,r,i){return hk(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let f,p,m,g;for(f=r,p=r+i;f<p;++f)g=n[f],m={},m[o.axis]=o.parse(fs(g,c),f),d.push(SI(fs(g,u),m,a,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),a=o._custom,s=Rv(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const m=this.getParsed(p),g=o||Ke(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,u),x=(m._stacks||{})[s.axis],_={horizontal:c,base:g.base,enableBorderRadius:!x||Rv(m._custom)||a===x._top||a===x._bottom,x:c?g.head:v.center,y:c?v.center:g.head,height:c?v.size:Math.abs(g.size),width:c?Math.abs(g.size):v.size};f&&(_.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=_.options||t[p].options;bue(_,w,x,a),wue(_,w,u.ratio),this.updateElement(t[p],p,_,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const d=u._parsed.find(p=>p[r.axis]===l),f=d&&d[u.vScale.axis];if(Ke(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Se(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||pue(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,s=o||0,l=this.getParsed(t),c=l._custom,u=Rv(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,g;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&ji(d)!==ji(c.barEnd)&&(f=0),f+=d);const v=!Ke(o)&&!u?o:f;let x=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=x,g=m-x,Math.abs(g)<a){g=vue(g,n,s)*a,d===s&&(x-=g/2);const _=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),y=Math.min(_,w),E=Math.max(_,w);x=Math.max(Math.min(x,E),y),m=x+g,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(x))}if(x===n.getPixelForValue(s)){const _=ji(g)*n.getLineWidthForValue(s)/2;x+=_,g-=_}return{size:g,base:x,head:m,center:m+g/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,a=Se(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?mue(t,n,i,u*c):hue(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Se(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(a,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function Eue(e,t,n){let r=1,i=1,o=0,a=0;if(t<Mt){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,y,E)=>gu(w,s,l,!0)?1:Math.max(y,y*n,E,E*n),m=(w,y,E)=>gu(w,s,l,!0)?-1:Math.min(y,y*n,E,E*n),g=p(0,c,d),v=p(rn,u,f),x=m(st,c,d),_=m(st+rn,u,f);r=(g-x)/2,i=(v-_)/2,o=-(g+x)/2,a=-(v+_)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class Sue extends fm{static id="doughnut";static 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"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Re(r[t])){const{key:l="value"}=this._parsing;o=c=>+fs(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return lo(this.options.rotation-90)}_getCircumference(){return lo(this.options.circumference)}_getRotationExtents(){let t=Mt,n=-Mt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(kle(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:g}=Eue(d,u,l),v=(r.width-a)/f,x=(r.height-a)/p,_=Math.max(Math.min(v,x)/2,0),w=nI(this.options.radius,_),y=Math.max(w*l,0),E=(w-y)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=g*w,i.total=this.calculateTotal(),this.outerRadius=w-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/Mt)}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.chartArea,c=a.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:g,includeOptions:v}=this._getSharedOptions(n,i);let x=this._getRotation(),_;for(_=0;_<n;++_)x+=this._circumference(_,o);for(_=n;_<n+r;++_){const w=this._circumference(_,o),y=t[_],E={x:u+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+w,circumference:w,outerRadius:m,innerRadius:p};v&&(E.options=g||this.resolveDataElementOptions(_,y.active?"active":i)),x+=w,this.updateElement(y,_,E,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Mt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=k1(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,s=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Se(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Oue extends fm{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=Kle(n,i,a);this._drawStart=s,this._drawCount=l,qle(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=a.axis,p=s.axis,{spanGaps:m,segment:g}=this.options,v=mu(m)?m:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||i==="none",_=n+r,w=t.length;let y=n>0&&this.getParsed(n-1);for(let E=0;E<w;++E){const S=t[E],P=x?S:{};if(E<n||E>=_){P.skip=!0;continue}const D=this.getParsed(E),T=Ke(D[p]),R=P[f]=a.getPixelForValue(D[f],E),A=P[p]=o||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],E);P.skip=isNaN(R)||isNaN(A)||T,P.stop=E>0&&Math.abs(D[f]-y[f])>v,g&&(P.parsed=D,P.raw=c.data[E]),d&&(P.options=u||this.resolveDataElementOptions(E,S.active?"active":i)),x||this.updateElement(S,E,P,i),y=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function Oa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class I1{static override(t){Object.assign(I1.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Oa()}parse(){return Oa()}format(){return Oa()}add(){return Oa()}diff(){return Oa()}startOf(){return Oa()}endOf(){return Oa()}}var Cue={_date:I1};function kue(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const c=s._reversePixels?zle:Ua;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),p=c(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,p=f.slice(0,u.lo+1).reverse().findIndex(g=>!Ke(g[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(g=>!Ke(g[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function pm(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:c,data:u}=o[s],{lo:d,hi:f}=kue(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function Pue(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Iv(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||pm(e,n,t,function(s,l,c){!i&&!vu(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function Due(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=oI(a,{x:t.x,y:t.y});gu(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return pm(e,n,t,o),i}function Aue(e,t,n,r,i,o){let a=[];const s=Pue(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const v=s(t,m);v<l?(a=[{element:u,datasetIndex:d,index:f}],l=v):v===l&&a.push({element:u,datasetIndex:d,index:f})}return pm(e,n,t,c),a}function Fv(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?Due(e,t,n,i):Aue(e,t,n,r,i,o)}function vk(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return pm(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var Tue={modes:{index(e,t,n,r){const i=Ia(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?Iv(e,i,o,r,a):Fv(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=Ia(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?Iv(e,i,o,r,a):Fv(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,n,r){const i=Ia(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Iv(e,i,o,r,a)},nearest(e,t,n,r){const i=Ia(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Fv(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=Ia(t,e);return vk(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Ia(t,e);return vk(e,i,"y",n.intersect,r)}}};const OI=["left","top","right","bottom"];function fc(e,t){return e.filter(n=>n.pos===t)}function yk(e,t){return e.filter(n=>OI.indexOf(n.pos)===-1&&n.box.axis===t)}function pc(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Nue(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return t}function jue(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!OI.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Mue(e,t){const n=jue(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,a,s;for(o=0,a=e.length;o<a;++o){s=e[o];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function Rue(e){const t=Nue(e),n=pc(t.filter(c=>c.box.fullSize),!0),r=pc(fc(t,"left"),!0),i=pc(fc(t,"right")),o=pc(fc(t,"top"),!0),a=pc(fc(t,"bottom")),s=yk(t,"x"),l=yk(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:fc(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function bk(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function CI(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 Iue(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Re(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&CI(a,o.getPadding());const s=Math.max(0,t.outerWidth-bk(a,e,"left","right")),l=Math.max(0,t.outerHeight-bk(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 Fue(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Lue(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function Cc(e,t,n,r){const i=[];let o,a,s,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){s=e[o],l=s.box,l.update(s.width||t.w,s.height||t.h,Lue(s.horizontal,t));const{same:d,other:f}=Iue(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&Cc(i,t,n,r)||u}function Zd(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function xk(e,t,n,r){const i=n.padding;let{x:o,y:a}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,f=c.size||l.height;hu(c.start)&&(a=c.start),l.fullSize?Zd(l,i.left,a,n.outerWidth-i.right-i.left,f):Zd(l,t.left+c.placed,a,d,f),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,f=c.size||l.width;hu(c.start)&&(o=c.start),l.fullSize?Zd(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Zd(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var Uo={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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&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 i=si(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=Rue(e.boxes),l=s.vertical,c=s.horizontal;Ze(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=l.reduce((g,v)=>v.box.options&&v.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},i);CI(f,si(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=Mue(l.concat(c),d);Cc(s.fullSize,p,d,m),Cc(l,p,d,m),Cc(c,p,d,m)&&Cc(l,p,d,m),Fue(p),xk(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,xk(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ze(s.chartArea,g=>{const v=g.box;Object.assign(v,e.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class kI{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class $ue extends kI{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wf="$chartjs",Bue={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wk=e=>e===null||e==="";function Wue(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[wf]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",wk(i)){const o=ik(e,"width");o!==void 0&&(e.width=o)}if(wk(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=ik(e,"height");o!==void 0&&(e.height=o)}return e}const PI=Fce?{passive:!0}:!1;function zue(e,t,n){e&&e.addEventListener(t,n,PI)}function Vue(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,PI)}function Hue(e,t){const n=Bue[e.type]||e.type,{x:r,y:i}=Ia(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Wp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Yue(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Wp(s.addedNodes,r),a=a&&!Wp(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Uue(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Wp(s.removedNodes,r),a=a&&!Wp(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const yu=new Map;let _k=0;function DI(){const e=window.devicePixelRatio;e!==_k&&(_k=e,yu.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Kue(e,t){yu.size||window.addEventListener("resize",DI),yu.set(e,t)}function que(e){yu.delete(e),yu.size||window.removeEventListener("resize",DI)}function Gue(e,t,n){const r=e.canvas,i=r&&R1(r);if(!i)return;const o=cI((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),Kue(e,o),a}function Lv(e,t,n){n&&n.disconnect(),t==="resize"&&que(e)}function Xue(e,t,n){const r=e.canvas,i=cI(o=>{e.ctx!==null&&n(Hue(o,e))},e);return zue(r,t,i),i}class Que extends kI{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Wue(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[wf])return!1;const r=n[wf].initial;["height","width"].forEach(o=>{const a=r[o];Ke(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[wf],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:Yue,detach:Uue,resize:Gue}[n]||Xue;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Lv,detach:Lv,resize:Lv}[n]||Vue)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Ice(t,n,r,i)}isAttached(t){const n=t&&R1(t);return!!(n&&n.isConnected)}}function Zue(e){return!M1()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?$ue:Que}let va=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return mu(this.x)&&mu(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function Jue(e,t){const n=e.options.ticks,r=ede(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?nde(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return rde(t,c,o,a/i),c;const u=tde(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(Jd(t,c,u,Ke(p)?0:s-p,s),d=0,f=a-1;d<f;d++)Jd(t,c,u,o[d],o[d+1]);return Jd(t,c,u,l,Ke(p)?t.length:l+p),c}return Jd(t,c,u),c}function ede(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function tde(e,t,n){const r=ide(e),i=t.length/n;if(!r)return Math.max(i,1);const o=Rle(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function nde(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function rde(e,t,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=n[i*r])}function Jd(e,t,n,r,i){const o=Se(r,0),a=Math.min(Se(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)s++,u=Math.round(o+s*n);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(o+s*n))}function ide(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}const ode=e=>e==="left"?"right":e==="right"?"left":e,Ek=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Sk=(e,t)=>Math.min(t||e,e);function Ok(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function ade(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-s||l>a+s)))return l}function sde(e,t){Ze(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function hc(e){return e.drawTicks?e.tickLength:0}function Ck(e,t){if(!e.display)return 0;const n=sr(e.font,t),r=si(e.padding);return(pn(e.text)?e.text.length:1)*n.lineHeight+r.height}function lde(e,t){return bs(e,{scale:t,type:"scale"})}function cde(e,t,n){return bs(e,{tick:n,index:t,type:"tick"})}function ude(e,t,n){let r=uI(e);return(n&&t!=="right"||!n&&t==="right")&&(r=ode(r)),r}function dde(e,t,n,r){const{top:i,left:o,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const g=a-i,v=s-o;if(e.isHorizontal()){if(p=mr(r,o,s),Re(n)){const x=Object.keys(n)[0],_=n[x];m=u[x].getPixelForValue(_)+g-t}else n==="center"?m=(c.bottom+c.top)/2+g-t:m=Ek(e,n,t);f=s-o}else{if(Re(n)){const x=Object.keys(n)[0],_=n[x];p=u[x].getPixelForValue(_)-v+t}else n==="center"?p=(c.left+c.right)/2-v+t:p=Ek(e,n,t);m=mr(r,a,i),d=n==="left"?-rn:rn}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class Bl extends va{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.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(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=pi(t,Number.POSITIVE_INFINITY),n=pi(n,Number.NEGATIVE_INFINITY),r=pi(r,Number.POSITIVE_INFINITY),i=pi(i,Number.NEGATIVE_INFINITY),{min:pi(t,r),max:pi(n,i),minDefined:Kr(t),maxDefined:Kr(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:pi(n,pi(r,n)),max:pi(r,pi(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 t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ht(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=hce(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Ok(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Jue(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ht(this.options.afterUpdate,[this])}beforeSetDimensions(){ht(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(){ht(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ht(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ht(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=ht(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ht(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ht(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Sk(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=Mn(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(t.offset?.5:1)),l=this.maxHeight-hc(t.grid)-n.padding-Ck(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=$le(Math.min(Math.asin(Mn((u.highest.height+6)/s,-1,1)),Math.asin(Mn(l/c,-1,1))-Math.asin(Mn(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){ht(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ht(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Ck(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=hc(o)+l):(t.height=this.maxHeight,t.width=hc(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=lo(this.labelRotation),g=Math.cos(m),v=Math.sin(m);if(s){const x=r.mirror?0:v*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+x+p)}else{const x=r.mirror?0:g*d.width+v*f.height;t.width=Math.min(this.maxWidth,t.width+x+p)}this._calculatePadding(c,u,v,g)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_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(){ht(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ke(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Ok(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],s=[],l=Math.floor(n/Sk(n,r));let c=0,u=0,d,f,p,m,g,v,x,_,w,y,E;for(d=0;d<n;d+=l){if(m=t[d].label,g=this._resolveTickFontOptions(d),i.font=v=g.string,x=o[v]=o[v]||{data:{},gc:[]},_=g.lineHeight,w=y=0,!Ke(m)&&!pn(m))w=JC(i,x.data,x.gc,w,m),y=_;else if(pn(m))for(f=0,p=m.length;f<p;++f)E=m[f],!Ke(E)&&!pn(E)&&(w=JC(i,x.data,x.gc,w,E),y+=_);a.push(w),s.push(y),c=Math.max(w,c),u=Math.max(y,u)}sde(o,n);const S=a.indexOf(c),P=s.indexOf(u),D=T=>({width:a[T]||0,height:s[T]||0});return{first:D(0),last:D(n-1),widest:D(S),highest:D(P),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Wle(this._alignToPixels?Sa(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=cde(this.getContext(),t,r))}return this.$context||(this.$context=lde(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=lo(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=hc(o),p=[],m=s.setContext(this.getContext()),g=m.display?m.width:0,v=g/2,x=function(L){return Sa(r,L,g)};let _,w,y,E,S,P,D,T,R,A,C,j;if(a==="top")_=x(this.bottom),P=this.bottom-f,T=_-v,A=x(t.top)+v,j=t.bottom;else if(a==="bottom")_=x(this.top),A=t.top,j=x(t.bottom)-v,P=_+v,T=this.top+f;else if(a==="left")_=x(this.right),S=this.right-f,D=_-v,R=x(t.left)+v,C=t.right;else if(a==="right")_=x(this.left),R=t.left,C=x(t.right)-v,S=_+v,D=this.left+f;else if(n==="x"){if(a==="center")_=x((t.top+t.bottom)/2+.5);else if(Re(a)){const L=Object.keys(a)[0],B=a[L];_=x(this.chart.scales[L].getPixelForValue(B))}A=t.top,j=t.bottom,P=_+v,T=P+f}else if(n==="y"){if(a==="center")_=x((t.left+t.right)/2);else if(Re(a)){const L=Object.keys(a)[0],B=a[L];_=x(this.chart.scales[L].getPixelForValue(B))}S=_-v,D=S-f,R=t.left,C=t.right}const N=Se(i.ticks.maxTicksLimit,d),M=Math.max(1,Math.ceil(d/N));for(w=0;w<d;w+=M){const L=this.getContext(w),B=o.setContext(L),V=s.setContext(L),z=B.lineWidth,W=B.color,Q=V.dash||[],G=V.dashOffset,ie=B.tickWidth,J=B.tickColor,re=B.tickBorderDash||[],ae=B.tickBorderDashOffset;y=ade(this,w,l),y!==void 0&&(E=Sa(r,y,z),c?S=D=R=C=E:P=T=A=j=E,p.push({tx1:S,ty1:P,tx2:D,ty2:T,x1:R,y1:A,x2:C,y2:j,width:z,color:W,borderDash:Q,borderDashOffset:G,tickWidth:ie,tickColor:J,tickBorderDash:re,tickBorderDashOffset:ae}))}return this._ticksLength=d,this._borderValue=_,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=hc(r.grid),p=f+u,m=d?-u:p,g=-lo(this.labelRotation),v=[];let x,_,w,y,E,S,P,D,T,R,A,C,j="middle";if(i==="top")S=this.bottom-m,P=this._getXAxisLabelAlignment();else if(i==="bottom")S=this.top+m,P=this._getXAxisLabelAlignment();else if(i==="left"){const M=this._getYAxisLabelAlignment(f);P=M.textAlign,E=M.x}else if(i==="right"){const M=this._getYAxisLabelAlignment(f);P=M.textAlign,E=M.x}else if(n==="x"){if(i==="center")S=(t.top+t.bottom)/2+p;else if(Re(i)){const M=Object.keys(i)[0],L=i[M];S=this.chart.scales[M].getPixelForValue(L)+p}P=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")E=(t.left+t.right)/2-p;else if(Re(i)){const M=Object.keys(i)[0],L=i[M];E=this.chart.scales[M].getPixelForValue(L)}P=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?j="top":l==="end"&&(j="bottom"));const N=this._getLabelSizes();for(x=0,_=s.length;x<_;++x){w=s[x],y=w.label;const M=o.setContext(this.getContext(x));D=this.getPixelForTick(x)+o.labelOffset,T=this._resolveTickFontOptions(x),R=T.lineHeight,A=pn(y)?y.length:1;const L=A/2,B=M.color,V=M.textStrokeColor,z=M.textStrokeWidth;let W=P;a?(E=D,P==="inner"&&(x===_-1?W=this.options.reverse?"left":"right":x===0?W=this.options.reverse?"right":"left":W="center"),i==="top"?c==="near"||g!==0?C=-A*R+R/2:c==="center"?C=-N.highest.height/2-L*R+R:C=-N.highest.height+R/2:c==="near"||g!==0?C=R/2:c==="center"?C=N.highest.height/2-L*R:C=N.highest.height-A*R,d&&(C*=-1),g!==0&&!M.showLabelBackdrop&&(E+=R/2*Math.sin(g))):(S=D,C=(1-A)*R/2);let Q;if(M.showLabelBackdrop){const G=si(M.backdropPadding),ie=N.heights[x],J=N.widths[x];let re=C-G.top,ae=0-G.left;switch(j){case"middle":re-=ie/2;break;case"bottom":re-=ie;break}switch(P){case"center":ae-=J/2;break;case"right":ae-=J;break;case"inner":x===_-1?ae-=J:x>0&&(ae-=J/2);break}Q={left:ae,top:re,width:J+G.width,height:ie+G.height,color:M.backdropColor}}v.push({label:y,font:T,textOffset:C,options:{rotation:g,color:B,strokeColor:V,strokeWidth:z,textAlign:W,textBaseline:j,translation:[E,S],backdrop:Q}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-lo(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=t+o,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const l=i[o];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Sa(t,this.left,a)-a/2,u=Sa(t,this.right,s)+s/2,d=f=l):(d=Sa(t,this.top,a)-a/2,f=Sa(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&P1(r,i);const o=this.getLabelItems(t);for(const a of o){const s=a.options,l=a.font,c=a.label,u=a.textOffset;Lp(r,c,0,u,l,s)}i&&D1(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=sr(r.font),a=si(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Re(n)?(l+=a.bottom,pn(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=dde(this,l,n,s);Lp(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:ude(s,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Se(t.grid&&t.grid.z,-1),i=Se(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Bl.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const s=n[o];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return sr(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ef{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;hde(n)&&(r=this.register(n));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,fde(t,a,r),this.override&&Bt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Bt[i]&&(delete Bt[i][r],this.override&&delete ps[r])}}function fde(e,t,n){const r=pu(Object.create(null),[n?Bt.get(n):{},Bt.get(t),e.defaults]);Bt.set(t,r),e.defaultRoutes&&pde(t,e.defaultRoutes),e.descriptors&&Bt.describe(t,e.descriptors)}function pde(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Bt.route(o,i,l,s)})}function hde(e){return"id"in e&&"defaults"in e}class mde{constructor(){this.controllers=new ef(fm,"datasets",!0),this.elements=new ef(va,"elements"),this.plugins=new ef(Object,"plugins"),this.scales=new ef(Bl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ze(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=S1(t);ht(r["before"+i],[],r),n[t](r),ht(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var mi=new mde;class gde{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,r,i){i=i||{};for(const o of t){const a=o.plugin,s=a[r],l=[n,i,o.options];if(ht(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Ke(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Se(r.options&&r.options.plugins,{}),o=vde(r);return i===!1&&!n?[]:bde(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function vde(e){const t={},n=[],r=Object.keys(mi.plugins.items);for(let o=0;o<r.length;o++)n.push(mi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function yde(e,t){return!t&&e===!1?null:e===!0?{}:e}function bde(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=yde(r[l],i);c!==null&&o.push({plugin:s,options:xde(e.config,{plugin:s,local:n[l]},c,a)})}return o}function xde(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(r,o);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function gb(e,t){const n=Bt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function wde(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function _de(e,t){return e===t?"_index_":"_value_"}function kk(e){if(e==="x"||e==="y"||e==="r")return e}function Ede(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function vb(e,...t){if(kk(e))return e;for(const n of t){const r=n.axis||Ede(n.position)||e.length>1&&kk(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Pk(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Sde(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Pk(e,"x",n[0])||Pk(e,"y",n[0])}return{}}function Ode(e,t){const n=ps[e.type]||{scales:{}},r=t.scales||{},i=gb(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Re(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=vb(a,s,Sde(a,e),Bt.scales[s.type]),c=_de(l,i),u=n.scales||{};o[a]=Rc(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||gb(s,t),u=(ps[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=wde(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),Rc(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];Rc(s,[Bt.scales[s.type],Bt.scale])}),o}function AI(e){const t=e.options||(e.options={});t.plugins=Se(t.plugins,{}),t.scales=Ode(e,t)}function TI(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Cde(e){return e=e||{},e.data=TI(e.data),AI(e),e}const Dk=new Map,NI=new Set;function tf(e,t){let n=Dk.get(e);return n||(n=t(),Dk.set(e,n),NI.add(n)),n}const mc=(e,t,n)=>{const r=fs(t,n);r!==void 0&&e.add(r)};class kde{constructor(t){this._config=Cde(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=TI(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),AI(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tf(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return tf(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return tf(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return tf(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>mc(l,t,d))),u.forEach(d=>mc(l,i,d)),u.forEach(d=>mc(l,ps[o]||{},d)),u.forEach(d=>mc(l,Bt,d)),u.forEach(d=>mc(l,hb,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),NI.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ps[n]||{},Bt.datasets[n]||{},{type:n},Bt,hb]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=Ak(this._resolverCache,t,i);let l=a;if(Dde(a,n)){o.$shared=!1,r=ua(r)?r():r;const c=this.createResolver(t,r,s);l=xl(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=Ak(this._resolverCache,t,r);return Re(n)?xl(o,n,void 0,i):o}}function Ak(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:T1(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const Pde=e=>Re(e)&&Object.getOwnPropertyNames(e).some(t=>ua(e[t]));function Dde(e,t){const{isScriptable:n,isIndexable:r}=hI(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(ua(s)||Pde(s))||a&&pn(s))return!0}return!1}var Ade="4.5.0";const Tde=["top","bottom","left","right","chartArea"];function Tk(e,t){return e==="top"||e==="bottom"||Tde.indexOf(e)===-1&&t==="x"}function Nk(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function jk(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ht(n&&n.onComplete,[e],t)}function Nde(e){const t=e.chart,n=t.options.animation;ht(n&&n.onProgress,[e],t)}function jI(e){return M1()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const _f={},Mk=e=>{const t=jI(e);return Object.values(_f).filter(n=>n.canvas===t).pop()};function jde(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function Mde(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let Wn=class{static defaults=Bt;static instances=_f;static overrides=ps;static registry=mi;static version=Ade;static getChart=Mk;static register(...t){mi.add(...t),Rk()}static unregister(...t){mi.remove(...t),Rk()}constructor(t,n){const r=this.config=new kde(n),i=jI(t),o=Mk(i);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 a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Zue(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Cle(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,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 gde,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yle(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],_f[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Xi.listen(this,"complete",jk),Xi.listen(this,"progress",Nde),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Ke(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return mi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rk(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ek(this.canvas,this.ctx),this}stop(){return Xi.stop(this),this}resize(t,n){Xi.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,rk(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ht(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ze(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=vb(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ze(o,a=>{const s=a.options,l=s.id,c=vb(l,s),u=Se(s.type,a.dtype);(s.position===void 0||Tk(s.position,c)!==Tk(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=mi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Ze(i,(a,s)=>{a||delete r[s]}),Ze(r,a=>{Uo.configure(this,a,a.options),Uo.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Nk("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||gb(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=mi.getController(s),{datasetElementType:c,dataElementType:u}=Bt.datasets[s];Object.assign(l,{dataElementType:mi.getElement(u),datasetElementType:c&&mi.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Ze(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Ze(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Nk("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ze(this.scales,t=>{Uo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!HC(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;jde(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!HC(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Uo.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ze(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,ua(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Xi.has(this)?this.attached&&!Xi.running(this)&&Xi.start(this):(this.draw(),jk({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Qce(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&P1(n,i),t.controller.draw(),i&&D1(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return vu(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=Tue.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=bs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);hu(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Xi.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ek(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete _f[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ze(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){Ze(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ze(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!Rp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=Nle(t),c=Mde(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ht(o.onHover,[t,s,this],this),l&&ht(o.onClick,[t,s,this],this));const u=!Rp(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function Rk(){return Ze(Wn.instances,e=>e._plugins.invalidate())}function Rde(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/a,ni(r-n));if(e.beginPath(),e.arc(i,o,a-c/2,r+d/2,n-d/2),s>0){const f=Math.min(c/s,ni(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*ni(r-n));if(u==="round")e.arc(i,o,f,n-st/2,r+st/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+st/2)+i,g=-p*Math.sin(n+st/2)+o,v=p*Math.cos(r+st/2)+i,x=p*Math.sin(r+st/2)+o;e.lineTo(m,g),e.lineTo(v,x)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Ide(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+rn,r-rn),e.closePath(),e.clip()}function Fde(e){return A1(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Lde(e,t,n,r){const i=Fde(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return Mn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Mn(i.innerStart,0,a),innerEnd:Mn(i.innerEnd,0,a)}}function Is(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function zp(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let p=0;const m=i-l;if(r){const M=u>0?u-r:0,L=d>0?d-r:0,B=(M+L)/2,V=B!==0?m*B/(B+r):m;p=(m-V)/2}const g=Math.max(.001,m*d-n/st)/d,v=(m-g)/2,x=l+v+p,_=i-v-p,{outerStart:w,outerEnd:y,innerStart:E,innerEnd:S}=Lde(t,f,d,_-x),P=d-w,D=d-y,T=x+w/P,R=_-y/D,A=f+E,C=f+S,j=x+E/A,N=_-S/C;if(e.beginPath(),o){const M=(T+R)/2;if(e.arc(a,s,d,T,M),e.arc(a,s,d,M,R),y>0){const z=Is(D,R,a,s);e.arc(z.x,z.y,y,R,_+rn)}const L=Is(C,_,a,s);if(e.lineTo(L.x,L.y),S>0){const z=Is(C,N,a,s);e.arc(z.x,z.y,S,_+rn,N+Math.PI)}const B=(_-S/f+(x+E/f))/2;if(e.arc(a,s,f,_-S/f,B,!0),e.arc(a,s,f,B,x+E/f,!0),E>0){const z=Is(A,j,a,s);e.arc(z.x,z.y,E,j+Math.PI,x-rn)}const V=Is(P,x,a,s);if(e.lineTo(V.x,V.y),w>0){const z=Is(P,T,a,s);e.arc(z.x,z.y,w,x-rn,T)}}else{e.moveTo(a,s);const M=Math.cos(T)*d+a,L=Math.sin(T)*d+s;e.lineTo(M,L);const B=Math.cos(R)*d+a,V=Math.sin(R)*d+s;e.lineTo(B,V)}e.closePath()}function $de(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){zp(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%Mt||Mt))}return zp(e,t,n,r,l,i),e.fill(),l}function Bde(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let g=t.endAngle;if(o){zp(e,t,n,r,g,i);for(let v=0;v<o;++v)e.stroke();isNaN(s)||(g=a+(s%Mt||Mt))}m&&Ide(e,t,g),l.selfJoin&&g-a>=st&&p===0&&u!=="miter"&&Rde(e,t,g),o||(zp(e,t,n,r,g,i),e.stroke())}class hm extends va{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),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,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:a}=oI(i,{x:t,y:n}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,p=Se(d,l-s),m=gu(o,s,l)&&s!==l,g=p>=Mt||m,v=Yo(a,c+f,u+f);return g&&v}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(a+s+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Mt?Math.floor(r/Mt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(st,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,$de(t,this,c,o,a),Bde(t,this,c,o,a),t.restore()}}function MI(e,t,n=t){e.lineCap=Se(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Se(n.borderDash,t.borderDash)),e.lineDashOffset=Se(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Se(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Se(n.borderWidth,t.borderWidth),e.strokeStyle=Se(n.borderColor,t.borderColor)}function Wde(e,t,n){e.lineTo(n.x,n.y)}function zde(e){return e.stepped?oce:e.tension||e.cubicInterpolationMode==="monotone"?ace:Wde}function RI(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function Vde(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=RI(i,n,r),u=zde(o);let{move:d=!0,reverse:f}=r||{},p,m,g;for(p=0;p<=c;++p)m=i[(s+(f?c-p:p))%a],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,g,m,f,o.stepped),g=m);return l&&(m=i[(s+(f?c:0))%a],u(e,g,m,f,o.stepped)),!!l}function Hde(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=RI(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,g,v,x;const _=y=>(a+(c?s-y:y))%o,w=()=>{g!==v&&(e.lineTo(u,v),e.lineTo(u,g),e.lineTo(u,x))};for(l&&(p=i[_(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[_(f)],p.skip)continue;const y=p.x,E=p.y,S=y|0;S===m?(E<g?g=E:E>v&&(v=E),u=(d*u+y)/++d):(w(),e.lineTo(y,E),m=S,d=0,g=v=E),x=E}w()}function yb(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Hde:Vde}function Yde(e){return e.stepped?Lce:e.tension||e.cubicInterpolationMode==="monotone"?$ce:Fa}function Ude(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),MI(e,t.options),e.stroke(i)}function Kde(e,t,n,r){const{segments:i,options:o}=t,a=yb(t);for(const s of i)MI(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const qde=typeof Path2D=="function";function Gde(e,t,n,r){qde&&!t.options.segment?Ude(e,t,n,r):Kde(e,t,n,r)}class F1 extends va{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;Ace(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Kce(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=Hce(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Yde(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:d,end:f}=a[c],p=o[d],m=o[f];if(p===m){s.push(p);continue}const g=Math.abs((i-p[n])/(m[n]-p[n])),v=l(p,m,g,r.stepped);v[n]=t[n],s.push(v)}return s.length===1?s[0]:s}pathSegment(t,n,r){return yb(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=yb(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)a&=o(t,this,s,{start:n,end:n+r-1});return!!a}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Gde(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ik(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class L1 extends va{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return Ik(this,t,"x",n)}inYRange(t,n){return Ik(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!vu(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,mb(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function II(e,t){const{x:n,y:r,base:i,width:o,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,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function Ko(e,t,n,r){return e?0:Mn(t,n,r)}function Xde(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=pI(r);return{t:Ko(i.top,o.top,0,n),r:Ko(i.right,o.right,0,t),b:Ko(i.bottom,o.bottom,0,n),l:Ko(i.left,o.left,0,t)}}function Qde(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=Gs(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Re(i);return{topLeft:Ko(!l||s.top||s.left,o.topLeft,0,a),topRight:Ko(!l||s.top||s.right,o.topRight,0,a),bottomLeft:Ko(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Ko(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Zde(e){const t=II(e),n=t.right-t.left,r=t.bottom-t.top,i=Xde(e,n/2,r/2),o=Qde(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function $v(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&II(e,r);return s&&(i||Yo(t,s.left,s.right))&&(o||Yo(n,s.top,s.bottom))}function Jde(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function efe(e,t){e.rect(t.x,t.y,t.w,t.h)}function Bv(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class Wl extends va{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){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,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=Zde(this),s=Jde(a.radius)?$p:efe;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,Bv(a,n,o)),t.clip(),s(t,Bv(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,Bv(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return $v(this,t,n,r)}inXRange(t,n){return $v(this,t,null,n)}inYRange(t,n){return $v(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const Fk=(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)}},tfe=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Lk extends va{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 t=this.options.labels||{};let n=ht(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=sr(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Fk(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,s,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,g)=>{const v=r+n/2+o.measureText(m.text).width;(g===0||c[c.length-1]+v+2*s>a)&&(d+=u,c[c.length-(g>0?0:1)]=0,p+=u,f++),l[g]={left:0,top:p,row:f,width:v,height:i},c[c.length-1]+=v+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let d=s,f=0,p=0,m=0,g=0;return this.legendItems.forEach((v,x)=>{const{itemWidth:_,itemHeight:w}=nfe(r,n,o,v,i);x>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,g++,f=p=0),l[x]={left:m,top:p,col:g,width:_,height:w},f=Math.max(f,_),p+=w+s}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=Xs(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=mr(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=mr(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=mr(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=mr(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;P1(t,this),this._draw(),D1(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Bt.color,l=Xs(t.rtl,this.left,this.width),c=sr(a.font),{padding:u}=a,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:v}=Fk(a,d),x=function(S,P,D){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const T=Se(D.lineWidth,1);if(i.fillStyle=Se(D.fillStyle,s),i.lineCap=Se(D.lineCap,"butt"),i.lineDashOffset=Se(D.lineDashOffset,0),i.lineJoin=Se(D.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Se(D.strokeStyle,s),i.setLineDash(Se(D.lineDash,[])),a.usePointStyle){const R={radius:g*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:T},A=l.xPlus(S,m/2),C=P+f;fI(i,R,A,C,a.pointStyleWidth&&m)}else{const R=P+Math.max((d-g)/2,0),A=l.leftForLtr(S,m),C=Gs(D.borderRadius);i.beginPath(),Object.values(C).some(j=>j!==0)?$p(i,{x:A,y:R,w:m,h:g,radius:C}):i.rect(A,R,m,g),i.fill(),T!==0&&i.stroke()}i.restore()},_=function(S,P,D){Lp(i,D.text,S,P+v/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),y=this._computeTitleHeight();w?p={x:mr(o,this.left+u,this.right-r[0]),y:this.top+u+y,line:0}:p={x:this.left+u,y:mr(o,this.top+y+u,this.bottom-n[0].height),line:0},bI(this.ctx,t.textDirection);const E=v+u;this.legendItems.forEach((S,P)=>{i.strokeStyle=S.fontColor,i.fillStyle=S.fontColor;const D=i.measureText(S.text).width,T=l.textAlign(S.textAlign||(S.textAlign=a.textAlign)),R=m+f+D;let A=p.x,C=p.y;l.setWidth(this.width),w?P>0&&A+R+u>this.right&&(C=p.y+=E,p.line++,A=p.x=mr(o,this.left+u,this.right-r[p.line])):P>0&&C+E>this.bottom&&(A=p.x=A+n[p.line].width+u,p.line++,C=p.y=mr(o,this.top+y+u,this.bottom-n[p.line].height));const j=l.x(A);if(x(j,C,S),A=Ule(T,A+m+f,w?A+R:this.right,t.rtl),_(l.x(A),C,S),w)p.x+=R+u;else if(typeof S.text!="string"){const N=c.lineHeight;p.y+=FI(S,N)+u}else p.y+=E}),xI(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=sr(n.font),i=si(n.padding);if(!n.display)return;const o=Xs(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=mr(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((g,v)=>Math.max(g,v.height),0);u=c+mr(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=mr(s,d,d+f);a.textAlign=o.textAlign(uI(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Lp(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=sr(t.font),r=si(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Yo(t,this.left,this.right)&&Yo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Yo(t,i.left,i.left+i.width)&&Yo(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!ofe(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=tfe(i,r);i&&!o&&ht(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ht(n.onHover,[t,r,this],this)}else r&&ht(n.onClick,[t,r,this],this)}}function nfe(e,t,n,r,i){const o=rfe(r,e,t,n),a=ife(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function rfe(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function ife(e,t,n){let r=e;return typeof t.text!="string"&&(r=FI(t,n)),r}function FI(e,t){const n=e.text?e.text.length:0;return t*n}function ofe(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Zr={id:"legend",_element:Lk,start(e,t,n){const r=e.legend=new Lk({ctx:e.ctx,options:n,chart:e});Uo.configure(e,r,n),Uo.addBox(e,r)},stop(e){Uo.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Uo.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,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.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:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=si(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.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)}}};const kc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=pb(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function hi(e,t){return t&&(pn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Qi(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
298
298
  `)>-1?e.split(`
299
- `):e}function afe(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function $k(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=sr(t.bodyFont),c=sr(t.titleFont),u=sr(t.footerFont),d=o.length,f=i.length,p=r.length,m=si(t.padding);let g=m.height,v=0,x=r.reduce((y,E)=>y+E.before.length+E.lines.length+E.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const y=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;g+=p*y+(x-p)*l.lineHeight+(x-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let _=0;const w=function(y){v=Math.max(v,n.measureText(y).width+_)};return n.save(),n.font=c.string,Ze(e.title,w),n.font=l.string,Ze(e.beforeBody.concat(e.afterBody),w),_=t.displayColors?a+2+t.boxPadding:0,Ze(r,y=>{Ze(y.before,w),Ze(y.lines,w),Ze(y.after,w)}),_=0,n.font=u.string,Ze(e.footer,w),n.restore(),v+=m.width,{width:v,height:g}}function sfe(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function lfe(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function cfe(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),lfe(c,e,t,n)&&(c="center"),c}function Bk(e,t,n){const r=n.yAlign||t.yAlign||sfe(e,n);return{xAlign:n.xAlign||t.xAlign||cfe(e,t,n,r),yAlign:r}}function ufe(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function dfe(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Wk(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Gs(a);let m=ufe(t,s);const g=dfe(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:Mn(m,0,r.width-t.width),y:Mn(g,0,r.height-t.height)}}function nf(e,t,n){const r=si(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function zk(e){return hi([],Qi(e))}function ffe(e,t,n){return bs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Vk(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const LI={beforeTitle:Gi,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Gi,beforeBody:Gi,beforeLabel:Gi,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ke(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Gi,afterBody:Gi,beforeFooter:Gi,footer:Gi,afterFooter:Gi};function Zn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?LI[t].call(n,r):i}class Hk extends va{static positioners=kc;constructor(t){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=t.chart,this.options=t.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(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new _I(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=ffe(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Zn(r,"beforeTitle",this,t),o=Zn(r,"title",this,t),a=Zn(r,"afterTitle",this,t);let s=[];return s=hi(s,Qi(i)),s=hi(s,Qi(o)),s=hi(s,Qi(a)),s}getBeforeBody(t,n){return zk(Zn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ze(t,o=>{const a={before:[],lines:[],after:[]},s=Vk(r,o);hi(a.before,Qi(Zn(s,"beforeLabel",this,o))),hi(a.lines,Zn(s,"label",this,o)),hi(a.after,Qi(Zn(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return zk(Zn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Zn(r,"beforeFooter",this,t),o=Zn(r,"footer",this,t),a=Zn(r,"afterFooter",this,t);let s=[];return s=hi(s,Qi(i)),s=hi(s,Qi(o)),s=hi(s,Qi(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(afe(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Ze(s,u=>{const d=Vk(t.callbacks,u);i.push(Zn(d,"labelColor",this,u)),o.push(Zn(d,"labelPointStyle",this,u)),a.push(Zn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=kc[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=$k(this,r),c=Object.assign({},s,l),u=Bk(this.chart,r,c),d=Wk(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Gs(s),{x:f,y:p}=t,{width:m,height:g}=n;let v,x,_,w,y,E;return o==="center"?(y=p+g/2,i==="left"?(v=f,x=v-a,w=y+a,E=y-a):(v=f+m,x=v+a,w=y-a,E=y+a),_=v):(i==="left"?x=f+Math.max(l,u)+a:i==="right"?x=f+m-Math.max(c,d)-a:x=this.caretX,o==="top"?(w=p,y=w-a,v=x-a,_=x+a):(w=p+g,y=w+a,v=x+a,_=x-a),E=w),{x1:v,x2:x,x3:_,y1:w,y2:y,y3:E}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=Xs(r.rtl,this.x,this.width);for(t.x=nf(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=sr(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=sr(o.bodyFont),d=nf(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},v=i.leftForLtr(f,c)+c/2,x=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,mb(t,g,v,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,mb(t,g,v,x)}else{t.lineWidth=Re(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const g=i.leftForLtr(f,c),v=i.leftForLtr(i.xPlus(f,1),c-2),x=Gs(a.borderRadius);Object.values(x).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,$p(t,{x:g,y:m,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),$p(t,{x:v,y:m+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,m,c,l),t.strokeRect(g,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(v,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=sr(r.bodyFont);let f=d.lineHeight,p=0;const m=Xs(r.rtl,this.x,this.width),g=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},v=m.textAlign(a);let x,_,w,y,E,S,P;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=nf(this,v,r),n.fillStyle=r.bodyColor,Ze(this.beforeBody,g),p=s&&v!=="right"?a==="center"?c/2+u:c+2+u:0,y=0,S=i.length;y<S;++y){for(x=i[y],_=this.labelTextColors[y],n.fillStyle=_,Ze(x.before,g),w=x.lines,s&&w.length&&(this._drawColorBox(n,t,y,m,r),f=Math.max(d.lineHeight,l)),E=0,P=w.length;E<P;++E)g(w[E]),f=d.lineHeight;Ze(x.after,g)}p=0,f=d.lineHeight,Ze(this.afterBody,g),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=Xs(r.rtl,this.x,this.width);for(t.x=nf(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=sr(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=Gs(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=kc[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=$k(this,t),l=Object.assign({},a,this._size),c=Bk(n,t,l),u=Wk(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=si(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),bI(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),xI(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!Rp(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!Rp(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=kc[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Dr={id:"tooltip",_element:Hk,positioners:kc,afterInit(e,t,n){n&&(e.tooltip=new Hk({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(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)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:LI},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const pfe=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function hfe(e,t,n,r){const i=e.indexOf(t);if(i===-1)return pfe(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const mfe=(e,t)=>e===null?null:Mn(Math.round(e),0,t);function Yk(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Io extends Bl{static id="category";static defaults={ticks:{callback:Yk}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ke(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:hfe(r,t,Se(n,t),this._addedLabels),mfe(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return Yk.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function gfe(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:g,max:v}=t,x=!Ke(a),_=!Ke(s),w=!Ke(c),y=(v-g)/(d+1);let E=UC((v-g)/m/p)*p,S,P,D,T;if(E<1e-14&&!x&&!_)return[{value:g},{value:v}];T=Math.ceil(v/E)-Math.floor(g/E),T>m&&(E=UC(T*E/m/p)*p),Ke(l)||(S=Math.pow(10,l),E=Math.ceil(E*S)/S),i==="ticks"?(P=Math.floor(g/E)*E,D=Math.ceil(v/E)*E):(P=g,D=v),x&&_&&o&&Fle((s-a)/o,E/1e3)?(T=Math.round(Math.min((s-a)/E,u)),E=(s-a)/T,P=a,D=s):w?(P=x?a:P,D=_?s:D,T=c-1,E=(D-P)/T):(T=(D-P)/E,Ic(T,Math.round(T),E/1e3)?T=Math.round(T):T=Math.ceil(T));const R=Math.max(KC(E),KC(P));S=Math.pow(10,Ke(l)?R:l),P=Math.round(P*S)/S,D=Math.round(D*S)/S;let A=0;for(x&&(f&&P!==a?(n.push({value:a}),P<a&&A++,Ic(Math.round((P+A*E)*S)/S,a,Uk(a,y,e))&&A++):P<a&&A++);A<T;++A){const C=Math.round((P+A*E)*S)/S;if(_&&C>s)break;n.push({value:C})}return _&&f&&D!==s?n.length&&Ic(n[n.length-1].value,s,Uk(s,y,e))?n[n.length-1].value=s:n.push({value:s}):(!_||D===s)&&n.push({value:D}),n}function Uk(e,t,{horizontal:n,minRotation:r}){const i=lo(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class vfe extends Bl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Ke(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=ji(i),c=ji(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=gfe(i,o);return t.bounds==="ticks"&&Lle(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return k1(t,this.chart.options.locale,this.options.ticks.format)}}class Fo extends vfe{static id="linear";static defaults={ticks:{callback:dI.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Kr(t)?t:0,this.max=Kr(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=lo(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const mm={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}},ir=Object.keys(mm);function Kk(e,t){return e-t}function qk(e,t){if(Ke(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),Kr(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(mu(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function Gk(e,t,n,r){const i=ir.length;for(let o=ir.indexOf(e);o<i-1;++o){const a=mm[ir[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return ir[o]}return ir[i-1]}function yfe(e,t,n,r,i){for(let o=ir.length-1;o>=ir.indexOf(n);o--){const a=ir[o];if(mm[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return ir[n?ir.indexOf(n):0]}function bfe(e){for(let t=ir.indexOf(e)+1,n=ir.length;t<n;++t)if(mm[ir[t]].common)return ir[t]}function Xk(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=O1(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function xfe(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function Qk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:xfe(e,r,i,n)}class Zk extends Bl{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new Cue._date(t.adapters.date);i.init(n),Rc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:qk(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Kr(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Kr(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,s=Vle(i,o,a);return this._unit=n.unit||(r.autoSkip?Gk(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):yfe(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:bfe(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),Qk(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Mn(n,0,a),r=Mn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||Gk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=mu(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)Xk(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&Xk(u,f,m),Object.keys(u).sort(Kk).map(g=>+g)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return ht(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=lo(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,Qk(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(qk(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return sI(t.sort(Kk))}}function rf(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Ua(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ua(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class zme extends Zk{static id="timeseries";static defaults=Zk.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=rf(n,this.min),this._tableRange=rf(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(rf(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return rf(this._table,r*this._tableRange+this._minPos,!0)}}const $I="label";function Jk(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wfe(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function BI(e,t){e.labels=t}function WI(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$I;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function _fe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$I;const n={labels:[],datasets:[]};return BI(n,e.labels),WI(n,e.datasets,t),n}function Efe(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),g=()=>{p.current&&(m.current=new Wn(p.current,{type:a,data:_fe(s,o),options:l&&{...l},plugins:c}),Jk(t,m.current))},v=()=>{Jk(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&wfe(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&BI(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&WI(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(v(),setTimeout(g)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(v(),setTimeout(g))},[a]),k.useEffect(()=>(g(),()=>v()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const Sfe=k.forwardRef(Efe);function $1(e,t){return Wn.register(t),k.forwardRef((n,r)=>k.createElement(Sfe,{...n,ref:r,type:e}))}const B1=$1("line",Oue),zl=$1("bar",_ue),gm=$1("doughnut",Sue);function Vt({image:e="https://cdni.iconscout.com/illustration/premium/thumb/businessman-sad-for-no-data-in-folder-illustration-svg-download-png-10155562.png",title:t="No Data Available",description:n="Catch up all the data. Change the date range to see the data."}){return h.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-[16px]",children:[h.jsx("img",{src:e,alt:"no data",className:"w-32 h-32 mb-4 opacity-80"}),h.jsx("div",{className:"text-[16px] font-semibold text-gray-900 mb-[4px]",children:t}),h.jsx("div",{className:"text-[12px] text-gray-500 max-w-[260px]",children:n})]})}Wn.register(hm,Dr,Zr);const Ofe={id:"bottomGlow",afterDatasetsDraw(e,t,n){if(!n?.enabled)return;const r=e.getDatasetMeta(0);if(!r?.data?.[0])return;const{ctx:i}=e,{x:o,y:a,innerRadius:s}=r.data[0],l=Math.max(s-2,0),c=a+l*.9,u=i.createRadialGradient(o,c,0,o,c,l*1.08);u.addColorStop(0,n.color??"rgba(186, 230, 253, 0.72)"),u.addColorStop(.3,"rgba(186, 230, 253, 0.4)"),u.addColorStop(.58,"rgba(186, 230, 253, 0.16)"),u.addColorStop(1,"rgba(186, 230, 253, 0)"),i.save(),i.beginPath(),i.arc(o,a,l,0,Math.PI*2),i.clip(),i.fillStyle=u,i.beginPath(),i.ellipse(o,c,l*1.08,l*.52,0,0,Math.PI*2),i.fill(),i.restore()}},Cfe=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthText:c="Compared to last month",totalLabel:u="Total",centerTopColor:d="#0F172A",centerBottomColor:f="#64748B",centerTopSize:p,centerBottomSize:m,showBottomGlow:g=!1,bottomGlowColor:v="rgba(186, 230, 253, 0.75)",showEmptyStateWhenZero:x=!1,widgetType:_="",resolvedWidgetType:w="",data:y})=>{const E=y?.title??e,S=y?.icon??t,P=y?.firstLabel??n,D=Number(y?.firstValue??r??0),T=y?.firstColor??i,R=y?.secondLabel??o,A=Number(y?.secondValue??a??0),C=y?.secondColor??s,j=y?.growthPercentage??l??"+0%",N=y?.growthText??c,M=y?.totalLabel??u,L=y?.widgetType??_??w,B=y?.centerTopSize??p??(L==="commercial"?34:24),V=y?.centerBottomSize??m??(L==="commercial"?14:9),z=y?.showBottomGlow??g,W=y?.bottomGlowColor??v,Q=y?.showEmptyStateWhenZero??x??y?.total_units!==void 0,X=Number(y?.total_units?.current??ie),ie=D+A,J=Q&&ie===0&&X===0,re={labels:[P,R],datasets:[{data:[D,A],backgroundColor:[T,C],borderWidth:2,hoverOffset:4}]},ae={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li()},bottomGlow:{enabled:z,color:W}}},le=[{label:P,value:D,color:T},{label:R,value:A,color:C}],ue=j.toString().includes("+"),K=j.toString().includes("-"),U=ue?"#1FA05B":"#AB0000";return h.jsx(Ie,{title:E,icon:S,className:`${L==="commercial"?"h-[362px]":"h-[238px]"} !gap-[24px]`,childrenClassName:J?"h-full":"!flex-none",children:J?h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx(Vt,{})}):h.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[h.jsxs("div",{className:"col-span-5 flex flex-1 flex-col h-full gap-[12px]",children:[le.map((Z,I)=>h.jsxs("div",{children:[h.jsx("div",{className:"mb-[8px] text-[12px] text-[#64748B]",children:Z.label}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium",style:{color:Z.color},children:Z.value})]},I)),h.jsxs("div",{className:`py-[4px] text-[10px] leading-[14px] flex gap-[4px] ${L==="commercial"?"mt-[20px]":""} items-center`,style:{color:U},children:[ue&&h.jsx(oa,{}),K&&h.jsx(ia,{}),h.jsx("div",{children:j.replace("+","").replace("-","")}),h.jsx("div",{className:"text-[#64748B] text-[10px] leading-[14px] ml-[4px] whitespace-nowrap",children:N})]})]}),h.jsx("div",{className:"col-span-7",children:h.jsxs("div",{className:`${L==="commercial"?"h-[260px] max-w-[263px]":"h-[162px] w-[162px]"} relative ml-auto mr-2`,children:[h.jsx(gm,{data:re,options:ae,plugins:[Ofe]}),h.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",children:[h.jsx("div",{style:{color:d,fontSize:B,fontWeight:500,lineHeight:"28px"},children:ie}),h.jsx("div",{style:{color:f,fontSize:V,fontWeight:400,lineHeight:"11px",marginTop:L==="commercial"?10:5},children:M})]})]})})]})})},eP=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return h.jsxs("div",{className:"flex flex-col gap-[4.5px] items-start",children:[h.jsx("div",{className:"w-2/3 min-w-[80px] h-[11px] rounded-full overflow-hidden",children:h.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),h.jsx("div",{className:`${o} !text-[12px] !leading-[16px] font-bold`,children:e}),h.jsx("div",{className:"!text-[12px] !leading-[16px] text-[#64748B]",children:r})]})},tP=({title:e,value:t,suffix:n,valueClass:r=""})=>h.jsxs("div",{className:"bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-[16px] flex flex-col gap-[4px] justify-center",children:[h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-[4px]",children:e}),h.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&h.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),kfe=({data:e,totalUnits:t=847,occupiedUnits:n=756,ownerCount:r=700,tenantCount:i=56,avgResidents:o=4.4,avgLeaseMonths:a=18})=>{const s=Number(e?.totalUnits??t??0),l=Number(e?.occupiedUnits??n??0),c=Number(e?.ownerCount??r??0),u=Number(e?.tenantCount??i??0),d=e?.avgResidents??o,f=e?.avgLeaseMonths??a,p=c+u;return h.jsxs("div",{children:[h.jsxs("div",{className:"bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] h-[128px] p-[16px] !mb-4",children:[h.jsxs("div",{className:"flex items-center gap-[8px] mb-[24px]",children:[h.jsx(Qb,{className:"h-[20px] w-[20px] text-[#329DFF]"}),h.jsx("div",{className:"font-medium text-[16px] leading-[20px] text-[#121212]",children:"Occupancy Overview"})]}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"leading-[16px] text-[12px] text-[#64748B]",children:"Occupied Units"}),h.jsxs("div",{className:"flex items-baseline",children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:l}),h.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",s]})]})]}),h.jsxs("div",{className:"flex items-end",children:[h.jsx(eP,{value:c,total:p,colorClass:"bg-[#8B5CF6]",label:"Owner"}),h.jsx(eP,{value:u,total:p,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),h.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[h.jsx(tP,{title:"Avg Residents Per Unit",value:d,valueClass:"text-[#8B5CF6]"}),h.jsx(tP,{title:"Avg Lease Period",value:f,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Wn.register(hm,Dr,Zr);const Pfe=({data:e,ownerCount:t=1e3,tenantCount:n=200,nonResidingOwners:r=26,growthPct:i="+9.1%"})=>{const o=Number(e?.ownerCount??t??0),a=Number(e?.tenantCount??n??0),s=Number(e?.nonResidingOwners??r??0),l=e?.growthPct??i,c=Math.max(o-s,0),u=o+a,d={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[c,a,s],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},f={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li()}}};return h.jsx(Ie,{title:"Resident Overview",icon:h.jsx(HD,{className:"h-[20px] w-[20px] text-[#8B5CF6]"}),className:"h-[238px] !gap-[24px]",children:h.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[h.jsxs("div",{className:"col-span-5 flex flex-1 flex-col h-full gap-[12px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px] mb-[8px]",children:"Total Owners"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#3C81F6]",children:o})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px] mb-[8px]",children:"Total Tenants"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#08B6D4]",children:a})]}),h.jsxs("div",{className:"py-[4px] text-[10px] leading-[14px] flex gap-[4px] text-[#1FA05B] items-center",children:[h.jsx("div",{children:l}),h.jsx("div",{className:"text-[#64748B] text-[10px] leading-[14px] ml-[4px] whitespace-nowrap",children:"Compared to last month"})]})]}),h.jsx("div",{className:"col-span-7",children:h.jsxs("div",{className:"relative h-[162px] w-[162px] ml-auto mr-2",children:[h.jsx(gm,{data:d,options:f}),h.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col gap-[5.5px] items-center justify-center text-center",children:[h.jsx("div",{style:{color:"#121212",fontSize:24,fontWeight:600,lineHeight:"28px"},children:u}),h.jsx("div",{style:{color:"#64748B",fontSize:9,fontWeight:400,lineHeight:"11.5px"},children:"Total Members"})]})]})})]})})};Wn.register(Io,Fo,Wl,Dr,Zr);const Dfe=[{label:"Owner",color:"#3C81F6"},{label:"Rented",color:"#8B5CF6"},{label:"Vacant",color:"#08B6D4"}],Afe=({data:e,blocks:t=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const n=Array.isArray(e?.blocks)&&e.blocks.length>0?e.blocks:Array.isArray(e)&&e.length>0?e:t,r=n.map(c=>c.name),i=n.map(c=>Number(c.owner??0)),o=n.map(c=>Number(c.rented??0)),a=n.map(c=>Number(c.vacant??0)),s={labels:r,datasets:[{label:"Owner",data:i,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:i.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:o,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:o.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:a,backgroundColor:"#08B6D4",barThickness:40}]},l={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({hideTitleForSingle:!1})}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return h.jsx(Ie,{title:"Block-wise Occupancy",className:"w-full h-[360px]",titleClassName:"!text-[20px] !leading-[24px] !font-semibold",children:h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(zl,{data:s,options:l})}),h.jsx("div",{className:"flex items-center justify-around pt-[12px]",children:Dfe.map(c=>h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[10px] h-[10px] rotate-45",style:{backgroundColor:c.color}}),h.jsx("span",{className:"text-[14px] leading-[18px] text-[#64748B]",children:c.label})]},c.label))})]})})};Wn.register(Io,Fo,L1,F1,Dr,Zr);const Tfe=[{label:"Move-in",color:"#12B981"},{label:"Move-out",color:"#8B5CF6"}],Nfe=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},jfe=({data:e,labels:t=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:n=[24,27,20,26,23],moveOut:r=[12,17,8,5,16]})=>{const i=Array.isArray(e?.labels)&&e.labels.length>0?e.labels:t,o=Array.isArray(e?.moveIn)&&e.moveIn.length>0?e.moveIn:n,a=Array.isArray(e?.moveOut)&&e.moveOut.length>0?e.moveOut:r,s={labels:i,datasets:[{label:"Move-in",data:o,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:a,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},l={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:c=>c.title?.[0]?Nfe(c.title[0]):"",hideTitleForSingle:!1})}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return h.jsx(Ie,{title:"Move-in/Out Trends",className:"w-full h-[360px]",titleClassName:"!text-[20px] !leading-[24px] !font-semibold",children:h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(B1,{data:s,options:l})}),h.jsx("div",{className:"flex items-center justify-around pt-[12px]",children:Tfe.map(c=>h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[10px] h-[10px] rotate-45",style:{backgroundColor:c.color}}),h.jsx("span",{className:"text-[14px] leading-[18px] text-[#64748B]",children:c.label})]},c.label))})]})})};Wn.register(Io,Fo,L1,F1,Dr,Zr);const Mfe=[{label:"Income",className:"bg-gradient-to-r from-[#8CEAE5] to-[#40A39E]"},{label:"Expenditure",className:"bg-gradient-to-r from-[#D86E6E] to-[#AB0000]"}],Rfe=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},Ife=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],Ffe=[24,27,20,26,23],Lfe=[4,17,8,5,16],zI=({data:e,labels:t,moveIn:n,moveOut:r})=>{const i=Array.isArray(e?.labels)&&e.labels.length>0?e.labels:Array.isArray(t)&&t.length>0?t:Ife,o=Array.isArray(e?.moveIn)&&e.moveIn.length>0?e.moveIn:Array.isArray(n)&&n.length>0?n:Ffe,a=Array.isArray(e?.moveOut)&&e.moveOut.length>0?e.moveOut:Array.isArray(r)&&r.length>0?r:Lfe,s={labels:i,datasets:[{label:"Income",data:o,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:a,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},l={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:c=>c.title?.[0]?Rfe(c.title[0]):"",hideTitleForSingle:!1})}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(B1,{data:s,options:l})}),h.jsx("div",{className:"flex items-center justify-around mt-[16px]",children:Mfe.map(c=>h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:`size-[7px] rotate-45 ${c.className}`,style:{backgroundColor:c.color}}),h.jsx("span",{className:"text-[14px] leading-[20px] text-[#64748B]",children:c.label})]},c.label))})]})};function nP({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return h.jsxs("div",{className:`rounded-[12px] p-[16px] ${r} !border !border-[#EBEBEB] !pr-[0px] !mr-[0px] h-[126px]`,children:[h.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),h.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),h.jsxs("div",{className:"mt-[8px] flex items-center gap-[4px] leading-[14px] text-[10px]",children:[h.jsx("div",{className:`
299
+ `):e}function afe(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function $k(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=sr(t.bodyFont),c=sr(t.titleFont),u=sr(t.footerFont),d=o.length,f=i.length,p=r.length,m=si(t.padding);let g=m.height,v=0,x=r.reduce((y,E)=>y+E.before.length+E.lines.length+E.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const y=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;g+=p*y+(x-p)*l.lineHeight+(x-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let _=0;const w=function(y){v=Math.max(v,n.measureText(y).width+_)};return n.save(),n.font=c.string,Ze(e.title,w),n.font=l.string,Ze(e.beforeBody.concat(e.afterBody),w),_=t.displayColors?a+2+t.boxPadding:0,Ze(r,y=>{Ze(y.before,w),Ze(y.lines,w),Ze(y.after,w)}),_=0,n.font=u.string,Ze(e.footer,w),n.restore(),v+=m.width,{width:v,height:g}}function sfe(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function lfe(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function cfe(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),lfe(c,e,t,n)&&(c="center"),c}function Bk(e,t,n){const r=n.yAlign||t.yAlign||sfe(e,n);return{xAlign:n.xAlign||t.xAlign||cfe(e,t,n,r),yAlign:r}}function ufe(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function dfe(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Wk(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Gs(a);let m=ufe(t,s);const g=dfe(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:Mn(m,0,r.width-t.width),y:Mn(g,0,r.height-t.height)}}function nf(e,t,n){const r=si(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function zk(e){return hi([],Qi(e))}function ffe(e,t,n){return bs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Vk(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const LI={beforeTitle:Gi,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Gi,beforeBody:Gi,beforeLabel:Gi,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ke(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Gi,afterBody:Gi,beforeFooter:Gi,footer:Gi,afterFooter:Gi};function Zn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?LI[t].call(n,r):i}class Hk extends va{static positioners=kc;constructor(t){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=t.chart,this.options=t.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(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new _I(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=ffe(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Zn(r,"beforeTitle",this,t),o=Zn(r,"title",this,t),a=Zn(r,"afterTitle",this,t);let s=[];return s=hi(s,Qi(i)),s=hi(s,Qi(o)),s=hi(s,Qi(a)),s}getBeforeBody(t,n){return zk(Zn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ze(t,o=>{const a={before:[],lines:[],after:[]},s=Vk(r,o);hi(a.before,Qi(Zn(s,"beforeLabel",this,o))),hi(a.lines,Zn(s,"label",this,o)),hi(a.after,Qi(Zn(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return zk(Zn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Zn(r,"beforeFooter",this,t),o=Zn(r,"footer",this,t),a=Zn(r,"afterFooter",this,t);let s=[];return s=hi(s,Qi(i)),s=hi(s,Qi(o)),s=hi(s,Qi(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(afe(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Ze(s,u=>{const d=Vk(t.callbacks,u);i.push(Zn(d,"labelColor",this,u)),o.push(Zn(d,"labelPointStyle",this,u)),a.push(Zn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=kc[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=$k(this,r),c=Object.assign({},s,l),u=Bk(this.chart,r,c),d=Wk(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Gs(s),{x:f,y:p}=t,{width:m,height:g}=n;let v,x,_,w,y,E;return o==="center"?(y=p+g/2,i==="left"?(v=f,x=v-a,w=y+a,E=y-a):(v=f+m,x=v+a,w=y-a,E=y+a),_=v):(i==="left"?x=f+Math.max(l,u)+a:i==="right"?x=f+m-Math.max(c,d)-a:x=this.caretX,o==="top"?(w=p,y=w-a,v=x-a,_=x+a):(w=p+g,y=w+a,v=x+a,_=x-a),E=w),{x1:v,x2:x,x3:_,y1:w,y2:y,y3:E}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=Xs(r.rtl,this.x,this.width);for(t.x=nf(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=sr(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=sr(o.bodyFont),d=nf(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},v=i.leftForLtr(f,c)+c/2,x=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,mb(t,g,v,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,mb(t,g,v,x)}else{t.lineWidth=Re(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const g=i.leftForLtr(f,c),v=i.leftForLtr(i.xPlus(f,1),c-2),x=Gs(a.borderRadius);Object.values(x).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,$p(t,{x:g,y:m,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),$p(t,{x:v,y:m+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,m,c,l),t.strokeRect(g,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(v,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=sr(r.bodyFont);let f=d.lineHeight,p=0;const m=Xs(r.rtl,this.x,this.width),g=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},v=m.textAlign(a);let x,_,w,y,E,S,P;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=nf(this,v,r),n.fillStyle=r.bodyColor,Ze(this.beforeBody,g),p=s&&v!=="right"?a==="center"?c/2+u:c+2+u:0,y=0,S=i.length;y<S;++y){for(x=i[y],_=this.labelTextColors[y],n.fillStyle=_,Ze(x.before,g),w=x.lines,s&&w.length&&(this._drawColorBox(n,t,y,m,r),f=Math.max(d.lineHeight,l)),E=0,P=w.length;E<P;++E)g(w[E]),f=d.lineHeight;Ze(x.after,g)}p=0,f=d.lineHeight,Ze(this.afterBody,g),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=Xs(r.rtl,this.x,this.width);for(t.x=nf(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=sr(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=Gs(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=kc[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=$k(this,t),l=Object.assign({},a,this._size),c=Bk(n,t,l),u=Wk(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=si(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),bI(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),xI(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!Rp(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!Rp(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=kc[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Dr={id:"tooltip",_element:Hk,positioners:kc,afterInit(e,t,n){n&&(e.tooltip=new Hk({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(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)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:LI},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const pfe=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function hfe(e,t,n,r){const i=e.indexOf(t);if(i===-1)return pfe(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const mfe=(e,t)=>e===null?null:Mn(Math.round(e),0,t);function Yk(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Io extends Bl{static id="category";static defaults={ticks:{callback:Yk}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ke(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:hfe(r,t,Se(n,t),this._addedLabels),mfe(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return Yk.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function gfe(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:g,max:v}=t,x=!Ke(a),_=!Ke(s),w=!Ke(c),y=(v-g)/(d+1);let E=UC((v-g)/m/p)*p,S,P,D,T;if(E<1e-14&&!x&&!_)return[{value:g},{value:v}];T=Math.ceil(v/E)-Math.floor(g/E),T>m&&(E=UC(T*E/m/p)*p),Ke(l)||(S=Math.pow(10,l),E=Math.ceil(E*S)/S),i==="ticks"?(P=Math.floor(g/E)*E,D=Math.ceil(v/E)*E):(P=g,D=v),x&&_&&o&&Fle((s-a)/o,E/1e3)?(T=Math.round(Math.min((s-a)/E,u)),E=(s-a)/T,P=a,D=s):w?(P=x?a:P,D=_?s:D,T=c-1,E=(D-P)/T):(T=(D-P)/E,Ic(T,Math.round(T),E/1e3)?T=Math.round(T):T=Math.ceil(T));const R=Math.max(KC(E),KC(P));S=Math.pow(10,Ke(l)?R:l),P=Math.round(P*S)/S,D=Math.round(D*S)/S;let A=0;for(x&&(f&&P!==a?(n.push({value:a}),P<a&&A++,Ic(Math.round((P+A*E)*S)/S,a,Uk(a,y,e))&&A++):P<a&&A++);A<T;++A){const C=Math.round((P+A*E)*S)/S;if(_&&C>s)break;n.push({value:C})}return _&&f&&D!==s?n.length&&Ic(n[n.length-1].value,s,Uk(s,y,e))?n[n.length-1].value=s:n.push({value:s}):(!_||D===s)&&n.push({value:D}),n}function Uk(e,t,{horizontal:n,minRotation:r}){const i=lo(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class vfe extends Bl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Ke(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=ji(i),c=ji(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=gfe(i,o);return t.bounds==="ticks"&&Lle(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return k1(t,this.chart.options.locale,this.options.ticks.format)}}class Fo extends vfe{static id="linear";static defaults={ticks:{callback:dI.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Kr(t)?t:0,this.max=Kr(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=lo(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const mm={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}},ir=Object.keys(mm);function Kk(e,t){return e-t}function qk(e,t){if(Ke(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),Kr(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(mu(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function Gk(e,t,n,r){const i=ir.length;for(let o=ir.indexOf(e);o<i-1;++o){const a=mm[ir[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return ir[o]}return ir[i-1]}function yfe(e,t,n,r,i){for(let o=ir.length-1;o>=ir.indexOf(n);o--){const a=ir[o];if(mm[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return ir[n?ir.indexOf(n):0]}function bfe(e){for(let t=ir.indexOf(e)+1,n=ir.length;t<n;++t)if(mm[ir[t]].common)return ir[t]}function Xk(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=O1(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function xfe(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function Qk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:xfe(e,r,i,n)}class Zk extends Bl{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new Cue._date(t.adapters.date);i.init(n),Rc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:qk(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Kr(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Kr(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,s=Vle(i,o,a);return this._unit=n.unit||(r.autoSkip?Gk(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):yfe(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:bfe(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),Qk(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Mn(n,0,a),r=Mn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||Gk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=mu(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)Xk(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&Xk(u,f,m),Object.keys(u).sort(Kk).map(g=>+g)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return ht(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=lo(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,Qk(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(qk(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return sI(t.sort(Kk))}}function rf(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Ua(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ua(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class zme extends Zk{static id="timeseries";static defaults=Zk.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=rf(n,this.min),this._tableRange=rf(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(rf(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return rf(this._table,r*this._tableRange+this._minPos,!0)}}const $I="label";function Jk(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wfe(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function BI(e,t){e.labels=t}function WI(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$I;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function _fe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$I;const n={labels:[],datasets:[]};return BI(n,e.labels),WI(n,e.datasets,t),n}function Efe(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),g=()=>{p.current&&(m.current=new Wn(p.current,{type:a,data:_fe(s,o),options:l&&{...l},plugins:c}),Jk(t,m.current))},v=()=>{Jk(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&wfe(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&BI(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&WI(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(v(),setTimeout(g)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(v(),setTimeout(g))},[a]),k.useEffect(()=>(g(),()=>v()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const Sfe=k.forwardRef(Efe);function $1(e,t){return Wn.register(t),k.forwardRef((n,r)=>k.createElement(Sfe,{...n,ref:r,type:e}))}const B1=$1("line",Oue),zl=$1("bar",_ue),gm=$1("doughnut",Sue);function Vt({image:e="https://cdni.iconscout.com/illustration/premium/thumb/businessman-sad-for-no-data-in-folder-illustration-svg-download-png-10155562.png",title:t="No Data Available",description:n="Catch up all the data. Change the date range to see the data."}){return h.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-[16px]",children:[h.jsx("img",{src:e,alt:"no data",className:"w-32 h-32 mb-4 opacity-80"}),h.jsx("div",{className:"text-[16px] font-semibold text-gray-900 mb-[4px]",children:t}),h.jsx("div",{className:"text-[12px] text-gray-500 max-w-[260px]",children:n})]})}Wn.register(hm,Dr,Zr);const Ofe={id:"bottomGlow",afterDatasetsDraw(e,t,n){if(!n?.enabled)return;const r=e.getDatasetMeta(0);if(!r?.data?.[0])return;const{ctx:i}=e,{x:o,y:a,innerRadius:s}=r.data[0],l=Math.max(s-2,0),c=a+l*.9,u=i.createRadialGradient(o,c,0,o,c,l*1.08);u.addColorStop(0,n.color??"rgba(186, 230, 253, 0.72)"),u.addColorStop(.3,"rgba(186, 230, 253, 0.4)"),u.addColorStop(.58,"rgba(186, 230, 253, 0.16)"),u.addColorStop(1,"rgba(186, 230, 253, 0)"),i.save(),i.beginPath(),i.arc(o,a,l,0,Math.PI*2),i.clip(),i.fillStyle=u,i.beginPath(),i.ellipse(o,c,l*1.08,l*.52,0,0,Math.PI*2),i.fill(),i.restore()}},Cfe=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthText:c="Compared to last month",totalLabel:u="Total",centerTopColor:d="#0F172A",centerBottomColor:f="#64748B",centerTopSize:p,centerBottomSize:m,showBottomGlow:g=!1,bottomGlowColor:v="rgba(186, 230, 253, 0.75)",showEmptyStateWhenZero:x=!1,widgetType:_="",resolvedWidgetType:w="",data:y})=>{const E=y?.title??e,S=y?.icon??t,P=y?.firstLabel??n,D=Number(y?.firstValue??r??0),T=y?.firstColor??i,R=y?.secondLabel??o,A=Number(y?.secondValue??a??0),C=y?.secondColor??s,j=y?.growthPercentage??l??"+0%",N=y?.growthText??c,M=y?.totalLabel??u,L=y?.widgetType??_??w,B=y?.centerTopSize??p??(L==="commercial"?34:24),V=y?.centerBottomSize??m??(L==="commercial"?14:9),z=y?.showBottomGlow??g,W=y?.bottomGlowColor??v,Q=y?.showEmptyStateWhenZero??x??y?.total_units!==void 0,G=D+A,ie=Number(y?.total_units?.current??G),J=Q&&G===0&&ie===0,re={labels:[P,R],datasets:[{data:[D,A],backgroundColor:[T,C],borderWidth:2,hoverOffset:4}]},ae={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li()},bottomGlow:{enabled:z,color:W}}},le=[{label:P,value:D,color:T},{label:R,value:A,color:C}],ue=j.toString().includes("+"),K=j.toString().includes("-"),U=ue?"#1FA05B":"#AB0000";return h.jsx(Ie,{title:E,icon:S,className:`${L==="commercial"?"h-[362px]":"h-[238px]"} !gap-[24px]`,childrenClassName:J?"h-full":"!flex-none",children:J?h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx(Vt,{})}):h.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[h.jsxs("div",{className:"col-span-5 flex flex-1 flex-col h-full gap-[12px]",children:[le.map((Z,I)=>h.jsxs("div",{children:[h.jsx("div",{className:"mb-[8px] text-[12px] text-[#64748B]",children:Z.label}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium",style:{color:Z.color},children:Z.value})]},I)),h.jsxs("div",{className:`py-[4px] text-[10px] leading-[14px] flex gap-[4px] ${L==="commercial"?"mt-[20px]":""} items-center`,style:{color:U},children:[ue&&h.jsx(oa,{}),K&&h.jsx(ia,{}),h.jsx("div",{children:j.replace("+","").replace("-","")}),h.jsx("div",{className:"text-[#64748B] text-[10px] leading-[14px] ml-[4px] whitespace-nowrap",children:N})]})]}),h.jsx("div",{className:"col-span-7",children:h.jsxs("div",{className:`${L==="commercial"?"h-[260px] max-w-[263px]":"h-[162px] w-[162px]"} relative ml-auto mr-2`,children:[h.jsx(gm,{data:re,options:ae,plugins:[Ofe]}),h.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",children:[h.jsx("div",{style:{color:d,fontSize:B,fontWeight:500,lineHeight:"28px"},children:G}),h.jsx("div",{style:{color:f,fontSize:V,fontWeight:400,lineHeight:"11px",marginTop:L==="commercial"?10:5},children:M})]})]})})]})})},eP=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return h.jsxs("div",{className:"flex flex-col gap-[4.5px] items-start",children:[h.jsx("div",{className:"w-2/3 min-w-[80px] h-[11px] rounded-full overflow-hidden",children:h.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),h.jsx("div",{className:`${o} !text-[12px] !leading-[16px] font-bold`,children:e}),h.jsx("div",{className:"!text-[12px] !leading-[16px] text-[#64748B]",children:r})]})},tP=({title:e,value:t,suffix:n,valueClass:r=""})=>h.jsxs("div",{className:"bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-[16px] flex flex-col gap-[4px] justify-center",children:[h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-[4px]",children:e}),h.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&h.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),kfe=({data:e,totalUnits:t=847,occupiedUnits:n=756,ownerCount:r=700,tenantCount:i=56,avgResidents:o=4.4,avgLeaseMonths:a=18})=>{const s=Number(e?.totalUnits??t??0),l=Number(e?.occupiedUnits??n??0),c=Number(e?.ownerCount??r??0),u=Number(e?.tenantCount??i??0),d=e?.avgResidents??o,f=e?.avgLeaseMonths??a,p=c+u;return h.jsxs("div",{children:[h.jsxs("div",{className:"bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] h-[128px] p-[16px] !mb-4",children:[h.jsxs("div",{className:"flex items-center gap-[8px] mb-[24px]",children:[h.jsx(Qb,{className:"h-[20px] w-[20px] text-[#329DFF]"}),h.jsx("div",{className:"font-medium text-[16px] leading-[20px] text-[#121212]",children:"Occupancy Overview"})]}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"leading-[16px] text-[12px] text-[#64748B]",children:"Occupied Units"}),h.jsxs("div",{className:"flex items-baseline",children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:l}),h.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",s]})]})]}),h.jsxs("div",{className:"flex items-end",children:[h.jsx(eP,{value:c,total:p,colorClass:"bg-[#8B5CF6]",label:"Owner"}),h.jsx(eP,{value:u,total:p,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),h.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[h.jsx(tP,{title:"Avg Residents Per Unit",value:d,valueClass:"text-[#8B5CF6]"}),h.jsx(tP,{title:"Avg Lease Period",value:f,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Wn.register(hm,Dr,Zr);const Pfe=({data:e,ownerCount:t=1e3,tenantCount:n=200,nonResidingOwners:r=26,growthPct:i="+9.1%"})=>{const o=Number(e?.ownerCount??t??0),a=Number(e?.tenantCount??n??0),s=Number(e?.nonResidingOwners??r??0),l=e?.growthPct??i,c=Math.max(o-s,0),u=o+a,d={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[c,a,s],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},f={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li()}}};return h.jsx(Ie,{title:"Resident Overview",icon:h.jsx(HD,{className:"h-[20px] w-[20px] text-[#8B5CF6]"}),className:"h-[238px] !gap-[24px]",children:h.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[h.jsxs("div",{className:"col-span-5 flex flex-1 flex-col h-full gap-[12px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px] mb-[8px]",children:"Total Owners"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#3C81F6]",children:o})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px] mb-[8px]",children:"Total Tenants"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#08B6D4]",children:a})]}),h.jsxs("div",{className:"py-[4px] text-[10px] leading-[14px] flex gap-[4px] text-[#1FA05B] items-center",children:[h.jsx("div",{children:l}),h.jsx("div",{className:"text-[#64748B] text-[10px] leading-[14px] ml-[4px] whitespace-nowrap",children:"Compared to last month"})]})]}),h.jsx("div",{className:"col-span-7",children:h.jsxs("div",{className:"relative h-[162px] w-[162px] ml-auto mr-2",children:[h.jsx(gm,{data:d,options:f}),h.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col gap-[5.5px] items-center justify-center text-center",children:[h.jsx("div",{style:{color:"#121212",fontSize:24,fontWeight:600,lineHeight:"28px"},children:u}),h.jsx("div",{style:{color:"#64748B",fontSize:9,fontWeight:400,lineHeight:"11.5px"},children:"Total Members"})]})]})})]})})};Wn.register(Io,Fo,Wl,Dr,Zr);const Dfe=[{label:"Owner",color:"#3C81F6"},{label:"Rented",color:"#8B5CF6"},{label:"Vacant",color:"#08B6D4"}],Afe=({data:e,blocks:t=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const n=Array.isArray(e?.blocks)&&e.blocks.length>0?e.blocks:Array.isArray(e)&&e.length>0?e:t,r=n.map(c=>c.name),i=n.map(c=>Number(c.owner??0)),o=n.map(c=>Number(c.rented??0)),a=n.map(c=>Number(c.vacant??0)),s={labels:r,datasets:[{label:"Owner",data:i,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:i.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:o,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:o.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:a,backgroundColor:"#08B6D4",barThickness:40}]},l={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({hideTitleForSingle:!1})}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return h.jsx(Ie,{title:"Block-wise Occupancy",className:"w-full h-[360px]",titleClassName:"!text-[20px] !leading-[24px] !font-semibold",children:h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(zl,{data:s,options:l})}),h.jsx("div",{className:"flex items-center justify-around pt-[12px]",children:Dfe.map(c=>h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[10px] h-[10px] rotate-45",style:{backgroundColor:c.color}}),h.jsx("span",{className:"text-[14px] leading-[18px] text-[#64748B]",children:c.label})]},c.label))})]})})};Wn.register(Io,Fo,L1,F1,Dr,Zr);const Tfe=[{label:"Move-in",color:"#12B981"},{label:"Move-out",color:"#8B5CF6"}],Nfe=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},jfe=({data:e,labels:t=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:n=[24,27,20,26,23],moveOut:r=[12,17,8,5,16]})=>{const i=Array.isArray(e?.labels)&&e.labels.length>0?e.labels:t,o=Array.isArray(e?.moveIn)&&e.moveIn.length>0?e.moveIn:n,a=Array.isArray(e?.moveOut)&&e.moveOut.length>0?e.moveOut:r,s={labels:i,datasets:[{label:"Move-in",data:o,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:a,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},l={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:c=>c.title?.[0]?Nfe(c.title[0]):"",hideTitleForSingle:!1})}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return h.jsx(Ie,{title:"Move-in/Out Trends",className:"w-full h-[360px]",titleClassName:"!text-[20px] !leading-[24px] !font-semibold",children:h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(B1,{data:s,options:l})}),h.jsx("div",{className:"flex items-center justify-around pt-[12px]",children:Tfe.map(c=>h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[10px] h-[10px] rotate-45",style:{backgroundColor:c.color}}),h.jsx("span",{className:"text-[14px] leading-[18px] text-[#64748B]",children:c.label})]},c.label))})]})})};Wn.register(Io,Fo,L1,F1,Dr,Zr);const Mfe=[{label:"Income",className:"bg-gradient-to-r from-[#8CEAE5] to-[#40A39E]"},{label:"Expenditure",className:"bg-gradient-to-r from-[#D86E6E] to-[#AB0000]"}],Rfe=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},Ife=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],Ffe=[24,27,20,26,23],Lfe=[4,17,8,5,16],zI=({data:e,labels:t,moveIn:n,moveOut:r})=>{const i=Array.isArray(e?.labels)&&e.labels.length>0?e.labels:Array.isArray(t)&&t.length>0?t:Ife,o=Array.isArray(e?.moveIn)&&e.moveIn.length>0?e.moveIn:Array.isArray(n)&&n.length>0?n:Ffe,a=Array.isArray(e?.moveOut)&&e.moveOut.length>0?e.moveOut:Array.isArray(r)&&r.length>0?r:Lfe,s={labels:i,datasets:[{label:"Income",data:o,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:a,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},l={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:c=>c.title?.[0]?Rfe(c.title[0]):"",hideTitleForSingle:!1})}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(B1,{data:s,options:l})}),h.jsx("div",{className:"flex items-center justify-around mt-[16px]",children:Mfe.map(c=>h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:`size-[7px] rotate-45 ${c.className}`,style:{backgroundColor:c.color}}),h.jsx("span",{className:"text-[14px] leading-[20px] text-[#64748B]",children:c.label})]},c.label))})]})};function nP({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return h.jsxs("div",{className:`rounded-[12px] p-[16px] ${r} !border !border-[#EBEBEB] !pr-[0px] !mr-[0px] h-[126px]`,children:[h.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),h.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),h.jsxs("div",{className:"mt-[8px] flex items-center gap-[4px] leading-[14px] text-[10px]",children:[h.jsx("div",{className:`
300
300
  ${n?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FBF4F4] text-[#EF4444]"} p-[4px] rounded-[4px] font-medium
301
301
  `,children:i}),h.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function $fe({data:e={}}){const t=e?.incomeCard??{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-gradient-to-b from-[#FCFAFC] to-[#FFFFFF]/0",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"},n=e?.expenditureCard??{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-gradient-to-b from-[#FCFAFC] to-[#FFFFFF]/0",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"};return h.jsxs(Ie,{title:"Accounting",className:"w-full h-[523px] gap-[35.5px]! p-[24px]!",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[h.jsx(nP,{...t}),h.jsx(nP,{...n})]}),h.jsx("div",{className:"h-[254px] mt-[35.5px]",children:h.jsx(zI,{data:e?.incomeExpenditure})})]})}Wn.register(Io,Fo,Wl,Dr,Zr);const Bfe=[{label:"Budget",color:"#B4DBFF"},{label:"Actual",color:"#3C82F6"}],Wfe=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],zfe=[55e3,56e3,64e3,38e3,54e3,65e3],Vfe=[63e3,48e3,51300,28e3,42e3,35e3],Hfe=({data:e={}})=>{const t=Array.isArray(e?.labels)&&e.labels.length>0?e.labels:Wfe,n=Array.isArray(e?.budgetValues)&&e.budgetValues.length>0?e.budgetValues:zfe,r=Array.isArray(e?.actualValues)&&e.actualValues.length>0?e.actualValues:Vfe,i={labels:t,datasets:[{label:"Budget",data:n,backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:r,backgroundColor:"#3B82F6",barThickness:60}]},o={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:a=>a.title?.[0]||"",hideTitleForSingle:!1,rowsFormatter:a=>(a.dataPoints||[]).map(s=>({label:s.dataset.label||s.label,value:`AED ${(Number(s.raw??0)/1e3).toFixed(1)}K`,color:s.dataset.backgroundColor}))})}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:a=>`${a/1e3}K`}}}};return h.jsx(Ie,{title:"Budget vs Actuals",className:"w-full h-[362px] !p-[24px] !gap-[20px]",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(zl,{data:i,options:o})}),h.jsx("div",{className:"flex items-center justify-center gap-20 pt-[12px]",children:Bfe.map(a=>h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[10px] h-[10px] rotate-45",style:{backgroundColor:a.color}}),h.jsx("span",{className:"text-[14px] leading-[18px] text-[#64748B]",children:a.label})]},a.label))})]})})},Yfe=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],Ufe=({data:e})=>{const t=Array.isArray(e?.accounts)&&e.accounts.length>0?e.accounts:Array.isArray(e)&&e.length>0?e:Yfe,n=t.reduce((i,o)=>i+o.amount,0),r=i=>i>=1e6?`AED ${(i/1e6).toFixed(2)}M`:i>=1e3?`AED ${(i/1e3).toFixed(1)}K`:`AED ${i}`;return h.jsxs(Ie,{title:"Cash & Bank Balance",className:"w-full h-[362px] !p-[24px] relative",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",childrenClassName:"!space-y-[0px]",children:[h.jsx("div",{className:"flex flex-col gap-[16px] pb-[16px] max-h-[230px] overflow-y-auto hide-scrollbar",children:t.map((i,o)=>h.jsxs("div",{className:"flex items-center justify-between bg-gradient-to-b from-[#FCFAFC] to-[#FFFFFF]/0 border-[0.5px] border-[#EBEBEB] rounded-[12px] p-[12px]",children:[h.jsxs("div",{className:"flex flex-col gap-[8px]",children:[h.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:i.title}),h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:i?.subtitle})]}),h.jsx("div",{className:"flex flex-col items-end",children:h.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#1FA05B]",children:r(i.amount)})})]},o))}),h.jsx("div",{className:"absolute left-0 bottom-[66px] w-full border-t border-[#EBEBEB]"}),h.jsx("div",{className:"w-full absolute left-0 bottom-[12px]",children:h.jsxs("div",{className:"pt-[20px] px-[34px] p-[12px] flex items-center justify-between",children:[h.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:"Total"}),h.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#1FA05B]",children:r(n)})]})})]})};Wn.register(Io,Fo,Wl,Dr,Zr);const Kfe=[{label:"Current Month",value:13e3,units:18},{label:"1-3 Months",value:9400,units:12},{label:"3-6 Months",value:8800,units:18},{label:"6+ Months",value:7200,units:6}],qfe=({data:e})=>{const t=Array.isArray(e?.items)&&e.items.length>0?e.items:Array.isArray(e)&&e.length>0?e:Kfe,n=t.map(s=>s.label),r=t.map(s=>Number(s.value??0)),i=t.map(s=>Number(s.units??0)),o={labels:n,datasets:[{label:"Due",data:r,backgroundColor:"#EF4444",barThickness:60}]},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:s=>s.title?.[0]||"",hideTitleForSingle:!1,rowsFormatter:s=>{const l=s.dataPoints?.[0];return l?[{label:"Due",value:`AED ${(Number(l.raw??0)/1e3).toFixed(1)}K`,color:l.dataset.backgroundColor},{label:"Units Count",value:`${i[l.dataIndex]??0}`,color:l.dataset.backgroundColor}]:[]}})}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:s=>`${s/1e3}K`}}}};return h.jsxs(Ie,{title:"Dues Ageing",className:"w-full h-[362px] !gap-[24px] !p-[24px]",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",childrenClassName:"!space-y-[24px]",children:[h.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px]",children:n.map((s,l)=>h.jsx("div",{className:"p-[8px] rounded-[4px] bg-[#F8FAFC]",children:h.jsxs("div",{className:"flex justify-between items-start",children:[h.jsx("div",{className:"font-medium !leading-[16px] !text-[12px] rounded",children:s}),h.jsxs("div",{className:"text-right",children:[h.jsxs("div",{className:"text-[#AB0000] font-medium !leading-[16px] !text-[12px]",children:["AED ",(r[l]/1e3).toFixed(1),"K"]}),h.jsxs("div",{className:"mt-[2px] text-[#64748B] !leading-[14px] !text-[10px] tracking-[-2%]",children:[i[l]," Units"]})]})]})},s))}),h.jsx("div",{className:"h-[192px]",children:h.jsx(zl,{data:o,options:a})})]})};Wn.register(hm,Dr,Zr);const Gfe=[{label:"Maintenance",value:45e4,color:"#08B6D4"},{label:"Utilities",value:32e4,color:"#8B5CF6"},{label:"Security",value:28e4,color:"#EF4444"},{label:"Administration",value:18e4,color:"#F69E0A"},{label:"Others",value:12e4,color:"#12B981"}],Xfe=({data:e})=>{const t=Array.isArray(e?.items)&&e.items.length>0?e.items:Array.isArray(e)&&e.length>0?e:Gfe,n=t.map(l=>l.label),r=t.map(l=>Number(l.value??0)),i=t.map(l=>l.color),o={labels:n,datasets:[{label:"Expenses",data:r,backgroundColor:i,borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},a=r.reduce((l,c)=>l+c,0),s={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({rowsFormatter:l=>(l.dataPoints||[]).map(c=>({label:c.label,value:`AED ${c.formattedValue}`,color:Array.isArray(c.dataset.backgroundColor)?c.dataset.backgroundColor[c.dataIndex]:c.dataset.backgroundColor}))})}}};return h.jsxs(Ie,{title:"Expense Categories",className:"w-full h-[523px] p-[24px]!",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:[h.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[h.jsx(gm,{data:o,options:s}),h.jsxs("div",{className:"absolute text-center",children:[h.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(a/1e6).toFixed(2),"M"]}),h.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px] mt-[8px]",children:"Total Expenses"})]})]}),h.jsx("div",{className:"space-y-[16px]",children:n.map((l,c)=>h.jsxs("div",{className:"flex justify-between items-center text-[14px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B] tracking-[-2%]",children:[h.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:o.datasets[0].backgroundColor[c]}}),l]}),h.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B] tracking-[-2%]",children:["AED ",(r[c]/1e3).toFixed(0),"K"]})]},l))})]})},Qfe=[{name:"Gym Equipment",value:1e6,color:"#08B6D4"},{name:"Security",value:8e5,color:"#EF4444"},{name:"Others",value:6e5,color:"#F59E0B"},{name:"Pool Maintenance",value:7e5,color:"#8B5CF6"},{name:"Administration",value:52e4,color:"#10B981"}];function Zfe({data:e,currency:t="AED"}){const n=Array.isArray(e)&&e.length>0?e:Qfe,r=n.reduce((o,a)=>o+Number(a.value??0),0);let i="";return r>=1e6?i=`${(r/1e6).toFixed(2)}M`:r>=1e3?i=`${(r/1e3).toFixed(2)}K`:i=r.toString(),h.jsx(Ie,{title:"Asset Value Breakdown",className:"w-full h-[362px]",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:r>0?h.jsxs("div",{className:"flex flex-col items-center justify-center",children:[h.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:n,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:n.map((o,a)=>h.jsx(Ln,{fill:o.color},`cell-${a}`))}),h.jsx(kt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none",zIndex:9999},allowEscapeViewBox:{x:!0,y:!0},content:Au({data:n,formatter:o=>`${t} ${Number(o).toLocaleString()}`})})]})}),h.jsx("div",{className:"absolute inset-0 pointer-events-none flex flex-col items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center justify-center",children:[h.jsxs("div",{className:"font-semibold text-[18px] leading-[12px] mb-[6px]",children:[t," ",i]}),h.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})})]}),h.jsxs("div",{className:"flex justify-between w-full px-[8px] sm:px-[12px] mt-4 text-[14px]",children:[h.jsx("div",{className:"flex flex-col gap-[12px]",children:n.slice(0,3).map(o=>h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:o.color}}),h.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:o.name})]},o.name))}),h.jsx("div",{className:"flex flex-col gap-[12px] items-start",children:n.slice(3).map(o=>h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:o.color}}),h.jsx("div",{className:"text-[#64748B] !leading-[16px] !text-[12px] ",children:o.name})]},o.name))})]})]}):h.jsx("div",{className:"h-full flex items-center justify-center",children:h.jsx(Vt,{})})})}Wn.register(Io,Fo,Wl,Dr,Zr);const Jfe=[{label:"Gym",value:13e3,units:18},{label:"Parking",value:9400,units:12},{label:"Swimming Pool",value:8800,units:18},{label:"Community Hall",value:7200,units:6},{label:"Tennis Court",value:6e3,units:10}],epe=({data:e})=>{const t=Array.isArray(e)&&e.length>0?e:Jfe,n=t.map(u=>u.label),r=t.map(u=>Number(u.value??0)),i=t.map(u=>Number(u.units??0)),o=Math.max(...r,0),a=o<=1e3?1e3:Math.ceil(o/1e3)*1e3,s=a<=1e3?100:a/5,l={labels:n,datasets:[{label:"Due",data:r,backgroundColor:"#8B5CF6",barThickness:60}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:u=>u.title?.[0]||"",hideTitleForSingle:!1,rowsFormatter:u=>{const d=u.dataPoints?.[0];return d?[{label:"Revenue",value:`AED ${(Number(d.raw??0)/1e3).toFixed(1)}K`,color:d.dataset.backgroundColor},{label:"Units Count",value:`${i[d.dataIndex]??0}`,color:d.dataset.backgroundColor}]:[]}})}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,max:a,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:s,callback:u=>`${Number(u)/1e3}K`}}}};return h.jsx(Ie,{title:"Revenue by Category",className:"w-full h-[362px] p-[24px]! gap-[29px]!",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsx(zl,{data:l,options:c})})};function tpe(e){return yt({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z"},child:[]}]})(e)}/**
302
302
  * @license lucide-react v0.564.0 - ISC
@@ -477,6 +477,6 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
477
477
  ${i?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FBF4F4] text-[#EF4444]"} p-[4px] rounded-[4px] font-medium
478
478
  `,children:n}),h.jsx("div",{className:"text-slate-500",children:r})]})]})}const the=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:VD,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:tpe,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:KI,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:HI,iconColor:"text-[#AB0000]"}];function nhe({data:e}){const t=Array.isArray(e)&&e.length>0?e:the;return console.log(e,"carrrr"),h.jsx("div",{className:"px-[20px] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:t.map((n,r)=>h.jsx(ehe,{...n},r))})}const St=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,rightContent:f,onCalendarClick:p,onPrevClick:m,onNextClick:g})=>{const v=s==="semi-bold"?600:500;return h.jsxs("div",{className:`relative bg-white p-[24px] !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[t&&h.jsx("div",{className:c,children:t}),h.jsx("div",{style:{fontWeight:v,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),h.jsxs("div",{className:"flex items-center gap-[12px]",children:[f&&f,n&&!r&&h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&h.jsxs("div",{className:"flex items-center gap-[12px] px-[16px] py-[8px] rounded-[8px] bg-white text-sm text-[#64748B]",children:[h.jsx(fpe,{size:16,className:"text-[#64748B] cursor-pointer",onClick:p}),h.jsx(W1,{size:16,className:"cursor-pointer",onClick:m}),h.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),h.jsx(z1,{size:16,className:"cursor-pointer",onClick:g})]})]})]}),h.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&h.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})},rhe={completed:18,not_completed:6,missed:4};function ihe({data:e={}}){const t=e&&Object.keys(e).length>0?e:rhe,n=[{name:"Completed",value:Number(t?.completed??0),color:"#12B981"},{name:"Delayed",value:Number(t?.not_completed??0),color:"#EF4444"},{name:"Missed",value:Number(t?.missed??0),color:"#F69E0A"}],r=Number(t?.completed??0)+Number(t?.not_completed??0)+Number(t?.missed??0),i=Number(t?.completed??0);return h.jsx(St,{title:"Guard Patrols",className:"h-[362px]",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsxs("div",{className:"flex flex-col items-center justify-center",children:[h.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:n??[],innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:n?.map?.((o,a)=>h.jsx(Ln,{fill:o?.color??"#ccc"},`cell-${a}`))}),h.jsx(kt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none",zIndex:9999},allowEscapeViewBox:{x:!0,y:!0},content:Au({data:n})})]})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[i??0,"/",r??0]}),h.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),h.jsx("div",{className:"flex flex-col w-full text-[14px]",children:n?.length?n?.map?.((o,a)=>h.jsxs("div",{className:`flex items-center justify-between py-[10px] ${a!==(n?.length??0)-1,""}`,children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:o.color}}),h.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:o.name})]},o.name),h.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:o?.value??0})]},o?.name??a)):h.jsx("div",{className:"text-center text-gray-400 text-sm py-[24px]",children:"No patrol data"})})]})})}Wn.register(Io,Fo,L1,F1,Dr,Zr);const ohe=["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],of={guest:[9,5,12,7,3,6,4],cab:[15,12,10,14,7,12,8],delivery:[22,18,16,20,22,14,17],service:[13,12,8,9,5,10,7]},ahe=[{key:"Guest",datasetIndex:0,color:"#EF4444"},{key:"Cab",datasetIndex:1,color:"#7C3AED"},{key:"Delivery",datasetIndex:2,color:"#10B981"},{key:"Service",datasetIndex:3,color:"#F59E0B"}],she=({color:e,size:t=12})=>h.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:e}}),lhe=({chartRef:e})=>{const[t,n]=k.useState({}),r=i=>{const o=e.current;if(!o)return;const a=o.getDatasetMeta(i),s=!!a.hidden;a.hidden=!s,o.update(),n(l=>({...l,[i]:!s}))};return h.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"76px",marginTop:"10px",paddingBottom:"8px",flexWrap:"wrap"},children:ahe.map(({key:i,datasetIndex:o,color:a})=>{const s=!!t[o];return h.jsxs("div",{onClick:()=>r(o),style:{display:"flex",alignItems:"center",gap:"6px",cursor:"pointer",userSelect:"none",opacity:s?.45:1,transition:"opacity 0.2s ease"},children:[h.jsx(she,{color:a,size:12}),h.jsx("span",{style:{fontSize:"13px",color:"#64748B",fontWeight:400,lineHeight:1,textDecoration:s?"line-through":"none",transition:"text-decoration 0.15s ease"},children:i})]},i)})})},che=({data:e})=>{const t=k.useRef(null),r={labels:Array.isArray(e?.labels)&&e.labels.length>0?e.labels:ohe,datasets:[{label:"Guest",data:Array.isArray(e?.guest)&&e.guest.length>0?e.guest:of.guest,borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:Array.isArray(e?.cab)&&e.cab.length>0?e.cab:of.cab,borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:Array.isArray(e?.delivery)&&e.delivery.length>0?e.delivery:of.delivery,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:Array.isArray(e?.service)&&e.service.length>0?e.service:of.service,borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li({titleFormatter:o=>o.title?.[0]||"",hideTitleForSingle:!1})}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return h.jsxs(Ie,{title:"Hourly Traffic Flow",className:"w-full h-[362px] gap-[36px]! p-[24px]!",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:[h.jsx("div",{style:{height:"calc(100% - 44px)",width:"100%"},children:h.jsx(B1,{ref:t,data:r,options:i})}),h.jsx(lhe,{chartRef:t})]})},uhe={open:4,in_progress:7,closed:12},dhe=[{incident_code:"INC-401",severity_level:"L1",severity:"Danger"},{incident_code:"INC-402",severity_level:"L2",severity:"High"},{incident_code:"INC-403",severity_level:"L3",severity:"Low"}];function fhe({incidentReports:e={},incidentReportsDetails:t=[]}){const n=e&&Object.keys(e).length>0?e:uhe,r=Array.isArray(t)?t:dhe,i=Number(n?.open??0),o=Number(n?.in_progress??0),a=Number(n?.closed??0);return h.jsxs(St,{title:"Incident Reports",className:"h-[362px] space-y-[24px]!",childrenClassName:"mt-0! h-full",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:[h.jsxs("div",{className:"flex w-full text-center gap-[16px]",children:[h.jsxs("div",{className:"flex-1 p-[12px] space-y-[8px]! bg-[#FBF4F4] h-[76px] rounded",children:[h.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:i??0}),h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),h.jsxs("div",{className:"flex-1 p-[12px] space-y-[8px]! bg-[#FFFBF2] h-[76px] rounded",children:[h.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:o??0}),h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),h.jsxs("div",{className:"flex-1 p-[12px] space-y-[8px]! bg-[#F7FEFA] h-[76px] rounded",children:[h.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:a??0}),h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),h.jsx("div",{className:"h-full space-y-2",children:r?.length?r?.map?.((s,l)=>{const c=s?.severity==="Danger"?"text-[#AB0000]":s?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return h.jsxs("div",{className:"flex items-center justify-between p-[8px] bg-[#FAFBFD] rounded-[4px]!",children:[h.jsx("div",{className:"flex items-center gap-[8px]",children:h.jsx("div",{className:"text-[!121212] font-medium text-[14px]! leading-[18px]!",children:s?.incident_code??"-"})}),h.jsx("div",{className:`!text-[12px] leading-[16px]! font-semibold flex items-center gap-[4px] ${c}`,children:h.jsxs("div",{children:[s?.severity_level??"-"," - ",s?.severity??"-"]})})]},l)}):h.jsx("div",{className:"h-[calc(100%-116px)] flex flex-1 justify-center items-center text-center text-[#64748B] text-[12px] ",children:"No incidents found"})})]})}const phe=[{total_staff:42,absent_staff:6}],hhe=[{staff_role_name:"Security Guard",total_staff:18,present_staff:16},{staff_role_name:"Supervisor",total_staff:8,present_staff:7},{staff_role_name:"Technician",total_staff:10,present_staff:9},{staff_role_name:"Technician",total_staff:10,present_staff:9}];function qI({staffPresentAbsent:e,staffPresentByRole:t}){const n=Array.isArray(e)&&e.length>0?e:phe,r=Array.isArray(t)&&t.length>0?t:hhe,i=n?.[0]?.total_staff??0,o=n?.[0]?.absent_staff??0,a=(i??0)-(o??0);return h.jsx(St,{title:"Staff Attendance",className:"h-[362px] overflow-hidden",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsxs("div",{children:[h.jsxs("div",{className:"flex gap-[16px] text-center mt-[24px]",children:[h.jsxs("div",{className:"flex-1 p-[12px] space-y-[8px]! bg-[#F7FEFA] rounded",children:[h.jsx("div",{className:"text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:a??0}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),h.jsxs("div",{className:"flex-1 p-[12px] space-y-[8px]! bg-[#FBF4F4] rounded h-[76px]",children:[h.jsx("div",{className:"text-[24px] leading-[28px] font-medium text-[#AB0000]",children:o??0}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),h.jsx("div",{className:"mt-[24px] pb-[16px] space-y-[12px] overflow-y-auto max-h-[200px] hide-scrollbar",children:r?.length?r?.map?.((s,l)=>{const c=Number(s?.total_staff??0),u=Number(s?.present_staff??0);return h.jsxs("div",{className:"flex items-center justify-between p-[12px] bg-[#F8FAFC] rounded-md",children:[h.jsx("div",{className:"text-[#121212] text-[14px] leading-[18px] font-medium",children:s?.staff_role_name??"-"}),h.jsxs("div",{className:"text-[14px] leading-[20px] text-[#64748B]",children:[u??0,"/",c??0]})]},l)}):h.jsx(h.Fragment,{})})]})})}function mhe(e){return yt({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"},child:[]}]})(e)}function ghe({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=ch,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return h.jsxs(Ie,{title:e,icon:h.jsx("div",{className:"size-[20px] grid place-items-center",children:h.jsx(o,{className:`size-[20px] ${a}`})}),titleClassName:"!text-[#64748B] !leading-[20px] tracking-[-2%]",childrenClassName:"!space-y-[8px]",children:[h.jsx("div",{className:"!text-[28px] !leading-[32px] font-semibold tracking-tight text-[#121212]",children:t}),h.jsxs("div",{className:"flex items-center gap-[4px] leading-[16px] text-[12px]",children:[h.jsx("div",{className:`
479
479
  ${i?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FBF4F4] text-[#EF4444]"} p-[4px] rounded-[4px] font-medium
480
- `,children:n}),h.jsx("div",{className:"!text-[#64748B]",children:r})]})]})}const vhe=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Qb,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:fse,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:mhe,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:G8,iconColor:"text-[#36AB6C]"}];function yhe({data:e}){const t=Array.isArray(e)&&e.length>0?e:vhe;return h.jsx("div",{className:"px-[20px] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:t.map((n,r)=>h.jsx(ghe,{...n},r))})}const bhe=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],xhe=(e="")=>e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/<[^>]*>/g,"").trim();function whe({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:xhe(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):bhe;return h.jsx(Ie,{title:"Complaints",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",className:"w-full h-[362px] p-[24px]!",children:h.jsx("div",{className:"flex flex-col gap-[12px] max-h-full overflow-y-auto hide-scrollbar",children:t.map((n,r)=>h.jsxs("div",{className:"flex items-center justify-between bg-[#F8FAFC] rounded-[4px] p-[12px]",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),h.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),h.jsxs("div",{className:"flex flex-col items-end gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#AB0000]",children:String(n.pending).padStart(2,"0")}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const _he=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],Ehe=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return h.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[h.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),h.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},She=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:_he).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return h.jsxs(Ie,{title:"Complaints by Level",className:"w-full h-[362px] p-[24px]! gap-[18px]!",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:[h.jsx(Pt,{width:"100%",height:"85%",children:h.jsxs(Mo,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[h.jsx(fr,{strokeDasharray:"0",vertical:!1}),h.jsx(Gn,{dataKey:"level"}),h.jsx($n,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),h.jsx(kt,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},allowEscapeViewBox:{x:!0,y:!0},content:a=>!a.active||!a.payload||!a.payload.length?null:h.jsx(Zt,{...a,data:t,children:h.jsxs("div",{className:"bg-[#121212] rounded-[10px] px-[14px] py-[10px] text-[12px] text-white",children:[h.jsx("div",{className:"mb-[6px] font-semibold",children:a.label}),a.payload.map((s,l)=>{const c=s.color||s.fill||"#fff";return h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{backgroundColor:c}}),h.jsx("span",{className:"text-[#D1D3D4]",children:s.name}),h.jsx("span",{className:"text-white font-semibold",children:s.value})]},l)})]})})}),h.jsx(Gt,{dataKey:"open_count",name:"Open",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),h.jsx(Gt,{dataKey:"in_progress_count",name:"In Progress",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),h.jsx(Gt,{dataKey:"closed_count",name:"Closed",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),h.jsx(Ehe,{})]})},Ohe=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function Che({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):Ohe;return h.jsx(Ie,{title:"Request Box",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",className:"w-full h-[362px] p-[24px]!",children:h.jsx("div",{className:"flex flex-col gap-[12px] max-h-full overflow-y-auto hide-scrollbar",children:t.map((n,r)=>h.jsxs("div",{className:"flex items-center justify-between bg-[#F8FAFC] rounded-[4px] p-[12px]",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),h.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),h.jsxs("div",{className:"flex flex-col items-end gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#AB0000]",children:String(n.pending).padStart(2,"0")}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function khe(e){return yt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}const Phe=["open_complaints","pending_requests","avg_response_time","resolution_rate"],Dhe={open_complaints:{title:"Open Complaints",Icon:VD,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:khe,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:nW,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:eW,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},Ahe=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>h.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),The={primary:{size:28,lineHeight:32,weight:500}},Nhe={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function jhe({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?h.jsx(oP,{id:e,data:t}):h.jsx("div",{className:"px-[20px] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[16px]",children:Phe.map(n=>h.jsx(oP,{id:n},n))})}function oP({id:e,data:t}){const n=Dhe[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=ch,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:Nhe[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,h.jsx("div",{className:"h-[132px]",children:h.jsxs(Ie,{title:i,titleColor:a,icon:h.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:h.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[h.jsx(Ahe,{...The.primary,children:c}),h.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[h.jsx(Du,{value:u}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}const Mhe=[{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"},{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"},{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"},{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"}];function Rhe({title:e,date:t,rsvp:n,utilisation:r,status:i}){return h.jsxs("div",{className:"bg-[#F8FAFC] p-[12px] rounded-[4px]",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),h.jsx("div",{className:`!text-[12px] leading-[16px] font-medium p-[4px] rounded-[4px] ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),h.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),h.jsxs("div",{className:"mt-[8px] flex justify-between items-center",children:[h.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),h.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),h.jsx("div",{className:"mt-[8px] w-full bg-[#F8FAFC] h-[6px] rounded",children:h.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function Ihe({data:e}){const t=Array.isArray(e)&&e.length===0,n=Array.isArray(e)?e:Mhe;return h.jsx(Ie,{title:"Events Utilisation",className:"w-full h-[360px] p-[24px]!",childrenClassName:t?"h-full":"overflow-y-auto hide-scrollbar",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsx("div",{className:`w-full h-full ${t?"flex items-center justify-center":"space-y-[12px]"}`,children:n?.length>0?n.map((r,i)=>h.jsx(Rhe,{...r},`${r.title}-${i}`)):h.jsx(Vt,{})})})}const Fhe=[{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"},{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"},{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"},{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"}];function Lhe({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return h.jsxs("div",{className:`border-[0.5px] border-[#EBEBEB] rounded-[12px] p-[16px] ${r} h-[124px]`,children:[h.jsx("div",{className:`text-[16px] leading-[20px]! tracking-[-2%] font-medium ${i}`,children:e}),h.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),h.jsx("div",{className:"mt-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:n})]})}function $he({data:e}){const t=Array.isArray(e)&&e.length>0?e:Fhe;return h.jsx(Ie,{title:"Notice Board Status",className:"w-full h-[360px] !p-[24px]",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsx("div",{className:"grid grid-cols-2 gap-[24px]",children:t.map((n,r)=>h.jsx(Lhe,{...n},`${n.label}-${r}`))})})}function Bhe({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=ch,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50",iconUrl:l}){return h.jsx(Ie,{title:e,icon:h.jsx("div",{className:"grid place-items-center ",children:l?h.jsx("img",{src:l,alt:"icon",className:"h-8 w-8 object-contain"}):h.jsx(o,{className:`h-8 w-8 ${a}`})}),className:"h-[132px]",children:h.jsxs("div",{children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),h.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[h.jsx(Du,{value:n}),h.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function Whe({data:e}){const t=[{title:e?.title||"Total Bookings",value:e?.value??0,delta:e?.delta??"0%",deltaLabel:e?.deltaLabel||"Compared to last month",positive:e?.positive??!1,Icon:e?.Icon,iconUrl:e?.iconUrl,iconColor:e?.iconColor||"text-emerald-600",iconBg:e?.iconBg||"bg-emerald-50"}];return h.jsx("div",{className:"h-full",children:t.map((n,r)=>h.jsx(Bhe,{...n},r))})}function zhe({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,icon:o,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return h.jsxs(Ie,{title:e,icon:h.jsx("div",{className:"size-[20px] grid place-items-center",children:h.jsx("img",{src:o,alt:e})}),className:"h-[132px]",titleClassName:"text-[#64748B]! leading-[20px]",childrenClassName:"space-y-[8px]!",children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),h.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[h.jsx(Du,{value:n}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:r})]})]})}const Vhe=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902569/notice_djcorh.svg"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902568/post_rivboo.svg"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902569/poll_b43jo0.svg"},{title:"Survey",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902568/survey_yevzwi.svg"}];function Hhe({data:e}){const t=Array.isArray(e)&&e.length>0?e:Vhe;return h.jsx("div",{className:"px-[20px] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:t.map((n,r)=>h.jsx(zhe,{...n},r))})}const aP=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#3C81F6]"?"text-[#8B5CF6]":n==="bg-[#8B5CF6]"?"text-[#12B981]":"text-slate-600";return h.jsxs("div",{className:"flex flex-col items-start",children:[h.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:h.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),h.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},GI=({data:e,occupiedUnits:t=1,EmployeesCount:n=8910,AdminsCount:r=910})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return h.jsx("div",{children:h.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px] h-[128px]",children:[h.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[h.jsx(Qb,{className:"!text-[20px] text-[#329DFF]"}),h.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})]}),h.jsxs("div",{className:"flex items-end gap-[4px]",children:[h.jsx(aP,{value:o??0,total:s||1,colorClass:"bg-[#3C81F6]",label:(o??0)<=1?"Employee":"Employees"}),h.jsx(aP,{value:a??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:(a??0)<=1?"Admin":"Admins"})]})]})]})})};Wn.register(Io,Fo,Wl,Dr);const XI=({data:e})=>{const t=e!=null,n=e?.employee_data,r=["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],i=[2e3,1700,1500,1200,900,800],o=[],a=[];if(t){if(n&&n.length>0)for(let d=0;d<n.length;d++)o.push(n[d].name),a.push(n[d].employees)}else for(let d=0;d<r.length;d++)o.push(r[d]),a.push(i[d]);let s=!1;if(t)if(!n||n.length===0)s=!0;else{s=!0;for(let d=0;d<n.length;d++)if(n[d].employees!==0){s=!1;break}}let l=0;for(let d=0;d<a.length;d++)a[d]>l&&(l=a[d]);const c={labels:o,datasets:[{data:a,backgroundColor:[],barThickness:34}]};for(let d=0;d<a.length;d++)c.datasets[0].backgroundColor.push("#3C81F6");const u={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:d=>`Employees: ${d.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:l>0?l+5:2e3,ticks:{stepSize:l>0?Math.ceil((l+5)/5):500,color:"#64748B",callback:d=>d},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return t&&s?h.jsx(Ie,{className:"w-full h-[238px]",title:"Employee Footfall",period:"Today",icon:h.jsx(iP,{className:"!text-[24px] text-[#8B5CF6]"}),children:h.jsx("div",{className:"h-full flex items-center justify-center",children:h.jsx(Vt,{title:"No Employee footfall Found",description:"Catch up all the data. Change the date range to see the data."})})}):h.jsxs(Ie,{className:"w-full h-[238px]",title:"Employee Footfall",period:"Today",icon:h.jsx(iP,{className:"!text-[24px] text-[#8B5CF6]"}),children:[h.jsxs("div",{className:"mb-[10px] mt-[8px] flex flex-col gap-[4px]!",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),h.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#3C81F6]",children:t?e.total_employees:7500})]}),h.jsx("div",{className:"h-[110px]",children:h.jsx(zl,{data:c,options:u})})]})},Yhe="Rs",sP=["bg-blue-500","bg-red-500","bg-purple-700"],Ca={title:"Food & Beverages (Static Data)",period:"Today",summary:{totalOrders:247,revenueGenerated:"82K",growthPercentage:8,growthTotalPercentage:0},outlets:[{name:"HP",orders:120,revenue:"45K",percentage:70,color:"bg-[#3C81F6]"},{name:"Adobe",orders:85,revenue:"23K",percentage:50,color:"bg-[#3C81F6]"},{name:"Anarock",orders:42,revenue:"14K",percentage:25,color:"bg-[#3C81F6]"}]};function Vp(e,t=null){if(typeof e=="number")return e;if(typeof e=="string"){const n=Number(e.replace("%","").trim());return Number.isNaN(n)?t:n}return t}function lP(e){if(e==null||e==="")return"0";if(typeof e=="number")return tE(e);const t=Number(e);return Number.isNaN(t)?String(e):tE(t)}function Uhe(e){const t=e?.food_beverage_summary?{title:e?.title,period:e?.period,summary:{totalOrders:e?.food_beverage_summary?.total_orders,revenueGenerated:e?.food_beverage_summary?.revenue_generated,growthPercentage:e?.food_beverage_summary?.growth_percentage??e?.food_beverage_summary?.revenue_growth,growthTotalPercentage:e?.food_beverage_summary?.order_growth,currencyType:e?.food_beverage_summary?.currency_type},outlets:e?.chart_data}:e||{},n=t?.summary||{},i=(Array.isArray(t?.outlets)?t.outlets:[]).map((f,p)=>({name:f?.name||f?.outlet_name||f?.tenant_name||f?.company_name||"Unknown",orders:f?.orders??f?.total_orders??f?.count??0,revenue:f?.revenue??f?.revenue_generated??f?.total_revenue??0,percentage:f?.percentage,color:f?.color||sP[p%sP.length]})),o=n?.totalOrders??n?.orders??Ca.summary.totalOrders,a=n?.revenueGenerated??n?.revenue??Ca.summary.revenueGenerated,s=Vp(n?.growthPercentage??n?.revenueGrowth,Ca.summary.growthPercentage),l=Vp(n?.growthTotalPercentage??n?.orderGrowth,Ca.summary.growthTotalPercentage),c=n?.currencyType||n?.currency||Yhe,u=i.reduce((f,p)=>f+(Number(p?.orders)||0),0),d=i.map(f=>({...f,percentage:f?.percentage!==null&&f?.percentage!==void 0?Number(f.percentage)||0:u>0?Math.round((Number(f?.orders)||0)/u*100):0}));return{title:t?.title||Ca.title,period:t?.period||Ca.period,summary:{totalOrders:o,revenueGenerated:a,growthPercentage:s,growthTotalPercentage:l,currencyType:c},outlets:d.length>0?d:Ca.outlets}}function QI({data:e,title:t,period:n,icon:r}){const i=Uhe(e),o=t||i.title,a=n||i.period,s=r||h.jsx(Qpe,{className:"!text-[24px] text-[#FA7E28]"}),l=i.summary.totalOrders??0,c=lP(i.summary.revenueGenerated),u=Vp(i.summary.growthPercentage,0),d=Vp(i.summary.growthTotalPercentage,0),f=u>=0,p=d>=0;return h.jsx(Ie,{className:"h-[324px]",title:o,period:a,icon:s,children:h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"flex gap-[24px]",children:[h.jsxs("div",{className:"w-full flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:l}),h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] ${p?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[p?h.jsx(oa,{}):h.jsx(ia,{}),d,"%",h.jsx("span",{children:"from last month"})]})]}),h.jsx("div",{className:"w-full flex justify-end",children:h.jsxs("div",{className:"flex flex-col gap-[8px]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] whitespace-nowrap",children:"Revenue Generated"}),h.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF] whitespace-nowrap",children:[i.summary.currencyType," ",c]}),h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] whitespace-nowrap ${f?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[f?h.jsx(oa,{}):h.jsx(ia,{}),u,"%",h.jsx("span",{children:"from last month"})]})]})})]}),h.jsx("div",{className:"mt-[16px]",children:i.outlets.map((m,g)=>h.jsxs("div",{className:g===i.outlets.length-1?"":"mb-[16px]",children:[h.jsxs("div",{className:"flex justify-between text-sm mb-[8px]",children:[h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:m.name}),h.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[h.jsxs("div",{className:"text-[#64748B] inline-block",children:[m.orders," orders"]}),h.jsxs("div",{className:"mx-2 text-[#121212] inline-block",children:[i.summary.currencyType," ",lP(m.revenue)]})]})]}),h.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:h.jsx("div",{className:`h-[11px] rounded-full ${m.color}`,style:{width:`${m.percentage}%`}})})]},`${m.name}-${g}`))})]})})}function ZI({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,bookingGrowth:e?.amenity_summary?.booking_growth??null,currencyType:e?.amenity_summary?.currency_type??"Rs"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(m=>({facility_name:m?.facility_name,total_bookings:m?.total_bookings??0,paid_revenue:m?.paid_revenue??"0",isPaid:m?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(m=>({...m,isPaid:m?.isPaid===!0})),o=i.length>0&&i.every(m=>m?.isPaid===!1),a=n?.totalBookings||0,s=n?.bookingGrowth;let l=0;if(typeof s=="number")l=s;else if(typeof s=="string"){const m=s.replace("%","").trim(),g=Number(m);l=isNaN(g)?0:g}const c=i.reduce((m,g)=>{const v=g?.total_bookings||0;return m+v},0),u=i.map(m=>{const g=m?.total_bookings||0,v=m?.isPaid?`${n?.currencyType||"Rs"} ${m?.paid_revenue||"0.00"}`:"",x=c>0?Math.round(g/c*100):0;return{name:m?.facility_name||"Unknown",bookings:g,revenue:v,percentage:x,color:"bg-[#3C81F6]",isPaid:m?.isPaid}}),d=n?.growthPercentage;let f=null;if(typeof d=="number")f=d;else if(typeof d=="string"){const m=d.replace("%","").trim(),g=Number(m);f=isNaN(g)?null:g}const p=f!==null?f>=0:!0;return h.jsx(Ie,{className:"h-[324px]",title:"Amenities",period:"Today",icon:h.jsx(Jpe,{className:"!text-[24px] text-[#8B5CF6]"}),children:h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"flex gap-[24px]",children:[h.jsxs("div",{className:"w-full flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a}),h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] ${l>=0?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[l>=0?h.jsx(oa,{}):h.jsx(ia,{}),l,"%",h.jsx("span",{children:"from last month"})]})]}),!o&&h.jsx("div",{className:"w-full flex justify-end",children:h.jsxs("div",{className:"flex flex-col gap-[8px]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] whitespace-nowrap",children:"Revenue Generated"}),h.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF] whitespace-nowrap",children:[n?.currencyType||"Rs"," ",n?.todayPaidRevenue??"0.00"]}),f!==null&&h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] whitespace-nowrap ${p?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[p?h.jsx(oa,{}):h.jsx(ia,{}),f,"%",h.jsx("span",{children:"from last month"})]})]})})]}),h.jsx("div",{className:"mt-[16px]",children:u.length>0?u.map((m,g)=>h.jsxs("div",{className:g===u.length-1?"":"mb-[16px]",children:[h.jsxs("div",{className:"flex justify-between text-sm mb-[8px]",children:[h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:m?.name}),h.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[h.jsxs("div",{className:"text-[#64748B] inline",children:[m?.bookings," ",m?.bookings<=1?"booking":"bookings"]}),m?.isPaid&&h.jsx("div",{className:"mx-2 text-[#121212] inline",children:m?.revenue})]})]}),h.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:h.jsx("div",{className:`h-[11px] rounded-full ${m?.color}`,style:{width:`${m?.percentage}%`}})})]},g)):h.jsx("div",{className:"flex items-center justify-center h-[120px]",children:h.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}Wn.register(Io,Fo,Wl,Dr,Zr);function JI({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[];for(let u=0;u<n.length;u++)r.push(n[u].level),i.push(Number(n[u].open)),o.push(Number(n[u].in_progress)),a.push(Number(n[u].on_hold)),s.push(Number(n[u].cancelled));const l={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:s,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!1,pointStyle:"rect",padding:12,boxWidth:20,boxHeight:8,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:u=>Math.round(u)}}}};return h.jsx(Ie,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:h.jsx(tW,{className:"!text-[24px] text-[#3C81F6]"}),children:h.jsx("div",{className:"h-full",children:h.jsx(zl,{data:l,options:c})})})}const Khe=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return h.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:h.jsxs("div",{className:"flex items-center gap-[8px] font-medium",children:[h.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),h.jsx("div",{children:n.name}),h.jsx("div",{className:"ml-2",children:n.value})]})})};function e4({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return h.jsx(Ie,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:h.jsx(zf,{className:"!text-[24px] text-[#EF4444]"}),children:h.jsxs("div",{className:"flex h-full items-center gap-[16px]",children:[h.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>h.jsx(Ln,{fill:a.color},s))}),h.jsx(kt,{content:a=>h.jsx(Zt,{...a,data:i,children:h.jsx(Khe,{...a})})})]})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[h.jsx("div",{children:r(n.completed)}),h.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),h.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),h.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>h.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const cP={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:10,walkins:22,preApproved:30},{hour:12,walkins:15,preApproved:28},{hour:14,walkins:30,preApproved:38},{hour:16,walkins:45,preApproved:50},{hour:18,walkins:25,preApproved:40}]};function qhe(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function Ghe(e){if(typeof e=="number"&&e>=0&&e<=23)return e;if(typeof e=="string"){const t=e.trim().toUpperCase(),n=t.match(/^(\d{1,2})(?::\d{2})?\s*(AM|PM)$/);if(n){let i=Number(n[1])%12;return n[2]==="PM"&&(i+=12),i}const r=Number(t);if(!Number.isNaN(r)&&r>=0&&r<=23)return r}return null}function Xhe(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>Ghe(i?.hour)===n)||{};return{hour:n,time:qhe(n),walkins:Number(r?.walkins??0),approved:Number(r?.pre_approved??r?.preApproved??r?.approved??0)}})}function uP({title:e,color:t,rows:n=[],children:r}){const i=h.jsxs("div",{className:"bg-white rounded-[12px] min-w-[260px] p-[16px] border-[0.5px] border-[#EBEBEB] shadow-[0px_0px_12px_0px_#EAF2FF]",children:[h.jsx("div",{className:"flex items-center gap-[8px] font-medium text-[#121212]",children:h.jsx("div",{children:e??""})}),h.jsx("div",{className:"mt-[16px] pt-[16px] border-t border-dashed border-[#EBEBEB] space-y-[16px]",children:n?.map(({label:o,value:a,valueColor:s})=>h.jsxs("div",{className:"flex justify-between text-[14px] leading-[18px]",children:[h.jsx("div",{className:"text-[#64748B]",children:o??""}),h.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return h.jsx(ZR,{placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,maxWidth:"none",render:o=>h.jsx("div",{tabIndex:"-1",...o,children:i}),children:r})}function Qhe({active:e,payload:t}){return!e||!t?.length?null:h.jsx("div",{className:"rounded-[8px] bg-[#121212] px-[12px] py-[8px] text-[12px] text-white shadow-lg",children:t.map(n=>h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.stroke}}),h.jsx("span",{className:"min-w-[82px] text-[#D1D3D4]",children:n.name}),h.jsx("span",{className:"font-semibold",children:n.value})]},n.dataKey))})}function t4({data:e}){const t=e&&Object.keys(e).length?e:cP,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const l=t?.chart_data??[];return Xhe(l.length?l:cP.chart_data)},[t]),{yAxisTicks:o,yAxisMax:a}=k.useMemo(()=>{const l=Math.max(...i.map(u=>Math.max(u.walkins,u.approved))),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[i]),s=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return h.jsx(Ie,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${s}`,icon:h.jsx(Gb,{className:"!text-[24px] text-[#8B5CF6]"}),children:h.jsxs("div",{className:"flex flex-col gap-[24px]",children:[h.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6",children:[h.jsxs("div",{className:"flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),h.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),h.jsxs("div",{className:"flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),h.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),h.jsxs("div",{className:"mt-2 flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),h.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[h.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),h.jsx(uP,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:h.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),h.jsxs("div",{className:"mt-2 flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),h.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[h.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),h.jsx(uP,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:h.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),h.jsx("div",{className:"w-full h-[149px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(l1,{data:i??[],margin:{top:5,right:0,left:0,bottom:-10},children:[h.jsx(fr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),h.jsx(Gn,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:10,fontWeight:400}}),h.jsx($n,{width:24,axisLine:!1,tickLine:!1,allowDecimals:!1,ticks:o,domain:[0,a],tick:{fill:"#64748B",fontSize:10,fontWeight:400}}),h.jsx(kt,{content:l=>h.jsx(Zt,{...l,data:i,children:h.jsx(Qhe,{...l})})}),h.jsx(Zo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1,name:"Walk-ins",isAnimationActive:!1}),h.jsx(Zo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1})]})})})]})})}function Zhe(){return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] gap-[24px] mt-6 auto-rows-fr",children:[h.jsx(GI,{}),h.jsx(XI,{})]}),h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-3 gap-[24px] mt-6 auto-rows-fr",children:[h.jsx("div",{className:"mt-[-115px]",children:h.jsx(t4,{})}),h.jsx(e4,{}),h.jsx(JI,{})]}),h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-3 gap-[24px] mt-6 auto-rows-fr",children:[h.jsx(WR,{}),h.jsx(ZI,{}),h.jsx(QI,{})]})]})}function n4({data:e=null}){const t={total_entries:79.6,entries:59350,exit:40950},n=e&&Object.keys(e).length>0?e:t,r=c=>{const u=Number(c);return isNaN(u)?0:u},i=r(n.entries),o=r(n.exit),a=e&&Object.keys(e).length>0&&Number(e.entries)===0&&Number(e.exit)===0,s=[{name:"Entries",value:i,color:"#8B5CF6"},{name:"Exit",value:o,color:"#329DFF"}],l=r(n.total_entries);return h.jsx(St,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:a?h.jsx("div",{className:"h-[300px] flex items-center justify-center",children:h.jsx(Vt,{title:"No access Point Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[h.jsxs("div",{className:"relative w-[212px] h-[212px]",children:[h.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:h.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),h.jsx("div",{className:"h-[212px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:s,dataKey:"value",innerRadius:65,outerRadius:100,startAngle:360,endAngle:-180,paddingAngle:1,stroke:"transparent",children:s.map((c,u)=>h.jsx(Ln,{fill:c.color},u))}),h.jsx(kt,{content:c=>h.jsx(Zt,{...c,data:s,children:h.jsx(Gr,{...c})})})]})})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsx("div",{className:"text-[22px] leading-[27px] font-medium text-[#121212]",children:l}),h.jsx("div",{className:"text-[12px] leading-[17px] text-[#64748B]",children:"Total Access"})]})]}),h.jsxs("div",{className:"mt-[28px] flex justify-between w-full px-[20px]",children:[h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[14px] h-[6px] bg-[#8B5CF6]"}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Entries"})]}),h.jsx("div",{className:"text-[18px] font-medium text-[#8B5CF6] mt-[4px]",children:i.toLocaleString()})]}),h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[14px] h-[6px] bg-[#329DFF]"}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Exit"})]}),h.jsx("div",{className:"text-[18px] font-medium text-[#329DFF] mt-[4px]",children:o.toLocaleString()})]})]})]})})}function r4({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return h.jsx(St,{className:n,title:e,titleWeight:"semi-bold",children:h.jsxs("div",{className:"rounded-[12px] overflow-hidden mt-[16px]",children:[h.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[h.jsx("div",{children:"Point"}),h.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>h.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),h.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function i4({data:e=[]}){const[t,n]=k.useState([]),r=e&&e.length?e:[],i=!e||e.length===0,o=e&&e.length>0&&e.every(c=>Number(c.entries)===0&&Number(c.exit)===0),a=i||o,s=c=>c>=1e3?`${c/1e3}K`:c,l=c=>{n(u=>u.includes(c)?u.filter(d=>d!==c):[...u,c])};return h.jsx(St,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:a?h.jsx("div",{className:"h-[270px] flex items-center justify-center",children:h.jsx(Vt,{title:"No access Point Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:r,barSize:54,margin:{top:0,right:0,left:-20,bottom:0},children:[h.jsx(fr,{strokeDasharray:"8 8",vertical:!1}),h.jsx(Zx,{y:0,stroke:"#EBEBEB"}),h.jsx(Gn,{dataKey:"block_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx($n,{tickFormatter:s,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(kt,{cursor:!1,content:c=>h.jsx(Zt,{...c,data:r,children:(()=>{if(!c.active||!c.label)return null;const u=r.find(d=>d.block_name===c.label);return h.jsxs("div",{className:"bg-[#111] text-white px-[14px] py-[8px] rounded-[6px] flex flex-col gap-[6px] text-[13px]",children:[h.jsx("div",{className:"font-semibold",children:c.label}),!t.includes("entries")&&h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-[#329DFF]"}),h.jsx("div",{className:"text-[#aaa]",children:"Entries"}),h.jsx("div",{className:"font-bold",children:u?.entries??0})]}),!t.includes("exit")&&h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-[#76BDFF]"}),h.jsx("div",{className:"text-[#aaa]",children:"Exit"}),h.jsx("div",{className:"font-bold",children:u?.exit??0})]})]})})()})}),h.jsx(Ol,{verticalAlign:"bottom",height:36,content:()=>{const c=[{key:"entries",label:"Entries",color:"#329DFF"},{key:"exit",label:"Exit",color:"#76BDFF"}];return h.jsx("div",{style:{display:"flex",gap:"20px",justifyContent:"center",marginTop:"20px"},children:c.map((u,d)=>{const f=t.includes(u.key);return h.jsxs("div",{onClick:()=>l(u.key),style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",opacity:f?.4:1},children:[h.jsx("div",{style:{width:"20px",height:"8px",backgroundColor:u.color}}),h.jsx("div",{style:{fontSize:"12px",color:"#64748B"},children:u.label})]},d)})})}}),h.jsx(Gt,{dataKey:"entries",stackId:"a",fill:"#329DFF",hide:t.includes("entries")}),h.jsx(Gt,{dataKey:"exit",stackId:"a",fill:"#76BDFF",hide:t.includes("exit")})]})})})})}function Jhe(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"16",y1:"2",x2:"16",y2:"6"},child:[]},{tag:"line",attr:{x1:"8",y1:"2",x2:"8",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"10",x2:"21",y2:"10"},child:[]}]})(e)}function eme(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function tme(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function xs({text:e="Smart Access",Icon:t,iconColor:n="#329DFF"}){return h.jsxs("div",{className:"px-[20px] pt-6",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[t?h.jsx("div",{className:"flex items-center justify-center",children:h.jsx(t,{size:20,style:{color:n}})}):null,h.jsx("div",{className:"text-[24px] leading-[32px] font-semibold text-[#121212]",children:e})]}),h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px] bg-white px-[16px] py-[8px].5 rounded-[8px] border border-[#EBEBEB] text-sm font-medium text-[#64748B] hover:bg-gray-100 transition-colors cursor-pointer",children:[h.jsx("div",{className:"flex items-center",children:h.jsx(Jhe,{size:16})}),h.jsx("div",{children:"Today"}),h.jsx("div",{className:"flex items-center",children:h.jsx(eme,{size:16})})]}),h.jsxs("div",{className:"flex items-center gap-[8px] px-[12px] py-[8px] rounded-[8px] border border-[#EBEBEB] bg-white text-[#7C3AED] text-[14px] font-medium hover:bg-[#E9D5FF] transition cursor-pointer",children:[h.jsx("div",{children:"Export Report"}),h.jsx("div",{className:"flex items-center",children:h.jsx(tme,{size:16})})]})]})]}),h.jsx("div",{className:"mt-4 border-t border-dashed border-[#E2E8F0]"})]})}function nme(){return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Smart Access",Icon:zpe}),h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-3 gap-[24px] mt-6 auto-rows-fr",children:[h.jsx(n4,{}),h.jsx(i4,{})]}),h.jsx("div",{className:"mt-7 px-[20px]"})]})}Wn.register(hm,Dr,Zr);const Wv=e=>{const t=Number(e);return Number.isFinite(t)?t:0},rme={id:"bottomGlow",afterDatasetsDraw(e,t,n){if(!n?.enabled)return;const r=e.getDatasetMeta(0);if(!r?.data?.[0])return;const{ctx:i}=e,{x:o,y:a,innerRadius:s}=r.data[0],l=Math.max(s-2,0),c=a+l*.9,u=i.createRadialGradient(o,c,0,o,c,l*1.08);u.addColorStop(0,n.color??"rgba(186, 230, 253, 0.72)"),u.addColorStop(.3,"rgba(186, 230, 253, 0.4)"),u.addColorStop(.58,"rgba(186, 230, 253, 0.16)"),u.addColorStop(1,"rgba(186, 230, 253, 0)"),i.save(),i.beginPath(),i.arc(o,a,l,0,Math.PI*2),i.clip(),i.fillStyle=u,i.beginPath(),i.ellipse(o,c,l*1.08,l*.52,0,0,Math.PI*2),i.fill(),i.restore()}},ime={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=24,bottomSize:u=9,topColor:d="#121212",bottomColor:f="#121212"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-6),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+22),r.restore()}},o4=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthText:c="Compared to last month",totalLabel:u="Total",centerTopColor:d="#0F172A",centerBottomColor:f="#64748B",centerTopSize:p,centerBottomSize:m,showBottomGlow:g=!1,bottomGlowColor:v="rgba(186, 230, 253, 0.75)",showEmptyStateWhenZero:x=!1,widgetType:_="",resolvedWidgetType:w="",data:y})=>{const E=y?.title??e;y?.icon;const S=y?.firstLabel??n,P=Wv(y?.firstValue??y?.resolved?.current??y?.sold?.current??y?.first?.current??r??0),D=y?.firstColor??i,T=y?.secondLabel??o,R=Wv(y?.secondValue??y?.open?.current??y?.unsold?.current??y?.second?.current??a??0),A=y?.secondColor??s,C=y?.growthPercentage??y?.trend_percent??l??"+0%",j=y?.growthText??c,N=y?.totalLabel??u,M=y?.widgetType??_??w,L=y?.centerTopSize??p??(M==="commercial"?34:20),B=y?.centerBottomSize??m??(M==="commercial"?14:10),V=y?.showBottomGlow??g,z=y?.bottomGlowColor??v,W=y?.showEmptyStateWhenZero??x,Q=P+R,X=Wv(y?.total_tickets?.current??y?.total_units?.current??y?.total?.current??y?.current??Q),ie=W&&Q===0&&X===0,J={labels:[S,T],datasets:[{data:[P,R],backgroundColor:[D,A],borderWidth:2,hoverOffset:4}]},re={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li()},centerText:{top:`${Q}`,bottom:N,topSize:L,bottomSize:B,topColor:d,bottomColor:f},bottomGlow:{enabled:V,color:z}}},ae=[{label:S,value:P,color:D},{label:T,value:R,color:A}],le=C.toString().includes("+"),ue=C.toString().includes("-"),K=le?"#1FA05B":"#AB0000";return h.jsx(St,{title:E,className:"h-[362px] leading-[24px]",titleWeight:"semi-bold",childrenClassName:ie?"h-full":"",children:ie?h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx(Vt,{})}):h.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[h.jsxs("div",{className:"col-span-5 space-y-[12px]",children:[ae.map((U,Z)=>h.jsxs("div",{children:[h.jsx("div",{className:"text-[12px] text-[#64748B] mb-[8px]",children:U.label}),h.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:U.color},children:U.value})]},Z)),h.jsxs("div",{className:`text-[12px] flex gap-[4px] ${M==="commercial"?"mt-[20px]":""} items-center`,style:{color:K},children:[le&&h.jsx(oa,{}),ue&&h.jsx(ia,{}),h.jsx("div",{children:C.replace("+","").replace("-","")}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[14px] ml-[4px] whitespace-nowrap",children:j})]})]}),h.jsx("div",{className:"col-span-7",children:h.jsx("div",{className:`${M==="commercial"?"h-[260px] max-w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:h.jsx(gm,{data:J,options:re,plugins:[rme,ime]})})})]})})},ome=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return h.jsx("g",{transform:`translate(${e},${t})`,children:h.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>h.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function a4({data:e=[]}){const t=e&&e.length>0,n=e.map(r=>({name:r.category_name,value:r.total_complaints,color:"#08B6D4"}));return h.jsx(St,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full mt-[24px]!",children:t?h.jsx("div",{className:"w-full h-[262px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:n,layout:"vertical",margin:{top:0,right:8,left:-20,bottom:0},children:[h.jsx(fr,{strokeDasharray:"3 3",horizontal:!1,stroke:"#E5E7EB"}),h.jsx(Gn,{type:"number",tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1,tickMargin:10,allowDecimals:!1}),h.jsx($n,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:132,tick:h.jsx(ome,{})}),h.jsx(kt,{cursor:{fill:"transparent"},position:{x:300,y:0},allowEscapeViewBox:{x:!0,y:!0},content:r=>r.active?h.jsx(Zt,{...r,data:n,children:h.jsx(Gr,{...r})}):null}),h.jsx(Gt,{dataKey:"value",barSize:36,fill:"#08B6D4"})]})})}):h.jsx(Vt,{title:"No Tickets Found",description:"Catch up all the data. Change the date range to see the data."})})}function bb({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const a=parseFloat(i),s=a>=0,l=s?"#16A34A":"#DC2626";return h.jsxs("div",{className:"relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] h-[132px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[e&&h.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(e,{className:"h-[20px] w-[20px]"})}),h.jsx("div",{className:"text-[16px] leading-[20px] tracking-[-2%] font-medium text-[#64748B]",children:n})]}),h.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&h.jsxs("div",{className:"mt-[12px] flex items-center gap-[8px]",children:[i&&h.jsxs("div",{className:"flex items-center gap-[4px] text-[12px] leading-[16px] font-medium",style:{color:l},children:[s?h.jsx(oa,{}):h.jsx(ia,{}),Math.abs(a),"%"]}),o&&h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}function ame(){const e=[{category_name:"Plumbing",total_complaints:12},{category_name:"Electrical Issues",total_complaints:8},{category_name:"Cleaning Services",total_complaints:15}];return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Helpdesk",Icon:Spe,iconColor:"#12B981"}),h.jsxs("div",{className:"flex gap-[24px] mt-[24px] px-[16px]",children:[h.jsx("div",{className:"w-[380px] h-full space-y-[16px]",children:h.jsx(o4,{title:"Tickets",icon:h.jsx(zf,{className:"h-6 w-6 text-[#EF4444]"}),firstLabel:"Resolved",firstValue:779,firstColor:"#12B981",secondLabel:"Open",secondValue:83,secondColor:"#AB0000",growthPercentage:"+9.1%",growthColor:"#1FA05B",growthText:"Compared to last month",widgetType:"commercial",totalLabel:"Total",centerTopSize:34,centerBottomSize:14,showBottomGlow:!0,showEmptyStateWhenZero:!0})}),h.jsx("div",{className:"flex-1",children:h.jsx(a4,{data:e})})]})]})}const dP=e=>String(e).padStart(2,"0"),fP=(e,t="start")=>e?`${[e.getFullYear(),dP(e.getMonth()+1),dP(e.getDate())].join("-")} ${t==="end"?"23:59:59":"00:00:00"}`:"",s4=({data:e=[],onDateChange:t})=>{const[n,r]=k.useState(new Date),[i,o]=k.useState(!1),s=(v=>{const x=new Date(v);return x.setDate(x.getDate()-6),x})(n),l=v=>{try{return v.toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}catch{return""}},c=v=>{const x=new Date(v),_=new Date(x);_.setDate(_.getDate()-6),t&&t(fP(_,"start"),fP(x,"end"))},u=()=>{const v=new Date(n);v.setDate(v.getDate()-7),r(v),c(v)},d=()=>{const v=new Date(n);v.setDate(v.getDate()+7),r(v),c(v)},f=()=>{o(v=>!v)},p=v=>{const x=v||new Date;r(x),c(x),o(!1)},m=Array.isArray(e)?e:[],g=!m.length||m.every(v=>v.no_of_visitors===0);return h.jsxs(St,{title:"Weekly Visitor Pattern",period:`${l(s)} - ${l(n)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:u,onNextClick:d,onCalendarClick:f,children:[i&&h.jsx("div",{className:"anarock-datepicker absolute top-[70px] right-[24px] z-50",children:h.jsx(LD,{selected:n,onChange:p,inline:!0,maxDate:new Date,showYearDropdown:!0,scrollableYearDropdown:!0,yearDropdownItemNumber:40})}),g?h.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:h.jsx(Vt,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsx("div",{className:"w-full h-[280px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(aR,{data:m,margin:{top:10,right:-10,left:-10,bottom:0},children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[h.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),h.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),h.jsx(Gn,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1,tickFormatter:v=>new Date(v).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),h.jsx($n,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1,domain:[0,"dataMax + 2"]}),h.jsx(kt,{cursor:!1,content:v=>{const{active:x,payload:_,label:w}=v;if(!x||!_?.length)return null;const y=new Date(w).toLocaleDateString("en-GB",{day:"2-digit",month:"short"});return h.jsx(Zt,{...v,data:m,children:h.jsx(Gr,{active:x,payload:_,label:y})})}}),h.jsx(r1,{type:"monotone",dataKey:"no_of_visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:v=>{const{cx:x,cy:_,stroke:w}=v;return h.jsxs("g",{children:[h.jsx("circle",{cx:x,cy:_,r:6,fill:"#fff",stroke:"#6466F1",strokeWidth:2}),h.jsx("circle",{cx:x,cy:_,r:2.5,fill:"#6466F1"})]})}})]})})})]})},sme=[{building_name:"Google",no_of_visitors:1e3},{building_name:"Uber",no_of_visitors:3500},{building_name:"ANAROCK",no_of_visitors:2e3},{building_name:"Flipkart",no_of_visitors:8e3},{building_name:"HP",no_of_visitors:1650}],l4=({data:e,title:t,bar:n})=>{const r=Array.isArray(e)&&e?.length===0,i=e==null?sme:Array.isArray(e)?e:[];return h.jsx(St,{title:t||"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:h.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:r?h.jsx(Vt,{title:t||"Organisation Wise Visitors",description:"Catch up all the data. Change the date range to see the data."}):h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:i||[],margin:{top:10,right:10,left:10,bottom:-10},barCategoryGap:35,children:[h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),h.jsx(Gn,{dataKey:"building_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),h.jsx($n,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1}),h.jsx(kt,{cursor:!1,content:o=>o.active?h.jsx(Zt,{...o,data:i,children:h.jsx(Gr,{...o})}):null}),h.jsx(Gt,{dataKey:"no_of_visitors",name:"Visitors",maxBarSize:55,fill:n||"#3C81F6"})]})})})})};function lme(){const e=[{day:"2026-03-05",no_of_visitors:0},{day:"2026-03-06",no_of_visitors:0},{day:"2026-03-07",no_of_visitors:0},{day:"2026-03-08",no_of_visitors:14},{day:"2026-03-09",no_of_visitors:0},{day:"2026-03-10",no_of_visitors:0},{day:"2026-03-11",no_of_visitors:0}];return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Visitors",Icon:_pe,iconColor:"#884EA7"}),h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[24px]",children:[h.jsx(bb,{icon:Gpe,iconColor:"#329DFF",title:"Visitors Expected",value:"1,247",percentage:"+11.0%",percentageText:"Compared to last month"}),h.jsx(bb,{icon:lpe,iconColor:"#1FA05B",title:"Visitors Inside",value:"800",percentageText:"Across organisations"})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[24px]",children:[h.jsx(s4,{data:e}),h.jsx(l4,{})]}),h.jsx("div",{})]})}function co({data:e}){return h.jsx("div",{className:"h-full",children:e.map((t,n)=>{const r=parseFloat(t.delta),i=r>=0;return h.jsx(Ie,{iconClassName:"!gap-[8px]",title:h.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:h.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:`${t?.widget==="amenities"?"h-[139px]":"h-[124px]"}`,children:h.jsxs("div",{className:`flex flex-col gap-[8px] ${t?.widget==="amenities"?"mt-[3.5px]":"mt-0"}`,children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),h.jsxs("div",{className:`flex items-center text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[t.delta&&h.jsxs("div",{className:`flex items-center gap-[4px] px-[6px] py-[2px] rounded-[4px] font-medium
480
+ `,children:n}),h.jsx("div",{className:"!text-[#64748B]",children:r})]})]})}const vhe=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Qb,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:fse,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:mhe,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:G8,iconColor:"text-[#36AB6C]"}];function yhe({data:e}){const t=Array.isArray(e)&&e.length>0?e:vhe;return h.jsx("div",{className:"px-[20px] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:t.map((n,r)=>h.jsx(ghe,{...n},r))})}const bhe=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],xhe=(e="")=>e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/<[^>]*>/g,"").trim();function whe({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:xhe(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):bhe;return h.jsx(Ie,{title:"Complaints",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",className:"w-full h-[362px] p-[24px]!",children:h.jsx("div",{className:"flex flex-col gap-[12px] max-h-full overflow-y-auto hide-scrollbar",children:t.map((n,r)=>h.jsxs("div",{className:"flex items-center justify-between bg-[#F8FAFC] rounded-[4px] p-[12px]",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),h.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),h.jsxs("div",{className:"flex flex-col items-end gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#AB0000]",children:String(n.pending).padStart(2,"0")}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const _he=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],Ehe=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return h.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[h.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),h.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},She=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:_he).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return h.jsxs(Ie,{title:"Complaints by Level",className:"w-full h-[362px] p-[24px]! gap-[18px]!",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:[h.jsx(Pt,{width:"100%",height:"85%",children:h.jsxs(Mo,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[h.jsx(fr,{strokeDasharray:"0",vertical:!1}),h.jsx(Gn,{dataKey:"level"}),h.jsx($n,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),h.jsx(kt,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},allowEscapeViewBox:{x:!0,y:!0},content:a=>!a.active||!a.payload||!a.payload.length?null:h.jsx(Zt,{...a,data:t,children:h.jsxs("div",{className:"bg-[#121212] rounded-[10px] px-[14px] py-[10px] text-[12px] text-white",children:[h.jsx("div",{className:"mb-[6px] font-semibold",children:a.label}),a.payload.map((s,l)=>{const c=s.color||s.fill||"#fff";return h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{backgroundColor:c}}),h.jsx("span",{className:"text-[#D1D3D4]",children:s.name}),h.jsx("span",{className:"text-white font-semibold",children:s.value})]},l)})]})})}),h.jsx(Gt,{dataKey:"open_count",name:"Open",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),h.jsx(Gt,{dataKey:"in_progress_count",name:"In Progress",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),h.jsx(Gt,{dataKey:"closed_count",name:"Closed",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),h.jsx(Ehe,{})]})},Ohe=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function Che({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):Ohe;return h.jsx(Ie,{title:"Request Box",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",className:"w-full h-[362px] p-[24px]!",children:h.jsx("div",{className:"flex flex-col gap-[12px] max-h-full overflow-y-auto hide-scrollbar",children:t.map((n,r)=>h.jsxs("div",{className:"flex items-center justify-between bg-[#F8FAFC] rounded-[4px] p-[12px]",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),h.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),h.jsxs("div",{className:"flex flex-col items-end gap-[4px]",children:[h.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#AB0000]",children:String(n.pending).padStart(2,"0")}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function khe(e){return yt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}const Phe=["open_complaints","pending_requests","avg_response_time","resolution_rate"],Dhe={open_complaints:{title:"Open Complaints",Icon:VD,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:khe,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:nW,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:eW,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},Ahe=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>h.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),The={primary:{size:28,lineHeight:32,weight:500}},Nhe={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function jhe({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?h.jsx(oP,{id:e,data:t}):h.jsx("div",{className:"px-[20px] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[16px]",children:Phe.map(n=>h.jsx(oP,{id:n},n))})}function oP({id:e,data:t}){const n=Dhe[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=ch,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:Nhe[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,h.jsx("div",{className:"h-[132px]",children:h.jsxs(Ie,{title:i,titleColor:a,icon:h.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:h.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[h.jsx(Ahe,{...The.primary,children:c}),h.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[h.jsx(Du,{value:u}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}const Mhe=[{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"},{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"},{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"},{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"}];function Rhe({title:e,date:t,rsvp:n,utilisation:r,status:i}){return h.jsxs("div",{className:"bg-[#F8FAFC] p-[12px] rounded-[4px]",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),h.jsx("div",{className:`!text-[12px] leading-[16px] font-medium p-[4px] rounded-[4px] ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),h.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),h.jsxs("div",{className:"mt-[8px] flex justify-between items-center",children:[h.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),h.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),h.jsx("div",{className:"mt-[8px] w-full bg-[#F8FAFC] h-[6px] rounded",children:h.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function Ihe({data:e}){const t=Array.isArray(e)&&e.length===0,n=Array.isArray(e)?e:Mhe;return h.jsx(Ie,{title:"Events Utilisation",className:"w-full h-[360px] p-[24px]!",childrenClassName:t?"h-full":"overflow-y-auto hide-scrollbar",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsx("div",{className:`w-full h-full ${t?"flex items-center justify-center":"space-y-[12px]"}`,children:n?.length>0?n.map((r,i)=>h.jsx(Rhe,{...r},`${r.title}-${i}`)):h.jsx(Vt,{})})})}const Fhe=[{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"},{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"},{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"},{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"}];function Lhe({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return h.jsxs("div",{className:`border-[0.5px] border-[#EBEBEB] rounded-[12px] p-[16px] ${r} h-[124px]`,children:[h.jsx("div",{className:`text-[16px] leading-[20px]! tracking-[-2%] font-medium ${i}`,children:e}),h.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),h.jsx("div",{className:"mt-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:n})]})}function $he({data:e}){const t=Array.isArray(e)&&e.length>0?e:Fhe;return h.jsx(Ie,{title:"Notice Board Status",className:"w-full h-[360px] !p-[24px]",titleClassName:"!text-[20px] !leading-[24px] font-semibold!",children:h.jsx("div",{className:"grid grid-cols-2 gap-[24px]",children:t.map((n,r)=>h.jsx(Lhe,{...n},`${n.label}-${r}`))})})}function Bhe({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=ch,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50",iconUrl:l}){return h.jsx(Ie,{title:e,icon:h.jsx("div",{className:"grid place-items-center ",children:l?h.jsx("img",{src:l,alt:"icon",className:"h-8 w-8 object-contain"}):h.jsx(o,{className:`h-8 w-8 ${a}`})}),className:"h-[132px]",children:h.jsxs("div",{children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),h.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[h.jsx(Du,{value:n}),h.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function Whe({data:e}){const t=[{title:e?.title||"Total Bookings",value:e?.value??0,delta:e?.delta??"0%",deltaLabel:e?.deltaLabel||"Compared to last month",positive:e?.positive??!1,Icon:e?.Icon,iconUrl:e?.iconUrl,iconColor:e?.iconColor||"text-emerald-600",iconBg:e?.iconBg||"bg-emerald-50"}];return h.jsx("div",{className:"h-full",children:t.map((n,r)=>h.jsx(Bhe,{...n},r))})}function zhe({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,icon:o,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return h.jsxs(Ie,{title:e,icon:h.jsx("div",{className:"size-[20px] grid place-items-center",children:h.jsx("img",{src:o,alt:e})}),className:"h-[132px]",titleClassName:"text-[#64748B]! leading-[20px]",childrenClassName:"space-y-[8px]!",children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),h.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[h.jsx(Du,{value:n}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:r})]})]})}const Vhe=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902569/notice_djcorh.svg"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902568/post_rivboo.svg"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902569/poll_b43jo0.svg"},{title:"Survey",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,icon:"https://res.cloudinary.com/dzqlw1ixr/image/upload/v1773902568/survey_yevzwi.svg"}];function Hhe({data:e}){const t=Array.isArray(e)&&e.length>0?e:Vhe;return h.jsx("div",{className:"px-[20px] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:t.map((n,r)=>h.jsx(zhe,{...n},r))})}const aP=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#3C81F6]"?"text-[#8B5CF6]":n==="bg-[#8B5CF6]"?"text-[#12B981]":"text-slate-600";return h.jsxs("div",{className:"flex flex-col items-start",children:[h.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:h.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),h.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),h.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},GI=({data:e,occupiedUnits:t=1,EmployeesCount:n=8910,AdminsCount:r=910})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return h.jsx("div",{children:h.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px] h-[128px]",children:[h.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[h.jsx(Qb,{className:"!text-[20px] text-[#329DFF]"}),h.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-[4px]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})]}),h.jsxs("div",{className:"flex items-end gap-[4px]",children:[h.jsx(aP,{value:o??0,total:s||1,colorClass:"bg-[#3C81F6]",label:(o??0)<=1?"Employee":"Employees"}),h.jsx(aP,{value:a??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:(a??0)<=1?"Admin":"Admins"})]})]})]})})};Wn.register(Io,Fo,Wl,Dr);const XI=({data:e})=>{const t=e!=null,n=e?.employee_data,r=["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],i=[2e3,1700,1500,1200,900,800],o=[],a=[];if(t){if(n&&n.length>0)for(let d=0;d<n.length;d++)o.push(n[d].name),a.push(n[d].employees)}else for(let d=0;d<r.length;d++)o.push(r[d]),a.push(i[d]);let s=!1;if(t)if(!n||n.length===0)s=!0;else{s=!0;for(let d=0;d<n.length;d++)if(n[d].employees!==0){s=!1;break}}let l=0;for(let d=0;d<a.length;d++)a[d]>l&&(l=a[d]);const c={labels:o,datasets:[{data:a,backgroundColor:[],barThickness:34}]};for(let d=0;d<a.length;d++)c.datasets[0].backgroundColor.push("#3C81F6");const u={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:d=>`Employees: ${d.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:l>0?l+5:2e3,ticks:{stepSize:l>0?Math.ceil((l+5)/5):500,color:"#64748B",callback:d=>d},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return t&&s?h.jsx(Ie,{className:"w-full h-[238px]",title:"Employee Footfall",period:"Today",icon:h.jsx(iP,{className:"!text-[24px] text-[#8B5CF6]"}),children:h.jsx("div",{className:"h-full flex items-center justify-center",children:h.jsx(Vt,{title:"No Employee footfall Found",description:"Catch up all the data. Change the date range to see the data."})})}):h.jsxs(Ie,{className:"w-full h-[238px]",title:"Employee Footfall",period:"Today",icon:h.jsx(iP,{className:"!text-[24px] text-[#8B5CF6]"}),children:[h.jsxs("div",{className:"mb-[10px] mt-[8px] flex flex-col gap-[4px]!",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),h.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#3C81F6]",children:t?e.total_employees:7500})]}),h.jsx("div",{className:"h-[110px]",children:h.jsx(zl,{data:c,options:u})})]})},Yhe="Rs",sP=["bg-blue-500","bg-red-500","bg-purple-700"],Ca={title:"Food & Beverages (Static Data)",period:"Today",summary:{totalOrders:247,revenueGenerated:"82K",growthPercentage:8,growthTotalPercentage:0},outlets:[{name:"HP",orders:120,revenue:"45K",percentage:70,color:"bg-[#3C81F6]"},{name:"Adobe",orders:85,revenue:"23K",percentage:50,color:"bg-[#3C81F6]"},{name:"Anarock",orders:42,revenue:"14K",percentage:25,color:"bg-[#3C81F6]"}]};function Vp(e,t=null){if(typeof e=="number")return e;if(typeof e=="string"){const n=Number(e.replace("%","").trim());return Number.isNaN(n)?t:n}return t}function lP(e){if(e==null||e==="")return"0";if(typeof e=="number")return tE(e);const t=Number(e);return Number.isNaN(t)?String(e):tE(t)}function Uhe(e){const t=e?.food_beverage_summary?{title:e?.title,period:e?.period,summary:{totalOrders:e?.food_beverage_summary?.total_orders,revenueGenerated:e?.food_beverage_summary?.revenue_generated,growthPercentage:e?.food_beverage_summary?.growth_percentage??e?.food_beverage_summary?.revenue_growth,growthTotalPercentage:e?.food_beverage_summary?.order_growth,currencyType:e?.food_beverage_summary?.currency_type},outlets:e?.chart_data}:e||{},n=t?.summary||{},i=(Array.isArray(t?.outlets)?t.outlets:[]).map((f,p)=>({name:f?.name||f?.outlet_name||f?.tenant_name||f?.company_name||"Unknown",orders:f?.orders??f?.total_orders??f?.count??0,revenue:f?.revenue??f?.revenue_generated??f?.total_revenue??0,percentage:f?.percentage,color:f?.color||sP[p%sP.length]})),o=n?.totalOrders??n?.orders??Ca.summary.totalOrders,a=n?.revenueGenerated??n?.revenue??Ca.summary.revenueGenerated,s=Vp(n?.growthPercentage??n?.revenueGrowth,Ca.summary.growthPercentage),l=Vp(n?.growthTotalPercentage??n?.orderGrowth,Ca.summary.growthTotalPercentage),c=n?.currencyType||n?.currency||Yhe,u=i.reduce((f,p)=>f+(Number(p?.orders)||0),0),d=i.map(f=>({...f,percentage:f?.percentage!==null&&f?.percentage!==void 0?Number(f.percentage)||0:u>0?Math.round((Number(f?.orders)||0)/u*100):0}));return{title:t?.title||Ca.title,period:t?.period||Ca.period,summary:{totalOrders:o,revenueGenerated:a,growthPercentage:s,growthTotalPercentage:l,currencyType:c},outlets:d.length>0?d:Ca.outlets}}function QI({data:e,title:t,period:n,icon:r}){const i=Uhe(e),o=t||i.title,a=n||i.period,s=r||h.jsx(Qpe,{className:"!text-[24px] text-[#FA7E28]"}),l=i.summary.totalOrders??0,c=lP(i.summary.revenueGenerated),u=Vp(i.summary.growthPercentage,0),d=Vp(i.summary.growthTotalPercentage,0),f=u>=0,p=d>=0;return h.jsx(Ie,{className:"h-[324px]",title:o,period:a,icon:s,children:h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"flex gap-[24px]",children:[h.jsxs("div",{className:"w-full flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:l}),h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] ${p?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[p?h.jsx(oa,{}):h.jsx(ia,{}),d,"%",h.jsx("span",{children:"from last month"})]})]}),h.jsx("div",{className:"w-full flex justify-end",children:h.jsxs("div",{className:"flex flex-col gap-[8px]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] whitespace-nowrap",children:"Revenue Generated"}),h.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF] whitespace-nowrap",children:[i.summary.currencyType," ",c]}),h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] whitespace-nowrap ${f?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[f?h.jsx(oa,{}):h.jsx(ia,{}),u,"%",h.jsx("span",{children:"from last month"})]})]})})]}),h.jsx("div",{className:"mt-[16px]",children:i.outlets.map((m,g)=>h.jsxs("div",{className:g===i.outlets.length-1?"":"mb-[16px]",children:[h.jsxs("div",{className:"flex justify-between text-sm mb-[8px]",children:[h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:m.name}),h.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[h.jsxs("div",{className:"text-[#64748B] inline-block",children:[m.orders," orders"]}),h.jsxs("div",{className:"mx-2 text-[#121212] inline-block",children:[i.summary.currencyType," ",lP(m.revenue)]})]})]}),h.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:h.jsx("div",{className:`h-[11px] rounded-full ${m.color}`,style:{width:`${m.percentage}%`}})})]},`${m.name}-${g}`))})]})})}function ZI({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,bookingGrowth:e?.amenity_summary?.booking_growth??null,currencyType:e?.amenity_summary?.currency_type??"Rs"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(m=>({facility_name:m?.facility_name,total_bookings:m?.total_bookings??0,paid_revenue:m?.paid_revenue??"0",isPaid:m?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(m=>({...m,isPaid:m?.isPaid===!0})),o=i.length>0&&i.every(m=>m?.isPaid===!1),a=n?.totalBookings||0,s=n?.bookingGrowth;let l=0;if(typeof s=="number")l=s;else if(typeof s=="string"){const m=s.replace("%","").trim(),g=Number(m);l=isNaN(g)?0:g}const c=i.reduce((m,g)=>{const v=g?.total_bookings||0;return m+v},0),u=i.map(m=>{const g=m?.total_bookings||0,v=m?.isPaid?`${n?.currencyType||"Rs"} ${m?.paid_revenue||"0.00"}`:"",x=c>0?Math.round(g/c*100):0;return{name:m?.facility_name||"Unknown",bookings:g,revenue:v,percentage:x,color:"bg-[#3C81F6]",isPaid:m?.isPaid}}),d=n?.growthPercentage;let f=null;if(typeof d=="number")f=d;else if(typeof d=="string"){const m=d.replace("%","").trim(),g=Number(m);f=isNaN(g)?null:g}const p=f!==null?f>=0:!0;return h.jsx(Ie,{className:"h-[324px]",title:"Amenities",period:"Today",icon:h.jsx(Jpe,{className:"!text-[24px] text-[#8B5CF6]"}),children:h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"flex gap-[24px]",children:[h.jsxs("div",{className:"w-full flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a}),h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] ${l>=0?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[l>=0?h.jsx(oa,{}):h.jsx(ia,{}),l,"%",h.jsx("span",{children:"from last month"})]})]}),!o&&h.jsx("div",{className:"w-full flex justify-end",children:h.jsxs("div",{className:"flex flex-col gap-[8px]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] whitespace-nowrap",children:"Revenue Generated"}),h.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF] whitespace-nowrap",children:[n?.currencyType||"Rs"," ",n?.todayPaidRevenue??"0.00"]}),f!==null&&h.jsxs("div",{className:`w-fit inline-flex items-center gap-[4px] text-[10px] leading-[14px] p-[4px] rounded-[4px] whitespace-nowrap ${p?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[p?h.jsx(oa,{}):h.jsx(ia,{}),f,"%",h.jsx("span",{children:"from last month"})]})]})})]}),h.jsx("div",{className:"mt-[16px]",children:u.length>0?u.map((m,g)=>h.jsxs("div",{className:g===u.length-1?"":"mb-[16px]",children:[h.jsxs("div",{className:"flex justify-between text-sm mb-[8px]",children:[h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:m?.name}),h.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[h.jsxs("div",{className:"text-[#64748B] inline",children:[m?.bookings," ",m?.bookings<=1?"booking":"bookings"]}),m?.isPaid&&h.jsx("div",{className:"mx-2 text-[#121212] inline",children:m?.revenue})]})]}),h.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:h.jsx("div",{className:`h-[11px] rounded-full ${m?.color}`,style:{width:`${m?.percentage}%`}})})]},g)):h.jsx("div",{className:"flex items-center justify-center h-[120px]",children:h.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}Wn.register(Io,Fo,Wl,Dr,Zr);function JI({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[];for(let u=0;u<n.length;u++)r.push(n[u].level),i.push(Number(n[u].open)),o.push(Number(n[u].in_progress)),a.push(Number(n[u].on_hold)),s.push(Number(n[u].cancelled));const l={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:s,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!1,pointStyle:"rect",padding:12,boxWidth:20,boxHeight:8,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:u=>Math.round(u)}}}};return h.jsx(Ie,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:h.jsx(tW,{className:"!text-[24px] text-[#3C81F6]"}),children:h.jsx("div",{className:"h-full",children:h.jsx(zl,{data:l,options:c})})})}const Khe=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return h.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:h.jsxs("div",{className:"flex items-center gap-[8px] font-medium",children:[h.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),h.jsx("div",{children:n.name}),h.jsx("div",{className:"ml-2",children:n.value})]})})};function e4({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return h.jsx(Ie,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:h.jsx(zf,{className:"!text-[24px] text-[#EF4444]"}),children:h.jsxs("div",{className:"flex h-full items-center gap-[16px]",children:[h.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>h.jsx(Ln,{fill:a.color},s))}),h.jsx(kt,{content:a=>h.jsx(Zt,{...a,data:i,children:h.jsx(Khe,{...a})})})]})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[h.jsx("div",{children:r(n.completed)}),h.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),h.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),h.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>h.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const cP={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:10,walkins:22,preApproved:30},{hour:12,walkins:15,preApproved:28},{hour:14,walkins:30,preApproved:38},{hour:16,walkins:45,preApproved:50},{hour:18,walkins:25,preApproved:40}]};function qhe(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function Ghe(e){if(typeof e=="number"&&e>=0&&e<=23)return e;if(typeof e=="string"){const t=e.trim().toUpperCase(),n=t.match(/^(\d{1,2})(?::\d{2})?\s*(AM|PM)$/);if(n){let i=Number(n[1])%12;return n[2]==="PM"&&(i+=12),i}const r=Number(t);if(!Number.isNaN(r)&&r>=0&&r<=23)return r}return null}function Xhe(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>Ghe(i?.hour)===n)||{};return{hour:n,time:qhe(n),walkins:Number(r?.walkins??0),approved:Number(r?.pre_approved??r?.preApproved??r?.approved??0)}})}function uP({title:e,color:t,rows:n=[],children:r}){const i=h.jsxs("div",{className:"bg-white rounded-[12px] min-w-[260px] p-[16px] border-[0.5px] border-[#EBEBEB] shadow-[0px_0px_12px_0px_#EAF2FF]",children:[h.jsx("div",{className:"flex items-center gap-[8px] font-medium text-[#121212]",children:h.jsx("div",{children:e??""})}),h.jsx("div",{className:"mt-[16px] pt-[16px] border-t border-dashed border-[#EBEBEB] space-y-[16px]",children:n?.map(({label:o,value:a,valueColor:s})=>h.jsxs("div",{className:"flex justify-between text-[14px] leading-[18px]",children:[h.jsx("div",{className:"text-[#64748B]",children:o??""}),h.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return h.jsx(ZR,{placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,maxWidth:"none",render:o=>h.jsx("div",{tabIndex:"-1",...o,children:i}),children:r})}function Qhe({active:e,payload:t}){return!e||!t?.length?null:h.jsx("div",{className:"rounded-[8px] bg-[#121212] px-[12px] py-[8px] text-[12px] text-white shadow-lg",children:t.map(n=>h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.stroke}}),h.jsx("span",{className:"min-w-[82px] text-[#D1D3D4]",children:n.name}),h.jsx("span",{className:"font-semibold",children:n.value})]},n.dataKey))})}function t4({data:e}){const t=e&&Object.keys(e).length?e:cP,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const l=t?.chart_data??[];return Xhe(l.length?l:cP.chart_data)},[t]),{yAxisTicks:o,yAxisMax:a}=k.useMemo(()=>{const l=Math.max(...i.map(u=>Math.max(u.walkins,u.approved))),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[i]),s=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return h.jsx(Ie,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${s}`,icon:h.jsx(Gb,{className:"!text-[24px] text-[#8B5CF6]"}),children:h.jsxs("div",{className:"flex flex-col gap-[24px]",children:[h.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6",children:[h.jsxs("div",{className:"flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),h.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),h.jsxs("div",{className:"flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),h.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),h.jsxs("div",{className:"mt-2 flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),h.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[h.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),h.jsx(uP,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:h.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),h.jsxs("div",{className:"mt-2 flex flex-col gap-[8px]!",children:[h.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),h.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[h.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),h.jsx(uP,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:h.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),h.jsx("div",{className:"w-full h-[149px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(l1,{data:i??[],margin:{top:5,right:0,left:0,bottom:-10},children:[h.jsx(fr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),h.jsx(Gn,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:10,fontWeight:400}}),h.jsx($n,{width:24,axisLine:!1,tickLine:!1,allowDecimals:!1,ticks:o,domain:[0,a],tick:{fill:"#64748B",fontSize:10,fontWeight:400}}),h.jsx(kt,{content:l=>h.jsx(Zt,{...l,data:i,children:h.jsx(Qhe,{...l})})}),h.jsx(Zo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1,name:"Walk-ins",isAnimationActive:!1}),h.jsx(Zo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1})]})})})]})})}function Zhe(){return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] gap-[24px] mt-6 auto-rows-fr",children:[h.jsx(GI,{}),h.jsx(XI,{})]}),h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-3 gap-[24px] mt-6 auto-rows-fr",children:[h.jsx("div",{className:"mt-[-115px]",children:h.jsx(t4,{})}),h.jsx(e4,{}),h.jsx(JI,{})]}),h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-3 gap-[24px] mt-6 auto-rows-fr",children:[h.jsx(WR,{}),h.jsx(ZI,{}),h.jsx(QI,{})]})]})}function n4({data:e=null}){const t={total_entries:79.6,entries:59350,exit:40950},n=e&&Object.keys(e).length>0?e:t,r=c=>{const u=Number(c);return isNaN(u)?0:u},i=r(n.entries),o=r(n.exit),a=e&&Object.keys(e).length>0&&Number(e.entries)===0&&Number(e.exit)===0,s=[{name:"Entries",value:i,color:"#8B5CF6"},{name:"Exit",value:o,color:"#329DFF"}],l=r(n.total_entries);return h.jsx(St,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:a?h.jsx("div",{className:"h-[300px] flex items-center justify-center",children:h.jsx(Vt,{title:"No access Point Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[h.jsxs("div",{className:"relative w-[212px] h-[212px]",children:[h.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:h.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),h.jsx("div",{className:"h-[212px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:s,dataKey:"value",innerRadius:65,outerRadius:100,startAngle:360,endAngle:-180,paddingAngle:1,stroke:"transparent",children:s.map((c,u)=>h.jsx(Ln,{fill:c.color},u))}),h.jsx(kt,{content:c=>h.jsx(Zt,{...c,data:s,children:h.jsx(Gr,{...c})})})]})})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsx("div",{className:"text-[22px] leading-[27px] font-medium text-[#121212]",children:l}),h.jsx("div",{className:"text-[12px] leading-[17px] text-[#64748B]",children:"Total Access"})]})]}),h.jsxs("div",{className:"mt-[28px] flex justify-between w-full px-[20px]",children:[h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[14px] h-[6px] bg-[#8B5CF6]"}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Entries"})]}),h.jsx("div",{className:"text-[18px] font-medium text-[#8B5CF6] mt-[4px]",children:i.toLocaleString()})]}),h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("div",{className:"w-[14px] h-[6px] bg-[#329DFF]"}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Exit"})]}),h.jsx("div",{className:"text-[18px] font-medium text-[#329DFF] mt-[4px]",children:o.toLocaleString()})]})]})]})})}function r4({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return h.jsx(St,{className:n,title:e,titleWeight:"semi-bold",children:h.jsxs("div",{className:"rounded-[12px] overflow-hidden mt-[16px]",children:[h.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[h.jsx("div",{children:"Point"}),h.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>h.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),h.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function i4({data:e=[]}){const[t,n]=k.useState([]),r=e&&e.length?e:[],i=!e||e.length===0,o=e&&e.length>0&&e.every(c=>Number(c.entries)===0&&Number(c.exit)===0),a=i||o,s=c=>c>=1e3?`${c/1e3}K`:c,l=c=>{n(u=>u.includes(c)?u.filter(d=>d!==c):[...u,c])};return h.jsx(St,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:a?h.jsx("div",{className:"h-[270px] flex items-center justify-center",children:h.jsx(Vt,{title:"No access Point Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:r,barSize:54,margin:{top:0,right:0,left:-20,bottom:0},children:[h.jsx(fr,{strokeDasharray:"8 8",vertical:!1}),h.jsx(Zx,{y:0,stroke:"#EBEBEB"}),h.jsx(Gn,{dataKey:"block_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx($n,{tickFormatter:s,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(kt,{cursor:!1,content:c=>h.jsx(Zt,{...c,data:r,children:(()=>{if(!c.active||!c.label)return null;const u=r.find(d=>d.block_name===c.label);return h.jsxs("div",{className:"bg-[#111] text-white px-[14px] py-[8px] rounded-[6px] flex flex-col gap-[6px] text-[13px]",children:[h.jsx("div",{className:"font-semibold",children:c.label}),!t.includes("entries")&&h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-[#329DFF]"}),h.jsx("div",{className:"text-[#aaa]",children:"Entries"}),h.jsx("div",{className:"font-bold",children:u?.entries??0})]}),!t.includes("exit")&&h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-[#76BDFF]"}),h.jsx("div",{className:"text-[#aaa]",children:"Exit"}),h.jsx("div",{className:"font-bold",children:u?.exit??0})]})]})})()})}),h.jsx(Ol,{verticalAlign:"bottom",height:36,content:()=>{const c=[{key:"entries",label:"Entries",color:"#329DFF"},{key:"exit",label:"Exit",color:"#76BDFF"}];return h.jsx("div",{style:{display:"flex",gap:"20px",justifyContent:"center",marginTop:"20px"},children:c.map((u,d)=>{const f=t.includes(u.key);return h.jsxs("div",{onClick:()=>l(u.key),style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",opacity:f?.4:1},children:[h.jsx("div",{style:{width:"20px",height:"8px",backgroundColor:u.color}}),h.jsx("div",{style:{fontSize:"12px",color:"#64748B"},children:u.label})]},d)})})}}),h.jsx(Gt,{dataKey:"entries",stackId:"a",fill:"#329DFF",hide:t.includes("entries")}),h.jsx(Gt,{dataKey:"exit",stackId:"a",fill:"#76BDFF",hide:t.includes("exit")})]})})})})}function Jhe(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"16",y1:"2",x2:"16",y2:"6"},child:[]},{tag:"line",attr:{x1:"8",y1:"2",x2:"8",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"10",x2:"21",y2:"10"},child:[]}]})(e)}function eme(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function tme(e){return yt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function xs({text:e="Smart Access",Icon:t,iconColor:n="#329DFF"}){return h.jsxs("div",{className:"px-[20px] pt-6",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[t?h.jsx("div",{className:"flex items-center justify-center",children:h.jsx(t,{size:20,style:{color:n}})}):null,h.jsx("div",{className:"text-[24px] leading-[32px] font-semibold text-[#121212]",children:e})]}),h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px] bg-white px-[16px] py-[8px].5 rounded-[8px] border border-[#EBEBEB] text-sm font-medium text-[#64748B] hover:bg-gray-100 transition-colors cursor-pointer",children:[h.jsx("div",{className:"flex items-center",children:h.jsx(Jhe,{size:16})}),h.jsx("div",{children:"Today"}),h.jsx("div",{className:"flex items-center",children:h.jsx(eme,{size:16})})]}),h.jsxs("div",{className:"flex items-center gap-[8px] px-[12px] py-[8px] rounded-[8px] border border-[#EBEBEB] bg-white text-[#7C3AED] text-[14px] font-medium hover:bg-[#E9D5FF] transition cursor-pointer",children:[h.jsx("div",{children:"Export Report"}),h.jsx("div",{className:"flex items-center",children:h.jsx(tme,{size:16})})]})]})]}),h.jsx("div",{className:"mt-4 border-t border-dashed border-[#E2E8F0]"})]})}function nme(){return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Smart Access",Icon:zpe}),h.jsxs("div",{className:"px-[20px] grid grid-cols-1 lg:grid-cols-3 gap-[24px] mt-6 auto-rows-fr",children:[h.jsx(n4,{}),h.jsx(i4,{})]}),h.jsx("div",{className:"mt-7 px-[20px]"})]})}Wn.register(hm,Dr,Zr);const Wv=e=>{const t=Number(e);return Number.isFinite(t)?t:0},rme={id:"bottomGlow",afterDatasetsDraw(e,t,n){if(!n?.enabled)return;const r=e.getDatasetMeta(0);if(!r?.data?.[0])return;const{ctx:i}=e,{x:o,y:a,innerRadius:s}=r.data[0],l=Math.max(s-2,0),c=a+l*.9,u=i.createRadialGradient(o,c,0,o,c,l*1.08);u.addColorStop(0,n.color??"rgba(186, 230, 253, 0.72)"),u.addColorStop(.3,"rgba(186, 230, 253, 0.4)"),u.addColorStop(.58,"rgba(186, 230, 253, 0.16)"),u.addColorStop(1,"rgba(186, 230, 253, 0)"),i.save(),i.beginPath(),i.arc(o,a,l,0,Math.PI*2),i.clip(),i.fillStyle=u,i.beginPath(),i.ellipse(o,c,l*1.08,l*.52,0,0,Math.PI*2),i.fill(),i.restore()}},ime={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=24,bottomSize:u=9,topColor:d="#121212",bottomColor:f="#121212"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-6),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+22),r.restore()}},o4=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthText:c="Compared to last month",totalLabel:u="Total",centerTopColor:d="#0F172A",centerBottomColor:f="#64748B",centerTopSize:p,centerBottomSize:m,showBottomGlow:g=!1,bottomGlowColor:v="rgba(186, 230, 253, 0.75)",showEmptyStateWhenZero:x=!1,widgetType:_="",resolvedWidgetType:w="",data:y})=>{const E=y?.title??e;y?.icon;const S=y?.firstLabel??n,P=Wv(y?.firstValue??y?.resolved?.current??y?.sold?.current??y?.first?.current??r??0),D=y?.firstColor??i,T=y?.secondLabel??o,R=Wv(y?.secondValue??y?.open?.current??y?.unsold?.current??y?.second?.current??a??0),A=y?.secondColor??s,C=y?.growthPercentage??y?.trend_percent??l??"+0%",j=y?.growthText??c,N=y?.totalLabel??u,M=y?.widgetType??_??w,L=y?.centerTopSize??p??(M==="commercial"?34:20),B=y?.centerBottomSize??m??(M==="commercial"?14:10),V=y?.showBottomGlow??g,z=y?.bottomGlowColor??v,W=y?.showEmptyStateWhenZero??x,Q=P+R,G=Wv(y?.total_tickets?.current??y?.total_units?.current??y?.total?.current??y?.current??Q),ie=W&&Q===0&&G===0,J={labels:[S,T],datasets:[{data:[P,R],backgroundColor:[D,A],borderWidth:2,hoverOffset:4}]},re={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{enabled:!1,external:li()},centerText:{top:`${Q}`,bottom:N,topSize:L,bottomSize:B,topColor:d,bottomColor:f},bottomGlow:{enabled:V,color:z}}},ae=[{label:S,value:P,color:D},{label:T,value:R,color:A}],le=C.toString().includes("+"),ue=C.toString().includes("-"),K=le?"#1FA05B":"#AB0000";return h.jsx(St,{title:E,className:"h-[362px] leading-[24px]",titleWeight:"semi-bold",childrenClassName:ie?"h-full":"",children:ie?h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx(Vt,{})}):h.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[h.jsxs("div",{className:"col-span-5 space-y-[12px]",children:[ae.map((U,Z)=>h.jsxs("div",{children:[h.jsx("div",{className:"text-[12px] text-[#64748B] mb-[8px]",children:U.label}),h.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:U.color},children:U.value})]},Z)),h.jsxs("div",{className:`text-[12px] flex gap-[4px] ${M==="commercial"?"mt-[20px]":""} items-center`,style:{color:K},children:[le&&h.jsx(oa,{}),ue&&h.jsx(ia,{}),h.jsx("div",{children:C.replace("+","").replace("-","")}),h.jsx("div",{className:"text-[#64748B] text-[12px] leading-[14px] ml-[4px] whitespace-nowrap",children:j})]})]}),h.jsx("div",{className:"col-span-7",children:h.jsx("div",{className:`${M==="commercial"?"h-[260px] max-w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:h.jsx(gm,{data:J,options:re,plugins:[rme,ime]})})})]})})},ome=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return h.jsx("g",{transform:`translate(${e},${t})`,children:h.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>h.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function a4({data:e=[]}){const t=e&&e.length>0,n=e.map(r=>({name:r.category_name,value:r.total_complaints,color:"#08B6D4"}));return h.jsx(St,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full mt-[24px]!",children:t?h.jsx("div",{className:"w-full h-[262px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:n,layout:"vertical",margin:{top:0,right:8,left:-20,bottom:0},children:[h.jsx(fr,{strokeDasharray:"3 3",horizontal:!1,stroke:"#E5E7EB"}),h.jsx(Gn,{type:"number",tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1,tickMargin:10,allowDecimals:!1}),h.jsx($n,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:132,tick:h.jsx(ome,{})}),h.jsx(kt,{cursor:{fill:"transparent"},position:{x:300,y:0},allowEscapeViewBox:{x:!0,y:!0},content:r=>r.active?h.jsx(Zt,{...r,data:n,children:h.jsx(Gr,{...r})}):null}),h.jsx(Gt,{dataKey:"value",barSize:36,fill:"#08B6D4"})]})})}):h.jsx(Vt,{title:"No Tickets Found",description:"Catch up all the data. Change the date range to see the data."})})}function bb({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const a=parseFloat(i),s=a>=0,l=s?"#16A34A":"#DC2626";return h.jsxs("div",{className:"relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] h-[132px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[e&&h.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(e,{className:"h-[20px] w-[20px]"})}),h.jsx("div",{className:"text-[16px] leading-[20px] tracking-[-2%] font-medium text-[#64748B]",children:n})]}),h.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&h.jsxs("div",{className:"mt-[12px] flex items-center gap-[8px]",children:[i&&h.jsxs("div",{className:"flex items-center gap-[4px] text-[12px] leading-[16px] font-medium",style:{color:l},children:[s?h.jsx(oa,{}):h.jsx(ia,{}),Math.abs(a),"%"]}),o&&h.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}function ame(){const e=[{category_name:"Plumbing",total_complaints:12},{category_name:"Electrical Issues",total_complaints:8},{category_name:"Cleaning Services",total_complaints:15}];return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Helpdesk",Icon:Spe,iconColor:"#12B981"}),h.jsxs("div",{className:"flex gap-[24px] mt-[24px] px-[16px]",children:[h.jsx("div",{className:"w-[380px] h-full space-y-[16px]",children:h.jsx(o4,{title:"Tickets",icon:h.jsx(zf,{className:"h-6 w-6 text-[#EF4444]"}),firstLabel:"Resolved",firstValue:779,firstColor:"#12B981",secondLabel:"Open",secondValue:83,secondColor:"#AB0000",growthPercentage:"+9.1%",growthColor:"#1FA05B",growthText:"Compared to last month",widgetType:"commercial",totalLabel:"Total",centerTopSize:34,centerBottomSize:14,showBottomGlow:!0,showEmptyStateWhenZero:!0})}),h.jsx("div",{className:"flex-1",children:h.jsx(a4,{data:e})})]})]})}const dP=e=>String(e).padStart(2,"0"),fP=(e,t="start")=>e?`${[e.getFullYear(),dP(e.getMonth()+1),dP(e.getDate())].join("-")} ${t==="end"?"23:59:59":"00:00:00"}`:"",s4=({data:e=[],onDateChange:t})=>{const[n,r]=k.useState(new Date),[i,o]=k.useState(!1),s=(v=>{const x=new Date(v);return x.setDate(x.getDate()-6),x})(n),l=v=>{try{return v.toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}catch{return""}},c=v=>{const x=new Date(v),_=new Date(x);_.setDate(_.getDate()-6),t&&t(fP(_,"start"),fP(x,"end"))},u=()=>{const v=new Date(n);v.setDate(v.getDate()-7),r(v),c(v)},d=()=>{const v=new Date(n);v.setDate(v.getDate()+7),r(v),c(v)},f=()=>{o(v=>!v)},p=v=>{const x=v||new Date;r(x),c(x),o(!1)},m=Array.isArray(e)?e:[],g=!m.length||m.every(v=>v.no_of_visitors===0);return h.jsxs(St,{title:"Weekly Visitor Pattern",period:`${l(s)} - ${l(n)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:u,onNextClick:d,onCalendarClick:f,children:[i&&h.jsx("div",{className:"anarock-datepicker absolute top-[70px] right-[24px] z-50",children:h.jsx(LD,{selected:n,onChange:p,inline:!0,maxDate:new Date,showYearDropdown:!0,scrollableYearDropdown:!0,yearDropdownItemNumber:40})}),g?h.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:h.jsx(Vt,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsx("div",{className:"w-full h-[280px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(aR,{data:m,margin:{top:10,right:-10,left:-10,bottom:0},children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[h.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),h.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),h.jsx(Gn,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1,tickFormatter:v=>new Date(v).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),h.jsx($n,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1,domain:[0,"dataMax + 2"]}),h.jsx(kt,{cursor:!1,content:v=>{const{active:x,payload:_,label:w}=v;if(!x||!_?.length)return null;const y=new Date(w).toLocaleDateString("en-GB",{day:"2-digit",month:"short"});return h.jsx(Zt,{...v,data:m,children:h.jsx(Gr,{active:x,payload:_,label:y})})}}),h.jsx(r1,{type:"monotone",dataKey:"no_of_visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:v=>{const{cx:x,cy:_,stroke:w}=v;return h.jsxs("g",{children:[h.jsx("circle",{cx:x,cy:_,r:6,fill:"#fff",stroke:"#6466F1",strokeWidth:2}),h.jsx("circle",{cx:x,cy:_,r:2.5,fill:"#6466F1"})]})}})]})})})]})},sme=[{building_name:"Google",no_of_visitors:1e3},{building_name:"Uber",no_of_visitors:3500},{building_name:"ANAROCK",no_of_visitors:2e3},{building_name:"Flipkart",no_of_visitors:8e3},{building_name:"HP",no_of_visitors:1650}],l4=({data:e,title:t,bar:n})=>{const r=Array.isArray(e)&&e?.length===0,i=e==null?sme:Array.isArray(e)?e:[];return h.jsx(St,{title:t||"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:h.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:r?h.jsx(Vt,{title:t||"Organisation Wise Visitors",description:"Catch up all the data. Change the date range to see the data."}):h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:i||[],margin:{top:10,right:10,left:10,bottom:-10},barCategoryGap:35,children:[h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),h.jsx(Gn,{dataKey:"building_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),h.jsx($n,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1}),h.jsx(kt,{cursor:!1,content:o=>o.active?h.jsx(Zt,{...o,data:i,children:h.jsx(Gr,{...o})}):null}),h.jsx(Gt,{dataKey:"no_of_visitors",name:"Visitors",maxBarSize:55,fill:n||"#3C81F6"})]})})})})};function lme(){const e=[{day:"2026-03-05",no_of_visitors:0},{day:"2026-03-06",no_of_visitors:0},{day:"2026-03-07",no_of_visitors:0},{day:"2026-03-08",no_of_visitors:14},{day:"2026-03-09",no_of_visitors:0},{day:"2026-03-10",no_of_visitors:0},{day:"2026-03-11",no_of_visitors:0}];return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Visitors",Icon:_pe,iconColor:"#884EA7"}),h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[24px]",children:[h.jsx(bb,{icon:Gpe,iconColor:"#329DFF",title:"Visitors Expected",value:"1,247",percentage:"+11.0%",percentageText:"Compared to last month"}),h.jsx(bb,{icon:lpe,iconColor:"#1FA05B",title:"Visitors Inside",value:"800",percentageText:"Across organisations"})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[24px]",children:[h.jsx(s4,{data:e}),h.jsx(l4,{})]}),h.jsx("div",{})]})}function co({data:e}){return h.jsx("div",{className:"h-full",children:e.map((t,n)=>{const r=parseFloat(t.delta),i=r>=0;return h.jsx(Ie,{iconClassName:"!gap-[8px]",title:h.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:h.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:`${t?.widget==="amenities"?"h-[139px]":"h-[124px]"}`,children:h.jsxs("div",{className:`flex flex-col gap-[8px] ${t?.widget==="amenities"?"mt-[3.5px]":"mt-0"}`,children:[h.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),h.jsxs("div",{className:`flex items-center text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[t.delta&&h.jsxs("div",{className:`flex items-center gap-[4px] px-[6px] py-[2px] rounded-[4px] font-medium
481
481
  ${i?"text-[#1FA05B] bg-[#F7FEFA]":"text-[#E11D48] bg-[#FBF4F4]"}
482
482
  `,children:[i?h.jsx(oa,{}):h.jsx(ia,{}),Math.abs(r),"%"]}),h.jsx("div",{className:t.deltaColor?`text-[${t.deltaColor}] font-[600]`:"text-[#64748B]",children:t.deltaLabel})]})]})},n)})})}const cme=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],ume=({x:e,y:t,payload:n})=>h.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:h.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function c4({data:e,bar:t}){const n=Array?.isArray(e)&&e?.length===0,i=(e==null?cme:Array?.isArray(e)?e:[]).map(o=>({...o,name:o.facility_name,color:"#8B5CF6"}));return h.jsx(Ie,{title:"Bookings",icon:h.jsx(Npe,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:n?h.jsx(Vt,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:i||[],layout:"vertical",margin:{top:0,right:10,left:-12,bottom:0},children:[h.jsx(Gn,{type:"number",allowDecimals:!1,tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),h.jsx($n,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:h.jsx(ume,{})}),h.jsx(kt,{cursor:{fill:"transparent"},position:{x:300,y:0},allowEscapeViewBox:{x:!0,y:!0},content:o=>o.active?h.jsx(Zt,{...o,data:i,children:h.jsx(Gr,{...o})}):null}),h.jsx(Gt,{dataKey:"total_booking",barSize:40,fill:t||"#8B5CF6"})]})})})})}const dme=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function u4({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?dme:Array.isArray(e)?e:[];return h.jsx(St,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsx("div",{className:"w-full h-[265px] mt-[28px] flex items-center justify-center",children:t?h.jsx(Vt,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:n||[],margin:{top:0,right:0,left:-30,bottom:0},children:[h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),h.jsx(Gn,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),h.jsx($n,{allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:r=>`${r??0}`}),h.jsx(kt,{cursor:!1,allowEscapeViewBox:{x:!0,y:!0},content:r=>r.active?h.jsx(Zt,{...r,data:n,children:h.jsx(Gr,{...r})}):null}),h.jsx(Gt,{dataKey:"no_of_booking",barSize:54,fill:"#12B981"})]})})})})}const fme=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],af=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function d4({data:e,currencyType:t}){const n=Array?.isArray(e)&&e?.length===0,r=e??fme,i=Array?.isArray(r)&&r?.length>0?r?.map(l=>({name:l?.facility_name||"Unknown",value:Number(l?.paid_revenue)||0})):[],a=(i?.length>0?i?.every(l=>l?.value===0):!1)?i?.map((l,c)=>({...l,value:c===0?1:0})):i,s=l=>`${t||"Rs"} ${l?.toLocaleString?.("en-IN")||0}`;return h.jsx(St,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsx("div",{className:"grid grid-cols-12 gap-[24px] items-center h-full mt-[16px]",children:n?h.jsx("div",{className:"col-span-12 flex items-center justify-center h-[240px]",children:h.jsx(Vt,{title:"No Amenity Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"col-span-6 h-[240px] w-full max-w-[240px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:a||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:a?.map?.((l,c)=>h.jsx(Ln,{fill:af?.[c%af?.length]},`cell-${c}`))}),h.jsx(kt,{cursor:!1,allowEscapeViewBox:{x:!0,y:!0},content:l=>l.active?h.jsx(Zt,{...l,data:a,children:h.jsx(Gr,{...l,formatter:c=>s(c)})}):null})]})})}),h.jsx("div",{className:"col-span-6",children:h.jsxs("div",{className:"rounded-[12px] !overflow-hidden border border-[#E2E8F0] !border-r-1 border-r-[#E2E8F0]! !pr-0 !mr-0",children:[h.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[h.jsx("div",{children:"Amenity"}),h.jsx("div",{className:"text-right",children:"Revenue"})]}),h.jsx("div",{className:"divide-y divide-[#F1F5F9] max-h-[238px] overflow-y-auto hide-scrollbar",children:i?.map?.((l,c)=>h.jsxs("div",{className:"grid grid-cols-2 px-[16px] py-[16px] text-[14px] text-[#121212]",children:[h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:af?.[c%af?.length]}}),h.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:l?.name||"Unknown"})]}),h.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:s(l?.value||0)})]},l?.name||c))})]})})]})})})}function pme(){return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Amenities",Icon:Ppe,iconColor:"#F59D0D"}),h.jsxs("div",{className:"p-[16px] grid grid-cols-2 mt-[24px] gap-[24px]",children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[24px]",children:[h.jsx(co,{data:[{title:"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",Icon:Upe,iconColor:"#1FA05B",iconBg:"bg-emerald-50"}]}),h.jsx(co,{data:[{title:"Utilisation Rate",value:"73%",delta:"+11.0%",deltaLabel:"Compared to last month",Icon:Lpe,iconColor:"#329DFF"}]}),h.jsx(co,{data:[{title:"Most Popular",value:"Table Tennis",delta:"+11.0%",deltaLabel:"Compared to last month",Icon:KI,iconColor:"#FA7E28"}]}),h.jsx(co,{data:[{title:"Pending Approvals",value:23,delta:"-8.0%",deltaLabel:"Compared to last month",Icon:HI,iconColor:"#AB0000"}]})]}),h.jsx(c4,{})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] px-[16px]",children:[h.jsx(u4,{}),h.jsx(d4,{})]})]})}const sf=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],hme=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],f4=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,facility_name:i.asset_group_name,value:i.asset_count||0,fill:sf[o%sf.length]})):hme.map((i,o)=>({name:i.asset_group_name,facility_name:i.asset_group_name,value:i.asset_count||0,fill:sf[o%sf.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?h.jsx(St,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsx("div",{className:"flex items-center justify-center h-[260px]",children:h.jsx(Vt,{title:"No Assets Found",description:"Catch up all the data. Change the date range to see the data."})})}):h.jsx(St,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsxs("div",{className:"flex items-center justify-between h-full mt-[16px]",children:[h.jsxs("div",{className:"relative w-[252px] h-[273px]",children:[h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,isAnimationActive:!1,children:n.map((i,o)=>h.jsx(Ln,{fill:i.fill},o))}),h.jsx(kt,{cursor:!1,allowEscapeViewBox:{x:!0,y:!0},content:i=>i.active?h.jsx(Zt,{...i,data:n,children:h.jsx(Gr,{...i})}):null})]})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsx("div",{className:"text-[24px] leading-[33px] font-medium text-[#121212]",children:r}),h.jsx("div",{className:"text-[12px] leading-[17px] text-[#64748B] mt-[2px]",children:"Total Assets"})]})]}),h.jsx("div",{className:"flex-1 max-w-[280px]",children:h.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white border border-[#E2E8F0] !border-r-1 border-r-[#E2E8F0]! !pr-0 !mr-0",children:[h.jsxs("div",{className:"flex items-center justify-between px-[16px] py-[12px] bg-[#F8FAFC]",children:[h.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),h.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>h.jsxs("div",{className:"max-h-[205px] overflow-y-auto hide-scrollbar flex items-center justify-between px-[16px] py-[12px] border-t border-[#F1F5F9]",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.fill}}),h.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),h.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},p4=({data:e,title:t})=>{const[n,r]=k.useState({}),i=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],o=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:i,[e]),a=s=>{const{dataKey:l}=s;r(c=>({...c,[l]:!c[l]}))};return Array.isArray(e)&&e.length===0?h.jsx(St,{title:t||"Maintenance Status",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:h.jsx(Vt,{title:"No Maintenance Assets Status Found",description:"Catch up all the data. Change the date range to see the data."})})}):h.jsx(St,{title:t||"Maintenance Status",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?h.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):h.jsx("div",{className:`relative w-full ${t?"h-[261px]":"h-[297px]"} mt-[20px]`,children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:o,barSize:54,barCategoryGap:"40%",margin:{top:20,right:20,left:-20,bottom:0},children:[h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E2E8F0"}),h.jsx(Gn,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),h.jsx($n,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1,allowDecimals:!1}),h.jsx(kt,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},allowEscapeViewBox:{x:!0,y:!0},content:s=>!s.active||!s.payload||!s.payload.length?null:h.jsx(Zt,{...s,data:o,children:h.jsxs("div",{className:"bg-[#121212] rounded-[10px] px-[14px] py-[10px] text-[12px] text-white",children:[h.jsx("div",{className:"mb-[6px] font-semibold",children:s.label}),s.payload.map((l,c)=>{const u=l.color||l.fill||"#fff";return h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{backgroundColor:u}}),h.jsx("span",{className:"text-[#D1D3D4]",children:l.name}),h.jsx("span",{className:"text-white font-semibold",children:l.value})]},c)})]})})}),h.jsx(Ol,{verticalAlign:"bottom",align:"center",onClick:a,content:({payload:s})=>h.jsx("div",{className:"flex items-center justify-center gap-[16px] pt-4 flex-wrap",children:s.map((l,c)=>h.jsxs("div",{onClick:()=>a({dataKey:l.dataKey}),className:"flex items-center gap-[8px] cursor-pointer",children:[h.jsx("div",{style:{width:"16px",height:"8px",backgroundColor:n[l.dataKey]?"#CBD5E1":l.color}}),h.jsx("span",{style:{fontSize:"12px",color:n[l.dataKey]?"#CBD5E1":"#64748B"},children:l.value})]},c))})}),h.jsx(Gt,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:n.Open}),h.jsx(Gt,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:n.Closed}),h.jsx(Gt,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:n.Cancelled}),h.jsx(Gt,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:n.OnHold,name:"On-Hold"}),h.jsx(Gt,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:n.InProgress,name:"In Progress"})]})})})})})};function mme(){return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Asset Management",Icon:Bpe,iconColor:"#A74E8A"}),h.jsxs("div",{className:"grid grid-cols-2 mt-4 gap-[24px]",children:[h.jsx(f4,{}),h.jsx(p4,{})]})]})}function h4({data:e}){const t=[{name:"Completed",value:Number(e?.completed||0),color:"#12B981"},{name:"Not - Completed",value:Number(e?.not_completed||0),color:"#F69E0A"},{name:"Missed",value:Number(e?.missed||0),color:"#EF4444"}],n=Number(e?.completed||0)+Number(e?.not_completed||0)+Number(e?.missed||0),r=Number(e?.completed||0);return h.jsx(St,{title:"Patrol Status",className:"h-[362px]",titleWeight:"semi-bold",children:h.jsxs("div",{className:"flex flex-col items-center justify-center",children:[h.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:t,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t.map((i,o)=>h.jsx(Ln,{fill:i.color},`cell-${o}`))}),h.jsx(kt,{cursor:!1,allowEscapeViewBox:{x:!0,y:!0},content:i=>i.active?h.jsx(Zt,{...i,data:t,children:h.jsx(Gr,{...i})}):null})]})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r,"/",n]}),h.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),h.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t.map((i,o)=>h.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==t.length-1?"border-b border-[#F1F5F9]":""}`,children:[h.jsxs("div",{className:"flex items-center gap-[10px]",children:[h.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i.color}}),h.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.name})]}),h.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.value})]},i.name))})]})})}function m4({incidentReports:e,incidentReportsDetails:t}){const n=Number(e?.open||0),r=Number(e?.in_progress||0),i=Number(e?.closed||0);return h.jsx(St,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:h.jsxs("div",{children:[h.jsxs("div",{className:"flex w-full text-center gap-[16px] mt-[24px]",children:[h.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-[#FBF4F4] h-[76px] rounded",children:[h.jsx("div",{className:"text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),h.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-[#FFFBF2] h-[76px] rounded",children:[h.jsx("div",{className:"text-[24px] leading-[28px] font-medium text-[#F2A815]",children:r}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#F2A815]",children:"In-progress"})]}),h.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-[#F7FEFA] h-[76px] rounded",children:[h.jsx("div",{className:"text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i}),h.jsx("div",{className:"text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),h.jsx("div",{className:"mt-4 space-y-2",children:t?.length>0?t.map((o,a)=>{const s=o?.escalation_level==="Danger"?"text-[#AB0000]":o?.escalation_level==="High"?"text-[#E7A015]":"text-[#1FA05B]";return h.jsxs("div",{className:"flex items-center justify-between p-[12px] bg-[#FAFBFD] rounded-md",children:[h.jsx("div",{className:"flex items-center gap-[8px]",children:h.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_reporting_id})}),h.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:h.jsxs("div",{children:[o?.escalation_value," - ",o?.escalation_level]})})]},a)}):h.jsx(h.Fragment,{})})]})})}function gme(){return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Guard Petrol",Icon:Hpe,iconColor:"#AB0000"}),h.jsxs("div",{className:"px-[16px] grid grid-cols-3 gap-[24px] mt-4",children:[h.jsx(h4,{}),h.jsx(m4,{}),h.jsx(qI,{})]})]})}function vme(){return h.jsxs(h.Fragment,{children:[h.jsx(xs,{text:"Engagement",Icon:Mpe,iconColor:"#3C81F6"}),h.jsxs("div",{className:"grid grid-cols-4 gap-[24px] mt-4",children:[h.jsx(co,{data:[{title:"Notice",value:20,deltaLabel:"Currently active",Icon:xpe,iconColor:"#1FA05B"}]}),h.jsx(co,{data:[{title:"Discussion Forum",value:9,deltaLabel:"Active threads",Icon:Cpe,iconColor:"#329DFF"}]}),h.jsx(co,{data:[{title:"Polls",value:3,deltaLabel:"Currently active",Icon:Ape,iconColor:"#FA7E28"}]}),h.jsx(co,{data:[{title:"Surveys",value:8,deltaLabel:"Currently active",Icon:Ipe,iconColor:"#DBB467"}]})]})]})}function g4({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Closed"},{key:"d",label:"Open"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},totalRows:a=0,totalPages:s=1,pageOptions:l=[10,20,30,40,50]}){const c=Array.isArray(t)?t:[],u=Array.isArray(e)?e:[],d=n>0?Math.ceil(c.length/n):1,f=s||d,p=c,m=a===0&&c.length===0,g=`repeat(${u.length}, 1fr)`;return h.jsxs("div",{className:"w-full bg-white rounded-[12px] h-[390px] !border-[0.5px] !border-[#EBEBEB] !shadow-[0_0_12px_0_#EAF2FF] overflow-hidden flex flex-col",children:[h.jsx("div",{className:"flex-1 overflow-auto hide-scrollbar",children:h.jsxs("div",{className:"h-full min-w-max",children:[h.jsx("div",{className:"grid bg-[#354A5E] text-white text-[16px] leading-[20px] font-medium sticky top-0 z-30",style:{gridTemplateColumns:g},children:u.map((v,x)=>h.jsx("div",{className:`px-[24px] py-[16px] whitespace-nowrap text-left ${x===0?"sticky left-0 z-40 bg-[#354A5E] text-[16px] leading-[20px] shadow-[2px_0_5px_rgba(0,0,0,0.1)] border-r border-[#2C3E50]":""}`,children:v.label},x))}),m?h.jsx("div",{className:"h-[calc(100%-50px)] flex items-center justify-center",children:h.jsx(Vt,{title:"No Data Found",description:"Catch up all the data. Change the date range to see the data."})}):p.map((v,x)=>h.jsx("div",{className:"grid",style:{gridTemplateColumns:g},children:u.map((_,w)=>{const y=v[_.key],E=_.label==="Closed",S=_.label==="Open",P=typeof y=="string"&&y.includes("%"),D=y==="100%"?"bg-[#F0FEF2] text-[#36AB6C]":"bg-[#FFF0F0] text-[#AB0000]";return h.jsx("div",{className:`px-[24px] py-[16px] flex items-center ${w===0?"bg-white sticky left-0 z-20 shadow-[2px_0_5px_rgba(0,0,0,0.05)] border-r border-gray-200":"bg-gray-50"} text-[#121212]`,children:E?h.jsx("div",{className:"text-[14px] font-medium",style:{color:"#36AB6C"},children:y??"-"}):S?h.jsx("div",{className:"text-[14px] font-medium",style:{color:"#AB0000"},children:y??"-"}):P?h.jsx("div",{className:`inline-block px-[12px] py-[4px] rounded-full text-[14px] font-medium ${D}`,children:y}):h.jsx("div",{children:y??"-"})},w)})},x))]})}),h.jsxs("div",{className:"flex justify-end items-center px-[24px] py-[16px] text-sm bg-white border-t border-[#F0F0F0] gap-[32px] shrink-0",children:[h.jsxs("div",{className:"flex items-center gap-[8px] text-gray-600 text-[14px]",children:[h.jsx("div",{children:"Rows per page:"}),h.jsx("select",{value:n,onChange:v=>{r(Number(v.target.value)),o(1)},className:"border rounded px-[8px] py-[4px]",children:l.map((v,x)=>h.jsx("option",{value:v,children:v},x))}),h.jsxs("div",{className:"ml-4 text-[14px]",children:[c?.length===0?"0–0":`1–${c?.length}`," of"," ",a||c?.length]})]}),h.jsxs("div",{className:"flex items-center space-x-2 text-gray-600 text-[14px]",children:[h.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(YI,{size:18})}),h.jsx("button",{onClick:()=>o(v=>v-1),disabled:i===1,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(W1,{size:18})}),h.jsx("button",{onClick:()=>o(v=>v+1),disabled:i===f,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(z1,{size:18})}),h.jsx("button",{onClick:()=>o(f),disabled:i===f,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(UI,{size:18})})]})]})]})}const v4=({options:e=[],value:t,onChange:n})=>{const[r,i]=k.useState(!1),o=k.useRef(null);return k.useEffect(()=>{const a=s=>{o.current&&!o.current.contains(s.target)&&i(!1)};return document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}},[]),h.jsxs("div",{ref:o,className:"relative h-[32px]",children:[h.jsxs("div",{className:"flex items-center justify-between gap-[10px] px-[12px] py-[8px] border border-[#E2E8F0] rounded-[4px] cursor-pointer min-w-[140px]",onClick:()=>i(!r),children:[h.jsx("div",{className:"text-[12px] leading-[16px] min-w-[109px] text-[#64748B]",children:t}),h.jsx(hpe,{size:16,className:"text-[#64748B]"})]}),r&&h.jsx("div",{className:"absolute top-[110%] left-0 w-full bg-white border border-[#E2E8F0] rounded-[8px] shadow-md z-10",children:e.map((a,s)=>h.jsx("div",{className:"px-[12px] py-[8px] text-[14px] text-[#334155] hover:bg-[#F1F5F9] cursor-pointer",onClick:()=>{n(a),i(!1)},children:a},s))})]})},yme=({data:e,communities:t,title:n})=>{const[r,i]=k.useState({}),[o,a]=k.useState(""),s=t?.map(d=>d?.community_name)||[];k.useEffect(()=>{s?.length>0&&!o&&a(s[0])},[s,o]);const l=[{community_name:"L1",Cancelled:55,Open:50,OnHold:20,InProgress:10},{community_name:"L2",Cancelled:15,Open:15,OnHold:8,InProgress:5},{community_name:"L3",Cancelled:12,Open:75,OnHold:18,InProgress:7}],c=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:l,[e]),u=d=>{const{dataKey:f}=d||{};i(p=>({...p,[f]:!p?.[f]}))};return Array.isArray(e)&&e.length===0?h.jsx(St,{title:n||"Escalation Level By Building",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsx("div",{className:"w-full flex items-center justify-center",children:h.jsx(Vt,{title:"No Maintenance Assets Status Found",description:"Catch up all the data. Change the date range to see the data."})})}):h.jsx(St,{title:n||"Escalation Level By Building",titleWeight:"semi-bold",className:"h-[362px]",childrenClassName:"mt-[21px]",rightContent:h.jsx(v4,{options:s,value:o,onChange:d=>a(d)}),children:h.jsx("div",{className:"w-full flex items-center justify-center",children:Array.isArray(e)&&e.length===0?h.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):h.jsx("div",{className:"relative w-full h-[261px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Mo,{data:c,barSize:54,barCategoryGap:"40%",margin:{top:20,right:20,left:-20,bottom:0},children:[h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E2E8F0"}),h.jsx(Gn,{dataKey:"community_name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),h.jsx($n,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1,allowDecimals:!1}),h.jsx(kt,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},allowEscapeViewBox:{x:!0,y:!0},content:d=>!d?.active||!d?.payload?.length?null:h.jsx(Zt,{...d,data:c,children:h.jsxs("div",{className:"bg-black rounded-[10px] px-[14px] py-[10px] text-[12px] text-white",children:[h.jsx("div",{className:"mb-[6px] font-semibold",children:d?.label}),d?.payload?.map((f,p)=>{const m=f?.color||f?.fill||"#fff";return h.jsxs("div",{className:"flex items-center gap-[6px]",children:[h.jsx("span",{className:"w-[8px] h-[8px] rounded-full inline-block",style:{backgroundColor:m}}),h.jsx("span",{className:"text-[#D1D3D4]",children:f?.name}),h.jsx("span",{className:"text-white font-semibold",children:f?.value})]},p)})]})})}),h.jsx(Ol,{verticalAlign:"bottom",align:"center",onClick:u,content:({payload:d})=>h.jsx("div",{className:"flex items-center justify-center gap-[16px] pt-4 flex-wrap",children:d?.map((f,p)=>h.jsxs("div",{onClick:()=>u({dataKey:f?.dataKey}),className:"flex items-center gap-[8px] cursor-pointer",children:[h.jsx("div",{className:`w-[16px] h-[8px] ${r?.[f?.dataKey]?"bg-slate-300":""}`,style:{backgroundColor:r?.[f?.dataKey]?"#CBD5E1":f?.color}}),h.jsx("span",{className:`text-[12px] ${r?.[f?.dataKey]?"text-[#CBD5E1]":"text-[#64748B]"}`,children:f?.value})]},p))})}),h.jsx(Gt,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:r?.Open}),h.jsx(Gt,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:r?.Cancelled}),h.jsx(Gt,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:r?.OnHold,name:"On-Hold"}),h.jsx(Gt,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:r?.InProgress,name:"In Progress"})]})})})})})},bme=({data:e=[]})=>{const[t,n]=k.useState("Kosmo One"),r=["Kosmo One","Kosmo Two","Kosmo Three"],i=Array.isArray(e)?e:[],o=!i.length||i.every(a=>a.no_of_visitors===0);return h.jsx(St,{title:"Top 5 Tenants by Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-[20px]",rightContent:h.jsx(v4,{options:r,value:t,onChange:a=>n(a)}),children:o?h.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:h.jsx(Vt,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsx("div",{className:"w-full h-[280px]",children:h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(aR,{data:i,margin:{top:10,right:-10,left:-10,bottom:0},children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[h.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),h.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),h.jsx(fr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),h.jsx(Gn,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1,tickFormatter:a=>a}),h.jsx($n,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1,domain:[0,"dataMax + 2"]}),h.jsx(kt,{cursor:!1,content:a=>h.jsx(Zt,{...a,data:i,children:(()=>{if(!a.active||!a.label)return null;const s=i.find(l=>l.day===a.label);return h.jsxs("div",{className:"bg-[#111] text-white px-[14px] py-[8px] rounded-[6px] flex flex-col gap-[6px] text-[13px]",children:[h.jsx("div",{className:"font-semibold",children:a.label}),h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-[#6366F1]"}),h.jsx("div",{className:"text-[#aaa]",children:"Visitors"}),h.jsx("div",{className:"font-bold",children:s?.no_of_visitors??0})]})]})})()})}),h.jsx(r1,{type:"monotone",dataKey:"no_of_visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:a=>{const{cx:s,cy:l}=a;return h.jsxs("g",{children:[h.jsx("circle",{cx:s,cy:l,r:6,fill:"#fff",stroke:"#6466F1",strokeWidth:2}),h.jsx("circle",{cx:s,cy:l,r:2.5,fill:"#6466F1"})]})}})]})})})})},xme=({data:e})=>{const t=[{name:"Kosmo One",total:29,pending_approval:1,cancelled:2},{name:"OWC",total:23,pending_approval:9,cancelled:3},{name:"Exora",total:40,pending_approval:12,cancelled:1},{name:"OIC - T3",total:27,pending_approval:19,cancelled:8}],n=e==null?t:Array.isArray(e)?e:[],r=Array.isArray(n)&&n.length===0;return h.jsx(St,{title:"Building Wise Approvals",titleWeight:"semi-bold",className:"h-[362px]",childrenClassName:"mt-[34px]",children:r?h.jsx("div",{className:"h-[250px] flex items-center justify-center",children:h.jsx(Vt,{title:"No Data Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsxs("div",{className:"w-full border border-[#EBEBEB] rounded-[10px] overflow-hidden",children:[h.jsxs("div",{className:"grid grid-cols-4 bg-[#FAFAFA] px-[12px] py-[8px] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[h.jsx("div",{children:"Tenant"}),h.jsx("div",{className:"flex justify-end",children:"Total"}),h.jsx("div",{className:"flex justify-end",children:"Pending"}),h.jsx("div",{className:"flex justify-end",children:"Cancelled"})]}),h.jsx("div",{className:"max-h-[280px] overflow-y-auto hide-scrollbar",children:n.map((i,o)=>h.jsxs("div",{className:"grid grid-cols-4 p-[12px] text-[12px] leading-[16px] border-t border-[#EBEBEB]",children:[h.jsx("div",{className:"text-[#475569]",children:i.name}),h.jsx("div",{className:"flex justify-end text-[#36AB6C]",children:i.total}),h.jsx("div",{className:"flex justify-end text-[#F2A815]",children:i.pending_approval}),h.jsx("div",{className:"flex justify-end text-[#AB0000]",children:i.cancelled})]},o))})]})})},lf=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],wme=[{asset_group_name:"Lifts",asset_count:3,investment:"₹ 45L"},{asset_group_name:"Fire Systems",asset_count:16,investment:"₹ 28L"},{asset_group_name:"Generators",asset_count:16,investment:"₹ 95L"},{asset_group_name:"HVAC",asset_count:24,investment:"₹ 1.2Cr"},{asset_group_name:"Others",asset_count:97,investment:"₹ 52L"}],_me=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,facility_name:i.asset_group_name,value:i.asset_count||0,investment:i.investment||"-",fill:lf[o%lf.length]})):wme.map((i,o)=>({name:i.asset_group_name,facility_name:i.asset_group_name,value:i.asset_count||0,investment:i.investment||"-",fill:lf[o%lf.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?h.jsx(St,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx(Vt,{title:"No Assets Found",description:"Catch up all the data. Change the date range to see the data."})})}):h.jsx(St,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-[362px]",children:h.jsxs("div",{className:"flex items-center justify-between h-full mt-[16px]",children:[h.jsxs("div",{className:"relative w-[252px] h-[273px]",children:[h.jsx(Pt,{width:"100%",height:"100%",children:h.jsxs(Hi,{children:[h.jsx(ui,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>h.jsx(Ln,{fill:i.fill},o))}),h.jsx(kt,{cursor:!1,allowEscapeViewBox:{x:!0,y:!0},content:i=>i.active?h.jsx(Zt,{...i,data:n,children:h.jsx(Gr,{...i})}):null})]})}),h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[h.jsx("div",{className:"text-[24px] leading-[33px] font-medium text-[#121212]",children:r}),h.jsx("div",{className:"text-[12px] leading-[17px] text-[#64748B] mt-[2px]",children:"Total Assets"})]})]}),h.jsx("div",{className:"flex-1 max-w-[280px]",children:h.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white border border-[#E2E8F0]",children:[h.jsxs("div",{className:"grid grid-cols-3 px-[16px] py-[12px] bg-[#F8FAFC]",children:[h.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),h.jsx("div",{className:"text-[12px] font-medium text-[#64748B] text-center",children:"Count"}),h.jsx("div",{className:"text-[12px] font-medium text-[#64748B] text-right",children:"Investment"})]}),h.jsx("div",{className:"max-h-[205px] overflow-y-auto hide-scrollbar",children:n.map((i,o)=>h.jsxs("div",{className:"grid grid-cols-3 px-[16px] py-[12px] border-t border-[#F1F5F9]",children:[h.jsxs("div",{className:"flex items-center gap-[8px]",children:[h.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.fill}}),h.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),h.jsx("div",{className:"text-[13px] text-[#64748B] text-center",children:i.value}),h.jsx("div",{className:"text-[13px] text-[#64748B] text-right",children:i.investment})]},o))})]})})]})})};function Eme({columns:e=[],data:t=[],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},totalRows:a=0,totalPages:s=1,pageOptions:l=[10,20,30,40,50]}){const c=Array.isArray(t)?t:[],u=Array.isArray(e)?e:[],d=`200px repeat(${u.length-1}, 150px)`,f={};return u.forEach(p=>{if(p.key!=="name"){let m=0;for(let g=0;g<c.length;g++){const v=c[g][p.key];typeof v=="number"&&(m+=v)}f[p.key]=m}}),h.jsxs("div",{className:"w-full bg-white rounded-[12px] h-[390px] !border-[0.5px] !border-[#EBEBEB] !shadow-[0_0_12px_0_#EAF2FF] overflow-hidden flex flex-col",children:[h.jsx("div",{className:"flex-1 overflow-auto hide-scrollbar",children:c.length===0?h.jsx("div",{className:"h-full flex items-center justify-center",children:h.jsx(Vt,{title:"No Data Found",description:"Catch up all the data. Change the date range to see the data."})}):h.jsxs("div",{className:"min-w-max",children:[h.jsx("div",{className:"grid bg-[#354A5E] text-white text-[14px] font-medium sticky top-0 z-30",style:{gridTemplateColumns:d},children:u.map((p,m)=>h.jsx("div",{title:p.label,className:`px-[24px] py-[16px] whitespace-nowrap overflow-hidden text-ellipsis ${m===0?"sticky left-0 z-40 bg-[#354A5E] shadow-[2px_0_5px_rgba(0,0,0,0.1)] border-r border-[#2C3E50]":""}`,children:p.label},m))}),c.map((p,m)=>h.jsx("div",{className:"grid",style:{gridTemplateColumns:d},children:u.map((g,v)=>h.jsx("div",{className:`px-[24px] py-[14px] text-[14px] flex items-center ${v===0?"bg-white sticky left-0 z-20 font-medium shadow-[2px_0_5px_rgba(0,0,0,0.05)] border-r border-gray-200":"bg-gray-50"}`,children:p[g.key]??"-"},v))},m)),h.jsx("div",{className:"grid bg-[#F8FAFC] border-t border-[#F0F0F0] sticky bottom-0 z-30",style:{gridTemplateColumns:d},children:u.map((p,m)=>h.jsx("div",{className:`px-[24px] py-[16px] ${m===0?"sticky left-0 z-40 bg-[#F8FAFC] text-[#64748B] font-medium shadow-[2px_0_5px_rgba(0,0,0,0.05)] border-r border-gray-200":"text-[#64748B] font-medium"}`,children:p.key==="name"?"Grand Total":f[p.key]||0},m))})]})}),h.jsxs("div",{className:"flex justify-end items-center px-[24px] py-[16px] text-sm bg-white border-t border-[#F0F0F0] gap-[32px]",children:[h.jsxs("div",{className:"flex items-center gap-[8px] text-gray-600 text-[14px]",children:[h.jsx("div",{children:"Rows per page:"}),h.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-[8px] py-[4px]",children:l.map((p,m)=>h.jsx("option",{value:p,children:p},m))}),h.jsxs("div",{className:"ml-4 text-[14px]",children:[c.length===0?"0–0":`1–${c.length}`," of"," ",a||c.length]})]}),h.jsxs("div",{className:"flex items-center space-x-2 text-gray-600 text-[14px]",children:[h.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(YI,{size:18})}),h.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(W1,{size:18})}),h.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===s,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(z1,{size:18})}),h.jsx("button",{onClick:()=>o(s),disabled:i===s,className:"p-[8px] rounded hover:bg-gray-100 disabled:opacity-40",children:h.jsx(UI,{size:18})})]})]})]})}exports.AccessPointsUsage=i4;exports.Accounting=$fe;exports.Amenities=ZI;exports.AmenitiesStatsCard=co;exports.AmenityWiseRevenue=d4;exports.AssetValueBreakdown=Zfe;exports.AssetsByType=f4;exports.BlockWiseOccupancy=Afe;exports.BookingTrendChart=u4;exports.Bookings=c4;exports.Budgets=Hfe;exports.BuildingWiseApprovals=xme;exports.Card=Ie;exports.CardAccess=r4;exports.CashBankBalance=Ufe;exports.CommercialAccessOverview=n4;exports.CommercialAmenitiesDashboard=pme;exports.CommercialAssetManagementDashboard=mme;exports.CommercialDashboard=Zhe;exports.CommercialEngagementDashboard=vme;exports.CommercialGuardPatrols=h4;exports.CommercialGuardPetrolDashboard=gme;exports.CommercialHelpdeskDashboard=ame;exports.CommercialIncidentReports=m4;exports.CommercialOccupancy=GI;exports.CommercialReportTable=g4;exports.CommercialSmartAccessDashboard=nme;exports.CommercialTableDashboard=g4;exports.CommercialVisitorsDashboard=lme;exports.Community=pse;exports.Complaints=whe;exports.ComplaintsByLevel=She;exports.DuesAgeing=qfe;exports.EmployeeFootfall=XI;exports.Engagement=WR;exports.EngagementStatsGrid=Hhe;exports.EscalationLevel=yme;exports.EventsUtilisation=Ihe;exports.ExpenseCategories=Xfe;exports.Facilities=hse;exports.FinanceSummary=mse;exports.FoodBeverages=QI;exports.GateAndSecurityStatsGrid=yhe;exports.GateUpdates=nle;exports.GuardPatrols=ihe;exports.Header=B8;exports.Helpdesk=rle;exports.HelpdeskStatsGrid=jhe;exports.HourlyTrafficFlow=che;exports.IncidentReports=fhe;exports.IncomeExpenditure=zI;exports.MainHeader=J8;exports.MaintenanceStatus=p4;exports.MetricCard=bb;exports.MobileAccess=r4;exports.MoveInOutTrends=jfe;exports.NoticeBoardStatus=$he;exports.OccupancyOverview=kfe;exports.OrganisationWiseVisitors=l4;exports.PortfolioAssetsByType=_me;exports.RequestBox=Che;exports.ResidentOverview=Pfe;exports.RevenuebyCategory=epe;exports.SingleStats=Whe;exports.StaffAttendance=qI;exports.StatsGrid=nhe;exports.TenantsByVisitors=bme;exports.TicketEscalation=JI;exports.TicketStatus=e4;exports.Tickets=o4;exports.TicketsperCategory=a4;exports.TotalCommercialTable=Eme;exports.UnitStatus=Cfe;exports.VisitorUpdates=t4;exports.WeeklyVisitorPattern=s4;